UNPKG

ngx-extended-pdf-viewer

Version:

Embedding PDF files in your Angular application. Highly configurable viewer including the toolbar, sidebar, and all the features you're used to.

21 lines 845 kB
/**
 * @licstart The following is the entire license notice for the
 * JavaScript code in this page
 *
 * Copyright 2023 Mozilla Foundation
 *
 * 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
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @licend The above is the entire license notice for the
 * JavaScript code in this page
 */var t={1782:(t,r,a)=>{var i=a(7316),o=a(9762),l=TypeError;t.exports=function(t){if(i(t))return t;throw new l(o(t)+" is not a function")}},7073:(t,r,a)=>{var i=a(1694),o=a(9762),l=TypeError;t.exports=function(t){if(i(t))return t;throw new l(o(t)+" is not a constructor")}},4958:(t,r,a)=>{var i=a(7316),o=String,l=TypeError;t.exports=function(t){if("object"==typeof t||i(t))return t;throw new l("Can't set "+o(t)+" as a prototype")}},5690:(t,r,a)=>{var i=a(23).has;t.exports=function(t){i(t);return t}},5463:(t,r,a)=>{var i=a(2292),o=a(6941),l=a(7744).f,c=i("unscopables"),u=Array.prototype;void 0===u[c]&&l(u,c,{configurable:!0,value:o(null)});t.exports=function(t){u[c][t]=!0}},9047:(t,r,a)=>{var i=a(6819).charAt;t.exports=function(t,r,a){return r+(a?i(t,r).length:1)}},5834:(t,r,a)=>{var i=a(2658),o=TypeError;t.exports=function(t,r){if(i(r,t))return t;throw new o("Incorrect invocation")}},4719:(t,r,a)=>{var i=a(7633),o=String,l=TypeError;t.exports=function(t){if(i(t))return t;throw new l(o(t)+" is not an object")}},5115:t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7585:(t,r,a)=>{var i=a(1299),o=a(8374),l=TypeError;t.exports=i(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==o(t))throw new l("ArrayBuffer expected");return t.byteLength}},582:(t,r,a)=>{var i=a(8403),o=a(7585),l=i(ArrayBuffer.prototype.slice);t.exports=function(t){if(0!==o(t))return!1;try{l(t,0,0);return!1}catch(t){return!0}}},6944:(t,r,a)=>{var i=a(8154);t.exports=i((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},4358:(t,r,a)=>{var i=a(9298),o=a(8403),l=a(1299),c=a(9548),u=a(582),d=a(7585),h=a(8126),p=a(4837),v=i.structuredClone,y=i.ArrayBuffer,_=i.DataView,g=i.TypeError,m=Math.min,b=y.prototype,w=_.prototype,P=o(b.slice),k=l(b,"resizable","get"),A=l(b,"maxByteLength","get"),S=o(w.getInt8),x=o(w.setInt8);t.exports=(p||h)&&function(t,r,a){var i,o=d(t),l=void 0===r?o:c(r),b=!k||!k(t);if(u(t))throw new g("ArrayBuffer is detached");if(p){t=v(t,{transfer:[t]});if(o===l&&(a||b))return t}if(o>=l&&(!a||b))i=P(t,0,l);else{var w=a&&!b&&A?{maxByteLength:A(t)}:void 0;i=new y(l,w);for(var E=new _(t),I=new _(i),C=m(l,o),T=0;T<C;T++)x(I,T,S(E,T))}p||h(t);return i}},5861:(t,r,a)=>{var i,o,l,c=a(5115),u=a(940),d=a(9298),h=a(7316),p=a(7633),v=a(936),y=a(8329),_=a(9762),g=a(9293),m=a(7041),b=a(9691),w=a(2658),P=a(2176),k=a(9763),A=a(2292),S=a(7561),x=a(1649),E=x.enforce,I=x.get,C=d.Int8Array,T=C&&C.prototype,M=d.Uint8ClampedArray,O=M&&M.prototype,G=C&&P(C),R=T&&P(T),L=Object.prototype,D=d.TypeError,j=A("toStringTag"),W=S("TYPED_ARRAY_TAG"),N="TypedArrayConstructor",B=c&&!!k&&"Opera"!==y(d.opera),z=!1,H={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},U={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(t){var r=P(t);if(p(r)){var a=I(r);return a&&v(a,N)?a[N]:getTypedArrayConstructor(r)}},isTypedArray=function(t){if(!p(t))return!1;var r=y(t);return v(H,r)||v(U,r)};for(i in H)(l=(o=d[i])&&o.prototype)?E(l)[N]=o:B=!1;for(i in U)(l=(o=d[i])&&o.prototype)&&(E(l)[N]=o);if(!B||!h(G)||G===Function.prototype){G=function TypedArray(){throw new D("Incorrect invocation")};if(B)for(i in H)d[i]&&k(d[i],G)}if(!B||!R||R===L){R=G.prototype;if(B)for(i in H)d[i]&&k(d[i].prototype,R)}B&&P(O)!==R&&k(O,R);if(u&&!v(R,j)){z=!0;b(R,j,{configurable:!0,get:function(){return p(this)?this[W]:void 0}});for(i in H)d[i]&&g(d[i],W,i)}t.exports={NATIVE_ARRAY_BUFFER_VIEWS:B,TYPED_ARRAY_TAG:z&&W,aTypedArray:function(t){if(isTypedArray(t))return t;throw new D("Target is not a typed array")},aTypedArrayConstructor:function(t){if(h(t)&&(!k||w(G,t)))return t;throw new D(_(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,r,a,i){if(u){if(a)for(var o in H){var l=d[o];if(l&&v(l.prototype,t))try{delete l.prototype[t]}catch(a){try{l.prototype[t]=r}catch(t){}}}R[t]&&!a||m(R,t,a?r:B&&T[t]||r,i)}},exportTypedArrayStaticMethod:function(t,r,a){var i,o;if(u){if(k){if(a)for(i in H)if((o=d[i])&&v(o,t))try{delete o[t]}catch(t){}if(G[t]&&!a)return;try{return m(G,t,a?r:B&&G[t]||r)}catch(t){}}for(i in H)!(o=d[i])||o[t]&&!a||m(o,t,r)}},getTypedArrayConstructor:getTypedArrayConstructor,isView:function isView(t){if(!p(t))return!1;var r=y(t);return"DataView"===r||v(H,r)||v(U,r)},isTypedArray:isTypedArray,TypedArray:G,TypedArrayPrototype:R}},5050:(t,r,a)=>{var i=a(9298),o=a(8403),l=a(940),c=a(5115),u=a(5145),d=a(9293),h=a(9691),p=a(6880),v=a(8154),y=a(5834),_=a(1003),g=a(8293),m=a(9548),b=a(796),w=a(3106),P=a(2176),k=a(9763),A=a(5455).f,S=a(8041),x=a(6071),E=a(7536),I=a(1649),C=u.PROPER,T=u.CONFIGURABLE,M="ArrayBuffer",O="DataView",G="prototype",R="Wrong index",L=I.getterFor(M),D=I.getterFor(O),j=I.set,W=i[M],N=W,B=N&&N[G],z=i[O],H=z&&z[G],U=Object.prototype,q=i.Array,V=i.RangeError,K=o(S),Y=o([].reverse),X=w.pack,$=w.unpack,packInt8=function(t){return[255&t]},packInt16=function(t){return[255&t,t>>8&255]},packInt32=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},unpackInt32=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},packFloat32=function(t){return X(b(t),23,4)},packFloat64=function(t){return X(t,52,8)},addGetter=function(t,r,a){h(t[G],r,{configurable:!0,get:function(){return a(this)[r]}})},get=function(t,r,a,i){var o=D(t),l=m(a),c=!!i;if(l+r>o.byteLength)throw new V(R);var u=o.bytes,d=l+o.byteOffset,h=x(u,d,d+r);return c?h:Y(h)},set=function(t,r,a,i,o,l){var c=D(t),u=m(a),d=i(+o),h=!!l;if(u+r>c.byteLength)throw new V(R);for(var p=c.bytes,v=u+c.byteOffset,y=0;y<r;y++)p[v+y]=d[h?y:r-y-1]};if(c){var J=C&&W.name!==M;if(v((function(){W(1)}))&&v((function(){new W(-1)}))&&!v((function(){new W;new W(1.5);new W(NaN);return 1!==W.length||J&&!T})))J&&T&&d(W,"name",M);else{(N=function ArrayBuffer(t){y(this,B);return new W(m(t))})[G]=B;for(var Q,Z=A(W),ee=0;Z.length>ee;)(Q=Z[ee++])in N||d(N,Q,W[Q]);B.constructor=N}k&&P(H)!==U&&k(H,U);var te=new z(new N(2)),re=o(H.setInt8);te.setInt8(0,2147483648);te.setInt8(1,2147483649);!te.getInt8(0)&&te.getInt8(1)||p(H,{setInt8:function setInt8(t,r){re(this,t,r<<24>>24)},setUint8:function setUint8(t,r){re(this,t,r<<24>>24)}},{unsafe:!0})}else{B=(N=function ArrayBuffer(t){y(this,B);var r=m(t);j(this,{type:M,bytes:K(q(r),0),byteLength:r});if(!l){this.byteLength=r;this.detached=!1}})[G];H=(z=function DataView(t,r,a){y(this,H);y(t,B);var i=L(t),o=i.byteLength,c=_(r);if(c<0||c>o)throw new V("Wrong offset");if(c+(a=void 0===a?o-c:g(a))>o)throw new V("Wrong length");j(this,{type:O,buffer:t,byteLength:a,byteOffset:c,bytes:i.bytes});if(!l){this.buffer=t;this.byteLength=a;this.byteOffset=c}})[G];if(l){addGetter(N,"byteLength",L);addGetter(z,"buffer",D);addGetter(z,"byteLength",D);addGetter(z,"byteOffset",D)}p(H,{getInt8:function getInt8(t){return get(this,1,t)[0]<<24>>24},getUint8:function getUint8(t){return get(this,1,t)[0]},getInt16:function getInt16(t){var r=get(this,2,t,arguments.length>1&&arguments[1]);return(r[1]<<8|r[0])<<16>>16},getUint16:function getUint16(t){var r=get(this,2,t,arguments.length>1&&arguments[1]);return r[1]<<8|r[0]},getInt32:function getInt32(t){return unpackInt32(get(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function getUint32(t){return unpackInt32(get(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function getFloat32(t){return $(get(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function getFloat64(t){return $(get(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function setInt8(t,r){set(this,1,t,packInt8,r)},setUint8:function setUint8(t,r){set(this,1,t,packInt8,r)},setInt16:function setInt16(t,r){set(this,2,t,packInt16,r,arguments.length>2&&arguments[2])},setUint16:function setUint16(t,r){set(this,2,t,packInt16,r,arguments.length>2&&arguments[2])},setInt32:function setInt32(t,r){set(this,4,t,packInt32,r,arguments.length>2&&arguments[2])},setUint32:function setUint32(t,r){set(this,4,t,packInt32,r,arguments.length>2&&arguments[2])},setFloat32:function setFloat32(t,r){set(this,4,t,packFloat32,r,arguments.length>2&&arguments[2])},setFloat64:function setFloat64(t,r){set(this,8,t,packFloat64,r,arguments.length>2&&arguments[2])}})}E(N,M);E(z,O);t.exports={ArrayBuffer:N,DataView:z}},1474:(t,r,a)=>{var i=a(2007),o=a(6985),l=a(451),c=a(2322),u=Math.min;t.exports=[].copyWithin||function copyWithin(t,r){var a=i(this),d=l(a),h=o(t,d),p=o(r,d),v=arguments.length>2?arguments[2]:void 0,y=u((void 0===v?d:o(v,d))-p,d-h),_=1;if(p<h&&h<p+y){_=-1;p+=y-1;h+=y-1}for(;y-- >0;){p in a?a[h]=a[p]:c(a,h);h+=_;p+=_}return a}},8041:(t,r,a)=>{var i=a(2007),o=a(6985),l=a(451);t.exports=function fill(t){for(var r=i(this),a=l(r),c=arguments.length,u=o(c>1?arguments[1]:void 0,a),d=c>2?arguments[2]:void 0,h=void 0===d?a:o(d,a);h>u;)r[u++]=t;return r}},8208:(t,r,a)=>{var i=a(2423).forEach,o=a(8321)("forEach");t.exports=o?[].forEach:function forEach(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},7003:(t,r,a)=>{var i=a(451);t.exports=function(t,r,a){for(var o=0,l=arguments.length>2?a:i(r),c=new t(l);l>o;)c[o]=r[o++];return c}},7609:(t,r,a)=>{var i=a(7789),o=a(2026),l=a(2007),c=a(5723),u=a(5191),d=a(1694),h=a(451),p=a(8947),v=a(7612),y=a(273),_=Array;t.exports=function from(t){var r=l(t),a=d(this),g=arguments.length,m=g>1?arguments[1]:void 0,b=void 0!==m;b&&(m=i(m,g>2?arguments[2]:void 0));var w,P,k,A,S,x,E=y(r),I=0;if(!E||this===_&&u(E)){w=h(r);P=a?new this(w):_(w);for(;w>I;I++){x=b?m(r[I],I):r[I];p(P,I,x)}}else{S=(A=v(r,E)).next;P=a?new this:[];for(;!(k=o(S,A)).done;I++){x=b?c(A,m,[k.value,I],!0):k.value;p(P,I,x)}}P.length=I;return P}},9773:(t,r,a)=>{var i=a(4115),o=a(6985),l=a(451),createMethod=function(t){return function(r,a,c){var u,d=i(r),h=l(d),p=o(c,h);if(t&&a!=a){for(;h>p;)if((u=d[p++])!=u)return!0}else for(;h>p;p++)if((t||p in d)&&d[p]===a)return t||p||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},4026:(t,r,a)=>{var i=a(7789),o=a(3622),l=a(2007),c=a(451),createMethod=function(t){var r=1===t;return function(a,u,d){for(var h,p=l(a),v=o(p),y=c(v),_=i(u,d);y-- >0;)if(_(h=v[y],y,p))switch(t){case 0:return h;case 1:return y}return r?-1:void 0}};t.exports={findLast:createMethod(0),findLastIndex:createMethod(1)}},2423:(t,r,a)=>{var i=a(7789),o=a(8403),l=a(3622),c=a(2007),u=a(451),d=a(8097),h=o([].push),createMethod=function(t){var r=1===t,a=2===t,o=3===t,p=4===t,v=6===t,y=7===t,_=5===t||v;return function(g,m,b,w){for(var P,k,A=c(g),S=l(A),x=u(S),E=i(m,b),I=0,C=w||d,T=r?C(g,x):a||y?C(g,0):void 0;x>I;I++)if(_||I in S){k=E(P=S[I],I,A);if(t)if(r)T[I]=k;else if(k)switch(t){case 3:return!0;case 5:return P;case 6:return I;case 2:h(T,P)}else switch(t){case 4:return!1;case 7:h(T,P)}}return v?-1:o||p?p:T}};t.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6),filterReject:createMethod(7)}},8671:(t,r,a)=>{var i=a(7294),o=a(4115),l=a(1003),c=a(451),u=a(8321),d=Math.min,h=[].lastIndexOf,p=!!h&&1/[1].lastIndexOf(1,-0)<0,v=u("lastIndexOf"),y=p||!v;t.exports=y?function lastIndexOf(t){if(p)return i(h,this,arguments)||0;var r=o(this),a=c(r),u=a-1;arguments.length>1&&(u=d(u,l(arguments[1])));u<0&&(u=a+u);for(;u>=0;u--)if(u in r&&r[u]===t)return u||0;return-1}:h},3577:(t,r,a)=>{var i=a(8154),o=a(2292),l=a(2171),c=o("species");t.exports=function(t){return l>=51||!i((function(){var r=[];(r.constructor={})[c]=function(){return{foo:1}};return 1!==r[t](Boolean).foo}))}},8321:(t,r,a)=>{var i=a(8154);t.exports=function(t,r){var a=[][t];return!!a&&i((function(){a.call(null,r||function(){return 1},1)}))}},2741:(t,r,a)=>{var i=a(1782),o=a(2007),l=a(3622),c=a(451),u=TypeError,createMethod=function(t){return function(r,a,d,h){var p=o(r),v=l(p),y=c(p);i(a);var _=t?y-1:0,g=t?-1:1;if(d<2)for(;;){if(_ in v){h=v[_];_+=g;break}_+=g;if(t?_<0:y<=_)throw new u("Reduce of empty array with no initial value")}for(;t?_>=0:y>_;_+=g)_ in v&&(h=a(h,v[_],_,p));return h}};t.exports={left:createMethod(!1),right:createMethod(!0)}},6661:(t,r,a)=>{var i=a(940),o=a(6998),l=TypeError,c=Object.getOwnPropertyDescriptor,u=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=u?function(t,r){if(o(t)&&!c(t,"length").writable)throw new l("Cannot set read only .length");return t.length=r}:function(t,r){return t.length=r}},6071:(t,r,a)=>{var i=a(6985),o=a(451),l=a(8947),c=Array,u=Math.max;t.exports=function(t,r,a){for(var d=o(t),h=i(r,d),p=i(void 0===a?d:a,d),v=c(u(p-h,0)),y=0;h<p;h++,y++)l(v,y,t[h]);v.length=y;return v}},2251:(t,r,a)=>{var i=a(8403);t.exports=i([].slice)},4689:(t,r,a)=>{var i=a(6071),o=Math.floor,mergeSort=function(t,r){var a=t.length,l=o(a/2);return a<8?insertionSort(t,r):merge(t,mergeSort(i(t,0,l),r),mergeSort(i(t,l),r),r)},insertionSort=function(t,r){for(var a,i,o=t.length,l=1;l<o;){i=l;a=t[l];for(;i&&r(t[i-1],a)>0;)t[i]=t[--i];i!==l++&&(t[i]=a)}return t},merge=function(t,r,a,i){for(var o=r.length,l=a.length,c=0,u=0;c<o||u<l;)t[c+u]=c<o&&u<l?i(r[c],a[u])<=0?r[c++]:a[u++]:c<o?r[c++]:a[u++];return t};t.exports=mergeSort},751:(t,r,a)=>{var i=a(6998),o=a(1694),l=a(7633),c=a(2292)("species"),u=Array;t.exports=function(t){var r;if(i(t)){r=t.constructor;(o(r)&&(r===u||i(r.prototype))||l(r)&&null===(r=r[c]))&&(r=void 0)}return void 0===r?u:r}},8097:(t,r,a)=>{var i=a(751);t.exports=function(t,r){return new(i(t))(0===r?0:r)}},2304:(t,r,a)=>{var i=a(451);t.exports=function(t,r){for(var a=i(t),o=new r(a),l=0;l<a;l++)o[l]=t[a-l-1];return o}},5886:(t,r,a)=>{var i=a(451),o=a(1003),l=RangeError;t.exports=function(t,r,a,c){var u=i(t),d=o(a),h=d<0?u+d:d;if(h>=u||h<0)throw new l("Incorrect index");for(var p=new r(u),v=0;v<u;v++)p[v]=v===h?c:t[v];return p}},5723:(t,r,a)=>{var i=a(4719),o=a(3316);t.exports=function(t,r,a,l){try{return l?r(i(a)[0],a[1]):r(a)}catch(r){o(t,"throw",r)}}},1374:(t,r,a)=>{var i=a(2292)("iterator"),o=!1;try{var l=0,c={next:function(){return{done:!!l++}},return:function(){o=!0}};c[i]=function(){return this};Array.from(c,(function(){throw 2}))}catch(t){}t.exports=function(t,r){try{if(!r&&!o)return!1}catch(t){return!1}var a=!1;try{var l={};l[i]=function(){return{next:function(){return{done:a=!0}}}};t(l)}catch(t){}return a}},8374:(t,r,a)=>{var i=a(8403),o=i({}.toString),l=i("".slice);t.exports=function(t){return l(o(t),8,-1)}},8329:(t,r,a)=>{var i=a(3077),o=a(7316),l=a(8374),c=a(2292)("toStringTag"),u=Object,d="Arguments"===l(function(){return arguments}());t.exports=i?l:function(t){var r,a,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,r){try{return t[r]}catch(t){}}(r=u(t),c))?a:d?l(r):"Object"===(i=l(r))&&o(r.callee)?"Arguments":i}},6122:(t,r,a)=>{var i=a(6941),o=a(9691),l=a(6880),c=a(7789),u=a(5834),d=a(3734),h=a(6837),p=a(7301),v=a(1111),y=a(5963),_=a(940),g=a(4694).fastKey,m=a(1649),b=m.set,w=m.getterFor;t.exports={getConstructor:function(t,r,a,p){var v=t((function(t,o){u(t,y);b(t,{type:r,index:i(null),first:void 0,last:void 0,size:0});_||(t.size=0);d(o)||h(o,t[p],{that:t,AS_ENTRIES:a})})),y=v.prototype,m=w(r),define=function(t,r,a){var i,o,l=m(t),c=getEntry(t,r);if(c)c.value=a;else{l.last=c={index:o=g(r,!0),key:r,value:a,previous:i=l.last,next:void 0,removed:!1};l.first||(l.first=c);i&&(i.next=c);_?l.size++:t.size++;"F"!==o&&(l.index[o]=c)}return t},getEntry=function(t,r){var a,i=m(t),o=g(r);if("F"!==o)return i.index[o];for(a=i.first;a;a=a.next)if(a.key===r)return a};l(y,{clear:function clear(){for(var t=m(this),r=t.index,a=t.first;a;){a.removed=!0;a.previous&&(a.previous=a.previous.next=void 0);delete r[a.index];a=a.next}t.first=t.last=void 0;_?t.size=0:this.size=0},delete:function(t){var r=this,a=m(r),i=getEntry(r,t);if(i){var o=i.next,l=i.previous;delete a.index[i.index];i.removed=!0;l&&(l.next=o);o&&(o.previous=l);a.first===i&&(a.first=o);a.last===i&&(a.last=l);_?a.size--:r.size--}return!!i},forEach:function forEach(t){for(var r,a=m(this),i=c(t,arguments.length>1?arguments[1]:void 0);r=r?r.next:a.first;){i(r.value,r.key,this);for(;r&&r.removed;)r=r.previous}},has:function has(t){return!!getEntry(this,t)}});l(y,a?{get:function get(t){var r=getEntry(this,t);return r&&r.value},set:function set(t,r){return define(this,0===t?0:t,r)}}:{add:function add(t){return define(this,t=0===t?0:t,t)}});_&&o(y,"size",{configurable:!0,get:function(){return m(this).size}});return v},setStrong:function(t,r,a){var i=r+" Iterator",o=w(r),l=w(i);p(t,r,(function(t,r){b(this,{type:i,target:t,state:o(t),kind:r,last:void 0})}),(function(){for(var t=l(this),r=t.kind,a=t.last;a&&a.removed;)a=a.previous;if(!t.target||!(t.last=a=a?a.next:t.state.first)){t.target=void 0;return v(void 0,!0)}return v("keys"===r?a.key:"values"===r?a.value:[a.key,a.value],!1)}),a?"entries":"values",!a,!0);y(r)}}},9609:(t,r,a)=>{var i=a(8403),o=a(6880),l=a(4694).getWeakData,c=a(5834),u=a(4719),d=a(3734),h=a(7633),p=a(6837),v=a(2423),y=a(936),_=a(1649),g=_.set,m=_.getterFor,b=v.find,w=v.findIndex,P=i([].splice),k=0,uncaughtFrozenStore=function(t){return t.frozen||(t.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(t,r){return b(t.entries,(function(t){return t[0]===r}))};UncaughtFrozenStore.prototype={get:function(t){var r=findUncaughtFrozen(this,t);if(r)return r[1]},has:function(t){return!!findUncaughtFrozen(this,t)},set:function(t,r){var a=findUncaughtFrozen(this,t);a?a[1]=r:this.entries.push([t,r])},delete:function(t){var r=w(this.entries,(function(r){return r[0]===t}));~r&&P(this.entries,r,1);return!!~r}};t.exports={getConstructor:function(t,r,a,i){var v=t((function(t,o){c(t,_);g(t,{type:r,id:k++,frozen:void 0});d(o)||p(o,t[i],{that:t,AS_ENTRIES:a})})),_=v.prototype,b=m(r),define=function(t,r,a){var i=b(t),o=l(u(r),!0);!0===o?uncaughtFrozenStore(i).set(r,a):o[i.id]=a;return t};o(_,{delete:function(t){var r=b(this);if(!h(t))return!1;var a=l(t);return!0===a?uncaughtFrozenStore(r).delete(t):a&&y(a,r.id)&&delete a[r.id]},has:function has(t){var r=b(this);if(!h(t))return!1;var a=l(t);return!0===a?uncaughtFrozenStore(r).has(t):a&&y(a,r.id)}});o(_,a?{get:function get(t){var r=b(this);if(h(t)){var a=l(t);return!0===a?uncaughtFrozenStore(r).get(t):a?a[r.id]:void 0}},set:function set(t,r){return define(this,t,r)}}:{add:function add(t){return define(this,t,!0)}});return v}}},4981:(t,r,a)=>{var i=a(4978),o=a(9298),l=a(8403),c=a(7007),u=a(7041),d=a(4694),h=a(6837),p=a(5834),v=a(7316),y=a(3734),_=a(7633),g=a(8154),m=a(1374),b=a(7536),w=a(7523);t.exports=function(t,r,a){var P=-1!==t.indexOf("Map"),k=-1!==t.indexOf("Weak"),A=P?"set":"add",S=o[t],x=S&&S.prototype,E=S,I={},fixMethod=function(t){var r=l(x[t]);u(x,t,"add"===t?function add(t){r(this,0===t?0:t);return this}:"delete"===t?function(t){return!(k&&!_(t))&&r(this,0===t?0:t)}:"get"===t?function get(t){return k&&!_(t)?void 0:r(this,0===t?0:t)}:"has"===t?function has(t){return!(k&&!_(t))&&r(this,0===t?0:t)}:function set(t,a){r(this,0===t?0:t,a);return this})};if(c(t,!v(S)||!(k||x.forEach&&!g((function(){(new S).entries().next()}))))){E=a.getConstructor(r,t,P,A);d.enable()}else if(c(t,!0)){var C=new E,T=C[A](k?{}:-0,1)!==C,M=g((function(){C.has(1)})),O=m((function(t){new S(t)})),G=!k&&g((function(){for(var t=new S,r=5;r--;)t[A](r,r);return!t.has(-0)}));if(!O){(E=r((function(t,r){p(t,x);var a=w(new S,t,E);y(r)||h(r,a[A],{that:a,AS_ENTRIES:P});return a}))).prototype=x;x.constructor=E}if(M||G){fixMethod("delete");fixMethod("has");P&&fixMethod("get")}(G||T)&&fixMethod(A);k&&x.clear&&delete x.clear}I[t]=E;i({global:!0,constructor:!0,forced:E!==S},I);b(E,t);k||a.setStrong(E,t,P);return E}},1425:(t,r,a)=>{var i=a(936),o=a(8953),l=a(5764),c=a(7744);t.exports=function(t,r,a){for(var u=o(r),d=c.f,h=l.f,p=0;p<u.length;p++){var v=u[p];i(t,v)||a&&i(a,v)||d(t,v,h(r,v))}}},2280:(t,r,a)=>{var i=a(2292)("match");t.exports=function(t){var r=/./;try{"/./"[t](r)}catch(a){try{r[i]=!1;return"/./"[t](r)}catch(t){}}return!1}},7888:(t,r,a)=>{var i=a(8154);t.exports=!i((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},1111:t=>{t.exports=function(t,r){return{value:t,done:r}}},9293:(t,r,a)=>{var i=a(940),o=a(7744),l=a(1198);t.exports=i?function(t,r,a){return o.f(t,r,l(1,a))}:function(t,r,a){t[r]=a;return t}},1198:t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},8947:(t,r,a)=>{var i=a(4871),o=a(7744),l=a(1198);t.exports=function(t,r,a){var c=i(r);c in t?o.f(t,c,l(0,a)):t[c]=a}},3612:(t,r,a)=>{var i=a(4719),o=a(2923),l=TypeError;t.exports=function(t){i(this);if("string"===t||"default"===t)t="string";else if("number"!==t)throw new l("Incorrect hint");return o(this,t)}},9691:(t,r,a)=>{var i=a(9687),o=a(7744);t.exports=function(t,r,a){a.get&&i(a.get,r,{getter:!0});a.set&&i(a.set,r,{setter:!0});return o.f(t,r,a)}},7041:(t,r,a)=>{var i=a(7316),o=a(7744),l=a(9687),c=a(6e3);t.exports=function(t,r,a,u){u||(u={});var d=u.enumerable,h=void 0!==u.name?u.name:r;i(a)&&l(a,h,u);if(u.global)d?t[r]=a:c(r,a);else{try{u.unsafe?t[r]&&(d=!0):delete t[r]}catch(t){}d?t[r]=a:o.f(t,r,{value:a,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},6880:(t,r,a)=>{var i=a(7041);t.exports=function(t,r,a){for(var o in r)i(t,o,r[o],a);return t}},6e3:(t,r,a)=>{var i=a(9298),o=Object.defineProperty;t.exports=function(t,r){try{o(i,t,{value:r,configurable:!0,writable:!0})}catch(a){i[t]=r}return r}},2322:(t,r,a)=>{var i=a(9762),o=TypeError;t.exports=function(t,r){if(!delete t[r])throw new o("Cannot delete property "+i(r)+" of "+i(t))}},940:(t,r,a)=>{var i=a(8154);t.exports=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8126:(t,r,a)=>{var i,o,l,c,u=a(9298),d=a(2276),h=a(4837),p=u.structuredClone,v=u.ArrayBuffer,y=u.MessageChannel,_=!1;if(h)_=function(t){p(t,{transfer:[t]})};else if(v)try{y||(i=d("worker_threads"))&&(y=i.MessageChannel);if(y){o=new y;l=new v(2);c=function(t){o.port1.postMessage(null,[t])};if(2===l.byteLength){c(l);0===l.byteLength&&(_=c)}}}catch(t){}t.exports=_},1558:t=>{var r="object"==typeof document&&document.all,a=void 0===r&&void 0!==r;t.exports={all:r,IS_HTMLDDA:a}},5584:(t,r,a)=>{var i=a(9298),o=a(7633),l=i.document,c=o(l)&&o(l.createElement);t.exports=function(t){return c?l.createElement(t):{}}},4287:t=>{var r=TypeError;t.exports=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}},8560:t=>{t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},2411:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},3942:(t,r,a)=>{var i=a(5584)("span").classList,o=i&&i.constructor&&i.constructor.prototype;t.exports=o===Object.prototype?void 0:o},7614:(t,r,a)=>{var i=a(234).match(/firefox\/(\d+)/i);t.exports=!!i&&+i[1]},3413:(t,r,a)=>{var i=a(8471),o=a(4864);t.exports=!i&&!o&&"object"==typeof window&&"object"==typeof document},8471:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},7463:(t,r,a)=>{var i=a(234);t.exports=/MSIE|Trident/.test(i)},1458:(t,r,a)=>{var i=a(234);t.exports=/ipad|iphone|ipod/i.test(i)&&"undefined"!=typeof Pebble},2589:(t,r,a)=>{var i=a(234);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},4864:(t,r,a)=>{var i=a(9298),o=a(8374);t.exports="process"===o(i.process)},8173:(t,r,a)=>{var i=a(234);t.exports=/web0s(?!.*chrome)/i.test(i)},234:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},2171:(t,r,a)=>{var i,o,l=a(9298),c=a(234),u=l.process,d=l.Deno,h=u&&u.versions||d&&d.version,p=h&&h.v8;p&&(o=(i=p.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1]));!o&&c&&(!(i=c.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=c.match(/Chrome\/(\d+)/))&&(o=+i[1]);t.exports=o},7906:(t,r,a)=>{var i=a(234).match(/AppleWebKit\/(\d+)\./);t.exports=!!i&&+i[1]},298:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},34:(t,r,a)=>{var i=a(8403),o=Error,l=i("".replace),c=String(new o("zxcasd").stack),u=/\n\s*at [^:]*:[^\n]*/,d=u.test(c);t.exports=function(t,r){if(d&&"string"==typeof t&&!o.prepareStackTrace)for(;r--;)t=l(t,u,"");return t}},1931:(t,r,a)=>{var i=a(9293),o=a(34),l=a(3437),c=Error.captureStackTrace;t.exports=function(t,r,a,u){l&&(c?c(t,r):i(t,"stack",o(a,u)))}},3437:(t,r,a)=>{var i=a(8154),o=a(1198);t.exports=!i((function(){var t=new Error("a");if(!("stack"in t))return!0;Object.defineProperty(t,"stack",o(1,7));return 7!==t.stack}))},3522:(t,r,a)=>{var i=a(940),o=a(8154),l=a(4719),c=a(1264),u=Error.prototype.toString,d=o((function(){if(i){var t=Object.create(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==u.call(t))return!0}return"2: 1"!==u.call({message:1,name:2})||"Error"!==u.call({})}));t.exports=d?function toString(){var t=l(this),r=c(t.name,"Error"),a=c(t.message);return r?a?r+": "+a:r:a}:u},4978:(t,r,a)=>{var i=a(9298),o=a(5764).f,l=a(9293),c=a(7041),u=a(6e3),d=a(1425),h=a(7007);t.exports=function(t,r){var a,p,v,y,_,g=t.target,m=t.global,b=t.stat;if(a=m?i:b?i[g]||u(g,{}):(i[g]||{}).prototype)for(p in r){y=r[p];v=t.dontCallGetSet?(_=o(a,p))&&_.value:a[p];if(!h(m?p:g+(b?".":"#")+p,t.forced)&&void 0!==v){if(typeof y==typeof v)continue;d(y,v)}(t.sham||v&&v.sham)&&l(y,"sham",!0);c(a,p,y,t)}}},8154:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},4629:(t,r,a)=>{a(7942);var i=a(6218),o=a(7041),l=a(2178),c=a(8154),u=a(2292),d=a(9293),h=u("species"),p=RegExp.prototype;t.exports=function(t,r,a,v){var y=u(t),_=!c((function(){var r={};r[y]=function(){return 7};return 7!==""[t](r)})),g=_&&!c((function(){var r=!1,a=/a/;if("split"===t){(a={}).constructor={};a.constructor[h]=function(){return a};a.flags="";a[y]=/./[y]}a.exec=function(){r=!0;return null};a[y]("");return!r}));if(!_||!g||a){var m=i(/./[y]),b=r(y,""[t],(function(t,r,a,o,c){var u=i(t),d=r.exec;return d===l||d===p.exec?_&&!c?{done:!0,value:m(r,a,o)}:{done:!0,value:u(a,r,o)}:{done:!1}}));o(String.prototype,t,b[0]);o(p,y,b[1])}v&&d(p[y],"sham",!0)}},7938:(t,r,a)=>{var i=a(6998),o=a(451),l=a(4287),c=a(7789),flattenIntoArray=function(t,r,a,u,d,h,p,v){for(var y,_,g=d,m=0,b=!!p&&c(p,v);m<u;){if(m in a){y=b?b(a[m],m,r):a[m];if(h>0&&i(y)){_=o(y);g=flattenIntoArray(t,r,y,_,g,h-1)-1}else{l(g+1);t[g]=y}g++}m++}return g};t.exports=flattenIntoArray},7010:(t,r,a)=>{var i=a(8154);t.exports=!i((function(){return Object.isExtensible(Object.preventExtensions({}))}))},7294:(t,r,a)=>{var i=a(2486),o=Function.prototype,l=o.apply,c=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?c.bind(l):function(){return c.apply(l,arguments)})},7789:(t,r,a)=>{var i=a(6218),o=a(1782),l=a(2486),c=i(i.bind);t.exports=function(t,r){o(t);return void 0===r?t:l?c(t,r):function(){return t.apply(r,arguments)}}},2486:(t,r,a)=>{var i=a(8154);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6520:(t,r,a)=>{var i=a(8403),o=a(1782),l=a(7633),c=a(936),u=a(2251),d=a(2486),h=Function,p=i([].concat),v=i([].join),y={};t.exports=d?h.bind:function bind(t){var r=o(this),a=r.prototype,i=u(arguments,1),d=function bound(){var a=p(i,u(arguments));return this instanceof d?function(t,r,a){if(!c(y,r)){for(var i=[],o=0;o<r;o++)i[o]="a["+o+"]";y[r]=h("C,a","return new C("+v(i,",")+")")}return y[r](t,a)}(r,a.length,a):r.apply(t,a)};l(a)&&(d.prototype=a);return d}},2026:(t,r,a)=>{var i=a(2486),o=Function.prototype.call;t.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},5145:(t,r,a)=>{var i=a(940),o=a(936),l=Function.prototype,c=i&&Object.getOwnPropertyDescriptor,u=o(l,"name"),d=u&&"something"===function something(){}.name,h=u&&(!i||i&&c(l,"name").configurable);t.exports={EXISTS:u,PROPER:d,CONFIGURABLE:h}},1299:(t,r,a)=>{var i=a(8403),o=a(1782);t.exports=function(t,r,a){try{return i(o(Object.getOwnPropertyDescriptor(t,r)[a]))}catch(t){}}},6218:(t,r,a)=>{var i=a(8374),o=a(8403);t.exports=function(t){if("Function"===i(t))return o(t)}},8403:(t,r,a)=>{var i=a(2486),o=Function.prototype,l=o.call,c=i&&o.bind.bind(l,l);t.exports=i?c:function(t){return function(){return l.apply(t,arguments)}}},7187:(t,r,a)=>{var i=a(9298),o=a(7316);t.exports=function(t,r){return arguments.length<2?(a=i[t],o(a)?a:void 0):i[t]&&i[t][r];var a}},9235:t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},9115:(t,r,a)=>{var i=a(2026),o=a(4719),l=a(9235),c=a(273);t.exports=function(t,r){r&&"string"==typeof t||o(t);var a=c(t);return l(o(void 0!==a?i(a,t):t))}},273:(t,r,a)=>{var i=a(8329),o=a(8486),l=a(3734),c=a(6596),u=a(2292)("iterator");t.exports=function(t){if(!l(t))return o(t,u)||o(t,"@@iterator")||c[i(t)]}},7612:(t,r,a)=>{var i=a(2026),o=a(1782),l=a(4719),c=a(9762),u=a(273),d=TypeError;t.exports=function(t,r){var a=arguments.length<2?u(t):r;if(o(a))return l(i(a,t));throw new d(c(t)+" is not iterable")}},1801:(t,r,a)=>{var i=a(8403),o=a(6998),l=a(7316),c=a(8374),u=a(5730),d=i([].push);t.exports=function(t){if(l(t))return t;if(o(t)){for(var r=t.length,a=[],i=0;i<r;i++){var h=t[i];"string"==typeof h?d(a,h):"number"!=typeof h&&"Number"!==c(h)&&"String"!==c(h)||d(a,u(h))}var p=a.length,v=!0;return function(t,r){if(v){v=!1;return r}if(o(this))return r;for(var i=0;i<p;i++)if(a[i]===t)return r}}}},8486:(t,r,a)=>{var i=a(1782),o=a(3734);t.exports=function(t,r){var a=t[r];return o(a)?void 0:i(a)}},1096:(t,r,a)=>{var i=a(1782),o=a(4719),l=a(2026),c=a(1003),u=a(9235),d="Invalid size",h=RangeError,p=TypeError,v=Math.max,SetRecord=function(t,r,a,i){this.set=t;this.size=r;this.has=a;this.keys=i};SetRecord.prototype={getIterator:function(){return u(o(l(this.keys,this.set)))},includes:function(t){return l(this.has,this.set,t)}};t.exports=function(t){o(t);var r=+t.size;if(r!=r)throw new p(d);var a=c(r);if(a<0)throw new h(d);return new SetRecord(t,v(a,0),i(t.has),i(t.keys))}},1634:(t,r,a)=>{var i=a(8403),o=a(2007),l=Math.floor,c=i("".charAt),u=i("".replace),d=i("".slice),h=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,p=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,r,a,i,v,y){var _=a+t.length,g=i.length,m=p;if(void 0!==v){v=o(v);m=h}return u(y,m,(function(o,u){var h;switch(c(u,0)){case"$":return"$";case"&":return t;case"`":return d(r,0,a);case"'":return d(r,_);case"<":h=v[d(u,1,-1)];break;default:var p=+u;if(0===p)return o;if(p>g){var y=l(p/10);return 0===y?o:y<=g?void 0===i[y-1]?c(u,1):i[y-1]+c(u,1):o}h=i[p-1]}return void 0===h?"":h}))}},9298:function(t){var check=function(t){return t&&t.Math===Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},936:(t,r,a)=>{var i=a(8403),o=a(2007),l=i({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,r){return l(o(t),r)}},6010:t=>{t.exports={}},5285:t=>{t.exports=function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(t){}}},519:(t,r,a)=>{var i=a(7187);t.exports=i("document","documentElement")},9394:(t,r,a)=>{var i=a(940),o=a(8154),l=a(5584);t.exports=!i&&!o((function(){return 7!==Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a}))},3106:t=>{var r=Array,a=Math.abs,i=Math.pow,o=Math.floor,l=Math.log,c=Math.LN2;t.exports={pack:function(t,u,d){var h,p,v,y=r(d),_=8*d-u-1,g=(1<<_)-1,m=g>>1,b=23===u?i(2,-24)-i(2,-77):0,w=t<0||0===t&&1/t<0?1:0,P=0;if((t=a(t))!=t||t===1/0){p=t!=t?1:0;h=g}else{h=o(l(t)/c);if(t*(v=i(2,-h))<1){h--;v*=2}if((t+=h+m>=1?b/v:b*i(2,1-m))*v>=2){h++;v/=2}if(h+m>=g){p=0;h=g}else if(h+m>=1){p=(t*v-1)*i(2,u);h+=m}else{p=t*i(2,m-1)*i(2,u);h=0}}for(;u>=8;){y[P++]=255&p;p/=256;u-=8}h=h<<u|p;_+=u;for(;_>0;){y[P++]=255&h;h/=256;_-=8}y[--P]|=128*w;return y},unpack:function(t,r){var a,o=t.length,l=8*o-r-1,c=(1<<l)-1,u=c>>1,d=l-7,h=o-1,p=t[h--],v=127&p;p>>=7;for(;d>0;){v=256*v+t[h--];d-=8}a=v&(1<<-d)-1;v>>=-d;d+=r;for(;d>0;){a=256*a+t[h--];d-=8}if(0===v)v=1-u;else{if(v===c)return a?NaN:p?-1/0:1/0;a+=i(2,r);v-=u}return(p?-1:1)*a*i(2,v-r)}}},3622:(t,r,a)=>{var i=a(8403),o=a(8154),l=a(8374),c=Object,u=i("".split);t.exports=o((function(){return!c("z").propertyIsEnumerable(0)}))?function(t){return"String"===l(t)?u(t,""):c(t)}:c},7523:(t,r,a)=>{var i=a(7316),o=a(7633),l=a(9763);t.exports=function(t,r,a){var c,u;l&&i(c=r.constructor)&&c!==a&&o(u=c.prototype)&&u!==a.prototype&&l(t,u);return t}},4993:(t,r,a)=>{var i=a(8403),o=a(7316),l=a(7542),c=i(Function.toString);o(l.inspectSource)||(l.inspectSource=function(t){return c(t)});t.exports=l.inspectSource},8422:(t,r,a)=>{var i=a(7633),o=a(9293);t.exports=function(t,r){i(r)&&"cause"in r&&o(t,"cause",r.cause)}},4694:(t,r,a)=>{var i=a(4978),o=a(8403),l=a(6010),c=a(7633),u=a(936),d=a(7744).f,h=a(5455),p=a(2329),v=a(2191),y=a(7561),_=a(7010),g=!1,m=y("meta"),b=0,setMetadata=function(t){d(t,m,{value:{objectID:"O"+b++,weakData:{}}})},w=t.exports={enable:function(){w.enable=function(){};g=!0;var t=h.f,r=o([].splice),a={};a[m]=1;if(t(a).length){h.f=function(a){for(var i=t(a),o=0,l=i.length;o<l;o++)if(i[o]===m){r(i,o,1);break}return i};i({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:p.f})}},fastKey:function(t,r){if(!c(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!u(t,m)){if(!v(t))return"F";if(!r)return"E";setMetadata(t)}return t[m].objectID},getWeakData:function(t,r){if(!u(t,m)){if(!v(t))return!0;if(!r)return!1;setMetadata(t)}return t[m].weakData},onFreeze:function(t){_&&g&&v(t)&&!u(t,m)&&setMetadata(t);return t}};l[m]=!0},1649:(t,r,a)=>{var i,o,l,c=a(8443),u=a(9298),d=a(7633),h=a(9293),p=a(936),v=a(7542),y=a(3727),_=a(6010),g="Object already initialized",m=u.TypeError,b=u.WeakMap;if(c||v.state){var w=v.state||(v.state=new b);w.get=w.get;w.has=w.has;w.set=w.set;i=function(t,r){if(w.has(t))throw new m(g);r.facade=t;w.set(t,r);return r};o=function(t){return w.get(t)||{}};l=function(t){return w.has(t)}}else{var P=y("state");_[P]=!0;i=function(t,r){if(p(t,P))throw new m(g);r.facade=t;h(t,P,r);return r};o=function(t){return p(t,P)?t[P]:{}};l=function(t){return p(t,P)}}t.exports={set:i,get:o,has:l,enforce:function(t){return l(t)?o(t):i(t,{})},getterFor:function(t){return function(r){var a;if(!d(r)||(a=o(r)).type!==t)throw new m("Incompatible receiver, "+t+" required");return a}}}},5191:(t,r,a)=>{var i=a(2292),o=a(6596),l=i("iterator"),c=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||c[l]===t)}},6998:(t,r,a)=>{var i=a(8374);t.exports=Array.isArray||function isArray(t){return"Array"===i(t)}},5986:(t,r,a)=>{var i=a(8329);t.exports=function(t){var r=i(t);return"BigInt64Array"===r||"BigUint64Array"===r}},7316:(t,r,a)=>{var i=a(1558),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},1694:(t,r,a)=>{var i=a(8403),o=a(8154),l=a(7316),c=a(8329),u=a(7187),d=a(4993),noop=function(){},h=[],p=u("Reflect","construct"),v=/^\s*(?:class|function)\b/,y=i(v.exec),_=!v.test(noop),g=function isConstructor(t){if(!l(t))return!1;try{p(noop,h,t);return!0}catch(t){return!1}},m=function isConstructor(t){if(!l(t))return!1;switch(c(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _||!!y(v,d(t))}catch(t){return!0}};m.sham=!0;t.exports=!p||o((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?m:g},3374:(t,r,a)=>{var i=a(936);t.exports=function(t){return void 0!==t&&(i(t,"value")||i(t,"writable"))}},7007:(t,r,a)=>{var i=a(8154),o=a(7316),l=/#|\.prototype\./,isForced=function(t,r){var a=u[c(t)];return a===h||a!==d&&(o(r)?i(r):!!r)},c=isForced.normalize=function(t){return String(t).replace(l,".").toLowerCase()},u=isForced.data={},d=isForced.NATIVE="N",h=isForced.POLYFILL="P";t.exports=isForced},987:(t,r,a)=>{var i=a(7633),o=Math.floor;t.exports=Number.isInteger||function isInteger(t){return!i(t)&&isFinite(t)&&o(t)===t}},3734:t=>{t.exports=function(t){return null==t}},7633:(t,r,a)=>{var i=a(7316),o=a(1558),l=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:i(t)||t===l}:function(t){return"object"==typeof t?null!==t:i(t)}},2554:t=>{t.exports=!1},6660:(t,r,a)=>{var i=a(7633),o=a(8374),l=a(2292)("match");t.exports=function(t){var r;return i(t)&&(void 0!==(r=t[l])?!!r:"RegExp"===o(t))}},7814:(t,r,a)=>{var i=a(7187),o=a(7316),l=a(2658),c=a(7960),u=Object;t.exports=c?function(t){return"symbol"==typeof t}:function(t){var r=i("Symbol");return o(r)&&l(r.prototype,u(t))}},5504:(t,r,a)=>{var i=a(2026);t.exports=function(t,r,a){for(var o,l,c=a?t:t.iterator,u=t.next;!(o=i(u,c)).done;)if(void 0!==(l=r(o.value)))return l}},6837:(t,r,a)=>{var i=a(7789),o=a(2026),l=a(4719),c=a(9762),u=a(5191),d=a(451),h=a(2658),p=a(7612),v=a(273),y=a(3316),_=TypeError,Result=function(t,r){this.stopped=t;this.result=r},g=Result.prototype;t.exports=function(t,r,a){var m,b,w,P,k,A,S,x=a&&a.that,E=!(!a||!a.AS_ENTRIES),I=!(!a||!a.IS_RECORD),C=!(!a||!a.IS_ITERATOR),T=!(!a||!a.INTERRUPTED),M=i(r,x),stop=function(t){m&&y(m,"normal",t);return new Result(!0,t)},callFn=function(t){if(E){l(t);return T?M(t[0],t[1],stop):M(t[0],t[1])}return T?M(t,stop):M(t)};if(I)m=t.iterator;else if(C)m=t;else{if(!(b=v(t)))throw new _(c(t)+" is not iterable");if(u(b)){for(w=0,P=d(t);P>w;w++)if((k=callFn(t[w]))&&h(g,k))return k;return new Result(!1)}m=p(t,b)}A=I?t.next:m.next;for(;!(S=o(A,m)).done;){try{k=callFn(S.value)}catch(t){y(m,"throw",t)}if("object"==typeof k&&k&&h(g,k))return k}return new Result(!1)}},3316:(t,r,a)=>{var i=a(2026),o=a(4719),l=a(8486);t.exports=function(t,r,a){var c,u;o(t);try{if(!(c=l(t,"return"))){if("throw"===r)throw a;return a}c=i(c,t)}catch(t){u=!0;c=t}if("throw"===r)throw a;if(u)throw c;o(c);return a}},552:(t,r,a)=>{var i=a(5238).IteratorPrototype,o=a(6941),l=a(1198),c=a(7536),u=a(6596),returnThis=function(){return this};t.exports=function(t,r,a,d){var h=r+" Iterator";t.prototype=o(i,{next:l(+!d,a)});c(t,h,!1,!0);u[h]=returnThis;return t}},375:(t,r,a)=>{var i=a(2026),o=a(6941),l=a(9293),c=a(6880),u=a(2292),d=a(1649),h=a(8486),p=a(5238).IteratorPrototype,v=a(1111),y=a(3316),_=u("toStringTag"),g="IteratorHelper",m="WrapForValidIterator",b=d.set,createIteratorProxyPrototype=function(t){var r=d.getterFor(t?m:g);return c(o(p),{next:function next(){var a=r(this);if(t)return a.nextHandler();try{var i=a.done?void 0:a.nextHandler();return v(i,a.done)}catch(t){a.done=!0;throw t}},return:function(){var a=r(this),o=a.iterator;a.done=!0;if(t){var l=h(o,"return");return l?i(l,o):v(void 0,!0)}if(a.inner)try{y(a.inner.iterator,"normal")}catch(t){return y(o,"throw",t)}y(o,"normal");return v(void 0,!0)}})},w=createIteratorProxyPrototype(!0),P=createIteratorProxyPrototype(!1);l(P,_,"Iterator Helper");t.exports=function(t,r){var a=function Iterator(a,i){if(i){i.iterator=a.iterator;i.next=a.next}else i=a;i.type=r?m:g;i.nextHandler=t;i.counter=0;i.done=!1;b(this,i)};a.prototype=r?w:P;return a}},7301:(t,r,a)=>{var i=a(4978),o=a(2026),l=a(2554),c=a(5145),u=a(7316),d=a(552),h=a(2176),p=a(9763),v=a(7536),y=a(9293),_=a(7041),g=a(2292),m=a(6596),b=a(5238),w=c.PROPER,P=c.CONFIGURABLE,k=b.IteratorPrototype,A=b.BUGGY_SAFARI_ITERATORS,S=g("iterator"),x="keys",E="values",I="entries",returnThis=function(){return this};t.exports=function(t,r,a,c,g,b,C){d(a,r,c);var T,M,O,getIterationMethod=function(t){if(t===g&&j)return j;if(!A&&t&&t in L)return L[t];switch(t){case x:return function keys(){return new a(this,t)};case E:return function values(){return new a(this,t)};case I:return function entries(){return new a(this,t)}}return function(){return new a(this)}},G=r+" Iterator",R=!1,L=t.prototype,D=L[S]||L["@@iterator"]||g&&L[g],j=!A&&D||getIterationMethod(g),W="Array"===r&&L.entries||D;if(W&&(T=h(W.call(new t)))!==Object.prototype&&T.next){l||h(T)===k||(p?p(T,k):u(T[S])||_(T,S,returnThis));v(T,G,!0,!0);l&&(m[G]=returnThis)}if(w&&g===E&&D&&D.name!==E)if(!l&&P)y(L,"name",E);else{R=!0;j=function values(){return o(D,this)}}if(g){M={values:getIterationMethod(E),keys:b?j:getIterationMethod(x),entries:getIterationMethod(I)};if(C)for(O in M)(A||R||!(O in L))&&_(L,O,M[O]);else i({target:r,proto:!0,forced:A||R},M)}l&&!C||L[S]===j||_(L,S,j,{name:g});m[r]=j;return M}},8142:(t,r,a)=>{var i=a(2026),o=a(1782),l=a(4719),c=a(9235),u=a(375),d=a(5723),h=u((function(){var t=this.iterator,r=l(i(this.next,t));if(!(this.done=!!r.done))return d(t,this.mapper,[r.value,this.counter++],!0)}));t.exports=function map(t){l(this);o(t);return new h(c(this),{mapper:t})}},5238:(t,r,a)=>{var i,o,l,c=a(8154),u=a(7316),d=a(7633),h=a(6941),p=a(2176),v=a(7041),y=a(2292),_=a(2554),g=y("iterator"),m=!1;[].keys&&("next"in(l=[].keys())?(o=p(p(l)))!==Object.prototype&&(i=o):m=!0);!d(i)||c((function(){var t={};return i[g].call(t)!==t}))?i={}:_&&(i=h(i));u(i[g])||v(i,g,(function(){return this}));t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:m}},6596:t=>{t.exports={}},451:(t,r,a)=>{var i=a(8293);t.exports=function(t){return i(t.length)}},9687:(t,r,a)=>{var i=a(8403),o=a(8154),l=a(7316),c=a(936),u=a(940),d=a(5145).CONFIGURABLE,h=a(4993),p=a(1649),v=p.enforce,y=p.get,_=String,g=Object.defineProperty,m=i("".slice),b=i("".replace),w=i([].join),P=u&&!o((function(){return 8!==g((function(){}),"length",{value:8}).length})),k=String(String).split("String"),A=t.exports=function(t,r,a){"Symbol("===m(_(r),0,7)&&(r="["+b(_(r),/^Symbol\(([^)]*)\)/,"$1")+"]");a&&a.getter&&(r="get "+r);a&&a.setter&&(r="set "+r);(!c(t,"name")||d&&t.name!==r)&&(u?g(t,"name",{value:r,configurable:!0}):t.name=r);P&&a&&c(a,"arity")&&t.length!==a.arity&&g(t,"length",{value:a.arity});try{a&&c(a,"constructor")&&a.constructor?u&&g(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=v(t);c(i,"source")||(i.source=w(k,"string"==typeof r?r:""));return t};Function.prototype.toString=A((function toString(){return l(this)&&y(this).source||h(this)}),"toString")},6336:(t,r,a)=>{var i=a(4875),o=Math.abs,l=2220446049250313e-31,c=1/l;t.exports=function(t,r,a,u){var d=+t,h=o(d),p=i(d);if(h<u)return p*function(t){return t+c-c}(h/u/r)*u*r;var v=(1+r/l)*h,y=v-(v-h);return y>a||y!=y?p*(1/0):p*y}},796:(t,r,a)=>{var i=a(6336);t.exports=Math.fround||function fround(t){return i(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},4875:t=>{t.exports=Math.sign||function sign(t){var r=+t;return 0===r||r!=r?r:r<0?-1:1}},8537:t=>{var r=Math.ceil,a=Math.floor;t.exports=Math.trunc||function trunc(t){var i=+t;return(i>0?a:r)(i)}},1627:(t,r,a)=>{var i,o,l,c,u,d=a(9298),h=a(7789),p=a(5764).f,v=a(4578).set,y=a(1397),_=a(2589),g=a(1458),m=a(8173),b=a(4864),w=d.MutationObserver||d.WebKitMutationObserver,P=d.document,k=d.process,A=d.Promise,S=p(d,"queueMicrotask"),x=S&&S.value;if(!x){var E=new y,flush=function(){var t,r;b&&(t=k.domain)&&t.exit();for(;r=E.get();)try{r()}catch(t){E.head&&i();throw t}t&&t.enter()};if(_||b||m||!w||!P)if(!g&&A&&A.resolve){(c=A.resolve(void 0)).constructor=A;u=h(c.then,c);i=function(){u(flush)}}else if(b)i=function(){k.nextTick(flush)};else{v=h(v,d);i=function(){v(flush)}}else{o=!0;l=P.createTextNode("");new w(flush).observe(l,{characterData:!0});i=function(){l.data=o=!o}}x=function(t){E.head||i();E.add(t)}}t.exports=x},1880:(t,r,a)=>{var i=a(1782),o=TypeError,PromiseCapability=function(t){var r,a;this.promise=new t((function(t,i){if(void 0!==r||void 0!==a)throw new o("Bad Promise constructor");r=t;a=i}));this.resolve=i(r);this.reject=i(a)};t.exports.f=function(t){return new PromiseCapability(t)}},1264:(t,r,a)=>{var i=a(5730);t.exports=function(t,r){return void 0===t?arguments.length<2?"":r:i(t)}},9578:(t,r,a)=>{var i=a(6660),o=TypeError;t.exports=function(t){if(i(t))throw new o("The method doesn't accept regular expressions");return t}},453:(t,r,a)=>{var i=a(940),o=a(8403),l=a(2026),c=a(8154),u=a(1706),d=a(1963),h=a(1879),p=a(2007),v=a(3622),y=Object.assign,_=Object.defineProperty,g=o([].concat);t.exports=!y||c((function(){if(i&&1!==y({b:1},y(_({},"a",{enumerable:!0,get:function(){_(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},r={},a=Symbol("assign detection"),o="abcdefghijklmnopqrst";t[a]=7;o.split("").forEach((function(t){r[t]=t}));return 7!==y({},t)[a]||u(y({},r)).join("")!==o}))?function assign(t,r){for(var a=p(t),o=arguments.length,c=1,y=d.f,_=h.f;o>c;)for(var m,b=v(arguments[c++]),w=y?g(u(b),y(b)):u(b),P=w.length,k=0;P>k;){m=w[k++];i&&!l(_,b,m)||(a[m]=b[m])}return a}:y},6941:(t,r,a)=>{var i,o=a(4719),l=a(6617),c=a(298),u=a(6010),d=a(519),h=a(5584),p=a(3727),v="prototype",y="script",_=p("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<"+y+">"+t+"</"+y+">"},NullProtoObjectViaActiveX=function(t){t.write(scriptTag(""));t.close();var r=t.parentWindow.Object;t=null;return r},NullProtoObject=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}NullProtoObject="undefined"!=typeof document?document.domain&&i?NullProtoObjectViaActiveX(i):function(){var t,r=h("iframe"),a="java"+y+":";r.style.display="none";d.appendChild(r);r.src=String(a);(t=r.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}():NullProtoObjectViaActiveX(i);for(var t=c.length;t--;)delete NullProtoObject[v][c[t]];return NullProtoObject()};u[_]=!0;t.exports=Object.create||function create(t,r){var a;if(null!==t){EmptyConstructor[v]=o(t);a=new EmptyConstructor;EmptyConstructor[v]=null;a[_]=t}else a=NullProtoObject();return void 0===r?a:l.f(a,r)}},6617:(t,r,a)=>{var i=a(940),o=a(9610),l=a(7744),c=a(4719),u=a(4115),d=a(1706);r.f=i&&!o?Object.defineProperties:function defineProperties(t,r){c(t);for(var a,i=u(r),o=d(r),h=o.length,p=0;h>p;)l.f(t,a=o[p++],i[a]);return t}},7744:(t,r,a)=>{var i=a(940),o=a(9394),l=a(9610),c=a(4719),u=a(4871),d=TypeError,h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,v="enumerable",y="configurable",_="writable";r.f=i?l?function defineProperty(t,r,a){c(t);r=u(r);c(a);if("function"==typeof t&&"prototype"===r&&"value"in a&&_ in a&&!a[_]){var i=p(t,r);if(i&&i[_]){t[r]=a.value;a={configurable:y in a?a[y]:i[y],enumerable:v in a?a[v]:i[v],writable:!1}}}return h(t,r,a)}:h:function defineProperty(t,r,a){c(t);r=u(r);c(a);if(o)try{return h(t,r,a)}catch(t){}if("get"in a||"set"in a)throw new d("Accessors not supported");"value"in a&&(t[r]=a.value);return t}},5764:(t,r,a)=>{var i=a(940),o=a(2026),l=a(1879),c=a(1198),u=a(4115),d=a(4871),h=a(936),p=a(9394),v=Object.getOwnPropertyDescriptor;r.f=i?v:function getOwnPropertyDescriptor(t,r){t=u(t);r=d(r);if(p)try{return v(t,r)}catch(t){}if(h(t,r))return c(!o(l.f,t,r),t[r])}},2329:(t,r,a)=>{var i=a(8374),o=a(4115),l=a(5455).f,c=a(6071),u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function getOwnPropertyNames(t){return u&&"Window"===i(t)?function(t){try{return l(t)}catch(t){return c(u)}}(t):l(o(t))}},5455:(t,r,a)=>{var i=a(9138),o=a(298).concat("length","prototype");r.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return i(t,o)}},1963:(t,r)=>{r.f=Object.getOwnPropertySymbols},2176:(t,r,a)=>{var i=a(936),o=a(7316),l=a(2007),c=a(3727),u=a(7888),d=c("IE_PROTO"),h=Object,p=h.prototype;t.exports=u?h.getPrototypeOf:function(t){var r=l(t);if(i(r,d))return r[d];var a=r.constructor;return o(a)&&r instanceof a?a.prototype:r instanceof h?p:null}},2191:(t,r,a)=>{var i=a(8154),o=a(7633),l=a(8374),c=a(6944),u=Object.isExtensible,d=i((function(){u(1)}));t.exports=d||c?function isExtensible(t){return!!o(t)&&((!c||"ArrayBuffer"!==l(t))&&(!u||u(t)))}:u},2658:(t,r,a)=>{var i=a(8403);t.exports=i({}.isPrototypeOf)},9138:(t,r,a)=>{var i=a(8403),o=a(936),l=a(4115),c=a(9773).indexOf,u=a(6010),d=i([].push);t.exports=function(t,r){var a,i=l(t),h=0,p=[];for(a in i)!o(u,a)&&o(i,a)&&d(p,a);for(;r.length>h;)o(i,a=r[h++])&&(~c(p,a)||d(p,a));return p}},1706:(t,r,a)=>{var i=a(9138),o=a(298);t.exports=Object.keys||function keys(t){return i(t,o)}},1879:(t,r)=>{var a={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!a.call({1:2},1);r.f=o?function propertyIsEnumerable(t){var r=i(this,t);return!!r&&r.enumerable}:a},9763:(t,r,a)=>{var i=a(1299),o=a(4719),l=a(4958);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,a={};try{(t=i(Object.prototype,"__proto__","set"))(a,[]);r=a instanceof Array}catch(t){}return function setPrototypeOf(a,i){o(a);l(i);r?t(a,i):a.__proto__=i;return a}}():void 0)},2492:(t,r,a)=>{var i=a(940),o=a(8154),l=a(8403),c=a(2176),u=a(1706),d=a(4115),h=l(a(1879).f),p=l([].push),v=i&&o((function(){var t=Object.create(null);t[2]=2;return!h(t,2)})),createMethod=function(t){return function(r){for(var a,o=d(r),l=u(o),y=v&&null===c(o),_=l.length,g=0,m=[];_>g;){a=l[g++];i&&!(y?a in o:h(o,a))||p(m,t?[a,o[a]]:o[a])}return m}};t.exports={entries:createMethod(!0),values:createMethod(!1)}},759:(t,r,a)=>{var i=a(3077),o=a(8329);t.exports=i?{}.toString:function toString(){return"[object "+o(this)+"]"}},2923:(t,r,a)=>{var i=a(2026),o=a(7316),l=a(7633),c=TypeError;t.exports=function(t,r){var a,u;if("string"===r&&o(a=t.toString)&&!l(u=i(a,t)))return u;if(o(a=t.valueOf)&&!l(u=i(a,t)))return u;if("string"!==r&&o(a=t.toString)&&!l(u=i(a,t)))return u;throw new c("Can't convert object to primitive value")}},8953:(t,r,a)=>{var i=a(7187),o=a(8403),l=a(5455),c=a(1963),u=a(4719),d=o([].concat);t.exports=i("Reflect","ownKeys")||function ownKeys(t){var r=l.f(u(t)),a=c.f;return a?d(r,a(t)):r}},3713:(t,r,a)=>{var i=a(8403),o=a(936),l=SyntaxError,c=parseInt,u=String.fromCharCode,d=i("".charAt),h=i("".slice),p=i(/./.exec),v={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},y=/^[\da-f]{4}$/i,_=/^[\u0000-\u001F]$/;t.exports=function(t,r){for(var a=!0,i="";r<t.length;){var g=d(t,r);if("\\"===g){var m=h(t,r,r+2);if(o(v,m)){i+=v[m];r+=2}else{if("\\u"!==m)throw new l('Unknown escape sequence: "'+m+'"');var b=h(t,r+=2,r+4);if(!p(y,b))throw new l("Bad Unicode escape at: "+r);i+=u(c(b,16));r+=4}}else{if('"'===g){a=!1;r++;break}if(p(_,g))throw new l("Bad control character in string literal at: "+r);i+=g;r++}}if(a)throw new l("Unterminated string at: "+r);return{value:i,end:r}}},1021:(t,r,a)=>{var i=a(9298);t.exports=i},1518:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},8308:(t,r,a)=>{var i=a(9298),o=a(6639),l=a(7316),c=a(7007),u=a(4993),d=a(2292),h=a(3413),p=a(8471),v=a(2554),y=a(2171),_=o&&o.prototype,g=d("species"),m=!1,b=l(i.PromiseRejectionEvent),w=c("Promise",(function(){var t=u(o),r=t!==String(o);if(!r&&66===y)return!0;if(v&&(!_.catch||!_.finally))return!0;if(!y||y<51||!/native code/.test(t)){var a=new o((function(t){t(1)})),FakePromise=function(t){t((function(){}),(function(){}))};(a.constructor={})[g]=FakePromise;if(!(m=a.then((function(){}))instanceof FakePromise))return!0}return!r&&(h||p)&&!b}));t.exports={CONSTRUCTOR:w,REJECTION_EVENT:b,SUBCLASSING:m}},6639:(t,r,a)=>{var i=a(9298);t.exports=i.Promise},2506:(t,r,a)=>{var i=a(4719),o=a(7633),l=a(1880);t.exports=function(t,r){i(t);if(o(r)&&r.constructor===t)return r;var a=l.f(t);(0,a.resolve)(r);return a.promise}},3779:(t,r,a)=>{var i=a(6639),o=a(1374),l=a(8308).CONSTRUCTOR;t.exports=l||!o((function(t){i.all(t).then(void 0,(function(){}))}))},6085:(t,r,a)=>{var i=a(7744).f;t.exports=function(t,r,a){a in t||i(t,a,{configurable:!0,get:function(){return r[a]},set:function(t){r[a]=t}})}},1397:t=>{var Queue=function(){this.head=null;this.tail=null};Queue.prototype={add:function(t){var r={item:t,next:null},a=this.tail;a?a.next=r:this.head=r;this.tail=r},get:function(){var t=this.head;if(t){null===(this.head=t.next)&&(this.tail=null);return t.item}}};t.exports=Queue},8986:(t,r,a)=>{var i=a(2026),o=a(4719),l=a(7316),c=a(8374),u=a(2178),d=TypeError;t.exports=function(t,r){var a=t.exec;if(l(a)){var h=i(a,t,r);null!==h&&o(h);return h}if("RegExp"===c(t))return i(u,t,r);throw new d("RegExp#exec called on incompatible receiver")}},2178:(t,r,a)=>{var i=a(2026),o=a(8403),l=a(5730),c=a(9272),u=a(3286),d=a(6807),h=a(6941),p=a(1649).get,v=a(1714),y=a(2513),_=d("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,m=g,b=o("".charAt),w=o("".indexOf),P=o("".replace),k=o("".slice),A=function(){var t=/a/,r=/b*/g;i(g,t,"a");i(g,r,"a");return 0!==t.lastIndex||0!==r.lastIndex}(),S=u.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];(A||x||S||v||y)&&(m=function exec(t){var r,a,o,u,d,v,y,E=this,I=p(E),C=l(t),T=I.raw;if(T){T.lastIndex=E.lastIndex;r=i(m,T,C);E.lastIndex=T.lastIndex;return r}var M=I.groups,O=S&&E.sticky,G=i(c,E),R=E.source,L=0,D=C;if(O){G=P(G,"y","");-1===w(G,"g")&&(G+="g");D=k(C,E.lastIndex);if(E.lastIndex>0&&(!E.multiline||E.multiline&&"\n"!==b(C,E.lastIndex-1))){R="(?: "+R+")";D=" "+D;L++}a=new RegExp("^(?:"+R+")",G)}x&&(a=new RegExp("^"+R+"$(?!\\s)",G));A&&(o=E.lastIndex);u=i(g,O?a:E,D);if(O)if(u){u.input=k(u.input,L);u[0]=k(u[0],L);u.index=E.lastIndex;E.lastIndex+=u[0].length}else E.lastIndex=0;else A&&u&&(E.lastIndex=E.global?u.index+u[0].length:o);x&&u&&u.length>1&&i(_,u[0],a,(function(){for(d=1;d<arguments.length-2;d++)void 0===arguments[d]&&(u[d]=void 0)}));if(u&&M){u.groups=v=h(null);for(d=0;d<M.length;d++)v[(y=M[d])[0]]=u[y[1]]}return u});t.exports=m},9272:(t,r,a)=>{var i=a(4719);t.exports=function(){var t=i(this),r="";t.hasIndices&&(r+="d");t.global&&(r+="g");t.ignoreCase&&(r+="i");t.multiline&&(r+="m");t.dotAll&&(r+="s");t.unicode&&(r+="u");t.unicodeSets&&(r+="v");t.sticky&&(r+="y");return r}},1043:(t,r,a)=>{var i=a(2026),o=a(936),l=a(2658),c=a(9272),u=RegExp.prototype;t.exports=function(t){var r=t.flags;return void 0!==r||"flags"in u||o(t,"flags")||!l(u,t)?r:i(c,t)}},3286:(t,r,a)=>{var i=a(8154),o=a(9298).RegExp,l=i((function(){var t=o("a","y");t.lastIndex=2;return null!==t.exec("abcd")})),c=l||i((function(){return!o("a","y").sticky})),u=l||i((function(){var t=o("^r","gy");t.lastIndex=2;return null!==t.exec("str")}));t.exports={BROKEN_CARET:u,MISSED_STICKY:c,UNSUPPORTED_Y:l}},1714:(t,r,a)=>{var i=a(8154),o=a(9298).RegExp;t.exports=i((function(){var t=o(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},2513:(t,r,a)=>{var i=a(8154),o=a(9298).RegExp;t.exports=i((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},5645:(t,r,a)=>{var i=a(3734),o=TypeError;t.exports=function(t){if(i(t))throw new o("Can't call method on "+t);return t}},4057:(t,r,a)=>{var i=a(23),o=a(8848),l=i.Set,c=i.add;t.exports=function(t){var r=new l;o(t,(function(t){c(r,t)}));return r}},5656:(t,r,a)=>{var i=a(5690),o=a(23),l=a(4057),c=a(6098),u=a(1096),d=a(8848),h=a(5504),p=o.has,v=o.remove;t.exports=function difference(t){var r=i(this),a=u(t),o=l(r);c(r)<=a.size?d(r,(function(t){a.includes(t)&&v(o,t)})):h(a.getIterator(),(function(t){p(r,t)&&v(o,t)}));return o}},23:(t,r,a)=>{var i=a(8403),o=Set.prototype;t.exports={Set:Set,add:i(o.add),has:i(o.has),remove:i(o.delete),proto:o}},8461:(t,r,a)=>{var i=a(5690),o=a(23),l=a(6098),c=a(1096),u=a(8848),d=a(5504),h=o.Set,p=o.add,v=o.has;t.exports=function intersection(t){var r=i(this),a=c(t),o=new h;l(r)>a.size?d(a.getIterator(),(function(t){v(r,t)&&p(o,t)})):u(r,(function(t){a.includes(t)&&p(o,t)}));return o}},8550:(t,r,a)=>{var i=a(5690),o=a(23).has,l=a(6098),c=a(1096),u=a(8848),d=a(5504),h=a(3316);t.exports=function isDisjointFrom(t){var r=i(this),a=c(t);if(l(r)<=a.size)return!1!==u(r,(function(t){if(a.includes(t))return!1}),!0);var p=a.getIterator();return!1!==d(p,(function(t){if(o(r,t))return h(p,"normal",!1)}))}},990:(t,r,a)=>{var i=a(5690),o=a(6098),l=a(8848),c=a(1096);t.exports=function isSubsetOf(t){var r=i(this),a=c(t);return!(o(r)>a.size)&&!1!==l(r,(function(t){if(!a.includes(t))return!1}),!0)}},194:(t,r,a)=>{var i=a(5690),o=a(23).has,l=a(6098),c=a(1096),u=a(5504),d=a(3316);t.exports=function isSupersetOf(t){var r=i(this),a=c(t);if(l(r)<a.size)return!1;var h=a.getIterator();return!1!==u(h,(function(t){if(!o(r,t))return d(h,"normal",!1)}))}},8848:(t,r,a)=>{var i=a(8403),o=a(5504),l=a(23),c=l.Set,u=l.proto,d=i(u.forEach),h=i(u.keys),p=h(new c).next;t.exports=function(t,r,a){return a?o({iterator:h(t),next:p},r):d(t,r)}},507:(t,r,a)=>{var i=a(7187),createSetLike=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var r=i("Set");try{(new r)[t](createSetLike(0));try{(new r)[t](createSetLike(-1));return!1}catch(t){return!0}}catch(t){return!1}}},6098:(t,r,a)=>{var i=a(1299),o=a(23);t.exports=i(o.proto,"size","get")||function(t){return t.size}},5963:(t,r,a)=>{var i=a(7187),o=a(9691),l=a(2292),c=a(940),u=l("species");t.exports=function(t){var r=i(t);c&&r&&!r[u]&&o(r,u,{configurable:!0,get:function(){return this}})}},3194:(t,r,a)=>{var i=a(5690),o=a(23),l=a(4057),c=a(1096),u=a(5504),d=o.add,h=o.has,p=o.remove;t.exports=function symmetricDifference(t){var r=i(this),a=c(t).getIterator(),o=l(r);u(a,(function(t){h(r,t)?p(o,t):d(o,t)}));return o}},7536:(t,r,a)=>{var i=a(7744).f,o=a(936),l=a(2292)("toStringTag");t.exports=function(t,r,a){t&&!a&&(t=t.prototype);t&&!o(t,l)&&i(t,l,{configurable:!0,value:r})}},5703:(t,r,a)=>{var i=a(5690),o=a(23).add,l=a(4057),c=a(1096),u=a(5504);t.exports=function union(t){var r=i(this),a=c(t).getIterator(),d=l(r);u(a,(function(t){o(d,t)}));return d}},3727:(t,r,a)=>{var i=a(6807),o=a(7561),l=i("keys");t.exports=function(t){return l[t]||(l[t]=o(t))}},7542:(t,r,a)=>{var i=a(9298),o=a(6e3),l="__core-js_shared__",c=i[l]||o(l,{});t.exports=c},6807:(t,r,a)=>{var i=a(2554),o=a(7542);(t.exports=function(t,r){return o[t]||(o[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.34.0",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"})},8180:(t,r,a)=>{var i=a(4719),o=a(7073),l=a(3734),c=a(2292)("species");t.exports=function(t,r){var a,u=i(t).constructor;return void 0===u||l(a=i(u)[c])?r:o(a)}},6819:(t,r,a)=>{var i=a(8403),o=a(1003),l=a(5730),c=a(5645),u=i("".charAt),d=i("".charCodeAt),h=i("".slice),createMethod=function(t){return function(r,a){var i,p,v=l(c(r)),y=o(a),_=v.length;return y<0||y>=_?t?"":void 0:(i=d(v,y))<55296||i>56319||y+1===_||(p=d(v,y+1))<56320||p>57343?t?u(v,y):i:t?h(v,y,y+2):p-56320+(i-55296<<10)+65536}};t.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},4819:(t,r,a)=>{var i=a(234);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(i)},6460:(t,r,a)=>{var i=a(8403),o=a(8293),l=a(5730),c=a(947),u=a(5645),d=i(c),h=i("".slice),p=Math.ceil,createMethod=function(t){return function(r,a,i){var c,v,y=l(u(r)),_=o(a),g=y.length,m=void 0===i?" ":l(i);if(_<=g||""===m)return y;(v=d(m,p((c=_-g)/m.length))).length>c&&(v=h(v,0,c));return t?y+v:v+y}};t.exports={start:createMethod(!1),end:createMethod(!0)}},2897:(t,r,a)=>{var i=a(8403),o=2147483647,l=/[^\0-\u007E]/,c=/[.\u3002\uFF0E\uFF61]/g,u="Overflow: input needs wider integers to process",d=RangeError,h=i(c.exec),p=Math.floor,v=String.fromCharCode,y=i("".charCodeAt),_=i([].join),g=i([].push),m=i("".replace),b=i("".split),w=i("".toLowerCase),digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,r,a){var i=0;t=a?p(t/700):t>>1;t+=p(t/r);for(;t>455;){t=p(t/35);i+=36}return p(i+36*t/(t+38))},encode=function(t){var r=[];t=function(t){for(var r=[],a=0,i=t.length;a<i;){var o=y(t,a++);if(o>=55296&&o<=56319&&a<i){var l=y(t,a++);if(56320==(64512&l))g(r,((1023&o)<<10)+(1023&l)+65536);else{g(r,o);a--}}else g(r,o)}return r}(t);var a,i,l=t.length,c=128,h=0,m=72;for(a=0;a<t.length;a++)(i=t[a])<128&&g(r,v(i));var b=r.length,w=b;b&&g(r,"-");for(;w<l;){var P=o;for(a=0;a<t.length;a++)(i=t[a])>=c&&i<P&&(P=i);var k=w+1;if(P-c>p((o-h)/k))throw new d(u);h+=(P-c)*k;c=P;for(a=0;a<t.length;a++){if((i=t[a])<c&&++h>o)throw new d(u);if(i===c){for(var A=h,S=36;;){var x=S<=m?1:S>=m+26?26:S-m;if(A<x)break;var E=A-x,I=36-x;g(r,v(digitToBasic(x+E%I)));A=p(E/I);S+=36}g(r,v(digitToBasic(A)));m=adapt(h,k,w===b);h=0;w++}}h++;c++}return _(r,"")};t.exports=function(t){var r,a,i=[],o=b(m(w(t),c,"."),".");for(r=0;r<o.length;r++){a=o[r];g(i,h(l,a)?"xn--"+encode(a):a)}return _(i,".")}},947:(t,r,a)=>{var i=a(1003),o=a(5730),l=a(5645),c=RangeError;t.exports=function repeat(t){var r=o(l(this)),a="",u=i(t);if(u<0||u===1/0)throw new c("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(r+=r))1&u&&(a+=r);return a}},4211:(t,r,a)=>{var i=a(83).end,o=a(8729);t.exports=o("trimEnd")?function trimEnd(){return i(this)}:"".trimEnd},8729:(t,r,a)=>{var i=a(5145).PROPER,o=a(8154),l=a(96);t.exports=function(t){return o((function(){return!!l[t]()||"​…᠎"!=="​…᠎"[t]()||i&&l[t].name!==t}))}},83:(t,r,a)=>{var i=a(8403),o=a(5645),l=a(5730),c=a(96),u=i("".replace),d=RegExp("^["+c+"]+"),h=RegExp("(^|[^"+c+"])["+c+"]+$"),createMethod=function(t){return function(r){var a=l(o(r));1&t&&(a=u(a,d,""));2&t&&(a=u(a,h,"$1"));return a}};t.exports={start:createMethod(1),end:createMethod(2),trim:createMethod(3)}},4837:(t,r,a)=>{var i=a(9298),o=a(8154),l=a(2171),c=a(3413),u=a(8471),d=a(4864),h=i.structuredClone;t.exports=!!h&&!o((function(){if(u&&l>92||d&&l>94||c&&l>97)return!1;var t=new ArrayBuffer(8),r=h(t,{transfer:[t]});return 0!==t.byteLength||8!==r.byteLength}))},3663:(t,r,a)=>{var i=a(2171),o=a(8154),l=a(9298).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!l(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},5117:(t,r,a)=>{var i=a(2026),o=a(7187),l=a(2292),c=a(7041);t.exports=function(){var t=o("Symbol"),r=t&&t.prototype,a=r&&r.valueOf,u=l("toPrimitive");r&&!r[u]&&c(r,u,(function(t){return i(a,this)}),{arity:1})}},4186:(t,r,a)=>{var i=a(3663);t.exports=i&&!!Symbol.for&&!!Symbol.keyFor},4578:(t,r,a)=>{var i,o,l,c,u=a(9298),d=a(7294),h=a(7789),p=a(7316),v=a(936),y=a(8154),_=a(519),g=a(2251),m=a(5584),b=a(2743),w=a(2589),P=a(4864),k=u.setImmediate,A=u.clearImmediate,S=u.process,x=u.Dispatch,E=u.Function,I=u.MessageChannel,C=u.String,T=0,M={},O="onreadystatechange";y((function(){i=u.location}));var run=function(t){if(v(M,t)){var r=M[t];delete M[t];r()}},runner=function(t){return function(){run(t)}},eventListener=function(t){run(t.data)},globalPostMessageDefer=function(t){u.postMessage(C(t),i.protocol+"//"+i.host)};if(!k||!A){k=function setImmediate(t){b(arguments.length,1);var r=p(t)?t:E(t),a=g(arguments,1);M[++T]=function(){d(r,void 0,a)};o(T);return T};A=function clearImmediate(t){delete M[t]};if(P)o=function(t){S.nextTick(runner(t))};else if(x&&x.now)o=function(t){x.now(runner(t))};else if(I&&!w){c=(l=new I).port2;l.port1.onmessage=eventListener;o=h(c.postMessage,c)}else if(u.addEventListener&&p(u.postMessage)&&!u.importScripts&&i&&"file:"!==i.protocol&&!y(globalPostMessageDefer)){o=globalPostMessageDefer;u.addEventListener("message",eventListener,!1)}else o=O in m("script")?function(t){_.appendChild(m("script"))[O]=function(){_.removeChild(this);run(t)}}:function(t){setTimeout(runner(t),0)}}t.exports={set:k,clear:A}},3328:(t,r,a)=>{var i=a(8403);t.exports=i(1..valueOf)},6985:(t,r,a)=>{var i=a(1003),o=Math.max,l=Math.min;t.exports=function(t,r){var a=i(t);return a<0?o(a+r,0):l(a,r)}},212:(t,r,a)=>{var i=a(4151),o=TypeError;t.exports=function(t){var r=i(t,"number");if("number"==typeof r)throw new o("Can't convert number to bigint");return BigInt(r)}},9548:(t,r,a)=>{var i=a(1003),o=a(8293),l=RangeError;t.exports=function(t){if(void 0===t)return 0;var r=i(t),a=o(r);if(r!==a)throw new l("Wrong length or index");return a}},4115:(t,r,a)=>{var i=a(3622),o=a(5645);t.exports=function(t){return i(o(t))}},1003:(t,r,a)=>{var i=a(8537);t.exports=function(t){var r=+t;return r!=r||0===r?0:i(r)}},8293:(t,r,a)=>{var i=a(1003),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},2007:(t,r,a)=>{var i=a(5645),o=Object;t.exports=function(t){return o(i(t))}},9892:(t,r,a)=>{var i=a(9817),o=RangeError;t.exports=function(t,r){var a=i(t);if(a%r)throw new o("Wrong offset");return a}},9817:(t,r,a)=>{var i=a(1003),o=RangeError;t.exports=function(t){var r=i(t);if(r<0)throw new o("The argument can't be less than 0");return r}},4151:(t,r,a)=>{var i=a(2026),o=a(7633),l=a(7814),c=a(8486),u=a(2923),d=a(2292),h=TypeError,p=d("toPrimitive");t.exports=function(t,r){if(!o(t)||l(t))return t;var a,d=c(t,p);if(d){void 0===r&&(r="default");a=i(d,t,r);if(!o(a)||l(a))return a;throw new h("Can't convert object to primitive value")}void 0===r&&(r="number");return u(t,r)}},4871:(t,r,a)=>{var i=a(4151),o=a(7814);t.exports=function(t){var r=i(t,"string");return o(r)?r:r+""}},3077:(t,r,a)=>{var i={};i[a(2292)("toStringTag")]="z";t.exports="[object z]"===String(i)},5730:(t,r,a)=>{var i=a(8329),o=String;t.exports=function(t){if("Symbol"===i(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},9671:t=>{var r=Math.round;t.exports=function(t){var a=r(t);return a<0?0:a>255?255:255&a}},2276:(t,r,a)=>{var i=a(4864);t.exports=function(t){try{if(i)return Function('return require("'+t+'")')()}catch(t){}}},9762:t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},9173:(t,r,a)=>{var i=a(4978),o=a(9298),l=a(2026),c=a(940),u=a(2127),d=a(5861),h=a(5050),p=a(5834),v=a(1198),y=a(9293),_=a(987),g=a(8293),m=a(9548),b=a(9892),w=a(9671),P=a(4871),k=a(936),A=a(8329),S=a(7633),x=a(7814),E=a(6941),I=a(2658),C=a(9763),T=a(5455).f,M=a(1675),O=a(2423).forEach,G=a(5963),R=a(9691),L=a(7744),D=a(5764),j=a(1649),W=a(7523),N=j.get,B=j.set,z=j.enforce,H=L.f,U=D.f,q=o.RangeError,V=h.ArrayBuffer,K=V.prototype,Y=h.DataView,X=d.NATIVE_ARRAY_BUFFER_VIEWS,$=d.TYPED_ARRAY_TAG,J=d.TypedArray,Q=d.TypedArrayPrototype,Z=d.aTypedArrayConstructor,ee=d.isTypedArray,te="BYTES_PER_ELEMENT",re="Wrong length",fromList=function(t,r){Z(t);for(var a=0,i=r.length,o=new t(i);i>a;)o[a]=r[a++];return o},addGetter=function(t,r){R(t,r,{configurable:!0,get:function(){return N(this)[r]}})},isArrayBuffer=function(t){var r;return I(K,t)||"ArrayBuffer"===(r=A(t))||"SharedArrayBuffer"===r},isTypedArrayIndex=function(t,r){return ee(t)&&!x(r)&&r in t&&_(+r)&&r>=0},ne=function getOwnPropertyDescriptor(t,r){r=P(r);return isTypedArrayIndex(t,r)?v(2,t[r]):U(t,r)},ae=function defineProperty(t,r,a){r=P(r);if(isTypedArrayIndex(t,r)&&S(a)&&k(a,"value")&&!k(a,"get")&&!k(a,"set")&&!a.configurable&&(!k(a,"writable")||a.writable)&&(!k(a,"enumerable")||a.enumerable)){t[r]=a.value;return t}return H(t,r,a)};if(c){if(!X){D.f=ne;L.f=ae;addGetter(Q,"buffer");addGetter(Q,"byteOffset");addGetter(Q,"byteLength");addGetter(Q,"length")}i({target:"Object",stat:!0,forced:!X},{getOwnPropertyDescriptor:ne,defineProperty:ae});t.exports=function(t,r,a){var c=t.match(/\d+/)[0]/8,d=t+(a?"Clamped":"")+"Array",h="get"+t,v="set"+t,_=o[d],P=_,k=P&&P.prototype,A={},addElement=function(t,r){H(t,r,{get:function(){return function(t,r){var a=N(t);return a.view[h](r*c+a.byteOffset,!0)}(this,r)},set:function(t){return function(t,r,i){var o=N(t);o.view[v](r*c+o.byteOffset,a?w(i):i,!0)}(this,r,t)},enumerable:!0})};if(X){if(u){P=r((function(t,r,a,i){p(t,k);return W(S(r)?isArrayBuffer(r)?void 0!==i?new _(r,b(a,c),i):void 0!==a?new _(r,b(a,c)):new _(r):ee(r)?fromList(P,r):l(M,P,r):new _(m(r)),t,P)}));C&&C(P,J);O(T(_),(function(t){t in P||y(P,t,_[t])}));P.prototype=k}}else{P=r((function(t,r,a,i){p(t,k);var o,u,d,h=0,v=0;if(S(r)){if(!isArrayBuffer(r))return ee(r)?fromList(P,r):l(M,P,r);o=r;v=b(a,c);var y=r.byteLength;if(void 0===i){if(y%c)throw new q(re);if((u=y-v)<0)throw new q(re)}else if((u=g(i)*c)+v>y)throw new q(re);d=u/c}else{d=m(r);o=new V(u=d*c)}B(t,{buffer:o,byteOffset:v,byteLength:u,length:d,view:new Y(o)});for(;h<d;)addElement(t,h++)}));C&&C(P,J);k=P.prototype=E(Q)}k.constructor!==P&&y(k,"constructor",P);z(k).TypedArrayConstructor=P;$&&y(k,$,d);var x=P!==_;A[d]=P;i({global:!0,constructor:!0,forced:x,sham:!X},A);te in P||y(P,te,c);te in k||y(k,te,c);G(d)}}else t.exports=function(){}},2127:(t,r,a)=>{var i=a(9298),o=a(8154),l=a(1374),c=a(5861).NATIVE_ARRAY_BUFFER_VIEWS,u=i.ArrayBuffer,d=i.Int8Array;t.exports=!c||!o((function(){d(1)}))||!o((function(){new d(-1)}))||!l((function(t){new d;new d(null);new d(1.5);new d(t)}),!0)||o((function(){return 1!==new d(new u(2),1,void 0).length}))},5306:(t,r,a)=>{var i=a(7003),o=a(6239);t.exports=function(t,r){return i(o(t),r)}},1675:(t,r,a)=>{var i=a(7789),o=a(2026),l=a(7073),c=a(2007),u=a(451),d=a(7612),h=a(273),p=a(5191),v=a(5986),y=a(5861).aTypedArrayConstructor,_=a(212);t.exports=function from(t){var r,a,g,m,b,w,P,k,A=l(this),S=c(t),x=arguments.length,E=x>1?arguments[1]:void 0,I=void 0!==E,C=h(S);if(C&&!p(C)){k=(P=d(S,C)).next;S=[];for(;!(w=o(k,P)).done;)S.push(w.value)}I&&x>2&&(E=i(E,arguments[2]));a=u(S);g=new(y(A))(a);m=v(g);for(r=0;a>r;r++){b=I?E(S[r],r):S[r];g[r]=m?_(b):+b}return g}},6239:(t,r,a)=>{var i=a(5861),o=a(8180),l=i.aTypedArrayConstructor,c=i.getTypedArrayConstructor;t.exports=function(t){return l(o(t,c(t)))}},7561:(t,r,a)=>{var i=a(8403),o=0,l=Math.random(),c=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+c(++o+l,36)}},8815:(t,r,a)=>{var i=a(8154),o=a(2292),l=a(940),c=a(2554),u=o("iterator");t.exports=!i((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),r=t.searchParams,a=new URLSearchParams("a=1&a=2&b=3"),i="";t.pathname="c%20d";r.forEach((function(t,a){r.delete("b");i+=a+t}));a.delete("a",2);a.delete("b",void 0);return c&&(!t.toJSON||!a.has("a",1)||a.has("a",2)||!a.has("a",void 0)||a.has("b"))||!r.size&&(c||!l)||!r.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[u]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host}))},7960:(t,r,a)=>{var i=a(3663);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},9610:(t,r,a)=>{var i=a(940),o=a(8154);t.exports=i&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},2743:t=>{var r=TypeError;t.exports=function(t,a){if(t<a)throw new r("Not enough arguments");return t}},8443:(t,r,a)=>{var i=a(9298),o=a(7316),l=i.WeakMap;t.exports=o(l)&&/native code/.test(String(l))},7120:(t,r,a)=>{var i=a(1021),o=a(936),l=a(8890),c=a(7744).f;t.exports=function(t){var r=i.Symbol||(i.Symbol={});o(r,t)||c(r,t,{value:l.f(t)})}},8890:(t,r,a)=>{var i=a(2292);r.f=i},2292:(t,r,a)=>{var i=a(9298),o=a(6807),l=a(936),c=a(7561),u=a(3663),d=a(7960),h=i.Symbol,p=o("wks"),v=d?h.for||h:h&&h.withoutSetter||c;t.exports=function(t){l(p,t)||(p[t]=u&&l(h,t)?h[t]:v("Symbol."+t));return p[t]}},96:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},7342:(t,r,a)=>{var i=a(7187),o=a(936),l=a(9293),c=a(2658),u=a(9763),d=a(1425),h=a(6085),p=a(7523),v=a(1264),y=a(8422),_=a(1931),g=a(940),m=a(2554);t.exports=function(t,r,a,b){var w="stackTraceLimit",P=b?2:1,k=t.split("."),A=k[k.length-1],S=i.apply(null,k);if(S){var x=S.prototype;!m&&o(x,"cause")&&delete x.cause;if(!a)return S;var E=i("Error"),I=r((function(t,r){var a=v(b?r:t,void 0),i=b?new S(t):new S;void 0!==a&&l(i,"message",a);_(i,I,i.stack,2);this&&c(x,this)&&p(i,this,I);arguments.length>P&&y(i,arguments[P]);return i}));I.prototype=x;if("Error"!==A)u?u(I,E):d(I,E,{name:!0});else if(g&&w in S){h(I,S,w);h(I,S,"prepareStackTrace")}d(I,S);if(!m)try{x.name!==A&&l(x,"name",A);x.constructor=I}catch(t){}return I}}},6820:(t,r,a)=>{var i=a(4978),o=a(2007),l=a(451),c=a(1003),u=a(5463);i({target:"Array",proto:!0},{at:function at(t){var r=o(this),a=l(r),i=c(t),u=i>=0?i:a+i;return u<0||u>=a?void 0:r[u]}});u("at")},7874:(t,r,a)=>{var i=a(4978),o=a(8154),l=a(6998),c=a(7633),u=a(2007),d=a(451),h=a(4287),p=a(8947),v=a(8097),y=a(3577),_=a(2292),g=a(2171),m=_("isConcatSpreadable"),b=g>=51||!o((function(){var t=[];t[m]=!1;return t.concat()[0]!==t})),isConcatSpreadable=function(t){if(!c(t))return!1;var r=t[m];return void 0!==r?!!r:l(t)};i({target:"Array",proto:!0,arity:1,forced:!b||!y("concat")},{concat:function concat(t){var r,a,i,o,l,c=u(this),y=v(c,0),_=0;for(r=-1,i=arguments.length;r<i;r++)if(isConcatSpreadable(l=-1===r?c:arguments[r])){o=d(l);h(_+o);for(a=0;a<o;a++,_++)a in l&&p(y,_,l[a])}else{h(_+1);p(y,_++,l)}y.length=_;return y}})},6394:(t,r,a)=>{var i=a(4978),o=a(8041),l=a(5463);i({target:"Array",proto:!0},{fill:o});l("fill")},1585:(t,r,a)=>{var i=a(4978),o=a(2423).filter;i({target:"Array",proto:!0,forced:!a(3577)("filter")},{filter:function filter(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},5621:(t,r,a)=>{var i=a(4978),o=a(2423).findIndex,l=a(5463),c="findIndex",u=!0;c in[]&&Array(1)[c]((function(){u=!1}));i({target:"Array",proto:!0,forced:u},{findIndex:function findIndex(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}});l(c)},3281:(t,r,a)=>{var i=a(4978),o=a(7938),l=a(1782),c=a(2007),u=a(451),d=a(8097);i({target:"Array",proto:!0},{flatMap:function flatMap(t){var r,a=c(this),i=u(a);l(t);(r=d(a,0)).length=o(r,a,a,i,0,1,t,arguments.length>1?arguments[1]:void 0);return r}})},9593:(t,r,a)=>{var i=a(4978),o=a(7609);i({target:"Array",stat:!0,forced:!a(1374)((function(t){Array.from(t)}))},{from:o})},2796:(t,r,a)=>{var i=a(4978),o=a(9773).includes,l=a(8154),c=a(5463);i({target:"Array",proto:!0,forced:l((function(){return!Array(1).includes()}))},{includes:function includes(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}});c("includes")},8649:(t,r,a)=>{var i=a(4978),o=a(6218),l=a(9773).indexOf,c=a(8321),u=o([].indexOf),d=!!u&&1/u([1],1,-0)<0;i({target:"Array",proto:!0,forced:d||!c("indexOf")},{indexOf:function indexOf(t){var r=arguments.length>1?arguments[1]:void 0;return d?u(this,t,r)||0:l(this,t,r)}})},6180:(t,r,a)=>{var i=a(4115),o=a(5463),l=a(6596),c=a(1649),u=a(7744).f,d=a(7301),h=a(1111),p=a(2554),v=a(940),y="Array Iterator",_=c.set,g=c.getterFor(y);t.exports=d(Array,"Array",(function(t,r){_(this,{type:y,target:i(t),index:0,kind:r})}),(function(){var t=g(this),r=t.target,a=t.index++;if(!r||a>=r.length){t.target=void 0;return h(void 0,!0)}switch(t.kind){case"keys":return h(a,!1);case"values":return h(r[a],!1)}return h([a,r[a]],!1)}),"values");var m=l.Arguments=l.Array;o("keys");o("values");o("entries");if(!p&&v&&"values"!==m.name)try{u(m,"name",{value:"values"})}catch(t){}},4997:(t,r,a)=>{var i=a(4978),o=a(8671);i({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},5136:(t,r,a)=>{var i=a(4978),o=a(2423).map;i({target:"Array",proto:!0,forced:!a(3577)("map")},{map:function map(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},4226:(t,r,a)=>{var i=a(4978),o=a(2007),l=a(451),c=a(6661),u=a(4287);i({target:"Array",proto:!0,arity:1,forced:a(8154)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function push(t){var r=o(this),a=l(r),i=arguments.length;u(a+i);for(var d=0;d<i;d++){r[a]=arguments[d];a++}c(r,a);return a}})},171:(t,r,a)=>{var i=a(4978),o=a(6998),l=a(1694),c=a(7633),u=a(6985),d=a(451),h=a(4115),p=a(8947),v=a(2292),y=a(3577),_=a(2251),g=y("slice"),m=v("species"),b=Array,w=Math.max;i({target:"Array",proto:!0,forced:!g},{slice:function slice(t,r){var a,i,v,y=h(this),g=d(y),P=u(t,g),k=u(void 0===r?g:r,g);if(o(y)){a=y.constructor;(l(a)&&(a===b||o(a.prototype))||c(a)&&null===(a=a[m]))&&(a=void 0);if(a===b||void 0===a)return _(y,P,k)}i=new(void 0===a?b:a)(w(k-P,0));for(v=0;P<k;P++,v++)P in y&&p(i,v,y[P]);i.length=v;return i}})},8301:(t,r,a)=>{var i=a(4978),o=a(8403),l=a(1782),c=a(2007),u=a(451),d=a(2322),h=a(5730),p=a(8154),v=a(4689),y=a(8321),_=a(7614),g=a(7463),m=a(2171),b=a(7906),w=[],P=o(w.sort),k=o(w.push),A=p((function(){w.sort(void 0)})),S=p((function(){w.sort(null)})),x=y("sort"),E=!p((function(){if(m)return m<70;if(!(_&&_>3)){if(g)return!0;if(b)return b<603;var t,r,a,i,o="";for(t=65;t<76;t++){r=String.fromCharCode(t);switch(t){case 66:case 69:case 70:case 72:a=3;break;case 68:case 71:a=4;break;default:a=2}for(i=0;i<47;i++)w.push({k:r+i,v:a})}w.sort((function(t,r){return r.v-t.v}));for(i=0;i<w.length;i++){r=w[i].k.charAt(0);o.charAt(o.length-1)!==r&&(o+=r)}return"DGBEFHACIJK"!==o}}));i({target:"Array",proto:!0,forced:A||!S||!x||!E},{sort:function sort(t){void 0!==t&&l(t);var r=c(this);if(E)return void 0===t?P(r):P(r,t);var a,i,o=[],p=u(r);for(i=0;i<p;i++)i in r&&k(o,r[i]);v(o,function(t){return function(r,a){return void 0===a?-1:void 0===r?1:void 0!==t?+t(r,a)||0:h(r)>h(a)?1:-1}}(t));a=u(o);i=0;for(;i<a;)r[i]=o[i++];for(;i<p;)d(r,i++);return r}})},6302:(t,r,a)=>{var i=a(4978),o=a(2007),l=a(6985),c=a(1003),u=a(451),d=a(6661),h=a(4287),p=a(8097),v=a(8947),y=a(2322),_=a(3577)("splice"),g=Math.max,m=Math.min;i({target:"Array",proto:!0,forced:!_},{splice:function splice(t,r){var a,i,_,b,w,P,k=o(this),A=u(k),S=l(t,A),x=arguments.length;if(0===x)a=i=0;else if(1===x){a=0;i=A-S}else{a=x-2;i=m(g(c(r),0),A-S)}h(A+a-i);_=p(k,i);for(b=0;b<i;b++)(w=S+b)in k&&v(_,b,k[w]);_.length=i;if(a<i){for(b=S;b<A-i;b++){P=b+a;(w=b+i)in k?k[P]=k[w]:y(k,P)}for(b=A;b>A-i+a;b--)y(k,b-1)}else if(a>i)for(b=A-i;b>S;b--){P=b+a-1;(w=b+i-1)in k?k[P]=k[w]:y(k,P)}for(b=0;b<a;b++)k[b+S]=arguments[b+2];d(k,A-i+a);return _}})},8984:(t,r,a)=>{a(5463)("flatMap")},8806:(t,r,a)=>{var i=a(936),o=a(7041),l=a(3612),c=a(2292)("toPrimitive"),u=Date.prototype;i(u,c)||o(u,c,l)},3352:(t,r,a)=>{var i=a(4978),o=a(9298),l=a(7294),c=a(7342),u="WebAssembly",d=o[u],h=7!==new Error("e",{cause:7}).cause,exportGlobalErrorCauseWrapper=function(t,r){var a={};a[t]=c(t,r,h);i({global:!0,constructor:!0,arity:1,forced:h},a)},exportWebAssemblyErrorCauseWrapper=function(t,r){if(d&&d[t]){var a={};a[t]=c(u+"."+t,r,h);i({target:u,stat:!0,constructor:!0,arity:1,forced:h},a)}};exportGlobalErrorCauseWrapper("Error",(function(t){return function Error(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("EvalError",(function(t){return function EvalError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("RangeError",(function(t){return function RangeError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("ReferenceError",(function(t){return function ReferenceError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("SyntaxError",(function(t){return function SyntaxError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("TypeError",(function(t){return function TypeError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("URIError",(function(t){return function URIError(r){return l(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("CompileError",(function(t){return function CompileError(r){return l(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("LinkError",(function(t){return function LinkError(r){return l(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("RuntimeError",(function(t){return function RuntimeError(r){return l(t,this,arguments)}}))},1210:(t,r,a)=>{var i=a(4978),o=a(9298);i({global:!0,forced:o.globalThis!==o},{globalThis:o})},7254:(t,r,a)=>{var i=a(4978),o=a(7187),l=a(7294),c=a(2026),u=a(8403),d=a(8154),h=a(7316),p=a(7814),v=a(2251),y=a(1801),_=a(3663),g=String,m=o("JSON","stringify"),b=u(/./.exec),w=u("".charAt),P=u("".charCodeAt),k=u("".replace),A=u(1..toString),S=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,E=/^[\uDC00-\uDFFF]$/,I=!_||d((function(){var t=o("Symbol")("stringify detection");return"[null]"!==m([t])||"{}"!==m({a:t})||"{}"!==m(Object(t))})),C=d((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),stringifyWithSymbolsFix=function(t,r){var a=v(arguments),i=y(r);if(h(i)||void 0!==t&&!p(t)){a[1]=function(t,r){h(i)&&(r=c(i,this,g(t),r));if(!p(r))return r};return l(m,null,a)}},fixIllFormed=function(t,r,a){var i=w(a,r-1),o=w(a,r+1);return b(x,t)&&!b(E,o)||b(E,t)&&!b(x,i)?"\\u"+A(P(t,0),16):t};m&&i({target:"JSON",stat:!0,arity:3,forced:I||C},{stringify:function stringify(t,r,a){var i=v(arguments),o=l(I?stringifyWithSymbolsFix:m,null,i);return C&&"string"==typeof o?k(o,S,fixIllFormed):o}})},2630:(t,r,a)=>{var i=a(9298);a(7536)(i.JSON,"JSON",!0)},4147:(t,r,a)=>{a(4981)("Map",(function(t){return function Map(){return t(this,arguments.length?arguments[0]:void 0)}}),a(6122))},5548:(t,r,a)=>{a(4147)},7492:(t,r,a)=>{a(4978)({target:"Math",stat:!0},{fround:a(796)})},3821:(t,r,a)=>{var i=a(4978),o=Math.hypot,l=Math.abs,c=Math.sqrt;i({target:"Math",stat:!0,arity:2,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function hypot(t,r){for(var a,i,o=0,u=0,d=arguments.length,h=0;u<d;)if(h<(a=l(arguments[u++]))){o=o*(i=h/a)*i+1;h=a}else o+=a>0?(i=a/h)*i:a;return h===1/0?1/0:h*c(o)}})},4165:(t,r,a)=>{a(4978)({target:"Math",stat:!0},{sign:a(4875)})},1024:(t,r,a)=>{a(7536)(Math,"Math",!0)},5897:(t,r,a)=>{var i=a(4978),o=a(2554),l=a(940),c=a(9298),u=a(1021),d=a(8403),h=a(7007),p=a(936),v=a(7523),y=a(2658),_=a(7814),g=a(4151),m=a(8154),b=a(5455).f,w=a(5764).f,P=a(7744).f,k=a(3328),A=a(83).trim,S="Number",x=c[S],E=u[S],I=x.prototype,C=c.TypeError,T=d("".slice),M=d("".charCodeAt),toNumber=function(t){var r,a,i,o,l,c,u,d,h=g(t,"number");if(_(h))throw new C("Cannot convert a Symbol value to a number");if("string"==typeof h&&h.length>2){h=A(h);if(43===(r=M(h,0))||45===r){if(88===(a=M(h,2))||120===a)return NaN}else if(48===r){switch(M(h,1)){case 66:case 98:i=2;o=49;break;case 79:case 111:i=8;o=55;break;default:return+h}c=(l=T(h,2)).length;for(u=0;u<c;u++)if((d=M(l,u))<48||d>o)return NaN;return parseInt(l,i)}}return+h},O=h(S,!x(" 0o1")||!x("0b1")||x("+0x1")),G=function Number(t){var r,a=arguments.length<1?0:x(function(t){var r=g(t,"number");return"bigint"==typeof r?r:toNumber(r)}(t));return y(I,r=this)&&m((function(){k(r)}))?v(Object(a),this,G):a};G.prototype=I;O&&!o&&(I.constructor=G);i({global:!0,constructor:!0,wrap:!0,forced:O},{Number:G});var copyConstructorProperties=function(t,r){for(var a,i=l?b(r):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;i.length>o;o++)p(r,a=i[o])&&!p(t,a)&&P(t,a,w(r,a))};o&&E&&copyConstructorProperties(u[S],E);(O||o)&&copyConstructorProperties(u[S],x)},9142:(t,r,a)=>{var i=a(4978),o=a(453);i({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},2586:(t,r,a)=>{var i=a(4978),o=a(2492).entries;i({target:"Object",stat:!0},{entries:function entries(t){return o(t)}})},4441:(t,r,a)=>{var i=a(4978),o=a(7010),l=a(8154),c=a(7633),u=a(4694).onFreeze,d=Object.freeze;i({target:"Object",stat:!0,forced:l((function(){d(1)})),sham:!o},{freeze:function freeze(t){return d&&c(t)?d(u(t)):t}})},7262:(t,r,a)=>{var i=a(4978),o=a(8154),l=a(4115),c=a(5764).f,u=a(940);i({target:"Object",stat:!0,forced:!u||o((function(){c(1)})),sham:!u},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(t,r){return c(l(t),r)}})},7335:(t,r,a)=>{var i=a(4978),o=a(940),l=a(8953),c=a(4115),u=a(5764),d=a(8947);i({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(t){for(var r,a,i=c(t),o=u.f,h=l(i),p={},v=0;h.length>v;)void 0!==(a=o(i,r=h[v++]))&&d(p,r,a);return p}})},8564:(t,r,a)=>{var i=a(4978),o=a(3663),l=a(8154),c=a(1963),u=a(2007);i({target:"Object",stat:!0,forced:!o||l((function(){c.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){var r=c.f;return r?r(u(t)):[]}})},13:(t,r,a)=>{var i=a(4978),o=a(8154),l=a(2007),c=a(2176),u=a(7888);i({target:"Object",stat:!0,forced:o((function(){c(1)})),sham:!u},{getPrototypeOf:function getPrototypeOf(t){return c(l(t))}})},4668:(t,r,a)=>{var i=a(4978),o=a(2007),l=a(1706);i({target:"Object",stat:!0,forced:a(8154)((function(){l(1)}))},{keys:function keys(t){return l(o(t))}})},895:(t,r,a)=>{var i=a(3077),o=a(7041),l=a(759);i||o(Object.prototype,"toString",l,{unsafe:!0})},9099:(t,r,a)=>{var i=a(4978),o=a(2492).values;i({target:"Object",stat:!0},{values:function values(t){return o(t)}})},4060:(t,r,a)=>{var i=a(4978),o=a(2026),l=a(1782),c=a(1880),u=a(1518),d=a(6837);i({target:"Promise",stat:!0,forced:a(3779)},{allSettled:function allSettled(t){var r=this,a=c.f(r),i=a.resolve,h=a.reject,p=u((function(){var a=l(r.resolve),c=[],u=0,h=1;d(t,(function(t){var l=u++,d=!1;h++;o(a,r,t).then((function(t){if(!d){d=!0;c[l]={status:"fulfilled",value:t};--h||i(c)}}),(function(t){if(!d){d=!0;c[l]={status:"rejected",reason:t};--h||i(c)}}))}));--h||i(c)}));p.error&&h(p.value);return a.promise}})},8392:(t,r,a)=>{var i=a(4978),o=a(2026),l=a(1782),c=a(1880),u=a(1518),d=a(6837);i({target:"Promise",stat:!0,forced:a(3779)},{all:function all(t){var r=this,a=c.f(r),i=a.resolve,h=a.reject,p=u((function(){var a=l(r.resolve),c=[],u=0,p=1;d(t,(function(t){var l=u++,d=!1;p++;o(a,r,t).then((function(t){if(!d){d=!0;c[l]=t;--p||i(c)}}),h)}));--p||i(c)}));p.error&&h(p.value);return a.promise}})},3264:(t,r,a)=>{var i=a(4978),o=a(2554),l=a(8308).CONSTRUCTOR,c=a(6639),u=a(7187),d=a(7316),h=a(7041),p=c&&c.prototype;i({target:"Promise",proto:!0,forced:l,real:!0},{catch:function(t){return this.then(void 0,t)}});if(!o&&d(c)){var v=u("Promise").prototype.catch;p.catch!==v&&h(p,"catch",v,{unsafe:!0})}},7930:(t,r,a)=>{var i,o,l,c=a(4978),u=a(2554),d=a(4864),h=a(9298),p=a(2026),v=a(7041),y=a(9763),_=a(7536),g=a(5963),m=a(1782),b=a(7316),w=a(7633),P=a(5834),k=a(8180),A=a(4578).set,S=a(1627),x=a(5285),E=a(1518),I=a(1397),C=a(1649),T=a(6639),M=a(8308),O=a(1880),G="Promise",R=M.CONSTRUCTOR,L=M.REJECTION_EVENT,D=M.SUBCLASSING,j=C.getterFor(G),W=C.set,N=T&&T.prototype,B=T,z=N,H=h.TypeError,U=h.document,q=h.process,V=O.f,K=V,Y=!!(U&&U.createEvent&&h.dispatchEvent),X="unhandledrejection",isThenable=function(t){var r;return!(!w(t)||!b(r=t.then))&&r},callReaction=function(t,r){var a,i,o,l=r.value,c=1===r.state,u=c?t.ok:t.fail,d=t.resolve,h=t.reject,v=t.domain;try{if(u){if(!c){2===r.rejection&&onHandleUnhandled(r);r.rejection=1}if(!0===u)a=l;else{v&&v.enter();a=u(l);if(v){v.exit();o=!0}}a===t.promise?h(new H("Promise-chain cycle")):(i=isThenable(a))?p(i,a,d,h):d(a)}else h(l)}catch(t){v&&!o&&v.exit();h(t)}},notify=function(t,r){if(!t.notified){t.notified=!0;S((function(){for(var a,i=t.reactions;a=i.get();)callReaction(a,t);t.notified=!1;r&&!t.rejection&&onUnhandled(t)}))}},dispatchEvent=function(t,r,a){var i,o;if(Y){(i=U.createEvent("Event")).promise=r;i.reason=a;i.initEvent(t,!1,!0);h.dispatchEvent(i)}else i={promise:r,reason:a};!L&&(o=h["on"+t])?o(i):t===X&&x("Unhandled promise rejection",a)},onUnhandled=function(t){p(A,h,(function(){var r,a=t.facade,i=t.value;if(isUnhandled(t)){r=E((function(){d?q.emit("unhandledRejection",i,a):dispatchEvent(X,a,i)}));t.rejection=d||isUnhandled(t)?2:1;if(r.error)throw r.value}}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t){p(A,h,(function(){var r=t.facade;d?q.emit("rejectionHandled",r):dispatchEvent("rejectionhandled",r,t.value)}))},bind=function(t,r,a){return function(i){t(r,i,a)}},internalReject=function(t,r,a){if(!t.done){t.done=!0;a&&(t=a);t.value=r;t.state=2;notify(t,!0)}},internalResolve=function(t,r,a){if(!t.done){t.done=!0;a&&(t=a);try{if(t.facade===r)throw new H("Promise can't be resolved itself");var i=isThenable(r);if(i)S((function(){var a={done:!1};try{p(i,r,bind(internalResolve,a,t),bind(internalReject,a,t))}catch(r){internalReject(a,r,t)}}));else{t.value=r;t.state=1;notify(t,!1)}}catch(r){internalReject({done:!1},r,t)}}};if(R){z=(B=function Promise(t){P(this,z);m(t);p(i,this);var r=j(this);try{t(bind(internalResolve,r),bind(internalReject,r))}catch(t){internalReject(r,t)}}).prototype;(i=function Promise(t){W(this,{type:G,done:!1,notified:!1,parent:!1,reactions:new I,rejection:!1,state:0,value:void 0})}).prototype=v(z,"then",(function then(t,r){var a=j(this),i=V(k(this,B));a.parent=!0;i.ok=!b(t)||t;i.fail=b(r)&&r;i.domain=d?q.domain:void 0;0===a.state?a.reactions.add(i):S((function(){callReaction(i,a)}));return i.promise}));o=function(){var t=new i,r=j(t);this.promise=t;this.resolve=bind(internalResolve,r);this.reject=bind(internalReject,r)};O.f=V=function(t){return t===B||undefined===t?new o(t):K(t)};if(!u&&b(T)&&N!==Object.prototype){l=N.then;D||v(N,"then",(function then(t,r){var a=this;return new B((function(t,r){p(l,a,t,r)})).then(t,r)}),{unsafe:!0});try{delete N.constructor}catch(t){}y&&y(N,z)}}c({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:B});_(B,G,!1,!0);g(G)},4750:(t,r,a)=>{var i=a(4978),o=a(2554),l=a(6639),c=a(8154),u=a(7187),d=a(7316),h=a(8180),p=a(2506),v=a(7041),y=l&&l.prototype;i({target:"Promise",proto:!0,real:!0,forced:!!l&&c((function(){y.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var r=h(this,u("Promise")),a=d(t);return this.then(a?function(a){return p(r,t()).then((function(){return a}))}:t,a?function(a){return p(r,t()).then((function(){throw a}))}:t)}});if(!o&&d(l)){var _=u("Promise").prototype.finally;y.finally!==_&&v(y,"finally",_,{unsafe:!0})}},5666:(t,r,a)=>{a(7930);a(8392);a(3264);a(1078);a(4209);a(935)},1078:(t,r,a)=>{var i=a(4978),o=a(2026),l=a(1782),c=a(1880),u=a(1518),d=a(6837);i({target:"Promise",stat:!0,forced:a(3779)},{race:function race(t){var r=this,a=c.f(r),i=a.reject,h=u((function(){var c=l(r.resolve);d(t,(function(t){o(c,r,t).then(a.resolve,i)}))}));h.error&&i(h.value);return a.promise}})},4209:(t,r,a)=>{var i=a(4978),o=a(2026),l=a(1880);i({target:"Promise",stat:!0,forced:a(8308).CONSTRUCTOR},{reject:function reject(t){var r=l.f(this);o(r.reject,void 0,t);return r.promise}})},935:(t,r,a)=>{var i=a(4978),o=a(7187),l=a(2554),c=a(6639),u=a(8308).CONSTRUCTOR,d=a(2506),h=o("Promise"),p=l&&!u;i({target:"Promise",stat:!0,forced:l||u},{resolve:function resolve(t){return d(p&&this===h?c:this,t)}})},6128:(t,r,a)=>{var i=a(4978),o=a(7187),l=a(7294),c=a(6520),u=a(7073),d=a(4719),h=a(7633),p=a(6941),v=a(8154),y=o("Reflect","construct"),_=Object.prototype,g=[].push,m=v((function(){function F(){}return!(y((function(){}),[],F)instanceof F)})),b=!v((function(){y((function(){}))})),w=m||b;i({target:"Reflect",stat:!0,forced:w,sham:w},{construct:function construct(t,r){u(t);d(r);var a=arguments.length<3?t:u(arguments[2]);if(b&&!m)return y(t,r,a);if(t===a){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var i=[null];l(g,i,r);return new(l(c,t,i))}var o=a.prototype,v=p(h(o)?o:_),w=l(t,v,r);return h(w)?w:v}})},9718:(t,r,a)=>{var i=a(4978),o=a(2026),l=a(7633),c=a(4719),u=a(3374),d=a(5764),h=a(2176);i({target:"Reflect",stat:!0},{get:function get(t,r){var a,i,p=arguments.length<3?t:arguments[2];return c(t)===p?t[r]:(a=d.f(t,r))?u(a)?a.value:void 0===a.get?void 0:o(a.get,p):l(i=h(t))?get(i,r,p):void 0}})},9175:(t,r,a)=>{var i=a(4978),o=a(9298),l=a(7536);i({global:!0},{Reflect:{}});l(o.Reflect,"Reflect",!0)},3032:(t,r,a)=>{var i=a(940),o=a(9298),l=a(8403),c=a(7007),u=a(7523),d=a(9293),h=a(6941),p=a(5455).f,v=a(2658),y=a(6660),_=a(5730),g=a(1043),m=a(3286),b=a(6085),w=a(7041),P=a(8154),k=a(936),A=a(1649).enforce,S=a(5963),x=a(2292),E=a(1714),I=a(2513),C=x("match"),T=o.RegExp,M=T.prototype,O=o.SyntaxError,G=l(M.exec),R=l("".charAt),L=l("".replace),D=l("".indexOf),j=l("".slice),W=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,N=/a/g,B=/a/g,z=new T(N)!==N,H=m.MISSED_STICKY,U=m.UNSUPPORTED_Y,q=i&&(!z||H||E||I||P((function(){B[C]=!1;return T(N)!==N||T(B)===B||"/a/i"!==String(T(N,"i"))})));if(c("RegExp",q)){for(var V=function RegExp(t,r){var a,i,o,l,c,p,m=v(M,this),b=y(t),w=void 0===r,P=[],S=t;if(!m&&b&&w&&t.constructor===V)return t;if(b||v(M,t)){t=t.source;w&&(r=g(S))}t=void 0===t?"":_(t);r=void 0===r?"":_(r);S=t;E&&"dotAll"in N&&(i=!!r&&D(r,"s")>-1)&&(r=L(r,/s/g,""));a=r;H&&"sticky"in N&&(o=!!r&&D(r,"y")>-1)&&U&&(r=L(r,/y/g,""));if(I){l=function(t){for(var r,a=t.length,i=0,o="",l=[],c=h(null),u=!1,d=!1,p=0,v="";i<=a;i++){if("\\"===(r=R(t,i)))r+=R(t,++i);else if("]"===r)u=!1;else if(!u)switch(!0){case"["===r:u=!0;break;case"("===r:if(G(W,j(t,i+1))){i+=2;d=!0}o+=r;p++;continue;case">"===r&&d:if(""===v||k(c,v))throw new O("Invalid capture group name");c[v]=!0;l[l.length]=[v,p];d=!1;v="";continue}d?v+=r:o+=r}return[o,l]}(t);t=l[0];P=l[1]}c=u(T(t,r),m?this:M,V);if(i||o||P.length){p=A(c);if(i){p.dotAll=!0;p.raw=V(function(t){for(var r,a=t.length,i=0,o="",l=!1;i<=a;i++)if("\\"!==(r=R(t,i)))if(l||"."!==r){"["===r?l=!0:"]"===r&&(l=!1);o+=r}else o+="[\\s\\S]";else o+=r+R(t,++i);return o}(t),a)}o&&(p.sticky=!0);P.length&&(p.groups=P)}if(t!==S)try{d(c,"source",""===S?"(?:)":S)}catch(t){}return c},K=p(T),Y=0;K.length>Y;)b(V,T,K[Y++]);M.constructor=V;V.prototype=M;w(o,"RegExp",V,{constructor:!0})}S("RegExp")},5619:(t,r,a)=>{var i=a(940),o=a(1714),l=a(8374),c=a(9691),u=a(1649).get,d=RegExp.prototype,h=TypeError;i&&o&&c(d,"dotAll",{configurable:!0,get:function dotAll(){if(this!==d){if("RegExp"===l(this))return!!u(this).dotAll;throw new h("Incompatible receiver, RegExp required")}}})},7942:(t,r,a)=>{var i=a(4978),o=a(2178);i({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},9786:(t,r,a)=>{var i=a(940),o=a(3286).MISSED_STICKY,l=a(8374),c=a(9691),u=a(1649).get,d=RegExp.prototype,h=TypeError;i&&o&&c(d,"sticky",{configurable:!0,get:function sticky(){if(this!==d){if("RegExp"===l(this))return!!u(this).sticky;throw new h("Incompatible receiver, RegExp required")}}})},5776:(t,r,a)=>{a(7942);var i=a(4978),o=a(2026),l=a(7316),c=a(4719),u=a(5730),d=function(){var t=!1,r=/[ac]/;r.exec=function(){t=!0;return/./.exec.apply(this,arguments)};return!0===r.test("abc")&&t}(),h=/./.test;i({target:"RegExp",proto:!0,forced:!d},{test:function(t){var r=c(this),a=u(t),i=r.exec;if(!l(i))return o(h,r,a);var d=o(i,r,a);if(null===d)return!1;c(d);return!0}})},924:(t,r,a)=>{var i=a(5145).PROPER,o=a(7041),l=a(4719),c=a(5730),u=a(8154),d=a(1043),h="toString",p=RegExp.prototype[h],v=u((function(){return"/a/b"!==p.call({source:"a",flags:"b"})})),y=i&&p.name!==h;(v||y)&&o(RegExp.prototype,h,(function toString(){var t=l(this);return"/"+c(t.source)+"/"+c(d(t))}),{unsafe:!0})},3810:(t,r,a)=>{a(4981)("Set",(function(t){return function Set(){return t(this,arguments.length?arguments[0]:void 0)}}),a(6122))},2048:(t,r,a)=>{a(3810)},10:(t,r,a)=>{var i=a(4978),o=a(8403),l=a(5645),c=a(1003),u=a(5730),d=a(8154),h=o("".charAt);i({target:"String",proto:!0,forced:d((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function at(t){var r=u(l(this)),a=r.length,i=c(t),o=i>=0?i:a+i;return o<0||o>=a?void 0:h(r,o)}})},6133:(t,r,a)=>{var i,o=a(4978),l=a(6218),c=a(5764).f,u=a(8293),d=a(5730),h=a(9578),p=a(5645),v=a(2280),y=a(2554),_=l("".endsWith),g=l("".slice),m=Math.min,b=v("endsWith");o({target:"String",proto:!0,forced:!(!y&&!b&&!!(i=c(String.prototype,"endsWith"),i&&!i.writable))&&!b},{endsWith:function endsWith(t){var r=d(p(this));h(t);var a=arguments.length>1?arguments[1]:void 0,i=r.length,o=void 0===a?i:m(u(a),i),l=d(t);return _?_(r,l,o):g(r,o-l.length,o)===l}})},2613:(t,r,a)=>{var i=a(4978),o=a(8403),l=a(9578),c=a(5645),u=a(5730),d=a(2280),h=o("".indexOf);i({target:"String",proto:!0,forced:!d("includes")},{includes:function includes(t){return!!~h(u(c(this)),u(l(t)),arguments.length>1?arguments[1]:void 0)}})},1747:(t,r,a)=>{var i=a(6819).charAt,o=a(5730),l=a(1649),c=a(7301),u=a(1111),d="String Iterator",h=l.set,p=l.getterFor(d);c(String,"String",(function(t){h(this,{type:d,string:o(t),index:0})}),(function next(){var t,r=p(this),a=r.string,o=r.index;if(o>=a.length)return u(void 0,!0);t=i(a,o);r.index+=t.length;return u(t,!1)}))},469:(t,r,a)=>{var i=a(2026),o=a(4629),l=a(4719),c=a(3734),u=a(8293),d=a(5730),h=a(5645),p=a(8486),v=a(9047),y=a(8986);o("match",(function(t,r,a){return[function match(r){var a=h(this),o=c(r)?void 0:p(r,t);return o?i(o,r,a):new RegExp(r)[t](d(a))},function(t){var i=l(this),o=d(t),c=a(r,i,o);if(c.done)return c.value;if(!i.global)return y(i,o);var h=i.unicode;i.lastIndex=0;for(var p,_=[],g=0;null!==(p=y(i,o));){var m=d(p[0]);_[g]=m;""===m&&(i.lastIndex=v(o,u(i.lastIndex),h));g++}return 0===g?null:_}]}))},6333:(t,r,a)=>{var i=a(4978),o=a(6460).end;i({target:"String",proto:!0,forced:a(4819)},{padEnd:function padEnd(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},7230:(t,r,a)=>{var i=a(4978),o=a(6460).start;i({target:"String",proto:!0,forced:a(4819)},{padStart:function padStart(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},7600:(t,r,a)=>{var i=a(4978),o=a(2026),l=a(8403),c=a(5645),u=a(7316),d=a(3734),h=a(6660),p=a(5730),v=a(8486),y=a(1043),_=a(1634),g=a(2292),m=a(2554),b=g("replace"),w=TypeError,P=l("".indexOf),k=l("".replace),A=l("".slice),S=Math.max,stringIndexOf=function(t,r,a){return a>t.length?-1:""===r?a:P(t,r,a)};i({target:"String",proto:!0},{replaceAll:function replaceAll(t,r){var a,i,l,g,x,E,I,C,T,M=c(this),O=0,G=0,R="";if(!d(t)){if(a=h(t)){i=p(c(y(t)));if(!~P(i,"g"))throw new w("`.replaceAll` does not allow non-global regexes")}if(l=v(t,b))return o(l,t,M,r);if(m&&a)return k(p(M),t,r)}g=p(M);x=p(t);(E=u(r))||(r=p(r));I=x.length;C=S(1,I);O=stringIndexOf(g,x,0);for(;-1!==O;){T=E?p(r(x,O,g)):_(x,g,O,[],void 0,r);R+=A(g,G,O)+T;G=O+I;O=stringIndexOf(g,x,O+C)}G<g.length&&(R+=A(g,G));return R}})},4711:(t,r,a)=>{var i=a(7294),o=a(2026),l=a(8403),c=a(4629),u=a(8154),d=a(4719),h=a(7316),p=a(3734),v=a(1003),y=a(8293),_=a(5730),g=a(5645),m=a(9047),b=a(8486),w=a(1634),P=a(8986),k=a(2292)("replace"),A=Math.max,S=Math.min,x=l([].concat),E=l([].push),I=l("".indexOf),C=l("".slice),T="$0"==="a".replace(/./,"$0"),M=!!/./[k]&&""===/./[k]("a","$0");c("replace",(function(t,r,a){var l=M?"$":"$0";return[function replace(t,a){var i=g(this),l=p(t)?void 0:b(t,k);return l?o(l,t,i,a):o(r,_(i),t,a)},function(t,o){var c=d(this),u=_(t);if("string"==typeof o&&-1===I(o,l)&&-1===I(o,"$<")){var p=a(r,c,u,o);if(p.done)return p.value}var g=h(o);g||(o=_(o));var b,k=c.global;if(k){b=c.unicode;c.lastIndex=0}for(var T,M=[];null!==(T=P(c,u));){E(M,T);if(!k)break;""===_(T[0])&&(c.lastIndex=m(u,y(c.lastIndex),b))}for(var O,G="",R=0,L=0;L<M.length;L++){for(var D,j=_((T=M[L])[0]),W=A(S(v(T.index),u.length),0),N=[],B=1;B<T.length;B++)E(N,void 0===(O=T[B])?O:String(O));var z=T.groups;if(g){var H=x([j],N,W,u);void 0!==z&&E(H,z);D=_(i(o,void 0,H))}else D=w(j,u,W,N,z,o);if(W>=R){G+=C(u,R,W)+D;R=W+j.length}}return G+C(u,R)}]}),!!u((function(){var t=/./;t.exec=function(){var t=[];t.groups={a:"7"};return t};return"7"!=="".replace(t,"$<a>")}))||!T||M)},4280:(t,r,a)=>{var i=a(7294),o=a(2026),l=a(8403),c=a(4629),u=a(4719),d=a(3734),h=a(6660),p=a(5645),v=a(8180),y=a(9047),_=a(8293),g=a(5730),m=a(8486),b=a(6071),w=a(8986),P=a(2178),k=a(3286),A=a(8154),S=k.UNSUPPORTED_Y,x=4294967295,E=Math.min,I=[].push,C=l(/./.exec),T=l(I),M=l("".slice);c("split",(function(t,r,a){var l;l="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,a){var l=g(p(this)),c=void 0===a?x:a>>>0;if(0===c)return[];if(void 0===t)return[l];if(!h(t))return o(r,l,t,c);for(var u,d,v,y=[],_=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),m=0,w=new RegExp(t.source,_+"g");u=o(P,w,l);){if((d=w.lastIndex)>m){T(y,M(l,m,u.index));u.length>1&&u.index<l.length&&i(I,y,b(u,1));v=u[0].length;m=d;if(y.length>=c)break}w.lastIndex===u.index&&w.lastIndex++}m===l.length?!v&&C(w,"")||T(y,""):T(y,M(l,m));return y.length>c?b(y,0,c):y}:"0".split(void 0,0).length?function(t,a){return void 0===t&&0===a?[]:o(r,this,t,a)}:r;return[function split(r,a){var i=p(this),c=d(r)?void 0:m(r,t);return c?o(c,r,i,a):o(l,g(i),r,a)},function(t,i){var o=u(this),c=g(t),d=a(l,o,c,i,l!==r);if(d.done)return d.value;var h=v(o,RegExp),p=o.unicode,m=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(S?"g":"y"),b=new h(S?"^(?:"+o.source+")":o,m),P=void 0===i?x:i>>>0;if(0===P)return[];if(0===c.length)return null===w(b,c)?[c]:[];for(var k=0,A=0,I=[];A<c.length;){b.lastIndex=S?0:A;var C,O=w(b,S?M(c,A):c);if(null===O||(C=E(_(b.lastIndex+(S?A:0)),c.length))===k)A=y(c,A,p);else{T(I,M(c,k,A));if(I.length===P)return I;for(var G=1;G<=O.length-1;G++){T(I,O[G]);if(I.length===P)return I}A=k=C}}T(I,M(c,k));return I}]}),!!A((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var a="ab".split(t);return 2!==a.length||"a"!==a[0]||"b"!==a[1]})),S)},6421:(t,r,a)=>{var i,o=a(4978),l=a(6218),c=a(5764).f,u=a(8293),d=a(5730),h=a(9578),p=a(5645),v=a(2280),y=a(2554),_=l("".startsWith),g=l("".slice),m=Math.min,b=v("startsWith");o({target:"String",proto:!0,forced:!(!y&&!b&&!!(i=c(String.prototype,"startsWith"),i&&!i.writable))&&!b},{startsWith:function startsWith(t){var r=d(p(this));h(t);var a=u(m(arguments.length>1?arguments[1]:void 0,r.length)),i=d(t);return _?_(r,i,a):g(r,a,a+i.length)===i}})},5404:(t,r,a)=>{a(5493);var i=a(4978),o=a(4211);i({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==o},{trimEnd:o})},5493:(t,r,a)=>{var i=a(4978),o=a(4211);i({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==o},{trimRight:o})},8341:(t,r,a)=>{var i=a(4978),o=a(83).trim;i({target:"String",proto:!0,forced:a(8729)("trim")},{trim:function trim(){return o(this)}})},1133:(t,r,a)=>{a(7120)("asyncIterator")},1532:(t,r,a)=>{var i=a(4978),o=a(9298),l=a(2026),c=a(8403),u=a(2554),d=a(940),h=a(3663),p=a(8154),v=a(936),y=a(2658),_=a(4719),g=a(4115),m=a(4871),b=a(5730),w=a(1198),P=a(6941),k=a(1706),A=a(5455),S=a(2329),x=a(1963),E=a(5764),I=a(7744),C=a(6617),T=a(1879),M=a(7041),O=a(9691),G=a(6807),R=a(3727),L=a(6010),D=a(7561),j=a(2292),W=a(8890),N=a(7120),B=a(5117),z=a(7536),H=a(1649),U=a(2423).forEach,q=R("hidden"),V="Symbol",K="prototype",Y=H.set,X=H.getterFor(V),$=Object[K],J=o.Symbol,Q=J&&J[K],Z=o.RangeError,ee=o.TypeError,te=o.QObject,re=E.f,ne=I.f,ae=S.f,ie=T.f,oe=c([].push),se=G("symbols"),le=G("op-symbols"),ce=G("wks"),ue=!te||!te[K]||!te[K].findChild,fallbackDefineProperty=function(t,r,a){var i=re($,r);i&&delete $[r];ne(t,r,a);i&&t!==$&&ne($,r,i)},de=d&&p((function(){return 7!==P(ne({},"a",{get:function(){return ne(this,"a",{value:7}).a}})).a}))?fallbackDefineProperty:ne,wrap=function(t,r){var a=se[t]=P(Q);Y(a,{type:V,tag:t,description:r});d||(a.description=r);return a},he=function defineProperty(t,r,a){t===$&&he(le,r,a);_(t);var i=m(r);_(a);if(v(se,i)){if(a.enumerable){v(t,q)&&t[q][i]&&(t[q][i]=!1);a=P(a,{enumerable:w(0,!1)})}else{v(t,q)||ne(t,q,w(1,{}));t[q][i]=!0}return de(t,i,a)}return ne(t,i,a)},fe=function defineProperties(t,r){_(t);var a=g(r),i=k(a).concat($getOwnPropertySymbols(a));U(i,(function(r){d&&!l(pe,a,r)||he(t,r,a[r])}));return t},pe=function propertyIsEnumerable(t){var r=m(t),a=l(ie,this,r);return!(this===$&&v(se,r)&&!v(le,r))&&(!(a||!v(this,r)||!v(se,r)||v(this,q)&&this[q][r])||a)},ve=function getOwnPropertyDescriptor(t,r){var a=g(t),i=m(r);if(a!==$||!v(se,i)||v(le,i)){var o=re(a,i);!o||!v(se,i)||v(a,q)&&a[q][i]||(o.enumerable=!0);return o}},ye=function getOwnPropertyNames(t){var r=ae(g(t)),a=[];U(r,(function(t){v(se,t)||v(L,t)||oe(a,t)}));return a},$getOwnPropertySymbols=function(t){var r=t===$,a=ae(r?le:g(t)),i=[];U(a,(function(t){!v(se,t)||r&&!v($,t)||oe(i,se[t])}));return i};if(!h){M(Q=(J=function Symbol(){if(y(Q,this))throw new ee("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?b(arguments[0]):void 0,r=D(t),setter=function(t){var a=void 0===this?o:this;a===$&&l(setter,le,t);v(a,q)&&v(a[q],r)&&(a[q][r]=!1);var i=w(1,t);try{de(a,r,i)}catch(t){if(!(t instanceof Z))throw t;fallbackDefineProperty(a,r,i)}};d&&ue&&de($,r,{configurable:!0,set:setter});return wrap(r,t)})[K],"toString",(function toString(){return X(this).tag}));M(J,"withoutSetter",(function(t){return wrap(D(t),t)}));T.f=pe;I.f=he;C.f=fe;E.f=ve;A.f=S.f=ye;x.f=$getOwnPropertySymbols;W.f=function(t){return wrap(j(t),t)};if(d){O(Q,"description",{configurable:!0,get:function description(){return X(this).description}});u||M($,"propertyIsEnumerable",pe,{unsafe:!0})}}i({global:!0,constructor:!0,wrap:!0,forced:!h,sham:!h},{Symbol:J});U(k(ce),(function(t){N(t)}));i({target:V,stat:!0,forced:!h},{useSetter:function(){ue=!0},useSimple:function(){ue=!1}});i({target:"Object",stat:!0,forced:!h,sham:!d},{create:function create(t,r){return void 0===r?P(t):fe(P(t),r)},defineProperty:he,defineProperties:fe,getOwnPropertyDescriptor:ve});i({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:ye});B();z(J,V);L[q]=!0},6678:(t,r,a)=>{var i=a(4978),o=a(940),l=a(9298),c=a(8403),u=a(936),d=a(7316),h=a(2658),p=a(5730),v=a(9691),y=a(1425),_=l.Symbol,g=_&&_.prototype;if(o&&d(_)&&(!("description"in g)||void 0!==_().description)){var m={},b=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:p(arguments[0]),r=h(g,this)?new _(t):void 0===t?_():_(t);""===t&&(m[r]=!0);return r};y(b,_);b.prototype=g;g.constructor=b;var w="Symbol(description detection)"===String(_("description detection")),P=c(g.valueOf),k=c(g.toString),A=/^Symbol\((.*)\)[^)]+$/,S=c("".replace),x=c("".slice);v(g,"description",{configurable:!0,get:function description(){var t=P(this);if(u(m,t))return"";var r=k(t),a=w?x(r,7,-1):S(r,A,"$1");return""===a?void 0:a}});i({global:!0,constructor:!0,forced:!0},{Symbol:b})}},2389:(t,r,a)=>{var i=a(4978),o=a(7187),l=a(936),c=a(5730),u=a(6807),d=a(4186),h=u("string-to-symbol-registry"),p=u("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!d},{for:function(t){var r=c(t);if(l(h,r))return h[r];var a=o("Symbol")(r);h[r]=a;p[a]=r;return a}})},2926:(t,r,a)=>{a(7120)("iterator")},9366:(t,r,a)=>{a(1532);a(2389);a(5876);a(7254);a(8564)},5876:(t,r,a)=>{var i=a(4978),o=a(936),l=a(7814),c=a(9762),u=a(6807),d=a(4186),h=u("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!d},{keyFor:function keyFor(t){if(!l(t))throw new TypeError(c(t)+" is not a symbol");if(o(h,t))return h[t]}})},5598:(t,r,a)=>{var i=a(7120),o=a(5117);i("toPrimitive");o()},2173:(t,r,a)=>{var i=a(7187),o=a(7120),l=a(7536);o("toStringTag");l(i("Symbol"),"Symbol")},739:(t,r,a)=>{var i=a(5861),o=a(451),l=a(1003),c=i.aTypedArray;(0,i.exportTypedArrayMethod)("at",(function at(t){var r=c(this),a=o(r),i=l(t),u=i>=0?i:a+i;return u<0||u>=a?void 0:r[u]}))},4816:(t,r,a)=>{var i=a(8403),o=a(5861),l=i(a(1474)),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function copyWithin(t,r){return l(c(this),t,r,arguments.length>2?arguments[2]:void 0)}))},6923:(t,r,a)=>{var i=a(5861),o=a(2423).every,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("every",(function every(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},6775:(t,r,a)=>{var i=a(5861),o=a(8041),l=a(212),c=a(8329),u=a(2026),d=a(8403),h=a(8154),p=i.aTypedArray,v=i.exportTypedArrayMethod,y=d("".slice);v("fill",(function fill(t){var r=arguments.length;p(this);var a="Big"===y(c(this),0,3)?l(t):+t;return u(o,this,a,r>1?arguments[1]:void 0,r>2?arguments[2]:void 0)}),h((function(){var t=0;new Int8Array(2).fill({valueOf:function(){return t++}});return 1!==t})))},6474:(t,r,a)=>{var i=a(5861),o=a(2423).filter,l=a(5306),c=i.aTypedArray;(0,i.exportTypedArrayMethod)("filter",(function filter(t){var r=o(c(this),t,arguments.length>1?arguments[1]:void 0);return l(this,r)}))},1665:(t,r,a)=>{var i=a(5861),o=a(2423).findIndex,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("findIndex",(function findIndex(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},9803:(t,r,a)=>{var i=a(5861),o=a(4026).findLastIndex,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLastIndex",(function findLastIndex(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},8837:(t,r,a)=>{var i=a(5861),o=a(4026).findLast,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLast",(function findLast(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},6450:(t,r,a)=>{var i=a(5861),o=a(2423).find,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("find",(function find(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},1293:(t,r,a)=>{var i=a(5861),o=a(2423).forEach,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("forEach",(function forEach(t){o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},1051:(t,r,a)=>{var i=a(5861),o=a(9773).includes,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("includes",(function includes(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},8260:(t,r,a)=>{var i=a(5861),o=a(9773).indexOf,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("indexOf",(function indexOf(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},8800:(t,r,a)=>{a(9173)("Int32",(function(t){return function Int32Array(r,a,i){return t(this,r,a,i)}}))},5746:(t,r,a)=>{var i=a(9298),o=a(8154),l=a(8403),c=a(5861),u=a(6180),d=a(2292)("iterator"),h=i.Uint8Array,p=l(u.values),v=l(u.keys),y=l(u.entries),_=c.aTypedArray,g=c.exportTypedArrayMethod,m=h&&h.prototype,b=!o((function(){m[d].call([1])})),w=!!m&&m.values&&m[d]===m.values&&"values"===m.values.name,P=function values(){return p(_(this))};g("entries",(function entries(){return y(_(this))}),b);g("keys",(function keys(){return v(_(this))}),b);g("values",P,b||!w,{name:"values"});g(d,P,b||!w,{name:"values"})},202:(t,r,a)=>{var i=a(5861),o=a(8403),l=i.aTypedArray,c=i.exportTypedArrayMethod,u=o([].join);c("join",(function join(t){return u(l(this),t)}))},2138:(t,r,a)=>{var i=a(5861),o=a(7294),l=a(8671),c=i.aTypedArray;(0,i.exportTypedArrayMethod)("lastIndexOf",(function lastIndexOf(t){var r=arguments.length;return o(l,c(this),r>1?[t,arguments[1]]:[t])}))},368:(t,r,a)=>{var i=a(5861),o=a(2423).map,l=a(6239),c=i.aTypedArray;(0,i.exportTypedArrayMethod)("map",(function map(t){return o(c(this),t,arguments.length>1?arguments[1]:void 0,(function(t,r){return new(l(t))(r)}))}))},917:(t,r,a)=>{var i=a(5861),o=a(2741).right,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduceRight",(function reduceRight(t){var r=arguments.length;return o(l(this),t,r,r>1?arguments[1]:void 0)}))},9782:(t,r,a)=>{var i=a(5861),o=a(2741).left,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduce",(function reduce(t){var r=arguments.length;return o(l(this),t,r,r>1?arguments[1]:void 0)}))},3650:(t,r,a)=>{var i=a(5861),o=i.aTypedArray,l=i.exportTypedArrayMethod,c=Math.floor;l("reverse",(function reverse(){for(var t,r=this,a=o(r).length,i=c(a/2),l=0;l<i;){t=r[l];r[l++]=r[--a];r[a]=t}return r}))},8347:(t,r,a)=>{var i=a(9298),o=a(2026),l=a(5861),c=a(451),u=a(9892),d=a(2007),h=a(8154),p=i.RangeError,v=i.Int8Array,y=v&&v.prototype,_=y&&y.set,g=l.aTypedArray,m=l.exportTypedArrayMethod,b=!h((function(){var t=new Uint8ClampedArray(2);o(_,t,{length:1,0:3},1);return 3!==t[1]})),w=b&&l.NATIVE_ARRAY_BUFFER_VIEWS&&h((function(){var t=new v(2);t.set(1);t.set("2",1);return 0!==t[0]||2!==t[1]}));m("set",(function set(t){g(this);var r=u(arguments.length>1?arguments[1]:void 0,1),a=d(t);if(b)return o(_,this,a,r);var i=this.length,l=c(a),h=0;if(l+r>i)throw new p("Wrong length");for(;h<l;)this[r+h]=a[h++]}),!b||w)},7192:(t,r,a)=>{var i=a(5861),o=a(6239),l=a(8154),c=a(2251),u=i.aTypedArray;(0,i.exportTypedArrayMethod)("slice",(function slice(t,r){for(var a=c(u(this),t,r),i=o(this),l=0,d=a.length,h=new i(d);d>l;)h[l]=a[l++];return h}),l((function(){new Int8Array(1).slice()})))},354:(t,r,a)=>{var i=a(5861),o=a(2423).some,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("some",(function some(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},9080:(t,r,a)=>{var i=a(9298),o=a(6218),l=a(8154),c=a(1782),u=a(4689),d=a(5861),h=a(7614),p=a(7463),v=a(2171),y=a(7906),_=d.aTypedArray,g=d.exportTypedArrayMethod,m=i.Uint16Array,b=m&&o(m.prototype.sort),w=!(!b||l((function(){b(new m(2),null)}))&&l((function(){b(new m(2),{})}))),P=!!b&&!l((function(){if(v)return v<74;if(h)return h<67;if(p)return!0;if(y)return y<602;var t,r,a=new m(516),i=Array(516);for(t=0;t<516;t++){r=t%4;a[t]=515-t;i[t]=t-2*r+3}b(a,(function(t,r){return(t/4|0)-(r/4|0)}));for(t=0;t<516;t++)if(a[t]!==i[t])return!0}));g("sort",(function sort(t){void 0!==t&&c(t);return P?b(this,t):u(_(this),function(t){return function(r,a){return void 0!==t?+t(r,a)||0:a!=a?-1:r!=r?1:0===r&&0===a?1/r>0&&1/a<0?1:-1:r>a}}(t))}),!P||w)},7238:(t,r,a)=>{var i=a(9298),o=a(7294),l=a(5861),c=a(8154),u=a(2251),d=i.Int8Array,h=l.aTypedArray,p=l.exportTypedArrayMethod,v=[].toLocaleString,y=!!d&&c((function(){v.call(new d(1))}));p("toLocaleString",(function toLocaleString(){return o(v,y?u(h(this)):h(this),u(arguments))}),c((function(){return[1,2].toLocaleString()!==new d([1,2]).toLocaleString()}))||!c((function(){d.prototype.toLocaleString.call([1,2])})))},7995:(t,r,a)=>{var i=a(2304),o=a(5861),l=o.aTypedArray,c=o.exportTypedArrayMethod,u=o.getTypedArrayConstructor;c("toReversed",(function toReversed(){return i(l(this),u(this))}))},62:(t,r,a)=>{var i=a(5861),o=a(8403),l=a(1782),c=a(7003),u=i.aTypedArray,d=i.getTypedArrayConstructor,h=i.exportTypedArrayMethod,p=o(i.TypedArrayPrototype.sort);h("toSorted",(function toSorted(t){void 0!==t&&l(t);var r=u(this),a=c(d(r),r);return p(a,t)}))},6635:(t,r,a)=>{var i=a(5861).exportTypedArrayMethod,o=a(8154),l=a(9298),c=a(8403),u=l.Uint8Array,d=u&&u.prototype||{},h=[].toString,p=c([].join);o((function(){h.call({})}))&&(h=function toString(){return p(this)});var v=d.toString!==h;i("toString",h,v)},4624:(t,r,a)=>{a(9173)("Uint32",(function(t){return function Uint32Array(r,a,i){return t(this,r,a,i)}}))},4699:(t,r,a)=>{a(9173)("Uint8",(function(t){return function Uint8Array(r,a,i){return t(this,r,a,i)}}))},4602:(t,r,a)=>{var i=a(5886),o=a(5861),l=a(5986),c=a(1003),u=a(212),d=o.aTypedArray,h=o.getTypedArrayConstructor,p=o.exportTypedArrayMethod,v=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();p("with",{with:function(t,r){var a=d(this),o=c(t),p=l(a)?u(r):+r;return i(a,h(a),o,p)}}.with,!v)},4507:(t,r,a)=>{var i,o=a(7010),l=a(9298),c=a(8403),u=a(6880),d=a(4694),h=a(4981),p=a(9609),v=a(7633),y=a(1649).enforce,_=a(8154),g=a(8443),m=Object,b=Array.isArray,w=m.isExtensible,P=m.isFrozen,k=m.isSealed,A=m.freeze,S=m.seal,x={},E={},I=!l.ActiveXObject&&"ActiveXObject"in l,wrapper=function(t){return function WeakMap(){return t(this,arguments.length?arguments[0]:void 0)}},C=h("WeakMap",wrapper,p),T=C.prototype,M=c(T.set);if(g)if(I){i=p.getConstructor(wrapper,"WeakMap",!0);d.enable();var O=c(T.delete),G=c(T.has),R=c(T.get);u(T,{delete:function(t){if(v(t)&&!w(t)){var r=y(this);r.frozen||(r.frozen=new i);return O(this,t)||r.frozen.delete(t)}return O(this,t)},has:function has(t){if(v(t)&&!w(t)){var r=y(this);r.frozen||(r.frozen=new i);return G(this,t)||r.frozen.has(t)}return G(this,t)},get:function get(t){if(v(t)&&!w(t)){var r=y(this);r.frozen||(r.frozen=new i);return G(this,t)?R(this,t):r.frozen.get(t)}return R(this,t)},set:function set(t,r){if(v(t)&&!w(t)){var a=y(this);a.frozen||(a.frozen=new i);G(this,t)?M(this,t,r):a.frozen.set(t,r)}else M(this,t,r);return this}})}else o&&_((function(){var t=A([]);M(new C,t,1);return!P(t)}))&&u(T,{set:function set(t,r){var a;b(t)&&(P(t)?a=x:k(t)&&(a=E));M(this,t,r);a===x&&A(t);a===E&&S(t);return this}})},7484:(t,r,a)=>{a(4507)},5804:(t,r,a)=>{a(4981)("WeakSet",(function(t){return function WeakSet(){return t(this,arguments.length?arguments[0]:void 0)}}),a(9609))},394:(t,r,a)=>{a(5804)},344:(t,r,a)=>{var i=a(940),o=a(9691),l=a(582),c=ArrayBuffer.prototype;i&&!("detached"in c)&&o(c,"detached",{configurable:!0,get:function detached(){return l(this)}})},7583:(t,r,a)=>{var i=a(4978),o=a(4358);o&&i({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function transferToFixedLength(){return o(this,arguments.length?arguments[0]:void 0,!1)}})},4305:(t,r,a)=>{var i=a(4978),o=a(4358);o&&i({target:"ArrayBuffer",proto:!0},{transfer:function transfer(){return o(this,arguments.length?arguments[0]:void 0,!0)}})},7121:(t,r,a)=>{var i=a(4978),o=a(9298),l=a(5834),c=a(4719),u=a(7316),d=a(2176),h=a(9691),p=a(8947),v=a(8154),y=a(936),_=a(2292),g=a(5238).IteratorPrototype,m=a(940),b=a(2554),w="constructor",P="Iterator",k=_("toStringTag"),A=TypeError,S=o[P],x=b||!u(S)||S.prototype!==g||!v((function(){S({})})),E=function Iterator(){l(this,g);if(d(this)===g)throw new A("Abstract class Iterator not directly constructable")},defineIteratorPrototypeAccessor=function(t,r){m?h(g,t,{configurable:!0,get:function(){return r},set:function(r){c(this);if(this===g)throw new A("You can't redefine this property");y(this,t)?this[t]=r:p(this,t,r)}}):g[t]=r};y(g,k)||defineIteratorPrototypeAccessor(k,P);!x&&y(g,w)&&g[w]!==Object||defineIteratorPrototypeAccessor(w,E);E.prototype=g;i({global:!0,constructor:!0,forced:x},{Iterator:E})},385:(t,r,a)=>{var i=a(4978),o=a(6837),l=a(1782),c=a(4719),u=a(9235);i({target:"Iterator",proto:!0,real:!0},{every:function every(t){c(this);l(t);var r=u(this),a=0;return!o(r,(function(r,i){if(!t(r,a++))return i()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},2993:(t,r,a)=>{var i=a(4978),o=a(2026),l=a(1782),c=a(4719),u=a(9235),d=a(375),h=a(5723),p=a(2554),v=d((function(){for(var t,r,a=this.iterator,i=this.predicate,l=this.next;;){t=c(o(l,a));if(this.done=!!t.done)return;r=t.value;if(h(a,i,[r,this.counter++],!0))return r}}));i({target:"Iterator",proto:!0,real:!0,forced:p},{filter:function filter(t){c(this);l(t);return new v(u(this),{predicate:t})}})},8497:(t,r,a)=>{var i=a(4978),o=a(2026),l=a(1782),c=a(4719),u=a(9235),d=a(9115),h=a(375),p=a(3316),v=a(2554),y=h((function(){for(var t,r,a=this.iterator,i=this.mapper;;){if(r=this.inner)try{if(!(t=c(o(r.next,r.iterator))).done)return t.value;this.inner=null}catch(t){p(a,"throw",t)}t=c(o(this.next,a));if(this.done=!!t.done)return;try{this.inner=d(i(t.value,this.counter++),!1)}catch(t){p(a,"throw",t)}}}));i({target:"Iterator",proto:!0,real:!0,forced:v},{flatMap:function flatMap(t){c(this);l(t);return new y(u(this),{mapper:t,inner:null})}})},6770:(t,r,a)=>{var i=a(4978),o=a(6837),l=a(1782),c=a(4719),u=a(9235);i({target:"Iterator",proto:!0,real:!0},{forEach:function forEach(t){c(this);l(t);var r=u(this),a=0;o(r,(function(r){t(r,a++)}),{IS_RECORD:!0})}})},7944:(t,r,a)=>{var i=a(4978),o=a(8142);i({target:"Iterator",proto:!0,real:!0,forced:a(2554)},{map:o})},8518:(t,r,a)=>{var i=a(4978),o=a(6837),l=a(1782),c=a(4719),u=a(9235);i({target:"Iterator",proto:!0,real:!0},{some:function some(t){c(this);l(t);var r=u(this),a=0;return o(r,(function(r,i){if(t(r,a++))return i()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},2808:(t,r,a)=>{var i=a(4978),o=a(940),l=a(9298),c=a(7187),u=a(8403),d=a(2026),h=a(7316),p=a(7633),v=a(6998),y=a(936),_=a(5730),g=a(451),m=a(8947),b=a(8154),w=a(3713),P=a(3663),k=l.JSON,A=l.Number,S=l.SyntaxError,x=k&&k.parse,E=c("Object","keys"),I=Object.getOwnPropertyDescriptor,C=u("".charAt),T=u("".slice),M=u(/./.exec),O=u([].push),G=/^\d$/,R=/^[1-9]$/,L=/^(?:-|\d)$/,D=/^[\t\n\r ]$/,internalize=function(t,r,a,i){var o,l,c,u,h,_=t[r],m=i&&_===i.value,b=m&&"string"==typeof i.source?{source:i.source}:{};if(p(_)){var w=v(_),P=m?i.nodes:w?[]:{};if(w){o=P.length;c=g(_);for(u=0;u<c;u++)internalizeProperty(_,u,internalize(_,""+u,a,u<o?P[u]:void 0))}else{l=E(_);c=g(l);for(u=0;u<c;u++){h=l[u];internalizeProperty(_,h,internalize(_,h,a,y(P,h)?P[h]:void 0))}}}return d(a,t,r,_,b)},internalizeProperty=function(t,r,a){if(o){var i=I(t,r);if(i&&!i.configurable)return}void 0===a?delete t[r]:m(t,r,a)},Node=function(t,r,a,i){this.value=t;this.end=r;this.source=a;this.nodes=i},Context=function(t,r){this.source=t;this.index=r};Context.prototype={fork:function(t){return new Context(this.source,t)},parse:function(){var t=this.source,r=this.skip(D,this.index),a=this.fork(r),i=C(t,r);if(M(L,i))return a.number();switch(i){case"{":return a.object();case"[":return a.array();case'"':return a.string();case"t":return a.keyword(!0);case"f":return a.keyword(!1);case"n":return a.keyword(null)}throw new S('Unexpected character: "'+i+'" at: '+r)},node:function(t,r,a,i,o){return new Node(r,i,t?null:T(this.source,a,i),o)},object:function(){for(var t=this.source,r=this.index+1,a=!1,i={},o={};r<t.length;){r=this.until(['"',"}"],r);if("}"===C(t,r)&&!a){r++;break}var l=this.fork(r).string(),c=l.value;r=l.end;r=this.until([":"],r)+1;r=this.skip(D,r);l=this.fork(r).parse();m(o,c,l);m(i,c,l.value);r=this.until([",","}"],l.end);var u=C(t,r);if(","===u){a=!0;r++}else if("}"===u){r++;break}}return this.node(1,i,this.index,r,o)},array:function(){for(var t=this.source,r=this.index+1,a=!1,i=[],o=[];r<t.length;){r=this.skip(D,r);if("]"===C(t,r)&&!a){r++;break}var l=this.fork(r).parse();O(o,l);O(i,l.value);r=this.until([",","]"],l.end);if(","===C(t,r)){a=!0;r++}else if("]"===C(t,r)){r++;break}}return this.node(1,i,this.index,r,o)},string:function(){var t=this.index,r=w(this.source,this.index+1);return this.node(0,r.value,t,r.end)},number:function(){var t=this.source,r=this.index,a=r;"-"===C(t,a)&&a++;if("0"===C(t,a))a++;else{if(!M(R,C(t,a)))throw new S("Failed to parse number at: "+a);a=this.skip(G,++a)}"."===C(t,a)&&(a=this.skip(G,++a));if("e"===C(t,a)||"E"===C(t,a)){a++;"+"!==C(t,a)&&"-"!==C(t,a)||a++;if(a===(a=this.skip(G,a)))throw new S("Failed to parse number's exponent value at: "+a)}return this.node(0,A(T(t,r,a)),r,a)},keyword:function(t){var r=""+t,a=this.index,i=a+r.length;if(T(this.source,a,i)!==r)throw new S("Failed to parse value at: "+a);return this.node(0,t,a,i)},skip:function(t,r){for(var a=this.source;r<a.length&&M(t,C(a,r));r++);return r},until:function(t,r){r=this.skip(D,r);for(var a=C(this.source,r),i=0;i<t.length;i++)if(t[i]===a)return r;throw new S('Unexpected character: "'+a+'" at: '+r)}};var j=b((function(){var t,r="9007199254740993";x(r,(function(r,a,i){t=i.source}));return t!==r})),W=P&&!b((function(){return 1/x("-0 \t")!=-1/0}));i({target:"JSON",stat:!0,forced:j},{parse:function parse(t,r){return W&&!h(r)?x(t):function(t,r){t=_(t);var a=new Context(t,0,""),i=a.parse(),o=i.value,l=a.skip(D,i.end);if(l<t.length)throw new S('Unexpected extra character: "'+C(t,l)+'" after the parsed data at: '+l);return h(r)?internalize({"":o},"",r,i):o}(t,r)}})},5561:(t,r,a)=>{var i=a(4978),o=a(5656);i({target:"Set",proto:!0,real:!0,forced:!a(507)("difference")},{difference:o})},8587:(t,r,a)=>{var i=a(4978),o=a(8154),l=a(8461);i({target:"Set",proto:!0,real:!0,forced:!a(507)("intersection")||o((function(){return"3,2"!==Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:l})},3247:(t,r,a)=>{var i=a(4978),o=a(8550);i({target:"Set",proto:!0,real:!0,forced:!a(507)("isDisjointFrom")},{isDisjointFrom:o})},3302:(t,r,a)=>{var i=a(4978),o=a(990);i({target:"Set",proto:!0,real:!0,forced:!a(507)("isSubsetOf")},{isSubsetOf:o})},9490:(t,r,a)=>{var i=a(4978),o=a(194);i({target:"Set",proto:!0,real:!0,forced:!a(507)("isSupersetOf")},{isSupersetOf:o})},5438:(t,r,a)=>{var i=a(4978),o=a(3194);i({target:"Set",proto:!0,real:!0,forced:!a(507)("symmetricDifference")},{symmetricDifference:o})},7914:(t,r,a)=>{var i=a(4978),o=a(5703);i({target:"Set",proto:!0,real:!0,forced:!a(507)("union")},{union:o})},1378:(t,r,a)=>{var i=a(9298),o=a(2411),l=a(3942),c=a(8208),u=a(9293),handlePrototype=function(t){if(t&&t.forEach!==c)try{u(t,"forEach",c)}catch(r){t.forEach=c}};for(var d in o)o[d]&&handlePrototype(i[d]&&i[d].prototype);handlePrototype(l)},2374:(t,r,a)=>{var i=a(9298),o=a(2411),l=a(3942),c=a(6180),u=a(9293),d=a(7536),h=a(2292)("iterator"),p=c.values,handlePrototype=function(t,r){if(t){if(t[h]!==p)try{u(t,h,p)}catch(r){t[h]=p}d(t,r,!0);if(o[r])for(var a in c)if(t[a]!==c[a])try{u(t,a,c[a])}catch(r){t[a]=c[a]}}};for(var v in o)handlePrototype(i[v]&&i[v].prototype,v);handlePrototype(l,"DOMTokenList")},2822:(t,r,a)=>{var i=a(4978),o=a(2276),l=a(7187),c=a(8154),u=a(6941),d=a(1198),h=a(7744).f,p=a(7041),v=a(9691),y=a(936),_=a(5834),g=a(4719),m=a(3522),b=a(1264),w=a(8560),P=a(34),k=a(1649),A=a(940),S=a(2554),x="DOMException",E="DATA_CLONE_ERR",I=l("Error"),C=l(x)||function(){try{(new(l("MessageChannel")||o("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name===E&&25===t.code)return t.constructor}}(),T=C&&C.prototype,M=I.prototype,O=k.set,G=k.getterFor(x),R="stack"in new I(x),codeFor=function(t){return y(w,t)&&w[t].m?w[t].c:0},L=function DOMException(){_(this,D);var t=arguments.length,r=b(t<1?void 0:arguments[0]),a=b(t<2?void 0:arguments[1],"Error"),i=codeFor(a);O(this,{type:x,name:a,message:r,code:i});if(!A){this.name=a;this.message=r;this.code=i}if(R){var o=new I(r);o.name=x;h(this,"stack",d(1,P(o.stack,1)))}},D=L.prototype=u(M),createGetterDescriptor=function(t){return{enumerable:!0,configurable:!0,get:t}},getterFor=function(t){return createGetterDescriptor((function(){return G(this)[t]}))};if(A){v(D,"code",getterFor("code"));v(D,"message",getterFor("message"));v(D,"name",getterFor("name"))}h(D,"constructor",d(1,L));var j=c((function(){return!(new C instanceof I)})),W=j||c((function(){return M.toString!==m||"2: 1"!==String(new C(1,2))})),N=j||c((function(){return 25!==new C(1,"DataCloneError").code})),B=j||25!==C[E]||25!==T[E],z=S?W||N||B:j;i({global:!0,constructor:!0,forced:z},{DOMException:z?L:C});var H=l(x),U=H.prototype;W&&(S||C===H)&&p(U,"toString",m);N&&A&&C===H&&v(U,"code",createGetterDescriptor((function(){return codeFor(g(this).name)})));for(var q in w)if(y(w,q)){var V=w[q],K=V.s,Y=d(6,V.c);y(H,K)||h(H,K,Y);y(U,K)||h(U,K,Y)}},9709:(t,r,a)=>{var i=a(4978),o=a(9298),l=a(7187),c=a(1198),u=a(7744).f,d=a(936),h=a(5834),p=a(7523),v=a(1264),y=a(8560),_=a(34),g=a(940),m=a(2554),b="DOMException",w=l("Error"),P=l(b),k=function DOMException(){h(this,A);var t=arguments.length,r=v(t<1?void 0:arguments[0]),a=v(t<2?void 0:arguments[1],"Error"),i=new P(r,a),o=new w(r);o.name=b;u(i,"stack",c(1,_(o.stack,1)));p(i,this,k);return i},A=k.prototype=P.prototype,S="stack"in new w(b),x="stack"in new P(1,2),E=P&&g&&Object.getOwnPropertyDescriptor(o,b),I=!(!E||E.writable&&E.configurable),C=S&&!I&&!x;i({global:!0,constructor:!0,forced:m||C},{DOMException:C?k:P});var T=l(b),M=T.prototype;if(M.constructor!==T){m||u(M,"constructor",c(1,T));for(var O in y)if(d(y,O)){var G=y[O],R=G.s;d(T,R)||u(T,R,c(6,G.c))}}},2642:(t,r,a)=>{var i=a(7187),o="DOMException";a(7536)(i(o),o)},5057:(t,r,a)=>{var i=a(4978),o=a(9298),l=a(9691),c=a(940),u=TypeError,d=Object.defineProperty,h=o.self!==o;try{if(c){var p=Object.getOwnPropertyDescriptor(o,"self");!h&&p&&p.get&&p.enumerable||l(o,"self",{get:function self(){return o},set:function self(t){if(this!==o)throw new u("Illegal invocation");d(o,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else i({global:!0,simple:!0,forced:h},{self:o})}catch(t){}},1872:(t,r,a)=>{a(6180);var i=a(4978),o=a(9298),l=a(2026),c=a(8403),u=a(940),d=a(8815),h=a(7041),p=a(9691),v=a(6880),y=a(7536),_=a(552),g=a(1649),m=a(5834),b=a(7316),w=a(936),P=a(7789),k=a(8329),A=a(4719),S=a(7633),x=a(5730),E=a(6941),I=a(1198),C=a(7612),T=a(273),M=a(1111),O=a(2743),G=a(2292),R=a(4689),L=G("iterator"),D="URLSearchParams",j=D+"Iterator",W=g.set,N=g.getterFor(D),B=g.getterFor(j),z=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(t){if(!u)return o[t];var r=z(o,t);return r&&r.value},H=safeGetBuiltIn("fetch"),U=safeGetBuiltIn("Request"),q=safeGetBuiltIn("Headers"),V=U&&U.prototype,K=q&&q.prototype,Y=o.RegExp,X=o.TypeError,$=o.decodeURIComponent,J=o.encodeURIComponent,Q=c("".charAt),Z=c([].join),ee=c([].push),te=c("".replace),re=c([].shift),ne=c([].splice),ae=c("".split),ie=c("".slice),oe=/\+/g,se=Array(4),percentSequence=function(t){return se[t-1]||(se[t-1]=Y("((?:%[\\da-f]{2}){"+t+"})","gi"))},percentDecode=function(t){try{return $(t)}catch(r){return t}},deserialize=function(t){var r=te(t,oe," "),a=4;try{return $(r)}catch(t){for(;a;)r=te(r,percentSequence(a--),percentDecode);return r}},le=/[!'()~]|%20/g,ce={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return ce[t]},serialize=function(t){return te(J(t),le,replacer)},ue=_((function Iterator(t,r){W(this,{type:j,target:N(t).entries,index:0,kind:r})}),D,(function next(){var t=B(this),r=t.target,a=t.index++;if(!r||a>=r.length){t.target=void 0;return M(void 0,!0)}var i=r[a];switch(t.kind){case"keys":return M(i.key,!1);case"values":return M(i.value,!1)}return M([i.key,i.value],!1)}),!0),URLSearchParamsState=function(t){this.entries=[];this.url=null;void 0!==t&&(S(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===Q(t,0)?ie(t,1):t:x(t)))};URLSearchParamsState.prototype={type:D,bindURL:function(t){this.url=t;this.update()},parseObject:function(t){var r,a,i,o,c,u,d,h=this.entries,p=T(t);if(p){a=(r=C(t,p)).next;for(;!(i=l(a,r)).done;){c=(o=C(A(i.value))).next;if((u=l(c,o)).done||(d=l(c,o)).done||!l(c,o).done)throw new X("Expected sequence with length 2");ee(h,{key:x(u.value),value:x(d.value)})}}else for(var v in t)w(t,v)&&ee(h,{key:v,value:x(t[v])})},parseQuery:function(t){if(t)for(var r,a,i=this.entries,o=ae(t,"&"),l=0;l<o.length;)if((r=o[l++]).length){a=ae(r,"=");ee(i,{key:deserialize(re(a)),value:deserialize(Z(a,"="))})}},serialize:function(){for(var t,r=this.entries,a=[],i=0;i<r.length;){t=r[i++];ee(a,serialize(t.key)+"="+serialize(t.value))}return Z(a,"&")},update:function(){this.entries.length=0;this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var de=function URLSearchParams(){m(this,he);var t=W(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0));u||(this.size=t.entries.length)},he=de.prototype;v(he,{append:function append(t,r){var a=N(this);O(arguments.length,2);ee(a.entries,{key:x(t),value:x(r)});u||this.length++;a.updateURL()},delete:function(t){for(var r=N(this),a=O(arguments.length,1),i=r.entries,o=x(t),l=a<2?void 0:arguments[1],c=void 0===l?l:x(l),d=0;d<i.length;){var h=i[d];if(h.key!==o||void 0!==c&&h.value!==c)d++;else{ne(i,d,1);if(void 0!==c)break}}u||(this.size=i.length);r.updateURL()},get:function get(t){var r=N(this).entries;O(arguments.length,1);for(var a=x(t),i=0;i<r.length;i++)if(r[i].key===a)return r[i].value;return null},getAll:function getAll(t){var r=N(this).entries;O(arguments.length,1);for(var a=x(t),i=[],o=0;o<r.length;o++)r[o].key===a&&ee(i,r[o].value);return i},has:function has(t){for(var r=N(this).entries,a=O(arguments.length,1),i=x(t),o=a<2?void 0:arguments[1],l=void 0===o?o:x(o),c=0;c<r.length;){var u=r[c++];if(u.key===i&&(void 0===l||u.value===l))return!0}return!1},set:function set(t,r){var a=N(this);O(arguments.length,1);for(var i,o=a.entries,l=!1,c=x(t),d=x(r),h=0;h<o.length;h++)if((i=o[h]).key===c)if(l)ne(o,h--,1);else{l=!0;i.value=d}l||ee(o,{key:c,value:d});u||(this.size=o.length);a.updateURL()},sort:function sort(){var t=N(this);R(t.entries,(function(t,r){return t.key>r.key?1:-1}));t.updateURL()},forEach:function forEach(t){for(var r,a=N(this).entries,i=P(t,arguments.length>1?arguments[1]:void 0),o=0;o<a.length;)i((r=a[o++]).value,r.key,this)},keys:function keys(){return new ue(this,"keys")},values:function values(){return new ue(this,"values")},entries:function entries(){return new ue(this,"entries")}},{enumerable:!0});h(he,L,he.entries,{name:"entries"});h(he,"toString",(function toString(){return N(this).serialize()}),{enumerable:!0});u&&p(he,"size",{get:function size(){return N(this).entries.length},configurable:!0,enumerable:!0});y(de,D);i({global:!0,constructor:!0,forced:!d},{URLSearchParams:de});if(!d&&b(q)){var fe=c(K.has),pe=c(K.set),wrapRequestOptions=function(t){if(S(t)){var r,a=t.body;if(k(a)===D){r=t.headers?new q(t.headers):new q;fe(r,"content-type")||pe(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8");return E(t,{body:I(0,x(a)),headers:I(0,r)})}}return t};b(H)&&i({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function fetch(t){return H(t,arguments.length>1?wrapRequestOptions(arguments[1]):{})}});if(b(U)){var ve=function Request(t){m(this,V);return new U(t,arguments.length>1?wrapRequestOptions(arguments[1]):{})};V.constructor=ve;ve.prototype=V;i({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ve})}}t.exports={URLSearchParams:de,getState:N}},3655:(t,r,a)=>{var i=a(7041),o=a(8403),l=a(5730),c=a(2743),u=URLSearchParams,d=u.prototype,h=o(d.append),p=o(d.delete),v=o(d.forEach),y=o([].push),_=new u("a=1&a=2&b=3");_.delete("a",1);_.delete("b",void 0);_+""!="a=2"&&i(d,"delete",(function(t){var r=arguments.length,a=r<2?void 0:arguments[1];if(r&&void 0===a)return p(this,t);var i=[];v(this,(function(t,r){y(i,{key:r,value:t})}));c(r,1);for(var o,u=l(t),d=l(a),_=0,g=0,m=!1,b=i.length;_<b;){o=i[_++];if(m||o.key===u){m=!0;p(this,o.key)}else g++}for(;g<b;)(o=i[g++]).key===u&&o.value===d||h(this,o.key,o.value)}),{enumerable:!0,unsafe:!0})},2555:(t,r,a)=>{var i=a(7041),o=a(8403),l=a(5730),c=a(2743),u=URLSearchParams,d=u.prototype,h=o(d.getAll),p=o(d.has),v=new u("a=1");!v.has("a",2)&&v.has("a",void 0)||i(d,"has",(function has(t){var r=arguments.length,a=r<2?void 0:arguments[1];if(r&&void 0===a)return p(this,t);var i=h(this,t);c(r,1);for(var o=l(a),u=0;u<i.length;)if(i[u++]===o)return!0;return!1}),{enumerable:!0,unsafe:!0})},3757:(t,r,a)=>{a(1872)},2202:(t,r,a)=>{var i=a(940),o=a(8403),l=a(9691),c=URLSearchParams.prototype,u=o(c.forEach);i&&!("size"in c)&&l(c,"size",{get:function size(){var t=0;u(this,(function(){t++}));return t},configurable:!0,enumerable:!0})},9258:(t,r,a)=>{a(1747);var i,o=a(4978),l=a(940),c=a(8815),u=a(9298),d=a(7789),h=a(8403),p=a(7041),v=a(9691),y=a(5834),_=a(936),g=a(453),m=a(7609),b=a(6071),w=a(6819).codeAt,P=a(2897),k=a(5730),A=a(7536),S=a(2743),x=a(1872),E=a(1649),I=E.set,C=E.getterFor("URL"),T=x.URLSearchParams,M=x.getState,O=u.URL,G=u.TypeError,R=u.parseInt,L=Math.floor,D=Math.pow,j=h("".charAt),W=h(/./.exec),N=h([].join),B=h(1..toString),z=h([].pop),H=h([].push),U=h("".replace),q=h([].shift),V=h("".split),K=h("".slice),Y=h("".toLowerCase),X=h([].unshift),$="Invalid scheme",J="Invalid host",Q="Invalid port",Z=/[a-z]/i,ee=/[\d+-.a-z]/i,te=/\d/,re=/^0x/i,ne=/^[0-7]+$/,ae=/^\d+$/,ie=/^[\da-f]+$/i,oe=/[\0\t\n\r #%/:<>?@[\\\]^|]/,se=/[\0\t\n\r #/:<>?@[\\\]^|]/,le=/^[\u0000-\u0020]+/,ce=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ue=/[\t\n\r]/g,serializeHost=function(t){var r,a,i,o;if("number"==typeof t){r=[];for(a=0;a<4;a++){X(r,t%256);t=L(t/256)}return N(r,".")}if("object"==typeof t){r="";i=function(t){for(var r=null,a=1,i=null,o=0,l=0;l<8;l++)if(0!==t[l]){if(o>a){r=i;a=o}i=null;o=0}else{null===i&&(i=l);++o}if(o>a){r=i;a=o}return r}(t);for(a=0;a<8;a++)if(!o||0!==t[a]){o&&(o=!1);if(i===a){r+=a?":":"::";o=!0}else{r+=B(t[a],16);a<7&&(r+=":")}}return"["+r+"]"}return t},de={},he=g({},de,{" ":1,'"':1,"<":1,">":1,"`":1}),fe=g({},he,{"#":1,"?":1,"{":1,"}":1}),pe=g({},fe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,r){var a=w(t,0);return a>32&&a<127&&!_(r,t)?t:encodeURIComponent(t)},ve={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(t,r){var a;return 2===t.length&&W(Z,j(t,0))&&(":"===(a=j(t,1))||!r&&"|"===a)},startsWithWindowsDriveLetter=function(t){var r;return t.length>1&&isWindowsDriveLetter(K(t,0,2))&&(2===t.length||"/"===(r=j(t,2))||"\\"===r||"?"===r||"#"===r)},isSingleDot=function(t){return"."===t||"%2e"===Y(t)},ye={},_e={},ge={},me={},be={},we={},Pe={},ke={},Ae={},Se={},xe={},Fe={},Ee={},Ie={},Ce={},Te={},Me={},Oe={},Ge={},Re={},Le={},URLState=function(t,r,a){var i,o,l,c=k(t);if(r){if(o=this.parse(c))throw new G(o);this.searchParams=null}else{void 0!==a&&(i=new URLState(a,!0));if(o=this.parse(c,null,i))throw new G(o);(l=M(new T)).bindURL(this);this.searchParams=l}};URLState.prototype={type:"URL",parse:function(t,r,a){var o,l,c,u,d,h=this,p=r||ye,v=0,y="",g=!1,w=!1,P=!1;t=k(t);if(!r){h.scheme="";h.username="";h.password="";h.host=null;h.port=null;h.path=[];h.query=null;h.fragment=null;h.cannotBeABaseURL=!1;t=U(t,le,"");t=U(t,ce,"$1")}t=U(t,ue,"");o=m(t);for(;v<=o.length;){l=o[v];switch(p){case ye:if(!l||!W(Z,l)){if(r)return $;p=ge;continue}y+=Y(l);p=_e;break;case _e:if(l&&(W(ee,l)||"+"===l||"-"===l||"."===l))y+=Y(l);else{if(":"!==l){if(r)return $;y="";p=ge;v=0;continue}if(r&&(h.isSpecial()!==_(ve,y)||"file"===y&&(h.includesCredentials()||null!==h.port)||"file"===h.scheme&&!h.host))return;h.scheme=y;if(r){h.isSpecial()&&ve[h.scheme]===h.port&&(h.port=null);return}y="";if("file"===h.scheme)p=Ie;else if(h.isSpecial()&&a&&a.scheme===h.scheme)p=me;else if(h.isSpecial())p=ke;else if("/"===o[v+1]){p=be;v++}else{h.cannotBeABaseURL=!0;H(h.path,"");p=Ge}}break;case ge:if(!a||a.cannotBeABaseURL&&"#"!==l)return $;if(a.cannotBeABaseURL&&"#"===l){h.scheme=a.scheme;h.path=b(a.path);h.query=a.query;h.fragment="";h.cannotBeABaseURL=!0;p=Le;break}p="file"===a.scheme?Ie:we;continue;case me:if("/"!==l||"/"!==o[v+1]){p=we;continue}p=Ae;v++;break;case be:if("/"===l){p=Se;break}p=Oe;continue;case we:h.scheme=a.scheme;if(l===i){h.username=a.username;h.password=a.password;h.host=a.host;h.port=a.port;h.path=b(a.path);h.query=a.query}else if("/"===l||"\\"===l&&h.isSpecial())p=Pe;else if("?"===l){h.username=a.username;h.password=a.password;h.host=a.host;h.port=a.port;h.path=b(a.path);h.query="";p=Re}else{if("#"!==l){h.username=a.username;h.password=a.password;h.host=a.host;h.port=a.port;h.path=b(a.path);h.path.length--;p=Oe;continue}h.username=a.username;h.password=a.password;h.host=a.host;h.port=a.port;h.path=b(a.path);h.query=a.query;h.fragment="";p=Le}break;case Pe:if(!h.isSpecial()||"/"!==l&&"\\"!==l){if("/"!==l){h.username=a.username;h.password=a.password;h.host=a.host;h.port=a.port;p=Oe;continue}p=Se}else p=Ae;break;case ke:p=Ae;if("/"!==l||"/"!==j(y,v+1))continue;v++;break;case Ae:if("/"!==l&&"\\"!==l){p=Se;continue}break;case Se:if("@"===l){g&&(y="%40"+y);g=!0;c=m(y);for(var A=0;A<c.length;A++){var S=c[A];if(":"!==S||P){var x=percentEncode(S,pe);P?h.password+=x:h.username+=x}else P=!0}y=""}else if(l===i||"/"===l||"?"===l||"#"===l||"\\"===l&&h.isSpecial()){if(g&&""===y)return"Invalid authority";v-=m(y).length+1;y="";p=xe}else y+=l;break;case xe:case Fe:if(r&&"file"===h.scheme){p=Te;continue}if(":"!==l||w){if(l===i||"/"===l||"?"===l||"#"===l||"\\"===l&&h.isSpecial()){if(h.isSpecial()&&""===y)return J;if(r&&""===y&&(h.includesCredentials()||null!==h.port))return;if(u=h.parseHost(y))return u;y="";p=Me;if(r)return;continue}"["===l?w=!0:"]"===l&&(w=!1);y+=l}else{if(""===y)return J;if(u=h.parseHost(y))return u;y="";p=Ee;if(r===Fe)return}break;case Ee:if(!W(te,l)){if(l===i||"/"===l||"?"===l||"#"===l||"\\"===l&&h.isSpecial()||r){if(""!==y){var E=R(y,10);if(E>65535)return Q;h.port=h.isSpecial()&&E===ve[h.scheme]?null:E;y=""}if(r)return;p=Me;continue}return Q}y+=l;break;case Ie:h.scheme="file";if("/"===l||"\\"===l)p=Ce;else{if(!a||"file"!==a.scheme){p=Oe;continue}switch(l){case i:h.host=a.host;h.path=b(a.path);h.query=a.query;break;case"?":h.host=a.host;h.path=b(a.path);h.query="";p=Re;break;case"#":h.host=a.host;h.path=b(a.path);h.query=a.query;h.fragment="";p=Le;break;default:if(!startsWithWindowsDriveLetter(N(b(o,v),""))){h.host=a.host;h.path=b(a.path);h.shortenPath()}p=Oe;continue}}break;case Ce:if("/"===l||"\\"===l){p=Te;break}a&&"file"===a.scheme&&!startsWithWindowsDriveLetter(N(b(o,v),""))&&(isWindowsDriveLetter(a.path[0],!0)?H(h.path,a.path[0]):h.host=a.host);p=Oe;continue;case Te:if(l===i||"/"===l||"\\"===l||"?"===l||"#"===l){if(!r&&isWindowsDriveLetter(y))p=Oe;else if(""===y){h.host="";if(r)return;p=Me}else{if(u=h.parseHost(y))return u;"localhost"===h.host&&(h.host="");if(r)return;y="";p=Me}continue}y+=l;break;case Me:if(h.isSpecial()){p=Oe;if("/"!==l&&"\\"!==l)continue}else if(r||"?"!==l)if(r||"#"!==l){if(l!==i){p=Oe;if("/"!==l)continue}}else{h.fragment="";p=Le}else{h.query="";p=Re}break;case Oe:if(l===i||"/"===l||"\\"===l&&h.isSpecial()||!r&&("?"===l||"#"===l)){if(".."===(d=Y(d=y))||"%2e."===d||".%2e"===d||"%2e%2e"===d){h.shortenPath();"/"===l||"\\"===l&&h.isSpecial()||H(h.path,"")}else if(isSingleDot(y))"/"===l||"\\"===l&&h.isSpecial()||H(h.path,"");else{if("file"===h.scheme&&!h.path.length&&isWindowsDriveLetter(y)){h.host&&(h.host="");y=j(y,0)+":"}H(h.path,y)}y="";if("file"===h.scheme&&(l===i||"?"===l||"#"===l))for(;h.path.length>1&&""===h.path[0];)q(h.path);if("?"===l){h.query="";p=Re}else if("#"===l){h.fragment="";p=Le}}else y+=percentEncode(l,fe);break;case Ge:if("?"===l){h.query="";p=Re}else if("#"===l){h.fragment="";p=Le}else l!==i&&(h.path[0]+=percentEncode(l,de));break;case Re:if(r||"#"!==l)l!==i&&("'"===l&&h.isSpecial()?h.query+="%27":h.query+="#"===l?"%23":percentEncode(l,de));else{h.fragment="";p=Le}break;case Le:l!==i&&(h.fragment+=percentEncode(l,he))}v++}},parseHost:function(t){var r,a,i;if("["===j(t,0)){if("]"!==j(t,t.length-1))return J;r=function(t){var r,a,i,o,l,c,u,d=[0,0,0,0,0,0,0,0],h=0,p=null,v=0,chr=function(){return j(t,v)};if(":"===chr()){if(":"!==j(t,1))return;v+=2;p=++h}for(;chr();){if(8===h)return;if(":"!==chr()){r=a=0;for(;a<4&&W(ie,chr());){r=16*r+R(chr(),16);v++;a++}if("."===chr()){if(0===a)return;v-=a;if(h>6)return;i=0;for(;chr();){o=null;if(i>0){if(!("."===chr()&&i<4))return;v++}if(!W(te,chr()))return;for(;W(te,chr());){l=R(chr(),10);if(null===o)o=l;else{if(0===o)return;o=10*o+l}if(o>255)return;v++}d[h]=256*d[h]+o;2!=++i&&4!==i||h++}if(4!==i)return;break}if(":"===chr()){v++;if(!chr())return}else if(chr())return;d[h++]=r}else{if(null!==p)return;v++;p=++h}}if(null!==p){c=h-p;h=7;for(;0!==h&&c>0;){u=d[h];d[h--]=d[p+c-1];d[p+--c]=u}}else if(8!==h)return;return d}(K(t,1,-1));if(!r)return J;this.host=r}else if(this.isSpecial()){t=P(t);if(W(oe,t))return J;r=function(t){var r,a,i,o,l,c,u,d=V(t,".");d.length&&""===d[d.length-1]&&d.length--;if((r=d.length)>4)return t;a=[];for(i=0;i<r;i++){if(""===(o=d[i]))return t;l=10;if(o.length>1&&"0"===j(o,0)){l=W(re,o)?16:8;o=K(o,8===l?1:2)}if(""===o)c=0;else{if(!W(10===l?ae:8===l?ne:ie,o))return t;c=R(o,l)}H(a,c)}for(i=0;i<r;i++){c=a[i];if(i===r-1){if(c>=D(256,5-r))return null}else if(c>255)return null}u=z(a);for(i=0;i<a.length;i++)u+=a[i]*D(256,3-i);return u}(t);if(null===r)return J;this.host=r}else{if(W(se,t))return J;r="";a=m(t);for(i=0;i<a.length;i++)r+=percentEncode(a[i],de);this.host=r}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return _(ve,this.scheme)},shortenPath:function(){var t=this.path,r=t.length;!r||"file"===this.scheme&&1===r&&isWindowsDriveLetter(t[0],!0)||t.length--},serialize:function(){var t=this,r=t.scheme,a=t.username,i=t.password,o=t.host,l=t.port,c=t.path,u=t.query,d=t.fragment,h=r+":";if(null!==o){h+="//";t.includesCredentials()&&(h+=a+(i?":"+i:"")+"@");h+=serializeHost(o);null!==l&&(h+=":"+l)}else"file"===r&&(h+="//");h+=t.cannotBeABaseURL?c[0]:c.length?"/"+N(c,"/"):"";null!==u&&(h+="?"+u);null!==d&&(h+="#"+d);return h},setHref:function(t){var r=this.parse(t);if(r)throw new G(r);this.searchParams.update()},getOrigin:function(){var t=this.scheme,r=this.port;if("blob"===t)try{return new De(t.path[0]).origin}catch(t){return"null"}return"file"!==t&&this.isSpecial()?t+"://"+serializeHost(this.host)+(null!==r?":"+r:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(k(t)+":",ye)},getUsername:function(){return this.username},setUsername:function(t){var r=m(k(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var a=0;a<r.length;a++)this.username+=percentEncode(r[a],pe)}},getPassword:function(){return this.password},setPassword:function(t){var r=m(k(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var a=0;a<r.length;a++)this.password+=percentEncode(r[a],pe)}},getHost:function(){var t=this.host,r=this.port;return null===t?"":null===r?serializeHost(t):serializeHost(t)+":"+r},setHost:function(t){this.cannotBeABaseURL||this.parse(t,xe)},getHostname:function(){var t=this.host;return null===t?"":serializeHost(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Fe)},getPort:function(){var t=this.port;return null===t?"":k(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""===(t=k(t))?this.port=null:this.parse(t,Ee))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+N(t,"/"):""},setPathname:function(t){if(!this.cannotBeABaseURL){this.path=[];this.parse(t,Me)}},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){if(""===(t=k(t)))this.query=null;else{"?"===j(t,0)&&(t=K(t,1));this.query="";this.parse(t,Re)}this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){if(""!==(t=k(t))){"#"===j(t,0)&&(t=K(t,1));this.fragment="";this.parse(t,Le)}else this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var De=function URL(t){var r=y(this,je),a=S(arguments.length,1)>1?arguments[1]:void 0,i=I(r,new URLState(t,!1,a));if(!l){r.href=i.serialize();r.origin=i.getOrigin();r.protocol=i.getProtocol();r.username=i.getUsername();r.password=i.getPassword();r.host=i.getHost();r.hostname=i.getHostname();r.port=i.getPort();r.pathname=i.getPathname();r.search=i.getSearch();r.searchParams=i.getSearchParams();r.hash=i.getHash()}},je=De.prototype,accessorDescriptor=function(t,r){return{get:function(){return C(this)[t]()},set:r&&function(t){return C(this)[r](t)},configurable:!0,enumerable:!0}};if(l){v(je,"href",accessorDescriptor("serialize","setHref"));v(je,"origin",accessorDescriptor("getOrigin"));v(je,"protocol",accessorDescriptor("getProtocol","setProtocol"));v(je,"username",accessorDescriptor("getUsername","setUsername"));v(je,"password",accessorDescriptor("getPassword","setPassword"));v(je,"host",accessorDescriptor("getHost","setHost"));v(je,"hostname",accessorDescriptor("getHostname","setHostname"));v(je,"port",accessorDescriptor("getPort","setPort"));v(je,"pathname",accessorDescriptor("getPathname","setPathname"));v(je,"search",accessorDescriptor("getSearch","setSearch"));v(je,"searchParams",accessorDescriptor("getSearchParams"));v(je,"hash",accessorDescriptor("getHash","setHash"))}p(je,"toJSON",(function toJSON(){return C(this).serialize()}),{enumerable:!0});p(je,"toString",(function toString(){return C(this).serialize()}),{enumerable:!0});if(O){var We=O.createObjectURL,Ne=O.revokeObjectURL;We&&p(De,"createObjectURL",d(We,O));Ne&&p(De,"revokeObjectURL",d(Ne,O))}A(De,"URL");o({global:!0,constructor:!0,forced:!c,sham:!l},{URL:De})},7529:(t,r,a)=>{a(9258)}},r={};function __webpack_require__(a){var i=r[a];if(void 0!==i)return i.exports;var o=r[a]={exports:{}};t[a].call(o.exports,o,o.exports,__webpack_require__);return o.exports}__webpack_require__.d=(t,r)=>{for(var a in r)__webpack_require__.o(r,a)&&!__webpack_require__.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})};__webpack_require__.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r);var a=globalThis.pdfjsLib={};(()=>{__webpack_require__.d(a,{AbortException:()=>ce,AnnotationEditorLayer:()=>Ll,AnnotationEditorParamsType:()=>g,AnnotationEditorType:()=>_,AnnotationEditorUIManager:()=>dr,AnnotationLayer:()=>Yo,AnnotationMode:()=>y,CMapCompressionType:()=>Q,DOMSVGFactory:()=>Ye,DrawLayer:()=>Hl,FeatureTest:()=>ue,GlobalWorkerOptions:()=>Xn,ImageKind:()=>x,InvalidPDFException:()=>ie,MissingPDFException:()=>oe,OPS:()=>Z,Outliner:()=>Ql,PDFDataRangeTransport:()=>Qa,PDFDateString:()=>et,PDFWorker:()=>ui,PasswordResponses:()=>ee,PermissionFlag:()=>m,PixelsPerInch:()=>Se,PromiseCapability:()=>pe,RenderingCancelledException:()=>$e,UnexpectedResponseException:()=>se,Util:()=>he,VerbosityLevel:()=>J,XfaLayer:()=>Oi,build:()=>Fi,createValidAbsoluteUrl:()=>createValidAbsoluteUrl,fetchData:()=>fetchData,getDocument:()=>getDocument,getFilenameFromUrl:()=>getFilenameFromUrl,getPdfFilenameFromUrl:()=>getPdfFilenameFromUrl,getXfaPageViewport:()=>getXfaPageViewport,isDataScheme:()=>isDataScheme,isPdfFile:()=>isPdfFile,noContextMenu:()=>noContextMenu,normalizeUnicode:()=>normalizeUnicode,renderTextLayer:()=>renderTextLayer,setLayerDimensions:()=>setLayerDimensions,shadow:()=>shadow,updateTextLayer:()=>updateTextLayer,version:()=>xi});__webpack_require__(5897),__webpack_require__(5057),__webpack_require__(1210),__webpack_require__(3352),__webpack_require__(6421),__webpack_require__(7942),__webpack_require__(469),__webpack_require__(6180),__webpack_require__(895),__webpack_require__(1747),__webpack_require__(2374),__webpack_require__(7529),__webpack_require__(3757),__webpack_require__(3655),__webpack_require__(2555),__webpack_require__(2202),__webpack_require__(4226),__webpack_require__(4699),__webpack_require__(739),__webpack_require__(4816),__webpack_require__(6923),__webpack_require__(6775),__webpack_require__(6474),__webpack_require__(6450),__webpack_require__(1665),__webpack_require__(8837),__webpack_require__(9803),__webpack_require__(1293),__webpack_require__(1051),__webpack_require__(8260),__webpack_require__(5746),__webpack_require__(202),__webpack_require__(2138),__webpack_require__(368),__webpack_require__(9782),__webpack_require__(917),__webpack_require__(3650),__webpack_require__(8347),__webpack_require__(7192),__webpack_require__(354),__webpack_require__(9080),__webpack_require__(7238),__webpack_require__(7995),__webpack_require__(62),__webpack_require__(6635),__webpack_require__(4602),__webpack_require__(344),__webpack_require__(4305),__webpack_require__(7583),__webpack_require__(4668),__webpack_require__(4624),__webpack_require__(2796),__webpack_require__(2613),__webpack_require__(5136),__webpack_require__(7944),__webpack_require__(7230),__webpack_require__(924),__webpack_require__(7874),__webpack_require__(171),__webpack_require__(4711),__webpack_require__(7600),__webpack_require__(5666),__webpack_require__(5548),__webpack_require__(9366),__webpack_require__(6678),__webpack_require__(2926),__webpack_require__(7484),__webpack_require__(13),__webpack_require__(9175),__webpack_require__(6128),__webpack_require__(5598),__webpack_require__(8806),__webpack_require__(9593),__webpack_require__(5776);function _classPrivateFieldInitSpec(t,r,a){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,a)}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,a)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var t=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),r=[1,0,0,1,0,0],i=[.001,0,0,.001,0,0],o=1.35,l=1,c=2,u=4,d=16,h=32,p=64,v=256,y={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},_={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},g={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23},m={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},b=0,w=1,P=2,k=3,A=3,S=4,x={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},E=1,I=2,C=3,T=4,M=5,O=6,G=7,R=8,L=9,D=10,j=11,W=12,N=13,B=14,z=15,H=16,U=17,q=20,V=1,K=2,Y=3,X=4,$=5,J={ERRORS:0,WARNINGS:1,INFOS:5},Q={NONE:0,BINARY:1},Z={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},ee={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},te=J.WARNINGS;function setVerbosityLevel(t){Number.isInteger(t)&&(te=t)}function getVerbosityLevel(){return te}function info(t){te>=J.INFOS&&("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?console.log("Info: ".concat(t)):Window&&globalThis.ngxConsole?globalThis.ngxConsole.log("Info: ".concat(t)):console.log("Info: ".concat(t)))}function warn(t){te>=J.WARNINGS&&("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?console.log("Warning: ".concat(t)):Window&&globalThis.ngxConsole?globalThis.ngxConsole.log("Warning: ".concat(t)):console.log("Warning: ".concat(t)))}function unreachable(t){throw new Error(t)}function assert(t,r){t||unreachable(r)}function createValidAbsoluteUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(a&&"string"==typeof t){if(a.addDefaultProtocol&&t.startsWith("www.")){var i=t.match(/\./g);(null==i?void 0:i.length)>=2&&(t="http://".concat(t))}if(a.tryConvertEncoding)try{t=function stringToUTF8String(t){return decodeURIComponent(escape(t))}(t)}catch(t){}}var o=r?new URL(t,r):new URL(t);if(function _isValidProtocol(t){switch(null==t?void 0:t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":case"capacitor":return!0;default:return!1}}(o))return o}catch(t){}return null}function shadow(t,r,a){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object.defineProperty(t,r,{value:a,enumerable:!i,configurable:!0,writable:!1});return a}var re=function BaseExceptionClosure(){function BaseException(t,r){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=r}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}(),ne=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,a){var i;_classCallCheck(this,PasswordException);(i=r.call(this,t,"PasswordException")).code=a;return i}return _createClass(PasswordException)}(re),ae=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,a){var i;_classCallCheck(this,UnknownErrorException);(i=r.call(this,t,"UnknownErrorException")).details=a;return i}return _createClass(UnknownErrorException)}(re),ie=function(t){_inherits(InvalidPDFException,t);var r=_createSuper(InvalidPDFException);function InvalidPDFException(t){_classCallCheck(this,InvalidPDFException);return r.call(this,t,"InvalidPDFException")}return _createClass(InvalidPDFException)}(re),oe=function(t){_inherits(MissingPDFException,t);var r=_createSuper(MissingPDFException);function MissingPDFException(t){_classCallCheck(this,MissingPDFException);return r.call(this,t,"MissingPDFException")}return _createClass(MissingPDFException)}(re),se=function(t){_inherits(UnexpectedResponseException,t);var r=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(t,a){var i;_classCallCheck(this,UnexpectedResponseException);(i=r.call(this,t,"UnexpectedResponseException")).status=a;return i}return _createClass(UnexpectedResponseException)}(re),le=function(t){_inherits(FormatError,t);var r=_createSuper(FormatError);function FormatError(t){_classCallCheck(this,FormatError);return r.call(this,t,"FormatError")}return _createClass(FormatError)}(re),ce=function(t){_inherits(AbortException,t);var r=_createSuper(AbortException);function AbortException(t){_classCallCheck(this,AbortException);return r.call(this,t,"AbortException")}return _createClass(AbortException)}(re);function bytesToString(t){"object"===_typeof(t)&&void 0!==(null==t?void 0:t.length)||unreachable("Invalid argument for bytesToString");var r=t.length,a=8192;if(r<a)return String.fromCharCode.apply(null,t);for(var i=[],o=0;o<r;o+=a){var l=Math.min(o+a,r),c=t.subarray(o,l);i.push(String.fromCharCode.apply(null,c))}return i.join("")}function stringToBytes(t){"string"!=typeof t&&unreachable("Invalid argument for stringToBytes");for(var r=t.length,a=new Uint8Array(r),i=0;i<r;++i)a[i]=255&t.charCodeAt(i);return a}function objectFromMap(t){var r,a=Object.create(null),i=function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}(t);try{for(i.s();!(r=i.n()).done;){var o=_slicedToArray(r.value,2),l=o[0],c=o[1];a[l]=c}}catch(t){i.e(t)}finally{i.f()}return a}var ue=function(){function FeatureTest(){_classCallCheck(this,FeatureTest)}_createClass(FeatureTest,null,[{key:"isLittleEndian",get:function get(){return shadow(this,"isLittleEndian",function isLittleEndian(){var t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}},{key:"isEvalSupported",get:function get(){return shadow(this,"isEvalSupported",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}},{key:"isOffscreenCanvasSupported",get:function get(){return shadow(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}},{key:"platform",get:function get(){var t;return"undefined"!=typeof navigator&&"string"==typeof(null===(t=navigator)||void 0===t?void 0:t.platform)?shadow(this,"platform",{isMac:navigator.platform.includes("Mac")}):shadow(this,"platform",{isMac:!1})}},{key:"isCSSRoundSupported",get:function get(){var t,r;return shadow(this,"isCSSRoundSupported",null===(t=globalThis.CSS)||void 0===t||null===(r=t.supports)||void 0===r?void 0:r.call(t,"width: round(1.5px, 1px)"))}}]);return FeatureTest}(),de=_toConsumableArray(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")})),he=function(){function Util(){_classCallCheck(this,Util)}_createClass(Util,null,[{key:"makeHexColor",value:function makeHexColor(t,r,a){return"#".concat(de[t]).concat(de[r]).concat(de[a])}},{key:"scaleMinMax",value:function scaleMinMax(t,r){var a;if(t[0]){if(t[0]<0){a=r[0];r[0]=r[1];r[1]=a}r[0]*=t[0];r[1]*=t[0];if(t[3]<0){a=r[2];r[2]=r[3];r[3]=a}r[2]*=t[3];r[3]*=t[3]}else{a=r[0];r[0]=r[2];r[2]=a;a=r[1];r[1]=r[3];r[3]=a;if(t[1]<0){a=r[2];r[2]=r[3];r[3]=a}r[2]*=t[1];r[3]*=t[1];if(t[2]<0){a=r[0];r[0]=r[1];r[1]=a}r[0]*=t[2];r[1]*=t[2]}r[0]+=t[4];r[1]+=t[4];r[2]+=t[5];r[3]+=t[5]}},{key:"transform",value:function transform(t,r){return[t[0]*r[0]+t[2]*r[1],t[1]*r[0]+t[3]*r[1],t[0]*r[2]+t[2]*r[3],t[1]*r[2]+t[3]*r[3],t[0]*r[4]+t[2]*r[5]+t[4],t[1]*r[4]+t[3]*r[5]+t[5]]}},{key:"applyTransform",value:function applyTransform(t,r){return[t[0]*r[0]+t[1]*r[2]+r[4],t[0]*r[1]+t[1]*r[3]+r[5]]}},{key:"applyInverseTransform",value:function applyInverseTransform(t,r){var a=r[0]*r[3]-r[1]*r[2];return[(t[0]*r[3]-t[1]*r[2]+r[2]*r[5]-r[4]*r[3])/a,(-t[0]*r[1]+t[1]*r[0]+r[4]*r[1]-r[5]*r[0])/a]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(t,r){var a=this.applyTransform(t,r),i=this.applyTransform(t.slice(2,4),r),o=this.applyTransform([t[0],t[3]],r),l=this.applyTransform([t[2],t[1]],r);return[Math.min(a[0],i[0],o[0],l[0]),Math.min(a[1],i[1],o[1],l[1]),Math.max(a[0],i[0],o[0],l[0]),Math.max(a[1],i[1],o[1],l[1])]}},{key:"inverseTransform",value:function inverseTransform(t){var r=t[0]*t[3]-t[1]*t[2];return[t[3]/r,-t[1]/r,-t[2]/r,t[0]/r,(t[2]*t[5]-t[4]*t[3])/r,(t[4]*t[1]-t[5]*t[0])/r]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(t){var r=[t[0],t[2],t[1],t[3]],a=t[0]*r[0]+t[1]*r[2],i=t[0]*r[1]+t[1]*r[3],o=t[2]*r[0]+t[3]*r[2],l=t[2]*r[1]+t[3]*r[3],c=(a+l)/2,u=Math.sqrt(Math.pow(a+l,2)-4*(a*l-o*i))/2,d=c+u||1,h=c-u||1;return[Math.sqrt(d),Math.sqrt(h)]}},{key:"normalizeRect",value:function normalizeRect(t){var r=t.slice(0);if(t[0]>t[2]){r[0]=t[2];r[2]=t[0]}if(t[1]>t[3]){r[1]=t[3];r[3]=t[1]}return r}},{key:"intersect",value:function intersect(t,r){var a=Math.max(Math.min(t[0],t[2]),Math.min(r[0],r[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(r[0],r[2]));if(a>i)return null;var o=Math.max(Math.min(t[1],t[3]),Math.min(r[1],r[3])),l=Math.min(Math.max(t[1],t[3]),Math.max(r[1],r[3]));return o>l?null:[a,o,i,l]}},{key:"bezierBoundingBox",value:function bezierBoundingBox(t,r,a,i,o,l,c,u){for(var d,h,p,v,y,_,g,m,b=[],w=[[],[]],P=0;P<2;++P){if(0===P){h=6*t-12*a+6*o;d=-3*t+9*a-9*o+3*c;p=3*a-3*t}else{h=6*r-12*i+6*l;d=-3*r+9*i-9*l+3*u;p=3*i-3*r}if(Math.abs(d)<1e-12){if(Math.abs(h)<1e-12)continue;0<(v=-p/h)&&v<1&&b.push(v)}else{g=h*h-4*p*d;m=Math.sqrt(g);if(!(g<0)){0<(y=(-h+m)/(2*d))&&y<1&&b.push(y);0<(_=(-h-m)/(2*d))&&_<1&&b.push(_)}}}for(var k,A=b.length,S=A;A--;){k=1-(v=b[A]);w[0][A]=k*k*k*t+3*k*k*v*a+3*k*v*v*o+v*v*v*c;w[1][A]=k*k*k*r+3*k*k*v*i+3*k*v*v*l+v*v*v*u}w[0][S]=t;w[1][S]=r;w[0][S+1]=c;w[1][S+1]=u;w[0].length=w[1].length=S+2;return[Math.min.apply(Math,_toConsumableArray(w[0])),Math.min.apply(Math,_toConsumableArray(w[1])),Math.max.apply(Math,_toConsumableArray(w[0])),Math.max.apply(Math,_toConsumableArray(w[1]))]}}]);return Util}();function isArrayBuffer(t){return"object"===_typeof(t)&&void 0!==(null==t?void 0:t.byteLength)}var fe=new WeakMap,pe=function(){function PromiseCapability(){var t=this;_classCallCheck(this,PromiseCapability);_classPrivateFieldInitSpec(this,fe,{writable:!0,value:!1});this.promise=new Promise((function(r,a){t.resolve=function(a){_classPrivateFieldSet(t,fe,!0);r(a)};t.reject=function(r){_classPrivateFieldSet(t,fe,!0);a(r)}}))}_createClass(PromiseCapability,[{key:"settled",get:function get(){return function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}(this,fe)}}]);return PromiseCapability}(),ve=null,ye=null;function normalizeUnicode(t){if(!ve){ve=/([\xA0\xB5\u037E\u0EB3\u2000-\u200A\u202F\u2126\uFB00-\uFB04\uFB06\uFB20-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBA1\uFBA4-\uFBA9\uFBAE-\uFBB1\uFBD3-\uFBDC\uFBDE-\uFBE7\uFBEA-\uFBF8\uFBFC\uFBFD\uFC00-\uFC5D\uFC64-\uFCF1\uFCF5-\uFD3D\uFD88\uFDF4\uFDFA\uFDFB\uFE71\uFE77\uFE79\uFE7B\uFE7D]+)|(\uFB05+)/g;ye=new Map([["ſt","ſt"]])}return t.replaceAll(ve,(function(t,r,a){return r?r.normalize("NFKC"):ye.get(a)}))}function getUuid(){var t,r;if("undefined"!=typeof crypto&&"function"==typeof(null===(t=crypto)||void 0===t?void 0:t.randomUUID))return crypto.randomUUID();var a=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof(null===(r=crypto)||void 0===r?void 0:r.getRandomValues))crypto.getRandomValues(a);else for(var i=0;i<32;i++)a[i]=Math.floor(255*Math.random());return bytesToString(a)}var _e="pdfjs_internal_id_";__webpack_require__(2048),__webpack_require__(5561),__webpack_require__(8587),__webpack_require__(3247),__webpack_require__(3302),__webpack_require__(9490),__webpack_require__(5438),__webpack_require__(7914),__webpack_require__(9142),__webpack_require__(2822),__webpack_require__(9709),__webpack_require__(2642),__webpack_require__(4750),__webpack_require__(394),__webpack_require__(1133),__webpack_require__(2173),__webpack_require__(2630),__webpack_require__(1024),__webpack_require__(7121),__webpack_require__(6770),__webpack_require__(1378),__webpack_require__(4441),__webpack_require__(2586),__webpack_require__(7254),__webpack_require__(6133),__webpack_require__(3821),__webpack_require__(6302),__webpack_require__(6820),__webpack_require__(10),__webpack_require__(385),__webpack_require__(2808),__webpack_require__(8518),__webpack_require__(8341),__webpack_require__(4280),__webpack_require__(4997),__webpack_require__(6333),__webpack_require__(3032),__webpack_require__(5619),__webpack_require__(9786);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==base_factory_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(base_factory_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function base_factory_typeof(t){return base_factory_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},base_factory_typeof(t)}function base_factory_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function base_factory_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,base_factory_toPropertyKey(i.key),i)}}function base_factory_createClass(t,r,a){r&&base_factory_defineProperties(t.prototype,r);a&&base_factory_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function base_factory_toPropertyKey(t){var r=function base_factory_toPrimitive(t,r){if("object"!=base_factory_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=base_factory_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==base_factory_typeof(r)?r:String(r)}var ge,me=function(){function BaseFilterFactory(){base_factory_classCallCheck(this,BaseFilterFactory);this.constructor===BaseFilterFactory&&unreachable("Cannot initialize BaseFilterFactory.")}base_factory_createClass(BaseFilterFactory,[{key:"addFilter",value:function addFilter(t){return"none"}},{key:"addHCMFilter",value:function addHCMFilter(t,r){return"none"}},{key:"addHighlightHCMFilter",value:function addHighlightHCMFilter(t,r,a,i){return"none"}},{key:"destroy",value:function destroy(){}}]);return BaseFilterFactory}(),be=function(){function BaseCanvasFactory(){base_factory_classCallCheck(this,BaseCanvasFactory);this.constructor===BaseCanvasFactory&&unreachable("Cannot initialize BaseCanvasFactory.")}base_factory_createClass(BaseCanvasFactory,[{key:"create",value:function create(t,r){if(t<=0||r<=0)throw new Error("Invalid canvas size");var a=this._createCanvas(t,r),i=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,o=a.getContext("2d",i);return{canvas:a,context:o}}},{key:"reset",value:function reset(t,r,a){if(!t.canvas)throw new Error("Canvas is not specified");if(r<=0||a<=0)throw new Error("Invalid canvas size");t.canvas.width=r;t.canvas.height=a}},{key:"destroy",value:function destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0;t.canvas.height=0;t.canvas=null;t.context=null}},{key:"_createCanvas",value:function _createCanvas(t,r){unreachable("Abstract method `_createCanvas` called.")}}]);return BaseCanvasFactory}(),we=function(){function BaseCMapReaderFactory(t){var r=t.baseUrl,a=void 0===r?null:r,i=t.isCompressed,o=void 0===i||i;base_factory_classCallCheck(this,BaseCMapReaderFactory);this.constructor===BaseCMapReaderFactory&&unreachable("Cannot initialize BaseCMapReaderFactory.");this.baseUrl=a;this.isCompressed=o}base_factory_createClass(BaseCMapReaderFactory,[{key:"fetch",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,a,i,o=this;return _regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:r=t.name;if(this.baseUrl){l.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(r){l.next=5;break}throw new Error("CMap name must be specified.");case 5:a=this.baseUrl+r+(this.isCompressed?".bcmap":"");i=this.isCompressed?Q.BINARY:Q.NONE;return l.abrupt("return",this._fetchData(a,i).catch((function(t){throw new Error("Unable to load ".concat(o.isCompressed?"binary ":"","CMap at: ").concat(a))})));case 8:case"end":return l.stop()}}),_callee,this)}))),function fetch(r){return t.apply(this,arguments)})},{key:"_fetchData",value:function _fetchData(t,r){unreachable("Abstract method `_fetchData` called.")}}]);var t;return BaseCMapReaderFactory}(),Pe=function(){function BaseStandardFontDataFactory(t){var r=t.baseUrl,a=void 0===r?null:r;base_factory_classCallCheck(this,BaseStandardFontDataFactory);this.constructor===BaseStandardFontDataFactory&&unreachable("Cannot initialize BaseStandardFontDataFactory.");this.baseUrl=a}base_factory_createClass(BaseStandardFontDataFactory,[{key:"fetch",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,a;return _regeneratorRuntime().wrap((function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:r=t.filename;if(this.baseUrl){i.next=3;break}throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');case 3:if(r){i.next=5;break}throw new Error("Font filename must be specified.");case 5:a="".concat(this.baseUrl).concat(r);return i.abrupt("return",this._fetchData(a).catch((function(t){throw new Error("Unable to load font data at: ".concat(a))})));case 7:case"end":return i.stop()}}),_callee2,this)}))),function fetch(r){return t.apply(this,arguments)})},{key:"_fetchData",value:function _fetchData(t){unreachable("Abstract method `_fetchData` called.")}}]);var t;return BaseStandardFontDataFactory}(),ke=function(){function BaseSVGFactory(){base_factory_classCallCheck(this,BaseSVGFactory);this.constructor===BaseSVGFactory&&unreachable("Cannot initialize BaseSVGFactory.")}base_factory_createClass(BaseSVGFactory,[{key:"create",value:function create(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t<=0||r<=0)throw new Error("Invalid SVG dimensions");var i=this._createSVG("svg:svg");i.setAttribute("version","1.1");if(!a){i.setAttribute("width","".concat(t,"px"));i.setAttribute("height","".concat(r,"px"))}i.setAttribute("preserveAspectRatio","none");i.setAttribute("viewBox","0 0 ".concat(t," ").concat(r));return i}},{key:"createElement",value:function createElement(t){if("string"!=typeof t)throw new Error("Invalid SVG element type");return this._createSVG(t)}},{key:"_createSVG",value:function _createSVG(t){unreachable("Abstract method `_createSVG` called.")}}]);return BaseSVGFactory}();function display_utils_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */display_utils_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==display_utils_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(display_utils_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function display_utils_typeof(t){return display_utils_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},display_utils_typeof(t)}function display_utils_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=display_utils_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function display_utils_asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function display_utils_toConsumableArray(t){return function display_utils_arrayWithoutHoles(t){if(Array.isArray(t))return display_utils_arrayLikeToArray(t)}(t)||function display_utils_iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||display_utils_unsupportedIterableToArray(t)||function display_utils_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function display_utils_slicedToArray(t,r){return function display_utils_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function display_utils_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||display_utils_unsupportedIterableToArray(t,r)||function display_utils_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function display_utils_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return display_utils_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?display_utils_arrayLikeToArray(t,r):void 0}}function display_utils_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function display_utils_inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&display_utils_setPrototypeOf(t,r)}function display_utils_setPrototypeOf(t,r){display_utils_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return display_utils_setPrototypeOf(t,r)}function display_utils_createSuper(t){var r=function display_utils_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=display_utils_getPrototypeOf(t);if(r){var o=display_utils_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function display_utils_possibleConstructorReturn(t,r){if(r&&("object"===display_utils_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return display_utils_assertThisInitialized(t)}(this,a)}}function display_utils_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function display_utils_getPrototypeOf(t){display_utils_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return display_utils_getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){display_utils_checkPrivateRedeclaration(t,r);r.add(t)}function display_utils_classPrivateFieldInitSpec(t,r,a){display_utils_checkPrivateRedeclaration(t,r);r.set(t,a)}function display_utils_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function display_utils_classPrivateFieldGet(t,r){return function display_utils_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,display_utils_classExtractFieldDescriptor(t,r,"get"))}function display_utils_classPrivateFieldSet(t,r,a){!function display_utils_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,display_utils_classExtractFieldDescriptor(t,r,"set"),a);return a}function display_utils_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function display_utils_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,display_utils_toPropertyKey(i.key),i)}}function display_utils_createClass(t,r,a){r&&display_utils_defineProperties(t.prototype,r);a&&display_utils_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function display_utils_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperty(t,r,a){(r=display_utils_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function display_utils_toPropertyKey(t){var r=function display_utils_toPrimitive(t,r){if("object"!=display_utils_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=display_utils_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==display_utils_typeof(r)?r:String(r)}var Ae="http://www.w3.org/2000/svg",Se=display_utils_createClass((function PixelsPerInch(){display_utils_classCallCheck(this,PixelsPerInch)}));ge=Se;_defineProperty(Se,"CSS",96);_defineProperty(Se,"PDF",72);_defineProperty(Se,"PDF_TO_CSS_UNITS",ge.CSS/ge.PDF);var xe=new WeakMap,Fe=new WeakMap,Ee=new WeakMap,Ie=new WeakMap,Ce=new WeakMap,Te=new WeakMap,Me=new WeakMap,Oe=new WeakMap,Ge=new WeakMap,Re=new WeakMap,Le=new WeakMap,De=new WeakMap,je=new WeakMap,We=new WeakSet,Ne=new WeakSet,Be=new WeakSet,ze=new WeakSet,He=new WeakSet,Ue=function(t){display_utils_inherits(DOMFilterFactory,t);var r=display_utils_createSuper(DOMFilterFactory);function DOMFilterFactory(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=a.docId,o=a.ownerDocument,l=void 0===o?globalThis.document:o;display_utils_classCallCheck(this,DOMFilterFactory);_classPrivateMethodInitSpec(display_utils_assertThisInitialized(t=r.call(this)),He);_classPrivateMethodInitSpec(display_utils_assertThisInitialized(t),ze);_classPrivateMethodInitSpec(display_utils_assertThisInitialized(t),Be);_classPrivateMethodInitSpec(display_utils_assertThisInitialized(t),Ne);_classPrivateMethodInitSpec(display_utils_assertThisInitialized(t),We);display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),je,{get:_get_defs,set:void 0});display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),De,{get:_get_cache,set:void 0});display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),xe,{writable:!0,value:void 0});display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),Fe,{writable:!0,value:void 0});display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),Ee,{writable:!0,value:void 0});display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),Ie,{writable:!0,value:void 0});display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),Ce,{writable:!0,value:void 0});display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),Te,{writable:!0,value:void 0});display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),Me,{writable:!0,value:void 0});display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),Oe,{writable:!0,value:void 0});display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),Ge,{writable:!0,value:void 0});display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),Re,{writable:!0,value:void 0});display_utils_classPrivateFieldInitSpec(display_utils_assertThisInitialized(t),Le,{writable:!0,value:0});display_utils_classPrivateFieldSet(display_utils_assertThisInitialized(t),Ee,i);display_utils_classPrivateFieldSet(display_utils_assertThisInitialized(t),Ie,l);return t}display_utils_createClass(DOMFilterFactory,[{key:"addFilter",value:function addFilter(t){var r,a;if(!t)return"none";var i,o,l,c,u=display_utils_classPrivateFieldGet(this,De).get(t);if(u)return u;if(1===t.length){for(var d=t[0],h=new Array(256),p=0;p<256;p++)h[p]=d[p]/255;c=i=o=l=h.join(",")}else{for(var v=display_utils_slicedToArray(t,3),y=v[0],_=v[1],g=v[2],m=new Array(256),b=new Array(256),w=new Array(256),P=0;P<256;P++){m[P]=y[P]/255;b[P]=_[P]/255;w[P]=g[P]/255}i=m.join(",");o=b.join(",");l=w.join(",");c="".concat(i).concat(o).concat(l)}if(u=display_utils_classPrivateFieldGet(this,De).get(c)){display_utils_classPrivateFieldGet(this,De).set(t,u);return u}var k="g_".concat(display_utils_classPrivateFieldGet(this,Ee),"_transfer_map_").concat((display_utils_classPrivateFieldSet(this,Le,(r=display_utils_classPrivateFieldGet(this,Le),a=r++,r)),a)),A="url(#".concat(k,")");display_utils_classPrivateFieldGet(this,De).set(t,A);display_utils_classPrivateFieldGet(this,De).set(c,A);var S=_classPrivateMethodGet(this,Ne,_createFilter2).call(this,k);_classPrivateMethodGet(this,ze,_addTransferMapConversion2).call(this,i,o,l,S);return A}},{key:"addHCMFilter",value:function addHCMFilter(t,r){var a,i="".concat(t,"-").concat(r);if(display_utils_classPrivateFieldGet(this,Te)===i)return display_utils_classPrivateFieldGet(this,Me);display_utils_classPrivateFieldSet(this,Te,i);display_utils_classPrivateFieldSet(this,Me,"none");null===(a=display_utils_classPrivateFieldGet(this,Ce))||void 0===a||a.remove();if(!t||!r)return display_utils_classPrivateFieldGet(this,Me);var o=_classPrivateMethodGet(this,He,_getRGB2).call(this,t);t=he.makeHexColor.apply(he,display_utils_toConsumableArray(o));var l=_classPrivateMethodGet(this,He,_getRGB2).call(this,r);r=he.makeHexColor.apply(he,display_utils_toConsumableArray(l));display_utils_classPrivateFieldGet(this,je).style.color="";if("#000000"===t&&"#ffffff"===r||t===r)return display_utils_classPrivateFieldGet(this,Me);for(var c=new Array(256),u=0;u<=255;u++){var d=u/255;c[u]=d<=.03928?d/12.92:Math.pow((d+.055)/1.055,2.4)}var h=c.join(","),p="g_".concat(display_utils_classPrivateFieldGet(this,Ee),"_hcm_filter"),v=display_utils_classPrivateFieldSet(this,Oe,_classPrivateMethodGet(this,Ne,_createFilter2).call(this,p));_classPrivateMethodGet(this,ze,_addTransferMapConversion2).call(this,h,h,h,v);_classPrivateMethodGet(this,We,_addGrayConversion2).call(this,v);var y=function getSteps(t,r){for(var a=o[t]/255,i=l[t]/255,c=new Array(r+1),u=0;u<=r;u++)c[u]=a+u/r*(i-a);return c.join(",")};_classPrivateMethodGet(this,ze,_addTransferMapConversion2).call(this,y(0,5),y(1,5),y(2,5),v);display_utils_classPrivateFieldSet(this,Me,"url(#".concat(p,")"));return display_utils_classPrivateFieldGet(this,Me)}},{key:"addHighlightHCMFilter",value:function addHighlightHCMFilter(t,r,a,i){var o,l="".concat(t,"-").concat(r,"-").concat(a,"-").concat(i);if(display_utils_classPrivateFieldGet(this,Ge)===l)return display_utils_classPrivateFieldGet(this,Re);display_utils_classPrivateFieldSet(this,Ge,l);display_utils_classPrivateFieldSet(this,Re,"none");null===(o=display_utils_classPrivateFieldGet(this,Oe))||void 0===o||o.remove();if(!t||!r)return display_utils_classPrivateFieldGet(this,Re);var c=display_utils_slicedToArray([t,r].map(_classPrivateMethodGet(this,He,_getRGB2).bind(this)),2),u=c[0],d=c[1],h=Math.round(.2126*u[0]+.7152*u[1]+.0722*u[2]),p=Math.round(.2126*d[0]+.7152*d[1]+.0722*d[2]),v=display_utils_slicedToArray([a,i].map(_classPrivateMethodGet(this,He,_getRGB2).bind(this)),2),y=v[0],_=v[1];if(p<h){var g=[p,h,_,y];h=g[0];p=g[1];y=g[2];_=g[3]}display_utils_classPrivateFieldGet(this,je).style.color="";var m=function getSteps(t,r,a){for(var i=new Array(256),o=(p-h)/a,l=t/255,c=(r-t)/(255*a),u=0,d=0;d<=a;d++){for(var v=Math.round(h+d*o),y=l+d*c,_=u;_<=v;_++)i[_]=y;u=v+1}for(var g=u;g<256;g++)i[g]=i[u-1];return i.join(",")},b="g_".concat(display_utils_classPrivateFieldGet(this,Ee),"_hcm_highlight_filter"),w=display_utils_classPrivateFieldSet(this,Oe,_classPrivateMethodGet(this,Ne,_createFilter2).call(this,b));_classPrivateMethodGet(this,We,_addGrayConversion2).call(this,w);_classPrivateMethodGet(this,ze,_addTransferMapConversion2).call(this,m(y[0],_[0],5),m(y[1],_[1],5),m(y[2],_[2],5),w);display_utils_classPrivateFieldSet(this,Re,"url(#".concat(b,")"));return display_utils_classPrivateFieldGet(this,Re)}},{key:"destroy",value:function destroy(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])||!display_utils_classPrivateFieldGet(this,Me)&&!display_utils_classPrivateFieldGet(this,Re)){if(display_utils_classPrivateFieldGet(this,Fe)){display_utils_classPrivateFieldGet(this,Fe).parentNode.parentNode.remove();display_utils_classPrivateFieldSet(this,Fe,null)}if(display_utils_classPrivateFieldGet(this,xe)){display_utils_classPrivateFieldGet(this,xe).clear();display_utils_classPrivateFieldSet(this,xe,null)}display_utils_classPrivateFieldSet(this,Le,0)}}}]);return DOMFilterFactory}(me);function _get_cache(){return display_utils_classPrivateFieldGet(this,xe)||display_utils_classPrivateFieldSet(this,xe,new Map)}function _get_defs(){if(!display_utils_classPrivateFieldGet(this,Fe)){var t=display_utils_classPrivateFieldGet(this,Ie).createElement("div"),r=t.style;r.visibility="hidden";r.contain="strict";r.width=r.height=0;r.position="absolute";r.top=r.left=0;r.zIndex=-1;var a=display_utils_classPrivateFieldGet(this,Ie).createElementNS(Ae,"svg");a.setAttribute("width",0);a.setAttribute("height",0);display_utils_classPrivateFieldSet(this,Fe,display_utils_classPrivateFieldGet(this,Ie).createElementNS(Ae,"defs"));t.append(a);a.append(display_utils_classPrivateFieldGet(this,Fe));display_utils_classPrivateFieldGet(this,Ie).body.append(t)}return display_utils_classPrivateFieldGet(this,Fe)}function _addGrayConversion2(t){var r=display_utils_classPrivateFieldGet(this,Ie).createElementNS(Ae,"feColorMatrix");r.setAttribute("type","matrix");r.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0");t.append(r)}function _createFilter2(t){var r=display_utils_classPrivateFieldGet(this,Ie).createElementNS(Ae,"filter");r.setAttribute("color-interpolation-filters","sRGB");r.setAttribute("id",t);display_utils_classPrivateFieldGet(this,je).append(r);return r}function _appendFeFunc2(t,r,a){var i=display_utils_classPrivateFieldGet(this,Ie).createElementNS(Ae,r);i.setAttribute("type","discrete");i.setAttribute("tableValues",a);t.append(i)}function _addTransferMapConversion2(t,r,a,i){var o=display_utils_classPrivateFieldGet(this,Ie).createElementNS(Ae,"feComponentTransfer");i.append(o);_classPrivateMethodGet(this,Be,_appendFeFunc2).call(this,o,"feFuncR",t);_classPrivateMethodGet(this,Be,_appendFeFunc2).call(this,o,"feFuncG",r);_classPrivateMethodGet(this,Be,_appendFeFunc2).call(this,o,"feFuncB",a)}function _getRGB2(t){display_utils_classPrivateFieldGet(this,je).style.color=t;return getRGB(getComputedStyle(display_utils_classPrivateFieldGet(this,je)).getPropertyValue("color"))}var qe=function(t){display_utils_inherits(DOMCanvasFactory,t);var r=display_utils_createSuper(DOMCanvasFactory);function DOMCanvasFactory(){var t,a=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ownerDocument,i=void 0===a?globalThis.document:a;display_utils_classCallCheck(this,DOMCanvasFactory);(t=r.call(this))._document=i;return t}display_utils_createClass(DOMCanvasFactory,[{key:"_createCanvas",value:function _createCanvas(t,r){var a=this._document.createElement("canvas");a.width=t;a.height=r;return a}}]);return DOMCanvasFactory}(be);function fetchData(t){return _fetchData.apply(this,arguments)}function _fetchData(){_fetchData=function display_utils_asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){display_utils_asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){display_utils_asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}(display_utils_regeneratorRuntime().mark((function _callee(t){var r,a,i=arguments;return display_utils_regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:r=i.length>1&&void 0!==i[1]?i[1]:"text";if(!isValidFetchUrl(t,document.baseURI)){o.next=14;break}o.next=4;return fetch(t);case 4:if((a=o.sent).ok){o.next=7;break}throw new Error(a.statusText);case 7:o.t0=r;o.next="arraybuffer"===o.t0?10:"blob"===o.t0?11:"json"===o.t0?12:13;break;case 10:return o.abrupt("return",a.arrayBuffer());case 11:return o.abrupt("return",a.blob());case 12:return o.abrupt("return",a.json());case 13:return o.abrupt("return",a.text());case 14:return o.abrupt("return",new Promise((function(a,i){var o=new XMLHttpRequest;o.open("GET",t,!0);o.responseType=r;o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE){if(200===o.status||0===o.status){var t;switch(r){case"arraybuffer":case"blob":case"json":t=o.response;break;default:t=o.responseText}if(t){a(t);return}}i(new Error(o.statusText))}};o.send(null)})));case 15:case"end":return o.stop()}}),_callee)})));return _fetchData.apply(this,arguments)}var Ve=function(t){display_utils_inherits(DOMCMapReaderFactory,t);var r=display_utils_createSuper(DOMCMapReaderFactory);function DOMCMapReaderFactory(){display_utils_classCallCheck(this,DOMCMapReaderFactory);return r.apply(this,arguments)}display_utils_createClass(DOMCMapReaderFactory,[{key:"_fetchData",value:function _fetchData(t,r){return fetchData(t,this.isCompressed?"arraybuffer":"text").then((function(t){return{cMapData:t instanceof ArrayBuffer?new Uint8Array(t):stringToBytes(t),compressionType:r}}))}}]);return DOMCMapReaderFactory}(we),Ke=function(t){display_utils_inherits(DOMStandardFontDataFactory,t);var r=display_utils_createSuper(DOMStandardFontDataFactory);function DOMStandardFontDataFactory(){display_utils_classCallCheck(this,DOMStandardFontDataFactory);return r.apply(this,arguments)}display_utils_createClass(DOMStandardFontDataFactory,[{key:"_fetchData",value:function _fetchData(t){return fetchData(t,"arraybuffer").then((function(t){return new Uint8Array(t)}))}}]);return DOMStandardFontDataFactory}(Pe),Ye=function(t){display_utils_inherits(DOMSVGFactory,t);var r=display_utils_createSuper(DOMSVGFactory);function DOMSVGFactory(){display_utils_classCallCheck(this,DOMSVGFactory);return r.apply(this,arguments)}display_utils_createClass(DOMSVGFactory,[{key:"_createSVG",value:function _createSVG(t){return document.createElementNS(Ae,t)}}]);return DOMSVGFactory}(ke),Xe=function(){function PageViewport(t){var r=t.viewBox,a=t.scale,i=t.rotation,o=t.offsetX,l=void 0===o?0:o,c=t.offsetY,u=void 0===c?0:c,d=t.dontFlip,h=void 0!==d&&d;display_utils_classCallCheck(this,PageViewport);this.viewBox=r;this.scale=a;this.rotation=i;this.offsetX=l;this.offsetY=u;var p,v,y,_,g,m,b,w,P=(r[2]+r[0])/2,k=(r[3]+r[1])/2;(i%=360)<0&&(i+=360);switch(i){case 180:p=-1;v=0;y=0;_=1;break;case 90:p=0;v=1;y=1;_=0;break;case 270:p=0;v=-1;y=-1;_=0;break;case 0:p=1;v=0;y=0;_=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}if(h){y=-y;_=-_}if(0===p){g=Math.abs(k-r[1])*a+l;m=Math.abs(P-r[0])*a+u;b=(r[3]-r[1])*a;w=(r[2]-r[0])*a}else{g=Math.abs(P-r[0])*a+l;m=Math.abs(k-r[1])*a+u;b=(r[2]-r[0])*a;w=(r[3]-r[1])*a}this.transform=[p*a,v*a,y*a,_*a,g-p*a*P-y*a*k,m-v*a*P-_*a*k];this.width=b;this.height=w}display_utils_createClass(PageViewport,[{key:"rawDims",get:function get(){var t=this.viewBox;return shadow(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}},{key:"clone",value:function clone(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,a=void 0===r?this.scale:r,i=t.rotation,o=void 0===i?this.rotation:i,l=t.offsetX,c=void 0===l?this.offsetX:l,u=t.offsetY,d=void 0===u?this.offsetY:u,h=t.dontFlip,p=void 0!==h&&h;return new PageViewport({viewBox:this.viewBox.slice(),scale:a,rotation:o,offsetX:c,offsetY:d,dontFlip:p})}},{key:"convertToViewportPoint",value:function convertToViewportPoint(t,r){return he.applyTransform([t,r],this.transform)}},{key:"convertToViewportRectangle",value:function convertToViewportRectangle(t){var r=he.applyTransform([t[0],t[1]],this.transform),a=he.applyTransform([t[2],t[3]],this.transform);return[r[0],r[1],a[0],a[1]]}},{key:"convertToPdfPoint",value:function convertToPdfPoint(t,r){return he.applyInverseTransform([t,r],this.transform)}}]);return PageViewport}(),$e=function(t){display_utils_inherits(RenderingCancelledException,t);var r=display_utils_createSuper(RenderingCancelledException);function RenderingCancelledException(t){var a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;display_utils_classCallCheck(this,RenderingCancelledException);(a=r.call(this,t,"RenderingCancelledException")).extraDelay=i;return a}return display_utils_createClass(RenderingCancelledException)}(re);function isDataScheme(t){for(var r=t.length,a=0;a<r&&""===t[a].trim();)a++;return"data:"===t.substring(a,a+5).toLowerCase()}function isPdfFile(t){return"string"==typeof t&&/\.pdf$/i.test(t)}function getFilenameFromUrl(t){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])){var r=t.split(/[#?]/,1);t=display_utils_slicedToArray(r,1)[0]}return t.substring(t.lastIndexOf("/")+1)}function getPdfFilenameFromUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if(window.PDFViewerApplication.appConfig.filenameForDownload)return window.PDFViewerApplication.appConfig.filenameForDownload;if("string"!=typeof t)return r;if(isDataScheme(t)){warn('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.');return r}var a=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(t),o=a.exec(i[1])||a.exec(i[2])||a.exec(i[3]);if(o&&(o=o[0]).includes("%"))try{o=a.exec(decodeURIComponent(o))[0]}catch(t){}return o||r}var Je,Qe=function(){function StatTimer(){display_utils_classCallCheck(this,StatTimer);_defineProperty(this,"started",Object.create(null));_defineProperty(this,"times",[])}display_utils_createClass(StatTimer,[{key:"time",value:function time(t){t in this.started&&warn("Timer is already running for ".concat(t));this.started[t]=Date.now()}},{key:"timeEnd",value:function timeEnd(t){t in this.started||warn("Timer has not been started for ".concat(t));this.times.push({name:t,start:this.started[t],end:Date.now()});delete this.started[t]}},{key:"toString",value:function toString(){var t,r=[],a=0,i=display_utils_createForOfIteratorHelper(this.times);try{for(i.s();!(t=i.n()).done;){var o=t.value.name;a=Math.max(o.length,a)}}catch(t){i.e(t)}finally{i.f()}var l,c=display_utils_createForOfIteratorHelper(this.times);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=u.name,h=u.start,p=u.end;r.push("".concat(d.padEnd(a)," ").concat(p-h,"ms\n"))}}catch(t){c.e(t)}finally{c.f()}return r.join("")}}]);return StatTimer}();function isValidFetchUrl(t,r){try{var a=(r?new URL(t,r):new URL(t)).protocol;return"http:"===a||"https:"===a||"capacitor:"===a}catch(t){return!1}}function noContextMenu(t){t.preventDefault()}var Ze,et=function(){function PDFDateString(){display_utils_classCallCheck(this,PDFDateString)}display_utils_createClass(PDFDateString,null,[{key:"toDateObject",value:function toDateObject(t){if(!t||"string"!=typeof t)return null;Je||(Je=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var r=Je.exec(t);if(!r)return null;var a=parseInt(r[1],10),i=parseInt(r[2],10);i=i>=1&&i<=12?i-1:0;var o=parseInt(r[3],10);o=o>=1&&o<=31?o:1;var l=parseInt(r[4],10);l=l>=0&&l<=23?l:0;var c=parseInt(r[5],10);c=c>=0&&c<=59?c:0;var u=parseInt(r[6],10);u=u>=0&&u<=59?u:0;var d=r[7]||"Z",h=parseInt(r[8],10);h=h>=0&&h<=23?h:0;var p=parseInt(r[9],10)||0;p=p>=0&&p<=59?p:0;if("-"===d){l+=h;c+=p}else if("+"===d){l-=h;c-=p}return new Date(Date.UTC(a,i,o,l,c,u))}}]);return PDFDateString}();function getXfaPageViewport(t,r){var a=r.scale,i=void 0===a?1:a,o=r.rotation,l=void 0===o?0:o,c=t.attributes.style,u=c.width,d=c.height,h=[0,0,parseInt(u),parseInt(d)];return new Xe({viewBox:h,scale:i,rotation:l})}function getRGB(t){if(t.startsWith("#")){var r=parseInt(t.slice(1),16);return[(16711680&r)>>16,(65280&r)>>8,255&r]}if(t.startsWith("rgb("))return t.slice(4,-1).split(",").map((function(t){return parseInt(t)}));if(t.startsWith("rgba("))return t.slice(5,-1).split(",").map((function(t){return parseInt(t)})).slice(0,3);warn('Not a valid color format: "'.concat(t,'"'));return[0,0,0]}function getCurrentTransform(t){var r=t.getTransform();return[r.a,r.b,r.c,r.d,r.e,r.f]}function getCurrentTransformInverse(t){var r=t.getTransform().invertSelf();return[r.a,r.b,r.c,r.d,r.e,r.f]}function setLayerDimensions(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(r instanceof Xe){var o=r.rawDims,l=o.pageWidth,c=o.pageHeight,u=t.style,d=ue.isCSSRoundSupported,h="var(--scale-factor) * ".concat(l,"px"),p="var(--scale-factor) * ".concat(c,"px"),v=d?"round(".concat(h,", 1px)"):"calc(".concat(h,")"),y=d?"round(".concat(p,", 1px)"):"calc(".concat(p,")");if(a&&r.rotation%180!=0){u.width=y;u.height=v}else{u.width=v;u.height=y}}i&&t.setAttribute("data-main-rotation",r.rotation)}function tools_typeof(t){return tools_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tools_typeof(t)}function tools_defineProperty(t,r,a){(r=tools_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function tools_toConsumableArray(t){return function tools_arrayWithoutHoles(t){if(Array.isArray(t))return tools_arrayLikeToArray(t)}(t)||function tools_iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||tools_unsupportedIterableToArray(t)||function tools_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tools_slicedToArray(t,r){return function tools_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function tools_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||tools_unsupportedIterableToArray(t,r)||function tools_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tools_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */tools_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==tools_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(tools_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function tools_asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function tools_asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){tools_asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){tools_asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function tools_classPrivateMethodInitSpec(t,r){tools_checkPrivateRedeclaration(t,r);r.add(t)}function tools_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function tools_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function tools_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,tools_toPropertyKey(i.key),i)}}function tools_createClass(t,r,a){r&&tools_defineProperties(t.prototype,r);a&&tools_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function tools_toPropertyKey(t){var r=function tools_toPrimitive(t,r){if("object"!=tools_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=tools_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==tools_typeof(r)?r:String(r)}function tools_classPrivateFieldInitSpec(t,r,a){tools_checkPrivateRedeclaration(t,r);r.set(t,a)}function tools_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function tools_classPrivateFieldSet(t,r,a){!function tools_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,tools_classExtractFieldDescriptor(t,r,"set"),a);return a}function tools_classPrivateFieldGet(t,r){return function tools_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,tools_classExtractFieldDescriptor(t,r,"get"))}function tools_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function tools_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=tools_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function tools_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return tools_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?tools_arrayLikeToArray(t,r):void 0}}function tools_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function bindEvents(t,r,a){var i,o=tools_createForOfIteratorHelper(a);try{for(o.s();!(i=o.n()).done;){var l=i.value;r.addEventListener(l,t[l].bind(t))}}catch(t){o.e(t)}finally{o.f()}}var tt=new WeakMap,rt=function(){function IdManager(){tools_classCallCheck(this,IdManager);tools_classPrivateFieldInitSpec(this,tt,{writable:!0,value:0})}tools_createClass(IdManager,[{key:"getId",value:function getId(){var t,r;return"".concat("pdfjs_internal_editor_").concat((tools_classPrivateFieldSet(this,tt,(t=tools_classPrivateFieldGet(this,tt),r=t++,t)),r))}}]);return IdManager}(),nt=new WeakMap,it=new WeakMap,ot=new WeakMap,st=new WeakSet,lt=function(){function ImageManager(){tools_classCallCheck(this,ImageManager);tools_classPrivateMethodInitSpec(this,st);tools_classPrivateFieldInitSpec(this,nt,{writable:!0,value:getUuid()});tools_classPrivateFieldInitSpec(this,it,{writable:!0,value:0});tools_classPrivateFieldInitSpec(this,ot,{writable:!0,value:null})}tools_createClass(ImageManager,[{key:"getFromFile",value:(a=tools_asyncToGenerator(tools_regeneratorRuntime().mark((function _callee(t){var r,a,i,o;return tools_regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:r=t.lastModified,a=t.name,i=t.size,o=t.type;return l.abrupt("return",tools_classPrivateMethodGet(this,st,_get2).call(this,"".concat(r,"_").concat(a,"_").concat(i,"_").concat(o),t));case 2:case"end":return l.stop()}}),_callee,this)}))),function getFromFile(t){return a.apply(this,arguments)})},{key:"getFromUrl",value:(r=tools_asyncToGenerator(tools_regeneratorRuntime().mark((function _callee2(t){return tools_regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",tools_classPrivateMethodGet(this,st,_get2).call(this,t,t));case 1:case"end":return r.stop()}}),_callee2,this)}))),function getFromUrl(t){return r.apply(this,arguments)})},{key:"getFromId",value:(t=tools_asyncToGenerator(tools_regeneratorRuntime().mark((function _callee3(t){var r;return tools_regeneratorRuntime().wrap((function _callee3$(a){for(;;)switch(a.prev=a.next){case 0:tools_classPrivateFieldGet(this,ot)||tools_classPrivateFieldSet(this,ot,new Map);if(r=tools_classPrivateFieldGet(this,ot).get(t)){a.next=4;break}return a.abrupt("return",null);case 4:if(!r.bitmap){a.next=7;break}r.refCounter+=1;return a.abrupt("return",r);case 7:if(!r.file){a.next=9;break}return a.abrupt("return",this.getFromFile(r.file));case 9:return a.abrupt("return",this.getFromUrl(r.url));case 10:case"end":return a.stop()}}),_callee3,this)}))),function getFromId(r){return t.apply(this,arguments)})},{key:"getSvgUrl",value:function getSvgUrl(t){var r=tools_classPrivateFieldGet(this,ot).get(t);return null!=r&&r.isSvg?r.svgUrl:null}},{key:"deleteId",value:function deleteId(t){tools_classPrivateFieldGet(this,ot)||tools_classPrivateFieldSet(this,ot,new Map);var r=tools_classPrivateFieldGet(this,ot).get(t);if(r){r.refCounter-=1;0===r.refCounter&&(r.bitmap=null)}}},{key:"isValidId",value:function isValidId(t){return t.startsWith("image_".concat(tools_classPrivateFieldGet(this,nt),"_"))}}],[{key:"_isSVGFittingCanvas",get:function get(){var t=new OffscreenCanvas(1,3).getContext("2d"),r=new Image;r.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>';return shadow(this,"_isSVGFittingCanvas",r.decode().then((function(){t.drawImage(r,0,0,1,1,0,0,1,3);return 0===new Uint32Array(t.getImageData(0,0,1,1).data.buffer)[0]})))}}]);var t,r,a;return ImageManager}();Ze=lt;function _get2(t,r){return _get3.apply(this,arguments)}function _get3(){_get3=tools_asyncToGenerator(tools_regeneratorRuntime().mark((function _callee5(t,r){var a,i,o,l,c,u,d,h,p;return tools_regeneratorRuntime().wrap((function _callee5$(v){for(;;)switch(v.prev=v.next){case 0:tools_classPrivateFieldGet(this,ot)||tools_classPrivateFieldSet(this,ot,new Map);if(null!==(i=tools_classPrivateFieldGet(this,ot).get(t))){v.next=4;break}return v.abrupt("return",null);case 4:if(null===(a=i)||void 0===a||!a.bitmap){v.next=7;break}i.refCounter+=1;return v.abrupt("return",i);case 7:v.prev=7;i||(i={bitmap:null,id:"image_".concat(tools_classPrivateFieldGet(this,nt),"_").concat((tools_classPrivateFieldSet(this,it,(o=tools_classPrivateFieldGet(this,it),l=o++,o)),l)),refCounter:0,isSvg:!1});if("string"!=typeof r){v.next=16;break}i.url=r;v.next=13;return fetchData(r,"blob");case 13:c=v.sent;v.next=17;break;case 16:c=i.file=r;case 17:if("image/svg+xml"!==c.type){v.next=27;break}u=Ze._isSVGFittingCanvas;d=new FileReader;h=new Image;p=new Promise((function(t,r){h.onload=function(){i.bitmap=h;i.isSvg=!0;t()};d.onload=tools_asyncToGenerator(tools_regeneratorRuntime().mark((function _callee4(){var t;return tools_regeneratorRuntime().wrap((function _callee4$(r){for(;;)switch(r.prev=r.next){case 0:t=i.svgUrl=d.result;r.next=3;return u;case 3:if(!r.sent){r.next=7;break}r.t0="".concat(t,"#svgView(preserveAspectRatio(none))");r.next=8;break;case 7:r.t0=t;case 8:h.src=r.t0;case 9:case"end":return r.stop()}}),_callee4)})));h.onerror=d.onerror=r}));d.readAsDataURL(c);v.next=25;return p;case 25:v.next=30;break;case 27:v.next=29;return createImageBitmap(c);case 29:i.bitmap=v.sent;case 30:i.refCounter=1;v.next=37;break;case 33:v.prev=33;v.t0=v.catch(7);console.error(v.t0);i=null;case 37:tools_classPrivateFieldGet(this,ot).set(t,i);i&&tools_classPrivateFieldGet(this,ot).set(i.id,i);return v.abrupt("return",i);case 40:case"end":return v.stop()}}),_callee5,this,[[7,33]])})));return _get3.apply(this,arguments)}var ct=new WeakMap,ut=new WeakMap,dt=new WeakMap,ht=new WeakMap,ft=function(){function CommandManager(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;tools_classCallCheck(this,CommandManager);tools_classPrivateFieldInitSpec(this,ct,{writable:!0,value:[]});tools_classPrivateFieldInitSpec(this,ut,{writable:!0,value:!1});tools_classPrivateFieldInitSpec(this,dt,{writable:!0,value:void 0});tools_classPrivateFieldInitSpec(this,ht,{writable:!0,value:-1});tools_classPrivateFieldSet(this,dt,t)}tools_createClass(CommandManager,[{key:"add",value:function add(t){var r=t.cmd,a=t.undo,i=t.mustExec,o=t.type,l=void 0===o?NaN:o,c=t.overwriteIfSameType,u=void 0!==c&&c,d=t.keepUndo,h=void 0!==d&&d;i&&r();if(!tools_classPrivateFieldGet(this,ut)){var p={cmd:r,undo:a,type:l};if(-1!==tools_classPrivateFieldGet(this,ht))if(u&&tools_classPrivateFieldGet(this,ct)[tools_classPrivateFieldGet(this,ht)].type===l){h&&(p.undo=tools_classPrivateFieldGet(this,ct)[tools_classPrivateFieldGet(this,ht)].undo);tools_classPrivateFieldGet(this,ct)[tools_classPrivateFieldGet(this,ht)]=p}else{var v=tools_classPrivateFieldGet(this,ht)+1;if(v===tools_classPrivateFieldGet(this,dt))tools_classPrivateFieldGet(this,ct).splice(0,1);else{tools_classPrivateFieldSet(this,ht,v);v<tools_classPrivateFieldGet(this,ct).length&&tools_classPrivateFieldGet(this,ct).splice(v)}tools_classPrivateFieldGet(this,ct).push(p)}else{tools_classPrivateFieldGet(this,ct).length>0&&(tools_classPrivateFieldGet(this,ct).length=0);tools_classPrivateFieldSet(this,ht,0);tools_classPrivateFieldGet(this,ct).push(p)}}}},{key:"undo",value:function undo(){if(-1!==tools_classPrivateFieldGet(this,ht)){tools_classPrivateFieldSet(this,ut,!0);tools_classPrivateFieldGet(this,ct)[tools_classPrivateFieldGet(this,ht)].undo();tools_classPrivateFieldSet(this,ut,!1);tools_classPrivateFieldSet(this,ht,tools_classPrivateFieldGet(this,ht)-1)}}},{key:"redo",value:function redo(){if(tools_classPrivateFieldGet(this,ht)<tools_classPrivateFieldGet(this,ct).length-1){tools_classPrivateFieldSet(this,ht,tools_classPrivateFieldGet(this,ht)+1);tools_classPrivateFieldSet(this,ut,!0);tools_classPrivateFieldGet(this,ct)[tools_classPrivateFieldGet(this,ht)].cmd();tools_classPrivateFieldSet(this,ut,!1)}}},{key:"hasSomethingToUndo",value:function hasSomethingToUndo(){return-1!==tools_classPrivateFieldGet(this,ht)}},{key:"hasSomethingToRedo",value:function hasSomethingToRedo(){return tools_classPrivateFieldGet(this,ht)<tools_classPrivateFieldGet(this,ct).length-1}},{key:"destroy",value:function destroy(){tools_classPrivateFieldSet(this,ct,null)}},{key:"reset",value:function reset(){tools_classPrivateFieldSet(this,ct,[]);tools_classPrivateFieldSet(this,ht,-1);tools_classPrivateFieldSet(this,ut,!1)}}]);return CommandManager}(),pt=new WeakSet,vt=function(){function KeyboardManager(t){tools_classCallCheck(this,KeyboardManager);tools_classPrivateMethodInitSpec(this,pt);this.buffer=[];this.callbacks=new Map;this.allKeys=new Set;var r,a=ue.platform.isMac,i=tools_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var o,l=tools_slicedToArray(r.value,3),c=l[0],u=l[1],d=l[2],h=void 0===d?{}:d,p=tools_createForOfIteratorHelper(c);try{for(p.s();!(o=p.n()).done;){var v=o.value,y=v.startsWith("mac+");if(a&&y){this.callbacks.set(v.slice(4),{callback:u,options:h});this.allKeys.add(v.split("+").at(-1))}else if(!a&&!y){this.callbacks.set(v,{callback:u,options:h});this.allKeys.add(v.split("+").at(-1))}}}catch(t){p.e(t)}finally{p.f()}}}catch(t){i.e(t)}finally{i.f()}}tools_createClass(KeyboardManager,[{key:"exec",value:function exec(t,r){if(this.allKeys.has(r.key)){var a=this.callbacks.get(tools_classPrivateMethodGet(this,pt,_serialize2).call(this,r));if(a){var i=a.callback,o=a.options,l=o.bubbles,c=void 0!==l&&l,u=o.args,d=void 0===u?[]:u,h=o.checker,p=void 0===h?null:h;if(!p||p(t,r)){i.bind.apply(i,[t].concat(tools_toConsumableArray(d)))();if(!c){r.stopPropagation();r.preventDefault()}}}}}}]);return KeyboardManager}();function _serialize2(t){t.altKey&&this.buffer.push("alt");t.ctrlKey&&this.buffer.push("ctrl");t.metaKey&&this.buffer.push("meta");t.shiftKey&&this.buffer.push("shift");this.buffer.push(t.key);var r=this.buffer.join("+");this.buffer.length=0;return r}var yt=function(){function ColorManager(){tools_classCallCheck(this,ColorManager)}tools_createClass(ColorManager,[{key:"_colors",get:function get(){var t=new Map([["CanvasText",null],["Canvas",null]]);!function getColorValues(t){var r=document.createElement("span");r.style.visibility="hidden";document.body.append(r);var a,i=display_utils_createForOfIteratorHelper(t.keys());try{for(i.s();!(a=i.n()).done;){var o=a.value;r.style.color=o;var l=window.getComputedStyle(r).color;t.set(o,getRGB(l))}}catch(t){i.e(t)}finally{i.f()}r.remove()}(t);return shadow(this,"_colors",t)}},{key:"convert",value:function convert(t){var r=getRGB(t);if(!window.matchMedia("(forced-colors: active)").matches)return r;var a,i=tools_createForOfIteratorHelper(this._colors);try{for(i.s();!(a=i.n()).done;){var o=tools_slicedToArray(a.value,2),l=o[0];if(o[1].every((function(t,a){return t===r[a]})))return ColorManager._colorsMapping.get(l)}}catch(t){i.e(t)}finally{i.f()}return r}},{key:"getHexCode",value:function getHexCode(t){var r=this._colors.get(t);return r?he.makeHexColor.apply(he,tools_toConsumableArray(r)):t}}]);return ColorManager}();tools_defineProperty(yt,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));var _t=new WeakMap,gt=new WeakMap,mt=new WeakMap,bt=new WeakMap,wt=new WeakMap,Pt=new WeakMap,kt=new WeakMap,At=new WeakMap,St=new WeakMap,xt=new WeakMap,Ft=new WeakMap,Et=new WeakMap,It=new WeakMap,Ct=new WeakMap,Tt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Gt=new WeakMap,Rt=new WeakMap,Lt=new WeakMap,Dt=new WeakMap,jt=new WeakMap,Wt=new WeakMap,Nt=new WeakMap,Bt=new WeakMap,zt=new WeakMap,Ht=new WeakMap,Ut=new WeakMap,qt=new WeakMap,Vt=new WeakMap,Kt=new WeakMap,Yt=new WeakMap,Xt=new WeakMap,$t=new WeakMap,Jt=new WeakMap,Qt=new WeakSet,Zt=new WeakSet,er=new WeakSet,tr=new WeakSet,rr=new WeakSet,nr=new WeakSet,ar=new WeakSet,ir=new WeakSet,or=new WeakSet,sr=new WeakSet,lr=new WeakSet,cr=new WeakSet,ur=new WeakSet,dr=function(){function AnnotationEditorUIManager(t,r,a,i,o,l){tools_classCallCheck(this,AnnotationEditorUIManager);tools_classPrivateMethodInitSpec(this,ur);tools_classPrivateMethodInitSpec(this,cr);tools_classPrivateMethodInitSpec(this,lr);tools_classPrivateMethodInitSpec(this,sr);tools_classPrivateMethodInitSpec(this,or);tools_classPrivateMethodInitSpec(this,ir);tools_classPrivateMethodInitSpec(this,ar);tools_classPrivateMethodInitSpec(this,nr);tools_classPrivateMethodInitSpec(this,rr);tools_classPrivateMethodInitSpec(this,tr);tools_classPrivateMethodInitSpec(this,er);tools_classPrivateMethodInitSpec(this,Zt);tools_classPrivateMethodInitSpec(this,Qt);tools_classPrivateFieldInitSpec(this,_t,{writable:!0,value:null});tools_classPrivateFieldInitSpec(this,gt,{writable:!0,value:new Map});tools_classPrivateFieldInitSpec(this,mt,{writable:!0,value:new Map});tools_classPrivateFieldInitSpec(this,bt,{writable:!0,value:null});tools_classPrivateFieldInitSpec(this,wt,{writable:!0,value:null});tools_classPrivateFieldInitSpec(this,Pt,{writable:!0,value:new ft});tools_classPrivateFieldInitSpec(this,kt,{writable:!0,value:0});tools_classPrivateFieldInitSpec(this,At,{writable:!0,value:new Set});tools_classPrivateFieldInitSpec(this,St,{writable:!0,value:null});tools_classPrivateFieldInitSpec(this,xt,{writable:!0,value:null});tools_classPrivateFieldInitSpec(this,Ft,{writable:!0,value:new Set});tools_classPrivateFieldInitSpec(this,Et,{writable:!0,value:null});tools_classPrivateFieldInitSpec(this,It,{writable:!0,value:null});tools_classPrivateFieldInitSpec(this,Ct,{writable:!0,value:new rt});tools_classPrivateFieldInitSpec(this,Tt,{writable:!0,value:!1});tools_classPrivateFieldInitSpec(this,Mt,{writable:!0,value:!1});tools_classPrivateFieldInitSpec(this,Ot,{writable:!0,value:null});tools_classPrivateFieldInitSpec(this,Gt,{writable:!0,value:_.NONE});tools_classPrivateFieldInitSpec(this,Rt,{writable:!0,value:new Set});tools_classPrivateFieldInitSpec(this,Lt,{writable:!0,value:null});tools_classPrivateFieldInitSpec(this,Dt,{writable:!0,value:this.blur.bind(this)});tools_classPrivateFieldInitSpec(this,jt,{writable:!0,value:this.focus.bind(this)});tools_classPrivateFieldInitSpec(this,Wt,{writable:!0,value:this.copy.bind(this)});tools_classPrivateFieldInitSpec(this,Nt,{writable:!0,value:this.cut.bind(this)});tools_classPrivateFieldInitSpec(this,Bt,{writable:!0,value:this.paste.bind(this)});tools_classPrivateFieldInitSpec(this,zt,{writable:!0,value:this.keydown.bind(this)});tools_classPrivateFieldInitSpec(this,Ht,{writable:!0,value:this.onEditingAction.bind(this)});tools_classPrivateFieldInitSpec(this,Ut,{writable:!0,value:this.onPageChanging.bind(this)});tools_classPrivateFieldInitSpec(this,qt,{writable:!0,value:this.onScaleChanging.bind(this)});tools_classPrivateFieldInitSpec(this,Vt,{writable:!0,value:this.onRotationChanging.bind(this)});tools_classPrivateFieldInitSpec(this,Kt,{writable:!0,value:{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}});tools_classPrivateFieldInitSpec(this,Yt,{writable:!0,value:[0,0]});tools_classPrivateFieldInitSpec(this,Xt,{writable:!0,value:null});tools_classPrivateFieldInitSpec(this,$t,{writable:!0,value:null});tools_classPrivateFieldInitSpec(this,Jt,{writable:!0,value:null});tools_classPrivateFieldSet(this,$t,t);tools_classPrivateFieldSet(this,Jt,r);tools_classPrivateFieldSet(this,bt,a);this._eventBus=i;this._eventBus._on("editingaction",tools_classPrivateFieldGet(this,Ht));this._eventBus._on("pagechanging",tools_classPrivateFieldGet(this,Ut));this._eventBus._on("scalechanging",tools_classPrivateFieldGet(this,qt));this._eventBus._on("rotationchanging",tools_classPrivateFieldGet(this,Vt));tools_classPrivateFieldSet(this,wt,o.annotationStorage);tools_classPrivateFieldSet(this,Et,o.filterFactory);tools_classPrivateFieldSet(this,Lt,l);this.viewParameters={realScale:Se.PDF_TO_CSS_UNITS,rotation:0}}tools_createClass(AnnotationEditorUIManager,[{key:"destroy",value:function destroy(){tools_classPrivateMethodGet(this,tr,_removeKeyboardManager2).call(this);tools_classPrivateMethodGet(this,Zt,_removeFocusManager2).call(this);this._eventBus._off("editingaction",tools_classPrivateFieldGet(this,Ht));this._eventBus._off("pagechanging",tools_classPrivateFieldGet(this,Ut));this._eventBus._off("scalechanging",tools_classPrivateFieldGet(this,qt));this._eventBus._off("rotationchanging",tools_classPrivateFieldGet(this,Vt));var t,r=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,mt).values());try{for(r.s();!(t=r.n()).done;){t.value.destroy()}}catch(t){r.e(t)}finally{r.f()}tools_classPrivateFieldGet(this,mt).clear();tools_classPrivateFieldGet(this,gt).clear();tools_classPrivateFieldGet(this,Ft).clear();tools_classPrivateFieldSet(this,_t,null);tools_classPrivateFieldGet(this,Rt).clear();tools_classPrivateFieldGet(this,Pt).destroy();tools_classPrivateFieldGet(this,bt).destroy();if(tools_classPrivateFieldGet(this,It)){clearTimeout(tools_classPrivateFieldGet(this,It));tools_classPrivateFieldSet(this,It,null)}if(tools_classPrivateFieldGet(this,Xt)){clearTimeout(tools_classPrivateFieldGet(this,Xt));tools_classPrivateFieldSet(this,Xt,null)}}},{key:"hcmFilter",get:function get(){return shadow(this,"hcmFilter",tools_classPrivateFieldGet(this,Lt)?tools_classPrivateFieldGet(this,Et).addHCMFilter(tools_classPrivateFieldGet(this,Lt).foreground,tools_classPrivateFieldGet(this,Lt).background):"none")}},{key:"direction",get:function get(){return shadow(this,"direction",getComputedStyle(tools_classPrivateFieldGet(this,$t)).direction)}},{key:"editAltText",value:function editAltText(t){var r;null===(r=tools_classPrivateFieldGet(this,bt))||void 0===r||r.editAltText(this,t)}},{key:"onPageChanging",value:function onPageChanging(t){var r=t.pageNumber;tools_classPrivateFieldSet(this,kt,r-1)}},{key:"focusMainContainer",value:function focusMainContainer(){tools_classPrivateFieldGet(this,$t).focus()}},{key:"findParent",value:function findParent(t,r){var a,i=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,mt).values());try{for(i.s();!(a=i.n()).done;){var o=a.value,l=o.div.getBoundingClientRect(),c=l.x,u=l.y,d=l.width,h=l.height;if(t>=c&&t<=c+d&&r>=u&&r<=u+h)return o}}catch(t){i.e(t)}finally{i.f()}return null}},{key:"disableUserSelect",value:function disableUserSelect(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];tools_classPrivateFieldGet(this,Jt).classList.toggle("noUserSelect",t)}},{key:"addShouldRescale",value:function addShouldRescale(t){tools_classPrivateFieldGet(this,Ft).add(t)}},{key:"removeShouldRescale",value:function removeShouldRescale(t){tools_classPrivateFieldGet(this,Ft).delete(t)}},{key:"onScaleChanging",value:function onScaleChanging(t){var r=t.scale;this.commitOrRemove();this.viewParameters.realScale=r*Se.PDF_TO_CSS_UNITS;var a,i=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,Ft));try{for(i.s();!(a=i.n()).done;){a.value.onScaleChanging()}}catch(t){i.e(t)}finally{i.f()}}},{key:"onRotationChanging",value:function onRotationChanging(t){var r=t.pagesRotation;this.commitOrRemove();this.viewParameters.rotation=r}},{key:"addToAnnotationStorage",value:function addToAnnotationStorage(t){t.isEmpty()||!tools_classPrivateFieldGet(this,wt)||tools_classPrivateFieldGet(this,wt).has(t.id)||tools_classPrivateFieldGet(this,wt).setValue(t.id,t)}},{key:"blur",value:function blur(){if(this.hasSelection){var t,r=document.activeElement,a=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,Rt));try{for(a.s();!(t=a.n()).done;){var i=t.value;if(i.div.contains(r)){tools_classPrivateFieldSet(this,Ot,[i,r]);i._focusEventsAllowed=!1;break}}}catch(t){a.e(t)}finally{a.f()}}}},{key:"focus",value:function focus(){if(tools_classPrivateFieldGet(this,Ot)){var t=tools_slicedToArray(tools_classPrivateFieldGet(this,Ot),2),r=t[0],a=t[1];tools_classPrivateFieldSet(this,Ot,null);a.addEventListener("focusin",(function(){r._focusEventsAllowed=!0}),{once:!0});a.focus()}}},{key:"addEditListeners",value:function addEditListeners(){tools_classPrivateMethodGet(this,er,_addKeyboardManager2).call(this);tools_classPrivateMethodGet(this,rr,_addCopyPasteListeners2).call(this)}},{key:"removeEditListeners",value:function removeEditListeners(){tools_classPrivateMethodGet(this,tr,_removeKeyboardManager2).call(this);tools_classPrivateMethodGet(this,nr,_removeCopyPasteListeners2).call(this)}},{key:"copy",value:function copy(t){var r;t.preventDefault();null===(r=tools_classPrivateFieldGet(this,_t))||void 0===r||r.commitOrRemove();if(this.hasSelection){var a,i=[],o=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,Rt));try{for(o.s();!(a=o.n()).done;){var l=a.value.serialize(!0);l&&i.push(l)}}catch(t){o.e(t)}finally{o.f()}0!==i.length&&t.clipboardData.setData("application/pdfjs",JSON.stringify(i))}}},{key:"cut",value:function cut(t){this.copy(t);this.delete()}},{key:"paste",value:function paste(t){t.preventDefault();var r,a=t.clipboardData,i=tools_createForOfIteratorHelper(a.items);try{for(i.s();!(r=i.n()).done;){var o,l=r.value,c=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,xt));try{for(c.s();!(o=c.n()).done;){var u=o.value;if(u.isHandlingMimeForPasting(l.type)){u.paste(l,this.currentLayer);return}}}catch(t){c.e(t)}finally{c.f()}}}catch(t){i.e(t)}finally{i.f()}var d=a.getData("application/pdfjs");this.addSerializedEditor(d)}},{key:"addSerializedEditor",value:function addSerializedEditor(t){var r=this,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t){try{"string"==typeof t&&(t=JSON.parse(t))}catch(t){warn('paste: "'.concat(t.message,'".'));return}if(Array.isArray(t)){var l=tools_classPrivateFieldGet(this,Gt);a&&l===_.NONE&&this.updateMode(_.FREETEXT);this.unselectAll();try{var c,u=[],d=tools_createForOfIteratorHelper(t);try{for(d.s();!(c=d.n()).done;){var h=c.value,p=void 0===h.pageIndex,v=(o||p?this.currentLayer:this.getLayer(h.pageIndex)).deserialize(h);if(!v)return;v.doNotMove=i;u.push(v)}}catch(t){d.e(t)}finally{d.f()}this.addCommands({cmd:function cmd(){for(var t=0,a=u;t<a.length;t++){var i=a[t];tools_classPrivateMethodGet(r,lr,_addEditorToLayer2).call(r,i)}tools_classPrivateMethodGet(r,ur,_selectEditors2).call(r,u)},undo:function undo(){for(var t=0,r=u;t<r.length;t++){r[t].remove()}},mustExec:!0})}catch(t){warn('paste: "'.concat(t.message,'".'))}a&&l!==tools_classPrivateFieldGet(this,Gt)&&this.updateMode(l)}}}},{key:"keydown",value:function keydown(t){this.isEditorHandlingKeyboard||AnnotationEditorUIManager._keyboardManager.exec(this,t)}},{key:"onEditingAction",value:function onEditingAction(t){["undo","redo","delete","selectAll"].includes(t.name)&&this[t.name]()}},{key:"setEditingState",value:function setEditingState(t){if(t){tools_classPrivateMethodGet(this,Qt,_addFocusManager2).call(this);tools_classPrivateMethodGet(this,er,_addKeyboardManager2).call(this);tools_classPrivateMethodGet(this,rr,_addCopyPasteListeners2).call(this);tools_classPrivateMethodGet(this,ar,_dispatchUpdateStates2).call(this,{isEditing:tools_classPrivateFieldGet(this,Gt)!==_.NONE,isEmpty:tools_classPrivateMethodGet(this,cr,_isEmpty2).call(this),hasSomethingToUndo:tools_classPrivateFieldGet(this,Pt).hasSomethingToUndo(),hasSomethingToRedo:tools_classPrivateFieldGet(this,Pt).hasSomethingToRedo(),hasSelectedEditor:!1})}else{tools_classPrivateMethodGet(this,Zt,_removeFocusManager2).call(this);tools_classPrivateMethodGet(this,tr,_removeKeyboardManager2).call(this);tools_classPrivateMethodGet(this,nr,_removeCopyPasteListeners2).call(this);tools_classPrivateMethodGet(this,ar,_dispatchUpdateStates2).call(this,{isEditing:!1});this.disableUserSelect(!1)}}},{key:"registerEditorTypes",value:function registerEditorTypes(t){if(!tools_classPrivateFieldGet(this,xt)){tools_classPrivateFieldSet(this,xt,t);var r,a=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,xt));try{for(a.s();!(r=a.n()).done;){var i=r.value;tools_classPrivateMethodGet(this,ir,_dispatchUpdateUI2).call(this,i.defaultPropertiesToUpdate)}}catch(t){a.e(t)}finally{a.f()}}}},{key:"getId",value:function getId(){return tools_classPrivateFieldGet(this,Ct).getId()}},{key:"currentLayer",get:function get(){return tools_classPrivateFieldGet(this,mt).get(tools_classPrivateFieldGet(this,kt))}},{key:"getLayer",value:function getLayer(t){return tools_classPrivateFieldGet(this,mt).get(t)}},{key:"currentPageIndex",get:function get(){return tools_classPrivateFieldGet(this,kt)}},{key:"addLayer",value:function addLayer(t){tools_classPrivateFieldGet(this,mt).set(t.pageIndex,t);tools_classPrivateFieldGet(this,Tt)?t.enable():t.disable()}},{key:"removeLayer",value:function removeLayer(t){tools_classPrivateFieldGet(this,mt).delete(t.pageIndex)}},{key:"updateMode",value:function updateMode(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(tools_classPrivateFieldGet(this,Gt)!==t){tools_classPrivateFieldSet(this,Gt,t);if(t!==_.NONE){this.setEditingState(!0);tools_classPrivateMethodGet(this,or,_enableAll2).call(this);this.unselectAll();var i,o=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,mt).values());try{for(o.s();!(i=o.n()).done;){i.value.updateMode(t)}}catch(t){o.e(t)}finally{o.f()}if(r||!a){if(r){var l,c=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,gt).values());try{for(c.s();!(l=c.n()).done;){var u=l.value;if(u.annotationElementId===r){this.setSelected(u);u.enterInEditMode();break}}}catch(t){c.e(t)}finally{c.f()}}}else this.addNewEditorFromKeyboard()}else{this.setEditingState(!1);tools_classPrivateMethodGet(this,sr,_disableAll2).call(this)}}}},{key:"addNewEditorFromKeyboard",value:function addNewEditorFromKeyboard(){this.currentLayer.addNewEditor()}},{key:"updateToolbar",value:function updateToolbar(t){t!==tools_classPrivateFieldGet(this,Gt)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:t})}},{key:"updateParams",value:function updateParams(t,r){if(tools_classPrivateFieldGet(this,xt))if(t!==g.CREATE){var a,i=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,Rt));try{for(i.s();!(a=i.n()).done;){a.value.updateParams(t,r)}}catch(t){i.e(t)}finally{i.f()}var o,l=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,xt));try{for(l.s();!(o=l.n()).done;){o.value.updateDefaultParams(t,r)}}catch(t){l.e(t)}finally{l.f()}}else this.currentLayer.addNewEditor()}},{key:"enableWaiting",value:function enableWaiting(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(tools_classPrivateFieldGet(this,Mt)!==t){tools_classPrivateFieldSet(this,Mt,t);var r,a=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,mt).values());try{for(a.s();!(r=a.n()).done;){var i=r.value;t?i.disableClick():i.enableClick();i.div.classList.toggle("waiting",t)}}catch(t){a.e(t)}finally{a.f()}}}},{key:"getEditors",value:function getEditors(t){var r,a=[],i=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,gt).values());try{for(i.s();!(r=i.n()).done;){var o=r.value;o.pageIndex===t&&a.push(o)}}catch(t){i.e(t)}finally{i.f()}return a}},{key:"getEditor",value:function getEditor(t){return tools_classPrivateFieldGet(this,gt).get(t)}},{key:"addEditor",value:function addEditor(t){tools_classPrivateFieldGet(this,gt).set(t.id,t)}},{key:"removeEditor",value:function removeEditor(t){var r=this;if(t.div.contains(document.activeElement)){tools_classPrivateFieldGet(this,It)&&clearTimeout(tools_classPrivateFieldGet(this,It));tools_classPrivateFieldSet(this,It,setTimeout((function(){r.focusMainContainer();tools_classPrivateFieldSet(r,It,null)}),0))}tools_classPrivateFieldGet(this,gt).delete(t.id);this.unselect(t);if(!t.annotationElementId||!tools_classPrivateFieldGet(this,At).has(t.annotationElementId)){var a;null===(a=tools_classPrivateFieldGet(this,wt))||void 0===a||a.remove(t.id)}}},{key:"addDeletedAnnotationElement",value:function addDeletedAnnotationElement(t){tools_classPrivateFieldGet(this,At).add(t.annotationElementId);t.deleted=!0}},{key:"isDeletedAnnotationElement",value:function isDeletedAnnotationElement(t){return tools_classPrivateFieldGet(this,At).has(t)}},{key:"removeDeletedAnnotationElement",value:function removeDeletedAnnotationElement(t){tools_classPrivateFieldGet(this,At).delete(t.annotationElementId);t.deleted=!1}},{key:"setActiveEditor",value:function setActiveEditor(t){if(tools_classPrivateFieldGet(this,_t)!==t){tools_classPrivateFieldSet(this,_t,t);t&&tools_classPrivateMethodGet(this,ir,_dispatchUpdateUI2).call(this,t.propertiesToUpdate)}}},{key:"toggleSelected",value:function toggleSelected(t){if(tools_classPrivateFieldGet(this,Rt).has(t)){tools_classPrivateFieldGet(this,Rt).delete(t);t.unselect();tools_classPrivateMethodGet(this,ar,_dispatchUpdateStates2).call(this,{hasSelectedEditor:this.hasSelection})}else{tools_classPrivateFieldGet(this,Rt).add(t);t.select();tools_classPrivateMethodGet(this,ir,_dispatchUpdateUI2).call(this,t.propertiesToUpdate);tools_classPrivateMethodGet(this,ar,_dispatchUpdateStates2).call(this,{hasSelectedEditor:!0})}}},{key:"setSelected",value:function setSelected(t){var r,a=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,Rt));try{for(a.s();!(r=a.n()).done;){var i=r.value;i!==t&&i.unselect()}}catch(t){a.e(t)}finally{a.f()}tools_classPrivateFieldGet(this,Rt).clear();tools_classPrivateFieldGet(this,Rt).add(t);t.select();tools_classPrivateMethodGet(this,ir,_dispatchUpdateUI2).call(this,t.propertiesToUpdate);tools_classPrivateMethodGet(this,ar,_dispatchUpdateStates2).call(this,{hasSelectedEditor:!0})}},{key:"isSelected",value:function isSelected(t){return tools_classPrivateFieldGet(this,Rt).has(t)}},{key:"firstSelectedEditor",get:function get(){return tools_classPrivateFieldGet(this,Rt).values().next().value}},{key:"unselect",value:function unselect(t){t.unselect();tools_classPrivateFieldGet(this,Rt).delete(t);tools_classPrivateMethodGet(this,ar,_dispatchUpdateStates2).call(this,{hasSelectedEditor:this.hasSelection})}},{key:"hasSelection",get:function get(){return 0!==tools_classPrivateFieldGet(this,Rt).size}},{key:"isEnterHandled",get:function get(){return 1===tools_classPrivateFieldGet(this,Rt).size&&this.firstSelectedEditor.isEnterHandled}},{key:"undo",value:function undo(){tools_classPrivateFieldGet(this,Pt).undo();tools_classPrivateMethodGet(this,ar,_dispatchUpdateStates2).call(this,{hasSomethingToUndo:tools_classPrivateFieldGet(this,Pt).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:tools_classPrivateMethodGet(this,cr,_isEmpty2).call(this)})}},{key:"redo",value:function redo(){tools_classPrivateFieldGet(this,Pt).redo();tools_classPrivateMethodGet(this,ar,_dispatchUpdateStates2).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:tools_classPrivateFieldGet(this,Pt).hasSomethingToRedo(),isEmpty:tools_classPrivateMethodGet(this,cr,_isEmpty2).call(this)})}},{key:"addCommands",value:function addCommands(t){tools_classPrivateFieldGet(this,Pt).add(t);tools_classPrivateMethodGet(this,ar,_dispatchUpdateStates2).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:tools_classPrivateMethodGet(this,cr,_isEmpty2).call(this)})}},{key:"delete",value:function _delete(){var t=this;this.commitOrRemove();if(this.hasSelection){var r=tools_toConsumableArray(tools_classPrivateFieldGet(this,Rt));this.addCommands({cmd:function cmd(){var t,a=tools_createForOfIteratorHelper(r);try{for(a.s();!(t=a.n()).done;){t.value.remove()}}catch(t){a.e(t)}finally{a.f()}},undo:function undo(){var a,i=tools_createForOfIteratorHelper(r);try{for(i.s();!(a=i.n()).done;){var o=a.value;tools_classPrivateMethodGet(t,lr,_addEditorToLayer2).call(t,o)}}catch(t){i.e(t)}finally{i.f()}},mustExec:!0})}}},{key:"commitOrRemove",value:function commitOrRemove(){var t;null===(t=tools_classPrivateFieldGet(this,_t))||void 0===t||t.commitOrRemove()}},{key:"hasSomethingToControl",value:function hasSomethingToControl(){return tools_classPrivateFieldGet(this,_t)||this.hasSelection}},{key:"selectAll",value:function selectAll(){var t,r=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,Rt));try{for(r.s();!(t=r.n()).done;){t.value.commit()}}catch(t){r.e(t)}finally{r.f()}tools_classPrivateMethodGet(this,ur,_selectEditors2).call(this,tools_classPrivateFieldGet(this,gt).values())}},{key:"unselectAll",value:function unselectAll(){if(tools_classPrivateFieldGet(this,_t))tools_classPrivateFieldGet(this,_t).commitOrRemove();else if(this.hasSelection){var t,r=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,Rt));try{for(r.s();!(t=r.n()).done;){t.value.unselect()}}catch(t){r.e(t)}finally{r.f()}tools_classPrivateFieldGet(this,Rt).clear();tools_classPrivateMethodGet(this,ar,_dispatchUpdateStates2).call(this,{hasSelectedEditor:!1})}}},{key:"translateSelectedEditors",value:function translateSelectedEditors(t,r){var a=this;arguments.length>2&&void 0!==arguments[2]&&arguments[2]||this.commitOrRemove();if(this.hasSelection){tools_classPrivateFieldGet(this,Yt)[0]+=t;tools_classPrivateFieldGet(this,Yt)[1]+=r;var i=tools_slicedToArray(tools_classPrivateFieldGet(this,Yt),2),o=i[0],l=i[1],c=tools_toConsumableArray(tools_classPrivateFieldGet(this,Rt));tools_classPrivateFieldGet(this,Xt)&&clearTimeout(tools_classPrivateFieldGet(this,Xt));tools_classPrivateFieldSet(this,Xt,setTimeout((function(){tools_classPrivateFieldSet(a,Xt,null);tools_classPrivateFieldGet(a,Yt)[0]=tools_classPrivateFieldGet(a,Yt)[1]=0;a.addCommands({cmd:function cmd(){var t,r=tools_createForOfIteratorHelper(c);try{for(r.s();!(t=r.n()).done;){var i=t.value;tools_classPrivateFieldGet(a,gt).has(i.id)&&i.translateInPage(o,l)}}catch(t){r.e(t)}finally{r.f()}},undo:function undo(){var t,r=tools_createForOfIteratorHelper(c);try{for(r.s();!(t=r.n()).done;){var i=t.value;tools_classPrivateFieldGet(a,gt).has(i.id)&&i.translateInPage(-o,-l)}}catch(t){r.e(t)}finally{r.f()}},mustExec:!1})}),1e3));var u,d=tools_createForOfIteratorHelper(c);try{for(d.s();!(u=d.n()).done;){u.value.translateInPage(t,r)}}catch(t){d.e(t)}finally{d.f()}}}},{key:"setUpDragSession",value:function setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0);tools_classPrivateFieldSet(this,St,new Map);var t,r=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,Rt));try{for(r.s();!(t=r.n()).done;){var a=t.value;tools_classPrivateFieldGet(this,St).set(a,{savedX:a.x,savedY:a.y,savedPageIndex:a.pageIndex,newX:0,newY:0,newPageIndex:-1})}}catch(t){r.e(t)}finally{r.f()}}}},{key:"endDragSession",value:function endDragSession(){var t=this;if(!tools_classPrivateFieldGet(this,St))return!1;this.disableUserSelect(!1);var r=tools_classPrivateFieldGet(this,St);tools_classPrivateFieldSet(this,St,null);var a,i=!1,o=tools_createForOfIteratorHelper(r);try{for(o.s();!(a=o.n()).done;){var l=tools_slicedToArray(a.value,2),c=l[0],u=c.x,d=c.y,h=c.pageIndex,p=l[1];p.newX=u;p.newY=d;p.newPageIndex=h;i||(i=u!==p.savedX||d!==p.savedY||h!==p.savedPageIndex)}}catch(t){o.e(t)}finally{o.f()}if(!i)return!1;var v=function move(r,a,i,o){if(tools_classPrivateFieldGet(t,gt).has(r.id)){var l=tools_classPrivateFieldGet(t,mt).get(o);if(l)r._setParentAndPosition(l,a,i);else{r.pageIndex=o;r.x=a;r.y=i}}};this.addCommands({cmd:function cmd(){var t,a=tools_createForOfIteratorHelper(r);try{for(a.s();!(t=a.n()).done;){var i=tools_slicedToArray(t.value,2),o=i[0],l=i[1],c=l.newX,u=l.newY,d=l.newPageIndex;v(o,c,u,d)}}catch(t){a.e(t)}finally{a.f()}},undo:function undo(){var t,a=tools_createForOfIteratorHelper(r);try{for(a.s();!(t=a.n()).done;){var i=tools_slicedToArray(t.value,2),o=i[0],l=i[1],c=l.savedX,u=l.savedY,d=l.savedPageIndex;v(o,c,u,d)}}catch(t){a.e(t)}finally{a.f()}},mustExec:!0});return!0}},{key:"dragSelectedEditors",value:function dragSelectedEditors(t,r){if(tools_classPrivateFieldGet(this,St)){var a,i=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,St).keys());try{for(i.s();!(a=i.n()).done;){a.value.drag(t,r)}}catch(t){i.e(t)}finally{i.f()}}}},{key:"rebuild",value:function rebuild(t){if(null===t.parent){var r=this.getLayer(t.pageIndex);if(r){r.changeParent(t);r.addOrRebuild(t)}else{this.addEditor(t);this.addToAnnotationStorage(t);t.rebuild()}}else t.parent.addOrRebuild(t)}},{key:"isEditorHandlingKeyboard",get:function get(){var t;return(null===(t=this.getActive())||void 0===t?void 0:t.shouldGetKeyboardEvents())||1===tools_classPrivateFieldGet(this,Rt).size&&this.firstSelectedEditor.shouldGetKeyboardEvents()}},{key:"isActive",value:function isActive(t){return tools_classPrivateFieldGet(this,_t)===t}},{key:"getActive",value:function getActive(){return tools_classPrivateFieldGet(this,_t)}},{key:"getMode",value:function getMode(){return tools_classPrivateFieldGet(this,Gt)}},{key:"imageManager",get:function get(){return shadow(this,"imageManager",new lt)}},{key:"removeEditors",value:function removeEditors(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0},r=!1;tools_classPrivateFieldGet(this,mt).forEach((function(t){return t.setCleaningUp(!0)}));tools_classPrivateFieldGet(this,gt).forEach((function(a){if(t(a.serialize())){a.remove();r=!0}}));tools_classPrivateFieldGet(this,mt).forEach((function(t){return t.setCleaningUp(!1)}));if(r){tools_classPrivateMethodGet(this,ar,_dispatchUpdateStates2).call(this,{hasSomethingToUndo:!1,hasSomethingToRedo:!1,isEmpty:tools_classPrivateMethodGet(this,cr,_isEmpty2).call(this)});tools_classPrivateFieldGet(this,Pt).reset()}}}],[{key:"_keyboardManager",get:function get(){var t=AnnotationEditorUIManager.prototype,r=function arrowChecker(t){return tools_classPrivateFieldGet(t,$t).contains(document.activeElement)&&t.hasSomethingToControl()},a=function textInputChecker(t,r){var a=r.target;if(a instanceof HTMLInputElement){var i=a.type;return"text"!==i&&"number"!==i}return!0},i=this.TRANSLATE_SMALL,o=this.TRANSLATE_BIG;return shadow(this,"_keyboardManager",new vt([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:a}],[["ctrl+z","mac+meta+z"],t.undo,{checker:a}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:a}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:a}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:function checker(t,r){var a=r.target;return!(a instanceof HTMLButtonElement)&&tools_classPrivateFieldGet(t,$t).contains(a)&&!t.isEnterHandled}}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:function checker(t){return tools_classPrivateFieldGet(t,$t).contains(document.activeElement)}}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-i,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-o,0],checker:r}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[i,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[o,0],checker:r}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-i],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-o],checker:r}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,i],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,o],checker:r}]]))}}]);return AnnotationEditorUIManager}();function _addFocusManager2(){window.addEventListener("focus",tools_classPrivateFieldGet(this,jt));window.addEventListener("blur",tools_classPrivateFieldGet(this,Dt))}function _removeFocusManager2(){window.removeEventListener("focus",tools_classPrivateFieldGet(this,jt));window.removeEventListener("blur",tools_classPrivateFieldGet(this,Dt))}function _addKeyboardManager2(){window.addEventListener("keydown",tools_classPrivateFieldGet(this,zt))}function _removeKeyboardManager2(){window.removeEventListener("keydown",tools_classPrivateFieldGet(this,zt))}function _addCopyPasteListeners2(){document.addEventListener("copy",tools_classPrivateFieldGet(this,Wt));document.addEventListener("cut",tools_classPrivateFieldGet(this,Nt));document.addEventListener("paste",tools_classPrivateFieldGet(this,Bt))}function _removeCopyPasteListeners2(){document.removeEventListener("copy",tools_classPrivateFieldGet(this,Wt));document.removeEventListener("cut",tools_classPrivateFieldGet(this,Nt));document.removeEventListener("paste",tools_classPrivateFieldGet(this,Bt))}function _dispatchUpdateStates2(t){var r=this;Object.entries(t).some((function(t){var a=tools_slicedToArray(t,2),i=a[0],o=a[1];return tools_classPrivateFieldGet(r,Kt)[i]!==o}))&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(tools_classPrivateFieldGet(this,Kt),t)})}function _dispatchUpdateUI2(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}function _enableAll2(){if(!tools_classPrivateFieldGet(this,Tt)){tools_classPrivateFieldSet(this,Tt,!0);var t,r=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,mt).values());try{for(r.s();!(t=r.n()).done;){t.value.enable()}}catch(t){r.e(t)}finally{r.f()}}}function _disableAll2(){this.unselectAll();if(tools_classPrivateFieldGet(this,Tt)){tools_classPrivateFieldSet(this,Tt,!1);var t,r=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,mt).values());try{for(r.s();!(t=r.n()).done;){t.value.disable()}}catch(t){r.e(t)}finally{r.f()}}}function _addEditorToLayer2(t){var r=tools_classPrivateFieldGet(this,mt).get(t.pageIndex);r?r.addOrRebuild(t):this.addEditor(t)}function _isEmpty2(){if(0===tools_classPrivateFieldGet(this,gt).size)return!0;if(1===tools_classPrivateFieldGet(this,gt).size){var t,r=tools_createForOfIteratorHelper(tools_classPrivateFieldGet(this,gt).values());try{for(r.s();!(t=r.n()).done;){return t.value.isEmpty()}}catch(t){r.e(t)}finally{r.f()}}return!1}function _selectEditors2(t){tools_classPrivateFieldGet(this,Rt).clear();var r,a=tools_createForOfIteratorHelper(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;if(!i.isEmpty()){tools_classPrivateFieldGet(this,Rt).add(i);i.select()}}}catch(t){a.e(t)}finally{a.f()}tools_classPrivateMethodGet(this,ar,_dispatchUpdateStates2).call(this,{hasSelectedEditor:!0})}tools_defineProperty(dr,"TRANSLATE_SMALL",1);tools_defineProperty(dr,"TRANSLATE_BIG",10);function toolbar_typeof(t){return toolbar_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},toolbar_typeof(t)}function toolbar_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,toolbar_toPropertyKey(i.key),i)}}function toolbar_toPropertyKey(t){var r=function toolbar_toPrimitive(t,r){if("object"!=toolbar_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=toolbar_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==toolbar_typeof(r)?r:String(r)}function toolbar_classPrivateMethodInitSpec(t,r){toolbar_checkPrivateRedeclaration(t,r);r.add(t)}function toolbar_classPrivateFieldInitSpec(t,r,a){toolbar_checkPrivateRedeclaration(t,r);r.set(t,a)}function toolbar_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function toolbar_classPrivateFieldGet(t,r){return function toolbar_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,toolbar_classExtractFieldDescriptor(t,r,"get"))}function toolbar_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _classStaticPrivateMethodGet(t,r,a){!function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return a}function toolbar_classPrivateFieldSet(t,r,a){!function toolbar_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,toolbar_classExtractFieldDescriptor(t,r,"set"),a);return a}function toolbar_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var hr,fr=new WeakMap,pr=new WeakMap,vr=new WeakMap,yr=new WeakSet,_r=new WeakSet,gr=new WeakSet,mr=new WeakSet,br=function(){function EditorToolbar(t){!function toolbar_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,EditorToolbar);toolbar_classPrivateMethodInitSpec(this,mr);toolbar_classPrivateMethodInitSpec(this,gr);toolbar_classPrivateMethodInitSpec(this,_r);toolbar_classPrivateMethodInitSpec(this,yr);toolbar_classPrivateFieldInitSpec(this,fr,{writable:!0,value:null});toolbar_classPrivateFieldInitSpec(this,pr,{writable:!0,value:void 0});toolbar_classPrivateFieldInitSpec(this,vr,{writable:!0,value:null});toolbar_classPrivateFieldSet(this,pr,t)}!function toolbar_createClass(t,r,a){r&&toolbar_defineProperties(t.prototype,r);a&&toolbar_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(EditorToolbar,[{key:"render",value:function render(){var t=toolbar_classPrivateFieldSet(this,fr,document.createElement("div"));t.className="editToolbar";t.addEventListener("contextmenu",noContextMenu);t.addEventListener("pointerdown",_classStaticPrivateMethodGet(EditorToolbar,EditorToolbar,_pointerDown));var r=toolbar_classPrivateFieldSet(this,vr,document.createElement("div"));r.className="buttons";t.append(r);toolbar_classPrivateMethodGet(this,mr,_addDeleteButton2).call(this);return t}},{key:"hide",value:function hide(){toolbar_classPrivateFieldGet(this,fr).classList.add("hidden")}},{key:"show",value:function show(){toolbar_classPrivateFieldGet(this,fr).classList.remove("hidden")}},{key:"remove",value:function remove(){toolbar_classPrivateFieldGet(this,fr).remove()}}]);return EditorToolbar}();function _pointerDown(t){t.stopPropagation()}function _focusIn2(t){toolbar_classPrivateFieldGet(this,pr)._focusEventsAllowed=!1;t.preventDefault();t.stopPropagation()}function _focusOut2(t){toolbar_classPrivateFieldGet(this,pr)._focusEventsAllowed=!0;t.preventDefault();t.stopPropagation()}function _addListenersToElement2(t){t.addEventListener("focusin",toolbar_classPrivateMethodGet(this,yr,_focusIn2).bind(this),{capture:!0});t.addEventListener("focusout",toolbar_classPrivateMethodGet(this,_r,_focusOut2).bind(this),{capture:!0});t.addEventListener("contextmenu",noContextMenu)}function _addDeleteButton2(){var t=this,r=document.createElement("button");r.className="delete";r.tabIndex=0;r.setAttribute("data-l10n-id","pdfjs-editor-remove-button");toolbar_classPrivateMethodGet(this,gr,_addListenersToElement2).call(this,r);r.addEventListener("click",(function(r){toolbar_classPrivateFieldGet(t,pr)._uiManager.delete()}));toolbar_classPrivateFieldGet(this,vr).append(r)}function editor_typeof(t){return editor_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},editor_typeof(t)}function editor_toConsumableArray(t){return function editor_arrayWithoutHoles(t){if(Array.isArray(t))return editor_arrayLikeToArray(t)}(t)||function editor_iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||editor_unsupportedIterableToArray(t)||function editor_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function editor_setPrototypeOf(t,r){editor_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return editor_setPrototypeOf(t,r)}function editor_createSuper(t){var r=function editor_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=editor_getPrototypeOf(t);if(r){var o=editor_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function editor_possibleConstructorReturn(t,r){if(r&&("object"===editor_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function editor_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,a)}}function editor_getPrototypeOf(t){editor_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return editor_getPrototypeOf(t)}function editor_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=editor_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function editor_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */editor_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==editor_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(editor_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function editor_asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function editor_asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){editor_asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){editor_asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function editor_slicedToArray(t,r){return function editor_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function editor_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||editor_unsupportedIterableToArray(t,r)||function editor_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function editor_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return editor_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?editor_arrayLikeToArray(t,r):void 0}}function editor_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function editor_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function editor_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,editor_toPropertyKey(i.key),i)}}function editor_createClass(t,r,a){r&&editor_defineProperties(t.prototype,r);a&&editor_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function editor_classPrivateMethodInitSpec(t,r){editor_checkPrivateRedeclaration(t,r);r.add(t)}function editor_defineProperty(t,r,a){(r=editor_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function editor_toPropertyKey(t){var r=function editor_toPrimitive(t,r){if("object"!=editor_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=editor_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==editor_typeof(r)?r:String(r)}function editor_classPrivateFieldInitSpec(t,r,a){editor_checkPrivateRedeclaration(t,r);r.set(t,a)}function editor_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function editor_classStaticPrivateMethodGet(t,r,a){!function editor_classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return a}function editor_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function editor_classPrivateFieldSet(t,r,a){!function editor_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,editor_classExtractFieldDescriptor(t,r,"set"),a);return a}function editor_classPrivateFieldGet(t,r){return function editor_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,editor_classExtractFieldDescriptor(t,r,"get"))}function editor_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var wr=new WeakMap,Pr=new WeakMap,kr=new WeakMap,Ar=new WeakMap,Sr=new WeakMap,xr=new WeakMap,Fr=new WeakMap,Er=new WeakMap,Ir=new WeakMap,Cr=new WeakMap,Tr=new WeakMap,Mr=new WeakMap,Or=new WeakMap,Gr=new WeakMap,Rr=new WeakMap,Lr=new WeakMap,Dr=new WeakMap,jr=new WeakMap,Wr=new WeakMap,Nr=new WeakMap,Br=new WeakMap,zr=new WeakSet,Hr=new WeakSet,Ur=new WeakSet,qr=new WeakSet,Vr=new WeakSet,Kr=new WeakSet,Yr=new WeakSet,Xr=new WeakSet,$r=new WeakSet,Jr=new WeakSet,Qr=new WeakSet,Zr=new WeakSet,en=new WeakSet,tn=new WeakSet,rn=new WeakSet,nn=function(){function AnnotationEditor(t){editor_classCallCheck(this,AnnotationEditor);editor_classPrivateMethodInitSpec(this,rn);editor_classPrivateMethodInitSpec(this,tn);editor_classPrivateMethodInitSpec(this,en);editor_classPrivateMethodInitSpec(this,Zr);editor_classPrivateMethodInitSpec(this,Qr);editor_classPrivateMethodInitSpec(this,Jr);editor_classPrivateMethodInitSpec(this,$r);editor_classPrivateMethodInitSpec(this,Xr);editor_classPrivateMethodInitSpec(this,Yr);editor_classPrivateMethodInitSpec(this,Kr);editor_classPrivateMethodInitSpec(this,Vr);editor_classPrivateMethodInitSpec(this,qr);editor_classPrivateMethodInitSpec(this,Ur);editor_classPrivateMethodInitSpec(this,Hr);editor_classPrivateMethodInitSpec(this,zr);editor_classPrivateFieldInitSpec(this,wr,{writable:!0,value:null});editor_classPrivateFieldInitSpec(this,Pr,{writable:!0,value:""});editor_classPrivateFieldInitSpec(this,kr,{writable:!0,value:!1});editor_classPrivateFieldInitSpec(this,Ar,{writable:!0,value:null});editor_classPrivateFieldInitSpec(this,Sr,{writable:!0,value:null});editor_classPrivateFieldInitSpec(this,xr,{writable:!0,value:null});editor_classPrivateFieldInitSpec(this,Fr,{writable:!0,value:!1});editor_classPrivateFieldInitSpec(this,Er,{writable:!0,value:!1});editor_classPrivateFieldInitSpec(this,Ir,{writable:!0,value:null});editor_classPrivateFieldInitSpec(this,Cr,{writable:!0,value:null});editor_classPrivateFieldInitSpec(this,Tr,{writable:!0,value:this.focusin.bind(this)});editor_classPrivateFieldInitSpec(this,Mr,{writable:!0,value:this.focusout.bind(this)});editor_classPrivateFieldInitSpec(this,Or,{writable:!0,value:null});editor_classPrivateFieldInitSpec(this,Gr,{writable:!0,value:""});editor_classPrivateFieldInitSpec(this,Rr,{writable:!0,value:!1});editor_classPrivateFieldInitSpec(this,Lr,{writable:!0,value:!1});editor_classPrivateFieldInitSpec(this,Dr,{writable:!0,value:!1});editor_classPrivateFieldInitSpec(this,jr,{writable:!0,value:!1});editor_classPrivateFieldInitSpec(this,Wr,{writable:!0,value:null});editor_defineProperty(this,"_initialOptions",Object.create(null));editor_defineProperty(this,"_uiManager",null);editor_defineProperty(this,"_focusEventsAllowed",!0);editor_defineProperty(this,"_l10nPromise",null);editor_classPrivateFieldInitSpec(this,Nr,{writable:!0,value:!1});editor_classPrivateFieldInitSpec(this,Br,{writable:!0,value:AnnotationEditor._zIndex++});editor_defineProperty(this,"doNotMove",!1);this.constructor===AnnotationEditor&&unreachable("Cannot initialize AnnotationEditor.");this.parent=t.parent;this.id=t.id;this.width=this.height=null;this.pageIndex=t.parent.pageIndex;this.name=t.name;this.div=null;this._uiManager=t.uiManager;this.annotationElementId=null;this._willKeepAspectRatio=!1;this._initialOptions.isCentered=t.isCentered;this._structTreeParentId=null;var r=this.parent.viewport,a=r.rotation,i=r.rawDims,o=i.pageWidth,l=i.pageHeight,c=i.pageX,u=i.pageY;this.rotation=a;this.pageRotation=(360+a-this._uiManager.viewParameters.rotation)%360;this.pageDimensions=[o,l];this.pageTranslation=[c,u];var d=editor_slicedToArray(this.parentDimensions,2),h=d[0],p=d[1];this.x=t.x/h;this.y=t.y/p;this.isAttachedToDOM=!1;this.deleted=!1}editor_createClass(AnnotationEditor,[{key:"editorType",get:function get(){return Object.getPrototypeOf(this).constructor._type}},{key:"propertiesToUpdate",get:function get(){return[]}},{key:"_isDraggable",get:function get(){return editor_classPrivateFieldGet(this,Nr)},set:function set(t){var r;editor_classPrivateFieldSet(this,Nr,t);null===(r=this.div)||void 0===r||r.classList.toggle("draggable",t)}},{key:"isEnterHandled",get:function get(){return!0}},{key:"center",value:function center(){var t=editor_slicedToArray(this.pageDimensions,2),r=t[0],a=t[1];switch(this.parentRotation){case 90:this.x-=this.height*a/(2*r);this.y+=this.width*r/(2*a);break;case 180:this.x+=this.width/2;this.y+=this.height/2;break;case 270:this.x+=this.height*a/(2*r);this.y-=this.width*r/(2*a);break;default:this.x-=this.width/2;this.y-=this.height/2}this.fixAndSetPosition()}},{key:"addCommands",value:function addCommands(t){this._uiManager.addCommands(t)}},{key:"currentLayer",get:function get(){return this._uiManager.currentLayer}},{key:"setInBackground",value:function setInBackground(){this.div.style.zIndex=0}},{key:"setInForeground",value:function setInForeground(){this.div.style.zIndex=editor_classPrivateFieldGet(this,Br)}},{key:"setParent",value:function setParent(t){if(null!==t){this.pageIndex=t.pageIndex;this.pageDimensions=t.pageDimensions}else editor_classPrivateMethodGet(this,rn,_stopResizing2).call(this);this.parent=t}},{key:"focusin",value:function focusin(t){this._focusEventsAllowed&&(editor_classPrivateFieldGet(this,Rr)?editor_classPrivateFieldSet(this,Rr,!1):this.parent.setSelected(this))}},{key:"focusout",value:function focusout(t){var r;if(this._focusEventsAllowed&&this.isAttachedToDOM){var a=t.relatedTarget;if(null==a||!a.closest("#".concat(this.id))){t.preventDefault();null!==(r=this.parent)&&void 0!==r&&r.isMultipleSelection||this.commitOrRemove()}}}},{key:"commitOrRemove",value:function commitOrRemove(){this.isEmpty()?this.remove():this.commit()}},{key:"commit",value:function commit(){this.addToAnnotationStorage()}},{key:"addToAnnotationStorage",value:function addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}},{key:"setAt",value:function setAt(t,r,a,i){var o=editor_slicedToArray(this.parentDimensions,2),l=o[0],c=o[1],u=editor_slicedToArray(this.screenToPageTranslation(a,i),2);a=u[0];i=u[1];if(this.doNotMove){a=0;i=0}this.x=(t+a)/l;this.y=(r+i)/c;this.fixAndSetPosition()}},{key:"translate",value:function translate(t,r){editor_classPrivateMethodGet(this,zr,_translate2).call(this,this.parentDimensions,t,r)}},{key:"translateInPage",value:function translateInPage(t,r){editor_classPrivateMethodGet(this,zr,_translate2).call(this,this.pageDimensions,t,r);this.div.scrollIntoView({block:"nearest"})}},{key:"drag",value:function drag(t,r){var a=editor_slicedToArray(this.parentDimensions,2),i=a[0],o=a[1];this.x+=t/i;this.y+=r/o;if(this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){var l=this.div.getBoundingClientRect(),c=l.x,u=l.y;if(this.parent.findNewParent(this,c,u)){this.x-=Math.floor(this.x);this.y-=Math.floor(this.y)}}var d=this.x,h=this.y,p=editor_slicedToArray(editor_classPrivateMethodGet(this,Hr,_getBaseTranslation2).call(this),2);d+=p[0];h+=p[1];this.div.style.left="".concat((100*d).toFixed(2),"%");this.div.style.top="".concat((100*h).toFixed(2),"%");this.div.scrollIntoView({block:"nearest"})}},{key:"fixAndSetPosition",value:function fixAndSetPosition(){var t=editor_slicedToArray(this.pageDimensions,2),r=t[0],a=t[1],i=this.x,o=this.y,l=this.width,c=this.height;l*=r;c*=a;i*=r;o*=a;switch(this.rotation){case 0:i=Math.max(0,Math.min(r-l,i));o=Math.max(0,Math.min(a-c,o));break;case 90:i=Math.max(0,Math.min(r-c,i));o=Math.min(a,Math.max(l,o));break;case 180:i=Math.min(r,Math.max(l,i));o=Math.min(a,Math.max(c,o));break;case 270:i=Math.min(r,Math.max(c,i));o=Math.max(0,Math.min(a-l,o))}this.x=i/=r;this.y=o/=a;var u=editor_slicedToArray(editor_classPrivateMethodGet(this,Hr,_getBaseTranslation2).call(this),2);i+=u[0];o+=u[1];var d=this.div.style;d.left="".concat((100*i).toFixed(2),"%");d.top="".concat((100*o).toFixed(2),"%");this.moveInDOM()}},{key:"screenToPageTranslation",value:function screenToPageTranslation(t,r){return editor_classStaticPrivateMethodGet(AnnotationEditor,AnnotationEditor,_rotatePoint).call(AnnotationEditor,t,r,this.parentRotation)}},{key:"pageTranslationToScreen",value:function pageTranslationToScreen(t,r){return editor_classStaticPrivateMethodGet(AnnotationEditor,AnnotationEditor,_rotatePoint).call(AnnotationEditor,t,r,360-this.parentRotation)}},{key:"parentScale",get:function get(){return this._uiManager.viewParameters.realScale}},{key:"parentRotation",get:function get(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}},{key:"parentDimensions",get:function get(){var t=this.parentScale,r=editor_slicedToArray(this.pageDimensions,2),a=r[0]*t,i=r[1]*t;return ue.isCSSRoundSupported?[Math.round(a),Math.round(i)]:[a,i]}},{key:"setDims",value:function setDims(t,r){var a,i=editor_slicedToArray(this.parentDimensions,2),o=i[0],l=i[1];this.div.style.width="".concat((100*t/o).toFixed(2),"%");editor_classPrivateFieldGet(this,Er)||(this.div.style.height="".concat((100*r/l).toFixed(2),"%"));null===(a=editor_classPrivateFieldGet(this,Ar))||void 0===a||a.classList.toggle("small",t<AnnotationEditor.SMALL_EDITOR_SIZE||r<AnnotationEditor.SMALL_EDITOR_SIZE)}},{key:"fixDims",value:function fixDims(){var t=this.div.style,r=t.height,a=t.width,i=a.endsWith("%"),o=!editor_classPrivateFieldGet(this,Er)&&r.endsWith("%");if(!i||!o){var l=editor_slicedToArray(this.parentDimensions,2),c=l[0],u=l[1];i||(t.width="".concat((100*parseFloat(a)/c).toFixed(2),"%"));editor_classPrivateFieldGet(this,Er)||o||(t.height="".concat((100*parseFloat(r)/u).toFixed(2),"%"))}}},{key:"getInitialTranslation",value:function getInitialTranslation(){return[0,0]}},{key:"addAltTextButton",value:(t=editor_asyncToGenerator(editor_regeneratorRuntime().mark((function _callee(){var t,r,a,i=this;return editor_regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(!editor_classPrivateFieldGet(this,Ar)){o.next=2;break}return o.abrupt("return");case 2:(t=editor_classPrivateFieldSet(this,Ar,document.createElement("button"))).className="altText";o.next=6;return AnnotationEditor._l10nPromise.get("pdfjs-editor-alt-text-button-label");case 6:r=o.sent;t.textContent=r;t.setAttribute("aria-label",r);t.tabIndex="0";t.addEventListener("contextmenu",noContextMenu);t.addEventListener("pointerdown",(function(t){return t.stopPropagation()}));a=function onClick(t){editor_classPrivateFieldGet(i,Ar).hidden=!0;t.preventDefault();i._uiManager.editAltText(i)};t.addEventListener("click",a,{capture:!0});t.addEventListener("keydown",(function(r){if(r.target===t&&"Enter"===r.key){editor_classPrivateFieldSet(i,Fr,!0);a(r)}}));editor_classPrivateMethodGet(this,Xr,_setAltTextButtonState2).call(this);this.div.append(t);AnnotationEditor.SMALL_EDITOR_SIZE||(AnnotationEditor.SMALL_EDITOR_SIZE=Math.min(128,Math.round(1.4*t.getBoundingClientRect().width)));case 18:case"end":return o.stop()}}),_callee,this)}))),function addAltTextButton(){return t.apply(this,arguments)})},{key:"altTextFinish",value:function altTextFinish(){if(editor_classPrivateFieldGet(this,Ar)){editor_classPrivateFieldGet(this,Ar).hidden=!1;editor_classPrivateFieldGet(this,Ar).focus({focusVisible:editor_classPrivateFieldGet(this,Fr)});editor_classPrivateFieldSet(this,Fr,!1)}}},{key:"addEditToolbar",value:function addEditToolbar(){if(!editor_classPrivateFieldGet(this,Or)&&!editor_classPrivateFieldGet(this,Dr)){editor_classPrivateFieldSet(this,Or,new br(this));this.div.append(editor_classPrivateFieldGet(this,Or).render())}}},{key:"removeEditToolbar",value:function removeEditToolbar(){if(editor_classPrivateFieldGet(this,Or)){editor_classPrivateFieldGet(this,Or).remove();editor_classPrivateFieldSet(this,Or,null)}}},{key:"getClientDimensions",value:function getClientDimensions(){return this.div.getBoundingClientRect()}},{key:"altTextData",get:function get(){return{altText:editor_classPrivateFieldGet(this,Pr),decorative:editor_classPrivateFieldGet(this,kr)}},set:function set(t){var r=t.altText,a=t.decorative;if(editor_classPrivateFieldGet(this,Pr)!==r||editor_classPrivateFieldGet(this,kr)!==a){editor_classPrivateFieldSet(this,Pr,r);editor_classPrivateFieldSet(this,kr,a);editor_classPrivateMethodGet(this,Xr,_setAltTextButtonState2).call(this)}}},{key:"render",value:function render(){this.div=document.createElement("div");this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360);this.div.className=this.name;this.div.setAttribute("id",this.id);this.div.setAttribute("tabIndex",0);this.setInForeground();this.div.addEventListener("focusin",editor_classPrivateFieldGet(this,Tr));this.div.addEventListener("focusout",editor_classPrivateFieldGet(this,Mr));var t=editor_slicedToArray(this.parentDimensions,2),r=t[0],a=t[1];if(this.parentRotation%180!=0){this.div.style.maxWidth="".concat((100*a/r).toFixed(2),"%");this.div.style.maxHeight="".concat((100*r/a).toFixed(2),"%")}var i=editor_slicedToArray(this.getInitialTranslation(),2),o=i[0],l=i[1];this.translate(o,l);bindEvents(this,this.div,["pointerdown"]);return this.div}},{key:"pointerdown",value:function pointerdown(t){var r=ue.platform.isMac;if(0!==t.button||t.ctrlKey&&r)t.preventDefault();else{editor_classPrivateFieldSet(this,Rr,!0);editor_classPrivateMethodGet(this,Jr,_setUpDragSession2).call(this,t)}}},{key:"moveInDOM",value:function moveInDOM(){var t=this;editor_classPrivateFieldGet(this,Wr)&&clearTimeout(editor_classPrivateFieldGet(this,Wr));editor_classPrivateFieldSet(this,Wr,setTimeout((function(){var r;editor_classPrivateFieldSet(t,Wr,null);null===(r=t.parent)||void 0===r||r.moveEditorInDOM(t)}),0))}},{key:"_setParentAndPosition",value:function _setParentAndPosition(t,r,a){t.changeParent(this);this.x=r;this.y=a;this.fixAndSetPosition()}},{key:"getRect",value:function getRect(t,r){var a=this.parentScale,i=editor_slicedToArray(this.pageDimensions,2),o=i[0],l=i[1],c=editor_slicedToArray(this.pageTranslation,2),u=c[0],d=c[1],h=t/a,p=r/a,v=this.x*o,y=this.y*l,_=this.width*o,g=this.height*l;switch(this.rotation){case 0:return[v+h+u,l-y-p-g+d,v+h+_+u,l-y-p+d];case 90:return[v+p+u,l-y+h+d,v+p+g+u,l-y+h+_+d];case 180:return[v-h-_+u,l-y+p+d,v-h+u,l-y+p+g+d];case 270:return[v-p-g+u,l-y-h-_+d,v-p+u,l-y-h+d];default:throw new Error("Invalid rotation")}}},{key:"getRectInCurrentCoords",value:function getRectInCurrentCoords(t,r){var a=editor_slicedToArray(t,4),i=a[0],o=a[1],l=a[2],c=a[3],u=l-i,d=c-o;switch(this.rotation){case 0:return[i,r-c,u,d];case 90:return[i,r-o,d,u];case 180:return[l,r-o,u,d];case 270:return[l,r-c,d,u];default:throw new Error("Invalid rotation")}}},{key:"onceAdded",value:function onceAdded(){}},{key:"isEmpty",value:function isEmpty(){return!1}},{key:"enableEditMode",value:function enableEditMode(){editor_classPrivateFieldSet(this,Dr,!0)}},{key:"disableEditMode",value:function disableEditMode(){editor_classPrivateFieldSet(this,Dr,!1)}},{key:"isInEditMode",value:function isInEditMode(){return editor_classPrivateFieldGet(this,Dr)}},{key:"shouldGetKeyboardEvents",value:function shouldGetKeyboardEvents(){return editor_classPrivateFieldGet(this,jr)}},{key:"needsToBeRebuilt",value:function needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}},{key:"rebuild",value:function rebuild(){var t,r;null===(t=this.div)||void 0===t||t.addEventListener("focusin",editor_classPrivateFieldGet(this,Tr));null===(r=this.div)||void 0===r||r.addEventListener("focusout",editor_classPrivateFieldGet(this,Mr))}},{key:"serialize",value:function serialize(){unreachable("An editor must be serializable")}},{key:"remove",value:function remove(){var t;this.div.removeEventListener("focusin",editor_classPrivateFieldGet(this,Tr));this.div.removeEventListener("focusout",editor_classPrivateFieldGet(this,Mr));this.isEmpty()||this.commit();this.parent?this.parent.remove(this):this._uiManager.removeEditor(this);null===(t=editor_classPrivateFieldGet(this,Ar))||void 0===t||t.remove();editor_classPrivateFieldSet(this,Ar,null);editor_classPrivateFieldSet(this,Sr,null);if(editor_classPrivateFieldGet(this,Wr)){clearTimeout(editor_classPrivateFieldGet(this,Wr));editor_classPrivateFieldSet(this,Wr,null)}editor_classPrivateMethodGet(this,rn,_stopResizing2).call(this);this.removeEditToolbar()}},{key:"isResizable",get:function get(){return!1}},{key:"makeResizable",value:function makeResizable(){if(this.isResizable){editor_classPrivateMethodGet(this,qr,_createResizers2).call(this);editor_classPrivateFieldGet(this,Ir).classList.remove("hidden");bindEvents(this,this.div,["keydown"])}}},{key:"keydown",value:function keydown(t){var r=this;if(this.isResizable&&t.target===this.div&&"Enter"===t.key){this._uiManager.setSelected(this);editor_classPrivateFieldSet(this,Cr,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});var a=editor_classPrivateFieldGet(this,Ir).children;if(!editor_classPrivateFieldGet(this,wr)){editor_classPrivateFieldSet(this,wr,Array.from(a));var i,o=editor_classPrivateMethodGet(this,Qr,_resizerKeydown2).bind(this),l=editor_classPrivateMethodGet(this,Zr,_resizerBlur2).bind(this),c=editor_createForOfIteratorHelper(editor_classPrivateFieldGet(this,wr));try{var u=function _loop(){var t=i.value,a=t.getAttribute("data-resizer-name");t.setAttribute("role","spinbutton");t.addEventListener("keydown",o);t.addEventListener("blur",l);t.addEventListener("focus",editor_classPrivateMethodGet(r,en,_resizerFocus2).bind(r,a));AnnotationEditor._l10nPromise.get("pdfjs-editor-resizer-label-".concat(a)).then((function(r){return t.setAttribute("aria-label",r)}))};for(c.s();!(i=c.n()).done;)u()}catch(t){c.e(t)}finally{c.f()}}var d,h=editor_classPrivateFieldGet(this,wr)[0],p=0,v=editor_createForOfIteratorHelper(a);try{for(v.s();!(d=v.n()).done;){if(d.value===h)break;p++}}catch(t){v.e(t)}finally{v.f()}var y=(360-this.rotation+this.parentRotation)%360/90*(editor_classPrivateFieldGet(this,wr).length/4);if(y!==p){if(y<p)for(var _=0;_<p-y;_++)editor_classPrivateFieldGet(this,Ir).append(editor_classPrivateFieldGet(this,Ir).firstChild);else if(y>p)for(var g=0;g<y-p;g++)editor_classPrivateFieldGet(this,Ir).firstChild.before(editor_classPrivateFieldGet(this,Ir).lastChild);var m,b=0,w=editor_createForOfIteratorHelper(a);try{var P=function _loop2(){var t=m.value,a=editor_classPrivateFieldGet(r,wr)[b++].getAttribute("data-resizer-name");AnnotationEditor._l10nPromise.get("pdfjs-editor-resizer-label-".concat(a)).then((function(r){return t.setAttribute("aria-label",r)}))};for(w.s();!(m=w.n()).done;)P()}catch(t){w.e(t)}finally{w.f()}}editor_classPrivateMethodGet(this,tn,_setResizerTabIndex2).call(this,0);editor_classPrivateFieldSet(this,jr,!0);editor_classPrivateFieldGet(this,Ir).firstChild.focus({focusVisible:!0});t.preventDefault();t.stopImmediatePropagation()}}},{key:"_resizeWithKeyboard",value:function _resizeWithKeyboard(t,r){editor_classPrivateFieldGet(this,jr)&&editor_classPrivateMethodGet(this,Yr,_resizerPointermove2).call(this,editor_classPrivateFieldGet(this,Gr),{movementX:t,movementY:r})}},{key:"_stopResizingWithKeyboard",value:function _stopResizingWithKeyboard(){editor_classPrivateMethodGet(this,rn,_stopResizing2).call(this);this.div.focus()}},{key:"select",value:function select(){var t,r;this.makeResizable();null===(t=this.div)||void 0===t||t.classList.add("selectedEditor");this.addEditToolbar();null===(r=editor_classPrivateFieldGet(this,Or))||void 0===r||r.show()}},{key:"unselect",value:function unselect(){var t,r,a,i;null===(t=editor_classPrivateFieldGet(this,Ir))||void 0===t||t.classList.add("hidden");null===(r=this.div)||void 0===r||r.classList.remove("selectedEditor");null!==(a=this.div)&&void 0!==a&&a.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus();null===(i=editor_classPrivateFieldGet(this,Or))||void 0===i||i.hide()}},{key:"updateParams",value:function updateParams(t,r){}},{key:"disableEditing",value:function disableEditing(){editor_classPrivateFieldGet(this,Ar)&&(editor_classPrivateFieldGet(this,Ar).hidden=!0)}},{key:"enableEditing",value:function enableEditing(){editor_classPrivateFieldGet(this,Ar)&&(editor_classPrivateFieldGet(this,Ar).hidden=!1)}},{key:"enterInEditMode",value:function enterInEditMode(){}},{key:"getImageForAltText",value:function getImageForAltText(){return null}},{key:"contentDiv",get:function get(){return this.div}},{key:"isEditing",get:function get(){return editor_classPrivateFieldGet(this,Lr)},set:function set(t){editor_classPrivateFieldSet(this,Lr,t);if(this.parent)if(t){this.parent.setSelected(this);this.parent.setActiveEditor(this)}else this.parent.setActiveEditor(null)}},{key:"setAspectRatio",value:function setAspectRatio(t,r){editor_classPrivateFieldSet(this,Er,!0);var a=t/r,i=this.div.style;i.aspectRatio=a;i.height="auto"}}],[{key:"_resizerKeyboardManager",get:function get(){var t=AnnotationEditor.prototype._resizeWithKeyboard,r=dr.TRANSLATE_SMALL,a=dr.TRANSLATE_BIG;return shadow(this,"_resizerKeyboardManager",new vt([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-r,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-a,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[r,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[a,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-r]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-a]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,r]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,a]}],[["Escape","mac+Escape"],AnnotationEditor.prototype._stopResizingWithKeyboard]]))}},{key:"_defaultLineColor",get:function get(){return shadow(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}},{key:"deleteAnnotationElement",value:function deleteAnnotationElement(t){var r=new an({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});r.annotationElementId=t.annotationElementId;r.deleted=!0;r._uiManager.addToAnnotationStorage(r)}},{key:"initialize",value:function initialize(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;AnnotationEditor._l10nPromise||(AnnotationEditor._l10nPromise=new Map(["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-resizer-label-topLeft","pdfjs-editor-resizer-label-topMiddle","pdfjs-editor-resizer-label-topRight","pdfjs-editor-resizer-label-middleRight","pdfjs-editor-resizer-label-bottomRight","pdfjs-editor-resizer-label-bottomMiddle","pdfjs-editor-resizer-label-bottomLeft","pdfjs-editor-resizer-label-middleLeft"].map((function(r){return[r,t.get(r.replaceAll(/([A-Z])/g,(function(t){return"-".concat(t.toLowerCase())})))]}))));if(null!=r&&r.strings){var a,i=editor_createForOfIteratorHelper(r.strings);try{for(i.s();!(a=i.n()).done;){var o=a.value;AnnotationEditor._l10nPromise.set(o,t.get(o))}}catch(t){i.e(t)}finally{i.f()}}if(-1===AnnotationEditor._borderLineWidth){var l=getComputedStyle(document.documentElement);AnnotationEditor._borderLineWidth=parseFloat(l.getPropertyValue("--outline-width"))||0}}},{key:"updateDefaultParams",value:function updateDefaultParams(t,r){}},{key:"defaultPropertiesToUpdate",get:function get(){return[]}},{key:"isHandlingMimeForPasting",value:function isHandlingMimeForPasting(t){return!1}},{key:"paste",value:function paste(t,r){unreachable("Not implemented")}},{key:"deserialize",value:function deserialize(t,r,a){var i=new this.prototype.constructor({parent:r,id:r.getNextId(),uiManager:a});i.rotation=t.rotation;var o=editor_slicedToArray(i.pageDimensions,2),l=o[0],c=o[1],u=editor_slicedToArray(i.getRectInCurrentCoords(t.rect,c),4),d=u[0],h=u[1],p=u[2],v=u[3];i.x=d/l;i.y=h/c;i.width=p/l;i.height=v/c;return i}},{key:"MIN_SIZE",get:function get(){return 16}}]);var t;return AnnotationEditor}();hr=nn;function _translate2(t,r,a){var i=editor_slicedToArray(t,2),o=i[0],l=i[1],c=editor_slicedToArray(this.screenToPageTranslation(r,a),2);r=c[0];a=c[1];this.x+=r/o;this.y+=a/l;this.fixAndSetPosition()}function _getBaseTranslation2(){var t=editor_slicedToArray(this.parentDimensions,2),r=t[0],a=t[1],i=hr._borderLineWidth,o=i/r,l=i/a;switch(this.rotation){case 90:return[-o,l];case 180:return[o,l];case 270:return[o,-l];default:return[-o,-l]}}function _rotatePoint(t,r,a){switch(a){case 90:return[r,-t];case 180:return[-t,-r];case 270:return[-r,t];default:return[t,r]}}function _getRotationMatrix2(t){switch(t){case 90:var r=editor_slicedToArray(this.pageDimensions,2),a=r[0],i=r[1];return[0,-a/i,i/a,0];case 180:return[-1,0,0,-1];case 270:var o=editor_slicedToArray(this.pageDimensions,2),l=o[0],c=o[1];return[0,l/c,-c/l,0];default:return[1,0,0,1]}}function _createResizers2(){if(!editor_classPrivateFieldGet(this,Ir)){editor_classPrivateFieldSet(this,Ir,document.createElement("div"));editor_classPrivateFieldGet(this,Ir).classList.add("resizers");for(var t=0,r=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"];t<r.length;t++){var a=r[t],i=document.createElement("div");editor_classPrivateFieldGet(this,Ir).append(i);i.classList.add("resizer",a);i.setAttribute("data-resizer-name",a);i.addEventListener("pointerdown",editor_classPrivateMethodGet(this,Vr,_resizerPointerdown2).bind(this,a));i.addEventListener("contextmenu",noContextMenu);i.tabIndex=-1}this.div.prepend(editor_classPrivateFieldGet(this,Ir))}}function _resizerPointerdown2(t,r){var a=this;r.preventDefault();var i=ue.platform.isMac;if(!(0!==r.button||r.ctrlKey&&i)){editor_classPrivateMethodGet(this,$r,_toggleAltTextButton2).call(this,!1);var o=editor_classPrivateMethodGet(this,Yr,_resizerPointermove2).bind(this,t),l=this._isDraggable;this._isDraggable=!1;var c={passive:!0,capture:!0};this.parent.togglePointerEvents(!1);window.addEventListener("pointermove",o,c);var u=this.x,d=this.y,h=this.width,p=this.height,v=this.parent.div.style.cursor,y=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(r.target).cursor;var _=function pointerUpCallback(){a.parent.togglePointerEvents(!0);editor_classPrivateMethodGet(a,$r,_toggleAltTextButton2).call(a,!0);a._isDraggable=l;window.removeEventListener("pointerup",pointerUpCallback);window.removeEventListener("blur",pointerUpCallback);window.removeEventListener("pointermove",o,c);a.parent.div.style.cursor=v;a.div.style.cursor=y;editor_classPrivateMethodGet(a,Kr,_addResizeToUndoStack2).call(a,u,d,h,p)};window.addEventListener("pointerup",_);window.addEventListener("blur",_)}}function _addResizeToUndoStack2(t,r,a,i){var o=this,l=this.x,c=this.y,u=this.width,d=this.height;l===t&&c===r&&u===a&&d===i||this.addCommands({cmd:function cmd(){o.width=u;o.height=d;o.x=l;o.y=c;var t=editor_slicedToArray(o.parentDimensions,2),r=t[0],a=t[1];o.setDims(r*u,a*d);o.fixAndSetPosition()},undo:function undo(){o.width=a;o.height=i;o.x=t;o.y=r;var l=editor_slicedToArray(o.parentDimensions,2),c=l[0],u=l[1];o.setDims(c*a,u*i);o.fixAndSetPosition()},mustExec:!0})}function _resizerPointermove2(t,r){var a,i,o=editor_slicedToArray(this.parentDimensions,2),l=o[0],c=o[1],u=this.x,d=this.y,h=this.width,p=this.height,v=hr.MIN_SIZE/l,y=hr.MIN_SIZE/c,_=function round(t){return Math.round(1e4*t)/1e4},g=editor_classPrivateMethodGet(this,Ur,_getRotationMatrix2).call(this,this.rotation),m=function transf(t,r){return[g[0]*t+g[2]*r,g[1]*t+g[3]*r]},b=editor_classPrivateMethodGet(this,Ur,_getRotationMatrix2).call(this,360-this.rotation),w=!1,P=!1;switch(t){case"topLeft":w=!0;a=function getPoint(t,r){return[0,0]};i=function getOpposite(t,r){return[t,r]};break;case"topMiddle":a=function getPoint(t,r){return[t/2,0]};i=function getOpposite(t,r){return[t/2,r]};break;case"topRight":w=!0;a=function getPoint(t,r){return[t,0]};i=function getOpposite(t,r){return[0,r]};break;case"middleRight":P=!0;a=function getPoint(t,r){return[t,r/2]};i=function getOpposite(t,r){return[0,r/2]};break;case"bottomRight":w=!0;a=function getPoint(t,r){return[t,r]};i=function getOpposite(t,r){return[0,0]};break;case"bottomMiddle":a=function getPoint(t,r){return[t/2,r]};i=function getOpposite(t,r){return[t/2,0]};break;case"bottomLeft":w=!0;a=function getPoint(t,r){return[0,r]};i=function getOpposite(t,r){return[t,0]};break;case"middleLeft":P=!0;a=function getPoint(t,r){return[0,r/2]};i=function getOpposite(t,r){return[t,r/2]}}var k=a(h,p),A=i(h,p),S=m.apply(void 0,editor_toConsumableArray(A)),x=_(u+S[0]),E=_(d+S[1]),I=1,C=1,T=editor_slicedToArray(this.screenToPageTranslation(r.movementX,r.movementY),2),M=T[0],O=T[1],G=editor_slicedToArray(function invTransf(t,r){return[b[0]*t+b[2]*r,b[1]*t+b[3]*r]}(M/l,O/c),2);M=G[0];O=G[1];if(w){var R=Math.hypot(h,p);I=C=Math.max(Math.min(Math.hypot(A[0]-k[0]-M,A[1]-k[1]-O)/R,1/h,1/p),v/h,y/p)}else P?I=Math.max(v,Math.min(1,Math.abs(A[0]-k[0]-M)))/h:C=Math.max(y,Math.min(1,Math.abs(A[1]-k[1]-O)))/p;var L=_(h*I),D=_(p*C),j=x-(S=m.apply(void 0,editor_toConsumableArray(i(L,D))))[0],W=E-S[1];this.width=L;this.height=D;this.x=j;this.y=W;this.setDims(l*L,c*D);this.fixAndSetPosition()}function _setAltTextButtonState2(){return _setAltTextButtonState3.apply(this,arguments)}function _setAltTextButtonState3(){return(_setAltTextButtonState3=editor_asyncToGenerator(editor_regeneratorRuntime().mark((function _callee2(){var t,r,a,i,o,l=this;return editor_regeneratorRuntime().wrap((function _callee2$(c){for(;;)switch(c.prev=c.next){case 0:if(t=editor_classPrivateFieldGet(this,Ar)){c.next=3;break}return c.abrupt("return");case 3:if(editor_classPrivateFieldGet(this,Pr)||editor_classPrivateFieldGet(this,kr)){c.next=7;break}t.classList.remove("done");null===(r=editor_classPrivateFieldGet(this,Sr))||void 0===r||r.remove();return c.abrupt("return");case 7:t.classList.add("done");hr._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then((function(r){t.setAttribute("aria-label",r)}));if(!(a=editor_classPrivateFieldGet(this,Sr))){editor_classPrivateFieldSet(this,Sr,a=document.createElement("span"));a.className="tooltip";a.setAttribute("role","tooltip");i=a.id="alt-text-tooltip-".concat(this.id);t.setAttribute("aria-describedby",i);100;t.addEventListener("mouseenter",(function(){editor_classPrivateFieldSet(l,xr,setTimeout((function(){editor_classPrivateFieldSet(l,xr,null);editor_classPrivateFieldGet(l,Sr).classList.add("show");l._uiManager._eventBus.dispatch("reporttelemetry",{source:l,details:{type:"editing",subtype:l.editorType,data:{action:"alt_text_tooltip"}}})}),100))}));t.addEventListener("mouseleave",(function(){var t;if(editor_classPrivateFieldGet(l,xr)){clearTimeout(editor_classPrivateFieldGet(l,xr));editor_classPrivateFieldSet(l,xr,null)}null===(t=editor_classPrivateFieldGet(l,Sr))||void 0===t||t.classList.remove("show")}))}if(!editor_classPrivateFieldGet(this,kr)){c.next=17;break}c.next=14;return hr._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip");case 14:c.t0=c.sent;c.next=18;break;case 17:c.t0=editor_classPrivateFieldGet(this,Pr);case 18:a.innerText=c.t0;a.parentNode||t.append(a);null==(o=this.getImageForAltText())||o.setAttribute("aria-describedby",a.id);case 22:case"end":return c.stop()}}),_callee2,this)})))).apply(this,arguments)}function _toggleAltTextButton2(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(editor_classPrivateFieldGet(this,Ar)){if(!t&&editor_classPrivateFieldGet(this,xr)){clearTimeout(editor_classPrivateFieldGet(this,xr));editor_classPrivateFieldSet(this,xr,null)}editor_classPrivateFieldGet(this,Ar).disabled=!t}}function _setUpDragSession2(t){var r=this;if(this._isDraggable){var a,i,o=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();if(o){a={passive:!0,capture:!0};i=function pointerMoveCallback(t){var a=editor_slicedToArray(r.screenToPageTranslation(t.movementX,t.movementY),2),i=a[0],o=a[1];r._uiManager.dragSelectedEditors(i,o)};window.addEventListener("pointermove",i,a)}var l=function pointerUpCallback(){window.removeEventListener("pointerup",pointerUpCallback);window.removeEventListener("blur",pointerUpCallback);o&&window.removeEventListener("pointermove",i,a);editor_classPrivateFieldSet(r,Rr,!1);if(!r._uiManager.endDragSession()){var l=ue.platform.isMac;t.ctrlKey&&!l||t.shiftKey||t.metaKey&&l?r.parent.toggleSelected(r):r.parent.setSelected(r)}};window.addEventListener("pointerup",l);window.addEventListener("blur",l)}}function _resizerKeydown2(t){hr._resizerKeyboardManager.exec(this,t)}function _resizerBlur2(t){var r;editor_classPrivateFieldGet(this,jr)&&(null===(r=t.relatedTarget)||void 0===r?void 0:r.parentNode)!==editor_classPrivateFieldGet(this,Ir)&&editor_classPrivateMethodGet(this,rn,_stopResizing2).call(this)}function _resizerFocus2(t){editor_classPrivateFieldSet(this,Gr,editor_classPrivateFieldGet(this,jr)?t:"")}function _setResizerTabIndex2(t){if(editor_classPrivateFieldGet(this,wr)){var r,a=editor_createForOfIteratorHelper(editor_classPrivateFieldGet(this,wr));try{for(a.s();!(r=a.n()).done;){r.value.tabIndex=t}}catch(t){a.e(t)}finally{a.f()}}}function _stopResizing2(){editor_classPrivateFieldSet(this,jr,!1);editor_classPrivateMethodGet(this,tn,_setResizerTabIndex2).call(this,-1);if(editor_classPrivateFieldGet(this,Cr)){var t=editor_classPrivateFieldGet(this,Cr),r=t.savedX,a=t.savedY,i=t.savedWidth,o=t.savedHeight;editor_classPrivateMethodGet(this,Kr,_addResizeToUndoStack2).call(this,r,a,i,o);editor_classPrivateFieldSet(this,Cr,null)}}editor_defineProperty(nn,"_borderLineWidth",-1);editor_defineProperty(nn,"_colorManager",new yt);editor_defineProperty(nn,"_zIndex",1);editor_defineProperty(nn,"SMALL_EDITOR_SIZE",0);var an=function(t){!function editor_inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&editor_setPrototypeOf(t,r)}(FakeEditor,t);var r=editor_createSuper(FakeEditor);function FakeEditor(t){var a;editor_classCallCheck(this,FakeEditor);(a=r.call(this,t)).annotationElementId=t.annotationElementId;a.deleted=!0;return a}editor_createClass(FakeEditor,[{key:"serialize",value:function serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}]);return FakeEditor}(nn);function murmurhash3_typeof(t){return murmurhash3_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},murmurhash3_typeof(t)}function murmurhash3_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,murmurhash3_toPropertyKey(i.key),i)}}function murmurhash3_toPropertyKey(t){var r=function murmurhash3_toPrimitive(t,r){if("object"!=murmurhash3_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=murmurhash3_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==murmurhash3_typeof(r)?r:String(r)}var sn=3285377520,ln=4294901760,cn=65535,un=function(){function MurmurHash3_64(t){!function murmurhash3_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,MurmurHash3_64);this.h1=t?4294967295&t:sn;this.h2=t?4294967295&t:sn}!function murmurhash3_createClass(t,r,a){r&&murmurhash3_defineProperties(t.prototype,r);a&&murmurhash3_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(MurmurHash3_64,[{key:"update",value:function update(t){var r,a;if("string"==typeof t){r=new Uint8Array(2*t.length);a=0;for(var i=0,o=t.length;i<o;i++){var l=t.charCodeAt(i);if(l<=255)r[a++]=l;else{r[a++]=l>>>8;r[a++]=255&l}}}else{if(!isArrayBuffer(t))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");a=(r=t.slice()).byteLength}for(var c=a>>2,u=a-4*c,d=new Uint32Array(r.buffer,0,c),h=0,p=0,v=this.h1,y=this.h2,_=3432918353,g=461845907,m=11601,b=13715,w=0;w<c;w++)1&w?v=5*(v=(v^=h=(h=(h=(h=d[w])*_&ln|h*m&cn)<<15|h>>>17)*g&ln|h*b&cn)<<13|v>>>19)+3864292196:y=5*(y=(y^=p=(p=(p=(p=d[w])*_&ln|p*m&cn)<<15|p>>>17)*g&ln|p*b&cn)<<13|y>>>19)+3864292196;h=0;switch(u){case 3:h^=r[4*c+2]<<16;case 2:h^=r[4*c+1]<<8;case 1:h=(h=(h=(h^=r[4*c])*_&ln|h*m&cn)<<15|h>>>17)*g&ln|h*b&cn;1&c?v^=h:y^=h}this.h1=v;this.h2=y}},{key:"hexdigest",value:function hexdigest(){var t=this.h1,r=this.h2;t=3981806797*(t^=r>>>1)&ln|36045*t&cn;t=444984403*(t^=(r=4283543511*r&ln|(2950163797*(r<<16|t>>>16)&ln)>>>16)>>>1)&ln|60499*t&cn;return((t^=(r=3301882366*r&ln|(3120437893*(r<<16|t>>>16)&ln)>>>16)>>>1)>>>0).toString(16).padStart(8,"0")+(r>>>0).toString(16).padStart(8,"0")}}]);return MurmurHash3_64}();function annotation_storage_typeof(t){return annotation_storage_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},annotation_storage_typeof(t)}function annotation_storage_setPrototypeOf(t,r){annotation_storage_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return annotation_storage_setPrototypeOf(t,r)}function annotation_storage_createSuper(t){var r=function annotation_storage_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=annotation_storage_getPrototypeOf(t);if(r){var o=annotation_storage_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function annotation_storage_possibleConstructorReturn(t,r){if(r&&("object"===annotation_storage_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return annotation_storage_assertThisInitialized(t)}(this,a)}}function annotation_storage_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function annotation_storage_getPrototypeOf(t){annotation_storage_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return annotation_storage_getPrototypeOf(t)}function annotation_storage_slicedToArray(t,r){return function annotation_storage_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function annotation_storage_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||annotation_storage_unsupportedIterableToArray(t,r)||function annotation_storage_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function annotation_storage_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=annotation_storage_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function annotation_storage_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return annotation_storage_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?annotation_storage_arrayLikeToArray(t,r):void 0}}function annotation_storage_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function annotation_storage_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function annotation_storage_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,annotation_storage_toPropertyKey(i.key),i)}}function annotation_storage_createClass(t,r,a){r&&annotation_storage_defineProperties(t.prototype,r);a&&annotation_storage_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function annotation_storage_toPropertyKey(t){var r=function annotation_storage_toPrimitive(t,r){if("object"!=annotation_storage_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=annotation_storage_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==annotation_storage_typeof(r)?r:String(r)}function annotation_storage_classPrivateFieldInitSpec(t,r,a){annotation_storage_checkPrivateRedeclaration(t,r);r.set(t,a)}function annotation_storage_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function annotation_storage_classPrivateFieldSet(t,r,a){!function annotation_storage_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,annotation_storage_classExtractFieldDescriptor(t,r,"set"),a);return a}function annotation_storage_classPrivateFieldGet(t,r){return function annotation_storage_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,annotation_storage_classExtractFieldDescriptor(t,r,"get"))}function annotation_storage_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var dn=Object.freeze({map:null,hash:"",transfer:void 0}),hn=new WeakMap,fn=new WeakMap,pn=new WeakSet,vn=function(){function AnnotationStorage(){annotation_storage_classCallCheck(this,AnnotationStorage);!function annotation_storage_classPrivateMethodInitSpec(t,r){annotation_storage_checkPrivateRedeclaration(t,r);r.add(t)}(this,pn);annotation_storage_classPrivateFieldInitSpec(this,hn,{writable:!0,value:!1});annotation_storage_classPrivateFieldInitSpec(this,fn,{writable:!0,value:new Map});this.onSetModified=null;this.onResetModified=null;this.onAnnotationEditor=null}annotation_storage_createClass(AnnotationStorage,[{key:"getValue",value:function getValue(t,r){var a=annotation_storage_classPrivateFieldGet(this,fn).get(t);return void 0===a?r:Object.assign(r,a)}},{key:"getRawValue",value:function getRawValue(t){return annotation_storage_classPrivateFieldGet(this,fn).get(t)}},{key:"remove",value:function remove(t){annotation_storage_classPrivateFieldGet(this,fn).delete(t);0===annotation_storage_classPrivateFieldGet(this,fn).size&&this.resetModified();if("function"==typeof this.onAnnotationEditor){var r,a=annotation_storage_createForOfIteratorHelper(annotation_storage_classPrivateFieldGet(this,fn).values());try{for(a.s();!(r=a.n()).done;){if(r.value instanceof nn)return}}catch(t){a.e(t)}finally{a.f()}this.onAnnotationEditor(null)}}},{key:"setValue",value:function setValue(t,r){var a=annotation_storage_classPrivateFieldGet(this,fn).get(t),i=!1;if(void 0!==a)for(var o=0,l=Object.entries(r);o<l.length;o++){var c=annotation_storage_slicedToArray(l[o],2),u=c[0],d=c[1];if(a[u]!==d){i=!0;a[u]=d}}else{i=!0;annotation_storage_classPrivateFieldGet(this,fn).set(t,r)}i&&function annotation_storage_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}(this,pn,_setModified2).call(this);r instanceof nn&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(r.constructor._type)}},{key:"has",value:function has(t){return annotation_storage_classPrivateFieldGet(this,fn).has(t)}},{key:"getAll",value:function getAll(){return annotation_storage_classPrivateFieldGet(this,fn).size>0?objectFromMap(annotation_storage_classPrivateFieldGet(this,fn)):null}},{key:"setAll",value:function setAll(t){for(var r=0,a=Object.entries(t);r<a.length;r++){var i=annotation_storage_slicedToArray(a[r],2),o=i[0],l=i[1];this.setValue(o,l)}}},{key:"size",get:function get(){return annotation_storage_classPrivateFieldGet(this,fn).size}},{key:"resetModified",value:function resetModified(){if(annotation_storage_classPrivateFieldGet(this,hn)){annotation_storage_classPrivateFieldSet(this,hn,!1);"function"==typeof this.onResetModified&&this.onResetModified()}}},{key:"print",get:function get(){return new _n(this)}},{key:"serializable",get:function get(){if(0===annotation_storage_classPrivateFieldGet(this,fn).size)return dn;var t,r=new Map,a=new un,i=[],o=Object.create(null),l=!1,c=annotation_storage_createForOfIteratorHelper(annotation_storage_classPrivateFieldGet(this,fn));try{for(c.s();!(t=c.n()).done;){var u=annotation_storage_slicedToArray(t.value,2),d=u[0],h=u[1],p=h instanceof nn?h.serialize(!1,o):h;if(p){r.set(d,p);a.update("".concat(d,":").concat(JSON.stringify(p)));l||(l=!!p.bitmap)}}}catch(t){c.e(t)}finally{c.f()}if(l){var v,y=annotation_storage_createForOfIteratorHelper(r.values());try{for(y.s();!(v=y.n()).done;){var _=v.value;_.bitmap&&i.push(_.bitmap)}}catch(t){y.e(t)}finally{y.f()}}return r.size>0?{map:r,hash:a.hexdigest(),transfer:i}:dn}}]);return AnnotationStorage}();function _setModified2(){if(!annotation_storage_classPrivateFieldGet(this,hn)){annotation_storage_classPrivateFieldSet(this,hn,!0);"function"==typeof this.onSetModified&&this.onSetModified()}}var yn=new WeakMap,_n=function(t){!function annotation_storage_inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&annotation_storage_setPrototypeOf(t,r)}(PrintAnnotationStorage,t);var r=annotation_storage_createSuper(PrintAnnotationStorage);function PrintAnnotationStorage(t){var a;annotation_storage_classCallCheck(this,PrintAnnotationStorage);annotation_storage_classPrivateFieldInitSpec(annotation_storage_assertThisInitialized(a=r.call(this)),yn,{writable:!0,value:void 0});var i=t.serializable,o=i.map,l=i.hash,c=i.transfer,u=structuredClone(o,c?{transfer:c}:null);annotation_storage_classPrivateFieldSet(annotation_storage_assertThisInitialized(a),yn,{map:u,hash:l,transfer:c});return a}annotation_storage_createClass(PrintAnnotationStorage,[{key:"print",get:function get(){unreachable("Should not call PrintAnnotationStorage.print")}},{key:"serializable",get:function get(){return annotation_storage_classPrivateFieldGet(this,yn)}}]);return PrintAnnotationStorage}(vn);function font_loader_typeof(t){return font_loader_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},font_loader_typeof(t)}function font_loader_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */font_loader_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==font_loader_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(font_loader_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function font_loader_asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function font_loader_asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){font_loader_asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){font_loader_asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function font_loader_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function font_loader_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return font_loader_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return font_loader_arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function font_loader_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function font_loader_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function font_loader_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,font_loader_toPropertyKey(i.key),i)}}function font_loader_createClass(t,r,a){r&&font_loader_defineProperties(t.prototype,r);a&&font_loader_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function font_loader_toPropertyKey(t){var r=function font_loader_toPrimitive(t,r){if("object"!=font_loader_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=font_loader_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==font_loader_typeof(r)?r:String(r)}function font_loader_classPrivateFieldInitSpec(t,r,a){!function font_loader_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,a)}function font_loader_classPrivateFieldGet(t,r){var a=function font_loader_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}(t,r,"get");return function font_loader_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,a)}var gn,mn=new WeakMap,bn=function(){function FontLoader(t){var r=t.ownerDocument,a=void 0===r?globalThis.document:r;t.styleElement;font_loader_classCallCheck(this,FontLoader);font_loader_classPrivateFieldInitSpec(this,mn,{writable:!0,value:new Set});this._document=a;this.nativeFontFaces=new Set;this.styleElement=null;this.loadingRequests=[];this.loadTestFontId=0}font_loader_createClass(FontLoader,[{key:"addNativeFontFace",value:function addNativeFontFace(t){this.nativeFontFaces.add(t);this._document.fonts.add(t)}},{key:"removeNativeFontFace",value:function removeNativeFontFace(t){this.nativeFontFaces.delete(t);this._document.fonts.delete(t)}},{key:"insertRule",value:function insertRule(t){if(!this.styleElement){this.styleElement=this._document.createElement("style");this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement)}var r=this.styleElement.sheet;r.insertRule(t,r.cssRules.length)}},{key:"clear",value:function clear(){var t,r=font_loader_createForOfIteratorHelper(this.nativeFontFaces);try{for(r.s();!(t=r.n()).done;){var a=t.value;this._document.fonts.delete(a)}}catch(t){r.e(t)}finally{r.f()}this.nativeFontFaces.clear();font_loader_classPrivateFieldGet(this,mn).clear();if(this.styleElement){this.styleElement.remove();this.styleElement=null}}},{key:"loadSystemFont",value:(a=font_loader_asyncToGenerator(font_loader_regeneratorRuntime().mark((function _callee(t){var r,a,i,o,l,c;return font_loader_regeneratorRuntime().wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:r=t.systemFontInfo,a=t._inspectFont;if(r&&!font_loader_classPrivateFieldGet(this,mn).has(r.loadedName)){u.next=3;break}return u.abrupt("return");case 3:assert(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set.");if(!this.isFontLoadingAPISupported){u.next=20;break}i=r.loadedName,o=r.src,l=r.style;c=new FontFace(i,o,l);this.addNativeFontFace(c);u.prev=8;u.next=11;return c.load();case 11:font_loader_classPrivateFieldGet(this,mn).add(i);null==a||a(r);u.next=19;break;case 15:u.prev=15;u.t0=u.catch(8);warn("Cannot load system font: ".concat(r.baseFontName,", installing it could help to improve PDF rendering."));this.removeNativeFontFace(c);case 19:return u.abrupt("return");case 20:unreachable("Not implemented: loadSystemFont without the Font Loading API.");case 21:case"end":return u.stop()}}),_callee,this,[[8,15]])}))),function loadSystemFont(t){return a.apply(this,arguments)})},{key:"bind",value:(r=font_loader_asyncToGenerator(font_loader_regeneratorRuntime().mark((function _callee2(t){var r,a,i=this;return font_loader_regeneratorRuntime().wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:if(!(t.attached||t.missingFile&&!t.systemFontInfo)){o.next=2;break}return o.abrupt("return");case 2:t.attached=!0;if(!t.systemFontInfo){o.next=7;break}o.next=6;return this.loadSystemFont(t);case 6:case 21:return o.abrupt("return");case 7:if(!this.isFontLoadingAPISupported){o.next=22;break}if(!(r=t.createNativeFontFace())){o.next=21;break}this.addNativeFontFace(r);o.prev=11;o.next=14;return r.loaded;case 14:o.next=21;break;case 16:o.prev=16;o.t0=o.catch(11);warn("Failed to load font '".concat(r.family,"': '").concat(o.t0,"'."));t.disableFontFace=!0;throw o.t0;case 22:if(!(a=t.createFontFaceRule())){o.next=29;break}this.insertRule(a);if(!this.isSyncFontLoadingSupported){o.next=27;break}return o.abrupt("return");case 27:o.next=29;return new Promise((function(r){var a=i._queueLoadingCallback(r);i._prepareFontLoadEvent(t,a)}));case 29:case"end":return o.stop()}}),_callee2,this,[[11,16]])}))),function bind(t){return r.apply(this,arguments)})},{key:"isFontLoadingAPISupported",get:function get(){var t;return shadow(this,"isFontLoadingAPISupported",!(null===(t=this._document)||void 0===t||!t.fonts))}},{key:"isSyncFontLoadingSupported",get:function get(){var r,a=!1;(t||"undefined"!=typeof navigator&&"string"==typeof(null===(r=navigator)||void 0===r?void 0:r.userAgent)&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(a=!0);return shadow(this,"isSyncFontLoadingSupported",a)}},{key:"_queueLoadingCallback",value:function _queueLoadingCallback(t){var r=this.loadingRequests,a={done:!1,complete:function completeRequest(){assert(!a.done,"completeRequest() cannot be called twice.");a.done=!0;for(;r.length>0&&r[0].done;){var t=r.shift();setTimeout(t.callback,0)}},callback:t};r.push(a);return a}},{key:"_loadTestFont",get:function get(){return shadow(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}},{key:"_prepareFontLoadEvent",value:function _prepareFontLoadEvent(t,r){function int32(t,r){return t.charCodeAt(r)<<24|t.charCodeAt(r+1)<<16|t.charCodeAt(r+2)<<8|255&t.charCodeAt(r+3)}function spliceString(t,r,a,i){return t.substring(0,r)+i+t.substring(r+a)}var a,i,o=this._document.createElement("canvas");o.width=1;o.height=1;var l=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,c=o.getContext("2d",l),u=0;var d="lt".concat(Date.now()).concat(this.loadTestFontId++),h=this._loadTestFont,p=1482184792,v=int32(h=spliceString(h,976,d.length,d),16);for(a=0,i=d.length-3;a<i;a+=4)v=v-p+int32(d,a)|0;a<d.length&&(v=v-p+int32(d+"XXX",a)|0);h=spliceString(h,16,4,function string32(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)}(v));var y="url(data:font/opentype;base64,".concat(btoa(h),");"),_='@font-face {font-family:"'.concat(d,'";src:').concat(y,"}");this.insertRule(_);var g=this._document.createElement("div");g.style.visibility="hidden";g.style.width=g.style.height="10px";g.style.position="absolute";g.style.top=g.style.left="0px";for(var m=0,b=[t.loadedName,d];m<b.length;m++){var w=b[m],P=this._document.createElement("span");P.textContent="Hi";P.style.fontFamily=w;g.append(P)}this._document.body.append(g);!function isFontReady(t,r){if(++u>30){warn("Load test font never loaded.");r()}else{c.font="30px "+t;c.fillText(".",0,20);c.getImageData(0,0,1,1).data[3]>0?r():setTimeout(isFontReady.bind(null,t,r))}}(d,(function(){g.remove();r.complete()}))}}]);var r,a;return FontLoader}(),wn=function(){function FontFaceObject(t,r){var a=r.isEvalSupported,i=void 0===a||a,o=r.disableFontFace,l=void 0!==o&&o,c=r.ignoreErrors,u=void 0!==c&&c,d=r.inspectFont,h=void 0===d?null:d;font_loader_classCallCheck(this,FontFaceObject);this.compiledGlyphs=Object.create(null);for(var p in t)this[p]=t[p];this.isEvalSupported=!1!==i;this.disableFontFace=!0===l;this.ignoreErrors=!0===u;this._inspectFont=h}font_loader_createClass(FontFaceObject,[{key:"createNativeFontFace",value:function createNativeFontFace(){var t,r;if(!this.data||this.disableFontFace)return null;if(this.cssFontInfo){var a={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(a.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg"));r=new FontFace(this.cssFontInfo.fontFamily,this.data,a)}else r=new FontFace(this.loadedName,this.data,{});null===(t=this._inspectFont)||void 0===t||t.call(this,this);return r}},{key:"createFontFaceRule",value:function createFontFaceRule(){var t;if(!this.data||this.disableFontFace)return null;var r,a=bytesToString(this.data),i="url(data:".concat(this.mimetype,";base64,").concat(btoa(a),");");if(this.cssFontInfo){var o="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(o+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;"));r='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(o,"src:").concat(i,"}")}else r='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(i,"}");null===(t=this._inspectFont)||void 0===t||t.call(this,this,i);return r}},{key:"getPathGenerator",value:function getPathGenerator(t,r){if(void 0!==this.compiledGlyphs[r])return this.compiledGlyphs[r];var a;try{a=t.get(this.loadedName+"_path_"+r)}catch(t){if(!this.ignoreErrors)throw t;warn('getPathGenerator - ignoring character: "'.concat(t,'".'));return this.compiledGlyphs[r]=function(t,r){}}if(this.isEvalSupported&&ue.isEvalSupported){var i,o=[],l=font_loader_createForOfIteratorHelper(a);try{for(l.s();!(i=l.n()).done;){var c=i.value,u=void 0!==c.args?c.args.join(","):"";o.push("c.",c.cmd,"(",u,");\n")}}catch(t){l.e(t)}finally{l.f()}return this.compiledGlyphs[r]=new Function("c","size",o.join(""))}return this.compiledGlyphs[r]=function(t,r){var i,o=font_loader_createForOfIteratorHelper(a);try{for(o.s();!(i=o.n()).done;){var l=i.value;"scale"===l.cmd&&(l.args=[r,-r]);t[l.cmd].apply(t,l.args)}}catch(t){o.e(t)}finally{o.f()}}}}]);return FontFaceObject}();function node_utils_typeof(t){return node_utils_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},node_utils_typeof(t)}function node_utils_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,node_utils_toPropertyKey(i.key),i)}}function node_utils_createClass(t,r,a){r&&node_utils_defineProperties(t.prototype,r);a&&node_utils_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function node_utils_toPropertyKey(t){var r=function node_utils_toPrimitive(t,r){if("object"!=node_utils_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=node_utils_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==node_utils_typeof(r)?r:String(r)}function node_utils_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function node_utils_inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&node_utils_setPrototypeOf(t,r)}function node_utils_setPrototypeOf(t,r){node_utils_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return node_utils_setPrototypeOf(t,r)}function node_utils_createSuper(t){var r=function node_utils_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=node_utils_getPrototypeOf(t);if(r){var o=node_utils_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function node_utils_possibleConstructorReturn(t,r){if(r&&("object"===node_utils_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function node_utils_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,a)}}function node_utils_getPrototypeOf(t){node_utils_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return node_utils_getPrototypeOf(t)}!function checkDOMMatrix(){if(!globalThis.DOMMatrix&&t){warn("Cannot polyfill `DOMMatrix`, rendering may be broken.")}}();!function checkPath2D(){if(!globalThis.Path2D&&t){warn("Cannot polyfill `Path2D`, rendering may be broken.")}}();var Pn=function fetchData(t){return new Promise((function(r,a){undefined.readFile(t,(function(t,i){!t&&i?r(new Uint8Array(i)):a(new Error(t))}))}))},kn=function(t){node_utils_inherits(NodeFilterFactory,t);var r=node_utils_createSuper(NodeFilterFactory);function NodeFilterFactory(){node_utils_classCallCheck(this,NodeFilterFactory);return r.apply(this,arguments)}return node_utils_createClass(NodeFilterFactory)}(me),An=function(t){node_utils_inherits(NodeCanvasFactory,t);var r=node_utils_createSuper(NodeCanvasFactory);function NodeCanvasFactory(){node_utils_classCallCheck(this,NodeCanvasFactory);return r.apply(this,arguments)}node_utils_createClass(NodeCanvasFactory,[{key:"_createCanvas",value:function _createCanvas(t,r){return gn.createCanvas(t,r)}}]);return NodeCanvasFactory}(be),Sn=function(t){node_utils_inherits(NodeCMapReaderFactory,t);var r=node_utils_createSuper(NodeCMapReaderFactory);function NodeCMapReaderFactory(){node_utils_classCallCheck(this,NodeCMapReaderFactory);return r.apply(this,arguments)}node_utils_createClass(NodeCMapReaderFactory,[{key:"_fetchData",value:function _fetchData(t,r){return Pn(t).then((function(t){return{cMapData:t,compressionType:r}}))}}]);return NodeCMapReaderFactory}(we),xn=function(t){node_utils_inherits(NodeStandardFontDataFactory,t);var r=node_utils_createSuper(NodeStandardFontDataFactory);function NodeStandardFontDataFactory(){node_utils_classCallCheck(this,NodeStandardFontDataFactory);return r.apply(this,arguments)}node_utils_createClass(NodeStandardFontDataFactory,[{key:"_fetchData",value:function _fetchData(t){return Pn(t)}}]);return NodeStandardFontDataFactory}(Pe);__webpack_require__(4165),__webpack_require__(8800),__webpack_require__(6394),__webpack_require__(1585),__webpack_require__(2993),__webpack_require__(7492);function pattern_helper_toConsumableArray(t){return function pattern_helper_arrayWithoutHoles(t){if(Array.isArray(t))return pattern_helper_arrayLikeToArray(t)}(t)||function pattern_helper_iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||pattern_helper_unsupportedIterableToArray(t)||function pattern_helper_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pattern_helper_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=pattern_helper_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function pattern_helper_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return pattern_helper_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?pattern_helper_arrayLikeToArray(t,r):void 0}}function pattern_helper_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function pattern_helper_inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&pattern_helper_setPrototypeOf(t,r)}function pattern_helper_setPrototypeOf(t,r){pattern_helper_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return pattern_helper_setPrototypeOf(t,r)}function pattern_helper_createSuper(t){var r=function pattern_helper_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=pattern_helper_getPrototypeOf(t);if(r){var o=pattern_helper_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function pattern_helper_possibleConstructorReturn(t,r){if(r&&("object"===pattern_helper_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function pattern_helper_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,a)}}function pattern_helper_getPrototypeOf(t){pattern_helper_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return pattern_helper_getPrototypeOf(t)}function pattern_helper_typeof(t){return pattern_helper_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pattern_helper_typeof(t)}function pattern_helper_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function pattern_helper_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,pattern_helper_toPropertyKey(i.key),i)}}function pattern_helper_createClass(t,r,a){r&&pattern_helper_defineProperties(t.prototype,r);a&&pattern_helper_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function pattern_helper_toPropertyKey(t){var r=function pattern_helper_toPrimitive(t,r){if("object"!=pattern_helper_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=pattern_helper_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==pattern_helper_typeof(r)?r:String(r)}var Fn="Fill",En="Stroke",In="Shading";function applyBoundingBox(t,r){if(r){var a=r[2]-r[0],i=r[3]-r[1],o=new Path2D;o.rect(r[0],r[1],a,i);t.clip(o)}}var Cn=function(){function BaseShadingPattern(){pattern_helper_classCallCheck(this,BaseShadingPattern);this.constructor===BaseShadingPattern&&unreachable("Cannot initialize BaseShadingPattern.")}pattern_helper_createClass(BaseShadingPattern,[{key:"getPattern",value:function getPattern(){unreachable("Abstract method `getPattern` called.")}}]);return BaseShadingPattern}(),Tn=function(t){pattern_helper_inherits(RadialAxialShadingPattern,t);var r=pattern_helper_createSuper(RadialAxialShadingPattern);function RadialAxialShadingPattern(t){var a;pattern_helper_classCallCheck(this,RadialAxialShadingPattern);(a=r.call(this))._type=t[1];a._bbox=t[2];a._colorStops=t[3];a._p0=t[4];a._p1=t[5];a._r0=t[6];a._r1=t[7];a.matrix=null;return a}pattern_helper_createClass(RadialAxialShadingPattern,[{key:"_createGradient",value:function _createGradient(t){var r;"axial"===this._type?r=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(r=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));var a,i=pattern_helper_createForOfIteratorHelper(this._colorStops);try{for(i.s();!(a=i.n()).done;){var o=a.value;r.addColorStop(o[0],o[1])}}catch(t){i.e(t)}finally{i.f()}return r}},{key:"getPattern",value:function getPattern(t,r,a,i){var o;if(i===En||i===Fn){var l=r.current.getClippedPathBoundingBox(i,getCurrentTransform(t))||[0,0,0,0],c=Math.ceil(l[2]-l[0])||1,u=Math.ceil(l[3]-l[1])||1,d=r.cachedCanvases.getCanvas("pattern",c,u,!0),h=d.context;h.clearRect(0,0,h.canvas.width,h.canvas.height);h.beginPath();h.rect(0,0,h.canvas.width,h.canvas.height);h.translate(-l[0],-l[1]);a=he.transform(a,[1,0,0,1,l[0],l[1]]);h.transform.apply(h,pattern_helper_toConsumableArray(r.baseTransform));this.matrix&&h.transform.apply(h,pattern_helper_toConsumableArray(this.matrix));applyBoundingBox(h,this._bbox);h.fillStyle=this._createGradient(h);h.fill();o=t.createPattern(d.canvas,"no-repeat");var p=new DOMMatrix(a);o.setTransform(p)}else{applyBoundingBox(t,this._bbox);o=this._createGradient(t)}return o}}]);return RadialAxialShadingPattern}(Cn);function drawTriangle(t,r,a,i,o,l,c,u){var d,h=r.coords,p=r.colors,v=t.data,y=4*t.width;if(h[a+1]>h[i+1]){d=a;a=i;i=d;d=l;l=c;c=d}if(h[i+1]>h[o+1]){d=i;i=o;o=d;d=c;c=u;u=d}if(h[a+1]>h[i+1]){d=a;a=i;i=d;d=l;l=c;c=d}var _=(h[a]+r.offsetX)*r.scaleX,g=(h[a+1]+r.offsetY)*r.scaleY,m=(h[i]+r.offsetX)*r.scaleX,b=(h[i+1]+r.offsetY)*r.scaleY,w=(h[o]+r.offsetX)*r.scaleX,P=(h[o+1]+r.offsetY)*r.scaleY;if(!(g>=P))for(var k,A,S,x,E,I,C,T,M=p[l],O=p[l+1],G=p[l+2],R=p[c],L=p[c+1],D=p[c+2],j=p[u],W=p[u+1],N=p[u+2],B=Math.round(g),z=Math.round(P),H=B;H<=z;H++){if(H<b){var U=H<g?0:(g-H)/(g-b);k=_-(_-m)*U;A=M-(M-R)*U;S=O-(O-L)*U;x=G-(G-D)*U}else{var q=void 0;k=m-(m-w)*(q=H>P?1:b===P?0:(b-H)/(b-P));A=R-(R-j)*q;S=L-(L-W)*q;x=D-(D-N)*q}var V=void 0;E=_-(_-w)*(V=H<g?0:H>P?1:(g-H)/(g-P));I=M-(M-j)*V;C=O-(O-W)*V;T=G-(G-N)*V;for(var K=Math.round(Math.min(k,E)),Y=Math.round(Math.max(k,E)),X=y*H+4*K,$=K;$<=Y;$++){(V=(k-$)/(k-E))<0?V=0:V>1&&(V=1);v[X++]=A-(A-I)*V|0;v[X++]=S-(S-C)*V|0;v[X++]=x-(x-T)*V|0;v[X++]=255}}}function drawFigure(t,r,a){var i,o,l=r.coords,c=r.colors;switch(r.type){case"lattice":var u=r.verticesPerRow,d=Math.floor(l.length/u)-1,h=u-1;for(i=0;i<d;i++)for(var p=i*u,v=0;v<h;v++,p++){drawTriangle(t,a,l[p],l[p+1],l[p+u],c[p],c[p+1],c[p+u]);drawTriangle(t,a,l[p+u+1],l[p+1],l[p+u],c[p+u+1],c[p+1],c[p+u])}break;case"triangles":for(i=0,o=l.length;i<o;i+=3)drawTriangle(t,a,l[i],l[i+1],l[i+2],c[i],c[i+1],c[i+2]);break;default:throw new Error("illegal figure")}}var Mn=function(t){pattern_helper_inherits(MeshShadingPattern,t);var r=pattern_helper_createSuper(MeshShadingPattern);function MeshShadingPattern(t){var a;pattern_helper_classCallCheck(this,MeshShadingPattern);(a=r.call(this))._coords=t[2];a._colors=t[3];a._figures=t[4];a._bounds=t[5];a._bbox=t[7];a._background=t[8];a.matrix=null;return a}pattern_helper_createClass(MeshShadingPattern,[{key:"_createMeshCanvas",value:function _createMeshCanvas(t,r,a){var i=Math.floor(this._bounds[0]),o=Math.floor(this._bounds[1]),l=Math.ceil(this._bounds[2])-i,c=Math.ceil(this._bounds[3])-o,u=Math.min(Math.ceil(Math.abs(l*t[0]*1.1)),3e3),d=Math.min(Math.ceil(Math.abs(c*t[1]*1.1)),3e3),h=l/u,p=c/d,v={coords:this._coords,colors:this._colors,offsetX:-i,offsetY:-o,scaleX:1/h,scaleY:1/p},y=u+4,_=d+4,g=a.getCanvas("mesh",y,_,!1),m=g.context,b=m.createImageData(u,d);if(r)for(var w=b.data,P=0,k=w.length;P<k;P+=4){w[P]=r[0];w[P+1]=r[1];w[P+2]=r[2];w[P+3]=255}var A,S=pattern_helper_createForOfIteratorHelper(this._figures);try{for(S.s();!(A=S.n()).done;){drawFigure(b,A.value,v)}}catch(t){S.e(t)}finally{S.f()}m.putImageData(b,2,2);return{canvas:g.canvas,offsetX:i-2*h,offsetY:o-2*p,scaleX:h,scaleY:p}}},{key:"getPattern",value:function getPattern(t,r,a,i){applyBoundingBox(t,this._bbox);var o;if(i===In)o=he.singularValueDecompose2dScale(getCurrentTransform(t));else{o=he.singularValueDecompose2dScale(r.baseTransform);if(this.matrix){var l=he.singularValueDecompose2dScale(this.matrix);o=[o[0]*l[0],o[1]*l[1]]}}var c=this._createMeshCanvas(o,i===In?null:this._background,r.cachedCanvases);if(i!==In){t.setTransform.apply(t,pattern_helper_toConsumableArray(r.baseTransform));this.matrix&&t.transform.apply(t,pattern_helper_toConsumableArray(this.matrix))}t.translate(c.offsetX,c.offsetY);t.scale(c.scaleX,c.scaleY);return t.createPattern(c.canvas,"no-repeat")}}]);return MeshShadingPattern}(Cn),On=function(t){pattern_helper_inherits(DummyShadingPattern,t);var r=pattern_helper_createSuper(DummyShadingPattern);function DummyShadingPattern(){pattern_helper_classCallCheck(this,DummyShadingPattern);return r.apply(this,arguments)}pattern_helper_createClass(DummyShadingPattern,[{key:"getPattern",value:function getPattern(){return"hotpink"}}]);return DummyShadingPattern}(Cn);var Gn=1,Rn=2,Ln=function(){function TilingPattern(t,r,a,i,o){pattern_helper_classCallCheck(this,TilingPattern);this.operatorList=t[2];this.matrix=t[3]||[1,0,0,1,0,0];this.bbox=t[4];this.xstep=t[5];this.ystep=t[6];this.paintType=t[7];this.tilingType=t[8];this.color=r;this.ctx=a;this.canvasGraphicsFactory=i;this.baseTransform=o}pattern_helper_createClass(TilingPattern,[{key:"createPatternCanvas",value:function createPatternCanvas(t){var r=this.operatorList,a=this.bbox,i=this.xstep,o=this.ystep,l=this.paintType,c=this.tilingType,u=this.color,d=this.canvasGraphicsFactory;info("TilingType: "+c);var h=a[0],p=a[1],v=a[2],y=a[3],_=he.singularValueDecompose2dScale(this.matrix),g=he.singularValueDecompose2dScale(this.baseTransform),m=[_[0]*g[0],_[1]*g[1]],b=this.getSizeAndScale(i,this.ctx.canvas.width,m[0]),w=this.getSizeAndScale(o,this.ctx.canvas.height,m[1]),P=t.cachedCanvases.getCanvas("pattern",b.size,w.size,!0),k=P.context,A=d.createCanvasGraphics(k);A.groupLevel=t.groupLevel;this.setFillAndStrokeStyleToContext(A,l,u);var S=h,x=p,E=v,I=y;if(h<0){S=0;E+=Math.abs(h)}if(p<0){x=0;I+=Math.abs(p)}k.translate(-b.scale*S,-w.scale*x);A.transform(b.scale,0,0,w.scale,0,0);k.save();this.clipBbox(A,S,x,E,I);A.baseTransform=getCurrentTransform(A.ctx);A.executeOperatorList(r);A.endDrawing();return{canvas:P.canvas,scaleX:b.scale,scaleY:w.scale,offsetX:S,offsetY:x}}},{key:"getSizeAndScale",value:function getSizeAndScale(t,r,a){t=Math.abs(t);var i=Math.max(TilingPattern.MAX_PATTERN_SIZE,r),o=Math.ceil(t*a);o>=i?o=i:a=o/t;return{scale:a,size:o}}},{key:"clipBbox",value:function clipBbox(t,r,a,i,o){var l=i-r,c=o-a;t.ctx.rect(r,a,l,c);t.current.updateRectMinMax(getCurrentTransform(t.ctx),[r,a,i,o]);t.clip();t.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function setFillAndStrokeStyleToContext(t,r,a){var i=t.ctx,o=t.current;switch(r){case Gn:var l=this.ctx;i.fillStyle=l.fillStyle;i.strokeStyle=l.strokeStyle;o.fillColor=l.fillStyle;o.strokeColor=l.strokeStyle;break;case Rn:var c=he.makeHexColor(a[0],a[1],a[2]);i.fillStyle=c;i.strokeStyle=c;o.fillColor=c;o.strokeColor=c;break;default:throw new le("Unsupported paint type: ".concat(r))}}},{key:"getPattern",value:function getPattern(t,r,a,i){var o=a;if(i!==In){o=he.transform(o,r.baseTransform);this.matrix&&(o=he.transform(o,this.matrix))}var l=this.createPatternCanvas(r),c=new DOMMatrix(o);c=(c=c.translate(l.offsetX,l.offsetY)).scale(1/l.scaleX,1/l.scaleY);var u=t.createPattern(l.canvas,"repeat");u.setTransform(c);return u}}]);return TilingPattern}();!function pattern_helper_defineProperty(t,r,a){(r=pattern_helper_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}(Ln,"MAX_PATTERN_SIZE",3e3);function image_utils_slicedToArray(t,r){return function image_utils_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function image_utils_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||function image_utils_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return image_utils_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return image_utils_arrayLikeToArray(t,r)}(t,r)||function image_utils_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function image_utils_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function convertBlackAndWhiteToRGBA(t){var r=t.src,a=t.srcPos,i=void 0===a?0:a,o=t.dest,l=t.width,c=t.height,u=t.nonBlackColor,d=void 0===u?4294967295:u,h=t.inverseDecode,p=void 0!==h&&h,v=ue.isLittleEndian?4278190080:255,y=image_utils_slicedToArray(p?[d,v]:[v,d],2),_=y[0],g=y[1],m=l>>3,b=7&l,w=r.length;o=new Uint32Array(o.buffer);for(var P=0,k=0;k<c;k++){for(var A=i+m;i<A;i++){var S=i<w?r[i]:255;o[P++]=128&S?g:_;o[P++]=64&S?g:_;o[P++]=32&S?g:_;o[P++]=16&S?g:_;o[P++]=8&S?g:_;o[P++]=4&S?g:_;o[P++]=2&S?g:_;o[P++]=1&S?g:_}if(0!==b)for(var x=i<w?r[i++]:255,E=0;E<b;E++)o[P++]=x&1<<7-E?g:_}return{srcPos:i,destPos:P}}function canvas_typeof(t){return canvas_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},canvas_typeof(t)}function canvas_toConsumableArray(t){return function canvas_arrayWithoutHoles(t){if(Array.isArray(t))return canvas_arrayLikeToArray(t)}(t)||function canvas_iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||canvas_unsupportedIterableToArray(t)||function canvas_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function canvas_classPrivateMethodInitSpec(t,r){!function canvas_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function canvas_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function canvas_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=canvas_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function canvas_slicedToArray(t,r){return function canvas_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function canvas_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||canvas_unsupportedIterableToArray(t,r)||function canvas_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function canvas_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return canvas_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?canvas_arrayLikeToArray(t,r):void 0}}function canvas_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function canvas_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function canvas_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,canvas_toPropertyKey(i.key),i)}}function canvas_createClass(t,r,a){r&&canvas_defineProperties(t.prototype,r);a&&canvas_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function canvas_toPropertyKey(t){var r=function canvas_toPrimitive(t,r){if("object"!=canvas_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=canvas_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==canvas_typeof(r)?r:String(r)}var Dn=4096,jn=16;var Wn=function(){function CachedCanvases(t){canvas_classCallCheck(this,CachedCanvases);this.canvasFactory=t;this.cache=Object.create(null)}canvas_createClass(CachedCanvases,[{key:"getCanvas",value:function getCanvas(t,r,a){var i;if(void 0!==this.cache[t]){i=this.cache[t];this.canvasFactory.reset(i,r,a)}else{i=this.canvasFactory.create(r,a);this.cache[t]=i}return i}},{key:"delete",value:function _delete(t){delete this.cache[t]}},{key:"clear",value:function clear(){for(var t in this.cache){var r=this.cache[t];this.canvasFactory.destroy(r);delete this.cache[t]}}}]);return CachedCanvases}();function drawImageAtIntegerCoords(t,r,a,i,o,l,c,u,d,h){var p=canvas_slicedToArray(getCurrentTransform(t),6),v=p[0],y=p[1],_=p[2],g=p[3],m=p[4],b=p[5];if(0===y&&0===_){var w=c*v+m,P=Math.round(w),k=u*g+b,A=Math.round(k),S=(c+d)*v+m,x=Math.abs(Math.round(S)-P)||1,E=(u+h)*g+b,I=Math.abs(Math.round(E)-A)||1;t.setTransform(Math.sign(v),0,0,Math.sign(g),P,A);t.drawImage(r,a,i,o,l,0,0,x,I);t.setTransform(v,y,_,g,m,b);return[x,I]}if(0===v&&0===g){var C=u*_+m,T=Math.round(C),M=c*y+b,O=Math.round(M),G=(u+h)*_+m,R=Math.abs(Math.round(G)-T)||1,L=(c+d)*y+b,D=Math.abs(Math.round(L)-O)||1;t.setTransform(0,Math.sign(y),Math.sign(_),0,T,O);t.drawImage(r,a,i,o,l,0,0,D,R);t.setTransform(v,y,_,g,m,b);return[D,R]}t.drawImage(r,a,i,o,l,c,u,d,h);return[Math.hypot(v,y)*d,Math.hypot(_,g)*h]}var Nn=function(){function CanvasExtraState(t,a){canvas_classCallCheck(this,CanvasExtraState);this.alphaIsShape=!1;this.fontSize=0;this.fontSizeScale=1;this.textMatrix=r;this.textMatrixScale=1;this.fontMatrix=i;this.leading=0;this.x=0;this.y=0;this.lineX=0;this.lineY=0;this.charSpacing=0;this.wordSpacing=0;this.textHScale=1;this.textRenderingMode=b;this.textRise=0;this.fillColor="#000000";this.strokeColor="#000000";this.patternFill=!1;this.fillAlpha=1;this.strokeAlpha=1;this.lineWidth=1;this.activeSMask=null;this.transferMaps="none";this.startNewPathAndClipBox([0,0,t,a])}canvas_createClass(CanvasExtraState,[{key:"clone",value:function clone(){var clone=Object.create(this);clone.clipBox=this.clipBox.slice();return clone}},{key:"setCurrentPoint",value:function setCurrentPoint(t,r){this.x=t;this.y=r}},{key:"updatePathMinMax",value:function updatePathMinMax(t,r,a){var i=canvas_slicedToArray(he.applyTransform([r,a],t),2);r=i[0];a=i[1];this.minX=Math.min(this.minX,r);this.minY=Math.min(this.minY,a);this.maxX=Math.max(this.maxX,r);this.maxY=Math.max(this.maxY,a)}},{key:"updateRectMinMax",value:function updateRectMinMax(t,r){var a=he.applyTransform(r,t),i=he.applyTransform(r.slice(2),t),o=he.applyTransform([r[0],r[3]],t),l=he.applyTransform([r[2],r[1]],t);this.minX=Math.min(this.minX,a[0],i[0],o[0],l[0]);this.minY=Math.min(this.minY,a[1],i[1],o[1],l[1]);this.maxX=Math.max(this.maxX,a[0],i[0],o[0],l[0]);this.maxY=Math.max(this.maxY,a[1],i[1],o[1],l[1])}},{key:"updateScalingPathMinMax",value:function updateScalingPathMinMax(t,r){he.scaleMinMax(t,r);this.minX=Math.min(this.minX,r[0]);this.maxX=Math.max(this.maxX,r[1]);this.minY=Math.min(this.minY,r[2]);this.maxY=Math.max(this.maxY,r[3])}},{key:"updateCurvePathMinMax",value:function updateCurvePathMinMax(t,r,a,i,o,l,c,u,d,h){var p=he.bezierBoundingBox(r,a,i,o,l,c,u,d);if(h){h[0]=Math.min(h[0],p[0],p[2]);h[1]=Math.max(h[1],p[0],p[2]);h[2]=Math.min(h[2],p[1],p[3]);h[3]=Math.max(h[3],p[1],p[3])}else this.updateRectMinMax(t,p)}},{key:"getPathBoundingBox",value:function getPathBoundingBox(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fn,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=[this.minX,this.minY,this.maxX,this.maxY];if(t===En){r||unreachable("Stroke bounding box must include transform.");var i=he.singularValueDecompose2dScale(r),o=i[0]*this.lineWidth/2,l=i[1]*this.lineWidth/2;a[0]-=o;a[1]-=l;a[2]+=o;a[3]+=l}return a}},{key:"updateClipFromPath",value:function updateClipFromPath(){var t=he.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}},{key:"isEmptyClip",value:function isEmptyClip(){return this.minX===1/0}},{key:"startNewPathAndClipBox",value:function startNewPathAndClipBox(t){this.clipBox=t;this.minX=1/0;this.minY=1/0;this.maxX=0;this.maxY=0}},{key:"getClippedPathBoundingBox",value:function getClippedPathBoundingBox(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fn,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return he.intersect(this.clipBox,this.getPathBoundingBox(t,r))}}]);return CanvasExtraState}();function putBinaryImageData(t,r){if("undefined"!=typeof ImageData&&r instanceof ImageData)t.putImageData(r,0,0);else{var a,i,o,l,c,u=r.height,d=r.width,h=u%jn,p=(u-h)/jn,v=0===h?p:p+1,y=t.createImageData(d,jn),_=0,g=r.data,m=y.data;if(r.kind===x.GRAYSCALE_1BPP){var b=g.byteLength,w=new Uint32Array(m.buffer,0,m.byteLength>>2),P=w.length,k=d+7>>3,A=4294967295,S=ue.isLittleEndian?4278190080:255;for(i=0;i<v;i++){l=i<p?jn:h;a=0;for(o=0;o<l;o++){for(var E=b-_,I=0,C=E>k?d:8*E-7,T=-8&C,M=0,O=0;I<T;I+=8){O=g[_++];w[a++]=128&O?A:S;w[a++]=64&O?A:S;w[a++]=32&O?A:S;w[a++]=16&O?A:S;w[a++]=8&O?A:S;w[a++]=4&O?A:S;w[a++]=2&O?A:S;w[a++]=1&O?A:S}for(;I<C;I++){if(0===M){O=g[_++];M=128}w[a++]=O&M?A:S;M>>=1}}for(;a<P;)w[a++]=0;t.putImageData(y,0,i*jn)}}else if(r.kind===x.RGBA_32BPP){o=0;c=d*jn*4;for(i=0;i<p;i++){m.set(g.subarray(_,_+c));_+=c;t.putImageData(y,0,o);o+=jn}if(i<v){c=d*h*4;m.set(g.subarray(_,_+c));t.putImageData(y,0,o)}}else{if(r.kind!==x.RGB_24BPP)throw new Error("bad image kind: ".concat(r.kind));c=d*(l=jn);for(i=0;i<v;i++){i>=p&&(c=d*(l=h));a=0;for(o=c;o--;){m[a++]=g[_++];m[a++]=g[_++];m[a++]=g[_++];m[a++]=255}t.putImageData(y,0,i*jn)}}}}function putBinaryImageMask(t,r){if(r.bitmap)t.drawImage(r.bitmap,0,0);else for(var a=r.height,i=r.width,o=a%jn,l=(a-o)/jn,c=0===o?l:l+1,u=t.createImageData(i,jn),d=0,h=r.data,p=u.data,v=0;v<c;v++){d=convertBlackAndWhiteToRGBA({src:h,srcPos:d,dest:p,width:i,height:v<l?jn:o,nonBlackColor:0}).srcPos;t.putImageData(u,0,v*jn)}}function copyCtxState(t,r){for(var a=0,i=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];a<i.length;a++){var o=i[a];void 0!==t[o]&&(r[o]=t[o])}if(void 0!==t.setLineDash){r.setLineDash(t.getLineDash());r.lineDashOffset=t.lineDashOffset}}function resetCtxToDefault(r){r.strokeStyle=r.fillStyle="#000000";r.fillRule="nonzero";r.globalAlpha=1;r.lineWidth=1;r.lineCap="butt";r.lineJoin="miter";r.miterLimit=10;r.globalCompositeOperation="source-over";r.font="10px sans-serif";if(void 0!==r.setLineDash){r.setLineDash([]);r.lineDashOffset=0}if(!t){var a=r.filter;"none"!==a&&""!==a&&(r.filter="none")}}function composeSMaskBackdrop(t,r,a,i){for(var o=t.length,l=3;l<o;l+=4){var c=t[l];if(0===c){t[l-3]=r;t[l-2]=a;t[l-1]=i}else if(c<255){var u=255-c;t[l-3]=t[l-3]*c+r*u>>8;t[l-2]=t[l-2]*c+a*u>>8;t[l-1]=t[l-1]*c+i*u>>8}}}function composeSMaskAlpha(t,r,a){for(var i=t.length,o=3;o<i;o+=4){var l=a?a[t[o]]:t[o];r[o]=r[o]*l*.00392156862745098|0}}function composeSMaskLuminosity(t,r,a){for(var i=t.length,o=3;o<i;o+=4){var l=77*t[o-3]+152*t[o-2]+28*t[o-1];r[o]=a?r[o]*a[l>>8]>>8:r[o]*l>>16}}function composeSMask(t,r,a,i){var o=i[0],l=i[1],c=i[2]-o,u=i[3]-l;if(0!==c&&0!==u){!function genericComposeSMask(t,r,a,i,o,l,c,u,d,h,p){for(var v=!!l,y=v?l[0]:0,_=v?l[1]:0,g=v?l[2]:0,m="Luminosity"===o?composeSMaskLuminosity:composeSMaskAlpha,b=Math.min(i,Math.ceil(1048576/a)),w=0;w<i;w+=b){var P=Math.min(b,i-w),k=t.getImageData(u-h,w+(d-p),a,P),A=r.getImageData(u,w+d,a,P);v&&composeSMaskBackdrop(k.data,y,_,g);m(k.data,A.data,c);r.putImageData(A,u,w+d)}}(r.context,a,c,u,r.subtype,r.backdrop,r.transferMap,o,l,r.offsetX,r.offsetY);t.save();t.globalAlpha=1;t.globalCompositeOperation="source-over";t.setTransform(1,0,0,1,0,0);t.drawImage(a.canvas,0,0);t.restore()}}function getImageSmoothingEnabled(t,r){var a=he.singularValueDecompose2dScale(t);a[0]=Math.fround(a[0]);a[1]=Math.fround(a[1]);var i=Math.fround((globalThis.devicePixelRatio||1)*Se.PDF_TO_CSS_UNITS);return void 0!==r?r:a[0]<=i||a[1]<=i}var Bn=["butt","round","square"],zn=["miter","round","bevel"],Hn={},Un={},qn=new WeakSet,Vn=new WeakSet,Kn=function(){function CanvasGraphics(t,r,a,i,o,l,c,u){var d=l.optionalContentConfig,h=l.markedContentStack,p=void 0===h?null:h;canvas_classCallCheck(this,CanvasGraphics);canvas_classPrivateMethodInitSpec(this,Vn);canvas_classPrivateMethodInitSpec(this,qn);this.ctx=t;this.current=new Nn(this.ctx.canvas.width,this.ctx.canvas.height);this.stateStack=[];this.pendingClip=null;this.pendingEOFill=!1;this.res=null;this.xobjs=null;this.commonObjs=r;this.objs=a;this.canvasFactory=i;this.filterFactory=o;this.groupStack=[];this.processingType3=null;this.baseTransform=null;this.baseTransformStack=[];this.groupLevel=0;this.smaskStack=[];this.smaskCounter=0;this.tempSMask=null;this.suspendedCtx=null;this.contentVisible=!0;this.markedContentStack=p||[];this.optionalContentConfig=d;this.cachedCanvases=new Wn(this.canvasFactory);this.cachedPatterns=new Map;this.annotationCanvasMap=c;this.viewportScale=1;this.outputScaleX=1;this.outputScaleY=1;this.pageColors=u;this._cachedScaleForStroking=[-1,0];this._cachedGetSinglePixelWidth=null;this._cachedBitmapsMap=new Map}canvas_createClass(CanvasGraphics,[{key:"getObject",value:function getObject(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):r}},{key:"beginDrawing",value:function beginDrawing(t){var r,a=t.transform,i=t.viewport,o=t.transparency,l=void 0!==o&&o,c=t.background,u=void 0===c?null:c,d=this.ctx.canvas.width,h=this.ctx.canvas.height,p=this.ctx.fillStyle;this.ctx.fillStyle=u||"#ffffff";this.ctx.fillRect(0,0,d,h);this.ctx.fillStyle=p;if(l){var v,y=this.cachedCanvases.getCanvas("transparent",d,h);this.compositeCtx=this.ctx;this.transparentCanvas=y.canvas;this.ctx=y.context;this.ctx.save();(v=this.ctx).transform.apply(v,canvas_toConsumableArray(getCurrentTransform(this.compositeCtx)))}this.ctx.save();resetCtxToDefault(this.ctx);if(a){var _;(_=this.ctx).transform.apply(_,canvas_toConsumableArray(a));this.outputScaleX=a[0];this.outputScaleY=a[0]}(r=this.ctx).transform.apply(r,canvas_toConsumableArray(i.transform));this.viewportScale=i.scale;this.baseTransform=getCurrentTransform(this.ctx)}},{key:"executeOperatorList",value:function executeOperatorList(t,r,a,i){var o=t.argsArray,l=t.fnArray,c=r||0,u=o.length;if(u===c)return c;for(var d,h=u-c>10&&"function"==typeof a,p=h?Date.now()+15:0,v=0,y=this.commonObjs,_=this.objs;;){if(void 0!==i&&c===i.nextBreakPoint){i.breakIt(c,a);return c}if((d=l[c])!==Z.dependency)this[d].apply(this,o[c]);else{var g,m=canvas_createForOfIteratorHelper(o[c]);try{for(m.s();!(g=m.n()).done;){var b=g.value,w=b.startsWith("g_")?y:_;if(!w.has(b)){w.get(b,a);return c}}}catch(t){m.e(t)}finally{m.f()}}if(++c===u)return c;if(h&&++v>10){if(Date.now()>p){a();return c}v=0}}}},{key:"endDrawing",value:function endDrawing(){canvas_classPrivateMethodGet(this,qn,_restoreInitialState2).call(this);this.cachedCanvases.clear();this.cachedPatterns.clear();var t,r=canvas_createForOfIteratorHelper(this._cachedBitmapsMap.values());try{for(r.s();!(t=r.n()).done;){var a,i=t.value,o=canvas_createForOfIteratorHelper(i.values());try{for(o.s();!(a=o.n()).done;){var l=a.value;"undefined"!=typeof HTMLCanvasElement&&l instanceof HTMLCanvasElement&&(l.width=l.height=0)}}catch(t){o.e(t)}finally{o.f()}i.clear()}}catch(t){r.e(t)}finally{r.f()}this._cachedBitmapsMap.clear();canvas_classPrivateMethodGet(this,Vn,_drawFilter2).call(this)}},{key:"_scaleImage",value:function _scaleImage(t,r){for(var a,i,o=t.width,l=t.height,c=Math.max(Math.hypot(r[0],r[1]),1),u=Math.max(Math.hypot(r[2],r[3]),1),d=o,h=l,p="prescale1";c>2&&d>1||u>2&&h>1;){var v=d,y=h;c>2&&d>1&&(c/=d/(v=d>=16384?Math.floor(d/2)-1||1:Math.ceil(d/2)));u>2&&h>1&&(u/=h/(y=h>=16384?Math.floor(h/2)-1||1:Math.ceil(h)/2));(i=(a=this.cachedCanvases.getCanvas(p,v,y)).context).clearRect(0,0,v,y);i.drawImage(t,0,0,d,h,0,0,v,y);t=a.canvas;d=v;h=y;p="prescale1"===p?"prescale2":"prescale1"}return{img:t,paintWidth:d,paintHeight:h}}},{key:"_createMaskCanvas",value:function _createMaskCanvas(t){var r,a,i,o,l=this.ctx,c=t.width,u=t.height,d=this.current.fillColor,h=this.current.patternFill,p=getCurrentTransform(l);if((t.bitmap||t.data)&&t.count>1){var v=t.bitmap||t.data.buffer;a=JSON.stringify(h?p:[p.slice(0,4),d]);if(!(r=this._cachedBitmapsMap.get(v))){r=new Map;this._cachedBitmapsMap.set(v,r)}var y=r.get(a);if(y&&!h){return{canvas:y,offsetX:Math.round(Math.min(p[0],p[2])+p[4]),offsetY:Math.round(Math.min(p[1],p[3])+p[5])}}i=y}i||putBinaryImageMask((o=this.cachedCanvases.getCanvas("maskCanvas",c,u)).context,t);var _=he.transform(p,[1/c,0,0,-1/u,0,0]);_=he.transform(_,[1,0,0,1,0,-u]);var g=canvas_slicedToArray(he.getAxialAlignedBoundingBox([0,0,c,u],_),4),m=g[0],b=g[1],w=g[2],P=g[3],k=Math.round(w-m)||1,A=Math.round(P-b)||1,S=this.cachedCanvases.getCanvas("fillCanvas",k,A),x=S.context,E=m,I=b;x.translate(-E,-I);x.transform.apply(x,canvas_toConsumableArray(_));if(!i){i=(i=this._scaleImage(o.canvas,getCurrentTransformInverse(x))).img;r&&h&&r.set(a,i)}x.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(x),t.interpolate);drawImageAtIntegerCoords(x,i,0,0,i.width,i.height,0,0,c,u);x.globalCompositeOperation="source-in";var C=he.transform(getCurrentTransformInverse(x),[1,0,0,1,-E,-I]);x.fillStyle=h?d.getPattern(l,this,C,Fn):d;x.fillRect(0,0,c,u);if(r&&!h){this.cachedCanvases.delete("fillCanvas");r.set(a,S.canvas)}return{canvas:S.canvas,offsetX:Math.round(E),offsetY:Math.round(I)}}},{key:"setLineWidth",value:function setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1);this.current.lineWidth=t;this.ctx.lineWidth=t}},{key:"setLineCap",value:function setLineCap(t){this.ctx.lineCap=Bn[t]}},{key:"setLineJoin",value:function setLineJoin(t){this.ctx.lineJoin=zn[t]}},{key:"setMiterLimit",value:function setMiterLimit(t){this.ctx.miterLimit=t}},{key:"setDash",value:function setDash(t,r){var a=this.ctx;if(void 0!==a.setLineDash){a.setLineDash(t);a.lineDashOffset=r}}},{key:"setRenderingIntent",value:function setRenderingIntent(t){}},{key:"setFlatness",value:function setFlatness(t){}},{key:"setGState",value:function setGState(t){var r,a=canvas_createForOfIteratorHelper(t);try{for(a.s();!(r=a.n()).done;){var i=canvas_slicedToArray(r.value,2),o=i[0],l=i[1];switch(o){case"LW":this.setLineWidth(l);break;case"LC":this.setLineCap(l);break;case"LJ":this.setLineJoin(l);break;case"ML":this.setMiterLimit(l);break;case"D":this.setDash(l[0],l[1]);break;case"RI":this.setRenderingIntent(l);break;case"FL":this.setFlatness(l);break;case"Font":this.setFont(l[0],l[1]);break;case"CA":this.current.strokeAlpha=l;break;case"ca":this.current.fillAlpha=l;this.ctx.globalAlpha=l;break;case"BM":this.ctx.globalCompositeOperation=l;break;case"SMask":this.current.activeSMask=l?this.tempSMask:null;this.tempSMask=null;this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(l)}}}catch(t){a.e(t)}finally{a.f()}}},{key:"inSMaskMode",get:function get(){return!!this.suspendedCtx}},{key:"checkSMaskState",value:function checkSMaskState(){var t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");var t=this.ctx.canvas.width,r=this.ctx.canvas.height,a="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(a,t,r);this.suspendedCtx=this.ctx;this.ctx=i.context;var o=this.ctx;o.setTransform.apply(o,canvas_toConsumableArray(getCurrentTransform(this.suspendedCtx)));copyCtxState(this.suspendedCtx,o);!function mirrorContextOperations(t,r){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save;t.__originalRestore=t.restore;t.__originalRotate=t.rotate;t.__originalScale=t.scale;t.__originalTranslate=t.translate;t.__originalTransform=t.transform;t.__originalSetTransform=t.setTransform;t.__originalResetTransform=t.resetTransform;t.__originalClip=t.clip;t.__originalMoveTo=t.moveTo;t.__originalLineTo=t.lineTo;t.__originalBezierCurveTo=t.bezierCurveTo;t.__originalRect=t.rect;t.__originalClosePath=t.closePath;t.__originalBeginPath=t.beginPath;t._removeMirroring=function(){t.save=t.__originalSave;t.restore=t.__originalRestore;t.rotate=t.__originalRotate;t.scale=t.__originalScale;t.translate=t.__originalTranslate;t.transform=t.__originalTransform;t.setTransform=t.__originalSetTransform;t.resetTransform=t.__originalResetTransform;t.clip=t.__originalClip;t.moveTo=t.__originalMoveTo;t.lineTo=t.__originalLineTo;t.bezierCurveTo=t.__originalBezierCurveTo;t.rect=t.__originalRect;t.closePath=t.__originalClosePath;t.beginPath=t.__originalBeginPath;delete t._removeMirroring};t.save=function ctxSave(){r.save();this.__originalSave()};t.restore=function ctxRestore(){r.restore();this.__originalRestore()};t.translate=function ctxTranslate(t,a){r.translate(t,a);this.__originalTranslate(t,a)};t.scale=function ctxScale(t,a){r.scale(t,a);this.__originalScale(t,a)};t.transform=function ctxTransform(t,a,i,o,l,c){r.transform(t,a,i,o,l,c);this.__originalTransform(t,a,i,o,l,c)};t.setTransform=function ctxSetTransform(t,a,i,o,l,c){r.setTransform(t,a,i,o,l,c);this.__originalSetTransform(t,a,i,o,l,c)};t.resetTransform=function ctxResetTransform(){r.resetTransform();this.__originalResetTransform()};t.rotate=function ctxRotate(t){r.rotate(t);this.__originalRotate(t)};t.clip=function ctxRotate(t){r.clip(t);this.__originalClip(t)};t.moveTo=function(t,a){r.moveTo(t,a);this.__originalMoveTo(t,a)};t.lineTo=function(t,a){r.lineTo(t,a);this.__originalLineTo(t,a)};t.bezierCurveTo=function(t,a,i,o,l,c){r.bezierCurveTo(t,a,i,o,l,c);this.__originalBezierCurveTo(t,a,i,o,l,c)};t.rect=function(t,a,i,o){r.rect(t,a,i,o);this.__originalRect(t,a,i,o)};t.closePath=function(){r.closePath();this.__originalClosePath()};t.beginPath=function(){r.beginPath();this.__originalBeginPath()}}(o,this.suspendedCtx);this.setGState([["BM","source-over"],["ca",1],["CA",1]])}},{key:"endSMaskMode",value:function endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring();copyCtxState(this.ctx,this.suspendedCtx);this.ctx=this.suspendedCtx;this.suspendedCtx=null}},{key:"compose",value:function compose(t){if(this.current.activeSMask){if(t){t[0]=Math.floor(t[0]);t[1]=Math.floor(t[1]);t[2]=Math.ceil(t[2]);t[3]=Math.ceil(t[3])}else t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var r=this.current.activeSMask;composeSMask(this.suspendedCtx,r,this.ctx,t);this.ctx.save();this.ctx.setTransform(1,0,0,1,0,0);this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height);this.ctx.restore()}}},{key:"save",value:function save(){if(this.inSMaskMode){copyCtxState(this.ctx,this.suspendedCtx);this.suspendedCtx.save()}else this.ctx.save();var t=this.current;this.stateStack.push(t);this.current=t.clone()}},{key:"restore",value:function restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode();if(0!==this.stateStack.length){this.current=this.stateStack.pop();if(this.inSMaskMode){this.suspendedCtx.restore();copyCtxState(this.suspendedCtx,this.ctx)}else this.ctx.restore();this.checkSMaskState();this.pendingClip=null;this._cachedScaleForStroking[0]=-1;this._cachedGetSinglePixelWidth=null}}},{key:"transform",value:function transform(t,r,a,i,o,l){this.ctx.transform(t,r,a,i,o,l);this._cachedScaleForStroking[0]=-1;this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function constructPath(t,r,a){for(var i,o,l=this.ctx,c=this.current,u=c.x,d=c.y,h=getCurrentTransform(l),p=0===h[0]&&0===h[3]||0===h[1]&&0===h[2],v=p?a.slice(0):null,y=0,_=0,g=t.length;y<g;y++)switch(0|t[y]){case Z.rectangle:u=r[_++];d=r[_++];var m=r[_++],b=r[_++],w=u+m,P=d+b;l.moveTo(u,d);if(0===m||0===b)l.lineTo(w,P);else{l.lineTo(w,d);l.lineTo(w,P);l.lineTo(u,P)}p||c.updateRectMinMax(h,[u,d,w,P]);l.closePath();break;case Z.moveTo:u=r[_++];d=r[_++];l.moveTo(u,d);p||c.updatePathMinMax(h,u,d);break;case Z.lineTo:u=r[_++];d=r[_++];l.lineTo(u,d);p||c.updatePathMinMax(h,u,d);break;case Z.curveTo:i=u;o=d;u=r[_+4];d=r[_+5];l.bezierCurveTo(r[_],r[_+1],r[_+2],r[_+3],u,d);c.updateCurvePathMinMax(h,i,o,r[_],r[_+1],r[_+2],r[_+3],u,d,v);_+=6;break;case Z.curveTo2:i=u;o=d;l.bezierCurveTo(u,d,r[_],r[_+1],r[_+2],r[_+3]);c.updateCurvePathMinMax(h,i,o,u,d,r[_],r[_+1],r[_+2],r[_+3],v);u=r[_+2];d=r[_+3];_+=4;break;case Z.curveTo3:i=u;o=d;u=r[_+2];d=r[_+3];l.bezierCurveTo(r[_],r[_+1],u,d,u,d);c.updateCurvePathMinMax(h,i,o,r[_],r[_+1],u,d,u,d,v);_+=4;break;case Z.closePath:l.closePath()}p&&c.updateScalingPathMinMax(h,v);c.setCurrentPoint(u,d)}},{key:"closePath",value:function closePath(){this.ctx.closePath()}},{key:"stroke",value:function stroke(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.ctx,a=this.current.strokeColor;r.globalAlpha=this.current.strokeAlpha;if(this.contentVisible)if("object"===canvas_typeof(a)&&null!=a&&a.getPattern){r.save();r.strokeStyle=a.getPattern(r,this,getCurrentTransformInverse(r),En);this.rescaleAndStroke(!1);r.restore()}else this.rescaleAndStroke(!0);t&&this.consumePath(this.current.getClippedPathBoundingBox());r.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function closeStroke(){this.closePath();this.stroke()}},{key:"fill",value:function fill(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.ctx,a=this.current.fillColor,i=!1;if(this.current.patternFill){r.save();r.fillStyle=a.getPattern(r,this,getCurrentTransformInverse(r),Fn);i=!0}var o=this.current.getClippedPathBoundingBox();if(this.contentVisible&&null!==o)if(this.pendingEOFill){r.fill("evenodd");this.pendingEOFill=!1}else r.fill();i&&r.restore();t&&this.consumePath(o)}},{key:"eoFill",value:function eoFill(){this.pendingEOFill=!0;this.fill()}},{key:"fillStroke",value:function fillStroke(){this.fill(!1);this.stroke(!1);this.consumePath()}},{key:"eoFillStroke",value:function eoFillStroke(){this.pendingEOFill=!0;this.fillStroke()}},{key:"closeFillStroke",value:function closeFillStroke(){this.closePath();this.fillStroke()}},{key:"closeEOFillStroke",value:function closeEOFillStroke(){this.pendingEOFill=!0;this.closePath();this.fillStroke()}},{key:"endPath",value:function endPath(){this.consumePath()}},{key:"clip",value:function clip(){this.pendingClip=Hn}},{key:"eoClip",value:function eoClip(){this.pendingClip=Un}},{key:"beginText",value:function beginText(){this.current.textMatrix=r;this.current.textMatrixScale=1;this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0}},{key:"endText",value:function endText(){var t=this.pendingTextPaths,r=this.ctx;if(void 0!==t){r.save();r.beginPath();var a,i=canvas_createForOfIteratorHelper(t);try{for(i.s();!(a=i.n()).done;){var o=a.value;r.setTransform.apply(r,canvas_toConsumableArray(o.transform));r.translate(o.x,o.y);o.addToPath(r,o.fontSize)}}catch(t){i.e(t)}finally{i.f()}r.restore();r.clip();r.beginPath();delete this.pendingTextPaths}else r.beginPath()}},{key:"setCharSpacing",value:function setCharSpacing(t){this.current.charSpacing=t}},{key:"setWordSpacing",value:function setWordSpacing(t){this.current.wordSpacing=t}},{key:"setHScale",value:function setHScale(t){this.current.textHScale=t/100}},{key:"setLeading",value:function setLeading(t){this.current.leading=-t}},{key:"setFont",value:function setFont(t,r){var a,o=this.commonObjs.get(t),l=this.current;if(!o)throw new Error("Can't find font for ".concat(t));l.fontMatrix=o.fontMatrix||i;0!==l.fontMatrix[0]&&0!==l.fontMatrix[3]||warn("Invalid font matrix for font "+t);if(r<0){r=-r;l.fontDirection=-1}else l.fontDirection=1;this.current.font=o;this.current.fontSize=r;if(!o.isType3Font){var c=o.loadedName||"sans-serif",u=(null===(a=o.systemFontInfo)||void 0===a?void 0:a.css)||'"'.concat(c,'", ').concat(o.fallbackName),d="normal";o.black?d="900":o.bold&&(d="bold");var h=o.italic?"italic":"normal",p=r;r<16?p=16:r>100&&(p=100);this.current.fontSizeScale=r/p;this.ctx.font="".concat(h," ").concat(d," ").concat(p,"px ").concat(u)}}},{key:"setTextRenderingMode",value:function setTextRenderingMode(t){this.current.textRenderingMode=t}},{key:"setTextRise",value:function setTextRise(t){this.current.textRise=t}},{key:"moveText",value:function moveText(t,r){this.current.x=this.current.lineX+=t;this.current.y=this.current.lineY+=r}},{key:"setLeadingMoveText",value:function setLeadingMoveText(t,r){this.setLeading(-r);this.moveText(t,r)}},{key:"setTextMatrix",value:function setTextMatrix(t,r,a,i,o,l){this.current.textMatrix=[t,r,a,i,o,l];this.current.textMatrixScale=Math.hypot(t,r);this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0}},{key:"nextLine",value:function nextLine(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function paintChar(t,r,a,i){var o,l=this.ctx,c=this.current,u=c.font,d=c.textRenderingMode,h=c.fontSize/c.fontSizeScale,p=d&A,v=!!(d&S),y=c.patternFill&&!u.missingFile;(u.disableFontFace||v||y)&&(o=u.getPathGenerator(this.commonObjs,t));if(u.disableFontFace||y){l.save();l.translate(r,a);l.beginPath();o(l,h);i&&l.setTransform.apply(l,canvas_toConsumableArray(i));p!==b&&p!==P||l.fill();p!==w&&p!==P||l.stroke();l.restore()}else{p!==b&&p!==P||l.fillText(t,r,a);p!==w&&p!==P||l.strokeText(t,r,a)}if(v){(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:getCurrentTransform(l),x:r,y:a,fontSize:h,addToPath:o})}}},{key:"isFontSubpixelAAEnabled",get:function get(){var t=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;t.scale(1.5,1);t.fillText("I",0,10);for(var r=t.getImageData(0,0,10,10).data,a=!1,i=3;i<r.length;i+=4)if(r[i]>0&&r[i]<255){a=!0;break}return shadow(this,"isFontSubpixelAAEnabled",a)}},{key:"showText",value:function showText(t){var r=this.current,a=r.font;if(a.isType3Font)return this.showType3Text(t);var i=r.fontSize;if(0!==i){var o,l=this.ctx,c=r.fontSizeScale,u=r.charSpacing,d=r.wordSpacing,h=r.fontDirection,p=r.textHScale*h,v=t.length,y=a.vertical,_=y?1:-1,g=a.defaultVMetrics,m=i*r.fontMatrix[0],k=r.textRenderingMode===b&&!a.disableFontFace&&!r.patternFill;l.save();l.transform.apply(l,canvas_toConsumableArray(r.textMatrix));l.translate(r.x,r.y+r.textRise);h>0?l.scale(p,-1):l.scale(p,1);if(r.patternFill){l.save();var S=r.fillColor.getPattern(l,this,getCurrentTransformInverse(l),Fn);o=getCurrentTransform(l);l.restore();l.fillStyle=S}var x=r.lineWidth,E=r.textMatrixScale;if(0===E||0===x){var I=r.textRenderingMode&A;I!==w&&I!==P||(x=this.getSinglePixelWidth())}else x/=E;if(1!==c){l.scale(c,c);x/=c}l.lineWidth=x;if(a.isInvalidPDFjsFont){var C,T=[],M=0,O=canvas_createForOfIteratorHelper(t);try{for(O.s();!(C=O.n()).done;){var G=C.value;T.push(G.unicode);M+=G.width}}catch(t){O.e(t)}finally{O.f()}l.fillText(T.join(""),0,0);r.x+=M*m*p;l.restore();this.compose()}else{var R,L=0;for(R=0;R<v;++R){var D=t[R];if("number"!=typeof D){var j=!1,W=(D.isSpace?d:0)+u,N=D.fontChar,B=D.accent,z=void 0,H=void 0,U=D.width;if(y){var q=D.vmetric||g,V=-(D.vmetric?q[1]:.5*U)*m,K=q[2]*m;U=q?-q[0]:U;z=V/c;H=(L+K)/c}else{z=L/c;H=0}if(a.remeasure&&U>0){var Y=1e3*l.measureText(N).width/i*c;if(U<Y&&this.isFontSubpixelAAEnabled){var X=U/Y;j=!0;l.save();l.scale(X,1);z/=X}else U!==Y&&(z+=(U-Y)/2e3*i/c)}if(this.contentVisible&&(D.isInFont||a.missingFile))if(k&&!B)l.fillText(N,z,H);else{this.paintChar(N,z,H,o);if(B){var $=z+i*B.offset.x/c,J=H-i*B.offset.y/c;this.paintChar(B.fontChar,$,J,o)}}L+=y?U*m-W*h:U*m+W*h;j&&l.restore()}else L+=_*D*i/1e3}y?r.y-=L:r.x+=L*p;l.restore();this.compose()}}}},{key:"showType3Text",value:function showType3Text(t){var r,a,o,l,c=this.ctx,u=this.current,d=u.font,h=u.fontSize,p=u.fontDirection,v=d.vertical?1:-1,y=u.charSpacing,_=u.wordSpacing,g=u.textHScale*p,m=u.fontMatrix||i,b=t.length;if(!(u.textRenderingMode===k)&&0!==h){this._cachedScaleForStroking[0]=-1;this._cachedGetSinglePixelWidth=null;c.save();c.transform.apply(c,canvas_toConsumableArray(u.textMatrix));c.translate(u.x,u.y);c.scale(g,p);for(r=0;r<b;++r)if("number"!=typeof(a=t[r])){var w=(a.isSpace?_:0)+y,P=d.charProcOperatorList[a.operatorListId];if(P){if(this.contentVisible){this.processingType3=a;this.save();c.scale(h,h);c.transform.apply(c,canvas_toConsumableArray(m));this.executeOperatorList(P);this.restore()}o=he.applyTransform([a.width,0],m)[0]*h+w;c.translate(o,0);u.x+=o*g}else warn('Type3 character "'.concat(a.operatorListId,'" is not available.'))}else{l=v*a*h/1e3;this.ctx.translate(l,0);u.x+=l*g}c.restore();this.processingType3=null}}},{key:"setCharWidth",value:function setCharWidth(t,r){}},{key:"setCharWidthAndBounds",value:function setCharWidthAndBounds(t,r,a,i,o,l){this.ctx.rect(a,i,o-a,l-i);this.ctx.clip();this.endPath()}},{key:"getColorN_Pattern",value:function getColorN_Pattern(t){var r,a=this;if("TilingPattern"===t[0]){var i=t[1],o=this.baseTransform||getCurrentTransform(this.ctx),l={createCanvasGraphics:function createCanvasGraphics(t){return new CanvasGraphics(t,a.commonObjs,a.objs,a.canvasFactory,a.filterFactory,{optionalContentConfig:a.optionalContentConfig,markedContentStack:a.markedContentStack})}};r=new Ln(t,i,this.ctx,l,o)}else r=this._getPattern(t[1],t[2]);return r}},{key:"setStrokeColorN",value:function setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}},{key:"setFillColorN",value:function setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments);this.current.patternFill=!0}},{key:"setStrokeRGBColor",value:function setStrokeRGBColor(t,r,a){var i=he.makeHexColor(t,r,a);this.ctx.strokeStyle=i;this.current.strokeColor=i}},{key:"setFillRGBColor",value:function setFillRGBColor(t,r,a){var i=he.makeHexColor(t,r,a);this.ctx.fillStyle=i;this.current.fillColor=i;this.current.patternFill=!1}},{key:"_getPattern",value:function _getPattern(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.cachedPatterns.has(t))r=this.cachedPatterns.get(t);else{r=function getShadingPattern(t){switch(t[0]){case"RadialAxial":return new Tn(t);case"Mesh":return new Mn(t);case"Dummy":return new On}throw new Error("Unknown IR type: ".concat(t[0]))}(this.getObject(t));this.cachedPatterns.set(t,r)}a&&(r.matrix=a);return r}},{key:"shadingFill",value:function shadingFill(t){if(this.contentVisible){var r=this.ctx;this.save();var a=this._getPattern(t);r.fillStyle=a.getPattern(r,this,getCurrentTransformInverse(r),In);var i=getCurrentTransformInverse(r);if(i){var o=r.canvas,l=o.width,c=o.height,u=canvas_slicedToArray(he.getAxialAlignedBoundingBox([0,0,l,c],i),4),d=u[0],h=u[1],p=u[2],v=u[3];this.ctx.fillRect(d,h,p-d,v-h)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox());this.restore()}}},{key:"beginInlineImage",value:function beginInlineImage(){unreachable("Should not call beginInlineImage")}},{key:"beginImageData",value:function beginImageData(){unreachable("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function paintFormXObjectBegin(t,r){if(this.contentVisible){this.save();this.baseTransformStack.push(this.baseTransform);Array.isArray(t)&&6===t.length&&this.transform.apply(this,canvas_toConsumableArray(t));this.baseTransform=getCurrentTransform(this.ctx);if(r){var a=r[2]-r[0],i=r[3]-r[1];this.ctx.rect(r[0],r[1],a,i);this.current.updateRectMinMax(getCurrentTransform(this.ctx),r);this.clip();this.endPath()}}}},{key:"paintFormXObjectEnd",value:function paintFormXObjectEnd(){if(this.contentVisible){this.restore();this.baseTransform=this.baseTransformStack.pop()}}},{key:"beginGroup",value:function beginGroup(t){if(this.contentVisible){this.save();if(this.inSMaskMode){this.endSMaskMode();this.current.activeSMask=null}var r=this.ctx;t.isolated||info("TODO: Support non-isolated groups.");t.knockout&&warn("Knockout groups not supported.");var a=getCurrentTransform(r);t.matrix&&r.transform.apply(r,canvas_toConsumableArray(t.matrix));if(!t.bbox)throw new Error("Bounding box is required.");var i=he.getAxialAlignedBoundingBox(t.bbox,getCurrentTransform(r)),o=[0,0,r.canvas.width,r.canvas.height];i=he.intersect(i,o)||[0,0,0,0];var l=Math.floor(i[0]),c=Math.floor(i[1]),u=Math.max(Math.ceil(i[2])-l,1),d=Math.max(Math.ceil(i[3])-c,1),h=1,p=1;if(u>Dn){h=u/Dn;u=Dn}if(d>Dn){p=d/Dn;d=Dn}this.current.startNewPathAndClipBox([0,0,u,d]);var v="groupAt"+this.groupLevel;t.smask&&(v+="_smask_"+this.smaskCounter++%2);var y=this.cachedCanvases.getCanvas(v,u,d),_=y.context;_.scale(1/h,1/p);_.translate(-l,-c);_.transform.apply(_,canvas_toConsumableArray(a));if(t.smask)this.smaskStack.push({canvas:y.canvas,context:_,offsetX:l,offsetY:c,scaleX:h,scaleY:p,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null});else{r.setTransform(1,0,0,1,0,0);r.translate(l,c);r.scale(h,p);r.save()}copyCtxState(r,_);this.ctx=_;this.setGState([["BM","source-over"],["ca",1],["CA",1]]);this.groupStack.push(r);this.groupLevel++}}},{key:"endGroup",value:function endGroup(t){if(this.contentVisible){this.groupLevel--;var r=this.ctx,a=this.groupStack.pop();this.ctx=a;this.ctx.imageSmoothingEnabled=!1;if(t.smask){this.tempSMask=this.smaskStack.pop();this.restore()}else{var i;this.ctx.restore();var o=getCurrentTransform(this.ctx);this.restore();this.ctx.save();(i=this.ctx).setTransform.apply(i,canvas_toConsumableArray(o));var l=he.getAxialAlignedBoundingBox([0,0,r.canvas.width,r.canvas.height],o);this.ctx.drawImage(r.canvas,0,0);this.ctx.restore();this.compose(l)}}}},{key:"beginAnnotation",value:function beginAnnotation(t,r,a,i,o){canvas_classPrivateMethodGet(this,qn,_restoreInitialState2).call(this);resetCtxToDefault(this.ctx);this.ctx.save();this.save();if(this.baseTransform){var l;(l=this.ctx).setTransform.apply(l,canvas_toConsumableArray(this.baseTransform))}if(Array.isArray(r)&&4===r.length){var c=r[2]-r[0],u=r[3]-r[1];if(o&&this.annotationCanvasMap){(a=a.slice())[4]-=r[0];a[5]-=r[1];(r=r.slice())[0]=r[1]=0;r[2]=c;r[3]=u;var d=canvas_slicedToArray(he.singularValueDecompose2dScale(getCurrentTransform(this.ctx)),2),h=d[0],p=d[1],v=this.viewportScale,y=Math.ceil(c*this.outputScaleX*v),_=Math.ceil(u*this.outputScaleY*v);this.annotationCanvas=this.canvasFactory.create(y,_);var g=this.annotationCanvas,m=g.canvas,b=g.context;this.annotationCanvasMap.set(t,m);this.annotationCanvas.savedCtx=this.ctx;this.ctx=b;this.ctx.save();this.ctx.setTransform(h,0,0,-p,0,u*p);resetCtxToDefault(this.ctx)}else{resetCtxToDefault(this.ctx);this.ctx.rect(r[0],r[1],c,u);this.ctx.clip();this.endPath()}}this.current=new Nn(this.ctx.canvas.width,this.ctx.canvas.height);this.transform.apply(this,canvas_toConsumableArray(a));this.transform.apply(this,canvas_toConsumableArray(i))}},{key:"endAnnotation",value:function endAnnotation(){if(this.annotationCanvas){this.ctx.restore();canvas_classPrivateMethodGet(this,Vn,_drawFilter2).call(this);this.ctx=this.annotationCanvas.savedCtx;delete this.annotationCanvas.savedCtx;delete this.annotationCanvas}}},{key:"paintImageMaskXObject",value:function paintImageMaskXObject(t){if(this.contentVisible){var r=t.count;(t=this.getObject(t.data,t)).count=r;var a=this.ctx,i=this.processingType3;if(i){void 0===i.compiled&&(i.compiled=function compileType3Glyph(t){var r=t.width,a=t.height;if(r>1e3||a>1e3)return null;var i,o,l,c,u=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),d=r+1,h=new Uint8Array(d*(a+1)),p=r+7&-8,v=new Uint8Array(p*a),y=0,_=canvas_createForOfIteratorHelper(t.data);try{for(_.s();!(c=_.n()).done;)for(var g=c.value,m=128;m>0;){v[y++]=g&m?0:255;m>>=1}}catch(t){_.e(t)}finally{_.f()}var b=0;if(0!==v[y=0]){h[0]=1;++b}for(o=1;o<r;o++){if(v[y]!==v[y+1]){h[o]=v[y]?2:1;++b}y++}if(0!==v[y]){h[o]=2;++b}for(i=1;i<a;i++){l=i*d;if(v[(y=i*p)-p]!==v[y]){h[l]=v[y]?1:8;++b}var w=(v[y]?4:0)+(v[y-p]?8:0);for(o=1;o<r;o++){if(u[w=(w>>2)+(v[y+1]?4:0)+(v[y-p+1]?8:0)]){h[l+o]=u[w];++b}y++}if(v[y-p]!==v[y]){h[l+o]=v[y]?2:4;++b}if(b>1e3)return null}l=i*d;if(0!==v[y=p*(a-1)]){h[l]=8;++b}for(o=1;o<r;o++){if(v[y]!==v[y+1]){h[l+o]=v[y]?4:8;++b}y++}if(0!==v[y]){h[l+o]=4;++b}if(b>1e3)return null;var P=new Int32Array([0,d,-1,0,-d,0,0,0,1]),k=new Path2D;for(i=0;b&&i<=a;i++){for(var A=i*d,S=A+r;A<S&&!h[A];)A++;if(A!==S){k.moveTo(A%d,i);var x=A,E=h[A];do{var I=P[E];do{A+=I}while(!h[A]);var C=h[A];if(5!==C&&10!==C){E=C;h[A]=0}else{E=C&51*E>>4;h[A]&=E>>2|E<<2}k.lineTo(A%d,A/d|0);h[A]||--b}while(x!==A);--i}}v=null;h=null;return function drawOutline(t){t.save();t.scale(1/r,-1/a);t.translate(0,-a);t.fill(k);t.beginPath();t.restore()}}(t));if(i.compiled){i.compiled(a);return}}var o=this._createMaskCanvas(t),l=o.canvas;a.save();a.setTransform(1,0,0,1,0,0);a.drawImage(l,o.offsetX,o.offsetY);a.restore();this.compose()}}},{key:"paintImageMaskXObjectRepeat",value:function paintImageMaskXObjectRepeat(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,l=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){t=this.getObject(t.data,t);var c=this.ctx;c.save();var u=getCurrentTransform(c);c.transform(r,a,i,o,0,0);var d=this._createMaskCanvas(t);c.setTransform(1,0,0,1,d.offsetX-u[4],d.offsetY-u[5]);for(var h=0,p=l.length;h<p;h+=2){var v=he.transform(u,[r,a,i,o,l[h],l[h+1]]),y=canvas_slicedToArray(he.applyTransform([0,0],v),2),_=y[0],g=y[1];c.drawImage(d.canvas,_,g)}c.restore();this.compose()}}},{key:"paintImageMaskXObjectGroup",value:function paintImageMaskXObjectGroup(t){if(this.contentVisible){var r,a=this.ctx,i=this.current.fillColor,o=this.current.patternFill,l=canvas_createForOfIteratorHelper(t);try{for(l.s();!(r=l.n()).done;){var c=r.value,u=c.data,d=c.width,h=c.height,p=c.transform,v=this.cachedCanvases.getCanvas("maskCanvas",d,h),y=v.context;y.save();putBinaryImageMask(y,this.getObject(u,c));y.globalCompositeOperation="source-in";y.fillStyle=o?i.getPattern(y,this,getCurrentTransformInverse(a),Fn):i;y.fillRect(0,0,d,h);y.restore();a.save();a.transform.apply(a,canvas_toConsumableArray(p));a.scale(1,-1);drawImageAtIntegerCoords(a,v.canvas,0,0,d,h,0,-1,1,1);a.restore()}}catch(t){l.e(t)}finally{l.f()}this.compose()}}},{key:"paintImageXObject",value:function paintImageXObject(t){if(this.contentVisible){var r=this.getObject(t);r?this.paintInlineImageXObject(r):warn("Dependent image isn't ready yet")}}},{key:"paintImageXObjectRepeat",value:function paintImageXObjectRepeat(t,r,a,i){if(this.contentVisible){var o=this.getObject(t);if(o){for(var l=o.width,c=o.height,u=[],d=0,h=i.length;d<h;d+=2)u.push({transform:[r,0,0,a,i[d],i[d+1]],x:0,y:0,w:l,h:c});this.paintInlineImageXObjectGroup(o,u)}else warn("Dependent image isn't ready yet")}}},{key:"applyTransferMapsToCanvas",value:function applyTransferMapsToCanvas(t){if("none"!==this.current.transferMaps){t.filter=this.current.transferMaps;t.drawImage(t.canvas,0,0);t.filter="none"}return t.canvas}},{key:"applyTransferMapsToBitmap",value:function applyTransferMapsToBitmap(t){if("none"===this.current.transferMaps)return t.bitmap;var r=t.bitmap,a=t.width,i=t.height,o=this.cachedCanvases.getCanvas("inlineImage",a,i),l=o.context;l.filter=this.current.transferMaps;l.drawImage(r,0,0);l.filter="none";return o.canvas}},{key:"paintInlineImageXObject",value:function paintInlineImageXObject(r){if(this.contentVisible){var a,i=r.width,o=r.height,l=this.ctx;this.save();if(!t){var c=l.filter;"none"!==c&&""!==c&&(l.filter="none")}l.scale(1/i,-1/o);if(r.bitmap)a=this.applyTransferMapsToBitmap(r);else if("function"==typeof HTMLElement&&r instanceof HTMLElement||!r.data)a=r;else{var u=this.cachedCanvases.getCanvas("inlineImage",i,o).context;putBinaryImageData(u,r);a=this.applyTransferMapsToCanvas(u)}var d=this._scaleImage(a,getCurrentTransformInverse(l));l.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(l),r.interpolate);drawImageAtIntegerCoords(l,d.img,0,0,d.paintWidth,d.paintHeight,0,-o,i,o);this.compose();this.restore()}}},{key:"paintInlineImageXObjectGroup",value:function paintInlineImageXObjectGroup(t,r){if(this.contentVisible){var a,i=this.ctx;if(t.bitmap)a=t.bitmap;else{var o=t.width,l=t.height,c=this.cachedCanvases.getCanvas("inlineImage",o,l).context;putBinaryImageData(c,t);a=this.applyTransferMapsToCanvas(c)}var u,d=canvas_createForOfIteratorHelper(r);try{for(d.s();!(u=d.n()).done;){var h=u.value;i.save();i.transform.apply(i,canvas_toConsumableArray(h.transform));i.scale(1,-1);drawImageAtIntegerCoords(i,a,h.x,h.y,h.w,h.h,0,-1,1,1);i.restore()}}catch(t){d.e(t)}finally{d.f()}this.compose()}}},{key:"paintSolidColorImageMask",value:function paintSolidColorImageMask(){if(this.contentVisible){this.ctx.fillRect(0,0,1,1);this.compose()}}},{key:"markPoint",value:function markPoint(t){}},{key:"markPointProps",value:function markPointProps(t,r){}},{key:"beginMarkedContent",value:function beginMarkedContent(t){this.markedContentStack.push({visible:!0})}},{key:"beginMarkedContentProps",value:function beginMarkedContentProps(t,r){"OC"===t?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(r)}):this.markedContentStack.push({visible:!0});this.contentVisible=this.isContentVisible()}},{key:"endMarkedContent",value:function endMarkedContent(){this.markedContentStack.pop();this.contentVisible=this.isContentVisible()}},{key:"beginCompat",value:function beginCompat(){}},{key:"endCompat",value:function endCompat(){}},{key:"consumePath",value:function consumePath(t){var r=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath();this.pendingClip||this.compose(t);var a=this.ctx;if(this.pendingClip){r||(this.pendingClip===Un?a.clip("evenodd"):a.clip());this.pendingClip=null}this.current.startNewPathAndClipBox(this.current.clipBox);a.beginPath()}},{key:"getSinglePixelWidth",value:function getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){var t=getCurrentTransform(this.ctx);if(0===t[1]&&0===t[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{var r=Math.abs(t[0]*t[3]-t[2]*t[1]),a=Math.hypot(t[0],t[2]),i=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(a,i)/r}}return this._cachedGetSinglePixelWidth}},{key:"getScaleForStroking",value:function getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){var t,r,a=this.current.lineWidth,i=this.ctx.getTransform(),o=i.a,l=i.b,c=i.c,u=i.d;if(0===l&&0===c){var d=Math.abs(o),h=Math.abs(u);if(d===h)if(0===a)t=r=1/d;else{var p=d*a;t=r=p<1?1/p:1}else if(0===a){t=1/d;r=1/h}else{var v=d*a,y=h*a;t=v<1?1/v:1;r=y<1?1/y:1}}else{var _=Math.abs(o*u-l*c),g=Math.hypot(o,l),m=Math.hypot(c,u);if(0===a){t=m/_;r=g/_}else{var b=a*_;t=m>b?m/b:1;r=g>b?g/b:1}}this._cachedScaleForStroking[0]=t;this._cachedScaleForStroking[1]=r}return this._cachedScaleForStroking}},{key:"rescaleAndStroke",value:function rescaleAndStroke(t){var r=this.ctx,a=this.current.lineWidth,i=canvas_slicedToArray(this.getScaleForStroking(),2),o=i[0],l=i[1];r.lineWidth=a||1;if(1!==o||1!==l){var c=r.getLineDash();t&&r.save();r.scale(o,l);if(c.length>0){var u=Math.max(o,l);r.setLineDash(c.map((function(t){return t/u})));r.lineDashOffset/=u}r.stroke();t&&r.restore()}else r.stroke()}},{key:"isContentVisible",value:function isContentVisible(){for(var t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}]);return CanvasGraphics}();function _restoreInitialState2(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore();if(this.transparentCanvas){this.ctx=this.compositeCtx;this.ctx.save();this.ctx.setTransform(1,0,0,1,0,0);this.ctx.drawImage(this.transparentCanvas,0,0);this.ctx.restore();this.transparentCanvas=null}}function _drawFilter2(){if(this.pageColors){var t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==t){var r=this.ctx.filter;this.ctx.filter=t;this.ctx.drawImage(this.ctx.canvas,0,0);this.ctx.filter=r}}}for(var Yn in Z)void 0!==Kn.prototype[Yn]&&(Kn.prototype[Z[Yn]]=Kn.prototype[Yn]);var Xn=Object.create(null);Xn.workerPort=null;Xn.workerSrc="";__webpack_require__(4060);function message_handler_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */message_handler_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==message_handler_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(message_handler_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function message_handler_asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function message_handler_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,message_handler_toPropertyKey(i.key),i)}}function message_handler_toPropertyKey(t){var r=function message_handler_toPrimitive(t,r){if("object"!=message_handler_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=message_handler_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==message_handler_typeof(r)?r:String(r)}function message_handler_classPrivateMethodInitSpec(t,r){!function message_handler_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function message_handler_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function message_handler_typeof(t){return message_handler_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},message_handler_typeof(t)}var $n=1,Jn=2,Qn=1,Zn=2,ea=3,ta=4,ra=5,na=6,aa=7,ia=8;function wrapReason(t){t instanceof Error||"object"===message_handler_typeof(t)&&null!==t||unreachable('wrapReason: Expected "reason" to be a (possibly cloned) Error.');switch(t.name){case"AbortException":return new ce(t.message);case"MissingPDFException":return new oe(t.message);case"PasswordException":return new ne(t.message,t.code);case"UnexpectedResponseException":return new se(t.message,t.status);case"UnknownErrorException":return new ae(t.message,t.details);default:return new ae(t.message,t.toString())}}var oa=new WeakSet,sa=new WeakSet,la=new WeakSet,ca=function(){function MessageHandler(t,r,a){var i=this;!function message_handler_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,MessageHandler);message_handler_classPrivateMethodInitSpec(this,la);message_handler_classPrivateMethodInitSpec(this,sa);message_handler_classPrivateMethodInitSpec(this,oa);this.sourceName=t;this.targetName=r;this.comObj=a;this.callbackId=1;this.streamId=1;this.streamSinks=Object.create(null);this.streamControllers=Object.create(null);this.callbackCapabilities=Object.create(null);this.actionHandler=Object.create(null);this._onComObjOnMessage=function(t){var r=t.data;if(r.targetName===i.sourceName)if(r.stream)message_handler_classPrivateMethodGet(i,sa,_processStreamMessage2).call(i,r);else if(r.callback){var o=r.callbackId,l=i.callbackCapabilities[o];if(!l)throw new Error("Cannot resolve callback ".concat(o));delete i.callbackCapabilities[o];if(r.callback===$n)l.resolve(r.data);else{if(r.callback!==Jn)throw new Error("Unexpected callback case");l.reject(wrapReason(r.reason))}}else{var c=i.actionHandler[r.action];if(!c)throw new Error("Unknown action from worker: ".concat(r.action));if(r.callbackId){var u=i.sourceName,d=r.sourceName;new Promise((function(t){t(c(r.data))})).then((function(t){a.postMessage({sourceName:u,targetName:d,callback:$n,callbackId:r.callbackId,data:t})}),(function(t){a.postMessage({sourceName:u,targetName:d,callback:Jn,callbackId:r.callbackId,reason:wrapReason(t)})}))}else r.streamId?message_handler_classPrivateMethodGet(i,oa,_createStreamSink2).call(i,r):c(r.data)}};a.addEventListener("message",this._onComObjOnMessage)}!function message_handler_createClass(t,r,a){r&&message_handler_defineProperties(t.prototype,r);a&&message_handler_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(MessageHandler,[{key:"on",value:function on(t,r){var a=this.actionHandler;if(a[t])throw new Error('There is already an actionName called "'.concat(t,'"'));a[t]=r}},{key:"send",value:function send(t,r,a){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:r},a)}},{key:"sendWithPromise",value:function sendWithPromise(t,r,a){var i=this.callbackId++,o=new pe;this.callbackCapabilities[i]=o;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:i,data:r},a)}catch(t){o.reject(t)}return o.promise}},{key:"sendWithStream",value:function sendWithStream(t,r,a,i){var o=this,l=this.streamId++,c=this.sourceName,u=this.targetName,d=this.comObj;return new ReadableStream({start:function start(a){var h=new pe;o.streamControllers[l]={controller:a,startCall:h,pullCall:null,cancelCall:null,isClosed:!1};d.postMessage({sourceName:c,targetName:u,action:t,streamId:l,data:r,desiredSize:a.desiredSize},i);return h.promise},pull:function pull(t){var r=new pe;o.streamControllers[l].pullCall=r;d.postMessage({sourceName:c,targetName:u,stream:na,streamId:l,desiredSize:t.desiredSize});return r.promise},cancel:function cancel(t){assert(t instanceof Error,"cancel must have a valid reason");var r=new pe;o.streamControllers[l].cancelCall=r;o.streamControllers[l].isClosed=!0;d.postMessage({sourceName:c,targetName:u,stream:Qn,streamId:l,reason:wrapReason(t)});return r.promise}},a)}},{key:"destroy",value:function destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]);return MessageHandler}();function _createStreamSink2(t){var r=t.streamId,a=this.sourceName,i=t.sourceName,o=this.comObj,l=this,c=this.actionHandler[t.action],u={enqueue:function enqueue(t){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,c=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var u=this.desiredSize;this.desiredSize-=l;if(u>0&&this.desiredSize<=0){this.sinkCapability=new pe;this.ready=this.sinkCapability.promise}o.postMessage({sourceName:a,targetName:i,stream:ta,streamId:r,chunk:t},c)}},close:function close(){if(!this.isCancelled){this.isCancelled=!0;o.postMessage({sourceName:a,targetName:i,stream:ea,streamId:r});delete l.streamSinks[r]}},error:function error(t){assert(t instanceof Error,"error must have a valid reason");if(!this.isCancelled){this.isCancelled=!0;o.postMessage({sourceName:a,targetName:i,stream:ra,streamId:r,reason:wrapReason(t)})}},sinkCapability:new pe,onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};u.sinkCapability.resolve();u.ready=u.sinkCapability.promise;this.streamSinks[r]=u;new Promise((function(r){r(c(t.data,u))})).then((function(){o.postMessage({sourceName:a,targetName:i,stream:ia,streamId:r,success:!0})}),(function(t){o.postMessage({sourceName:a,targetName:i,stream:ia,streamId:r,reason:wrapReason(t)})}))}function _processStreamMessage2(t){var r=t.streamId,a=this.sourceName,i=t.sourceName,o=this.comObj,l=this.streamControllers[r],c=this.streamSinks[r];switch(t.stream){case ia:t.success?l.startCall.resolve():l.startCall.reject(wrapReason(t.reason));break;case aa:t.success?l.pullCall.resolve():l.pullCall.reject(wrapReason(t.reason));break;case na:if(!c){o.postMessage({sourceName:a,targetName:i,stream:aa,streamId:r,success:!0});break}c.desiredSize<=0&&t.desiredSize>0&&c.sinkCapability.resolve();c.desiredSize=t.desiredSize;new Promise((function(t){var r;t(null===(r=c.onPull)||void 0===r?void 0:r.call(c))})).then((function(){o.postMessage({sourceName:a,targetName:i,stream:aa,streamId:r,success:!0})}),(function(t){o.postMessage({sourceName:a,targetName:i,stream:aa,streamId:r,reason:wrapReason(t)})}));break;case ta:assert(l,"enqueue should have stream controller");if(l.isClosed)break;l.controller.enqueue(t.chunk);break;case ea:assert(l,"close should have stream controller");if(l.isClosed)break;l.isClosed=!0;l.controller.close();message_handler_classPrivateMethodGet(this,la,_deleteStreamController2).call(this,l,r);break;case ra:assert(l,"error should have stream controller");l.controller.error(wrapReason(t.reason));message_handler_classPrivateMethodGet(this,la,_deleteStreamController2).call(this,l,r);break;case Zn:t.success?l.cancelCall.resolve():l.cancelCall.reject(wrapReason(t.reason));message_handler_classPrivateMethodGet(this,la,_deleteStreamController2).call(this,l,r);break;case Qn:if(!c)break;new Promise((function(r){var a;r(null===(a=c.onCancel)||void 0===a?void 0:a.call(c,wrapReason(t.reason)))})).then((function(){o.postMessage({sourceName:a,targetName:i,stream:Zn,streamId:r,success:!0})}),(function(t){o.postMessage({sourceName:a,targetName:i,stream:Zn,streamId:r,reason:wrapReason(t)})}));c.sinkCapability.reject(wrapReason(t.reason));c.isCancelled=!0;delete this.streamSinks[r];break;default:throw new Error("Unexpected stream case")}}function _deleteStreamController2(t,r){return _deleteStreamController3.apply(this,arguments)}function _deleteStreamController3(){_deleteStreamController3=function message_handler_asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){message_handler_asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){message_handler_asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}(message_handler_regeneratorRuntime().mark((function _callee(t,r){var a,i,o;return message_handler_regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:l.next=2;return Promise.allSettled([null===(a=t.startCall)||void 0===a?void 0:a.promise,null===(i=t.pullCall)||void 0===i?void 0:i.promise,null===(o=t.cancelCall)||void 0===o?void 0:o.promise]);case 2:delete this.streamControllers[r];case 3:case"end":return l.stop()}}),_callee,this)})));return _deleteStreamController3.apply(this,arguments)}function metadata_typeof(t){return metadata_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},metadata_typeof(t)}function metadata_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,metadata_toPropertyKey(i.key),i)}}function metadata_toPropertyKey(t){var r=function metadata_toPrimitive(t,r){if("object"!=metadata_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=metadata_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==metadata_typeof(r)?r:String(r)}function metadata_classPrivateFieldInitSpec(t,r,a){!function metadata_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,a)}function metadata_classPrivateFieldGet(t,r){return function metadata_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,metadata_classExtractFieldDescriptor(t,r,"get"))}function metadata_classPrivateFieldSet(t,r,a){!function metadata_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,metadata_classExtractFieldDescriptor(t,r,"set"),a);return a}function metadata_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var ua=new WeakMap,da=new WeakMap,ha=function(){function Metadata(t){var r=t.parsedData,a=t.rawData;!function metadata_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Metadata);metadata_classPrivateFieldInitSpec(this,ua,{writable:!0,value:void 0});metadata_classPrivateFieldInitSpec(this,da,{writable:!0,value:void 0});metadata_classPrivateFieldSet(this,ua,r);metadata_classPrivateFieldSet(this,da,a)}!function metadata_createClass(t,r,a){r&&metadata_defineProperties(t.prototype,r);a&&metadata_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(Metadata,[{key:"getRaw",value:function getRaw(){return metadata_classPrivateFieldGet(this,da)}},{key:"get",value:function get(t){var r;return null!==(r=metadata_classPrivateFieldGet(this,ua).get(t))&&void 0!==r?r:null}},{key:"getAll",value:function getAll(){return objectFromMap(metadata_classPrivateFieldGet(this,ua))}},{key:"has",value:function has(t){return metadata_classPrivateFieldGet(this,ua).has(t)}}]);return Metadata}();function optional_content_config_typeof(t){return optional_content_config_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},optional_content_config_typeof(t)}function optional_content_config_slicedToArray(t,r){return function optional_content_config_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function optional_content_config_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||optional_content_config_unsupportedIterableToArray(t,r)||function optional_content_config_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function optional_content_config_toConsumableArray(t){return function optional_content_config_arrayWithoutHoles(t){if(Array.isArray(t))return optional_content_config_arrayLikeToArray(t)}(t)||function optional_content_config_iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||optional_content_config_unsupportedIterableToArray(t)||function optional_content_config_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function optional_content_config_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=optional_content_config_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function optional_content_config_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return optional_content_config_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?optional_content_config_arrayLikeToArray(t,r):void 0}}function optional_content_config_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function optional_content_config_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function optional_content_config_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function optional_content_config_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,optional_content_config_toPropertyKey(i.key),i)}}function optional_content_config_createClass(t,r,a){r&&optional_content_config_defineProperties(t.prototype,r);a&&optional_content_config_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function optional_content_config_toPropertyKey(t){var r=function optional_content_config_toPrimitive(t,r){if("object"!=optional_content_config_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=optional_content_config_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==optional_content_config_typeof(r)?r:String(r)}function optional_content_config_classPrivateFieldInitSpec(t,r,a){optional_content_config_checkPrivateRedeclaration(t,r);r.set(t,a)}function optional_content_config_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function optional_content_config_classPrivateFieldSet(t,r,a){!function optional_content_config_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,optional_content_config_classExtractFieldDescriptor(t,r,"set"),a);return a}function optional_content_config_classPrivateFieldGet(t,r){return function optional_content_config_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,optional_content_config_classExtractFieldDescriptor(t,r,"get"))}function optional_content_config_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var fa=Symbol("INTERNAL"),pa=new WeakMap,va=function(){function OptionalContentGroup(t,r){optional_content_config_classCallCheck(this,OptionalContentGroup);optional_content_config_classPrivateFieldInitSpec(this,pa,{writable:!0,value:!0});this.name=t;this.intent=r}optional_content_config_createClass(OptionalContentGroup,[{key:"visible",get:function get(){return optional_content_config_classPrivateFieldGet(this,pa)}},{key:"_setVisible",value:function _setVisible(t,r){t!==fa&&unreachable("Internal method `_setVisible` called.");optional_content_config_classPrivateFieldSet(this,pa,r)}}]);return OptionalContentGroup}(),ya=new WeakMap,_a=new WeakMap,ga=new WeakMap,ma=new WeakMap,ba=new WeakSet,wa=function(){function OptionalContentConfig(t){optional_content_config_classCallCheck(this,OptionalContentConfig);!function optional_content_config_classPrivateMethodInitSpec(t,r){optional_content_config_checkPrivateRedeclaration(t,r);r.add(t)}(this,ba);optional_content_config_classPrivateFieldInitSpec(this,ya,{writable:!0,value:null});optional_content_config_classPrivateFieldInitSpec(this,_a,{writable:!0,value:new Map});optional_content_config_classPrivateFieldInitSpec(this,ga,{writable:!0,value:null});optional_content_config_classPrivateFieldInitSpec(this,ma,{writable:!0,value:null});this.name=null;this.creator=null;if(null!==t){this.name=t.name;this.creator=t.creator;optional_content_config_classPrivateFieldSet(this,ma,t.order);var r,a=optional_content_config_createForOfIteratorHelper(t.groups);try{for(a.s();!(r=a.n()).done;){var i=r.value;optional_content_config_classPrivateFieldGet(this,_a).set(i.id,new va(i.name,i.intent))}}catch(t){a.e(t)}finally{a.f()}if("OFF"===t.baseState){var o,l=optional_content_config_createForOfIteratorHelper(optional_content_config_classPrivateFieldGet(this,_a).values());try{for(l.s();!(o=l.n()).done;){o.value._setVisible(fa,!1)}}catch(t){l.e(t)}finally{l.f()}}var c,u=optional_content_config_createForOfIteratorHelper(t.on);try{for(u.s();!(c=u.n()).done;){var d=c.value;optional_content_config_classPrivateFieldGet(this,_a).get(d)._setVisible(fa,!0)}}catch(t){u.e(t)}finally{u.f()}var h,p=optional_content_config_createForOfIteratorHelper(t.off);try{for(p.s();!(h=p.n()).done;){var v=h.value;optional_content_config_classPrivateFieldGet(this,_a).get(v)._setVisible(fa,!1)}}catch(t){p.e(t)}finally{p.f()}optional_content_config_classPrivateFieldSet(this,ga,this.getHash())}}optional_content_config_createClass(OptionalContentConfig,[{key:"isVisible",value:function isVisible(t){if(0===optional_content_config_classPrivateFieldGet(this,_a).size)return!0;if(!t){warn("Optional content group not defined.");return!0}if("OCG"===t.type){if(!optional_content_config_classPrivateFieldGet(this,_a).has(t.id)){warn("Optional content group not found: ".concat(t.id));return!0}return optional_content_config_classPrivateFieldGet(this,_a).get(t.id).visible}if("OCMD"===t.type){if(t.expression)return optional_content_config_classPrivateMethodGet(this,ba,_evaluateVisibilityExpression2).call(this,t.expression);if(!t.policy||"AnyOn"===t.policy){var r,a=optional_content_config_createForOfIteratorHelper(t.ids);try{for(a.s();!(r=a.n()).done;){var i=r.value;if(!optional_content_config_classPrivateFieldGet(this,_a).has(i)){warn("Optional content group not found: ".concat(i));return!0}if(optional_content_config_classPrivateFieldGet(this,_a).get(i).visible)return!0}}catch(t){a.e(t)}finally{a.f()}return!1}if("AllOn"===t.policy){var o,l=optional_content_config_createForOfIteratorHelper(t.ids);try{for(l.s();!(o=l.n()).done;){var c=o.value;if(!optional_content_config_classPrivateFieldGet(this,_a).has(c)){warn("Optional content group not found: ".concat(c));return!0}if(!optional_content_config_classPrivateFieldGet(this,_a).get(c).visible)return!1}}catch(t){l.e(t)}finally{l.f()}return!0}if("AnyOff"===t.policy){var u,d=optional_content_config_createForOfIteratorHelper(t.ids);try{for(d.s();!(u=d.n()).done;){var h=u.value;if(!optional_content_config_classPrivateFieldGet(this,_a).has(h)){warn("Optional content group not found: ".concat(h));return!0}if(!optional_content_config_classPrivateFieldGet(this,_a).get(h).visible)return!0}}catch(t){d.e(t)}finally{d.f()}return!1}if("AllOff"===t.policy){var p,v=optional_content_config_createForOfIteratorHelper(t.ids);try{for(v.s();!(p=v.n()).done;){var y=p.value;if(!optional_content_config_classPrivateFieldGet(this,_a).has(y)){warn("Optional content group not found: ".concat(y));return!0}if(optional_content_config_classPrivateFieldGet(this,_a).get(y).visible)return!1}}catch(t){v.e(t)}finally{v.f()}return!0}warn("Unknown optional content policy ".concat(t.policy,"."));return!0}warn("Unknown group type ".concat(t.type,"."));return!0}},{key:"setVisibility",value:function setVisibility(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(optional_content_config_classPrivateFieldGet(this,_a).has(t)){optional_content_config_classPrivateFieldGet(this,_a).get(t)._setVisible(fa,!!r);optional_content_config_classPrivateFieldSet(this,ya,null)}else warn("Optional content group not found: ".concat(t))}},{key:"hasInitialVisibility",get:function get(){return null===optional_content_config_classPrivateFieldGet(this,ga)||this.getHash()===optional_content_config_classPrivateFieldGet(this,ga)}},{key:"getOrder",value:function getOrder(){return optional_content_config_classPrivateFieldGet(this,_a).size?optional_content_config_classPrivateFieldGet(this,ma)?optional_content_config_classPrivateFieldGet(this,ma).slice():optional_content_config_toConsumableArray(optional_content_config_classPrivateFieldGet(this,_a).keys()):null}},{key:"getGroups",value:function getGroups(){return optional_content_config_classPrivateFieldGet(this,_a).size>0?objectFromMap(optional_content_config_classPrivateFieldGet(this,_a)):null}},{key:"getGroup",value:function getGroup(t){return optional_content_config_classPrivateFieldGet(this,_a).get(t)||null}},{key:"getHash",value:function getHash(){if(null!==optional_content_config_classPrivateFieldGet(this,ya))return optional_content_config_classPrivateFieldGet(this,ya);var t,r=new un,a=optional_content_config_createForOfIteratorHelper(optional_content_config_classPrivateFieldGet(this,_a));try{for(a.s();!(t=a.n()).done;){var i=optional_content_config_slicedToArray(t.value,2),o=i[0],l=i[1];r.update("".concat(o,":").concat(l.visible))}}catch(t){a.e(t)}finally{a.f()}return optional_content_config_classPrivateFieldSet(this,ya,r.hexdigest())}}]);return OptionalContentConfig}();function _evaluateVisibilityExpression2(t){var r=t.length;if(r<2)return!0;for(var a=t[0],i=1;i<r;i++){var o=t[i],l=void 0;if(Array.isArray(o))l=optional_content_config_classPrivateMethodGet(this,ba,_evaluateVisibilityExpression2).call(this,o);else{if(!optional_content_config_classPrivateFieldGet(this,_a).has(o)){warn("Optional content group not found: ".concat(o));return!0}l=optional_content_config_classPrivateFieldGet(this,_a).get(o).visible}switch(a){case"And":if(!l)return!1;break;case"Or":if(l)return!0;break;case"Not":return!l;default:return!0}}return"And"===a}__webpack_require__(8649);function transport_stream_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */transport_stream_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==transport_stream_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(transport_stream_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function transport_stream_asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function transport_stream_asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){transport_stream_asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){transport_stream_asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function transport_stream_typeof(t){return transport_stream_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},transport_stream_typeof(t)}function transport_stream_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function transport_stream_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return transport_stream_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return transport_stream_arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function transport_stream_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function transport_stream_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function transport_stream_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,transport_stream_toPropertyKey(i.key),i)}}function transport_stream_createClass(t,r,a){r&&transport_stream_defineProperties(t.prototype,r);a&&transport_stream_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function transport_stream_toPropertyKey(t){var r=function transport_stream_toPrimitive(t,r){if("object"!=transport_stream_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=transport_stream_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==transport_stream_typeof(r)?r:String(r)}var Pa=function(){function PDFDataTransportStream(t,r){var a=this,i=t.length,o=t.initialData,l=t.progressiveDone,c=void 0!==l&&l,u=t.contentDispositionFilename,d=void 0===u?null:u,h=t.disableRange,p=void 0!==h&&h,v=t.disableStream,y=void 0!==v&&v;transport_stream_classCallCheck(this,PDFDataTransportStream);assert(r,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');this._queuedChunks=[];this._progressiveDone=c;this._contentDispositionFilename=d;if((null==o?void 0:o.length)>0){var _=o instanceof Uint8Array&&o.byteLength===o.buffer.byteLength?o.buffer:new Uint8Array(o).buffer;this._queuedChunks.push(_)}this._pdfDataRangeTransport=r;this._isStreamingSupported=!y;this._isRangeSupported=!p;this._contentLength=i;this._fullRequestReader=null;this._rangeReaders=[];this._pdfDataRangeTransport.addRangeListener((function(t,r){a._onReceiveData({begin:t,chunk:r})}));this._pdfDataRangeTransport.addProgressListener((function(t,r){a._onProgress({loaded:t,total:r})}));this._pdfDataRangeTransport.addProgressiveReadListener((function(t){a._onReceiveData({chunk:t})}));this._pdfDataRangeTransport.addProgressiveDoneListener((function(){a._onProgressiveDone()}));this._pdfDataRangeTransport.transportReady()}transport_stream_createClass(PDFDataTransportStream,[{key:"_onReceiveData",value:function _onReceiveData(t){var r=t.begin,a=t.chunk,i=a instanceof Uint8Array&&a.byteLength===a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer;if(void 0===r)this._fullRequestReader?this._fullRequestReader._enqueue(i):this._queuedChunks.push(i);else{assert(this._rangeReaders.some((function(t){if(t._begin!==r)return!1;t._enqueue(i);return!0})),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function get(){var t,r;return null!==(t=null===(r=this._fullRequestReader)||void 0===r?void 0:r._loaded)&&void 0!==t?t:0}},{key:"_onProgress",value:function _onProgress(t){if(void 0===t.total){var r,a;null===(r=this._rangeReaders[0])||void 0===r||null===(a=r.onProgress)||void 0===a||a.call(r,{loaded:t.loaded})}else{var i,o;null===(i=this._fullRequestReader)||void 0===i||null===(o=i.onProgress)||void 0===o||o.call(i,{loaded:t.loaded,total:t.total})}}},{key:"_onProgressiveDone",value:function _onProgressiveDone(){var t;null===(t=this._fullRequestReader)||void 0===t||t.progressiveDone();this._progressiveDone=!0}},{key:"_removeRangeReader",value:function _removeRangeReader(t){var r=this._rangeReaders.indexOf(t);r>=0&&this._rangeReaders.splice(r,1)}},{key:"getFullReader",value:function getFullReader(){assert(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var t=this._queuedChunks;this._queuedChunks=null;return new ka(this,t,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var a=new Aa(this,t,r);this._pdfDataRangeTransport.requestDataRange(t,r);this._rangeReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var a,i=transport_stream_createForOfIteratorHelper(this._rangeReaders.slice(0));try{for(i.s();!(a=i.n()).done;){a.value.cancel(t)}}catch(t){i.e(t)}finally{i.f()}this._pdfDataRangeTransport.abort()}}]);return PDFDataTransportStream}(),ka=function(){function PDFDataTransportStreamReader(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;transport_stream_classCallCheck(this,PDFDataTransportStreamReader);this._stream=t;this._done=a||!1;this._filename=isPdfFile(i)?i:null;this._queuedChunks=r||[];this._loaded=0;var o,l=transport_stream_createForOfIteratorHelper(this._queuedChunks);try{for(l.s();!(o=l.n()).done;){var c=o.value;this._loaded+=c.byteLength}}catch(t){l.e(t)}finally{l.f()}this._requests=[];this._headersReady=Promise.resolve();t._fullRequestReader=this;this.onProgress=null}transport_stream_createClass(PDFDataTransportStreamReader,[{key:"_enqueue",value:function _enqueue(t){if(!this._done){if(this._requests.length>0){this._requests.shift().resolve({value:t,done:!1})}else this._queuedChunks.push(t);this._loaded+=t.byteLength}}},{key:"headersReady",get:function get(){return this._headersReady}},{key:"filename",get:function get(){return this._filename}},{key:"isRangeSupported",get:function get(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function get(){return this._stream._contentLength}},{key:"read",value:(t=transport_stream_asyncToGenerator(transport_stream_regeneratorRuntime().mark((function _callee(){var t,r;return transport_stream_regeneratorRuntime().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(!(this._queuedChunks.length>0)){a.next=3;break}t=this._queuedChunks.shift();return a.abrupt("return",{value:t,done:!1});case 3:if(!this._done){a.next=5;break}return a.abrupt("return",{value:void 0,done:!0});case 5:r=new pe;this._requests.push(r);return a.abrupt("return",r.promise);case 8:case"end":return a.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;var r,a=transport_stream_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0}},{key:"progressiveDone",value:function progressiveDone(){this._done||(this._done=!0)}}]);var t;return PDFDataTransportStreamReader}(),Aa=function(){function PDFDataTransportStreamRangeReader(t,r,a){transport_stream_classCallCheck(this,PDFDataTransportStreamRangeReader);this._stream=t;this._begin=r;this._end=a;this._queuedChunk=null;this._requests=[];this._done=!1;this.onProgress=null}transport_stream_createClass(PDFDataTransportStreamRangeReader,[{key:"_enqueue",value:function _enqueue(t){if(!this._done){if(0===this._requests.length)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});var r,a=transport_stream_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0}this._done=!0;this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function get(){return!1}},{key:"read",value:(t=transport_stream_asyncToGenerator(transport_stream_regeneratorRuntime().mark((function _callee2(){var t,r;return transport_stream_regeneratorRuntime().wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:if(!this._queuedChunk){a.next=4;break}t=this._queuedChunk;this._queuedChunk=null;return a.abrupt("return",{value:t,done:!1});case 4:if(!this._done){a.next=6;break}return a.abrupt("return",{value:void 0,done:!0});case 6:r=new pe;this._requests.push(r);return a.abrupt("return",r.promise);case 9:case"end":return a.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;var r,a=transport_stream_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._stream._removeRangeReader(this)}}]);var t;return PDFDataTransportStreamRangeReader}();function content_disposition_slicedToArray(t,r){return function content_disposition_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function content_disposition_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||function content_disposition_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return content_disposition_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return content_disposition_arrayLikeToArray(t,r)}(t,r)||function content_disposition_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function content_disposition_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function validateRangeRequestCapabilities(t){var r=t.getResponseHeader,a=t.isHttp,i=t.rangeChunkSize,o=t.disableRange,l={allowRangeRequests:!1,suggestedLength:void 0},c=parseInt(r("Content-Length"),10);if(!Number.isInteger(c))return l;l.suggestedLength=c;if(c<=2*i)return l;if(o||!a)return l;if("bytes"!==r("Accept-Ranges"))return l;if("identity"!==(r("Content-Encoding")||"identity"))return l;l.allowRangeRequests=!0;return l}function extractFilenameFromHeader(t){var r=t("Content-Disposition");if(r){var a=function getFilenameFromContentDispositionHeader(t){var r=!0,a=toParamRegExp("filename\\*","i").exec(t);if(a){var i=rfc2616unquote(a=a[1]);return fixupEncoding(i=rfc2047decode(i=rfc5987decode(i=unescape(i))))}if(a=function rfc2231getparam(t){for(var r,a=[],i=toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(r=i.exec(t));){var o=content_disposition_slicedToArray(r,4),l=o[1],c=o[2],u=o[3];if((l=parseInt(l,10))in a){if(0===l)break}else a[l]=[c,u]}for(var d=[],h=0;h<a.length&&h in a;++h){var p=content_disposition_slicedToArray(a[h],2),v=p[0],y=p[1];y=rfc2616unquote(y);if(v){y=unescape(y);0===h&&(y=rfc5987decode(y))}d.push(y)}return d.join("")}(t))return fixupEncoding(rfc2047decode(a));if(a=toParamRegExp("filename","i").exec(t)){var o=rfc2616unquote(a=a[1]);return fixupEncoding(o=rfc2047decode(o))}function toParamRegExp(t,r){return new RegExp("(?:^|;)\\s*"+t+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',r)}function textdecode(t,a){if(t){if(!/^[\x00-\xFF]+$/.test(a))return a;try{var i=new TextDecoder(t,{fatal:!0}),o=stringToBytes(a);a=i.decode(o);r=!1}catch(t){}}return a}function fixupEncoding(t){if(r&&/[\x80-\xff]/.test(t)){t=textdecode("utf-8",t);r&&(t=textdecode("iso-8859-1",t))}return t}function rfc2616unquote(t){if(t.startsWith('"')){for(var r=t.slice(1).split('\\"'),a=0;a<r.length;++a){var i=r[a].indexOf('"');if(-1!==i){r[a]=r[a].slice(0,i);r.length=a+1}r[a]=r[a].replaceAll(/\\(.)/g,"$1")}t=r.join('"')}return t}function rfc5987decode(t){var r=t.indexOf("'");return-1===r?t:textdecode(t.slice(0,r),t.slice(r+1).replace(/^[^']*'/,""))}function rfc2047decode(t){return!t.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(t)?t:t.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(t,r,a,i){if("q"===a||"Q"===a)return textdecode(r,i=(i=i.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,(function(t,r){return String.fromCharCode(parseInt(r,16))})));try{i=atob(i)}catch(t){}return textdecode(r,i)}))}return""}(r);if(a.includes("%"))try{a=decodeURIComponent(a)}catch(t){}if(isPdfFile(a))return a}return null}function createResponseStatusError(t,r){return 404===t||0===t&&r.startsWith("file:")?new oe('Missing PDF "'+r+'".'):new se("Unexpected server response (".concat(t,') while retrieving PDF "').concat(r,'".'),t)}function validateResponseStatus(t){return 200===t||206===t}function fetch_stream_typeof(t){return fetch_stream_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fetch_stream_typeof(t)}function fetch_stream_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */fetch_stream_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==fetch_stream_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(fetch_stream_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function fetch_stream_asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function fetch_stream_asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){fetch_stream_asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){fetch_stream_asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function fetch_stream_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function fetch_stream_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return fetch_stream_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return fetch_stream_arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function fetch_stream_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function fetch_stream_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function fetch_stream_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,fetch_stream_toPropertyKey(i.key),i)}}function fetch_stream_createClass(t,r,a){r&&fetch_stream_defineProperties(t.prototype,r);a&&fetch_stream_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function fetch_stream_toPropertyKey(t){var r=function fetch_stream_toPrimitive(t,r){if("object"!=fetch_stream_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=fetch_stream_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==fetch_stream_typeof(r)?r:String(r)}function createFetchOptions(t,r,a){return{method:"GET",headers:t,signal:a.signal,mode:"cors",credentials:r?"include":"same-origin",redirect:"follow"}}function createHeaders(t){var r=new Headers;for(var a in t){var i=t[a];void 0!==i&&r.append(a,i)}return r}function getArrayBuffer(t){if(t instanceof Uint8Array)return t.buffer;if(t instanceof ArrayBuffer)return t;warn("getArrayBuffer - unexpected data format: ".concat(t));return new Uint8Array(t).buffer}var Sa=function(){function PDFFetchStream(t){fetch_stream_classCallCheck(this,PDFFetchStream);this.source=t;this.isHttp=/^https?:/i.test(t.url);this.httpHeaders=this.isHttp&&t.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}fetch_stream_createClass(PDFFetchStream,[{key:"_progressiveDataLength",get:function get(){var t,r;return null!==(t=null===(r=this._fullRequestReader)||void 0===r?void 0:r._loaded)&&void 0!==t?t:0}},{key:"getFullReader",value:function getFullReader(){assert(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once.");this._fullRequestReader=new xa(this);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var a=new Fa(this,t,r);this._rangeRequestReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var a,i=fetch_stream_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(i.s();!(a=i.n()).done;){a.value.cancel(t)}}catch(t){i.e(t)}finally{i.f()}}}]);return PDFFetchStream}(),xa=function(){function PDFFetchStreamReader(t){var r=this;fetch_stream_classCallCheck(this,PDFFetchStreamReader);this._stream=t;this._reader=null;this._loaded=0;this._filename=null;var a=t.source;this._withCredentials=a.withCredentials||!1;this._contentLength=a.length;this._headersCapability=new pe;this._disableRange=a.disableRange||!1;this._rangeChunkSize=a.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._abortController=new AbortController;this._isStreamingSupported=!a.disableStream;this._isRangeSupported=!a.disableRange;this._headers=createHeaders(this._stream.httpHeaders);var i=a.url;fetch(i,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((function(t){if(!validateResponseStatus(t.status))throw createResponseStatusError(t.status,i);r._reader=t.body.getReader();r._headersCapability.resolve();var a=function getResponseHeader(r){return t.headers.get(r)},o=validateRangeRequestCapabilities({getResponseHeader:a,isHttp:r._stream.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),l=o.allowRangeRequests,c=o.suggestedLength;r._isRangeSupported=l;r._contentLength=c||r._contentLength;r._filename=extractFilenameFromHeader(a);!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new ce("Streaming is disabled."))})).catch(this._headersCapability.reject);this.onProgress=null}fetch_stream_createClass(PDFFetchStreamReader,[{key:"headersReady",get:function get(){return this._headersCapability.promise}},{key:"filename",get:function get(){return this._filename}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=fetch_stream_asyncToGenerator(fetch_stream_regeneratorRuntime().mark((function _callee(){var t,r,a,i;return fetch_stream_regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return this._headersCapability.promise;case 2:o.next=4;return this._reader.read();case 4:r=o.sent;a=r.value;if(!(i=r.done)){o.next=9;break}return o.abrupt("return",{value:a,done:i});case 9:this._loaded+=a.byteLength;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded,total:this._contentLength});return o.abrupt("return",{value:getArrayBuffer(a),done:!1});case 12:case"end":return o.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){var r;null===(r=this._reader)||void 0===r||r.cancel(t);this._abortController.abort()}}]);var t;return PDFFetchStreamReader}(),Fa=function(){function PDFFetchStreamRangeReader(t,r,a){var i=this;fetch_stream_classCallCheck(this,PDFFetchStreamRangeReader);this._stream=t;this._reader=null;this._loaded=0;var o=t.source;this._withCredentials=o.withCredentials||!1;this._readCapability=new pe;this._isStreamingSupported=!o.disableStream;this._abortController=new AbortController;this._headers=createHeaders(this._stream.httpHeaders);this._headers.append("Range","bytes=".concat(r,"-").concat(a-1));var l=o.url;fetch(l,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((function(t){if(!validateResponseStatus(t.status))throw createResponseStatusError(t.status,l);i._readCapability.resolve();i._reader=t.body.getReader()})).catch(this._readCapability.reject);this.onProgress=null}fetch_stream_createClass(PDFFetchStreamRangeReader,[{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=fetch_stream_asyncToGenerator(fetch_stream_regeneratorRuntime().mark((function _callee2(){var t,r,a,i;return fetch_stream_regeneratorRuntime().wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return this._readCapability.promise;case 2:o.next=4;return this._reader.read();case 4:r=o.sent;a=r.value;if(!(i=r.done)){o.next=9;break}return o.abrupt("return",{value:a,done:i});case 9:this._loaded+=a.byteLength;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded});return o.abrupt("return",{value:getArrayBuffer(a),done:!1});case 12:case"end":return o.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){var r;null===(r=this._reader)||void 0===r||r.cancel(t);this._abortController.abort()}}]);var t;return PDFFetchStreamRangeReader}();function network_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */network_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==network_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(network_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function network_asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function network_asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){network_asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){network_asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function network_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function network_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return network_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return network_arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function network_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function network_typeof(t){return network_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},network_typeof(t)}function network_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function network_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,network_toPropertyKey(i.key),i)}}function network_createClass(t,r,a){r&&network_defineProperties(t.prototype,r);a&&network_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function network_toPropertyKey(t){var r=function network_toPrimitive(t,r){if("object"!=network_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=network_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==network_typeof(r)?r:String(r)}var Ea,Ia,Ca,Ta,Ma=function(){function NetworkManager(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};network_classCallCheck(this,NetworkManager);this.url=t;this.isHttp=/^https?:/i.test(t);this.httpHeaders=this.isHttp&&r.httpHeaders||Object.create(null);this.withCredentials=r.withCredentials||!1;this.currXhrId=0;this.pendingRequests=Object.create(null)}network_createClass(NetworkManager,[{key:"requestRange",value:function requestRange(t,r,a){var i={begin:t,end:r};for(var o in a)i[o]=a[o];return this.request(i)}},{key:"requestFull",value:function requestFull(t){return this.request(t)}},{key:"request",value:function request(t){var r=new XMLHttpRequest,a=this.currXhrId++,i=this.pendingRequests[a]={xhr:r};r.open("GET",this.url);r.withCredentials=this.withCredentials;for(var o in this.httpHeaders){var l=this.httpHeaders[o];void 0!==l&&r.setRequestHeader(o,l)}if(this.isHttp&&"begin"in t&&"end"in t){r.setRequestHeader("Range","bytes=".concat(t.begin,"-").concat(t.end-1));i.expectedStatus=206}else i.expectedStatus=200;r.responseType="arraybuffer";t.onError&&(r.onerror=function(a){t.onError(r.status)});r.onreadystatechange=this.onStateChange.bind(this,a);r.onprogress=this.onProgress.bind(this,a);i.onHeadersReceived=t.onHeadersReceived;i.onDone=t.onDone;i.onError=t.onError;i.onProgress=t.onProgress;r.send(null);return a}},{key:"onProgress",value:function onProgress(t,r){var a,i=this.pendingRequests[t];i&&(null===(a=i.onProgress)||void 0===a||a.call(i,r))}},{key:"onStateChange",value:function onStateChange(t,r){var a=this.pendingRequests[t];if(a){var i=a.xhr;if(i.readyState>=2&&a.onHeadersReceived){a.onHeadersReceived();delete a.onHeadersReceived}if(4===i.readyState&&t in this.pendingRequests){delete this.pendingRequests[t];if(0===i.status&&this.isHttp){var o;null===(o=a.onError)||void 0===o||o.call(a,i.status)}else{var l=i.status||200;if(200===l&&206===a.expectedStatus||l===a.expectedStatus){var c=function network_getArrayBuffer(t){var r=t.response;return"string"!=typeof r?r:stringToBytes(r).buffer}(i);if(206===l){var u=i.getResponseHeader("Content-Range"),d=/bytes (\d+)-(\d+)\/(\d+)/.exec(u);a.onDone({begin:parseInt(d[1],10),chunk:c})}else if(c)a.onDone({begin:0,chunk:c});else{var h;null===(h=a.onError)||void 0===h||h.call(a,i.status)}}else{var p;null===(p=a.onError)||void 0===p||p.call(a,i.status)}}}}}},{key:"getRequestXhr",value:function getRequestXhr(t){return this.pendingRequests[t].xhr}},{key:"isPendingRequest",value:function isPendingRequest(t){return t in this.pendingRequests}},{key:"abortRequest",value:function abortRequest(t){var r=this.pendingRequests[t].xhr;delete this.pendingRequests[t];r.abort()}}]);return NetworkManager}(),Oa=function(){function PDFNetworkStream(t){network_classCallCheck(this,PDFNetworkStream);this._source=t;this._manager=new Ma(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials});this._rangeChunkSize=t.rangeChunkSize;this._fullRequestReader=null;this._rangeRequestReaders=[]}network_createClass(PDFNetworkStream,[{key:"_onRangeRequestReaderClosed",value:function _onRangeRequestReaderClosed(t){var r=this._rangeRequestReaders.indexOf(t);r>=0&&this._rangeRequestReaders.splice(r,1)}},{key:"getFullReader",value:function getFullReader(){assert(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once.");this._fullRequestReader=new Ga(this._manager,this._source);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){var a=new Ra(this._manager,t,r);a.onClosed=this._onRangeRequestReaderClosed.bind(this);this._rangeRequestReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var a,i=network_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(i.s();!(a=i.n()).done;){a.value.cancel(t)}}catch(t){i.e(t)}finally{i.f()}}}]);return PDFNetworkStream}(),Ga=function(){function PDFNetworkStreamFullRequestReader(t,r){network_classCallCheck(this,PDFNetworkStreamFullRequestReader);this._manager=t;var a={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=r.url;this._fullRequestId=t.requestFull(a);this._headersReceivedCapability=new pe;this._disableRange=r.disableRange||!1;this._contentLength=r.length;this._rangeChunkSize=r.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._isStreamingSupported=!1;this._isRangeSupported=!1;this._cachedChunks=[];this._requests=[];this._done=!1;this._storedError=void 0;this._filename=null;this.onProgress=null}network_createClass(PDFNetworkStreamFullRequestReader,[{key:"_onHeadersReceived",value:function _onHeadersReceived(){var t=this._fullRequestId,r=this._manager.getRequestXhr(t),a=function getResponseHeader(t){return r.getResponseHeader(t)},i=validateRangeRequestCapabilities({getResponseHeader:a,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),o=i.allowRangeRequests,l=i.suggestedLength;o&&(this._isRangeSupported=!0);this._contentLength=l||this._contentLength;this._filename=extractFilenameFromHeader(a);this._isRangeSupported&&this._manager.abortRequest(t);this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function _onDone(t){if(t)if(this._requests.length>0){this._requests.shift().resolve({value:t.chunk,done:!1})}else this._cachedChunks.push(t.chunk);this._done=!0;if(!(this._cachedChunks.length>0)){var r,a=network_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0}}},{key:"_onError",value:function _onError(t){this._storedError=createResponseStatusError(t,this._url);this._headersReceivedCapability.reject(this._storedError);var r,a=network_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.reject(this._storedError)}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._cachedChunks.length=0}},{key:"_onProgress",value:function _onProgress(t){var r;null===(r=this.onProgress)||void 0===r||r.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}},{key:"filename",get:function get(){return this._filename}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"headersReady",get:function get(){return this._headersReceivedCapability.promise}},{key:"read",value:(t=network_asyncToGenerator(network_regeneratorRuntime().mark((function _callee(){var t,r;return network_regeneratorRuntime().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(!this._storedError){a.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){a.next=5;break}t=this._cachedChunks.shift();return a.abrupt("return",{value:t,done:!1});case 5:if(!this._done){a.next=7;break}return a.abrupt("return",{value:void 0,done:!0});case 7:r=new pe;this._requests.push(r);return a.abrupt("return",r.promise);case 10:case"end":return a.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;this._headersReceivedCapability.reject(t);var r,a=network_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId);this._fullRequestReader=null}}]);var t;return PDFNetworkStreamFullRequestReader}(),Ra=function(){function PDFNetworkStreamRangeRequestReader(t,r,a){network_classCallCheck(this,PDFNetworkStreamRangeRequestReader);this._manager=t;var i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url;this._requestId=t.requestRange(r,a,i);this._requests=[];this._queuedChunk=null;this._done=!1;this._storedError=void 0;this.onProgress=null;this.onClosed=null}network_createClass(PDFNetworkStreamRangeRequestReader,[{key:"_close",value:function _close(){var t;null===(t=this.onClosed)||void 0===t||t.call(this,this)}},{key:"_onDone",value:function _onDone(t){var r=t.chunk;if(this._requests.length>0){this._requests.shift().resolve({value:r,done:!1})}else this._queuedChunk=r;this._done=!0;var a,i=network_createForOfIteratorHelper(this._requests);try{for(i.s();!(a=i.n()).done;){a.value.resolve({value:void 0,done:!0})}}catch(t){i.e(t)}finally{i.f()}this._requests.length=0;this._close()}},{key:"_onError",value:function _onError(t){this._storedError=createResponseStatusError(t,this._url);var r,a=network_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.reject(this._storedError)}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._queuedChunk=null}},{key:"_onProgress",value:function _onProgress(t){if(!this.isStreamingSupported){var r;null===(r=this.onProgress)||void 0===r||r.call(this,{loaded:t.loaded})}}},{key:"isStreamingSupported",get:function get(){return!1}},{key:"read",value:(t=network_asyncToGenerator(network_regeneratorRuntime().mark((function _callee2(){var t,r;return network_regeneratorRuntime().wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:if(!this._storedError){a.next=2;break}throw this._storedError;case 2:if(null===this._queuedChunk){a.next=6;break}t=this._queuedChunk;this._queuedChunk=null;return a.abrupt("return",{value:t,done:!1});case 6:if(!this._done){a.next=8;break}return a.abrupt("return",{value:void 0,done:!0});case 8:r=new pe;this._requests.push(r);return a.abrupt("return",r.promise);case 11:case"end":return a.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;var r,a=network_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId);this._close()}}]);var t;return PDFNetworkStreamRangeRequestReader}();function node_stream_typeof(t){return node_stream_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},node_stream_typeof(t)}function node_stream_inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&node_stream_setPrototypeOf(t,r)}function node_stream_setPrototypeOf(t,r){node_stream_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return node_stream_setPrototypeOf(t,r)}function node_stream_createSuper(t){var r=function node_stream_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=node_stream_getPrototypeOf(t);if(r){var o=node_stream_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function node_stream_possibleConstructorReturn(t,r){if(r&&("object"===node_stream_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function node_stream_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,a)}}function node_stream_getPrototypeOf(t){node_stream_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return node_stream_getPrototypeOf(t)}function node_stream_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */node_stream_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==node_stream_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(node_stream_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function node_stream_asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function node_stream_asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){node_stream_asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){node_stream_asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function node_stream_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function node_stream_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return node_stream_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return node_stream_arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function node_stream_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function node_stream_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function node_stream_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,node_stream_toPropertyKey(i.key),i)}}function node_stream_createClass(t,r,a){r&&node_stream_defineProperties(t.prototype,r);a&&node_stream_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function node_stream_toPropertyKey(t){var r=function node_stream_toPrimitive(t,r){if("object"!=node_stream_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=node_stream_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==node_stream_typeof(r)?r:String(r)}var La=/^file:\/\/\/[a-zA-Z]:\//;var Da=function(){function PDFNodeStream(t){node_stream_classCallCheck(this,PDFNodeStream);this.source=t;this.url=function parseUrl(t){var r=Ta.parse(t);if("file:"===r.protocol||r.host)return r;if(/^[a-z]:[/\\]/i.test(t))return Ta.parse("file:///".concat(t));r.host||(r.protocol="file:");return r}(t.url);this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol||"capacitor:"===this.url.protocol;this.isFsUrl="file:"===this.url.protocol;this.httpHeaders=this.isHttp&&t.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}node_stream_createClass(PDFNodeStream,[{key:"_progressiveDataLength",get:function get(){var t,r;return null!==(t=null===(r=this._fullRequestReader)||void 0===r?void 0:r._loaded)&&void 0!==t?t:0}},{key:"getFullReader",value:function getFullReader(){assert(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once.");this._fullRequestReader=this.isFsUrl?new za(this):new Na(this);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var a=this.isFsUrl?new Ha(this,t,r):new Ba(this,t,r);this._rangeRequestReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var a,i=node_stream_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(i.s();!(a=i.n()).done;){a.value.cancel(t)}}catch(t){i.e(t)}finally{i.f()}}}]);return PDFNodeStream}(),ja=function(){function BaseFullReader(t){node_stream_classCallCheck(this,BaseFullReader);this._url=t.url;this._done=!1;this._storedError=null;this.onProgress=null;var r=t.source;this._contentLength=r.length;this._loaded=0;this._filename=null;this._disableRange=r.disableRange||!1;this._rangeChunkSize=r.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._isStreamingSupported=!r.disableStream;this._isRangeSupported=!r.disableRange;this._readableStream=null;this._readCapability=new pe;this._headersCapability=new pe}node_stream_createClass(BaseFullReader,[{key:"headersReady",get:function get(){return this._headersCapability.promise}},{key:"filename",get:function get(){return this._filename}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=node_stream_asyncToGenerator(node_stream_regeneratorRuntime().mark((function _callee(){var t,r,a;return node_stream_regeneratorRuntime().wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return this._readCapability.promise;case 2:if(!this._done){i.next=4;break}return i.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){i.next=6;break}throw this._storedError;case 6:if(null!==(r=this._readableStream.read())){i.next=10;break}this._readCapability=new pe;return i.abrupt("return",this.read());case 10:this._loaded+=r.length;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded,total:this._contentLength});a=new Uint8Array(r).buffer;return i.abrupt("return",{value:a,done:!1});case 14:case"end":return i.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}},{key:"_error",value:function _error(t){this._storedError=t;this._readCapability.resolve()}},{key:"_setReadableStream",value:function _setReadableStream(t){var r=this;this._readableStream=t;t.on("readable",(function(){r._readCapability.resolve()}));t.on("end",(function(){t.destroy();r._done=!0;r._readCapability.resolve()}));t.on("error",(function(t){r._error(t)}));!this._isStreamingSupported&&this._isRangeSupported&&this._error(new ce("streaming is disabled"));this._storedError&&this._readableStream.destroy(this._storedError)}}]);var t;return BaseFullReader}(),Wa=function(){function BaseRangeReader(t){node_stream_classCallCheck(this,BaseRangeReader);this._url=t.url;this._done=!1;this._storedError=null;this.onProgress=null;this._loaded=0;this._readableStream=null;this._readCapability=new pe;var r=t.source;this._isStreamingSupported=!r.disableStream}node_stream_createClass(BaseRangeReader,[{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=node_stream_asyncToGenerator(node_stream_regeneratorRuntime().mark((function _callee2(){var t,r,a;return node_stream_regeneratorRuntime().wrap((function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return this._readCapability.promise;case 2:if(!this._done){i.next=4;break}return i.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){i.next=6;break}throw this._storedError;case 6:if(null!==(r=this._readableStream.read())){i.next=10;break}this._readCapability=new pe;return i.abrupt("return",this.read());case 10:this._loaded+=r.length;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded});a=new Uint8Array(r).buffer;return i.abrupt("return",{value:a,done:!1});case 14:case"end":return i.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}},{key:"_error",value:function _error(t){this._storedError=t;this._readCapability.resolve()}},{key:"_setReadableStream",value:function _setReadableStream(t){var r=this;this._readableStream=t;t.on("readable",(function(){r._readCapability.resolve()}));t.on("end",(function(){t.destroy();r._done=!0;r._readCapability.resolve()}));t.on("error",(function(t){r._error(t)}));this._storedError&&this._readableStream.destroy(this._storedError)}}]);var t;return BaseRangeReader}();function createRequestOptions(t,r){return{protocol:t.protocol,auth:t.auth,host:t.hostname,port:t.port,path:t.path,method:"GET",headers:r}}var Na=function(t){node_stream_inherits(PDFNodeStreamFullReader,t);var r=node_stream_createSuper(PDFNodeStreamFullReader);function PDFNodeStreamFullReader(t){var a;node_stream_classCallCheck(this,PDFNodeStreamFullReader);var i=function handleResponse(r){if(404!==r.statusCode){a._headersCapability.resolve();a._setReadableStream(r);var i=function getResponseHeader(t){return a._readableStream.headers[t.toLowerCase()]},o=validateRangeRequestCapabilities({getResponseHeader:i,isHttp:t.isHttp,rangeChunkSize:a._rangeChunkSize,disableRange:a._disableRange}),l=o.allowRangeRequests,c=o.suggestedLength;a._isRangeSupported=l;a._contentLength=c||a._contentLength;a._filename=extractFilenameFromHeader(i)}else{var u=new oe('Missing PDF "'.concat(a._url,'".'));a._storedError=u;a._headersCapability.reject(u)}};(a=r.call(this,t))._request=null;"http:"===a._url.protocol?a._request=Ia.request(createRequestOptions(a._url,t.httpHeaders),i):a._request=Ca.request(createRequestOptions(a._url,t.httpHeaders),i);a._request.on("error",(function(t){a._storedError=t;a._headersCapability.reject(t)}));a._request.end();return a}return node_stream_createClass(PDFNodeStreamFullReader)}(ja),Ba=function(t){node_stream_inherits(PDFNodeStreamRangeReader,t);var r=node_stream_createSuper(PDFNodeStreamRangeReader);function PDFNodeStreamRangeReader(t,a,i){var o;node_stream_classCallCheck(this,PDFNodeStreamRangeReader);(o=r.call(this,t))._httpHeaders={};for(var l in t.httpHeaders){var c=t.httpHeaders[l];void 0!==c&&(o._httpHeaders[l]=c)}o._httpHeaders.Range="bytes=".concat(a,"-").concat(i-1);var u=function handleResponse(t){if(404!==t.statusCode)o._setReadableStream(t);else{var r=new oe('Missing PDF "'.concat(o._url,'".'));o._storedError=r}};o._request=null;"http:"===o._url.protocol?o._request=Ia.request(createRequestOptions(o._url,o._httpHeaders),u):o._request=Ca.request(createRequestOptions(o._url,o._httpHeaders),u);o._request.on("error",(function(t){o._storedError=t}));o._request.end();return o}return node_stream_createClass(PDFNodeStreamRangeReader)}(Wa),za=function(t){node_stream_inherits(PDFNodeStreamFsFullReader,t);var r=node_stream_createSuper(PDFNodeStreamFsFullReader);function PDFNodeStreamFsFullReader(t){var a;node_stream_classCallCheck(this,PDFNodeStreamFsFullReader);a=r.call(this,t);var i=decodeURIComponent(a._url.path);La.test(a._url.href)&&(i=i.replace(/^\//,""));Ea.lstat(i,(function(t,r){if(t){"ENOENT"===t.code&&(t=new oe('Missing PDF "'.concat(i,'".')));a._storedError=t;a._headersCapability.reject(t)}else{a._contentLength=r.size;a._setReadableStream(Ea.createReadStream(i));a._headersCapability.resolve()}}));return a}return node_stream_createClass(PDFNodeStreamFsFullReader)}(ja),Ha=function(t){node_stream_inherits(PDFNodeStreamFsRangeReader,t);var r=node_stream_createSuper(PDFNodeStreamFsRangeReader);function PDFNodeStreamFsRangeReader(t,a,i){var o;node_stream_classCallCheck(this,PDFNodeStreamFsRangeReader);o=r.call(this,t);var l=decodeURIComponent(o._url.path);La.test(o._url.href)&&(l=l.replace(/^\//,""));o._setReadableStream(Ea.createReadStream(l,{start:a,end:i-1}));return o}return node_stream_createClass(PDFNodeStreamFsRangeReader)}(Wa);function xfa_text_typeof(t){return xfa_text_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xfa_text_typeof(t)}function xfa_text_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function xfa_text_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return xfa_text_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return xfa_text_arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function xfa_text_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function xfa_text_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,xfa_text_toPropertyKey(i.key),i)}}function xfa_text_toPropertyKey(t){var r=function xfa_text_toPrimitive(t,r){if("object"!=xfa_text_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=xfa_text_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==xfa_text_typeof(r)?r:String(r)}var Ua=function(){function XfaText(){!function xfa_text_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,XfaText)}!function xfa_text_createClass(t,r,a){r&&xfa_text_defineProperties(t.prototype,r);a&&xfa_text_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(XfaText,null,[{key:"textContent",value:function textContent(t){var r=[],a={items:r,styles:Object.create(null)};!function walk(t){var a;if(t){var i=null,o=t.name;if("#text"===o)i=t.value;else{if(!XfaText.shouldBuildText(o))return;null!=t&&null!==(a=t.attributes)&&void 0!==a&&a.textContent?i=t.attributes.textContent:t.value&&(i=t.value)}null!==i&&r.push({str:i});if(t.children){var l,c=xfa_text_createForOfIteratorHelper(t.children);try{for(c.s();!(l=c.n()).done;){walk(l.value)}}catch(t){c.e(t)}finally{c.f()}}}}(t);return a}},{key:"shouldBuildText",value:function shouldBuildText(t){return!("textarea"===t||"input"===t||"option"===t||"select"===t)}}]);return XfaText}();function api_toConsumableArray(t){return function api_arrayWithoutHoles(t){if(Array.isArray(t))return api_arrayLikeToArray(t)}(t)||function api_iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||api_unsupportedIterableToArray(t)||function api_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function api_classPrivateMethodInitSpec(t,r){api_checkPrivateRedeclaration(t,r);r.add(t)}function api_classPrivateFieldInitSpec(t,r,a){api_checkPrivateRedeclaration(t,r);r.set(t,a)}function api_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function api_classPrivateFieldGet(t,r){return api_classApplyDescriptorGet(t,api_classExtractFieldDescriptor(t,r,"get"))}function api_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function api_classPrivateFieldSet(t,r,a){api_classApplyDescriptorSet(t,api_classExtractFieldDescriptor(t,r,"set"),a);return a}function api_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function api_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=api_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function api_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */api_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==api_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(api_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function api_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function api_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,api_toPropertyKey(i.key),i)}}function api_createClass(t,r,a){r&&api_defineProperties(t.prototype,r);a&&api_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function api_toPropertyKey(t){var r=function api_toPrimitive(t,r){if("object"!=api_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=api_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==api_typeof(r)?r:String(r)}function _classStaticPrivateFieldSpecSet(t,r,a,i){api_classCheckPrivateStaticAccess(t,r);_classCheckPrivateStaticFieldDescriptor(a,"set");api_classApplyDescriptorSet(t,a,i);return i}function api_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}function _classStaticPrivateFieldSpecGet(t,r,a){api_classCheckPrivateStaticAccess(t,r);_classCheckPrivateStaticFieldDescriptor(a,"get");return api_classApplyDescriptorGet(t,a)}function _classCheckPrivateStaticFieldDescriptor(t,r){if(void 0===t)throw new TypeError("attempted to "+r+" private static field before its declaration")}function api_classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}function api_classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}function api_asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function api_asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){api_asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){api_asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function api_slicedToArray(t,r){return function api_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function api_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||api_unsupportedIterableToArray(t,r)||function api_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function api_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return api_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?api_arrayLikeToArray(t,r):void 0}}function api_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function api_typeof(t){return api_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},api_typeof(t)}var qa=65536;window.ServiceWorkerOptions={showUnverifiedSignatures:!1};var Va=t?An:qe,Ka=t?Sn:Ve,Ya=t?kn:Ue,Xa=t?xn:Ke;function getDocument(r){var a,i;"string"==typeof r||r instanceof URL?r={url:r}:isArrayBuffer(r)&&(r={data:r});if("object"!==api_typeof(r))throw new Error("Invalid parameter in getDocument, need parameter object.");if(!r.url&&!r.data&&!r.range)throw new Error("Invalid parameter object: need either .data, .range or .url");var o=new $a,l=o.docId,c=r.url?function getUrlProp(r,a){if(r instanceof URL)return r.href;try{return a?new URL(r,window.location.origin+a).href:new URL(r,window.location).href}catch(a){if(t&&"string"==typeof r)return r}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(r.url,r.baseHref):null,u=r.data?function getDataProp(r){if(t&&"undefined"!=typeof Buffer&&r instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength)return r;if("string"==typeof r)return stringToBytes(r);if("object"===api_typeof(r)&&!isNaN(null==r?void 0:r.length)||isArrayBuffer(r))return new Uint8Array(r);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(r.data):null,d=r.httpHeaders||null,h=!0===r.withCredentials,p=null!==(a=r.password)&&void 0!==a?a:null,v=r.range instanceof Qa?r.range:null,y=Number.isInteger(r.rangeChunkSize)&&r.rangeChunkSize>0?r.rangeChunkSize:qa,_=r.worker instanceof ui?r.worker:null,g=r.verbosity,m="string"!=typeof r.docBaseUrl||isDataScheme(r.docBaseUrl)?null:r.docBaseUrl,b="function"==typeof r.cMapUrl?r.cMapUrl():"string"==typeof r.cMapUrl?r.cMapUrl:null,w=!1!==r.cMapPacked,P=r.CMapReaderFactory||Ka,k="function"==typeof r.standardFontDataUrl?r.standardFontDataUrl():"string"==typeof r.standardFontDataUrl?r.standardFontDataUrl:null,A=r.StandardFontDataFactory||Xa,S=!0!==r.stopAtErrors,x=Number.isInteger(r.maxImageSize)&&r.maxImageSize>-1?r.maxImageSize:-1,E=!1!==r.isEvalSupported,I="boolean"==typeof r.isOffscreenCanvasSupported?r.isOffscreenCanvasSupported:!t,C=Number.isInteger(r.canvasMaxAreaInBytes)?r.canvasMaxAreaInBytes:-1,T="boolean"==typeof r.disableFontFace?r.disableFontFace:t,M=!0===r.fontExtraProperties,O=!0===r.enableXfa,G=r.ownerDocument||globalThis.document,R=!0===r.disableRange,L=!0===r.disableStream,D=!0===r.disableAutoFetch,j=!0===r.pdfBug,W=v?v.length:null!==(i=r.length)&&void 0!==i?i:NaN,N="boolean"==typeof r.useSystemFonts?r.useSystemFonts:!t&&!T,B="boolean"==typeof r.useWorkerFetch?r.useWorkerFetch:P===Ve&&A===Ke&&b&&k&&isValidFetchUrl(b,document.baseURI)&&isValidFetchUrl(k,document.baseURI),z=r.canvasFactory||new Va({ownerDocument:G}),H=r.filterFactory||new Ya({docId:l,ownerDocument:G});setVerbosityLevel(g);var U={canvasFactory:z,filterFactory:H};if(!B){U.cMapReaderFactory=new P({baseUrl:b,isCompressed:w});U.standardFontDataFactory=new A({baseUrl:k})}if(!_){var q={verbosity:g,port:Xn.workerPort};_=q.port?ui.fromPort(q):new ui(q);o._worker=_}var V={docId:l,apiVersion:"4.0.727",data:u,password:p,disableAutoFetch:D,rangeChunkSize:y,length:W,docBaseUrl:m,enableXfa:O,evaluatorOptions:{maxImageSize:x,disableFontFace:T,ignoreErrors:S,isEvalSupported:E,isOffscreenCanvasSupported:I,canvasMaxAreaInBytes:C,fontExtraProperties:M,useSystemFonts:N,cMapUrl:B?b:null,standardFontDataUrl:B?k:null}},K={ignoreErrors:S,isEvalSupported:E,disableFontFace:T,fontExtraProperties:M,enableXfa:O,ownerDocument:G,disableAutoFetch:D,pdfBug:j,styleElement:null};_.promise.then((function(){if(o.destroyed)throw new Error("Loading aborted");var r=function _fetchDocument(t,r){return _fetchDocument2.apply(this,arguments)}(_,V),a=new Promise((function(r){var a;if(v)a=new Pa({length:W,initialData:v.initialData,progressiveDone:v.progressiveDone,contentDispositionFilename:v.contentDispositionFilename,disableRange:R,disableStream:L},v);else if(!u){a=function createPDFNetworkStream(r){return t?new Da(r):isValidFetchUrl(r.url)?new Sa(r):new Oa(r)}({url:c,length:W,httpHeaders:d,withCredentials:h,rangeChunkSize:y,disableRange:R,disableStream:L})}r(a)}));return Promise.all([r,a]).then((function(t){var r=api_slicedToArray(t,2),a=r[0],i=r[1];if(o.destroyed)throw new Error("Loading aborted");var c=new ca(l,a,_.port),u=new gi(c,o,i,K,U);o._transport=u;c.send("showUnverifiedSignatures",window.ServiceWorkerOptions.showUnverifiedSignatures);c.send("Ready",null)}))})).catch(o._capability.reject);return o}function _fetchDocument2(){return(_fetchDocument2=api_asyncToGenerator(api_regeneratorRuntime().mark((function _callee6(t,r){var a;return api_regeneratorRuntime().wrap((function _callee6$(i){for(;;)switch(i.prev=i.next){case 0:if(!t.destroyed){i.next=2;break}throw new Error("Worker was destroyed");case 2:i.next=4;return t.messageHandler.sendWithPromise("GetDocRequest",r,r.data?[r.data.buffer]:null);case 4:a=i.sent;if(!t.destroyed){i.next=7;break}throw new Error("Worker was destroyed");case 7:return i.abrupt("return",a);case 8:case"end":return i.stop()}}),_callee6)})))).apply(this,arguments)}var $a=function(){function PDFDocumentLoadingTask(){var t,r;api_classCallCheck(this,PDFDocumentLoadingTask);this._capability=new pe;this._transport=null;this._worker=null;this.docId="d".concat((_classStaticPrivateFieldSpecSet(PDFDocumentLoadingTask,PDFDocumentLoadingTask,Ja,(t=_classStaticPrivateFieldSpecGet(PDFDocumentLoadingTask,PDFDocumentLoadingTask,Ja),r=t++,t)),r));this.destroyed=!1;this.onPassword=null;this.onProgress=null}api_createClass(PDFDocumentLoadingTask,[{key:"promise",get:function get(){return this._capability.promise}},{key:"destroy",value:(t=api_asyncToGenerator(api_regeneratorRuntime().mark((function _callee(){var t,r,a;return api_regeneratorRuntime().wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:this.destroyed=!0;i.prev=1;null!==(t=this._worker)&&void 0!==t&&t.port&&(this._worker._pendingDestroy=!0);i.next=5;return null===(r=this._transport)||void 0===r?void 0:r.destroy();case 5:i.next=11;break;case 7:i.prev=7;i.t0=i.catch(1);null!==(a=this._worker)&&void 0!==a&&a.port&&delete this._worker._pendingDestroy;throw i.t0;case 11:this._transport=null;if(this._worker){this._worker.destroy();this._worker=null}case 13:case"end":return i.stop()}}),_callee,this,[[1,7]])}))),function destroy(){return t.apply(this,arguments)})}]);var t;return PDFDocumentLoadingTask}(),Ja={writable:!0,value:0},Qa=function(){function PDFDataRangeTransport(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;api_classCallCheck(this,PDFDataRangeTransport);this.length=t;this.initialData=r;this.progressiveDone=a;this.contentDispositionFilename=i;this._rangeListeners=[];this._progressListeners=[];this._progressiveReadListeners=[];this._progressiveDoneListeners=[];this._readyCapability=new pe}api_createClass(PDFDataRangeTransport,[{key:"addRangeListener",value:function addRangeListener(t){this._rangeListeners.push(t)}},{key:"addProgressListener",value:function addProgressListener(t){this._progressListeners.push(t)}},{key:"addProgressiveReadListener",value:function addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}},{key:"addProgressiveDoneListener",value:function addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}},{key:"onDataRange",value:function onDataRange(t,r){var a,i=api_createForOfIteratorHelper(this._rangeListeners);try{for(i.s();!(a=i.n()).done;){(0,a.value)(t,r)}}catch(t){i.e(t)}finally{i.f()}}},{key:"onDataProgress",value:function onDataProgress(t,r){var a=this;this._readyCapability.promise.then((function(){var i,o=api_createForOfIteratorHelper(a._progressListeners);try{for(o.s();!(i=o.n()).done;){(0,i.value)(t,r)}}catch(t){o.e(t)}finally{o.f()}}))}},{key:"onDataProgressiveRead",value:function onDataProgressiveRead(t){var r=this;this._readyCapability.promise.then((function(){var a,i=api_createForOfIteratorHelper(r._progressiveReadListeners);try{for(i.s();!(a=i.n()).done;){(0,a.value)(t)}}catch(t){i.e(t)}finally{i.f()}}))}},{key:"onDataProgressiveDone",value:function onDataProgressiveDone(){var t=this;this._readyCapability.promise.then((function(){var r,a=api_createForOfIteratorHelper(t._progressiveDoneListeners);try{for(a.s();!(r=a.n()).done;){(0,r.value)()}}catch(t){a.e(t)}finally{a.f()}}))}},{key:"transportReady",value:function transportReady(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function requestDataRange(t,r){unreachable("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function abort(){}}]);return PDFDataRangeTransport}(),Za=function(){function PDFDocumentProxy(t,r){api_classCallCheck(this,PDFDocumentProxy);this._pdfInfo=t;this._transport=r}api_createClass(PDFDocumentProxy,[{key:"annotationStorage",get:function get(){return this._transport.annotationStorage}},{key:"filterFactory",get:function get(){return this._transport.filterFactory}},{key:"numPages",get:function get(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function get(){return this._pdfInfo.fingerprints}},{key:"isPureXfa",get:function get(){return shadow(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"allXfaHtml",get:function get(){return this._transport._htmlForXfa}},{key:"getPage",value:function getPage(t){return this._transport.getPage(t)}},{key:"getPageIndex",value:function getPageIndex(t){return this._transport.getPageIndex(t)}},{key:"getDestinations",value:function getDestinations(){return this._transport.getDestinations()}},{key:"getDestination",value:function getDestination(t){return this._transport.getDestination(t)}},{key:"getPageLabels",value:function getPageLabels(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function getPageLayout(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function getPageMode(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function getViewerPreferences(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function getOpenAction(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function getAttachments(){return this._transport.getAttachments()}},{key:"getJSActions",value:function getJSActions(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function getOutline(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function getPermissions(){return this._transport.getPermissions()}},{key:"getMetadata",value:function getMetadata(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function getMarkInfo(){return this._transport.getMarkInfo()}},{key:"getData",value:function getData(){return this._transport.getData()}},{key:"saveDocument",value:function saveDocument(){return this._transport.saveDocument()}},{key:"getDownloadInfo",value:function getDownloadInfo(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function cleanup(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(t||this.isPureXfa)}},{key:"destroy",value:function destroy(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function get(){return this._transport.loadingParams}},{key:"loadingTask",get:function get(){return this._transport.loadingTask}},{key:"getFieldObjects",value:function getFieldObjects(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function hasJSActions(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}]);return PDFDocumentProxy}(),ei=new WeakMap,ti=new WeakMap,ri=new WeakSet,ni=new WeakSet,ai=function(){function PDFPageProxy(t,r,a){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];api_classCallCheck(this,PDFPageProxy);api_classPrivateMethodInitSpec(this,ni);api_classPrivateMethodInitSpec(this,ri);api_classPrivateFieldInitSpec(this,ei,{writable:!0,value:null});api_classPrivateFieldInitSpec(this,ti,{writable:!0,value:!1});this._pageIndex=t;this._pageInfo=r;this._transport=a;this._stats=i?new Qe:null;this._pdfBug=i;this.commonObjs=a.commonObjs;this.objs=new wi;this._maybeCleanupAfterRender=!1;this._intentStates=new Map;this.destroyed=!1}api_createClass(PDFPageProxy,[{key:"pageNumber",get:function get(){return this._pageIndex+1}},{key:"rotate",get:function get(){return this._pageInfo.rotate}},{key:"ref",get:function get(){return this._pageInfo.ref}},{key:"userUnit",get:function get(){return this._pageInfo.userUnit}},{key:"view",get:function get(){return this._pageInfo.view}},{key:"getViewport",value:function getViewport(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,a=t.rotation,i=void 0===a?this.rotate:a,o=t.offsetX,l=void 0===o?0:o,c=t.offsetY,u=void 0===c?0:c,d=t.dontFlip,h=void 0!==d&&d;return new Xe({viewBox:this.view,scale:r,rotation:i,offsetX:l,offsetY:u,dontFlip:h})}},{key:"getAnnotations",value:function getAnnotations(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,r=void 0===t?"display":t,a=this._transport.getRenderingIntent(r);return this._transport.getAnnotations(this._pageIndex,a.renderingIntent)}},{key:"getJSActions",value:function getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}},{key:"filterFactory",get:function get(){return this._transport.filterFactory}},{key:"isPureXfa",get:function get(){return shadow(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"getXfa",value:(t=api_asyncToGenerator(api_regeneratorRuntime().mark((function _callee2(){var t;return api_regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(null===(t=this._transport._htmlForXfa)||void 0===t?void 0:t.children[this._pageIndex])||null);case 1:case"end":return r.stop()}}),_callee2,this)}))),function getXfa(){return t.apply(this,arguments)})},{key:"render",value:function render(t){var r,a,i=this,o=t.canvasContext,l=t.viewport,c=t.intent,d=void 0===c?"display":c,h=t.annotationMode,p=void 0===h?y.ENABLE:h,v=t.transform,_=void 0===v?null:v,g=t.background,m=void 0===g?null:g,b=t.optionalContentConfigPromise,w=void 0===b?null:b,P=t.annotationCanvasMap,k=void 0===P?null:P,A=t.pageColors,S=void 0===A?null:A,x=t.printAnnotationStorage,E=void 0===x?null:x;null===(r=this._stats)||void 0===r||r.time("Overall");var I=this._transport.getRenderingIntent(d,p,E);api_classPrivateFieldSet(this,ti,!1);api_classPrivateMethodGet(this,ni,_abortDelayedCleanup2).call(this);w||(w=this._transport.getOptionalContentConfig());var C=this._intentStates.get(I.cacheKey);if(!C){C=Object.create(null);this._intentStates.set(I.cacheKey,C)}if(C.streamReaderCancelTimeout){clearTimeout(C.streamReaderCancelTimeout);C.streamReaderCancelTimeout=null}var T=!!(I.renderingIntent&u);if(!C.displayReadyCapability){var M;C.displayReadyCapability=new pe;C.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null};null===(M=this._stats)||void 0===M||M.time("Page Request");this._pumpOperatorList(I)}var O=function complete(t){var r,a;C.renderTasks.delete(G);(i._maybeCleanupAfterRender||T)&&api_classPrivateFieldSet(i,ti,!0);api_classPrivateMethodGet(i,ri,_tryCleanup2).call(i,!T);if(t){G.capability.reject(t);i._abortOperatorList({intentState:C,reason:t instanceof Error?t:new Error(t)})}else G.capability.resolve();null===(r=i._stats)||void 0===r||r.timeEnd("Rendering");null===(a=i._stats)||void 0===a||a.timeEnd("Overall")},G=new Ai({callback:O,params:{canvasContext:o,viewport:l,transform:_,background:m},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:k,operatorList:C.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!T,pdfBug:this._pdfBug,pageColors:S});((a=C).renderTasks||(a.renderTasks=new Set)).add(G);var R=G.task;Promise.all([C.displayReadyCapability.promise,w]).then((function(t){var r,a=api_slicedToArray(t,2),o=a[0],l=a[1];if(i.destroyed)O();else{null===(r=i._stats)||void 0===r||r.time("Rendering");G.initializeGraphics({transparency:o,optionalContentConfig:l});G.operatorListChanged()}})).catch(O);return R}},{key:"getOperatorList",value:function getOperatorList(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.intent,a=void 0===r?"display":r,i=t.annotationMode,o=void 0===i?y.ENABLE:i,l=t.printAnnotationStorage,c=void 0===l?null:l;var u,d=this._transport.getRenderingIntent(a,o,c,!0),h=this._intentStates.get(d.cacheKey);if(!h){h=Object.create(null);this._intentStates.set(d.cacheKey,h)}if(!h.opListReadCapability){var p,v;(u=Object.create(null)).operatorListChanged=function operatorListChanged(){if(h.operatorList.lastChunk){h.opListReadCapability.resolve(h.operatorList);h.renderTasks.delete(u)}};h.opListReadCapability=new pe;((p=h).renderTasks||(p.renderTasks=new Set)).add(u);h.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null};null===(v=this._stats)||void 0===v||v.time("Page Request");this._pumpOperatorList(d)}return h.opListReadCapability.promise}},{key:"streamTextContent",value:function streamTextContent(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.includeMarkedContent,a=void 0!==r&&r,i=t.disableNormalization,o=void 0!==i&&i;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===a,disableNormalization:!0===o},{highWaterMark:100,size:function size(t){return t.items.length}})}},{key:"getTextContent",value:function getTextContent(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((function(t){return Ua.textContent(t)}));var r=this.streamTextContent(t);return new Promise((function(t,a){var i=r.getReader(),o={items:[],styles:Object.create(null)};!function pump(){i.read().then((function(r){var a,i=r.value;if(r.done)t(o);else{Object.assign(o.styles,i.styles);(a=o.items).push.apply(a,api_toConsumableArray(i.items));pump()}}),a)}()}))}},{key:"getStructTree",value:function getStructTree(){return this._transport.getStructTree(this._pageIndex)}},{key:"_destroy",value:function _destroy(){this.destroyed=!0;var t,r=[],a=api_createForOfIteratorHelper(this._intentStates.values());try{for(a.s();!(t=a.n()).done;){var i=t.value;this._abortOperatorList({intentState:i,reason:new Error("Page was destroyed."),force:!0});if(!i.opListReadCapability){var o,l=api_createForOfIteratorHelper(i.renderTasks);try{for(l.s();!(o=l.n()).done;){var c=o.value;r.push(c.completed);c.cancel()}}catch(t){l.e(t)}finally{l.f()}}}}catch(t){a.e(t)}finally{a.f()}this.objs.clear();api_classPrivateFieldSet(this,ti,!1);api_classPrivateMethodGet(this,ni,_abortDelayedCleanup2).call(this);return Promise.all(r)}},{key:"cleanup",value:function cleanup(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];api_classPrivateFieldSet(this,ti,!0);var r=api_classPrivateMethodGet(this,ri,_tryCleanup2).call(this,!1);t&&r&&this._stats&&(this._stats=new Qe);return r}},{key:"_startRenderPage",value:function _startRenderPage(t,r){var a,i,o=this._intentStates.get(r);if(o){null===(a=this._stats)||void 0===a||a.timeEnd("Page Request");null===(i=o.displayReadyCapability)||void 0===i||i.resolve(t)}}},{key:"_renderPageChunk",value:function _renderPageChunk(t,r){for(var a=0,i=t.length;a<i;a++){r.operatorList.fnArray.push(t.fnArray[a]);r.operatorList.argsArray.push(t.argsArray[a])}r.operatorList.lastChunk=t.lastChunk;r.operatorList.separateAnnots=t.separateAnnots;var o,l=api_createForOfIteratorHelper(r.renderTasks);try{for(l.s();!(o=l.n()).done;){o.value.operatorListChanged()}}catch(t){l.e(t)}finally{l.f()}t.lastChunk&&api_classPrivateMethodGet(this,ri,_tryCleanup2).call(this,!0)}},{key:"_pumpOperatorList",value:function _pumpOperatorList(t){var r=this,a=t.renderingIntent,i=t.cacheKey,o=t.annotationStorageSerializable,l=o.map,c=o.transfer,u=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:a,cacheKey:i,annotationStorage:l},c).getReader(),d=this._intentStates.get(i);d.streamReader=u;!function pump(){u.read().then((function(t){var a=t.value;if(t.done)d.streamReader=null;else if(!r._transport.destroyed){r._renderPageChunk(a,d);pump()}}),(function(t){d.streamReader=null;if(!r._transport.destroyed){if(d.operatorList){d.operatorList.lastChunk=!0;var a,i=api_createForOfIteratorHelper(d.renderTasks);try{for(i.s();!(a=i.n()).done;){a.value.operatorListChanged()}}catch(t){i.e(t)}finally{i.f()}api_classPrivateMethodGet(r,ri,_tryCleanup2).call(r,!0)}if(d.displayReadyCapability)d.displayReadyCapability.reject(t);else{if(!d.opListReadCapability)throw t;d.opListReadCapability.reject(t)}}}))}()}},{key:"_abortOperatorList",value:function _abortOperatorList(t){var r=this,a=t.intentState,i=t.reason,o=t.force,l=void 0!==o&&o;if(a.streamReader){if(a.streamReaderCancelTimeout){clearTimeout(a.streamReaderCancelTimeout);a.streamReaderCancelTimeout=null}if(!l){if(a.renderTasks.size>0)return;if(i instanceof $e){var c=100;i.extraDelay>0&&i.extraDelay<1e3&&(c+=i.extraDelay);a.streamReaderCancelTimeout=setTimeout((function(){a.streamReaderCancelTimeout=null;r._abortOperatorList({intentState:a,reason:i,force:!0})}),c);return}}a.streamReader.cancel(new ce(i.message)).catch((function(){}));a.streamReader=null;if(!this._transport.destroyed){var u,d=api_createForOfIteratorHelper(this._intentStates);try{for(d.s();!(u=d.n()).done;){var h=api_slicedToArray(u.value,2),p=h[0];if(h[1]===a){this._intentStates.delete(p);break}}}catch(t){d.e(t)}finally{d.f()}this.cleanup()}}}},{key:"stats",get:function get(){return this._stats}}]);var t;return PDFPageProxy}();function _tryCleanup2(){var t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];api_classPrivateMethodGet(this,ni,_abortDelayedCleanup2).call(this);if(!api_classPrivateFieldGet(this,ti)||this.destroyed)return!1;if(r){api_classPrivateFieldSet(this,ei,setTimeout((function(){api_classPrivateFieldSet(t,ei,null);api_classPrivateMethodGet(t,ri,_tryCleanup2).call(t,!1)}),5e3));return!1}var a,i=api_createForOfIteratorHelper(this._intentStates.values());try{for(i.s();!(a=i.n()).done;){var o=a.value,l=o.renderTasks,c=o.operatorList;if(l.size>0||!c.lastChunk)return!1}}catch(t){i.e(t)}finally{i.f()}this._intentStates.clear();this.objs.clear();api_classPrivateFieldSet(this,ti,!1);return!0}function _abortDelayedCleanup2(){if(api_classPrivateFieldGet(this,ei)){clearTimeout(api_classPrivateFieldGet(this,ei));api_classPrivateFieldSet(this,ei,null)}}var ii=new WeakMap,oi=new WeakMap,si=function(){function LoopbackPort(){api_classCallCheck(this,LoopbackPort);api_classPrivateFieldInitSpec(this,ii,{writable:!0,value:new Set});api_classPrivateFieldInitSpec(this,oi,{writable:!0,value:Promise.resolve()})}api_createClass(LoopbackPort,[{key:"postMessage",value:function postMessage(t,r){var a=this,i={data:structuredClone(t,r?{transfer:r}:null)};api_classPrivateFieldGet(this,oi).then((function(){var t,r=api_createForOfIteratorHelper(api_classPrivateFieldGet(a,ii));try{for(r.s();!(t=r.n()).done;){t.value.call(a,i)}}catch(t){r.e(t)}finally{r.f()}}))}},{key:"addEventListener",value:function addEventListener(t,r){api_classPrivateFieldGet(this,ii).add(r)}},{key:"removeEventListener",value:function removeEventListener(t,r){api_classPrivateFieldGet(this,ii).delete(r)}},{key:"terminate",value:function terminate(){api_classPrivateFieldGet(this,ii).clear()}}]);return LoopbackPort}(),li={isWorkerDisabled:!1,fakeWorkerId:0};if(t){li.isWorkerDisabled=!0;Xn.workerSrc||(Xn.workerSrc="./pdf.worker.mjs")}li.isSameOrigin=function(t,r){var a;try{if(!(a=new URL(t)).origin||"null"===a.origin)return!1}catch(t){return!1}var i=new URL(r,a);return a.origin===i.origin};li.createCDNWrapper=function(t){var r='await import("'.concat(t,'");');return URL.createObjectURL(new Blob([r],{type:"text/javascript"}))};var ci=new WeakSet,ui=function(){function PDFWorker(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.name,a=void 0===r?null:r,i=t.port,o=void 0===i?null:i,l=t.verbosity,c=void 0===l?getVerbosityLevel():l;api_classCallCheck(this,PDFWorker);api_classPrivateMethodInitSpec(this,ci);this.name=a;this.destroyed=!1;this.verbosity=c;this._readyCapability=new pe;this._port=null;this._webWorker=null;this._messageHandler=null;if(o){var u;if(null!==(u=_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,hi))&&void 0!==u&&u.has(o))throw new Error("Cannot use more than one PDFWorker per port.");(_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,hi)||_classStaticPrivateFieldSpecSet(PDFWorker,PDFWorker,hi,new WeakMap)).set(o,this);this._initializeFromPort(o)}else this._initialize()}api_createClass(PDFWorker,[{key:"promise",get:function get(){return this._readyCapability.promise}},{key:"port",get:function get(){return this._port}},{key:"messageHandler",get:function get(){return this._messageHandler}},{key:"_initializeFromPort",value:function _initializeFromPort(t){this._port=t;this._messageHandler=new ca("main","worker",t);this._messageHandler.on("ready",(function(){}));this._readyCapability.resolve();this._messageHandler.send("configure",{verbosity:this.verbosity})}},{key:"_initialize",value:function _initialize(){var t=this;if(!li.isWorkerDisabled&&!_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,di)){var r=PDFWorker.workerSrc;try{li.isSameOrigin(window.location.href,r)||(r=li.createCDNWrapper(new URL(r,window.location).href));var a=new Worker(api_classPrivateMethodGet(this,ci,_generateTrustedURL2).call(this,r),{type:"module"}),i=new ca("main","worker",a),o=function terminateEarly(){a.removeEventListener("error",l);i.destroy();a.terminate();t.destroyed?t._readyCapability.reject(new Error("Worker was destroyed")):t._setupFakeWorker()},l=function onWorkerError(){t._webWorker||o()};a.addEventListener("error",l);i.on("test",(function(r){a.removeEventListener("error",l);if(t.destroyed)o();else if(r){t._messageHandler=i;t._port=a;t._webWorker=a;t._readyCapability.resolve();i.send("configure",{verbosity:t.verbosity})}else{t._setupFakeWorker();i.destroy();a.terminate()}}));i.on("ready",(function(r){a.removeEventListener("error",l);if(t.destroyed)o();else try{c()}catch(r){t._setupFakeWorker()}}));var c=function sendTest(){var t=new Uint8Array;i.send("test",t,[t.buffer])};c();return}catch(t){info("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function _setupFakeWorker(){var t=this;if(!li.isWorkerDisabled){warn("Setting up fake worker.");li.isWorkerDisabled=!0}PDFWorker._setupFakeWorkerGlobal.then((function(r){if(t.destroyed)t._readyCapability.reject(new Error("Worker was destroyed"));else{var a=new si;t._port=a;var i="fake".concat(li.fakeWorkerId++),o=new ca(i+"_worker",i,a);r.setup(o,a);var l=new ca(i,i+"_worker",a);t._messageHandler=l;t._readyCapability.resolve();l.send("configure",{verbosity:t.verbosity})}})).catch((function(r){t._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(r.message,'".')))}))}},{key:"destroy",value:function destroy(){var t;this.destroyed=!0;if(this._webWorker){this._webWorker.terminate();this._webWorker=null}null===(t=_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,hi))||void 0===t||t.delete(this._port);this._port=null;if(this._messageHandler){this._messageHandler.destroy();this._messageHandler=null}}}],[{key:"fromPort",value:function fromPort(t){var r;if(null==t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");var a=null===(r=_classStaticPrivateFieldSpecGet(this,PDFWorker,hi))||void 0===r?void 0:r.get(t.port);if(a){if(a._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return a}return new PDFWorker(t)}},{key:"workerSrc",get:function get(){if(Xn.workerSrc)return"Function"===Xn.workerSrc.constructor.name?Xn.workerSrc():Xn.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}},{key:"_setupFakeWorkerGlobal",get:function get(){var t=this,r=function(){var r=api_asyncToGenerator(api_regeneratorRuntime().mark((function _callee3(){var r;return api_regeneratorRuntime().wrap((function _callee3$(a){for(;;)switch(a.prev=a.next){case 0:if(!_classStaticPrivateFieldSpecGet(t,PDFWorker,di)){a.next=2;break}return a.abrupt("return",_classStaticPrivateFieldSpecGet(t,PDFWorker,di));case 2:a.next=4;return import(t.workerSrc);case 4:r=a.sent;return a.abrupt("return",r.WorkerMessageHandler);case 6:case"end":return a.stop()}}),_callee3)})));return function loader(){return r.apply(this,arguments)}}();return shadow(this,"_setupFakeWorkerGlobal",r())}}]);return PDFWorker}();function _generateTrustedURL2(t){if(window.trustedTypes){var r=window.trustedTypes.createPolicy("foo",{createScriptURL:function createScriptURL(t){return t}});return r.createScriptURL(t)}return t}var di={get:function _get_mainThreadWorkerMessageHandler(){try{var t;return(null===(t=globalThis.pdfjsWorker)||void 0===t?void 0:t.WorkerMessageHandler)||null}catch(t){return null}},set:void 0},hi={writable:!0,value:void 0},fi=new WeakMap,pi=new WeakMap,vi=new WeakMap,yi=new WeakMap,_i=new WeakSet,gi=function(){function WorkerTransport(t,r,a,i,o){api_classCallCheck(this,WorkerTransport);api_classPrivateMethodInitSpec(this,_i);api_classPrivateFieldInitSpec(this,fi,{writable:!0,value:new Map});api_classPrivateFieldInitSpec(this,pi,{writable:!0,value:new Map});api_classPrivateFieldInitSpec(this,vi,{writable:!0,value:new Map});api_classPrivateFieldInitSpec(this,yi,{writable:!0,value:null});this.messageHandler=t;this.loadingTask=r;this.commonObjs=new wi;this.fontLoader=new bn({ownerDocument:i.ownerDocument,styleElement:i.styleElement});this._params=i;this.canvasFactory=o.canvasFactory;this.filterFactory=o.filterFactory;this.cMapReaderFactory=o.cMapReaderFactory;this.standardFontDataFactory=o.standardFontDataFactory;this.destroyed=!1;this.destroyCapability=null;this._networkStream=a;this._fullReader=null;this._lastProgress=null;this.downloadInfoCapability=new pe;this.setupMessageHandler()}api_createClass(WorkerTransport,[{key:"annotationStorage",get:function get(){return shadow(this,"annotationStorage",new vn)}},{key:"getRenderingIntent",value:function getRenderingIntent(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.ENABLE,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=c,_=dn;switch(t){case"any":o=l;break;case"display":break;case"print":o=u;break;default:warn("getRenderingIntent - invalid intent: ".concat(t))}switch(r){case y.DISABLE:o+=p;break;case y.ENABLE:break;case y.ENABLE_FORMS:o+=d;break;case y.ENABLE_STORAGE:_=((o+=h)&u&&a instanceof _n?a:this.annotationStorage).serializable;break;default:warn("getRenderingIntent - invalid annotationMode: ".concat(r))}i&&(o+=v);return{renderingIntent:o,cacheKey:"".concat(o,"_").concat(_.hash),annotationStorageSerializable:_}}},{key:"destroy",value:function destroy(){var t,r=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0;this.destroyCapability=new pe;null===(t=api_classPrivateFieldGet(this,yi))||void 0===t||t.reject(new Error("Worker was destroyed during onPassword callback"));var a,i=[],o=api_createForOfIteratorHelper(api_classPrivateFieldGet(this,pi).values());try{for(o.s();!(a=o.n()).done;){var l=a.value;i.push(l._destroy())}}catch(t){o.e(t)}finally{o.f()}api_classPrivateFieldGet(this,pi).clear();api_classPrivateFieldGet(this,vi).clear();this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var c=this.messageHandler.sendWithPromise("Terminate",null);i.push(c);Promise.all(i).then((function(){var t;r.commonObjs.clear();r.fontLoader.clear();api_classPrivateFieldGet(r,fi).clear();r.filterFactory.destroy();null===(t=r._networkStream)||void 0===t||t.cancelAllRequests(new ce("Worker was terminated."));if(r.messageHandler){r.messageHandler.destroy();r.messageHandler=null}r.destroyCapability.resolve()}),this.destroyCapability.reject);return this.destroyCapability.promise}},{key:"setupMessageHandler",value:function setupMessageHandler(){var t=this,r=this.messageHandler,a=this.loadingTask;r.on("GetReader",(function(r,a){assert(t._networkStream,"GetReader - no `IPDFStream` instance available.");t._fullReader=t._networkStream.getFullReader();t._fullReader.onProgress=function(r){t._lastProgress={loaded:r.loaded,total:r.total}};a.onPull=function(){t._fullReader.read().then((function(t){var r=t.value;if(t.done)a.close();else{assert(r instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer.");a.enqueue(new Uint8Array(r),1,[r])}})).catch((function(t){a.error(t)}))};a.onCancel=function(r){t._fullReader.cancel(r);a.ready.catch((function(r){if(!t.destroyed)throw r}))}}));r.on("ReaderHeadersReady",(function(r){var i=new pe,o=t._fullReader;o.headersReady.then((function(){if(!o.isStreamingSupported||!o.isRangeSupported){if(t._lastProgress){var r;null===(r=a.onProgress)||void 0===r||r.call(a,t._lastProgress)}o.onProgress=function(t){var r;null===(r=a.onProgress)||void 0===r||r.call(a,{loaded:t.loaded,total:t.total})}}i.resolve({isStreamingSupported:o.isStreamingSupported,isRangeSupported:o.isRangeSupported,contentLength:o.contentLength})}),i.reject);return i.promise}));r.on("GetRangeReader",(function(r,a){assert(t._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var i=t._networkStream.getRangeReader(r.begin,r.end);if(i){a.onPull=function(){i.read().then((function(t){var r=t.value;if(t.done)a.close();else{assert(r instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer.");a.enqueue(new Uint8Array(r),1,[r])}})).catch((function(t){a.error(t)}))};a.onCancel=function(r){i.cancel(r);a.ready.catch((function(r){if(!t.destroyed)throw r}))}}else a.close()}));r.on("GetDoc",(function(r){var i=r.pdfInfo;t._numPages=i.numPages;t._htmlForXfa=i.htmlForXfa;delete i.htmlForXfa;a._capability.resolve(new Za(i,t))}));r.on("DocException",(function(t){var r;switch(t.name){case"PasswordException":r=new ne(t.message,t.code);break;case"InvalidPDFException":r=new ie(t.message);break;case"MissingPDFException":r=new oe(t.message);break;case"UnexpectedResponseException":r=new se(t.message,t.status);break;case"UnknownErrorException":r=new ae(t.message,t.details);break;default:unreachable("DocException - expected a valid Error.")}a._capability.reject(r)}));r.on("PasswordRequest",(function(r){api_classPrivateFieldSet(t,yi,new pe);if(a.onPassword){try{a.onPassword((function updatePassword(r){r instanceof Error?api_classPrivateFieldGet(t,yi).reject(r):api_classPrivateFieldGet(t,yi).resolve({password:r})}),r.code)}catch(r){api_classPrivateFieldGet(t,yi).reject(r)}}else api_classPrivateFieldGet(t,yi).reject(new ne(r.message,r.code));return api_classPrivateFieldGet(t,yi).promise}));r.on("DataLoaded",(function(r){var i;null===(i=a.onProgress)||void 0===i||i.call(a,{loaded:r.length,total:r.length});t.downloadInfoCapability.resolve(r)}));r.on("StartRenderPage",(function(r){if(!t.destroyed){api_classPrivateFieldGet(t,pi).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}}));r.on("commonobj",(function(a){var i,o=api_slicedToArray(a,3),l=o[0],c=o[1],u=o[2];if(!t.destroyed&&!t.commonObjs.has(l))switch(c){case"Font":var d=t._params;if("error"in u){var h=u.error;warn("Error during font loading: ".concat(h));t.commonObjs.resolve(l,h);break}var p=d.pdfBug&&null!==(i=globalThis.FontInspector)&&void 0!==i&&i.enabled?function(t,r){return globalThis.FontInspector.fontAdded(t,r)}:null,v=new wn(u,{isEvalSupported:d.isEvalSupported,disableFontFace:d.disableFontFace,ignoreErrors:d.ignoreErrors,inspectFont:p});t.fontLoader.bind(v).catch((function(t){return r.sendWithPromise("FontFallback",{id:l})})).finally((function(){!d.fontExtraProperties&&v.data&&(v.data=null);t.commonObjs.resolve(l,v)}));break;case"FontPath":case"Image":case"Pattern":t.commonObjs.resolve(l,u);break;default:throw new Error("Got unknown common object type ".concat(c))}}));r.on("obj",(function(r){var a=api_slicedToArray(r,4),i=a[0],o=a[1],l=a[2],c=a[3];if(!t.destroyed){var u=api_classPrivateFieldGet(t,pi).get(o);if(!u.objs.has(i))if(0!==u._intentStates.size)switch(l){case"Image":u.objs.resolve(i,c);if(c){var d;if(c.bitmap){d=c.width*c.height*4}else{var h;d=(null===(h=c.data)||void 0===h?void 0:h.length)||0}d>1e7&&(u._maybeCleanupAfterRender=!0)}break;case"Pattern":u.objs.resolve(i,c);break;default:throw new Error("Got unknown object type ".concat(l))}else{var p;null==c||null===(p=c.bitmap)||void 0===p||p.close()}}}));r.on("DocProgress",(function(r){var i;t.destroyed||null===(i=a.onProgress)||void 0===i||i.call(a,{loaded:r.loaded,total:r.total})}));r.on("FetchBuiltInCMap",(function(r){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.cMapReaderFactory?t.cMapReaderFactory.fetch(r):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))}));r.on("FetchStandardFontData",(function(r){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.standardFontDataFactory?t.standardFontDataFactory.fetch(r):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))}))}},{key:"getData",value:function getData(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"saveDocument",value:function saveDocument(){var t,r,a=this;this.annotationStorage.size<=0&&warn("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");var i=this.annotationStorage.serializable,o=i.map,l=i.transfer;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:o,filename:null!==(t=null===(r=this._fullReader)||void 0===r?void 0:r.filename)&&void 0!==t?t:null},l).finally((function(){a.annotationStorage.resetModified()}))}},{key:"getPage",value:function getPage(t){var r=this;if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));var a=t-1,i=api_classPrivateFieldGet(this,vi).get(a);if(i)return i;var o=this.messageHandler.sendWithPromise("GetPage",{pageIndex:a}).then((function(t){if(r.destroyed)throw new Error("Transport destroyed");var i=new ai(a,t,r,r._params.pdfBug);api_classPrivateFieldGet(r,pi).set(a,i);return i}));api_classPrivateFieldGet(this,vi).set(a,o);return o}},{key:"getPageIndex",value:function getPageIndex(t){return"object"!==api_typeof(t)||null===t||!Number.isInteger(t.num)||t.num<0||!Number.isInteger(t.gen)||t.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen})}},{key:"getAnnotations",value:function getAnnotations(t,r){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:r})}},{key:"getFieldObjects",value:function getFieldObjects(){return api_classPrivateMethodGet(this,_i,_cacheSimpleMethod2).call(this,"GetFieldObjects")}},{key:"hasJSActions",value:function hasJSActions(){return api_classPrivateMethodGet(this,_i,_cacheSimpleMethod2).call(this,"HasJSActions")}},{key:"getCalculationOrderIds",value:function getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function getDestination(t){return"string"!=typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}},{key:"getPageLabels",value:function getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getDocJSActions",value:function getDocJSActions(){return api_classPrivateMethodGet(this,_i,_cacheSimpleMethod2).call(this,"GetDocJSActions")}},{key:"getPageJSActions",value:function getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}},{key:"getStructTree",value:function getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}},{key:"getOutline",value:function getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((function(t){return new wa(t)}))}},{key:"getPermissions",value:function getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function getMetadata(){var t=this,r="GetMetadata",a=api_classPrivateFieldGet(this,fi).get(r);if(a)return a;var i=this.messageHandler.sendWithPromise(r,null).then((function(r){var a,i,o,l;return{info:r[0],metadata:r[1]?new ha(r[1]):null,contentDispositionFilename:null!==(a=null===(i=t._fullReader)||void 0===i?void 0:i.filename)&&void 0!==a?a:null,contentLength:null!==(o=null===(l=t._fullReader)||void 0===l?void 0:l.contentLength)&&void 0!==o?o:null}}));api_classPrivateFieldGet(this,fi).set(r,i);return i}},{key:"getMarkInfo",value:function getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:(t=api_asyncToGenerator(api_regeneratorRuntime().mark((function _callee4(){var t,r,a,i,o=arguments;return api_regeneratorRuntime().wrap((function _callee4$(l){for(;;)switch(l.prev=l.next){case 0:t=o.length>0&&void 0!==o[0]&&o[0];if(!this.destroyed){l.next=3;break}return l.abrupt("return");case 3:l.next=5;return this.messageHandler.sendWithPromise("Cleanup",null);case 5:r=api_createForOfIteratorHelper(api_classPrivateFieldGet(this,pi).values());l.prev=6;r.s();case 8:if((a=r.n()).done){l.next=15;break}if((i=a.value).cleanup()){l.next=13;break}throw new Error("startCleanup: Page ".concat(i.pageNumber," is currently rendering."));case 13:l.next=8;break;case 15:l.next=20;break;case 17:l.prev=17;l.t0=l.catch(6);r.e(l.t0);case 20:l.prev=20;r.f();return l.finish(20);case 23:this.commonObjs.clear();t||this.fontLoader.clear();api_classPrivateFieldGet(this,fi).clear();this.filterFactory.destroy(!0);case 27:case"end":return l.stop()}}),_callee4,this,[[6,17,20,23]])}))),function startCleanup(){return t.apply(this,arguments)})},{key:"loadingParams",get:function get(){var t=this._params;return shadow(this,"loadingParams",{disableAutoFetch:t.disableAutoFetch,enableXfa:t.enableXfa})}}]);var t;return WorkerTransport}();function _cacheSimpleMethod2(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=api_classPrivateFieldGet(this,fi).get(t);if(a)return a;var i=this.messageHandler.sendWithPromise(t,r);api_classPrivateFieldGet(this,fi).set(t,i);return i}var mi=new WeakMap,bi=new WeakSet,wi=function(){function PDFObjects(){api_classCallCheck(this,PDFObjects);api_classPrivateMethodInitSpec(this,bi);api_classPrivateFieldInitSpec(this,mi,{writable:!0,value:Object.create(null)})}api_createClass(PDFObjects,[{key:"get",value:function get(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(r){var a=api_classPrivateMethodGet(this,bi,_ensureObj2).call(this,t);a.capability.promise.then((function(){return r(a.data)}));return null}var i=api_classPrivateFieldGet(this,mi)[t];if(null==i||!i.capability.settled)throw new Error("Requesting object that isn't resolved yet ".concat(t,"."));return i.data}},{key:"has",value:function has(t){var r=api_classPrivateFieldGet(this,mi)[t];return(null==r?void 0:r.capability.settled)||!1}},{key:"resolve",value:function resolve(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=api_classPrivateMethodGet(this,bi,_ensureObj2).call(this,t);a.data=r;a.capability.resolve()}},{key:"clear",value:function clear(){for(var t in api_classPrivateFieldGet(this,mi)){var r,a=api_classPrivateFieldGet(this,mi)[t].data;null==a||null===(r=a.bitmap)||void 0===r||r.close()}api_classPrivateFieldSet(this,mi,Object.create(null))}}]);return PDFObjects}();function _ensureObj2(t){var r;return(r=api_classPrivateFieldGet(this,mi))[t]||(r[t]={capability:new pe,data:null})}var Pi=new WeakMap,ki=function(){function RenderTask(t){api_classCallCheck(this,RenderTask);api_classPrivateFieldInitSpec(this,Pi,{writable:!0,value:null});api_classPrivateFieldSet(this,Pi,t);this.onContinue=null}api_createClass(RenderTask,[{key:"promise",get:function get(){return api_classPrivateFieldGet(this,Pi).capability.promise}},{key:"cancel",value:function cancel(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;api_classPrivateFieldGet(this,Pi).cancel(null,t)}},{key:"separateAnnots",get:function get(){var t=api_classPrivateFieldGet(this,Pi).operatorList.separateAnnots;if(!t)return!1;var r=api_classPrivateFieldGet(this,Pi).annotationCanvasMap;return t.form||t.canvas&&(null==r?void 0:r.size)>0}}]);return RenderTask}(),Ai=function(){function InternalRenderTask(t){var r=t.callback,a=t.params,i=t.objs,o=t.commonObjs,l=t.annotationCanvasMap,c=t.operatorList,u=t.pageIndex,d=t.canvasFactory,h=t.filterFactory,p=t.useRequestAnimationFrame,v=void 0!==p&&p,y=t.pdfBug,_=void 0!==y&&y,g=t.pageColors,m=void 0===g?null:g;api_classCallCheck(this,InternalRenderTask);this.callback=r;this.params=a;this.objs=i;this.commonObjs=o;this.annotationCanvasMap=l;this.operatorListIdx=null;this.operatorList=c;this._pageIndex=u;this.canvasFactory=d;this.filterFactory=h;this._pdfBug=_;this.pageColors=m;this.running=!1;this.graphicsReadyCallback=null;this.graphicsReady=!1;this._useRequestAnimationFrame=!0===v&&"undefined"!=typeof window;this.cancelled=!1;this.capability=new pe;this.task=new ki(this);this._cancelBound=this.cancel.bind(this);this._continueBound=this._continue.bind(this);this._scheduleNextBound=this._scheduleNext.bind(this);this._nextBound=this._next.bind(this);this._canvas=a.canvasContext.canvas}api_createClass(InternalRenderTask,[{key:"completed",get:function get(){return this.capability.promise.catch((function(){}))}},{key:"initializeGraphics",value:function initializeGraphics(t){var r,a,i=t.transparency,o=void 0!==i&&i,l=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,Si).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,Si).add(this._canvas)}if(this._pdfBug&&null!==(r=globalThis.StepperManager)&&void 0!==r&&r.enabled){this.stepper=globalThis.StepperManager.create(this._pageIndex);this.stepper.init(this.operatorList);this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint()}var c=this.params,u=c.canvasContext,d=c.viewport,h=c.transform,p=c.background;this.gfx=new Kn(u,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:l},this.annotationCanvasMap,this.pageColors);this.gfx.beginDrawing({transform:h,viewport:d,transparency:o,background:p});this.operatorListIdx=0;this.graphicsReady=!0;null===(a=this.graphicsReadyCallback)||void 0===a||a.call(this)}}},{key:"cancel",value:function cancel(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.running=!1;this.cancelled=!0;null===(t=this.gfx)||void 0===t||t.endDrawing();_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,Si).delete(this._canvas);this.callback(r||new $e("Rendering cancelled, page ".concat(this._pageIndex+1),a))}},{key:"operatorListChanged",value:function operatorListChanged(){var t;if(this.graphicsReady){null===(t=this.stepper)||void 0===t||t.updateOperatorList(this.operatorList);this.running||this._continue()}else this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function _continue(){this.running=!0;this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function _scheduleNext(){var t=this;window.ngxZone.runOutsideAngular((function(){t._useRequestAnimationFrame?window.requestAnimationFrame((function(){t._nextBound().catch(t._cancelBound)})):Promise.resolve().then(t._nextBound).catch(t._cancelBound)}))}},{key:"_next",value:(t=api_asyncToGenerator(api_regeneratorRuntime().mark((function _callee5(){return api_regeneratorRuntime().wrap((function _callee5$(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cancelled){t.next=2;break}return t.abrupt("return");case 2:this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper);if(this.operatorListIdx===this.operatorList.argsArray.length){this.running=!1;if(this.operatorList.lastChunk){this.gfx.endDrawing();_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,Si).delete(this._canvas);this.callback()}}case 4:case"end":return t.stop()}}),_callee5,this)}))),function _next(){return t.apply(this,arguments)})}]);var t;return InternalRenderTask}(),Si={writable:!0,value:new WeakSet},xi="4.0.727",Fi="ecea815a0";function text_layer_typeof(t){return text_layer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},text_layer_typeof(t)}function text_layer_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,text_layer_toPropertyKey(i.key),i)}}function text_layer_toPropertyKey(t){var r=function text_layer_toPrimitive(t,r){if("object"!=text_layer_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=text_layer_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==text_layer_typeof(r)?r:String(r)}function text_layer_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function text_layer_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return text_layer_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return text_layer_arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function text_layer_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}var Ei=30,Ii=.8,Ci=new Map;function getCtx(t,r){var a,i=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0,alpha:!1}:{alpha:!1};if(r&&ue.isOffscreenCanvasSupported)a=new OffscreenCanvas(t,t).getContext("2d",i);else{var o=document.createElement("canvas");o.width=o.height=t;a=o.getContext("2d",i)}return a}function appendText(t,r,a){var i=document.createElement("span"),o={angle:0,canvasWidth:0,hasText:""!==r.str,hasEOL:r.hasEOL,fontSize:0};t._textDivs.push(i);var l=he.transform(t._transform,r.transform),c=Math.atan2(l[1],l[0]),u=a[r.fontName];u.vertical&&(c+=Math.PI/2);var d,h,p=t._fontInspectorEnabled&&u.fontSubstitution||u.fontFamily,v=Math.hypot(l[2],l[3]),y=v*function getAscent(t,r){var a=Ci.get(t);if(a)return a;var i=getCtx(Ei,r);i.font="".concat(Ei,"px ").concat(t);var o=i.measureText(""),l=null==o?void 0:o.fontBoundingBoxAscent,c=Math.abs(null==o?void 0:o.fontBoundingBoxDescent);if(l){var u=l/(l+c);Ci.set(t,u);i.canvas.width=i.canvas.height=0;return u}i.strokeStyle="red";i.clearRect(0,0,Ei,Ei);i.strokeText("g",0,0);var d=i.getImageData(0,0,Ei,Ei).data;c=0;for(var h=d.length-1-3;h>=0;h-=4)if(d[h]>0){c=Math.ceil(h/4/Ei);break}i.clearRect(0,0,Ei,Ei);i.strokeText("A",0,Ei);l=0;for(var p=0,v=(d=i.getImageData(0,0,Ei,Ei).data).length;p<v;p+=4)if(d[p]>0){l=Ei-Math.floor(p/4/Ei);break}i.canvas.width=i.canvas.height=0;if(l){var y=l/(l+c);Ci.set(t,y);return y}Ci.set(t,Ii);return Ii}(p,t._isOffscreenCanvasSupported);if(0===c){d=l[4];h=l[5]-y}else{d=l[4]+y*Math.sin(c);h=l[5]-y*Math.cos(c)}var _="calc(var(--scale-factor)*",g=i.style;if(t._container===t._rootContainer){g.left="".concat((100*d/t._pageWidth).toFixed(2),"%");g.top="".concat((100*h/t._pageHeight).toFixed(2),"%")}else{g.left="".concat(_).concat(d.toFixed(2),"px)");g.top="".concat(_).concat(h.toFixed(2),"px)")}g.fontSize="".concat(_).concat(v.toFixed(2),"px)");g.fontFamily=p;o.fontSize=v;i.setAttribute("role","presentation");i.textContent=r.str;i.dir=r.dir;t._fontInspectorEnabled&&(i.dataset.fontName=u.fontSubstitutionLoadedName||r.fontName);0!==c&&(o.angle=c*(180/Math.PI));var m=!1;if(r.str.length>1)m=!0;else if(" "!==r.str&&r.transform[0]!==r.transform[3]){var b=Math.abs(r.transform[0]),w=Math.abs(r.transform[3]);b!==w&&Math.max(b,w)/Math.min(b,w)>1.5&&(m=!0)}m&&(o.canvasWidth=u.vertical?r.height:r.width);t._textDivProperties.set(i,o);t._isReadableStream&&t._layoutText(i)}function layout(t){var r=t.div,a=t.scale,i=t.properties,o=t.ctx,l=t.prevFontSize,c=t.prevFontFamily,u=r.style,d="";if(0!==i.canvasWidth&&i.hasText){var h=u.fontFamily,p=i.canvasWidth,v=i.fontSize;if(l!==v||c!==h){o.font="".concat(v*a,"px ").concat(h);t.prevFontSize=v;t.prevFontFamily=h}try{var y=o.measureText(r.textContent).width;y>0&&(d="scaleX(".concat(p*a/y,")"))}catch(t){}}0!==i.angle&&(d="rotate(".concat(i.angle,"deg) ").concat(d));d.length>0&&(u.transform=d)}var Ti=function(){function TextLayerRenderTask(t){var r,a=this,i=t.textContentSource,o=t.container,l=t.viewport,c=t.textDivs,u=t.textDivProperties,d=t.textContentItemsStr,h=t.isOffscreenCanvasSupported;!function text_layer_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,TextLayerRenderTask);this._textContentSource=i;this._isReadableStream=i instanceof ReadableStream;this._container=this._rootContainer=o;this._textDivs=c||[];this._textContentItemsStr=d||[];this._isOffscreenCanvasSupported=h;this._fontInspectorEnabled=!(null===(r=globalThis.FontInspector)||void 0===r||!r.enabled);this._reader=null;this._textDivProperties=u||new WeakMap;this._canceled=!1;this._capability=new pe;this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:l.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:getCtx(0,h)};var p=l.rawDims,v=p.pageWidth,y=p.pageHeight,_=p.pageX,g=p.pageY;this._transform=[1,0,0,-1,-_,g+y];this._pageWidth=v;this._pageHeight=y;setLayerDimensions(o,l);this._capability.promise.finally((function(){a._layoutTextParams=null})).catch((function(){}))}!function text_layer_createClass(t,r,a){r&&text_layer_defineProperties(t.prototype,r);a&&text_layer_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(TextLayerRenderTask,[{key:"promise",get:function get(){return this._capability.promise}},{key:"cancel",value:function cancel(){this._canceled=!0;if(this._reader){this._reader.cancel(new ce("TextLayer task cancelled.")).catch((function(){}));this._reader=null}this._capability.reject(new ce("TextLayer task cancelled."))}},{key:"_processItems",value:function _processItems(t,r){var a,i=text_layer_createForOfIteratorHelper(t);try{for(i.s();!(a=i.n()).done;){var o=a.value;if(void 0!==o.str){this._textContentItemsStr.push(o.str);appendText(this,o,r)}else if("beginMarkedContentProps"===o.type||"beginMarkedContent"===o.type){var l=this._container;this._container=document.createElement("span");this._container.classList.add("markedContent");null!==o.id&&this._container.setAttribute("id","".concat(o.id));l.append(this._container)}else"endMarkedContent"===o.type&&(this._container=this._container.parentNode)}}catch(t){i.e(t)}finally{i.f()}}},{key:"_layoutText",value:function _layoutText(t){var r=this._layoutTextParams.properties=this._textDivProperties.get(t);this._layoutTextParams.div=t;layout(this._layoutTextParams);r.hasText&&this._container.append(t);if(r.hasEOL){var a=document.createElement("br");a.setAttribute("role","presentation");this._container.append(a)}}},{key:"_render",value:function _render(){var t=this,r=new pe,a=Object.create(null);if(this._isReadableStream){this._reader=this._textContentSource.getReader();!function pump(){t._reader.read().then((function(i){var o=i.value;if(i.done)r.resolve();else{Object.assign(a,o.styles);t._processItems(o.items,a);pump()}}),r.reject)}()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');var i=this._textContentSource,o=i.items,l=i.styles;this._processItems(o,l);r.resolve()}r.promise.then((function(){a=null;!function render(t){if(!t._canceled){var r=t._textDivs,a=t._capability;if(r.length>1e5)a.resolve();else{if(!t._isReadableStream){var i,o=text_layer_createForOfIteratorHelper(r);try{for(o.s();!(i=o.n()).done;){var l=i.value;t._layoutText(l)}}catch(t){o.e(t)}finally{o.f()}}a.resolve()}}}(t)}),this._capability.reject)}}]);return TextLayerRenderTask}();function renderTextLayer(t){var r=new Ti(t);r._render();return r}function updateTextLayer(t){var r=t.container,a=t.viewport,i=t.textDivs,o=t.textDivProperties,l=t.isOffscreenCanvasSupported,c=t.mustRotate,u=void 0===c||c,d=t.mustRescale,h=void 0===d||d;u&&setLayerDimensions(r,{rotation:a.rotation});if(h){var p,v=getCtx(0,l),y={prevFontSize:null,prevFontFamily:null,div:null,scale:a.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:v},_=text_layer_createForOfIteratorHelper(i);try{for(_.s();!(p=_.n()).done;){var g=p.value;y.properties=o.get(g);y.div=g;layout(y)}}catch(t){_.e(t)}finally{_.f()}}}__webpack_require__(7262),__webpack_require__(7335),__webpack_require__(5404),__webpack_require__(9718),__webpack_require__(9099),__webpack_require__(5621),__webpack_require__(3281),__webpack_require__(8984),__webpack_require__(8497);function scripting_utils_typeof(t){return scripting_utils_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},scripting_utils_typeof(t)}function scripting_utils_slicedToArray(t,r){return function scripting_utils_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function scripting_utils_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||function scripting_utils_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return scripting_utils_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return scripting_utils_arrayLikeToArray(t,r)}(t,r)||function scripting_utils_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function scripting_utils_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function scripting_utils_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,scripting_utils_toPropertyKey(i.key),i)}}function scripting_utils_toPropertyKey(t){var r=function scripting_utils_toPrimitive(t,r){if("object"!=scripting_utils_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=scripting_utils_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==scripting_utils_typeof(r)?r:String(r)}function makeColorComp(t){return Math.floor(255*Math.max(0,Math.min(1,t))).toString(16).padStart(2,"0")}function scaleAndClamp(t){return Math.max(0,Math.min(255,255*t))}var Mi=function(){function ColorConverters(){!function scripting_utils_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,ColorConverters)}!function scripting_utils_createClass(t,r,a){r&&scripting_utils_defineProperties(t.prototype,r);a&&scripting_utils_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(ColorConverters,null,[{key:"CMYK_G",value:function CMYK_G(t){var r=scripting_utils_slicedToArray(t,4),a=r[0],i=r[1],o=r[2],l=r[3];return["G",1-Math.min(1,.3*a+.59*o+.11*i+l)]}},{key:"G_CMYK",value:function G_CMYK(t){return["CMYK",0,0,0,1-scripting_utils_slicedToArray(t,1)[0]]}},{key:"G_RGB",value:function G_RGB(t){var r=scripting_utils_slicedToArray(t,1)[0];return["RGB",r,r,r]}},{key:"G_rgb",value:function G_rgb(t){var r=scripting_utils_slicedToArray(t,1)[0];return[r=scaleAndClamp(r),r,r]}},{key:"G_HTML",value:function G_HTML(t){var r=makeColorComp(scripting_utils_slicedToArray(t,1)[0]);return"#".concat(r).concat(r).concat(r)}},{key:"RGB_G",value:function RGB_G(t){var r=scripting_utils_slicedToArray(t,3);return["G",.3*r[0]+.59*r[1]+.11*r[2]]}},{key:"RGB_rgb",value:function RGB_rgb(t){return t.map(scaleAndClamp)}},{key:"RGB_HTML",value:function RGB_HTML(t){return"#".concat(t.map(makeColorComp).join(""))}},{key:"T_HTML",value:function T_HTML(){return"#00000000"}},{key:"T_rgb",value:function T_rgb(){return[null]}},{key:"CMYK_RGB",value:function CMYK_RGB(t){var r=scripting_utils_slicedToArray(t,4),a=r[0],i=r[1],o=r[2],l=r[3];return["RGB",1-Math.min(1,a+l),1-Math.min(1,o+l),1-Math.min(1,i+l)]}},{key:"CMYK_rgb",value:function CMYK_rgb(t){var r=scripting_utils_slicedToArray(t,4),a=r[0],i=r[1],o=r[2],l=r[3];return[scaleAndClamp(1-Math.min(1,a+l)),scaleAndClamp(1-Math.min(1,o+l)),scaleAndClamp(1-Math.min(1,i+l))]}},{key:"CMYK_HTML",value:function CMYK_HTML(t){var r=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(r)}},{key:"RGB_CMYK",value:function RGB_CMYK(t){var r=scripting_utils_slicedToArray(t,3),a=1-r[0],i=1-r[1],o=1-r[2];return["CMYK",a,i,o,Math.min(a,i,o)]}}]);return ColorConverters}();function xfa_layer_typeof(t){return xfa_layer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xfa_layer_typeof(t)}function xfa_layer_slicedToArray(t,r){return function xfa_layer_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function xfa_layer_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||xfa_layer_unsupportedIterableToArray(t,r)||function xfa_layer_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xfa_layer_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=xfa_layer_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function xfa_layer_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return xfa_layer_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?xfa_layer_arrayLikeToArray(t,r):void 0}}function xfa_layer_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function xfa_layer_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,xfa_layer_toPropertyKey(i.key),i)}}function xfa_layer_toPropertyKey(t){var r=function xfa_layer_toPrimitive(t,r){if("object"!=xfa_layer_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=xfa_layer_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==xfa_layer_typeof(r)?r:String(r)}var Oi=function(){function XfaLayer(){!function xfa_layer_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,XfaLayer)}!function xfa_layer_createClass(t,r,a){r&&xfa_layer_defineProperties(t.prototype,r);a&&xfa_layer_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(XfaLayer,null,[{key:"setupStorage",value:function setupStorage(t,r,a,i,o){var l=window.getFormValueFromAngular(t);l.value&&i.setValue(r,l);var c=l.value?l:i.getValue(r,{value:null});window.registerXFAField(t,c);t.addEventListener("updateFromAngular",(function(t){return i.setValue(r,{value:t.detail})}));switch(a.name){case"textarea":null!==c.value&&(t.textContent=c.value);if("print"===o)break;t.addEventListener("input",(function(a){window.updateAngularFormValue(t,{value:a.target.value});i.setValue(r,{value:a.target.value})}));break;case"input":if("radio"===a.attributes.type||"checkbox"===a.attributes.type){c.value===a.attributes.xfaOn?t.setAttribute("checked",!0):t.removeAttribute("checked");if("print"===o)break;t.addEventListener("change",(function(a){window.updateAngularFormValue(t,{value:a.target.checked?a.target.getAttribute("xfaOn"):a.target.getAttribute("xfaOff")});i.setValue(r,{value:a.target.checked?a.target.getAttribute("xfaOn"):a.target.getAttribute("xfaOff")})}))}else{null!==c.value&&t.setAttribute("value",c.value);if("print"===o)break;t.addEventListener("input",(function(a){window.updateAngularFormValue(t,{value:a.target.value});i.setValue(r,{value:a.target.value})}))}break;case"select":if(null!==c.value){t.setAttribute("value",c.value);var u,d=xfa_layer_createForOfIteratorHelper(a.children);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.attributes.value===c.value?h.attributes.selected=!0:h.attributes.hasOwnProperty("selected")&&delete h.attributes.selected}}catch(t){d.e(t)}finally{d.f()}}t.addEventListener("input",(function(a){var o=a.target.options,l=-1===o.selectedIndex?"":o[o.selectedIndex].value;window.updateAngularFormValue(t,{value:l});i.setValue(r,{value:l})}))}}},{key:"setAttributes",value:function setAttributes(t){var r=t.html,a=t.element,i=t.storage,o=void 0===i?null:i,l=t.intent,c=t.linkService,u=a.attributes,d=r instanceof HTMLAnchorElement;"radio"===u.type&&(u.name="".concat(u.name,"-").concat(l));for(var h=0,p=Object.entries(u);h<p.length;h++){var v=xfa_layer_slicedToArray(p[h],2),y=v[0],_=v[1];if(null!=_)switch(y){case"class":_.length&&r.setAttribute(y,_.join(" "));break;case"dataId":break;case"id":r.setAttribute("data-element-id",_);break;case"style":Object.assign(r.style,_);break;case"textContent":r.textContent=_;break;default:(!d||"href"!==y&&"newWindow"!==y)&&r.setAttribute(y,_)}}d&&c.addLinkAttributes(r,u.href,u.newWindow);o&&u.dataId&&this.setupStorage(r,u.dataId,a,o)}},{key:"render",value:function render(t){var r=t.annotationStorage,a=t.linkService,i=t.xfaHtml,o=t.intent||"display",l=document.createElement(i.name);i.attributes&&this.setAttributes({html:l,element:i,intent:o,linkService:a});var c="richText"!==o,u=t.div;u.append(l);if(t.viewport){var d="matrix(".concat(t.viewport.transform.join(","),")");u.style.transform=d}c&&u.setAttribute("class","xfaLayer xfaFont");var h=[];if(0===i.children.length){if(i.value){var p=document.createTextNode(i.value);l.append(p);c&&Ua.shouldBuildText(i.name)&&h.push(p)}return{textDivs:h}}for(var v=[[i,-1,l]];v.length>0;){var y,_,g=xfa_layer_slicedToArray(v.at(-1),3),m=g[0],b=g[1],w=g[2];if(b+1!==m.children.length){var P=m.children[++v.at(-1)[1]];if(null!==P){var k=P.name;if("#text"!==k){var A=null!=P&&null!==(y=P.attributes)&&void 0!==y&&y.xmlns?document.createElementNS(P.attributes.xmlns,k):document.createElement(k);w.append(A);P.attributes&&this.setAttributes({html:A,element:P,storage:r,intent:o,linkService:a});if((null===(_=P.children)||void 0===_?void 0:_.length)>0)v.push([P,-1,A]);else if(P.value){var S=document.createTextNode(P.value);c&&Ua.shouldBuildText(k)&&h.push(S);A.append(S)}}else{var x=document.createTextNode(P.value);h.push(x);w.append(x)}}}else v.pop()}var E,I=xfa_layer_createForOfIteratorHelper(u.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"));try{for(I.s();!(E=I.n()).done;){E.value.setAttribute("readOnly",!0)}}catch(t){I.e(t)}finally{I.f()}return{textDivs:h}}},{key:"update",value:function update(t){var r="matrix(".concat(t.viewport.transform.join(","),")");t.div.style.transform=r;t.div.hidden=!1}}]);return XfaLayer}();function annotation_layer_typeof(t){return annotation_layer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},annotation_layer_typeof(t)}function annotation_layer_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */annotation_layer_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==annotation_layer_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(annotation_layer_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function annotation_layer_asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function annotation_layer_get(){annotation_layer_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,a){var i=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=annotation_layer_getPrototypeOf(t)););return t}(t,r);if(i){var o=Object.getOwnPropertyDescriptor(i,r);return o.get?o.get.call(arguments.length<3?t:a):o.value}};return annotation_layer_get.apply(this,arguments)}function annotation_layer_toConsumableArray(t){return function annotation_layer_arrayWithoutHoles(t){if(Array.isArray(t))return annotation_layer_arrayLikeToArray(t)}(t)||function annotation_layer_iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||annotation_layer_unsupportedIterableToArray(t)||function annotation_layer_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function annotation_layer_inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&annotation_layer_setPrototypeOf(t,r)}function annotation_layer_setPrototypeOf(t,r){annotation_layer_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return annotation_layer_setPrototypeOf(t,r)}function annotation_layer_createSuper(t){var r=function annotation_layer_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=annotation_layer_getPrototypeOf(t);if(r){var o=annotation_layer_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function annotation_layer_possibleConstructorReturn(t,r){if(r&&("object"===annotation_layer_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return annotation_layer_assertThisInitialized(t)}(this,a)}}function annotation_layer_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function annotation_layer_getPrototypeOf(t){annotation_layer_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return annotation_layer_getPrototypeOf(t)}function annotation_layer_classPrivateMethodInitSpec(t,r){annotation_layer_checkPrivateRedeclaration(t,r);r.add(t)}function annotation_layer_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function annotation_layer_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=annotation_layer_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function annotation_layer_slicedToArray(t,r){return function annotation_layer_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function annotation_layer_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||annotation_layer_unsupportedIterableToArray(t,r)||function annotation_layer_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function annotation_layer_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return annotation_layer_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?annotation_layer_arrayLikeToArray(t,r):void 0}}function annotation_layer_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function annotation_layer_defineProperty(t,r,a){(r=annotation_layer_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function annotation_layer_classPrivateFieldInitSpec(t,r,a){annotation_layer_checkPrivateRedeclaration(t,r);r.set(t,a)}function annotation_layer_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function annotation_layer_classPrivateFieldGet(t,r){return function annotation_layer_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,annotation_layer_classExtractFieldDescriptor(t,r,"get"))}function annotation_layer_classPrivateFieldSet(t,r,a){!function annotation_layer_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,annotation_layer_classExtractFieldDescriptor(t,r,"set"),a);return a}function annotation_layer_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function annotation_layer_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function annotation_layer_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,annotation_layer_toPropertyKey(i.key),i)}}function annotation_layer_createClass(t,r,a){r&&annotation_layer_defineProperties(t.prototype,r);a&&annotation_layer_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function annotation_layer_toPropertyKey(t){var r=function annotation_layer_toPrimitive(t,r){if("object"!=annotation_layer_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=annotation_layer_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==annotation_layer_typeof(r)?r:String(r)}var Gi=1e3,Ri=new WeakSet;function getRectDims(t){return{width:t[2]-t[0],height:t[3]-t[1]}}var Li=function(){function AnnotationElementFactory(){annotation_layer_classCallCheck(this,AnnotationElementFactory)}annotation_layer_createClass(AnnotationElementFactory,null,[{key:"create",value:function create(t){switch(t.data.annotationType){case I:return new zi(t);case E:return new Hi(t);case q:switch(t.data.fieldType){case"Tx":return new qi(t);case"Btn":return t.data.radioButton?new Yi(t):t.data.checkBox?new Ki(t):new Xi(t);case"Ch":return new $i(t);case"Sig":return new Vi(t)}return new Ui(t);case H:return new Ji(t);case C:return new wo(t);case T:return new ko(t);case M:return new So(t);case O:return new Fo(t);case R:return new Io(t);case B:return new To(t);case z:return new Oo(t);case G:return new Co(t);case L:return new Go(t);case D:return new Ro(t);case j:return new Lo(t);case W:return new Do(t);case N:return new jo(t);case U:return new Bo(t);default:return new ji(t)}}}]);return AnnotationElementFactory}(),Di=new WeakMap,ji=function(){function AnnotationElement(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.isRenderable,i=void 0!==a&&a,o=r.ignoreBorder,l=void 0!==o&&o,c=r.createQuadrilaterals,u=void 0!==c&&c;annotation_layer_classCallCheck(this,AnnotationElement);annotation_layer_classPrivateFieldInitSpec(this,Di,{writable:!0,value:!1});this.isRenderable=i;this.data=t.data;this.layer=t.layer;this.linkService=t.linkService;this.downloadManager=t.downloadManager;this.imageResourcesPath=t.imageResourcesPath;this.renderForms=t.renderForms;this.svgFactory=t.svgFactory;this.annotationStorage=t.annotationStorage;this.enableScripting=t.enableScripting;this.hasJSActions=t.hasJSActions;this._fieldObjects=t.fieldObjects;this.parent=t.parent;i&&(this.container=this._createContainer(l));u&&this._createQuadrilaterals()}annotation_layer_createClass(AnnotationElement,[{key:"hasPopupData",get:function get(){return AnnotationElement._hasPopupData(this.data)}},{key:"_createContainer",value:function _createContainer(t){var r=this.data,a=this.parent,i=a.page,o=a.viewport,l=document.createElement("section");l.setAttribute("data-annotation-id",r.id);this instanceof Ui||(l.tabIndex=Gi);l.style.zIndex=this.parent.zIndex++;this.data.popupRef&&l.setAttribute("aria-haspopup","dialog");r.noRotate&&l.classList.add("norotate");var c=o.rawDims,u=c.pageWidth,d=c.pageHeight,h=c.pageX,p=c.pageY;if(!r.rect||this instanceof Ji){var v=r.rotation;r.hasOwnCanvas||0===v||this.setRotation(v,l);return l}var y=getRectDims(r.rect),_=y.width,g=y.height,m=he.normalizeRect([r.rect[0],i.view[3]-r.rect[1]+i.view[1],r.rect[2],i.view[3]-r.rect[3]+i.view[1]]);if(!t&&r.borderStyle.width>0){l.style.borderWidth="".concat(r.borderStyle.width,"px");var b=r.borderStyle.horizontalCornerRadius,w=r.borderStyle.verticalCornerRadius;if(b>0||w>0){var P="calc(".concat(b,"px * var(--scale-factor)) / calc(").concat(w,"px * var(--scale-factor))");l.style.borderRadius=P}else if(this instanceof Yi){var k="calc(".concat(_,"px * var(--scale-factor)) / calc(").concat(g,"px * var(--scale-factor))");l.style.borderRadius=k}switch(r.borderStyle.style){case V:l.style.borderStyle="solid";break;case K:l.style.borderStyle="dashed";break;case Y:warn("Unimplemented border style: beveled");break;case X:warn("Unimplemented border style: inset");break;case $:l.style.borderBottomStyle="solid"}var A=r.borderColor||null;if(A){annotation_layer_classPrivateFieldSet(this,Di,!0);l.style.borderColor=he.makeHexColor(0|A[0],0|A[1],0|A[2])}else l.style.borderWidth=0}l.style.left="".concat(100*(m[0]-h)/u,"%");l.style.top="".concat(100*(m[1]-p)/d,"%");var S=r.rotation;if(r.hasOwnCanvas||0===S){l.style.width="".concat(100*_/u,"%");l.style.height="".concat(100*g/d,"%")}else this.setRotation(S,l);return l}},{key:"setRotation",value:function setRotation(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;if(this.data.rect){var a,i,o=this.parent.viewport.rawDims,l=o.pageWidth,c=o.pageHeight,u=getRectDims(this.data.rect),d=u.width,h=u.height;if(t%180==0){a=100*d/l;i=100*h/c}else{a=100*h/l;i=100*d/c}r.style.width="".concat(a,"%");r.style.height="".concat(i,"%");r.setAttribute("data-main-rotation",(360-t)%360)}}},{key:"_commonActions",get:function get(){var t=this,r=function setColor(r,a,i){var o=i.detail[r],l=o[0],c=o.slice(1);i.target.style[a]=Mi["".concat(l,"_HTML")](c);t.annotationStorage.setValue(t.data.id,annotation_layer_defineProperty({},a,Mi["".concat(l,"_rgb")](c)))};return shadow(this,"_commonActions",{display:function display(r){var display=r.detail.display,a=display%2==1;t.container.style.visibility=a?"hidden":"visible";t.annotationStorage.setValue(t.data.id,{noView:a,noPrint:1===display||2===display})},print:function print(r){t.annotationStorage.setValue(t.data.id,{noPrint:!r.detail.print})},hidden:function hidden(r){var hidden=r.detail.hidden;t.container.style.visibility=hidden?"hidden":"visible";t.annotationStorage.setValue(t.data.id,{noPrint:hidden,noView:hidden})},focus:function focus(t){setTimeout((function(){return t.target.focus({preventScroll:!1})}),0)},userName:function userName(t){t.target.title=t.detail.userName},readonly:function readonly(t){t.target.disabled=t.detail.readonly},required:function required(r){t._setRequired(r.target,r.detail.required)},bgColor:function bgColor(t){r("bgColor","backgroundColor",t)},fillColor:function fillColor(t){r("fillColor","backgroundColor",t)},fgColor:function fgColor(t){r("fgColor","color",t)},textColor:function textColor(t){r("textColor","color",t)},borderColor:function borderColor(t){r("borderColor","borderColor",t)},strokeColor:function strokeColor(t){r("strokeColor","borderColor",t)},rotation:function rotation(r){var a=r.detail.rotation;t.setRotation(a);t.annotationStorage.setValue(t.data.id,{rotation:a})}})}},{key:"_dispatchEventFromSandbox",value:function _dispatchEventFromSandbox(t,r){for(var a=this._commonActions,i=0,o=Object.keys(r.detail);i<o.length;i++){var l=o[i],c=t[l]||a[l];null==c||c(r)}}},{key:"_setDefaultPropertiesFromJS",value:function _setDefaultPropertiesFromJS(t){if(this.enableScripting){var r=this.annotationStorage.getRawValue(this.data.id);if(r)for(var a=this._commonActions,i=0,o=Object.entries(r);i<o.length;i++){var l=annotation_layer_slicedToArray(o[i],2),c=l[0],u=l[1],d=a[c];if(d){d({detail:annotation_layer_defineProperty({},c,u),target:t});delete r[c]}}}}},{key:"_createQuadrilaterals",value:function _createQuadrilaterals(){if(this.container){var t=this.data.quadPoints;if(t){var r=annotation_layer_slicedToArray(this.data.rect,4),a=r[0],i=r[1],o=r[2],l=r[3];if(1===t.length){var c=annotation_layer_slicedToArray(t[0],3),u=c[1],d=u.x,h=u.y,p=c[2],v=p.x,y=p.y;if(o===d&&l===h&&a===v&&i===y)return}var _,g=this.container.style;if(annotation_layer_classPrivateFieldGet(this,Di)){var m=g.borderColor,b=g.borderWidth;g.borderWidth=0;_=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">','<g fill="transparent" stroke="'.concat(m,'" stroke-width="').concat(b,'">')];this.container.classList.add("hasBorder")}var w=o-a,P=l-i,k=this.svgFactory,A=k.createElement("svg");A.classList.add("quadrilateralsContainer");A.setAttribute("width",0);A.setAttribute("height",0);var S=k.createElement("defs");A.append(S);var x=k.createElement("clipPath"),E="clippath_".concat(this.data.id);x.setAttribute("id",E);x.setAttribute("clipPathUnits","objectBoundingBox");S.append(x);var I,C=annotation_layer_createForOfIteratorHelper(t);try{for(C.s();!(I=C.n()).done;){var T,M=annotation_layer_slicedToArray(I.value,3),O=M[1],G=O.x,R=O.y,L=M[2],D=L.x,j=L.y,W=k.createElement("rect"),N=(D-a)/w,B=(l-R)/P,z=(G-D)/w,H=(R-j)/P;W.setAttribute("x",N);W.setAttribute("y",B);W.setAttribute("width",z);W.setAttribute("height",H);x.append(W);null===(T=_)||void 0===T||T.push('<rect vector-effect="non-scaling-stroke" x="'.concat(N,'" y="').concat(B,'" width="').concat(z,'" height="').concat(H,'"/>'))}}catch(t){C.e(t)}finally{C.f()}if(annotation_layer_classPrivateFieldGet(this,Di)){_.push("</g></svg>')");g.backgroundImage=_.join("")}this.container.append(A);this.container.style.clipPath="url(#".concat(E,")")}}}},{key:"_createPopup",value:function _createPopup(){var t=this.container,r=this.data;t.setAttribute("aria-haspopup","dialog");var a=new Ji({data:{color:r.color,titleObj:r.titleObj,modificationDate:r.modificationDate,contentsObj:r.contentsObj,richText:r.richText,parentRect:r.rect,borderStyle:0,id:"popup_".concat(r.id),rotation:r.rotation},parent:this.parent,elements:[this]});this.parent.div.append(a.render())}},{key:"render",value:function render(){unreachable("Abstract method `AnnotationElement.render` called")}},{key:"_getElementsByName",value:function _getElementsByName(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=[];if(this._fieldObjects){var i=this._fieldObjects[t];if(i){var o,l=annotation_layer_createForOfIteratorHelper(i);try{for(l.s();!(o=l.n()).done;){var c=o.value,u=c.page,d=c.id,h=c.exportValues;if(-1!==u&&d!==r){var p="string"==typeof h?h:null,v=document.querySelector('[data-element-id="'.concat(d,'"]'));!v||Ri.has(v)?a.push({id:d,exportValue:p,domElement:v}):warn("_getElementsByName - element not allowed: ".concat(d))}}}catch(t){l.e(t)}finally{l.f()}}return a}var y,_=annotation_layer_createForOfIteratorHelper(document.getElementsByName(t));try{for(_.s();!(y=_.n()).done;){var g=y.value,m=g.exportValue,b=g.getAttribute("data-element-id");b!==r&&(Ri.has(g)&&a.push({id:b,exportValue:m,domElement:g}))}}catch(t){_.e(t)}finally{_.f()}return a}},{key:"show",value:function show(){var t;this.container&&(this.container.hidden=!1);null===(t=this.popup)||void 0===t||t.maybeShow()}},{key:"hide",value:function hide(){var t;this.container&&(this.container.hidden=!0);null===(t=this.popup)||void 0===t||t.forceHide()}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return this.container}},{key:"addHighlightArea",value:function addHighlightArea(){var t=this.getElementsToTriggerPopup();if(Array.isArray(t)){var r,a=annotation_layer_createForOfIteratorHelper(t);try{for(a.s();!(r=a.n()).done;){r.value.classList.add("highlightArea")}}catch(t){a.e(t)}finally{a.f()}}else t.classList.add("highlightArea")}},{key:"_isEditable",get:function get(){return!1}},{key:"_editOnDoubleClick",value:function _editOnDoubleClick(){var t=this;if(this._isEditable){var r=this.annotationEditorType,a=this.data.id;this.container.addEventListener("dblclick",(function(){var i;null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("switchannotationeditormode",{source:t,mode:r,editId:a})}))}}}],[{key:"_hasPopupData",value:function _hasPopupData(t){var r=t.titleObj,a=t.contentsObj,i=t.richText;return!!(null!=r&&r.str||null!=a&&a.str||null!=i&&i.str)}}]);return AnnotationElement}(),Wi=new WeakSet,Ni=new WeakSet,Bi=new WeakSet,zi=function(t){annotation_layer_inherits(LinkAnnotationElement,t);var r=annotation_layer_createSuper(LinkAnnotationElement);function LinkAnnotationElement(t){var a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;annotation_layer_classCallCheck(this,LinkAnnotationElement);annotation_layer_classPrivateMethodInitSpec(annotation_layer_assertThisInitialized(a=r.call(this,t,{isRenderable:!0,ignoreBorder:!(null==i||!i.ignoreBorder),createQuadrilaterals:!0})),Bi);annotation_layer_classPrivateMethodInitSpec(annotation_layer_assertThisInitialized(a),Ni);annotation_layer_classPrivateMethodInitSpec(annotation_layer_assertThisInitialized(a),Wi);a.isTooltipOnly=t.data.isTooltipOnly;return a}annotation_layer_createClass(LinkAnnotationElement,[{key:"render",value:function render(){var t=this.data,r=this.linkService,a=document.createElement("a");a.setAttribute("data-element-id",t.id);var i=!1;if(t.url){r.addLinkAttributes(a,t.url,t.newWindow);i=!0}else if(t.action){this._bindNamedAction(a,t.action);i=!0}else if(t.attachment){annotation_layer_classPrivateMethodGet(this,Ni,_bindAttachment2).call(this,a,t.attachment,t.attachmentDest);i=!0}else if(t.setOCGState){annotation_layer_classPrivateMethodGet(this,Bi,_bindSetOCGState2).call(this,a,t.setOCGState);i=!0}else if(t.dest){this._bindLink(a,t.dest);i=!0}else{if(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions){this._bindJSAction(a,t);i=!0}if(t.resetForm){this._bindResetFormAction(a,t.resetForm);i=!0}else if(this.isTooltipOnly&&!i){this._bindLink(a,"");i=!0}}this.container.classList.add("linkAnnotation");i&&this.container.append(a);return this.container}},{key:"_bindLink",value:function _bindLink(t,r){var a=this;t.href=this.linkService.getDestinationHash(r);t.onclick=function(){r&&a.linkService.goToDestination(r);return!1};(r||""===r)&&annotation_layer_classPrivateMethodGet(this,Wi,_setInternalLink2).call(this)}},{key:"_bindNamedAction",value:function _bindNamedAction(t,r){var a=this;t.href=this.linkService.getAnchorUrl("");t.onclick=function(){a.linkService.executeNamedAction(r);return!1};annotation_layer_classPrivateMethodGet(this,Wi,_setInternalLink2).call(this)}},{key:"_bindJSAction",value:function _bindJSAction(t,r){var a=this;t.href=this.linkService.getAnchorUrl("");for(var i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),o=function _loop(){var o=c[l],u=i.get(o);if(!u)return 1;t[u]=function(){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:r.id,name:o}});return!1}},l=0,c=Object.keys(r.actions);l<c.length;l++)o();t.onclick||(t.onclick=function(){return!1});annotation_layer_classPrivateMethodGet(this,Wi,_setInternalLink2).call(this)}},{key:"_bindResetFormAction",value:function _bindResetFormAction(t,r){var a=this,i=t.onclick;i||(t.href=this.linkService.getAnchorUrl(""));annotation_layer_classPrivateMethodGet(this,Wi,_setInternalLink2).call(this);if(this._fieldObjects)t.onclick=function(){null==i||i();var t=r.fields,o=r.refs,l=r.include,c=[];if(0!==t.length||0!==o.length){var u,d=new Set(o),h=annotation_layer_createForOfIteratorHelper(t);try{for(h.s();!(u=h.n()).done;){var p,v=u.value,y=annotation_layer_createForOfIteratorHelper(a._fieldObjects[v]||[]);try{for(y.s();!(p=y.n()).done;){var _=p.value.id;d.add(_)}}catch(t){y.e(t)}finally{y.f()}}}catch(t){h.e(t)}finally{h.f()}for(var g=0,m=Object.values(a._fieldObjects);g<m.length;g++){var b,w=annotation_layer_createForOfIteratorHelper(m[g]);try{for(w.s();!(b=w.n()).done;){var P=b.value;d.has(P.id)===l&&c.push(P)}}catch(t){w.e(t)}finally{w.f()}}}else for(var k=0,A=Object.values(a._fieldObjects);k<A.length;k++){var S=A[k];c.push.apply(c,annotation_layer_toConsumableArray(S))}for(var x=a.annotationStorage,E=[],I=0,C=c;I<C.length;I++){var T=C[I],M=T.id;E.push(M);switch(T.type){case"text":var O=T.defaultValue||"";x.setValue(M,{value:O});window.updateAngularFormValue(M,{value:O});break;case"checkbox":case"radiobutton":var G=T.defaultValue===T.exportValues;x.setValue(M,{value:G});window.updateAngularFormValue(M,{value:G});break;case"combobox":case"listbox":var R=T.defaultValue||"";x.setValue(M,{value:R});window.updateAngularFormValue(M,{value:R});break;default:continue}var L=document.querySelector('[data-element-id="'.concat(M,'"]'));L&&(Ri.has(L)?L.dispatchEvent(new Event("resetform")):warn("_bindResetFormAction - element not allowed: ".concat(M)))}if(a.enableScripting){var D;null===(D=a.linkService.eventBus)||void 0===D||D.dispatch("dispatcheventinsandbox",{source:a,detail:{id:"app",ids:E,name:"ResetForm"}})}return!1};else{warn('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.');i||(t.onclick=function(){return!1})}}}]);return LinkAnnotationElement}(ji);function _setInternalLink2(){this.container.setAttribute("data-internal-link","")}function _bindAttachment2(t,r){var a=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t.href=this.linkService.getAnchorUrl("");t.onclick=function(){var t;null===(t=a.downloadManager)||void 0===t||t.openOrDownloadData(r.content,r.filename,i);return!1};annotation_layer_classPrivateMethodGet(this,Wi,_setInternalLink2).call(this)}function _bindSetOCGState2(t,r){var a=this;t.href=this.linkService.getAnchorUrl("");t.onclick=function(){a.linkService.executeSetOCGState(r);return!1};annotation_layer_classPrivateMethodGet(this,Wi,_setInternalLink2).call(this)}var Hi=function(t){annotation_layer_inherits(TextAnnotationElement,t);var r=annotation_layer_createSuper(TextAnnotationElement);function TextAnnotationElement(t){annotation_layer_classCallCheck(this,TextAnnotationElement);return r.call(this,t,{isRenderable:!0})}annotation_layer_createClass(TextAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("textAnnotation");var t=document.createElement("img");t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg";t.setAttribute("data-l10n-id","pdfjs-text-annotation-type");t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name}));!this.data.popupRef&&this.hasPopupData&&this._createPopup();this.container.append(t);return this.container}}]);return TextAnnotationElement}(ji),Ui=function(t){annotation_layer_inherits(WidgetAnnotationElement,t);var r=annotation_layer_createSuper(WidgetAnnotationElement);function WidgetAnnotationElement(){annotation_layer_classCallCheck(this,WidgetAnnotationElement);return r.apply(this,arguments)}annotation_layer_createClass(WidgetAnnotationElement,[{key:"render",value:function render(){this.data.alternativeText&&(this.container.title=this.data.alternativeText);return this.container}},{key:"showElementAndHideCanvas",value:function showElementAndHideCanvas(t){if(this.data.hasOwnCanvas){var r;"CANVAS"===(null===(r=t.previousSibling)||void 0===r?void 0:r.nodeName)&&(t.previousSibling.hidden=!0);t.hidden=!1}}},{key:"_getKeyModifier",value:function _getKeyModifier(t){return ue.platform.isMac?t.metaKey:t.ctrlKey}},{key:"_setEventListener",value:function _setEventListener(t,r,a,i,o){var l=this;a.includes("mouse")?t.addEventListener(a,(function(t){var r;null===(r=l.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:l,detail:{id:l.data.id,name:i,value:o(t),shift:t.shiftKey,modifier:l._getKeyModifier(t)}})})):t.addEventListener(a,(function(t){var c;if("blur"===a){if(!r.focused||!t.relatedTarget)return;r.focused=!1}else if("focus"===a){if(r.focused)return;r.focused=!0}o&&(null===(c=l.linkService.eventBus)||void 0===c||c.dispatch("dispatcheventinsandbox",{source:l,detail:{id:l.data.id,name:i,value:o(t)}}))}))}},{key:"_setEventListeners",value:function _setEventListeners(t,r,a,i){var o,l=annotation_layer_createForOfIteratorHelper(a);try{for(l.s();!(o=l.n()).done;){var c,u=annotation_layer_slicedToArray(o.value,2),d=u[0],h=u[1];if("Action"===h||null!==(c=this.data.actions)&&void 0!==c&&c[h]){var p,v;"Focus"!==h&&"Blur"!==h||r||(r={focused:!1});this._setEventListener(t,r,d,h,i);"Focus"!==h||null!==(p=this.data.actions)&&void 0!==p&&p.Blur?"Blur"!==h||null!==(v=this.data.actions)&&void 0!==v&&v.Focus||this._setEventListener(t,r,"focus","Focus",null):this._setEventListener(t,r,"blur","Blur",null)}}}catch(t){l.e(t)}finally{l.f()}}},{key:"_setBackgroundColor",value:function _setBackgroundColor(t){var r=this.data.backgroundColor||null;t.style.backgroundColor=null===r?"transparent":he.makeHexColor(r[0],r[1],r[2])}},{key:"_setTextStyle",value:function _setTextStyle(t){var r,a=this.data.defaultAppearanceData.fontColor,i=this.data.defaultAppearanceData.fontSize||9,l=t.style,c=function roundToOneDecimal(t){return Math.round(10*t)/10};if(this.data.multiLine){var u=Math.abs(this.data.rect[3]-this.data.rect[1]-2),d=u/(Math.round(u/(o*i))||1);r=Math.min(i,c(d/o))}else{var h=Math.abs(this.data.rect[3]-this.data.rect[1]-2);r=Math.min(i,c(h/o))}l.fontSize="calc(".concat(r,"px * var(--scale-factor))");l.color=he.makeHexColor(a[0],a[1],a[2]);null!==this.data.textAlignment&&(l.textAlign=["left","center","right"][this.data.textAlignment])}},{key:"_setRequired",value:function _setRequired(t,r){r?t.setAttribute("required",!0):t.removeAttribute("required");t.setAttribute("aria-required",r)}}]);return WidgetAnnotationElement}(ji),qi=function(t){annotation_layer_inherits(TextWidgetAnnotationElement,t);var r=annotation_layer_createSuper(TextWidgetAnnotationElement);function TextWidgetAnnotationElement(t){annotation_layer_classCallCheck(this,TextWidgetAnnotationElement);var a=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;return r.call(this,t,{isRenderable:a})}annotation_layer_createClass(TextWidgetAnnotationElement,[{key:"setPropertyOnSiblings",value:function setPropertyOnSiblings(t,r,a,i){var o,l=this.annotationStorage,c=annotation_layer_createForOfIteratorHelper(this._getElementsByName(t.name,t.id));try{for(c.s();!(o=c.n()).done;){var u=o.value;u.domElement&&(u.domElement[r]=a);l.setValue(u.id,annotation_layer_defineProperty({},i,a))}}catch(t){c.e(t)}finally{c.f()}}},{key:"render",value:function render(){var t=this,r=this.annotationStorage,a=this.data.id;this.container.classList.add("textWidgetAnnotation");var i=null;if(this.renderForms){var o,l=window.getFormValueFromAngular(this.data.fieldName),c=r.getValue(a,{value:this.data.fieldValue}),u=l.value?l:c;l!==c&&r.setValue(a,{value:l.value});var d=u.value||"",h=r.getValue(a,{charLimit:this.data.maxLen}).charLimit;h&&d.length>h&&(d=d.slice(0,h));var p=u.formattedValue||(null===(o=this.data.textContent)||void 0===o?void 0:o.join("\n"))||null;p&&this.data.comb&&(p=p.replaceAll(/\s+/g,""));var v={userValue:d,formattedValue:p,lastCommittedValue:null,commitKey:1,focused:!1};if(this.data.multiLine){var y;(i=document.createElement("textarea")).textContent=null!==(y=p)&&void 0!==y?y:d;this.data.doNotScroll&&(i.style.overflowY="hidden")}else{var _;(i=document.createElement("input")).type="text";i.setAttribute("value",null!==(_=p)&&void 0!==_?_:d);this.data.doNotScroll&&(i.style.overflowX="hidden")}this.data.hasOwnCanvas&&(i.hidden=!0);Ri.add(i);i.setAttribute("data-element-id",a);i.disabled=this.data.readOnly;i.name=this.data.fieldName;i.tabIndex=Gi;this._setRequired(i,this.data.required);h&&(i.maxLength=h);i.addEventListener("input",(function(o){r.setValue(a,{value:o.target.value});window.updateAngularFormValue(a,{value:o.target.value});t.setPropertyOnSiblings(i,"value",o.target.value,"value");v.formattedValue=null}));i.addEventListener("resetform",(function(r){var a,o=null!==(a=t.data.defaultFieldValue)&&void 0!==a?a:"";i.value=v.userValue=o;v.formattedValue=null}));var g=function blurListener(t){var r=v.formattedValue;null!=r&&(t.target.value=r);t.target.scrollLeft=0};window.registerAcroformField(a,i,u.value);i.addEventListener("updateFromAngular",(function(t){return r.setValue(a,{value:t.detail})}));if(this.enableScripting&&this.hasJSActions){var m;i.addEventListener("focus",(function(r){var a;if(!v.focused){var i=r.target;v.userValue&&(i.value=v.userValue);v.lastCommittedValue=i.value;v.commitKey=1;null!==(a=t.data.actions)&&void 0!==a&&a.Focus||(v.focused=!0)}}));i.addEventListener("updatefromsandbox",(function(i){t.showElementAndHideCanvas(i.target);var o={value:function value(t){var i;v.userValue=null!==(i=t.detail.value)&&void 0!==i?i:"";r.setValue(a,{value:v.userValue.toString()});window.updateAngularFormValue(a,{value:v.userValue.toString()});t.target.value=v.userValue},formattedValue:function formattedValue(t){var formattedValue=t.detail.formattedValue;v.formattedValue=formattedValue;null!=formattedValue&&t.target!==document.activeElement&&(t.target.value=formattedValue);r.setValue(a,{formattedValue:formattedValue});window.updateAngularFormValue(a,{formattedValue:formattedValue})},selRange:function selRange(t){var r;(r=t.target).setSelectionRange.apply(r,annotation_layer_toConsumableArray(t.detail.selRange))},charLimit:function charLimit(i){var o,charLimit=i.detail.charLimit,l=i.target;if(0!==charLimit){l.setAttribute("maxLength",charLimit);var c=v.userValue;if(c&&!(c.length<=charLimit)){c=c.slice(0,charLimit);l.value=v.userValue=c;r.setValue(a,{value:c});window.updateAngularFormValue(a,{value:c});null===(o=t.linkService.eventBus)||void 0===o||o.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:c,willCommit:!0,commitKey:1,selStart:l.selectionStart,selEnd:l.selectionEnd}})}}else l.removeAttribute("maxLength")}};t._dispatchEventFromSandbox(o,i)}));i.addEventListener("keydown",(function(r){var i;v.commitKey=1;var o=-1;"Escape"===r.key?o=0:"Enter"!==r.key||t.data.multiLine?"Tab"===r.key&&(v.commitKey=3):o=2;if(-1!==o){var l=r.target.value;if(v.lastCommittedValue!==l){v.lastCommittedValue=l;v.userValue=l;null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:l,willCommit:!0,commitKey:o,selStart:r.target.selectionStart,selEnd:r.target.selectionEnd}})}}}));var b=g;g=null;i.addEventListener("blur",(function(r){var i;if(v.focused&&r.relatedTarget){null!==(i=t.data.actions)&&void 0!==i&&i.Blur||(v.focused=!1);var o=r.target.value;v.userValue=o;if(v.lastCommittedValue!==o){var l;null===(l=t.linkService.eventBus)||void 0===l||l.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:o,willCommit:!0,commitKey:v.commitKey,selStart:r.target.selectionStart,selEnd:r.target.selectionEnd}})}b(r)}}));null!==(m=this.data.actions)&&void 0!==m&&m.Keystroke&&i.addEventListener("beforeinput",(function(r){var i;v.lastCommittedValue=null;var o=r.data,l=r.target,c=l.value,u=l.selectionStart,d=l.selectionEnd,h=u,p=d;switch(r.inputType){case"deleteWordBackward":var y=c.substring(0,u).match(/\w*[^\w]*$/);y&&(h-=y[0].length);break;case"deleteWordForward":var _=c.substring(u).match(/^[^\w]*\w*/);_&&(p+=_[0].length);break;case"deleteContentBackward":u===d&&(h-=1);break;case"deleteContentForward":u===d&&(p+=1)}r.preventDefault();null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:c,change:o||"",willCommit:!1,selStart:h,selEnd:p}})}));this._setEventListeners(i,v,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.value}))}g&&i.addEventListener("blur",g);if(this.data.comb){var w=(this.data.rect[2]-this.data.rect[0])/h;i.classList.add("comb");i.style.letterSpacing="calc(".concat(w,"px * var(--scale-factor) - 1ch)")}}else{(i=document.createElement("div")).textContent=this.data.fieldValue;i.style.verticalAlign="middle";i.style.display="table-cell";this.data.hasOwnCanvas&&(i.hidden=!0)}this._setTextStyle(i);this._setBackgroundColor(i);this._setDefaultPropertiesFromJS(i);this.container.append(i);return this.container}}]);return TextWidgetAnnotationElement}(Ui),Vi=function(t){annotation_layer_inherits(SignatureWidgetAnnotationElement,t);var r=annotation_layer_createSuper(SignatureWidgetAnnotationElement);function SignatureWidgetAnnotationElement(t){annotation_layer_classCallCheck(this,SignatureWidgetAnnotationElement);return r.call(this,t,{isRenderable:!!t.data.hasOwnCanvas})}return annotation_layer_createClass(SignatureWidgetAnnotationElement)}(Ui),Ki=function(t){annotation_layer_inherits(CheckboxWidgetAnnotationElement,t);var r=annotation_layer_createSuper(CheckboxWidgetAnnotationElement);function CheckboxWidgetAnnotationElement(t){annotation_layer_classCallCheck(this,CheckboxWidgetAnnotationElement);return r.call(this,t,{isRenderable:t.renderForms})}annotation_layer_createClass(CheckboxWidgetAnnotationElement,[{key:"render",value:function render(){var t=this,r=this.annotationStorage,a=this.data,i=a.id,o=window.getFormValueFromAngular(this.data.fieldName),l=r.getValue(i,{value:a.exportValue===a.fieldValue}).value,c=void 0;o.value&&(c=!0===o.value||o.value===a.exportValue);var u=void 0!==c?c:l,d=!1;if("string"==typeof u){u=u===a.exportValue;r.setValue(i,{value:u});d=!0}else if(void 0!==(null==o?void 0:o.value)&&o.value!==l){u=o.value===a.exportValue;r.setValue(i,{value:u})}this.container.classList.add("buttonWidgetAnnotation","checkBox");var h=document.createElement("input");Ri.add(h);h.setAttribute("data-element-id",i);h.disabled=a.readOnly;this._setRequired(h,this.data.required);h.type="checkbox";h.name=a.fieldName;u&&h.setAttribute("checked",!0);h.setAttribute("exportValue",a.exportValue);h.tabIndex=Gi;h.addEventListener("change",(function(o){var l,c=o.target,u=c.name,d=c.checked,h=annotation_layer_createForOfIteratorHelper(t._getElementsByName(u,i));try{for(h.s();!(l=h.n()).done;){var p=l.value,v=d&&p.exportValue===a.exportValue;p.domElement&&(p.domElement.checked=v);r.setValue(p.id,{value:v});window.updateAngularFormValue(i,{value:v})}}catch(t){h.e(t)}finally{h.f()}r.setValue(i,{value:d});window.updateAngularFormValue(i,{value:d})}));h.addEventListener("resetform",(function(t){var r=a.defaultFieldValue||"Off";t.target.checked=r===a.exportValue}));window.registerAcroformField(i,h,!!u&&a.exportValue);h.addEventListener("updateFromAngular",(function(t){return r.setValue(i,{value:t.detail})}));d&&window.updateAngularFormValue(i,{value:u});if(this.enableScripting&&this.hasJSActions){h.addEventListener("updatefromsandbox",(function(a){var o={value:function value(t){t.target.checked="Off"!==t.detail.value;r.setValue(i,{value:t.target.checked});window.updateAngularFormValue(i,{value:t.target.value})}};t._dispatchEventFromSandbox(o,a)}));this._setEventListeners(h,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.checked}))}this._setBackgroundColor(h);this._setDefaultPropertiesFromJS(h);this.container.append(h);return this.container}}]);return CheckboxWidgetAnnotationElement}(Ui),Yi=function(t){annotation_layer_inherits(RadioButtonWidgetAnnotationElement,t);var r=annotation_layer_createSuper(RadioButtonWidgetAnnotationElement);function RadioButtonWidgetAnnotationElement(t){annotation_layer_classCallCheck(this,RadioButtonWidgetAnnotationElement);return r.call(this,t,{isRenderable:t.renderForms})}annotation_layer_createClass(RadioButtonWidgetAnnotationElement,[{key:"render",value:function render(){var t,r=this;this.container.classList.add("buttonWidgetAnnotation","radioButton");var a=this.annotationStorage,i=this.data,o=i.id,l=window.getFormValueFromAngular(this.data.fieldName),c=a.getValue(o,{value:i.fieldValue===i.buttonValue}).value,u=null!==(t=l.value)&&void 0!==t?t:c;if("string"==typeof u||l!==c){u=u===i.buttonValue;a.setValue(o,{value:u})}else u&&window.updateAngularFormValue(o,{value:i.buttonValue});if(u){var d,h=annotation_layer_createForOfIteratorHelper(this._getElementsByName(i.fieldName,o));try{for(h.s();!(d=h.n()).done;){var p=d.value;a.setValue(p.id,{value:!1})}}catch(t){h.e(t)}finally{h.f()}}var v=document.createElement("input");Ri.add(v);v.setAttribute("data-element-id",o);v.disabled=i.readOnly;this._setRequired(v,this.data.required);v.type="radio";v.name=i.fieldName;u&&v.setAttribute("checked",!0);v.tabIndex=Gi;v.addEventListener("change",(function(t){var i,l=t.target,c=l.name,u=l.checked,d=annotation_layer_createForOfIteratorHelper(r._getElementsByName(c,o));try{for(d.s();!(i=d.n()).done;){var h=i.value;a.setValue(h.id,{value:!1});window.updateAngularFormValue(h.id,{value:!1})}}catch(t){d.e(t)}finally{d.f()}a.setValue(o,{value:u});window.updateAngularFormValue(o,{value:u})}));v.addEventListener("resetform",(function(t){var r=i.defaultFieldValue;t.target.checked=null!=r&&r===i.buttonValue}));window.registerAcroformField(o,v,u?i.buttonValue:void 0,i.buttonValue);v.addEventListener("updateFromAngular",(function(t){return a.setValue(o,{value:t.detail})}));if(this.enableScripting&&this.hasJSActions){var y=i.buttonValue;v.addEventListener("updatefromsandbox",(function(t){var i={value:function value(t){var i,l=y===t.detail.value,c=annotation_layer_createForOfIteratorHelper(r._getElementsByName(t.target.name));try{for(c.s();!(i=c.n()).done;){var u=i.value,d=l&&u.id===o;u.domElement&&(u.domElement.checked=d);a.setValue(u.id,{value:d});window.updateAngularFormValue(o,{value:d})}}catch(t){c.e(t)}finally{c.f()}}};r._dispatchEventFromSandbox(i,t)}));this._setEventListeners(v,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.checked}))}this._setBackgroundColor(v);this._setDefaultPropertiesFromJS(v);this.container.append(v);return this.container}}]);return RadioButtonWidgetAnnotationElement}(Ui),Xi=function(t){annotation_layer_inherits(PushButtonWidgetAnnotationElement,t);var r=annotation_layer_createSuper(PushButtonWidgetAnnotationElement);function PushButtonWidgetAnnotationElement(t){annotation_layer_classCallCheck(this,PushButtonWidgetAnnotationElement);return r.call(this,t,{ignoreBorder:t.data.hasAppearance})}annotation_layer_createClass(PushButtonWidgetAnnotationElement,[{key:"render",value:function render(){var t=this,r=annotation_layer_get(annotation_layer_getPrototypeOf(PushButtonWidgetAnnotationElement.prototype),"render",this).call(this);r.classList.add("buttonWidgetAnnotation","pushButton");this.data.alternativeText&&(r.title=this.data.alternativeText);var a=r.lastChild;if(this.enableScripting&&this.hasJSActions&&a){this._setDefaultPropertiesFromJS(a);a.addEventListener("updatefromsandbox",(function(r){t._dispatchEventFromSandbox({},r)}))}return r}}]);return PushButtonWidgetAnnotationElement}(zi),$i=function(t){annotation_layer_inherits(ChoiceWidgetAnnotationElement,t);var r=annotation_layer_createSuper(ChoiceWidgetAnnotationElement);function ChoiceWidgetAnnotationElement(t){annotation_layer_classCallCheck(this,ChoiceWidgetAnnotationElement);return r.call(this,t,{isRenderable:t.renderForms})}annotation_layer_createClass(ChoiceWidgetAnnotationElement,[{key:"render",value:function render(){var t=this;this.container.classList.add("choiceWidgetAnnotation");var r=this.annotationStorage,a=this.data.id,i=window.getFormValueFromAngular(this.data.fieldName),o=r.getValue(a,{value:this.data.fieldValue}),l=i.value?i:o;i!==o&&r.setValue(a,{value:i.value});var c=document.createElement("select");Ri.add(c);c.setAttribute("data-element-id",a);c.disabled=this.data.readOnly;this._setRequired(c,this.data.required);c.name=this.data.fieldName;c.tabIndex=Gi;var u=this.data.combo&&this.data.options.length>0;if(!this.data.combo){c.size=this.data.options.length;this.data.multiSelect&&(c.multiple=!0)}c.addEventListener("resetform",(function(r){var a,i=t.data.defaultFieldValue,o=annotation_layer_createForOfIteratorHelper(c.options);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.selected=l.value===i}}catch(t){o.e(t)}finally{o.f()}}));var d,h=annotation_layer_createForOfIteratorHelper(this.data.options);try{for(h.s();!(d=h.n()).done;){var p=d.value,v=document.createElement("option");v.textContent=p.displayValue;v.value=p.exportValue;if(l.value.includes(p.exportValue)){v.setAttribute("selected",!0);u=!1}c.append(v)}}catch(t){h.e(t)}finally{h.f()}var y=null;if(u){var _=document.createElement("option");_.value=" ";_.setAttribute("hidden",!0);_.setAttribute("selected",!0);c.prepend(_);y=function removeEmptyEntry(){_.remove();c.removeEventListener("input",y);y=null};c.addEventListener("input",y)}var g=function getValue(t){var r=t?"value":"textContent",a=c.options;return c.multiple?Array.prototype.filter.call(a,(function(t){return t.selected})).map((function(t){return t[r]})):-1===a.selectedIndex?null:a[a.selectedIndex][r]},m=g(!1),b=function getItems(t){var r=t.target.options;return Array.prototype.map.call(r,(function(t){return{displayValue:t.textContent,exportValue:t.value}}))};window.registerAcroformField(a,c,m);c.addEventListener("updateFromAngular",(function(t){return r.setValue(a,{value:t.detail})}));if(this.enableScripting&&this.hasJSActions){c.addEventListener("updatefromsandbox",(function(i){var o={value:function value(t){var i;null===(i=y)||void 0===i||i();var o,value=t.detail.value,l=new Set(Array.isArray(value)?value:[value]),u=annotation_layer_createForOfIteratorHelper(c.options);try{for(u.s();!(o=u.n()).done;){var d=o.value;d.selected=l.has(d.value)}}catch(t){u.e(t)}finally{u.f()}r.setValue(a,{value:g(!0)});m=g(!1);window.updateAngularFormValue(a,{value:m})},multipleSelection:function multipleSelection(t){c.multiple=!0},remove:function remove(t){var i=c.options,o=t.detail.remove;i[o].selected=!1;c.remove(o);if(i.length>0){var l=Array.prototype.findIndex.call(i,(function(t){return t.selected}));-1===l&&(i[0].selected=!0)}r.setValue(a,{value:g(!0),items:b(t)});m=g(!1)},clear:function clear(t){for(;0!==c.length;)c.remove(0);r.setValue(a,{value:null,items:[]});m=g(!1);window.updateAngularFormValue(a,{value:m})},insert:function insert(t){var i=t.detail.insert,o=i.index,l=i.displayValue,u=i.exportValue,d=c.children[o],h=document.createElement("option");h.textContent=l;h.value=u;d?d.before(h):c.append(h);r.setValue(a,{value:g(!0),items:b(t)});m=g(!1);window.updateAngularFormValue(a,{value:m})},items:function items(t){for(var items=t.detail.items;0!==c.length;)c.remove(0);var i,o=annotation_layer_createForOfIteratorHelper(items);try{for(o.s();!(i=o.n()).done;){var l=i.value,u=l.displayValue,d=l.exportValue,h=document.createElement("option");h.textContent=u;h.value=d;c.append(h)}}catch(t){o.e(t)}finally{o.f()}c.options.length>0&&(c.options[0].selected=!0);r.setValue(a,{value:g(!0),items:b(t)});m=g(!1);window.updateAngularFormValue(a,{value:m})},indices:function indices(t){var i,indices=new Set(t.detail.indices),o=annotation_layer_createForOfIteratorHelper(t.target.options);try{for(o.s();!(i=o.n()).done;){var l=i.value;l.selected=indices.has(l.index)}}catch(t){o.e(t)}finally{o.f()}r.setValue(a,{value:g(!0)});m=g(!1);window.updateAngularFormValue(a,{value:m})},editable:function editable(t){t.target.disabled=!t.detail.editable}};t._dispatchEventFromSandbox(o,i)}));c.addEventListener("input",(function(i){var o,l=g(!0);r.setValue(a,{value:l});window.updateAngularFormValue(a,{value:l});i.preventDefault();null===(o=t.linkService.eventBus)||void 0===o||o.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:m,changeEx:l,willCommit:!1,commitKey:1,keyDown:!1}})}));this._setEventListeners(c,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(function(t){return t.target.value}))}else c.addEventListener("input",(function(t){r.setValue(a,{value:g(!0)});window.updateAngularFormValue(a,{value:g(!0)})}));this.data.combo&&this._setTextStyle(c);this._setBackgroundColor(c);this._setDefaultPropertiesFromJS(c);this.container.append(c);return this.container}}]);return ChoiceWidgetAnnotationElement}(Ui),Ji=function(t){annotation_layer_inherits(PopupAnnotationElement,t);var r=annotation_layer_createSuper(PopupAnnotationElement);function PopupAnnotationElement(t){var a;annotation_layer_classCallCheck(this,PopupAnnotationElement);var i=t.data,o=t.elements;(a=r.call(this,t,{isRenderable:ji._hasPopupData(i)})).elements=o;return a}annotation_layer_createClass(PopupAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("popupAnnotation");var t,r=new bo({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),a=[],i=annotation_layer_createForOfIteratorHelper(this.elements);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.popup=r;a.push(o.data.id);o.addHighlightArea()}}catch(t){i.e(t)}finally{i.f()}this.container.setAttribute("aria-controls",a.map((function(t){return"".concat(_e).concat(t)})).join(","));return this.container}}]);return PopupAnnotationElement}(ji),Qi=new WeakMap,Zi=new WeakMap,eo=new WeakMap,to=new WeakMap,ro=new WeakMap,no=new WeakMap,ao=new WeakMap,io=new WeakMap,oo=new WeakMap,so=new WeakMap,lo=new WeakMap,co=new WeakMap,uo=new WeakMap,ho=new WeakMap,fo=new WeakMap,po=new WeakMap,vo=new WeakMap,yo=new WeakSet,_o=new WeakSet,go=new WeakSet,mo=new WeakSet,bo=function(){function PopupElement(t){var r=t.container,a=t.color,i=t.elements,o=t.titleObj,l=t.modificationDate,c=t.contentsObj,u=t.richText,d=t.parent,h=t.rect,p=t.parentRect,v=t.open;annotation_layer_classCallCheck(this,PopupElement);annotation_layer_classPrivateMethodInitSpec(this,mo);annotation_layer_classPrivateMethodInitSpec(this,go);annotation_layer_classPrivateMethodInitSpec(this,_o);annotation_layer_classPrivateMethodInitSpec(this,yo);annotation_layer_classPrivateFieldInitSpec(this,Qi,{writable:!0,value:annotation_layer_classPrivateMethodGet(this,yo,_keyDown2).bind(this)});annotation_layer_classPrivateFieldInitSpec(this,Zi,{writable:!0,value:annotation_layer_classPrivateMethodGet(this,mo,_hide2).bind(this)});annotation_layer_classPrivateFieldInitSpec(this,eo,{writable:!0,value:annotation_layer_classPrivateMethodGet(this,go,_show2).bind(this)});annotation_layer_classPrivateFieldInitSpec(this,to,{writable:!0,value:annotation_layer_classPrivateMethodGet(this,_o,_toggle2).bind(this)});annotation_layer_classPrivateFieldInitSpec(this,ro,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,no,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,ao,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,io,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,oo,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,so,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,lo,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,co,{writable:!0,value:!1});annotation_layer_classPrivateFieldInitSpec(this,uo,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,ho,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,fo,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,po,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,vo,{writable:!0,value:!1});annotation_layer_classPrivateFieldSet(this,no,r);annotation_layer_classPrivateFieldSet(this,po,o);annotation_layer_classPrivateFieldSet(this,ao,c);annotation_layer_classPrivateFieldSet(this,fo,u);annotation_layer_classPrivateFieldSet(this,so,d);annotation_layer_classPrivateFieldSet(this,ro,a);annotation_layer_classPrivateFieldSet(this,ho,h);annotation_layer_classPrivateFieldSet(this,lo,p);annotation_layer_classPrivateFieldSet(this,oo,i);annotation_layer_classPrivateFieldSet(this,io,et.toDateObject(l));this.trigger=i.flatMap((function(t){return t.getElementsToTriggerPopup()}));var y,_=annotation_layer_createForOfIteratorHelper(this.trigger);try{for(_.s();!(y=_.n()).done;){var g=y.value;g.addEventListener("click",annotation_layer_classPrivateFieldGet(this,to));g.addEventListener("mouseenter",annotation_layer_classPrivateFieldGet(this,eo));g.addEventListener("mouseleave",annotation_layer_classPrivateFieldGet(this,Zi));g.classList.add("popupTriggerArea")}}catch(t){_.e(t)}finally{_.f()}var m,b=annotation_layer_createForOfIteratorHelper(i);try{for(b.s();!(m=b.n()).done;){var w;null===(w=m.value.container)||void 0===w||w.addEventListener("keydown",annotation_layer_classPrivateFieldGet(this,Qi))}}catch(t){b.e(t)}finally{b.f()}annotation_layer_classPrivateFieldGet(this,no).hidden=!0;v&&annotation_layer_classPrivateMethodGet(this,_o,_toggle2).call(this)}annotation_layer_createClass(PopupElement,[{key:"render",value:function render(){if(!annotation_layer_classPrivateFieldGet(this,uo)){var t=annotation_layer_classPrivateFieldGet(this,so),r=t.page.view,a=t.viewport.rawDims,i=a.pageWidth,o=a.pageHeight,l=a.pageX,c=a.pageY,u=annotation_layer_classPrivateFieldSet(this,uo,document.createElement("div"));u.className="popup";if(annotation_layer_classPrivateFieldGet(this,ro)){var d=u.style.outlineColor=he.makeHexColor.apply(he,annotation_layer_toConsumableArray(annotation_layer_classPrivateFieldGet(this,ro)));if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))u.style.backgroundColor="color-mix(in srgb, ".concat(d," 30%, white)");else{u.style.backgroundColor=he.makeHexColor.apply(he,annotation_layer_toConsumableArray(annotation_layer_classPrivateFieldGet(this,ro).map((function(t){return Math.floor(.7*(255-t)+t)}))))}}var h=document.createElement("span");h.className="header";var p=document.createElement("h1");h.append(p);var v=annotation_layer_classPrivateFieldGet(this,po);p.dir=v.dir;p.textContent=v.str;u.append(h);if(annotation_layer_classPrivateFieldGet(this,io)){var y=document.createElement("span");y.classList.add("popupDate");y.setAttribute("data-l10n-id","pdfjs-annotation-date-string");y.setAttribute("data-l10n-args",JSON.stringify({date:annotation_layer_classPrivateFieldGet(this,io).toLocaleDateString(),time:annotation_layer_classPrivateFieldGet(this,io).toLocaleTimeString()}));h.append(y)}var _=annotation_layer_classPrivateFieldGet(this,ao),g=annotation_layer_classPrivateFieldGet(this,fo);if(null==g||!g.str||null!=_&&_.str&&_.str!==g.str){var m=this._formatContents(_);u.append(m)}else{Oi.render({xfaHtml:g.html,intent:"richText",div:u});u.lastChild.classList.add("richText","popupContent")}var b,w=!!annotation_layer_classPrivateFieldGet(this,lo),P=annotation_layer_classPrivateFieldGet(this,w?lo:ho),k=annotation_layer_createForOfIteratorHelper(annotation_layer_classPrivateFieldGet(this,oo));try{for(k.s();!(b=k.n()).done;){var A=b.value;if(!P||null!==he.intersect(A.data.rect,P)){P=A.data.rect;w=!0;break}}}catch(t){k.e(t)}finally{k.f()}var S=he.normalizeRect([P[0],r[3]-P[1]+r[1],P[2],r[3]-P[3]+r[1]]),x=w?P[2]-P[0]+5:0,E=S[0]+x,I=S[1],C=annotation_layer_classPrivateFieldGet(this,no).style;C.left="".concat(100*(E-l)/i,"%");C.top="".concat(100*(I-c)/o,"%");annotation_layer_classPrivateFieldGet(this,no).append(u)}}},{key:"_formatContents",value:function _formatContents(t){var r=t.str,a=t.dir,i=document.createElement("p");i.classList.add("popupContent");i.dir=a;for(var o=r.split(/(?:\r\n?|\n)/),l=0,c=o.length;l<c;++l){var u=o[l];i.append(document.createTextNode(u));l<c-1&&i.append(document.createElement("br"))}return i}},{key:"forceHide",value:function forceHide(){annotation_layer_classPrivateFieldSet(this,vo,this.isVisible);annotation_layer_classPrivateFieldGet(this,vo)&&(annotation_layer_classPrivateFieldGet(this,no).hidden=!0)}},{key:"maybeShow",value:function maybeShow(){if(annotation_layer_classPrivateFieldGet(this,vo)){annotation_layer_classPrivateFieldSet(this,vo,!1);annotation_layer_classPrivateFieldGet(this,no).hidden=!1}}},{key:"isVisible",get:function get(){return!1===annotation_layer_classPrivateFieldGet(this,no).hidden}}]);return PopupElement}();function _keyDown2(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||("Enter"===t.key||"Escape"===t.key&&annotation_layer_classPrivateFieldGet(this,co))&&annotation_layer_classPrivateMethodGet(this,_o,_toggle2).call(this)}function _toggle2(){annotation_layer_classPrivateFieldSet(this,co,!annotation_layer_classPrivateFieldGet(this,co));if(annotation_layer_classPrivateFieldGet(this,co)){annotation_layer_classPrivateMethodGet(this,go,_show2).call(this);annotation_layer_classPrivateFieldGet(this,no).addEventListener("click",annotation_layer_classPrivateFieldGet(this,to));annotation_layer_classPrivateFieldGet(this,no).addEventListener("keydown",annotation_layer_classPrivateFieldGet(this,Qi))}else{annotation_layer_classPrivateMethodGet(this,mo,_hide2).call(this);annotation_layer_classPrivateFieldGet(this,no).removeEventListener("click",annotation_layer_classPrivateFieldGet(this,to));annotation_layer_classPrivateFieldGet(this,no).removeEventListener("keydown",annotation_layer_classPrivateFieldGet(this,Qi))}}function _show2(){annotation_layer_classPrivateFieldGet(this,uo)||this.render();if(this.isVisible)annotation_layer_classPrivateFieldGet(this,co)&&annotation_layer_classPrivateFieldGet(this,no).classList.add("focused");else{annotation_layer_classPrivateFieldGet(this,no).hidden=!1;annotation_layer_classPrivateFieldGet(this,no).style.zIndex=parseInt(annotation_layer_classPrivateFieldGet(this,no).style.zIndex)+1e3}}function _hide2(){annotation_layer_classPrivateFieldGet(this,no).classList.remove("focused");if(!annotation_layer_classPrivateFieldGet(this,co)&&this.isVisible){annotation_layer_classPrivateFieldGet(this,no).hidden=!0;annotation_layer_classPrivateFieldGet(this,no).style.zIndex=parseInt(annotation_layer_classPrivateFieldGet(this,no).style.zIndex)-1e3}}var wo=function(t){annotation_layer_inherits(FreeTextAnnotationElement,t);var r=annotation_layer_createSuper(FreeTextAnnotationElement);function FreeTextAnnotationElement(t){var a;annotation_layer_classCallCheck(this,FreeTextAnnotationElement);(a=r.call(this,t,{isRenderable:!0,ignoreBorder:!0})).textContent=t.data.textContent;a.textPosition=t.data.textPosition;a.annotationEditorType=_.FREETEXT;return a}annotation_layer_createClass(FreeTextAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("freeTextAnnotation");if(this.textContent){var t=document.createElement("div");t.classList.add("annotationTextContent");t.setAttribute("role","comment");var r,a=annotation_layer_createForOfIteratorHelper(this.textContent);try{for(a.s();!(r=a.n()).done;){var i=r.value,o=document.createElement("span");o.textContent=i;t.append(o)}}catch(t){a.e(t)}finally{a.f()}this.container.append(t)}!this.data.popupRef&&this.hasPopupData&&this._createPopup();this._editOnDoubleClick();return this.container}},{key:"_isEditable",get:function get(){return this.data.hasOwnCanvas}}]);return FreeTextAnnotationElement}(ji),Po=new WeakMap,ko=function(t){annotation_layer_inherits(LineAnnotationElement,t);var r=annotation_layer_createSuper(LineAnnotationElement);function LineAnnotationElement(t){var a;annotation_layer_classCallCheck(this,LineAnnotationElement);annotation_layer_classPrivateFieldInitSpec(annotation_layer_assertThisInitialized(a=r.call(this,t,{isRenderable:!0,ignoreBorder:!0})),Po,{writable:!0,value:null});return a}annotation_layer_createClass(LineAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("lineAnnotation");var t=this.data,r=getRectDims(t.rect),a=r.width,i=r.height,o=this.svgFactory.create(a,i,!0),l=annotation_layer_classPrivateFieldSet(this,Po,this.svgFactory.createElement("svg:line"));l.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]);l.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]);l.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]);l.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]);l.setAttribute("stroke-width",t.borderStyle.width||1);l.setAttribute("stroke","transparent");l.setAttribute("fill","transparent");o.append(l);this.container.append(o);!t.popupRef&&this.hasPopupData&&this._createPopup();return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return annotation_layer_classPrivateFieldGet(this,Po)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return LineAnnotationElement}(ji),Ao=new WeakMap,So=function(t){annotation_layer_inherits(SquareAnnotationElement,t);var r=annotation_layer_createSuper(SquareAnnotationElement);function SquareAnnotationElement(t){var a;annotation_layer_classCallCheck(this,SquareAnnotationElement);annotation_layer_classPrivateFieldInitSpec(annotation_layer_assertThisInitialized(a=r.call(this,t,{isRenderable:!0,ignoreBorder:!0})),Ao,{writable:!0,value:null});return a}annotation_layer_createClass(SquareAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("squareAnnotation");var t=this.data,r=getRectDims(t.rect),a=r.width,i=r.height,o=this.svgFactory.create(a,i,!0),l=t.borderStyle.width,c=annotation_layer_classPrivateFieldSet(this,Ao,this.svgFactory.createElement("svg:rect"));c.setAttribute("x",l/2);c.setAttribute("y",l/2);c.setAttribute("width",a-l);c.setAttribute("height",i-l);c.setAttribute("stroke-width",l||1);c.setAttribute("stroke","transparent");c.setAttribute("fill","transparent");o.append(c);this.container.append(o);!t.popupRef&&this.hasPopupData&&this._createPopup();return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return annotation_layer_classPrivateFieldGet(this,Ao)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return SquareAnnotationElement}(ji),xo=new WeakMap,Fo=function(t){annotation_layer_inherits(CircleAnnotationElement,t);var r=annotation_layer_createSuper(CircleAnnotationElement);function CircleAnnotationElement(t){var a;annotation_layer_classCallCheck(this,CircleAnnotationElement);annotation_layer_classPrivateFieldInitSpec(annotation_layer_assertThisInitialized(a=r.call(this,t,{isRenderable:!0,ignoreBorder:!0})),xo,{writable:!0,value:null});return a}annotation_layer_createClass(CircleAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("circleAnnotation");var t=this.data,r=getRectDims(t.rect),a=r.width,i=r.height,o=this.svgFactory.create(a,i,!0),l=t.borderStyle.width,c=annotation_layer_classPrivateFieldSet(this,xo,this.svgFactory.createElement("svg:ellipse"));c.setAttribute("cx",a/2);c.setAttribute("cy",i/2);c.setAttribute("rx",a/2-l/2);c.setAttribute("ry",i/2-l/2);c.setAttribute("stroke-width",l||1);c.setAttribute("stroke","transparent");c.setAttribute("fill","transparent");o.append(c);this.container.append(o);!t.popupRef&&this.hasPopupData&&this._createPopup();return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return annotation_layer_classPrivateFieldGet(this,xo)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return CircleAnnotationElement}(ji),Eo=new WeakMap,Io=function(t){annotation_layer_inherits(PolylineAnnotationElement,t);var r=annotation_layer_createSuper(PolylineAnnotationElement);function PolylineAnnotationElement(t){var a;annotation_layer_classCallCheck(this,PolylineAnnotationElement);annotation_layer_classPrivateFieldInitSpec(annotation_layer_assertThisInitialized(a=r.call(this,t,{isRenderable:!0,ignoreBorder:!0})),Eo,{writable:!0,value:null});a.containerClassName="polylineAnnotation";a.svgElementName="svg:polyline";return a}annotation_layer_createClass(PolylineAnnotationElement,[{key:"render",value:function render(){this.container.classList.add(this.containerClassName);var t,r=this.data,a=getRectDims(r.rect),i=a.width,o=a.height,l=this.svgFactory.create(i,o,!0),c=[],u=annotation_layer_createForOfIteratorHelper(r.vertices);try{for(u.s();!(t=u.n()).done;){var d=t.value,h=d.x-r.rect[0],p=r.rect[3]-d.y;c.push(h+","+p)}}catch(t){u.e(t)}finally{u.f()}c=c.join(" ");var v=annotation_layer_classPrivateFieldSet(this,Eo,this.svgFactory.createElement(this.svgElementName));v.setAttribute("points",c);v.setAttribute("stroke-width",r.borderStyle.width||1);v.setAttribute("stroke","transparent");v.setAttribute("fill","transparent");l.append(v);this.container.append(l);!r.popupRef&&this.hasPopupData&&this._createPopup();return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return annotation_layer_classPrivateFieldGet(this,Eo)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return PolylineAnnotationElement}(ji),Co=function(t){annotation_layer_inherits(PolygonAnnotationElement,t);var r=annotation_layer_createSuper(PolygonAnnotationElement);function PolygonAnnotationElement(t){var a;annotation_layer_classCallCheck(this,PolygonAnnotationElement);(a=r.call(this,t)).containerClassName="polygonAnnotation";a.svgElementName="svg:polygon";return a}return annotation_layer_createClass(PolygonAnnotationElement)}(Io),To=function(t){annotation_layer_inherits(CaretAnnotationElement,t);var r=annotation_layer_createSuper(CaretAnnotationElement);function CaretAnnotationElement(t){annotation_layer_classCallCheck(this,CaretAnnotationElement);return r.call(this,t,{isRenderable:!0,ignoreBorder:!0})}annotation_layer_createClass(CaretAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("caretAnnotation");!this.data.popupRef&&this.hasPopupData&&this._createPopup();return this.container}}]);return CaretAnnotationElement}(ji),Mo=new WeakMap,Oo=function(t){annotation_layer_inherits(InkAnnotationElement,t);var r=annotation_layer_createSuper(InkAnnotationElement);function InkAnnotationElement(t){var a;annotation_layer_classCallCheck(this,InkAnnotationElement);annotation_layer_classPrivateFieldInitSpec(annotation_layer_assertThisInitialized(a=r.call(this,t,{isRenderable:!0,ignoreBorder:!0})),Mo,{writable:!0,value:[]});a.containerClassName="inkAnnotation";a.svgElementName="svg:polyline";a.annotationEditorType=_.INK;return a}annotation_layer_createClass(InkAnnotationElement,[{key:"render",value:function render(){this.container.classList.add(this.containerClassName);var t,r=this.data,a=getRectDims(r.rect),i=a.width,o=a.height,l=this.svgFactory.create(i,o,!0),c=annotation_layer_createForOfIteratorHelper(r.inkLists);try{for(c.s();!(t=c.n()).done;){var u,d=t.value,h=[],p=annotation_layer_createForOfIteratorHelper(d);try{for(p.s();!(u=p.n()).done;){var v=u.value,y=v.x-r.rect[0],_=r.rect[3]-v.y;h.push("".concat(y,",").concat(_))}}catch(t){p.e(t)}finally{p.f()}h=h.join(" ");var g=this.svgFactory.createElement(this.svgElementName);annotation_layer_classPrivateFieldGet(this,Mo).push(g);g.setAttribute("points",h);g.setAttribute("stroke-width",r.borderStyle.width||1);g.setAttribute("stroke","transparent");g.setAttribute("fill","transparent");!r.popupRef&&this.hasPopupData&&this._createPopup();l.append(g)}}catch(t){c.e(t)}finally{c.f()}this.container.append(l);return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return annotation_layer_classPrivateFieldGet(this,Mo)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return InkAnnotationElement}(ji),Go=function(t){annotation_layer_inherits(HighlightAnnotationElement,t);var r=annotation_layer_createSuper(HighlightAnnotationElement);function HighlightAnnotationElement(t){annotation_layer_classCallCheck(this,HighlightAnnotationElement);return r.call(this,t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}annotation_layer_createClass(HighlightAnnotationElement,[{key:"render",value:function render(){!this.data.popupRef&&this.hasPopupData&&this._createPopup();this.container.classList.add("highlightAnnotation");return this.container}}]);return HighlightAnnotationElement}(ji),Ro=function(t){annotation_layer_inherits(UnderlineAnnotationElement,t);var r=annotation_layer_createSuper(UnderlineAnnotationElement);function UnderlineAnnotationElement(t){annotation_layer_classCallCheck(this,UnderlineAnnotationElement);return r.call(this,t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}annotation_layer_createClass(UnderlineAnnotationElement,[{key:"render",value:function render(){!this.data.popupRef&&this.hasPopupData&&this._createPopup();this.container.classList.add("underlineAnnotation");return this.container}}]);return UnderlineAnnotationElement}(ji),Lo=function(t){annotation_layer_inherits(SquigglyAnnotationElement,t);var r=annotation_layer_createSuper(SquigglyAnnotationElement);function SquigglyAnnotationElement(t){annotation_layer_classCallCheck(this,SquigglyAnnotationElement);return r.call(this,t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}annotation_layer_createClass(SquigglyAnnotationElement,[{key:"render",value:function render(){!this.data.popupRef&&this.hasPopupData&&this._createPopup();this.container.classList.add("squigglyAnnotation");return this.container}}]);return SquigglyAnnotationElement}(ji),Do=function(t){annotation_layer_inherits(StrikeOutAnnotationElement,t);var r=annotation_layer_createSuper(StrikeOutAnnotationElement);function StrikeOutAnnotationElement(t){annotation_layer_classCallCheck(this,StrikeOutAnnotationElement);return r.call(this,t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}annotation_layer_createClass(StrikeOutAnnotationElement,[{key:"render",value:function render(){!this.data.popupRef&&this.hasPopupData&&this._createPopup();this.container.classList.add("strikeoutAnnotation");return this.container}}]);return StrikeOutAnnotationElement}(ji),jo=function(t){annotation_layer_inherits(StampAnnotationElement,t);var r=annotation_layer_createSuper(StampAnnotationElement);function StampAnnotationElement(t){annotation_layer_classCallCheck(this,StampAnnotationElement);return r.call(this,t,{isRenderable:!0,ignoreBorder:!0})}annotation_layer_createClass(StampAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("stampAnnotation");!this.data.popupRef&&this.hasPopupData&&this._createPopup();return this.container}}]);return StampAnnotationElement}(ji),Wo=new WeakMap,No=new WeakSet,Bo=function(t){annotation_layer_inherits(FileAttachmentAnnotationElement,t);var r=annotation_layer_createSuper(FileAttachmentAnnotationElement);function FileAttachmentAnnotationElement(t){var a,i;annotation_layer_classCallCheck(this,FileAttachmentAnnotationElement);annotation_layer_classPrivateMethodInitSpec(annotation_layer_assertThisInitialized(i=r.call(this,t,{isRenderable:!0})),No);annotation_layer_classPrivateFieldInitSpec(annotation_layer_assertThisInitialized(i),Wo,{writable:!0,value:null});var o=i.data.file,l=o.filename,c=o.content;i.filename=getFilenameFromUrl(l,!0);i.content=c;null===(a=i.linkService.eventBus)||void 0===a||a.dispatch("fileattachmentannotation",{source:annotation_layer_assertThisInitialized(i),filename:l,content:c});return i}annotation_layer_createClass(FileAttachmentAnnotationElement,[{key:"render",value:function render(){var t=this;this.container.classList.add("fileAttachmentAnnotation");var r,a=this.container,i=this.data;if(i.hasAppearance||0===i.fillAlpha)r=document.createElement("div");else{(r=document.createElement("img")).src="".concat(this.imageResourcesPath,"annotation-").concat(/paperclip/i.test(i.name)?"paperclip":"pushpin",".svg");i.fillAlpha&&i.fillAlpha<1&&(r.style="filter: opacity(".concat(Math.round(100*i.fillAlpha),"%);"))}r.addEventListener("dblclick",annotation_layer_classPrivateMethodGet(this,No,_download2).bind(this));annotation_layer_classPrivateFieldSet(this,Wo,r);var o=ue.platform.isMac;a.addEventListener("keydown",(function(r){"Enter"===r.key&&(o?r.metaKey:r.ctrlKey)&&annotation_layer_classPrivateMethodGet(t,No,_download2).call(t)}));!i.popupRef&&this.hasPopupData?this._createPopup():r.classList.add("popupTriggerArea");a.append(r);return a}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return annotation_layer_classPrivateFieldGet(this,Wo)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return FileAttachmentAnnotationElement}(ji);function _download2(){var t;null===(t=this.downloadManager)||void 0===t||t.openOrDownloadData(this.content,this.filename)}var zo,Ho=new WeakMap,Uo=new WeakMap,qo=new WeakMap,Vo=new WeakSet,Ko=new WeakSet,Yo=function(){function AnnotationLayer(t){var r=t.div,a=t.accessibilityManager,i=t.annotationCanvasMap,o=t.page,l=t.viewport;annotation_layer_classCallCheck(this,AnnotationLayer);annotation_layer_classPrivateMethodInitSpec(this,Ko);annotation_layer_classPrivateMethodInitSpec(this,Vo);annotation_layer_classPrivateFieldInitSpec(this,Ho,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,Uo,{writable:!0,value:null});annotation_layer_classPrivateFieldInitSpec(this,qo,{writable:!0,value:new Map});this.div=r;annotation_layer_classPrivateFieldSet(this,Ho,a);annotation_layer_classPrivateFieldSet(this,Uo,i);this.page=o;this.viewport=l;this.zIndex=0}annotation_layer_createClass(AnnotationLayer,[{key:"render",value:(t=function annotation_layer_asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){annotation_layer_asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){annotation_layer_asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}(annotation_layer_regeneratorRuntime().mark((function _callee(t){var r,a,i,o,l,c,u,d,h,p,v,y,_,g,m;return annotation_layer_regeneratorRuntime().wrap((function _callee$(b){for(;;)switch(b.prev=b.next){case 0:r=t.annotations;setLayerDimensions(a=this.div,this.viewport);i=new Map;o={data:null,layer:a,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new Ye,annotationStorage:t.annotationStorage||new vn,enableScripting:!0===t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};l=annotation_layer_createForOfIteratorHelper(r);b.prev=6;l.s();case 8:if((c=l.n()).done){b.next=34;break}if(!(u=c.value).noHTML){b.next=12;break}return b.abrupt("continue",32);case 12:if(d=u.annotationType===H){b.next=19;break}h=getRectDims(u.rect),p=h.width,v=h.height;if(!(p<=0||v<=0)){b.next=17;break}return b.abrupt("continue",32);case 17:b.next=23;break;case 19:if(y=i.get(u.id)){b.next=22;break}return b.abrupt("continue",32);case 22:o.elements=y;case 23:o.data=u;if((_=Li.create(o)).isRenderable){b.next=27;break}return b.abrupt("continue",32);case 27:!d&&u.popupRef&&((g=i.get(u.popupRef))?g.push(_):i.set(u.popupRef,[_]));_.annotationEditorType>0&&annotation_layer_classPrivateFieldGet(this,qo).set(_.data.id,_);m=_.render();u.hidden&&(m.style.visibility="hidden");annotation_layer_classPrivateMethodGet(this,Vo,_appendElement2).call(this,m,u.id);case 32:b.next=8;break;case 34:b.next=39;break;case 36:b.prev=36;b.t0=b.catch(6);l.e(b.t0);case 39:b.prev=39;l.f();return b.finish(39);case 42:annotation_layer_classPrivateMethodGet(this,Ko,_setAnnotationCanvasMap2).call(this);case 43:case"end":return b.stop()}}),_callee,this,[[6,36,39,42]])}))),function render(r){return t.apply(this,arguments)})},{key:"update",value:function update(t){var r=t.viewport,a=this.div;this.viewport=r;setLayerDimensions(a,{rotation:r.rotation});annotation_layer_classPrivateMethodGet(this,Ko,_setAnnotationCanvasMap2).call(this);a.hidden=!1}},{key:"getEditableAnnotations",value:function getEditableAnnotations(){return Array.from(annotation_layer_classPrivateFieldGet(this,qo).values())}},{key:"getEditableAnnotation",value:function getEditableAnnotation(t){return annotation_layer_classPrivateFieldGet(this,qo).get(t)}}]);var t;return AnnotationLayer}();function _appendElement2(t,r){var a,i=t.firstChild||t;i.id="".concat(_e).concat(r);this.div.append(t);null===(a=annotation_layer_classPrivateFieldGet(this,Ho))||void 0===a||a.moveElementInDOM(this.div,t,i,!1)}function _setAnnotationCanvasMap2(){if(annotation_layer_classPrivateFieldGet(this,Uo)){var t,r=this.div,a=annotation_layer_createForOfIteratorHelper(annotation_layer_classPrivateFieldGet(this,Uo));try{for(a.s();!(t=a.n()).done;){var i=annotation_layer_slicedToArray(t.value,2),o=i[0],l=i[1],c=r.querySelector('[data-annotation-id="'.concat(o,'"]'));if(c){var u=c.firstChild;u?"CANVAS"===u.nodeName?u.replaceWith(l):u.before(l):c.append(l)}}}catch(t){a.e(t)}finally{a.f()}annotation_layer_classPrivateFieldGet(this,Uo).clear()}}function freetext_typeof(t){return freetext_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},freetext_typeof(t)}function freetext_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=freetext_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function freetext_toConsumableArray(t){return function freetext_arrayWithoutHoles(t){if(Array.isArray(t))return freetext_arrayLikeToArray(t)}(t)||function freetext_iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||freetext_unsupportedIterableToArray(t)||function freetext_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function freetext_slicedToArray(t,r){return function freetext_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function freetext_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||freetext_unsupportedIterableToArray(t,r)||function freetext_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function freetext_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return freetext_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?freetext_arrayLikeToArray(t,r):void 0}}function freetext_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function ownKeys(t,r){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),a.push.apply(a,i)}return a}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(a),!0).forEach((function(r){freetext_defineProperty(t,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))}))}return t}function freetext_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,freetext_toPropertyKey(i.key),i)}}function freetext_get(){freetext_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,a){var i=function freetext_superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=freetext_getPrototypeOf(t)););return t}(t,r);if(i){var o=Object.getOwnPropertyDescriptor(i,r);return o.get?o.get.call(arguments.length<3?t:a):o.value}};return freetext_get.apply(this,arguments)}function freetext_setPrototypeOf(t,r){freetext_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return freetext_setPrototypeOf(t,r)}function freetext_createSuper(t){var r=function freetext_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=freetext_getPrototypeOf(t);if(r){var o=freetext_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function freetext_possibleConstructorReturn(t,r){if(r&&("object"===freetext_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return freetext_assertThisInitialized(t)}(this,a)}}function freetext_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function freetext_getPrototypeOf(t){freetext_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return freetext_getPrototypeOf(t)}function freetext_classPrivateMethodInitSpec(t,r){freetext_checkPrivateRedeclaration(t,r);r.add(t)}function freetext_defineProperty(t,r,a){(r=freetext_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function freetext_toPropertyKey(t){var r=function freetext_toPrimitive(t,r){if("object"!=freetext_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=freetext_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==freetext_typeof(r)?r:String(r)}function freetext_classPrivateFieldInitSpec(t,r,a){freetext_checkPrivateRedeclaration(t,r);r.set(t,a)}function freetext_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function freetext_classPrivateFieldGet(t,r){return function freetext_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,freetext_classExtractFieldDescriptor(t,r,"get"))}function freetext_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function freetext_classPrivateFieldSet(t,r,a){!function freetext_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,freetext_classExtractFieldDescriptor(t,r,"set"),a);return a}function freetext_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var Xo,$o=new WeakMap,Jo=new WeakMap,Qo=new WeakMap,Zo=new WeakMap,es=new WeakMap,ts=new WeakMap,rs=new WeakMap,ns=new WeakMap,as=new WeakMap,is=new WeakSet,os=new WeakSet,ss=new WeakSet,ls=new WeakSet,cs=new WeakSet,us=new WeakSet,ds=new WeakSet,hs=function(t){!function freetext_inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&freetext_setPrototypeOf(t,r)}(FreeTextEditor,t);var r=freetext_createSuper(FreeTextEditor);function FreeTextEditor(t){var a;!function freetext_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,FreeTextEditor);freetext_classPrivateMethodInitSpec(freetext_assertThisInitialized(a=r.call(this,_objectSpread(_objectSpread({},t),{},{name:"freeTextEditor"}))),ds);freetext_classPrivateMethodInitSpec(freetext_assertThisInitialized(a),us);freetext_classPrivateMethodInitSpec(freetext_assertThisInitialized(a),cs);freetext_classPrivateMethodInitSpec(freetext_assertThisInitialized(a),ls);freetext_classPrivateMethodInitSpec(freetext_assertThisInitialized(a),ss);freetext_classPrivateMethodInitSpec(freetext_assertThisInitialized(a),os);freetext_classPrivateMethodInitSpec(freetext_assertThisInitialized(a),is);freetext_classPrivateFieldInitSpec(freetext_assertThisInitialized(a),$o,{writable:!0,value:a.editorDivBlur.bind(freetext_assertThisInitialized(a))});freetext_classPrivateFieldInitSpec(freetext_assertThisInitialized(a),Jo,{writable:!0,value:a.editorDivFocus.bind(freetext_assertThisInitialized(a))});freetext_classPrivateFieldInitSpec(freetext_assertThisInitialized(a),Qo,{writable:!0,value:a.editorDivInput.bind(freetext_assertThisInitialized(a))});freetext_classPrivateFieldInitSpec(freetext_assertThisInitialized(a),Zo,{writable:!0,value:a.editorDivKeydown.bind(freetext_assertThisInitialized(a))});freetext_classPrivateFieldInitSpec(freetext_assertThisInitialized(a),es,{writable:!0,value:void 0});freetext_classPrivateFieldInitSpec(freetext_assertThisInitialized(a),ts,{writable:!0,value:""});freetext_classPrivateFieldInitSpec(freetext_assertThisInitialized(a),rs,{writable:!0,value:"".concat(a.id,"-editor")});freetext_classPrivateFieldInitSpec(freetext_assertThisInitialized(a),ns,{writable:!0,value:void 0});freetext_classPrivateFieldInitSpec(freetext_assertThisInitialized(a),as,{writable:!0,value:null});freetext_classPrivateFieldSet(freetext_assertThisInitialized(a),es,t.color||FreeTextEditor._defaultColor||nn._defaultLineColor);freetext_classPrivateFieldSet(freetext_assertThisInitialized(a),ns,t.fontSize||FreeTextEditor._defaultFontSize);return a}!function freetext_createClass(t,r,a){r&&freetext_defineProperties(t.prototype,r);a&&freetext_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(FreeTextEditor,[{key:"updateParams",value:function updateParams(t,r){switch(t){case g.FREETEXT_SIZE:freetext_classPrivateMethodGet(this,is,_updateFontSize2).call(this,r);break;case g.FREETEXT_COLOR:freetext_classPrivateMethodGet(this,os,_updateColor2).call(this,r)}}},{key:"propertiesToUpdate",get:function get(){return[[g.FREETEXT_SIZE,freetext_classPrivateFieldGet(this,ns)],[g.FREETEXT_COLOR,freetext_classPrivateFieldGet(this,es)]]}},{key:"_translateEmpty",value:function _translateEmpty(t,r){this._uiManager.translateSelectedEditors(t,r,!0)}},{key:"getInitialTranslation",value:function getInitialTranslation(){var t=this.parentScale;return[-FreeTextEditor._internalPadding*t,-(FreeTextEditor._internalPadding+freetext_classPrivateFieldGet(this,ns))*t]}},{key:"rebuild",value:function rebuild(){if(this.parent){freetext_get(freetext_getPrototypeOf(FreeTextEditor.prototype),"rebuild",this).call(this);null!==this.div&&(this.isAttachedToDOM||this.parent.add(this))}}},{key:"enableEditMode",value:function enableEditMode(){if(!this.isInEditMode()){this.parent.setEditingState(!1);this.parent.updateToolbar(_.FREETEXT);freetext_get(freetext_getPrototypeOf(FreeTextEditor.prototype),"enableEditMode",this).call(this);this.overlayDiv.classList.remove("enabled");this.editorDiv.contentEditable=!0;this._isDraggable=!1;this.div.removeAttribute("aria-activedescendant");this.editorDiv.addEventListener("keydown",freetext_classPrivateFieldGet(this,Zo));this.editorDiv.addEventListener("focus",freetext_classPrivateFieldGet(this,Jo));this.editorDiv.addEventListener("blur",freetext_classPrivateFieldGet(this,$o));this.editorDiv.addEventListener("input",freetext_classPrivateFieldGet(this,Qo))}}},{key:"disableEditMode",value:function disableEditMode(){if(this.isInEditMode()){this.parent.setEditingState(!0);freetext_get(freetext_getPrototypeOf(FreeTextEditor.prototype),"disableEditMode",this).call(this);this.overlayDiv.classList.add("enabled");this.editorDiv.contentEditable=!1;this.div.setAttribute("aria-activedescendant",freetext_classPrivateFieldGet(this,rs));this._isDraggable=!0;this.editorDiv.removeEventListener("keydown",freetext_classPrivateFieldGet(this,Zo));this.editorDiv.removeEventListener("focus",freetext_classPrivateFieldGet(this,Jo));this.editorDiv.removeEventListener("blur",freetext_classPrivateFieldGet(this,$o));this.editorDiv.removeEventListener("input",freetext_classPrivateFieldGet(this,Qo));this.div.focus({preventScroll:!0});this.isEditing=!1;this.parent.div.classList.add("freetextEditing")}}},{key:"focusin",value:function focusin(t){if(this._focusEventsAllowed){freetext_get(freetext_getPrototypeOf(FreeTextEditor.prototype),"focusin",this).call(this,t);t.target!==this.editorDiv&&this.editorDiv.focus()}}},{key:"onceAdded",value:function onceAdded(){var t;if(this.width)freetext_classPrivateMethodGet(this,ds,_cheatInitialRect2).call(this);else{this.enableEditMode();this.editorDiv.focus();null!==(t=this._initialOptions)&&void 0!==t&&t.isCentered&&this.center();this._initialOptions=null}}},{key:"isEmpty",value:function isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}},{key:"remove",value:function remove(){this.isEditing=!1;if(this.parent){this.parent.setEditingState(!0);this.parent.div.classList.add("freetextEditing")}freetext_get(freetext_getPrototypeOf(FreeTextEditor.prototype),"remove",this).call(this)}},{key:"commit",value:function commit(){var t=this;if(this.isInEditMode()){freetext_get(freetext_getPrototypeOf(FreeTextEditor.prototype),"commit",this).call(this);this.disableEditMode();var r=freetext_classPrivateFieldGet(this,ts),a=freetext_classPrivateFieldSet(this,ts,freetext_classPrivateMethodGet(this,ss,_extractText2).call(this).trimEnd());if(r!==a){var i=function setText(r){freetext_classPrivateFieldSet(t,ts,r);if(r){freetext_classPrivateMethodGet(t,cs,_setContent2).call(t);t._uiManager.rebuild(t);freetext_classPrivateMethodGet(t,ls,_setEditorDimensions2).call(t)}else t.remove()};this.addCommands({cmd:function cmd(){i(a)},undo:function undo(){i(r)},mustExec:!1});freetext_classPrivateMethodGet(this,ls,_setEditorDimensions2).call(this)}}}},{key:"shouldGetKeyboardEvents",value:function shouldGetKeyboardEvents(){return this.isInEditMode()}},{key:"enterInEditMode",value:function enterInEditMode(){this.enableEditMode();this.editorDiv.focus()}},{key:"dblclick",value:function dblclick(t){this.enterInEditMode()}},{key:"keydown",value:function keydown(t){if(t.target===this.div&&"Enter"===t.key){this.enterInEditMode();t.preventDefault()}}},{key:"editorDivKeydown",value:function editorDivKeydown(t){FreeTextEditor._keyboardManager.exec(this,t)}},{key:"editorDivFocus",value:function editorDivFocus(t){this.isEditing=!0}},{key:"editorDivBlur",value:function editorDivBlur(t){this.isEditing=!1}},{key:"editorDivInput",value:function editorDivInput(t){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}},{key:"disableEditing",value:function disableEditing(){this.editorDiv.setAttribute("role","comment");this.editorDiv.removeAttribute("aria-multiline")}},{key:"enableEditing",value:function enableEditing(){this.editorDiv.setAttribute("role","textbox");this.editorDiv.setAttribute("aria-multiline",!0)}},{key:"render",value:function render(){var t,r,a=this;if(this.div)return this.div;if(this.width){t=this.x;r=this.y}freetext_get(freetext_getPrototypeOf(FreeTextEditor.prototype),"render",this).call(this);this.editorDiv=document.createElement("div");this.editorDiv.className="internal";this.editorDiv.setAttribute("id",freetext_classPrivateFieldGet(this,rs));this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text");this.enableEditing();nn._l10nPromise.get("pdfjs-free-text-default-content").then((function(t){var r;return null===(r=a.editorDiv)||void 0===r?void 0:r.setAttribute("default-content",t)}));this.editorDiv.contentEditable=!0;var i=this.editorDiv.style;i.fontSize="calc(".concat(freetext_classPrivateFieldGet(this,ns),"px * var(--scale-factor))");i.color=freetext_classPrivateFieldGet(this,es);this.div.append(this.editorDiv);this.overlayDiv=document.createElement("div");this.overlayDiv.classList.add("overlay","enabled");this.div.append(this.overlayDiv);bindEvents(this,this.div,["dblclick","keydown"]);if(this.width){var o=freetext_slicedToArray(this.parentDimensions,2),l=o[0],c=o[1];if(this.annotationElementId){var u=freetext_classPrivateFieldGet(this,as).position,d=freetext_slicedToArray(this.getInitialTranslation(),2),h=d[0],p=d[1],v=freetext_slicedToArray(this.pageTranslationToScreen(h,p),2);h=v[0];p=v[1];var y,_,g=freetext_slicedToArray(this.pageDimensions,2),m=g[0],b=g[1],w=freetext_slicedToArray(this.pageTranslation,2),P=w[0],k=w[1];switch(this.rotation){case 0:y=t+(u[0]-P)/m;_=r+this.height-(u[1]-k)/b;break;case 90:y=t+(u[0]-P)/m;_=r-(u[1]-k)/b;var A=[p,-h];h=A[0];p=A[1];break;case 180:y=t-this.width+(u[0]-P)/m;_=r-(u[1]-k)/b;var S=[-h,-p];h=S[0];p=S[1];break;case 270:y=t+(u[0]-P-this.height*b)/m;_=r+(u[1]-k-this.width*m)/b;var x=[-p,h];h=x[0];p=x[1]}this.setAt(y*l,_*c,h,p)}else this.setAt(t*l,r*c,this.width*l,this.height*c);freetext_classPrivateMethodGet(this,cs,_setContent2).call(this);this._isDraggable=!0;this.editorDiv.contentEditable=!1}else{this._isDraggable=!1;this.editorDiv.contentEditable=!0}return this.div}},{key:"contentDiv",get:function get(){return this.editorDiv}},{key:"serialize",value:function serialize(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};var r=FreeTextEditor._internalPadding*this.parentScale,a=this.getRect(r,r),i=nn._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:freetext_classPrivateFieldGet(this,es)),o={annotationType:_.FREETEXT,color:i,fontSize:freetext_classPrivateFieldGet(this,ns),value:freetext_classPrivateFieldGet(this,ts),pageIndex:this.pageIndex,rect:a,rotation:this.rotation,structTreeParentId:this._structTreeParentId};if(t)return o;if(this.annotationElementId&&!freetext_classPrivateMethodGet(this,us,_hasElementChanged2).call(this,o))return null;o.id=this.annotationElementId;return o}}],[{key:"_keyboardManager",get:function get(){var t=FreeTextEditor.prototype,r=function arrowChecker(t){return t.isEmpty()},a=dr.TRANSLATE_SMALL,i=dr.TRANSLATE_BIG;return shadow(this,"_keyboardManager",new vt([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-a,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-i,0],checker:r}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[a,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[i,0],checker:r}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-a],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-i],checker:r}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,a],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,i],checker:r}]]))}},{key:"initialize",value:function initialize(t){nn.initialize(t,{strings:["pdfjs-free-text-default-content"]});var r=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(r.getPropertyValue("--freetext-padding"))}},{key:"updateDefaultParams",value:function updateDefaultParams(t,r){switch(t){case g.FREETEXT_SIZE:FreeTextEditor._defaultFontSize=r;break;case g.FREETEXT_COLOR:FreeTextEditor._defaultColor=r}}},{key:"defaultPropertiesToUpdate",get:function get(){return[[g.FREETEXT_SIZE,FreeTextEditor._defaultFontSize],[g.FREETEXT_COLOR,FreeTextEditor._defaultColor||nn._defaultLineColor]]}},{key:"deserialize",value:function deserialize(t,r,a){var i=null;if(t instanceof wo){var o=t,l=o.data,c=l.defaultAppearanceData,u=c.fontSize,d=c.fontColor,h=l.rect,p=l.rotation,v=l.id,y=o.textContent,g=o.textPosition,m=o.parent.page.pageNumber;if(!y||0===y.length)return null;i=t={annotationType:_.FREETEXT,color:Array.from(d),fontSize:u,value:y.join("\n"),position:g,pageIndex:m-1,rect:h,rotation:p,id:v,deleted:!1}}var b=freetext_get(freetext_getPrototypeOf(FreeTextEditor),"deserialize",this).call(this,t,r,a);freetext_classPrivateFieldSet(b,ns,t.fontSize);freetext_classPrivateFieldSet(b,es,he.makeHexColor.apply(he,freetext_toConsumableArray(t.color)));freetext_classPrivateFieldSet(b,ts,t.value);b.annotationElementId=t.id||null;freetext_classPrivateFieldSet(b,as,i);return b}}]);return FreeTextEditor}(nn);zo=hs;function _updateFontSize2(t){var r=this,a=function setFontsize(t){r.editorDiv.style.fontSize="calc(".concat(t,"px * var(--scale-factor))");r.translate(0,-(t-freetext_classPrivateFieldGet(r,ns))*r.parentScale);freetext_classPrivateFieldSet(r,ns,t);freetext_classPrivateMethodGet(r,ls,_setEditorDimensions2).call(r)},i=freetext_classPrivateFieldGet(this,ns);this.addCommands({cmd:function cmd(){a(t)},undo:function undo(){a(i)},mustExec:!0,type:g.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}function _updateColor2(t){var r=this,a=freetext_classPrivateFieldGet(this,es);this.addCommands({cmd:function cmd(){freetext_classPrivateFieldSet(r,es,r.editorDiv.style.color=t)},undo:function undo(){freetext_classPrivateFieldSet(r,es,r.editorDiv.style.color=a)},mustExec:!0,type:g.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function _extractText2(){var t=this.editorDiv.getElementsByTagName("div");if(0===t.length)return this.editorDiv.innerText;var r,a=[],i=freetext_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;a.push(o.innerText.replace(/\r\n?|\n/,""))}}catch(t){i.e(t)}finally{i.f()}return a.join("\n")}function _setEditorDimensions2(){var t,r=freetext_slicedToArray(this.parentDimensions,2),a=r[0],i=r[1];if(this.isAttachedToDOM)t=this.div.getBoundingClientRect();else{var o=this.currentLayer,l=this.div,c=l.style.display;l.style.display="hidden";o.div.append(this.div);t=l.getBoundingClientRect();l.remove();l.style.display=c}if(this.rotation%180==this.parentRotation%180){this.width=t.width/a;this.height=t.height/i}else{this.width=t.height/a;this.height=t.width/i}this.fixAndSetPosition()}function _setContent2(){this.editorDiv.replaceChildren();if(freetext_classPrivateFieldGet(this,ts)){var t,r=freetext_createForOfIteratorHelper(freetext_classPrivateFieldGet(this,ts).split("\n"));try{for(r.s();!(t=r.n()).done;){var a=t.value,i=document.createElement("div");i.append(a?document.createTextNode(a):document.createElement("br"));this.editorDiv.append(i)}}catch(t){r.e(t)}finally{r.f()}}}function _hasElementChanged2(t){var r=freetext_classPrivateFieldGet(this,as),a=r.value,i=r.fontSize,o=r.color,l=r.rect,c=r.pageIndex;return t.value!==a||t.fontSize!==i||t.rect.some((function(t,r){return Math.abs(t-l[r])>=1}))||t.color.some((function(t,r){return t!==o[r]}))||t.pageIndex!==c}function _cheatInitialRect2(){var t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.annotationElementId){freetext_classPrivateMethodGet(this,ls,_setEditorDimensions2).call(this);if(r||0!==this.width&&0!==this.height){var a=zo._internalPadding*this.parentScale;freetext_classPrivateFieldGet(this,as).rect=this.getRect(a,a)}else setTimeout((function(){return freetext_classPrivateMethodGet(t,ds,_cheatInitialRect2).call(t,!0)}),0)}}freetext_defineProperty(hs,"_freeTextDefaultContent","");freetext_defineProperty(hs,"_internalPadding",0);freetext_defineProperty(hs,"_defaultColor",null);freetext_defineProperty(hs,"_defaultFontSize",10);freetext_defineProperty(hs,"_type","freetext");freetext_defineProperty(hs,"_editorType",_.FREETEXT);function ink_typeof(t){return ink_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ink_typeof(t)}function ink_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=ink_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function ink_toConsumableArray(t){return function ink_arrayWithoutHoles(t){if(Array.isArray(t))return ink_arrayLikeToArray(t)}(t)||function ink_iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ink_unsupportedIterableToArray(t)||function ink_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ink_slicedToArray(t,r){return function ink_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function ink_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||ink_unsupportedIterableToArray(t,r)||function ink_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ink_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return ink_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?ink_arrayLikeToArray(t,r):void 0}}function ink_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function ink_ownKeys(t,r){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),a.push.apply(a,i)}return a}function ink_objectSpread(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?ink_ownKeys(Object(a),!0).forEach((function(r){ink_defineProperty(t,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ink_ownKeys(Object(a)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))}))}return t}function ink_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,ink_toPropertyKey(i.key),i)}}function ink_get(){ink_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,a){var i=function ink_superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=ink_getPrototypeOf(t)););return t}(t,r);if(i){var o=Object.getOwnPropertyDescriptor(i,r);return o.get?o.get.call(arguments.length<3?t:a):o.value}};return ink_get.apply(this,arguments)}function ink_setPrototypeOf(t,r){ink_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return ink_setPrototypeOf(t,r)}function ink_createSuper(t){var r=function ink_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=ink_getPrototypeOf(t);if(r){var o=ink_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function ink_possibleConstructorReturn(t,r){if(r&&("object"===ink_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return ink_assertThisInitialized(t)}(this,a)}}function ink_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ink_getPrototypeOf(t){ink_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return ink_getPrototypeOf(t)}function ink_classPrivateMethodInitSpec(t,r){ink_checkPrivateRedeclaration(t,r);r.add(t)}function ink_defineProperty(t,r,a){(r=ink_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function ink_toPropertyKey(t){var r=function ink_toPrimitive(t,r){if("object"!=ink_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=ink_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==ink_typeof(r)?r:String(r)}function ink_classPrivateFieldInitSpec(t,r,a){ink_checkPrivateRedeclaration(t,r);r.set(t,a)}function ink_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ink_classStaticPrivateMethodGet(t,r,a){!function ink_classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return a}function ink_classPrivateFieldSet(t,r,a){!function ink_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,ink_classExtractFieldDescriptor(t,r,"set"),a);return a}function ink_classPrivateFieldGet(t,r){return function ink_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,ink_classExtractFieldDescriptor(t,r,"get"))}function ink_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function ink_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}var fs,ps=new WeakMap,vs=new WeakMap,ys=new WeakMap,_s=new WeakMap,gs=new WeakMap,ms=new WeakMap,bs=new WeakMap,ws=new WeakMap,Ps=new WeakMap,ks=new WeakMap,As=new WeakMap,Ss=new WeakMap,xs=new WeakMap,Fs=new WeakMap,Es=new WeakMap,Is=new WeakSet,Cs=new WeakSet,Ts=new WeakSet,Ms=new WeakSet,Os=new WeakSet,Gs=new WeakSet,Rs=new WeakSet,Ls=new WeakSet,Ds=new WeakSet,js=new WeakSet,Ws=new WeakSet,Ns=new WeakSet,Bs=new WeakSet,zs=new WeakSet,Hs=new WeakSet,Us=new WeakSet,qs=new WeakSet,Vs=new WeakSet,Ks=new WeakSet,Ys=new WeakSet,Xs=new WeakSet,$s=new WeakSet,Js=new WeakSet,Qs=function(t){!function ink_inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&ink_setPrototypeOf(t,r)}(InkEditor,t);var r=ink_createSuper(InkEditor);function InkEditor(t){var a;!function ink_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,InkEditor);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a=r.call(this,ink_objectSpread(ink_objectSpread({},t),{},{name:"inkEditor"}))),Js);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),$s);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Xs);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Ys);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Ks);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Vs);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),qs);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Us);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Hs);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),zs);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Bs);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Ns);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Ws);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),js);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Ds);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Ls);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Rs);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Gs);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Os);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Ms);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Ts);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Cs);ink_classPrivateMethodInitSpec(ink_assertThisInitialized(a),Is);ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),ps,{writable:!0,value:0});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),vs,{writable:!0,value:0});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),ys,{writable:!0,value:a.canvasPointermove.bind(ink_assertThisInitialized(a))});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),_s,{writable:!0,value:a.canvasPointerleave.bind(ink_assertThisInitialized(a))});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),gs,{writable:!0,value:a.canvasPointerup.bind(ink_assertThisInitialized(a))});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),ms,{writable:!0,value:a.canvasPointerdown.bind(ink_assertThisInitialized(a))});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),bs,{writable:!0,value:null});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),ws,{writable:!0,value:new Path2D});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),Ps,{writable:!0,value:!1});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),ks,{writable:!0,value:!1});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),As,{writable:!0,value:!1});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),Ss,{writable:!0,value:null});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),xs,{writable:!0,value:0});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),Fs,{writable:!0,value:0});ink_classPrivateFieldInitSpec(ink_assertThisInitialized(a),Es,{writable:!0,value:null});a.color=t.color||null;a.thickness=t.thickness||null;a.opacity=t.opacity||null;a.paths=[];a.bezierPath2D=[];a.allRawPaths=[];a.currentPath=[];a.scaleFactor=1;a.translationX=a.translationY=0;a.x=0;a.y=0;a._willKeepAspectRatio=!0;return a}!function ink_createClass(t,r,a){r&&ink_defineProperties(t.prototype,r);a&&ink_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(InkEditor,[{key:"updateParams",value:function updateParams(t,r){switch(t){case g.INK_THICKNESS:ink_classPrivateMethodGet(this,Is,_updateThickness2).call(this,r);break;case g.INK_COLOR:ink_classPrivateMethodGet(this,Cs,ink_updateColor2).call(this,r);break;case g.INK_OPACITY:ink_classPrivateMethodGet(this,Ts,_updateOpacity2).call(this,r)}}},{key:"propertiesToUpdate",get:function get(){var t;return[[g.INK_THICKNESS,this.thickness||InkEditor._defaultThickness],[g.INK_COLOR,this.color||InkEditor._defaultColor||nn._defaultLineColor],[g.INK_OPACITY,Math.round(100*(null!==(t=this.opacity)&&void 0!==t?t:InkEditor._defaultOpacity))]]}},{key:"rebuild",value:function rebuild(){if(this.parent){ink_get(ink_getPrototypeOf(InkEditor.prototype),"rebuild",this).call(this);if(null!==this.div){if(!this.canvas){ink_classPrivateMethodGet(this,Hs,_createCanvas2).call(this);ink_classPrivateMethodGet(this,Us,_createObserver2).call(this)}if(!this.isAttachedToDOM){this.parent.add(this);ink_classPrivateMethodGet(this,qs,_setCanvasDims2).call(this)}ink_classPrivateMethodGet(this,Js,_fitToContent2).call(this)}}}},{key:"remove",value:function remove(){if(null!==this.canvas){this.isEmpty()||this.commit();this.canvas.width=this.canvas.height=0;this.canvas.remove();this.canvas=null;if(ink_classPrivateFieldGet(this,bs)){clearTimeout(ink_classPrivateFieldGet(this,bs));ink_classPrivateFieldSet(this,bs,null)}ink_classPrivateFieldGet(this,Ss).disconnect();ink_classPrivateFieldSet(this,Ss,null);ink_get(ink_getPrototypeOf(InkEditor.prototype),"remove",this).call(this)}}},{key:"setParent",value:function setParent(t){!this.parent&&t?this._uiManager.removeShouldRescale(this):this.parent&&null===t&&this._uiManager.addShouldRescale(this);ink_get(ink_getPrototypeOf(InkEditor.prototype),"setParent",this).call(this,t)}},{key:"onScaleChanging",value:function onScaleChanging(){var t=ink_slicedToArray(this.parentDimensions,2),r=t[0],a=t[1],i=this.width*r,o=this.height*a;this.setDimensions(i,o)}},{key:"enableEditMode",value:function enableEditMode(){if(!ink_classPrivateFieldGet(this,Ps)&&null!==this.canvas){ink_get(ink_getPrototypeOf(InkEditor.prototype),"enableEditMode",this).call(this);this._isDraggable=!1;this.canvas.addEventListener("pointerdown",ink_classPrivateFieldGet(this,ms))}}},{key:"disableEditMode",value:function disableEditMode(){if(this.isInEditMode()&&null!==this.canvas){ink_get(ink_getPrototypeOf(InkEditor.prototype),"disableEditMode",this).call(this);this._isDraggable=!this.isEmpty();this.div.classList.remove("editing");this.canvas.removeEventListener("pointerdown",ink_classPrivateFieldGet(this,ms))}}},{key:"onceAdded",value:function onceAdded(){this._isDraggable=!this.isEmpty()}},{key:"isEmpty",value:function isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}},{key:"commit",value:function commit(){if(!ink_classPrivateFieldGet(this,Ps)){ink_get(ink_getPrototypeOf(InkEditor.prototype),"commit",this).call(this);this.isEditing=!1;this.disableEditMode();this.setInForeground();ink_classPrivateFieldSet(this,Ps,!0);this.div.classList.add("disabled");ink_classPrivateMethodGet(this,Js,_fitToContent2).call(this,!0);this.select();this.parent.addInkEditorIfNeeded(!0);this.moveInDOM();this.div.focus({preventScroll:!0})}}},{key:"focusin",value:function focusin(t){if(this._focusEventsAllowed){ink_get(ink_getPrototypeOf(InkEditor.prototype),"focusin",this).call(this,t);this.enableEditMode()}}},{key:"canvasPointerdown",value:function canvasPointerdown(t){if(0===t.button&&this.isInEditMode()&&!ink_classPrivateFieldGet(this,Ps)){this.setInForeground();t.preventDefault();"mouse"===t.pointerType||this.div.contains(document.activeElement)||this.div.focus({preventScroll:!0});ink_classPrivateMethodGet(this,Gs,_startDrawing2).call(this,t.offsetX,t.offsetY)}}},{key:"canvasPointermove",value:function canvasPointermove(t){t.preventDefault();ink_classPrivateMethodGet(this,Rs,_draw2).call(this,t.offsetX,t.offsetY)}},{key:"canvasPointerup",value:function canvasPointerup(t){t.preventDefault();ink_classPrivateMethodGet(this,zs,_endDrawing2).call(this,t)}},{key:"canvasPointerleave",value:function canvasPointerleave(t){ink_classPrivateMethodGet(this,zs,_endDrawing2).call(this,t)}},{key:"isResizable",get:function get(){return!this.isEmpty()&&ink_classPrivateFieldGet(this,Ps)}},{key:"render",value:function render(){if(this.div)return this.div;var t,r;if(this.width){t=this.x;r=this.y}ink_get(ink_getPrototypeOf(InkEditor.prototype),"render",this).call(this);this.div.setAttribute("data-l10n-id","pdfjs-ink");var a=ink_slicedToArray(ink_classPrivateMethodGet(this,Ms,_getInitialBBox2).call(this),4),i=a[0],o=a[1],l=a[2],c=a[3];this.setAt(i,o,0,0);this.setDims(l,c);ink_classPrivateMethodGet(this,Hs,_createCanvas2).call(this);if(this.width){var u=ink_slicedToArray(this.parentDimensions,2),d=u[0],h=u[1];this.setAspectRatio(this.width*d,this.height*h);this.setAt(t*d,r*h,this.width*d,this.height*h);ink_classPrivateFieldSet(this,As,!0);ink_classPrivateMethodGet(this,qs,_setCanvasDims2).call(this);this.setDims(this.width*d,this.height*h);ink_classPrivateMethodGet(this,Bs,_redraw2).call(this);this.div.classList.add("disabled")}else{this.div.classList.add("editing");this.enableEditMode()}ink_classPrivateMethodGet(this,Us,_createObserver2).call(this);return this.div}},{key:"setDimensions",value:function setDimensions(t,r){var a=Math.round(t),i=Math.round(r);if(ink_classPrivateFieldGet(this,xs)!==a||ink_classPrivateFieldGet(this,Fs)!==i){ink_classPrivateFieldSet(this,xs,a);ink_classPrivateFieldSet(this,Fs,i);this.canvas.style.visibility="hidden";var o=ink_slicedToArray(this.parentDimensions,2),l=o[0],c=o[1];this.width=t/l;this.height=r/c;this.fixAndSetPosition();ink_classPrivateFieldGet(this,Ps)&&ink_classPrivateMethodGet(this,Vs,_setScaleFactor2).call(this,t,r);ink_classPrivateMethodGet(this,qs,_setCanvasDims2).call(this);ink_classPrivateMethodGet(this,Bs,_redraw2).call(this);this.canvas.style.visibility="visible";this.fixDims()}}},{key:"serialize",value:function serialize(){if(this.isEmpty())return null;var t=this.getRect(0,0),r=nn._colorManager.convert(this.ctx.strokeStyle);return{annotationType:_.INK,color:r,thickness:this.thickness,opacity:this.opacity,paths:ink_classPrivateMethodGet(this,Ys,_serializePaths2).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,t),pageIndex:this.pageIndex,rect:t,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}}],[{key:"initialize",value:function initialize(t){nn.initialize(t)}},{key:"updateDefaultParams",value:function updateDefaultParams(t,r){switch(t){case g.INK_THICKNESS:InkEditor._defaultThickness=r;break;case g.INK_COLOR:InkEditor._defaultColor=r;break;case g.INK_OPACITY:InkEditor._defaultOpacity=r/100}}},{key:"defaultPropertiesToUpdate",get:function get(){return[[g.INK_THICKNESS,InkEditor._defaultThickness],[g.INK_COLOR,InkEditor._defaultColor||nn._defaultLineColor],[g.INK_OPACITY,Math.round(100*InkEditor._defaultOpacity)]]}},{key:"deserialize",value:function deserialize(t,r,a){if(t instanceof Oo)return null;var i=ink_get(ink_getPrototypeOf(InkEditor),"deserialize",this).call(this,t,r,a);i.thickness=t.thickness;i.color=he.makeHexColor.apply(he,ink_toConsumableArray(t.color));i.opacity=t.opacity;var o=ink_slicedToArray(i.pageDimensions,2),l=o[0],c=o[1],u=i.width*l,d=i.height*c,h=i.parentScale,p=t.thickness/2;ink_classPrivateFieldSet(i,Ps,!0);ink_classPrivateFieldSet(i,xs,Math.round(u));ink_classPrivateFieldSet(i,Fs,Math.round(d));var v,y=t.paths,_=t.rect,g=t.rotation,m=ink_createForOfIteratorHelper(y);try{for(m.s();!(v=m.n()).done;){var b=v.value.bezier;b=ink_classStaticPrivateMethodGet(InkEditor,InkEditor,_fromPDFCoordinates).call(InkEditor,b,_,g);var w=[];i.paths.push(w);for(var P=h*(b[0]-p),k=h*(b[1]-p),A=2,S=b.length;A<S;A+=6){var x=h*(b[A]-p),E=h*(b[A+1]-p),I=h*(b[A+2]-p),C=h*(b[A+3]-p),T=h*(b[A+4]-p),M=h*(b[A+5]-p);w.push([[P,k],[x,E],[I,C],[T,M]]);P=T;k=M}var O=ink_classStaticPrivateMethodGet(this,InkEditor,_buildPath2D).call(this,w);i.bezierPath2D.push(O)}}catch(t){m.e(t)}finally{m.f()}var G=ink_classPrivateMethodGet(i,Xs,_getBbox2).call(i);ink_classPrivateFieldSet(i,vs,Math.max(nn.MIN_SIZE,G[2]-G[0]));ink_classPrivateFieldSet(i,ps,Math.max(nn.MIN_SIZE,G[3]-G[1]));ink_classPrivateMethodGet(i,Vs,_setScaleFactor2).call(i,u,d);return i}}]);return InkEditor}(nn);Xo=Qs;function _updateThickness2(t){var r=this,a=this.thickness;this.addCommands({cmd:function cmd(){r.thickness=t;ink_classPrivateMethodGet(r,Js,_fitToContent2).call(r)},undo:function undo(){r.thickness=a;ink_classPrivateMethodGet(r,Js,_fitToContent2).call(r)},mustExec:!0,type:g.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}function ink_updateColor2(t){var r=this,a=this.color;this.addCommands({cmd:function cmd(){r.color=t;ink_classPrivateMethodGet(r,Bs,_redraw2).call(r)},undo:function undo(){r.color=a;ink_classPrivateMethodGet(r,Bs,_redraw2).call(r)},mustExec:!0,type:g.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function _updateOpacity2(t){var r=this;t/=100;var a=this.opacity;this.addCommands({cmd:function cmd(){r.opacity=t;ink_classPrivateMethodGet(r,Bs,_redraw2).call(r)},undo:function undo(){r.opacity=a;ink_classPrivateMethodGet(r,Bs,_redraw2).call(r)},mustExec:!0,type:g.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}function _getInitialBBox2(){var t=this.parentRotation,r=ink_slicedToArray(this.parentDimensions,2),a=r[0],i=r[1];switch(t){case 90:return[0,i,i,a];case 180:return[a,i,a,i];case 270:return[a,0,i,a];default:return[0,0,a,i]}}function _setStroke2(){var t=this.ctx,r=this.color,a=this.opacity,i=this.thickness,o=this.parentScale,l=this.scaleFactor;t.lineWidth=i*o/l;t.lineCap="round";t.lineJoin="round";t.miterLimit=10;t.strokeStyle="".concat(r).concat(function opacityToHex(t){return Math.round(Math.min(255,Math.max(1,255*t))).toString(16).padStart(2,"0")}(a))}function _startDrawing2(t,r){var a=this;this.canvas.addEventListener("contextmenu",noContextMenu);this.canvas.addEventListener("pointerleave",ink_classPrivateFieldGet(this,_s));this.canvas.addEventListener("pointermove",ink_classPrivateFieldGet(this,ys));this.canvas.addEventListener("pointerup",ink_classPrivateFieldGet(this,gs));this.canvas.removeEventListener("pointerdown",ink_classPrivateFieldGet(this,ms));this.isEditing=!0;if(!ink_classPrivateFieldGet(this,As)){var i;ink_classPrivateFieldSet(this,As,!0);ink_classPrivateMethodGet(this,qs,_setCanvasDims2).call(this);this.thickness||(this.thickness=Xo._defaultThickness);this.color||(this.color=Xo._defaultColor||nn._defaultLineColor);null!==(i=this.opacity)&&void 0!==i||(this.opacity=Xo._defaultOpacity)}this.currentPath.push([t,r]);ink_classPrivateFieldSet(this,ks,!1);ink_classPrivateMethodGet(this,Os,_setStroke2).call(this);ink_classPrivateFieldSet(this,Es,(function(){ink_classPrivateMethodGet(a,js,_drawPoints2).call(a);ink_classPrivateFieldGet(a,Es)&&window.requestAnimationFrame(ink_classPrivateFieldGet(a,Es))}));window.requestAnimationFrame(ink_classPrivateFieldGet(this,Es))}function _draw2(t,r){var a,i=ink_slicedToArray(this.currentPath.at(-1),2),o=i[0],l=i[1];if(!(this.currentPath.length>1&&t===o&&r===l)){var c=this.currentPath,u=ink_classPrivateFieldGet(this,ws);c.push([t,r]);ink_classPrivateFieldSet(this,ks,!0);if(c.length<=2){var d;(d=u).moveTo.apply(d,ink_toConsumableArray(c[0]));u.lineTo(t,r)}else{if(3===c.length){var h;ink_classPrivateFieldSet(this,ws,u=new Path2D);(h=u).moveTo.apply(h,ink_toConsumableArray(c[0]))}(a=ink_classPrivateMethodGet(this,Ws,_makeBezierCurve2)).call.apply(a,[this,u].concat(ink_toConsumableArray(c.at(-3)),ink_toConsumableArray(c.at(-2)),[t,r]))}}}function _endPath2(){var t;if(0!==this.currentPath.length){var r=this.currentPath.at(-1);(t=ink_classPrivateFieldGet(this,ws)).lineTo.apply(t,ink_toConsumableArray(r))}}function _stopDrawing2(t,r){var a,i=this;ink_classPrivateFieldSet(this,Es,null);t=Math.min(Math.max(t,0),this.canvas.width);r=Math.min(Math.max(r,0),this.canvas.height);ink_classPrivateMethodGet(this,Rs,_draw2).call(this,t,r);ink_classPrivateMethodGet(this,Ls,_endPath2).call(this);if(1!==this.currentPath.length)a=ink_classPrivateMethodGet(this,Ns,_generateBezierPoints2).call(this);else{var o=[t,r];a=[[o,o.slice(),o.slice(),o]]}var l=ink_classPrivateFieldGet(this,ws),c=this.currentPath;this.currentPath=[];ink_classPrivateFieldSet(this,ws,new Path2D);this.addCommands({cmd:function cmd(){i.allRawPaths.push(c);i.paths.push(a);i.bezierPath2D.push(l);i.rebuild()},undo:function undo(){i.allRawPaths.pop();i.paths.pop();i.bezierPath2D.pop();if(0===i.paths.length)i.remove();else{if(!i.canvas){ink_classPrivateMethodGet(i,Hs,_createCanvas2).call(i);ink_classPrivateMethodGet(i,Us,_createObserver2).call(i)}ink_classPrivateMethodGet(i,Js,_fitToContent2).call(i)}},mustExec:!0})}function _drawPoints2(){if(ink_classPrivateFieldGet(this,ks)){ink_classPrivateFieldSet(this,ks,!1);var t=Math.ceil(this.thickness*this.parentScale),r=this.currentPath.slice(-3),a=r.map((function(t){return t[0]})),i=r.map((function(t){return t[1]})),o=(Math.min.apply(Math,ink_toConsumableArray(a)),Math.max.apply(Math,ink_toConsumableArray(a)),Math.min.apply(Math,ink_toConsumableArray(i)),Math.max.apply(Math,ink_toConsumableArray(i)),this.ctx);o.save();o.clearRect(0,0,this.canvas.width,this.canvas.height);var l,c=ink_createForOfIteratorHelper(this.bezierPath2D);try{for(c.s();!(l=c.n()).done;){var u=l.value;o.stroke(u)}}catch(t){c.e(t)}finally{c.f()}o.stroke(ink_classPrivateFieldGet(this,ws));o.restore()}}function _makeBezierCurve2(t,r,a,i,o,l,c){var u=(r+i)/2,d=(a+o)/2,h=(i+l)/2,p=(o+c)/2;t.bezierCurveTo(u+2*(i-u)/3,d+2*(o-d)/3,h+2*(i-h)/3,p+2*(o-p)/3,h,p)}function _generateBezierPoints2(){var t=this.currentPath;if(t.length<=2)return[[t[0],t[0],t.at(-1),t.at(-1)]];var r,a=[],i=ink_slicedToArray(t[0],2),o=i[0],l=i[1];for(r=1;r<t.length-2;r++){var c=ink_slicedToArray(t[r],2),u=c[0],d=c[1],h=ink_slicedToArray(t[r+1],2),p=(u+h[0])/2,v=(d+h[1])/2,y=[o+2*(u-o)/3,l+2*(d-l)/3],_=[p+2*(u-p)/3,v+2*(d-v)/3];a.push([[o,l],y,_,[p,v]]);o=p;l=v}var g=ink_slicedToArray(t[r],2),m=g[0],b=g[1],w=ink_slicedToArray(t[r+1],2),P=w[0],k=w[1],A=[o+2*(m-o)/3,l+2*(b-l)/3],S=[P+2*(m-P)/3,k+2*(b-k)/3];a.push([[o,l],A,S,[P,k]]);return a}function _redraw2(){if(this.isEmpty())ink_classPrivateMethodGet(this,Ks,_updateTransform2).call(this);else{ink_classPrivateMethodGet(this,Os,_setStroke2).call(this);var t=this.canvas,r=this.ctx;r.setTransform(1,0,0,1,0,0);r.clearRect(0,0,t.width,t.height);ink_classPrivateMethodGet(this,Ks,_updateTransform2).call(this);var a,i=ink_createForOfIteratorHelper(this.bezierPath2D);try{for(i.s();!(a=i.n()).done;){var o=a.value;r.stroke(o)}}catch(t){i.e(t)}finally{i.f()}}}function _endDrawing2(t){var r=this;this.canvas.removeEventListener("pointerleave",ink_classPrivateFieldGet(this,_s));this.canvas.removeEventListener("pointermove",ink_classPrivateFieldGet(this,ys));this.canvas.removeEventListener("pointerup",ink_classPrivateFieldGet(this,gs));this.canvas.addEventListener("pointerdown",ink_classPrivateFieldGet(this,ms));ink_classPrivateFieldGet(this,bs)&&clearTimeout(ink_classPrivateFieldGet(this,bs));ink_classPrivateFieldSet(this,bs,setTimeout((function(){ink_classPrivateFieldSet(r,bs,null);r.canvas.removeEventListener("contextmenu",noContextMenu)}),10));ink_classPrivateMethodGet(this,Ds,_stopDrawing2).call(this,t.offsetX,t.offsetY);this.addToAnnotationStorage();this.setInBackground()}function _createCanvas2(){this.canvas=document.createElement("canvas");this.canvas.width=this.canvas.height=0;this.canvas.className="inkEditorCanvas";this.canvas.setAttribute("data-l10n-id","pdfjs-ink-canvas");this.div.append(this.canvas);var t=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0;this.ctx=this.canvas.getContext("2d",t)}function _createObserver2(){var t=this;ink_classPrivateFieldSet(this,Ss,new ResizeObserver((function(r){var a=r[0].contentRect;a.width&&a.height&&t.setDimensions(a.width,a.height)})));ink_classPrivateFieldGet(this,Ss).observe(this.div)}function _setCanvasDims2(){if(ink_classPrivateFieldGet(this,As)){var t=ink_slicedToArray(this.parentDimensions,2),r=t[0],a=t[1];this.canvas.width=Math.ceil(this.width*r);this.canvas.height=Math.ceil(this.height*a);ink_classPrivateMethodGet(this,Ks,_updateTransform2).call(this)}}function _setScaleFactor2(t,r){var a=ink_classPrivateMethodGet(this,$s,_getPadding2).call(this),i=(t-a)/ink_classPrivateFieldGet(this,vs),o=(r-a)/ink_classPrivateFieldGet(this,ps);this.scaleFactor=Math.min(i,o)}function _updateTransform2(){var t=ink_classPrivateMethodGet(this,$s,_getPadding2).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+t,this.translationY*this.scaleFactor+t)}function _buildPath2D(t){for(var r=new Path2D,a=0,i=t.length;a<i;a++){var o=ink_slicedToArray(t[a],4),l=o[0],c=o[1],u=o[2],d=o[3];0===a&&r.moveTo.apply(r,ink_toConsumableArray(l));r.bezierCurveTo(c[0],c[1],u[0],u[1],d[0],d[1])}return r}function _toPDFCoordinates(t,r,a){var i=ink_slicedToArray(r,4),o=i[0],l=i[1],c=i[2],u=i[3];switch(a){case 0:for(var d=0,h=t.length;d<h;d+=2){t[d]+=o;t[d+1]=u-t[d+1]}break;case 90:for(var p=0,v=t.length;p<v;p+=2){var y=t[p];t[p]=t[p+1]+o;t[p+1]=y+l}break;case 180:for(var _=0,g=t.length;_<g;_+=2){t[_]=c-t[_];t[_+1]+=l}break;case 270:for(var m=0,b=t.length;m<b;m+=2){var w=t[m];t[m]=c-t[m+1];t[m+1]=u-w}break;default:throw new Error("Invalid rotation")}return t}function _fromPDFCoordinates(t,r,a){var i=ink_slicedToArray(r,4),o=i[0],l=i[1],c=i[2],u=i[3];switch(a){case 0:for(var d=0,h=t.length;d<h;d+=2){t[d]-=o;t[d+1]=u-t[d+1]}break;case 90:for(var p=0,v=t.length;p<v;p+=2){var y=t[p];t[p]=t[p+1]-l;t[p+1]=y-o}break;case 180:for(var _=0,g=t.length;_<g;_+=2){t[_]=c-t[_];t[_+1]-=l}break;case 270:for(var m=0,b=t.length;m<b;m+=2){var w=t[m];t[m]=u-t[m+1];t[m+1]=c-w}break;default:throw new Error("Invalid rotation")}return t}function _serializePaths2(t,r,a,i){var o,l=[],c=this.thickness/2,u=t*r+c,d=t*a+c,h=ink_createForOfIteratorHelper(this.paths);try{for(h.s();!(o=h.n()).done;){for(var p=o.value,v=[],y=[],_=0,g=p.length;_<g;_++){var m=ink_slicedToArray(p[_],4),b=m[0],w=m[1],P=m[2],k=m[3],A=t*b[0]+u,S=t*b[1]+d,x=t*w[0]+u,E=t*w[1]+d,I=t*P[0]+u,C=t*P[1]+d,T=t*k[0]+u,M=t*k[1]+d;if(0===_){v.push(A,S);y.push(A,S)}v.push(x,E,I,C,T,M);y.push(x,E);_===g-1&&y.push(T,M)}l.push({bezier:ink_classStaticPrivateMethodGet(Xo,Xo,_toPDFCoordinates).call(Xo,v,i,this.rotation),points:ink_classStaticPrivateMethodGet(Xo,Xo,_toPDFCoordinates).call(Xo,y,i,this.rotation)})}}catch(t){h.e(t)}finally{h.f()}return l}function _getBbox2(){var t,r=1/0,a=-1/0,i=1/0,o=-1/0,l=ink_createForOfIteratorHelper(this.paths);try{for(l.s();!(t=l.n()).done;){var c,u=ink_createForOfIteratorHelper(t.value);try{for(u.s();!(c=u.n()).done;){var d=ink_slicedToArray(c.value,4),h=d[0],p=d[1],v=d[2],y=d[3],_=he.bezierBoundingBox.apply(he,ink_toConsumableArray(h).concat(ink_toConsumableArray(p),ink_toConsumableArray(v),ink_toConsumableArray(y)));r=Math.min(r,_[0]);i=Math.min(i,_[1]);a=Math.max(a,_[2]);o=Math.max(o,_[3])}}catch(t){u.e(t)}finally{u.f()}}}catch(t){l.e(t)}finally{l.f()}return[r,i,a,o]}function _getPadding2(){return ink_classPrivateFieldGet(this,Ps)?Math.ceil(this.thickness*this.parentScale):0}function _fitToContent2(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isEmpty())if(ink_classPrivateFieldGet(this,Ps)){var r=ink_classPrivateMethodGet(this,Xs,_getBbox2).call(this),a=ink_classPrivateMethodGet(this,$s,_getPadding2).call(this);ink_classPrivateFieldSet(this,vs,Math.max(nn.MIN_SIZE,r[2]-r[0]));ink_classPrivateFieldSet(this,ps,Math.max(nn.MIN_SIZE,r[3]-r[1]));var i=Math.ceil(a+ink_classPrivateFieldGet(this,vs)*this.scaleFactor),o=Math.ceil(a+ink_classPrivateFieldGet(this,ps)*this.scaleFactor),l=ink_slicedToArray(this.parentDimensions,2),c=l[0],u=l[1];this.width=i/c;this.height=o/u;this.setAspectRatio(i,o);var d=this.translationX,h=this.translationY;this.translationX=-r[0];this.translationY=-r[1];ink_classPrivateMethodGet(this,qs,_setCanvasDims2).call(this);ink_classPrivateMethodGet(this,Bs,_redraw2).call(this);ink_classPrivateFieldSet(this,xs,i);ink_classPrivateFieldSet(this,Fs,o);this.setDims(i,o);var p=t?a/this.scaleFactor/2:0;this.translate(d-this.translationX-p,h-this.translationY-p)}else ink_classPrivateMethodGet(this,Bs,_redraw2).call(this)}ink_defineProperty(Qs,"_defaultColor",null);ink_defineProperty(Qs,"_defaultOpacity",1);ink_defineProperty(Qs,"_defaultThickness",1);ink_defineProperty(Qs,"_type","ink");ink_defineProperty(Qs,"_editorType",_.INK);function stamp_typeof(t){return stamp_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},stamp_typeof(t)}function stamp_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */stamp_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,r,a){t[r]=a.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(i||[]);return o(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(values([])));b&&b!==a&&i.call(b,c)&&(g=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==stamp_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,a,i){var o=h;return function(l,c){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===l)throw c;return{value:t,done:!0}}for(i.method=l,i.arg=c;;){var u=i.delegate;if(u){var d=maybeInvokeDelegate(u,i);if(d){if(d===_)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=v;var g=tryCatch(r,a,i);if("normal"===g.type){if(o=i.done?y:p,g.arg===_)continue;return{value:g.arg,done:i.done}}"throw"===g.type&&(o=y,i.method="throw",i.arg=g.arg)}}}function maybeInvokeDelegate(r,a){var i=a.method,o=r.iterator[i];if(o===t)return a.delegate=null,"throw"===i&&r.iterator.return&&(a.method="return",a.arg=t,maybeInvokeDelegate(r,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var l=tryCatch(o,r.iterator,a.arg);if("throw"===l.type)return a.method="throw",a.arg=l.arg,a.delegate=null,_;var c=l.arg;return c?c.done?(a[r.resultName]=c.value,a.next=r.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):c:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,l=function next(){for(;++o<r.length;)if(i.call(r,o))return next.value=r[o],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(stamp_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,d,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(t,a,i,o),l);return r.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,d,"Generator"),define(w,c,(function(){return this})),define(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var a=this;function handle(i,o){return c.type="throw",c.arg=r,a.next=i,o&&(a.method="next",a.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,_):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,a,i){return this.delegate={iterator:values(r),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=t),_}},r}function stamp_asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function stamp_asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){stamp_asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){stamp_asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function stamp_slicedToArray(t,r){return function stamp_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function stamp_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||function stamp_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return stamp_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return stamp_arrayLikeToArray(t,r)}(t,r)||function stamp_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function stamp_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function stamp_ownKeys(t,r){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),a.push.apply(a,i)}return a}function stamp_objectSpread(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?stamp_ownKeys(Object(a),!0).forEach((function(r){stamp_defineProperty(t,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):stamp_ownKeys(Object(a)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))}))}return t}function stamp_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,stamp_toPropertyKey(i.key),i)}}function stamp_get(){stamp_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,a){var i=function stamp_superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=stamp_getPrototypeOf(t)););return t}(t,r);if(i){var o=Object.getOwnPropertyDescriptor(i,r);return o.get?o.get.call(arguments.length<3?t:a):o.value}};return stamp_get.apply(this,arguments)}function stamp_setPrototypeOf(t,r){stamp_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return stamp_setPrototypeOf(t,r)}function stamp_createSuper(t){var r=function stamp_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=stamp_getPrototypeOf(t);if(r){var o=stamp_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function stamp_possibleConstructorReturn(t,r){if(r&&("object"===stamp_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return stamp_assertThisInitialized(t)}(this,a)}}function stamp_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function stamp_getPrototypeOf(t){stamp_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return stamp_getPrototypeOf(t)}function stamp_classPrivateMethodInitSpec(t,r){stamp_checkPrivateRedeclaration(t,r);r.add(t)}function stamp_defineProperty(t,r,a){(r=stamp_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function stamp_toPropertyKey(t){var r=function stamp_toPrimitive(t,r){if("object"!=stamp_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=stamp_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==stamp_typeof(r)?r:String(r)}function stamp_classPrivateFieldInitSpec(t,r,a){stamp_checkPrivateRedeclaration(t,r);r.set(t,a)}function stamp_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function stamp_classPrivateFieldGet(t,r){return function stamp_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,stamp_classExtractFieldDescriptor(t,r,"get"))}function stamp_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function stamp_classPrivateFieldSet(t,r,a){!function stamp_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,stamp_classExtractFieldDescriptor(t,r,"set"),a);return a}function stamp_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var Zs,el=new WeakMap,tl=new WeakMap,rl=new WeakMap,nl=new WeakMap,al=new WeakMap,il=new WeakMap,ol=new WeakMap,sl=new WeakMap,ll=new WeakMap,cl=new WeakMap,ul=new WeakMap,dl=new WeakSet,hl=new WeakSet,fl=new WeakSet,pl=new WeakSet,vl=new WeakSet,yl=new WeakSet,_l=new WeakSet,gl=new WeakSet,ml=new WeakSet,bl=function(t){!function stamp_inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&stamp_setPrototypeOf(t,r)}(StampEditor,t);var r=stamp_createSuper(StampEditor);function StampEditor(t){var a;!function stamp_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,StampEditor);stamp_classPrivateMethodInitSpec(stamp_assertThisInitialized(a=r.call(this,stamp_objectSpread(stamp_objectSpread({},t),{},{name:"stampEditor"}))),ml);stamp_classPrivateMethodInitSpec(stamp_assertThisInitialized(a),gl);stamp_classPrivateMethodInitSpec(stamp_assertThisInitialized(a),_l);stamp_classPrivateMethodInitSpec(stamp_assertThisInitialized(a),yl);stamp_classPrivateMethodInitSpec(stamp_assertThisInitialized(a),vl);stamp_classPrivateMethodInitSpec(stamp_assertThisInitialized(a),pl);stamp_classPrivateMethodInitSpec(stamp_assertThisInitialized(a),fl);stamp_classPrivateMethodInitSpec(stamp_assertThisInitialized(a),hl);stamp_classPrivateMethodInitSpec(stamp_assertThisInitialized(a),dl);stamp_classPrivateFieldInitSpec(stamp_assertThisInitialized(a),el,{writable:!0,value:null});stamp_classPrivateFieldInitSpec(stamp_assertThisInitialized(a),tl,{writable:!0,value:null});stamp_classPrivateFieldInitSpec(stamp_assertThisInitialized(a),rl,{writable:!0,value:null});stamp_classPrivateFieldInitSpec(stamp_assertThisInitialized(a),nl,{writable:!0,value:null});stamp_classPrivateFieldInitSpec(stamp_assertThisInitialized(a),al,{writable:!0,value:null});stamp_classPrivateFieldInitSpec(stamp_assertThisInitialized(a),il,{writable:!0,value:""});stamp_classPrivateFieldInitSpec(stamp_assertThisInitialized(a),ol,{writable:!0,value:null});stamp_classPrivateFieldInitSpec(stamp_assertThisInitialized(a),sl,{writable:!0,value:null});stamp_classPrivateFieldInitSpec(stamp_assertThisInitialized(a),ll,{writable:!0,value:null});stamp_classPrivateFieldInitSpec(stamp_assertThisInitialized(a),cl,{writable:!0,value:!1});stamp_classPrivateFieldInitSpec(stamp_assertThisInitialized(a),ul,{writable:!0,value:!1});stamp_classPrivateFieldSet(stamp_assertThisInitialized(a),nl,t.bitmapUrl);stamp_classPrivateFieldSet(stamp_assertThisInitialized(a),al,t.bitmapFile);return a}!function stamp_createClass(t,r,a){r&&stamp_defineProperties(t.prototype,r);a&&stamp_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(StampEditor,[{key:"remove",value:function remove(){if(stamp_classPrivateFieldGet(this,tl)){var t,r;stamp_classPrivateFieldSet(this,el,null);this._uiManager.imageManager.deleteId(stamp_classPrivateFieldGet(this,tl));null===(t=stamp_classPrivateFieldGet(this,ol))||void 0===t||t.remove();stamp_classPrivateFieldSet(this,ol,null);null===(r=stamp_classPrivateFieldGet(this,sl))||void 0===r||r.disconnect();stamp_classPrivateFieldSet(this,sl,null);if(stamp_classPrivateFieldGet(this,ll)){clearTimeout(stamp_classPrivateFieldGet(this,ll));stamp_classPrivateFieldSet(this,ll,null)}}stamp_get(stamp_getPrototypeOf(StampEditor.prototype),"remove",this).call(this)}},{key:"rebuild",value:function rebuild(){if(this.parent){stamp_get(stamp_getPrototypeOf(StampEditor.prototype),"rebuild",this).call(this);if(null!==this.div){stamp_classPrivateFieldGet(this,tl)&&stamp_classPrivateMethodGet(this,fl,_getBitmap2).call(this);this.isAttachedToDOM||this.parent.add(this)}}else stamp_classPrivateFieldGet(this,tl)&&stamp_classPrivateMethodGet(this,fl,_getBitmap2).call(this)}},{key:"onceAdded",value:function onceAdded(){this._isDraggable=!0;this.div.focus()}},{key:"isEmpty",value:function isEmpty(){return!(stamp_classPrivateFieldGet(this,rl)||stamp_classPrivateFieldGet(this,el)||stamp_classPrivateFieldGet(this,nl)||stamp_classPrivateFieldGet(this,al))}},{key:"isResizable",get:function get(){return!0}},{key:"render",value:function render(){if(this.div)return this.div;var t,r;if(this.width){t=this.x;r=this.y}stamp_get(stamp_getPrototypeOf(StampEditor.prototype),"render",this).call(this);this.div.hidden=!0;stamp_classPrivateFieldGet(this,el)?stamp_classPrivateMethodGet(this,pl,stamp_createCanvas2).call(this):stamp_classPrivateMethodGet(this,fl,_getBitmap2).call(this);if(this.width){var a=stamp_slicedToArray(this.parentDimensions,2),i=a[0],o=a[1];this.setAt(t*i,r*o,this.width*i,this.height*o)}return this.div}},{key:"getImageForAltText",value:function getImageForAltText(){return stamp_classPrivateFieldGet(this,ol)}},{key:"serialize",value:function serialize(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isEmpty())return null;var a={annotationType:_.STAMP,bitmapId:stamp_classPrivateFieldGet(this,tl),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:stamp_classPrivateFieldGet(this,cl),structTreeParentId:this._structTreeParentId};if(t){a.bitmapUrl=stamp_classPrivateMethodGet(this,gl,_serializeBitmap2).call(this,!0);a.accessibilityData=this.altTextData;return a}var i=this.altTextData,o=i.decorative,l=i.altText;!o&&l&&(a.accessibilityData={type:"Figure",alt:l});if(null===r)return a;r.stamps||(r.stamps=new Map);var c=stamp_classPrivateFieldGet(this,cl)?(a.rect[2]-a.rect[0])*(a.rect[3]-a.rect[1]):null;if(r.stamps.has(stamp_classPrivateFieldGet(this,tl))){if(stamp_classPrivateFieldGet(this,cl)){var u=r.stamps.get(stamp_classPrivateFieldGet(this,tl));if(c>u.area){u.area=c;u.serialized.bitmap.close();u.serialized.bitmap=stamp_classPrivateMethodGet(this,gl,_serializeBitmap2).call(this,!1)}}}else{r.stamps.set(stamp_classPrivateFieldGet(this,tl),{area:c,serialized:a});a.bitmap=stamp_classPrivateMethodGet(this,gl,_serializeBitmap2).call(this,!1)}return a}}],[{key:"initialize",value:function initialize(t){nn.initialize(t)}},{key:"supportedTypes",get:function get(){return shadow(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((function(t){return"image/".concat(t)})))}},{key:"supportedTypesStr",get:function get(){return shadow(this,"supportedTypesStr",this.supportedTypes.join(","))}},{key:"isHandlingMimeForPasting",value:function isHandlingMimeForPasting(t){return this.supportedTypes.includes(t)}},{key:"paste",value:function paste(t,r){r.pasteEditor(_.STAMP,{bitmapFile:t.getAsFile()})}},{key:"deserialize",value:function deserialize(t,r,a){if(t instanceof jo)return null;var i=stamp_get(stamp_getPrototypeOf(StampEditor),"deserialize",this).call(this,t,r,a),o=t.rect,l=t.bitmapUrl,c=t.bitmapId,u=t.isSvg,d=t.accessibilityData;c&&a.imageManager.isValidId(c)?stamp_classPrivateFieldSet(i,tl,c):stamp_classPrivateFieldSet(i,nl,l);stamp_classPrivateFieldSet(i,cl,u);var h=stamp_slicedToArray(i.pageDimensions,2),p=h[0],v=h[1];i.width=(o[2]-o[0])/p;i.height=(o[3]-o[1])/v;d&&(i.altTextData=d);return i}}]);return StampEditor}(nn);fs=bl;function _getBitmapFetched2(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t){stamp_classPrivateFieldSet(this,el,t.bitmap);if(!r){stamp_classPrivateFieldSet(this,tl,t.id);stamp_classPrivateFieldSet(this,cl,t.isSvg)}t.file&&stamp_classPrivateFieldSet(this,il,t.file.name);stamp_classPrivateMethodGet(this,pl,stamp_createCanvas2).call(this)}else this.remove()}function _getBitmapDone2(){stamp_classPrivateFieldSet(this,rl,null);this._uiManager.enableWaiting(!1);stamp_classPrivateFieldGet(this,ol)&&this.div.focus()}function _getBitmap2(){var t=this;if(stamp_classPrivateFieldGet(this,tl)){this._uiManager.enableWaiting(!0);this._uiManager.imageManager.getFromId(stamp_classPrivateFieldGet(this,tl)).then((function(r){return stamp_classPrivateMethodGet(t,dl,_getBitmapFetched2).call(t,r,!0)})).finally((function(){return stamp_classPrivateMethodGet(t,hl,_getBitmapDone2).call(t)}))}else if(stamp_classPrivateFieldGet(this,nl)){var r=stamp_classPrivateFieldGet(this,nl);stamp_classPrivateFieldSet(this,nl,null);this._uiManager.enableWaiting(!0);stamp_classPrivateFieldSet(this,rl,this._uiManager.imageManager.getFromUrl(r).then((function(r){return stamp_classPrivateMethodGet(t,dl,_getBitmapFetched2).call(t,r)})).finally((function(){return stamp_classPrivateMethodGet(t,hl,_getBitmapDone2).call(t)})))}else if(stamp_classPrivateFieldGet(this,al)){var a=stamp_classPrivateFieldGet(this,al);stamp_classPrivateFieldSet(this,al,null);this._uiManager.enableWaiting(!0);stamp_classPrivateFieldSet(this,rl,this._uiManager.imageManager.getFromFile(a).then((function(r){return stamp_classPrivateMethodGet(t,dl,_getBitmapFetched2).call(t,r)})).finally((function(){return stamp_classPrivateMethodGet(t,hl,_getBitmapDone2).call(t)})))}else{var i=document.createElement("input");i.type="file";i.accept=fs.supportedTypesStr;stamp_classPrivateFieldSet(this,rl,new Promise((function(r){i.addEventListener("change",stamp_asyncToGenerator(stamp_regeneratorRuntime().mark((function _callee(){var a;return stamp_regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(i.files&&0!==i.files.length){o.next=4;break}t.remove();o.next=9;break;case 4:t._uiManager.enableWaiting(!0);o.next=7;return t._uiManager.imageManager.getFromFile(i.files[0]);case 7:a=o.sent;stamp_classPrivateMethodGet(t,dl,_getBitmapFetched2).call(t,a);case 9:r();case 10:case"end":return o.stop()}}),_callee)}))));i.addEventListener("cancel",(function(){t.remove();r()}))})).finally((function(){return stamp_classPrivateMethodGet(t,hl,_getBitmapDone2).call(t)})));i.click()}}function stamp_createCanvas2(){var t=this.div,r=stamp_classPrivateFieldGet(this,el),a=r.width,i=r.height,o=stamp_slicedToArray(this.pageDimensions,2),l=o[0],c=o[1],u=.75;if(this.width){a=this.width*l;i=this.height*c}else if(a>u*l||i>u*c){var d=Math.min(u*l/a,u*c/i);a*=d;i*=d}var h=stamp_slicedToArray(this.parentDimensions,2),p=h[0],v=h[1];this.setDims(a*p/l,i*v/c);this._uiManager.enableWaiting(!1);var y=stamp_classPrivateFieldSet(this,ol,document.createElement("canvas"));t.append(y);t.hidden=!1;stamp_classPrivateMethodGet(this,_l,_drawBitmap2).call(this,a,i);stamp_classPrivateMethodGet(this,ml,stamp_createObserver2).call(this);if(!stamp_classPrivateFieldGet(this,ul)){this.parent.addUndoableEditor(this);stamp_classPrivateFieldSet(this,ul,!0)}this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}});this.addAltTextButton();stamp_classPrivateFieldGet(this,il)&&y.setAttribute("aria-label",stamp_classPrivateFieldGet(this,il))}function _setDimensions2(t,r){var a,i=this,o=stamp_slicedToArray(this.parentDimensions,2),l=o[0],c=o[1];this.width=t/l;this.height=r/c;this.setDims(t,r);null!==(a=this._initialOptions)&&void 0!==a&&a.isCentered?this.center():this.fixAndSetPosition();this._initialOptions=null;null!==stamp_classPrivateFieldGet(this,ll)&&clearTimeout(stamp_classPrivateFieldGet(this,ll));stamp_classPrivateFieldSet(this,ll,setTimeout((function(){stamp_classPrivateFieldSet(i,ll,null);stamp_classPrivateMethodGet(i,_l,_drawBitmap2).call(i,t,r)}),200))}function _scaleBitmap2(t,r){for(var a=stamp_classPrivateFieldGet(this,el),i=a.width,o=a.height,l=stamp_classPrivateFieldGet(this,el);i>2*t||o>2*r;){var c=i,u=o;i>2*t&&(i=i>=16384?Math.floor(i/2)-1:Math.ceil(i/2));o>2*r&&(o=o>=16384?Math.floor(o/2)-1:Math.ceil(o/2));var d=new OffscreenCanvas(i,o);d.getContext("2d").drawImage(l,0,0,c,u,0,0,i,o);l=d.transferToImageBitmap()}return l}function _drawBitmap2(t,r){t=Math.ceil(t);r=Math.ceil(r);var a=stamp_classPrivateFieldGet(this,ol);if(a&&(a.width!==t||a.height!==r)){a.width=t;a.height=r;var i=stamp_classPrivateFieldGet(this,cl)?stamp_classPrivateFieldGet(this,el):stamp_classPrivateMethodGet(this,yl,_scaleBitmap2).call(this,t,r),o=a.getContext("2d");o.filter=this._uiManager.hcmFilter;o.drawImage(i,0,0,i.width,i.height,0,0,t,r)}}function _serializeBitmap2(t){if(t){if(stamp_classPrivateFieldGet(this,cl)){var r=this._uiManager.imageManager.getSvgUrl(stamp_classPrivateFieldGet(this,tl));if(r)return r}var a=document.createElement("canvas"),i=stamp_classPrivateFieldGet(this,el);a.width=i.width;a.height=i.height;a.getContext("2d").drawImage(stamp_classPrivateFieldGet(this,el),0,0);return a.toDataURL()}if(stamp_classPrivateFieldGet(this,cl)){var o=stamp_slicedToArray(this.pageDimensions,2),l=o[0],c=o[1],u=Math.round(this.width*l*Se.PDF_TO_CSS_UNITS),d=Math.round(this.height*c*Se.PDF_TO_CSS_UNITS),h=new OffscreenCanvas(u,d);h.getContext("2d").drawImage(stamp_classPrivateFieldGet(this,el),0,0,stamp_classPrivateFieldGet(this,el).width,stamp_classPrivateFieldGet(this,el).height,0,0,u,d);return h.transferToImageBitmap()}return structuredClone(stamp_classPrivateFieldGet(this,el))}function stamp_createObserver2(){var t=this;stamp_classPrivateFieldSet(this,sl,new ResizeObserver((function(r){var a=r[0].contentRect;a.width&&a.height&&stamp_classPrivateMethodGet(t,vl,_setDimensions2).call(t,a.width,a.height)})));stamp_classPrivateFieldGet(this,sl).observe(this.div)}stamp_defineProperty(bl,"_type","stamp");stamp_defineProperty(bl,"_editorType",_.STAMP);function annotation_editor_layer_typeof(t){return annotation_editor_layer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},annotation_editor_layer_typeof(t)}function annotation_editor_layer_slicedToArray(t,r){return function annotation_editor_layer_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function annotation_editor_layer_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||annotation_editor_layer_unsupportedIterableToArray(t,r)||function annotation_editor_layer_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function annotation_editor_layer_ownKeys(t,r){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),a.push.apply(a,i)}return a}function annotation_editor_layer_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=annotation_editor_layer_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function annotation_editor_layer_toConsumableArray(t){return function annotation_editor_layer_arrayWithoutHoles(t){if(Array.isArray(t))return annotation_editor_layer_arrayLikeToArray(t)}(t)||function annotation_editor_layer_iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||annotation_editor_layer_unsupportedIterableToArray(t)||function annotation_editor_layer_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function annotation_editor_layer_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return annotation_editor_layer_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?annotation_editor_layer_arrayLikeToArray(t,r):void 0}}function annotation_editor_layer_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function annotation_editor_layer_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,annotation_editor_layer_toPropertyKey(i.key),i)}}function annotation_editor_layer_classPrivateMethodInitSpec(t,r){annotation_editor_layer_checkPrivateRedeclaration(t,r);r.add(t)}function annotation_editor_layer_defineProperty(t,r,a){(r=annotation_editor_layer_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function annotation_editor_layer_toPropertyKey(t){var r=function annotation_editor_layer_toPrimitive(t,r){if("object"!=annotation_editor_layer_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=annotation_editor_layer_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==annotation_editor_layer_typeof(r)?r:String(r)}function annotation_editor_layer_classPrivateFieldInitSpec(t,r,a){annotation_editor_layer_checkPrivateRedeclaration(t,r);r.set(t,a)}function annotation_editor_layer_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function annotation_editor_layer_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function annotation_editor_layer_classPrivateFieldGet(t,r){return annotation_editor_layer_classApplyDescriptorGet(t,annotation_editor_layer_classExtractFieldDescriptor(t,r,"get"))}function annotation_editor_layer_classPrivateFieldSet(t,r,a){!function annotation_editor_layer_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,annotation_editor_layer_classExtractFieldDescriptor(t,r,"set"),a);return a}function annotation_editor_layer_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function annotation_editor_layer_classStaticPrivateFieldSpecGet(t,r,a){!function annotation_editor_layer_classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);!function annotation_editor_layer_classCheckPrivateStaticFieldDescriptor(t,r){if(void 0===t)throw new TypeError("attempted to "+r+" private static field before its declaration")}(a,"get");return annotation_editor_layer_classApplyDescriptorGet(t,a)}function annotation_editor_layer_classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}var wl=new WeakMap,Pl=new WeakMap,kl=new WeakMap,Al=new WeakMap,Sl=new WeakMap,xl=new WeakMap,Fl=new WeakMap,El=new WeakMap,Il=new WeakMap,Cl=new WeakMap,Tl=new WeakMap,Ml=new WeakSet,Ol=new WeakSet,Gl=new WeakSet,Rl=new WeakSet,Ll=function(){function AnnotationEditorLayer(t){var r=t.uiManager,a=t.pageIndex,i=t.div,o=t.accessibilityManager,l=t.annotationLayer,c=t.viewport,u=t.l10n;!function annotation_editor_layer_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AnnotationEditorLayer);annotation_editor_layer_classPrivateMethodInitSpec(this,Rl);annotation_editor_layer_classPrivateMethodInitSpec(this,Gl);annotation_editor_layer_classPrivateMethodInitSpec(this,Ol);annotation_editor_layer_classPrivateMethodInitSpec(this,Ml);annotation_editor_layer_classPrivateFieldInitSpec(this,wl,{writable:!0,value:void 0});annotation_editor_layer_classPrivateFieldInitSpec(this,Pl,{writable:!0,value:!1});annotation_editor_layer_classPrivateFieldInitSpec(this,kl,{writable:!0,value:null});annotation_editor_layer_classPrivateFieldInitSpec(this,Al,{writable:!0,value:this.pointerup.bind(this)});annotation_editor_layer_classPrivateFieldInitSpec(this,Sl,{writable:!0,value:this.pointerdown.bind(this)});annotation_editor_layer_classPrivateFieldInitSpec(this,xl,{writable:!0,value:null});annotation_editor_layer_classPrivateFieldInitSpec(this,Fl,{writable:!0,value:new Map});annotation_editor_layer_classPrivateFieldInitSpec(this,El,{writable:!0,value:!1});annotation_editor_layer_classPrivateFieldInitSpec(this,Il,{writable:!0,value:!1});annotation_editor_layer_classPrivateFieldInitSpec(this,Cl,{writable:!0,value:!1});annotation_editor_layer_classPrivateFieldInitSpec(this,Tl,{writable:!0,value:void 0});var d=annotation_editor_layer_toConsumableArray(annotation_editor_layer_classStaticPrivateFieldSpecGet(AnnotationEditorLayer,AnnotationEditorLayer,jl).values());if(!AnnotationEditorLayer._initialized){AnnotationEditorLayer._initialized=!0;var h,p=annotation_editor_layer_createForOfIteratorHelper(d);try{for(p.s();!(h=p.n()).done;){h.value.initialize(u)}}catch(t){p.e(t)}finally{p.f()}}r.registerEditorTypes(d);annotation_editor_layer_classPrivateFieldSet(this,Tl,r);this.pageIndex=a;this.div=i;annotation_editor_layer_classPrivateFieldSet(this,wl,o);annotation_editor_layer_classPrivateFieldSet(this,kl,l);this.viewport=c;annotation_editor_layer_classPrivateFieldGet(this,Tl).addLayer(this)}!function annotation_editor_layer_createClass(t,r,a){r&&annotation_editor_layer_defineProperties(t.prototype,r);a&&annotation_editor_layer_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(AnnotationEditorLayer,[{key:"isEmpty",get:function get(){return 0===annotation_editor_layer_classPrivateFieldGet(this,Fl).size}},{key:"updateToolbar",value:function updateToolbar(t){annotation_editor_layer_classPrivateFieldGet(this,Tl).updateToolbar(t)}},{key:"updateMode",value:function updateMode(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:annotation_editor_layer_classPrivateFieldGet(this,Tl).getMode();annotation_editor_layer_classPrivateMethodGet(this,Rl,_cleanup2).call(this);if(t===_.INK){this.addInkEditorIfNeeded(!1);this.disableClick()}else this.enableClick();if(t!==_.NONE){var r,a=this.div.classList,i=annotation_editor_layer_createForOfIteratorHelper(annotation_editor_layer_classStaticPrivateFieldSpecGet(AnnotationEditorLayer,AnnotationEditorLayer,jl).values());try{for(i.s();!(r=i.n()).done;){var o=r.value;a.toggle("".concat(o._type,"Editing"),t===o._editorType)}}catch(t){i.e(t)}finally{i.f()}this.div.hidden=!1}}},{key:"addInkEditorIfNeeded",value:function addInkEditorIfNeeded(t){if(t||annotation_editor_layer_classPrivateFieldGet(this,Tl).getMode()===_.INK){if(!t){var r,a=annotation_editor_layer_createForOfIteratorHelper(annotation_editor_layer_classPrivateFieldGet(this,Fl).values());try{for(a.s();!(r=a.n()).done;){var i=r.value;if(i.isEmpty()){i.setInBackground();return}}}catch(t){a.e(t)}finally{a.f()}}annotation_editor_layer_classPrivateMethodGet(this,Ol,_createAndAddNewEditor2).call(this,{offsetX:0,offsetY:0},!1).setInBackground()}}},{key:"setEditingState",value:function setEditingState(t){annotation_editor_layer_classPrivateFieldGet(this,Tl).setEditingState(t)}},{key:"addCommands",value:function addCommands(t){annotation_editor_layer_classPrivateFieldGet(this,Tl).addCommands(t)}},{key:"togglePointerEvents",value:function togglePointerEvents(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.div.classList.toggle("disabled",!t)}},{key:"enable",value:function enable(){this.togglePointerEvents(!0);var t,r=new Set,a=annotation_editor_layer_createForOfIteratorHelper(annotation_editor_layer_classPrivateFieldGet(this,Fl).values());try{for(a.s();!(t=a.n()).done;){var i=t.value;i.enableEditing();i.annotationElementId&&r.add(i.annotationElementId)}}catch(t){a.e(t)}finally{a.f()}if(annotation_editor_layer_classPrivateFieldGet(this,kl)){var o,l=annotation_editor_layer_createForOfIteratorHelper(annotation_editor_layer_classPrivateFieldGet(this,kl).getEditableAnnotations());try{for(l.s();!(o=l.n()).done;){var c=o.value;c.hide();if(!annotation_editor_layer_classPrivateFieldGet(this,Tl).isDeletedAnnotationElement(c.data.id)&&!r.has(c.data.id)){var u=this.deserialize(c);if(u){this.addOrRebuild(u);u.enableEditing()}}}}catch(t){l.e(t)}finally{l.f()}}}},{key:"disable",value:function disable(){annotation_editor_layer_classPrivateFieldSet(this,Cl,!0);this.togglePointerEvents(!1);var t,r=new Set,a=annotation_editor_layer_createForOfIteratorHelper(annotation_editor_layer_classPrivateFieldGet(this,Fl).values());try{for(a.s();!(t=a.n()).done;){var i,o=t.value;o.disableEditing();if(o.annotationElementId&&null===o.serialize()){null===(i=this.getEditableAnnotation(o.annotationElementId))||void 0===i||i.show();o.remove()}else r.add(o.annotationElementId)}}catch(t){a.e(t)}finally{a.f()}if(annotation_editor_layer_classPrivateFieldGet(this,kl)){var l,c=annotation_editor_layer_createForOfIteratorHelper(annotation_editor_layer_classPrivateFieldGet(this,kl).getEditableAnnotations());try{for(c.s();!(l=c.n()).done;){var u=l.value,d=u.data.id;r.has(d)||annotation_editor_layer_classPrivateFieldGet(this,Tl).isDeletedAnnotationElement(d)||u.show()}}catch(t){c.e(t)}finally{c.f()}}annotation_editor_layer_classPrivateMethodGet(this,Rl,_cleanup2).call(this);this.isEmpty&&(this.div.hidden=!0);var h,p=this.div.classList,v=annotation_editor_layer_createForOfIteratorHelper(annotation_editor_layer_classStaticPrivateFieldSpecGet(AnnotationEditorLayer,AnnotationEditorLayer,jl).values());try{for(v.s();!(h=v.n()).done;){var y=h.value;p.remove("".concat(y._type,"Editing"))}}catch(t){v.e(t)}finally{v.f()}annotation_editor_layer_classPrivateFieldSet(this,Cl,!1)}},{key:"getEditableAnnotation",value:function getEditableAnnotation(t){var r;return(null===(r=annotation_editor_layer_classPrivateFieldGet(this,kl))||void 0===r?void 0:r.getEditableAnnotation(t))||null}},{key:"setActiveEditor",value:function setActiveEditor(t){annotation_editor_layer_classPrivateFieldGet(this,Tl).getActive()!==t&&annotation_editor_layer_classPrivateFieldGet(this,Tl).setActiveEditor(t)}},{key:"enableClick",value:function enableClick(){this.div.addEventListener("pointerdown",annotation_editor_layer_classPrivateFieldGet(this,Sl));this.div.addEventListener("pointerup",annotation_editor_layer_classPrivateFieldGet(this,Al))}},{key:"disableClick",value:function disableClick(){this.div.removeEventListener("pointerdown",annotation_editor_layer_classPrivateFieldGet(this,Sl));this.div.removeEventListener("pointerup",annotation_editor_layer_classPrivateFieldGet(this,Al))}},{key:"attach",value:function attach(t){annotation_editor_layer_classPrivateFieldGet(this,Fl).set(t.id,t);var r=t.annotationElementId;r&&annotation_editor_layer_classPrivateFieldGet(this,Tl).isDeletedAnnotationElement(r)&&annotation_editor_layer_classPrivateFieldGet(this,Tl).removeDeletedAnnotationElement(t)}},{key:"detach",value:function detach(t){var r;annotation_editor_layer_classPrivateFieldGet(this,Fl).delete(t.id);null===(r=annotation_editor_layer_classPrivateFieldGet(this,wl))||void 0===r||r.removePointerInTextLayer(t.contentDiv);!annotation_editor_layer_classPrivateFieldGet(this,Cl)&&t.annotationElementId&&annotation_editor_layer_classPrivateFieldGet(this,Tl).addDeletedAnnotationElement(t)}},{key:"remove",value:function remove(t){this.detach(t);annotation_editor_layer_classPrivateFieldGet(this,Tl).removeEditor(t);t.div.remove();t.isAttachedToDOM=!1;annotation_editor_layer_classPrivateFieldGet(this,Il)||this.addInkEditorIfNeeded(!1)}},{key:"changeParent",value:function changeParent(t){var r;if(t.parent!==this){if(t.annotationElementId){annotation_editor_layer_classPrivateFieldGet(this,Tl).addDeletedAnnotationElement(t.annotationElementId);nn.deleteAnnotationElement(t);t.annotationElementId=null}this.attach(t);null===(r=t.parent)||void 0===r||r.detach(t);t.setParent(this);if(t.div&&t.isAttachedToDOM){t.div.remove();this.div.append(t.div)}}}},{key:"add",value:function add(t){this.changeParent(t);annotation_editor_layer_classPrivateFieldGet(this,Tl).addEditor(t);this.attach(t);if(!t.isAttachedToDOM){var r=t.render();this.div.append(r);t.isAttachedToDOM=!0}t.fixAndSetPosition();t.onceAdded();annotation_editor_layer_classPrivateFieldGet(this,Tl).addToAnnotationStorage(t)}},{key:"moveEditorInDOM",value:function moveEditorInDOM(t){var r,a=this;if(t.isAttachedToDOM){var i=document.activeElement;if(t.div.contains(i)&&!annotation_editor_layer_classPrivateFieldGet(this,xl)){t._focusEventsAllowed=!1;annotation_editor_layer_classPrivateFieldSet(this,xl,setTimeout((function(){annotation_editor_layer_classPrivateFieldSet(a,xl,null);if(t.div.contains(document.activeElement))t._focusEventsAllowed=!0;else{t.div.addEventListener("focusin",(function(){t._focusEventsAllowed=!0}),{once:!0});i.focus()}}),0))}t._structTreeParentId=null===(r=annotation_editor_layer_classPrivateFieldGet(this,wl))||void 0===r?void 0:r.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}}},{key:"addOrRebuild",value:function addOrRebuild(t){if(t.needsToBeRebuilt()){t.parent||(t.parent=this);t.rebuild()}else this.add(t)}},{key:"addUndoableEditor",value:function addUndoableEditor(t){this.addCommands({cmd:function cmd(){return t._uiManager.rebuild(t)},undo:function undo(){t.remove()},mustExec:!1})}},{key:"getNextId",value:function getNextId(){return annotation_editor_layer_classPrivateFieldGet(this,Tl).getId()}},{key:"pasteEditor",value:function pasteEditor(t,r){annotation_editor_layer_classPrivateFieldGet(this,Tl).updateToolbar(t);annotation_editor_layer_classPrivateFieldGet(this,Tl).updateMode(t);var a=annotation_editor_layer_classPrivateMethodGet(this,Gl,_getCenterPoint2).call(this),i=a.offsetX,o=a.offsetY,l=this.getNextId(),c=annotation_editor_layer_classPrivateMethodGet(this,Ml,_createNewEditor2).call(this,function annotation_editor_layer_objectSpread(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?annotation_editor_layer_ownKeys(Object(a),!0).forEach((function(r){annotation_editor_layer_defineProperty(t,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):annotation_editor_layer_ownKeys(Object(a)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))}))}return t}({parent:this,id:l,x:i,y:o,uiManager:annotation_editor_layer_classPrivateFieldGet(this,Tl),isCentered:!0},r));c&&this.add(c)}},{key:"deserialize",value:function deserialize(t){var r,a;return(null===(r=annotation_editor_layer_classStaticPrivateFieldSpecGet(AnnotationEditorLayer,AnnotationEditorLayer,jl).get(null!==(a=t.annotationType)&&void 0!==a?a:t.annotationEditorType))||void 0===r?void 0:r.deserialize(t,this,annotation_editor_layer_classPrivateFieldGet(this,Tl)))||null}},{key:"addNewEditor",value:function addNewEditor(){annotation_editor_layer_classPrivateMethodGet(this,Ol,_createAndAddNewEditor2).call(this,annotation_editor_layer_classPrivateMethodGet(this,Gl,_getCenterPoint2).call(this),!0)}},{key:"setSelected",value:function setSelected(t){annotation_editor_layer_classPrivateFieldGet(this,Tl).setSelected(t)}},{key:"toggleSelected",value:function toggleSelected(t){annotation_editor_layer_classPrivateFieldGet(this,Tl).toggleSelected(t)}},{key:"isSelected",value:function isSelected(t){return annotation_editor_layer_classPrivateFieldGet(this,Tl).isSelected(t)}},{key:"unselect",value:function unselect(t){annotation_editor_layer_classPrivateFieldGet(this,Tl).unselect(t)}},{key:"pointerup",value:function pointerup(t){var r=ue.platform.isMac;if(!(0!==t.button||t.ctrlKey&&r)&&t.target===this.div&&annotation_editor_layer_classPrivateFieldGet(this,El)){annotation_editor_layer_classPrivateFieldSet(this,El,!1);annotation_editor_layer_classPrivateFieldGet(this,Pl)?annotation_editor_layer_classPrivateFieldGet(this,Tl).getMode()!==_.STAMP?annotation_editor_layer_classPrivateMethodGet(this,Ol,_createAndAddNewEditor2).call(this,t,!1):annotation_editor_layer_classPrivateFieldGet(this,Tl).unselectAll():annotation_editor_layer_classPrivateFieldSet(this,Pl,!0)}}},{key:"pointerdown",value:function pointerdown(t){if(annotation_editor_layer_classPrivateFieldGet(this,El))annotation_editor_layer_classPrivateFieldSet(this,El,!1);else{var r=ue.platform.isMac;if(!(0!==t.button||t.ctrlKey&&r)&&t.target===this.div){annotation_editor_layer_classPrivateFieldSet(this,El,!0);var a=annotation_editor_layer_classPrivateFieldGet(this,Tl).getActive();annotation_editor_layer_classPrivateFieldSet(this,Pl,!a||a.isEmpty())}}}},{key:"findNewParent",value:function findNewParent(t,r,a){var i=annotation_editor_layer_classPrivateFieldGet(this,Tl).findParent(r,a);if(null===i||i===this)return!1;i.changeParent(t);return!0}},{key:"destroy",value:function destroy(){var t;if((null===(t=annotation_editor_layer_classPrivateFieldGet(this,Tl).getActive())||void 0===t?void 0:t.parent)===this){annotation_editor_layer_classPrivateFieldGet(this,Tl).commitOrRemove();annotation_editor_layer_classPrivateFieldGet(this,Tl).setActiveEditor(null)}if(annotation_editor_layer_classPrivateFieldGet(this,xl)){clearTimeout(annotation_editor_layer_classPrivateFieldGet(this,xl));annotation_editor_layer_classPrivateFieldSet(this,xl,null)}var r,a=annotation_editor_layer_createForOfIteratorHelper(annotation_editor_layer_classPrivateFieldGet(this,Fl).values());try{for(a.s();!(r=a.n()).done;){var i,o=r.value;null===(i=annotation_editor_layer_classPrivateFieldGet(this,wl))||void 0===i||i.removePointerInTextLayer(o.contentDiv);o.setParent(null);o.isAttachedToDOM=!1;o.div.remove()}}catch(t){a.e(t)}finally{a.f()}this.div=null;annotation_editor_layer_classPrivateFieldGet(this,Fl).clear();annotation_editor_layer_classPrivateFieldGet(this,Tl).removeLayer(this)}},{key:"render",value:function render(t){var r=t.viewport;this.viewport=r;setLayerDimensions(this.div,r);var a,i=annotation_editor_layer_createForOfIteratorHelper(annotation_editor_layer_classPrivateFieldGet(this,Tl).getEditors(this.pageIndex));try{for(i.s();!(a=i.n()).done;){var o=a.value;this.add(o)}}catch(t){i.e(t)}finally{i.f()}this.updateMode()}},{key:"update",value:function update(t){var r=t.viewport;annotation_editor_layer_classPrivateFieldGet(this,Tl).commitOrRemove();this.viewport=r;setLayerDimensions(this.div,{rotation:r.rotation});this.updateMode()}},{key:"pageDimensions",get:function get(){var t=this.viewport.rawDims;return[t.pageWidth,t.pageHeight]}},{key:"setCleaningUp",value:function setCleaningUp(t){annotation_editor_layer_classPrivateFieldSet(this,Il,t)}}]);return AnnotationEditorLayer}();Zs=Ll;function _createNewEditor2(t){var r=annotation_editor_layer_classStaticPrivateFieldSpecGet(Zs,Zs,jl).get(annotation_editor_layer_classPrivateFieldGet(this,Tl).getMode());return r?new r.prototype.constructor(t):null}function _createAndAddNewEditor2(t,r){var a=this.getNextId(),i=annotation_editor_layer_classPrivateMethodGet(this,Ml,_createNewEditor2).call(this,{parent:this,id:a,x:t.offsetX,y:t.offsetY,uiManager:annotation_editor_layer_classPrivateFieldGet(this,Tl),isCentered:r});i&&this.add(i);return i}function _getCenterPoint2(){var t=this.div.getBoundingClientRect(),r=t.x,a=t.y,i=t.width,o=t.height,l=Math.max(0,r),c=Math.max(0,a),u=(l+Math.min(window.innerWidth,r+i))/2-r,d=(c+Math.min(window.innerHeight,a+o))/2-a,h=annotation_editor_layer_slicedToArray(this.viewport.rotation%180==0?[u,d]:[d,u],2);return{offsetX:h[0],offsetY:h[1]}}function _cleanup2(){annotation_editor_layer_classPrivateFieldSet(this,Il,!0);var t,r=annotation_editor_layer_createForOfIteratorHelper(annotation_editor_layer_classPrivateFieldGet(this,Fl).values());try{for(r.s();!(t=r.n()).done;){var a=t.value;a.isEmpty()&&a.remove()}}catch(t){r.e(t)}finally{r.f()}annotation_editor_layer_classPrivateFieldSet(this,Il,!1)}annotation_editor_layer_defineProperty(Ll,"_initialized",!1);var Dl,jl={writable:!0,value:new Map([hs,Qs,bl].map((function(t){return[t._editorType,t]})))};function draw_layer_typeof(t){return draw_layer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},draw_layer_typeof(t)}function draw_layer_slicedToArray(t,r){return function draw_layer_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function draw_layer_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||draw_layer_unsupportedIterableToArray(t,r)||function draw_layer_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function draw_layer_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=draw_layer_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function draw_layer_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return draw_layer_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?draw_layer_arrayLikeToArray(t,r):void 0}}function draw_layer_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function draw_layer_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,draw_layer_toPropertyKey(i.key),i)}}function draw_layer_toPropertyKey(t){var r=function draw_layer_toPrimitive(t,r){if("object"!=draw_layer_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=draw_layer_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==draw_layer_typeof(r)?r:String(r)}function draw_layer_classPrivateFieldInitSpec(t,r,a){draw_layer_checkPrivateRedeclaration(t,r);r.set(t,a)}function draw_layer_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function draw_layer_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function draw_layer_classStaticPrivateMethodGet(t,r,a){!function draw_layer_classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return a}function draw_layer_classPrivateFieldSet(t,r,a){!function draw_layer_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,draw_layer_classExtractFieldDescriptor(t,r,"set"),a);return a}function draw_layer_classPrivateFieldGet(t,r){return function draw_layer_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,draw_layer_classExtractFieldDescriptor(t,r,"get"))}function draw_layer_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var Wl=new WeakMap,Nl=new WeakMap,Bl=new WeakMap,zl=new WeakSet,Hl=function(){function DrawLayer(t){var r=t.pageIndex;!function draw_layer_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,DrawLayer);!function draw_layer_classPrivateMethodInitSpec(t,r){draw_layer_checkPrivateRedeclaration(t,r);r.add(t)}(this,zl);draw_layer_classPrivateFieldInitSpec(this,Wl,{writable:!0,value:null});draw_layer_classPrivateFieldInitSpec(this,Nl,{writable:!0,value:0});draw_layer_classPrivateFieldInitSpec(this,Bl,{writable:!0,value:new Map});this.pageIndex=r}!function draw_layer_createClass(t,r,a){r&&draw_layer_defineProperties(t.prototype,r);a&&draw_layer_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(DrawLayer,[{key:"setParent",value:function setParent(t){if(draw_layer_classPrivateFieldGet(this,Wl)){if(draw_layer_classPrivateFieldGet(this,Wl)!==t){if(draw_layer_classPrivateFieldGet(this,Bl).size>0){var r,a=draw_layer_createForOfIteratorHelper(draw_layer_classPrivateFieldGet(this,Bl).values());try{for(a.s();!(r=a.n()).done;){var i=r.value;i.remove();t.append(i)}}catch(t){a.e(t)}finally{a.f()}}draw_layer_classPrivateFieldSet(this,Wl,t)}}else draw_layer_classPrivateFieldSet(this,Wl,t)}},{key:"highlight",value:function highlight(t,r,a){var i,o,l=t.outlines,c=t.box,u=(draw_layer_classPrivateFieldSet(this,Nl,(i=draw_layer_classPrivateFieldGet(this,Nl),o=i++,i)),o),d=draw_layer_classPrivateMethodGet(this,zl,_createSVG2).call(this,c);d.classList.add("highlight");var h=DrawLayer._svgFactory.createElement("defs");d.append(h);var p=DrawLayer._svgFactory.createElement("path");h.append(p);var v="path_p".concat(this.pageIndex,"_").concat(u);p.setAttribute("id",v);p.setAttribute("d",draw_layer_classStaticPrivateMethodGet(DrawLayer,DrawLayer,_extractPathFromHighlightOutlines).call(DrawLayer,l));var y=DrawLayer._svgFactory.createElement("clipPath");h.append(y);var _="clip_".concat(v);y.setAttribute("id",_);y.setAttribute("clipPathUnits","objectBoundingBox");var g=DrawLayer._svgFactory.createElement("use");y.append(g);g.setAttribute("href","#".concat(v));g.classList.add("clip");var m=DrawLayer._svgFactory.createElement("use");d.append(m);d.setAttribute("fill",r);d.setAttribute("fill-opacity",a);m.setAttribute("href","#".concat(v));draw_layer_classPrivateFieldGet(this,Bl).set(u,d);return{id:u,clipPathId:"url(#".concat(_,")")}}},{key:"highlightOutline",value:function highlightOutline(t){var r,a,i=t.outlines,o=t.box,l=(draw_layer_classPrivateFieldSet(this,Nl,(r=draw_layer_classPrivateFieldGet(this,Nl),a=r++,r)),a),c=draw_layer_classPrivateMethodGet(this,zl,_createSVG2).call(this,o);c.classList.add("highlightOutline");var u=DrawLayer._svgFactory.createElement("defs");c.append(u);var d=DrawLayer._svgFactory.createElement("path");u.append(d);var h="path_p".concat(this.pageIndex,"_").concat(l);d.setAttribute("id",h);d.setAttribute("d",draw_layer_classStaticPrivateMethodGet(DrawLayer,DrawLayer,_extractPathFromHighlightOutlines).call(DrawLayer,i));d.setAttribute("vector-effect","non-scaling-stroke");var p=DrawLayer._svgFactory.createElement("use");c.append(p);p.setAttribute("href","#".concat(h));var v=p.cloneNode();c.append(v);p.classList.add("mainOutline");v.classList.add("secondaryOutline");draw_layer_classPrivateFieldGet(this,Bl).set(l,c);return l}},{key:"updateBox",value:function updateBox(t,r){draw_layer_classStaticPrivateMethodGet(DrawLayer,DrawLayer,_setBox).call(DrawLayer,draw_layer_classPrivateFieldGet(this,Bl).get(t),r)}},{key:"rotate",value:function rotate(t,r){draw_layer_classPrivateFieldGet(this,Bl).get(t).setAttribute("data-main-rotation",r)}},{key:"changeColor",value:function changeColor(t,r){draw_layer_classPrivateFieldGet(this,Bl).get(t).setAttribute("fill",r)}},{key:"changeOpacity",value:function changeOpacity(t,r){draw_layer_classPrivateFieldGet(this,Bl).get(t).setAttribute("fill-opacity",r)}},{key:"addClass",value:function addClass(t,r){draw_layer_classPrivateFieldGet(this,Bl).get(t).classList.add(r)}},{key:"removeClass",value:function removeClass(t,r){draw_layer_classPrivateFieldGet(this,Bl).get(t).classList.remove(r)}},{key:"remove",value:function remove(t){draw_layer_classPrivateFieldGet(this,Bl).get(t).remove();draw_layer_classPrivateFieldGet(this,Bl).delete(t)}},{key:"destroy",value:function destroy(){draw_layer_classPrivateFieldSet(this,Wl,null);var t,r=draw_layer_createForOfIteratorHelper(draw_layer_classPrivateFieldGet(this,Bl).values());try{for(r.s();!(t=r.n()).done;){t.value.remove()}}catch(t){r.e(t)}finally{r.f()}draw_layer_classPrivateFieldGet(this,Bl).clear()}}],[{key:"_svgFactory",get:function get(){return shadow(this,"_svgFactory",new Ye)}}]);return DrawLayer}();Dl=Hl;function _setBox(t,r){var a=r.x,i=r.y,o=r.width,l=r.height,c=t.style;c.top="".concat(100*i,"%");c.left="".concat(100*a,"%");c.width="".concat(100*o,"%");c.height="".concat(100*l,"%")}function _createSVG2(t){var r=Dl._svgFactory.create(1,1,!0);draw_layer_classPrivateFieldGet(this,Wl).append(r);draw_layer_classStaticPrivateMethodGet(Dl,Dl,_setBox).call(Dl,r,t);return r}function _extractPathFromHighlightOutlines(t){var r,a=[],i=draw_layer_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,l=draw_layer_slicedToArray(o,2),c=l[0],u=l[1];a.push("M".concat(c," ").concat(u));for(var d=2;d<o.length;d+=2){var h=o[d],p=o[d+1];if(h===c){a.push("V".concat(p));u=p}else if(p===u){a.push("H".concat(h));c=h}}a.push("Z")}}catch(t){i.e(t)}finally{i.f()}return a.join(" ")}__webpack_require__(8301);function outliner_typeof(t){return outliner_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},outliner_typeof(t)}function outliner_toConsumableArray(t){return function outliner_arrayWithoutHoles(t){if(Array.isArray(t))return outliner_arrayLikeToArray(t)}(t)||function outliner_iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||outliner_unsupportedIterableToArray(t)||function outliner_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function outliner_slicedToArray(t,r){return function outliner_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function outliner_iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||outliner_unsupportedIterableToArray(t,r)||function outliner_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function outliner_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=outliner_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function outliner_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return outliner_arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?outliner_arrayLikeToArray(t,r):void 0}}function outliner_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function outliner_defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,outliner_toPropertyKey(i.key),i)}}function outliner_toPropertyKey(t){var r=function outliner_toPrimitive(t,r){if("object"!=outliner_typeof(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!=outliner_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==outliner_typeof(r)?r:String(r)}function outliner_classPrivateMethodInitSpec(t,r){outliner_checkPrivateRedeclaration(t,r);r.add(t)}function outliner_classPrivateFieldInitSpec(t,r,a){outliner_checkPrivateRedeclaration(t,r);r.set(t,a)}function outliner_checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function outliner_classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function outliner_classPrivateFieldSet(t,r,a){!function outliner_classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,outliner_classExtractFieldDescriptor(t,r,"set"),a);return a}function outliner_classPrivateFieldGet(t,r){return function outliner_classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,outliner_classExtractFieldDescriptor(t,r,"get"))}function outliner_classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var Ul=new WeakMap,ql=new WeakMap,Vl=new WeakMap,Kl=new WeakSet,Yl=new WeakSet,Xl=new WeakSet,$l=new WeakSet,Jl=new WeakSet,Ql=function(){function Outliner(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!function outliner_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Outliner);outliner_classPrivateMethodInitSpec(this,Jl);outliner_classPrivateMethodInitSpec(this,$l);outliner_classPrivateMethodInitSpec(this,Xl);outliner_classPrivateMethodInitSpec(this,Yl);outliner_classPrivateMethodInitSpec(this,Kl);outliner_classPrivateFieldInitSpec(this,Ul,{writable:!0,value:void 0});outliner_classPrivateFieldInitSpec(this,ql,{writable:!0,value:[]});outliner_classPrivateFieldInitSpec(this,Vl,{writable:!0,value:[]});var o,l=1/0,c=-1/0,u=1/0,d=-1/0,h=Math.pow(10,-4),p=outliner_createForOfIteratorHelper(t);try{for(p.s();!(o=p.n()).done;){var v=o.value,y=v.x,_=v.y,g=v.width,m=v.height,b=Math.floor((y-r)/h)*h,w=Math.ceil((y+g+r)/h)*h,P=Math.floor((_-r)/h)*h,k=Math.ceil((_+m+r)/h)*h,A=[b,P,k,!0],S=[w,P,k,!1];outliner_classPrivateFieldGet(this,ql).push(A,S);l=Math.min(l,b);c=Math.max(c,w);u=Math.min(u,P);d=Math.max(d,k)}}catch(t){p.e(t)}finally{p.f()}var x,E=c-l+2*a,I=d-u+2*a,C=l-a,T=u-a,M=outliner_classPrivateFieldGet(this,ql).at(i?-1:-2),O=[M[0],M[2]],G=outliner_createForOfIteratorHelper(outliner_classPrivateFieldGet(this,ql));try{for(G.s();!(x=G.n()).done;){var R=x.value,L=outliner_slicedToArray(R,3),D=L[0],j=L[1],W=L[2];R[0]=(D-C)/E;R[1]=(j-T)/I;R[2]=(W-T)/I}}catch(t){G.e(t)}finally{G.f()}outliner_classPrivateFieldSet(this,Ul,{x:C,y:T,width:E,height:I,lastPoint:O})}!function outliner_createClass(t,r,a){r&&outliner_defineProperties(t.prototype,r);a&&outliner_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(Outliner,[{key:"getOutlines",value:function getOutlines(){outliner_classPrivateFieldGet(this,ql).sort((function(t,r){return t[0]-r[0]||t[1]-r[1]||t[2]-r[2]}));var t,r=[],a=outliner_createForOfIteratorHelper(outliner_classPrivateFieldGet(this,ql));try{for(a.s();!(t=a.n()).done;){var i=t.value;if(i[3]){r.push.apply(r,outliner_toConsumableArray(outliner_classPrivateMethodGet(this,Jl,_breakEdge2).call(this,i)));outliner_classPrivateMethodGet(this,Xl,_insert2).call(this,i)}else{outliner_classPrivateMethodGet(this,$l,_remove2).call(this,i);r.push.apply(r,outliner_toConsumableArray(outliner_classPrivateMethodGet(this,Jl,_breakEdge2).call(this,i)))}}}catch(t){a.e(t)}finally{a.f()}return outliner_classPrivateMethodGet(this,Kl,_getOutlines2).call(this,r)}}]);return Outliner}();function _getOutlines2(t){var r,a=[],i=new Set,o=outliner_createForOfIteratorHelper(t);try{for(o.s();!(r=o.n()).done;){var l=r.value,c=outliner_slicedToArray(l,3),u=c[0],d=c[1],h=c[2];a.push([u,d,l],[u,h,l])}}catch(t){o.e(t)}finally{o.f()}a.sort((function(t,r){return t[1]-r[1]||t[0]-r[0]}));for(var p=0,v=a.length;p<v;p+=2){var y=a[p][2],_=a[p+1][2];y.push(_);_.push(y);i.add(y);i.add(_)}for(var g,m=[];i.size>0;){var b=i.values().next().value,w=outliner_slicedToArray(b,5),P=w[0],k=w[1],A=w[2],S=w[3],x=w[4];i.delete(b);var E=P,I=k;g=[P,A];m.push(g);for(;;){var C=void 0;if(i.has(S))C=S;else{if(!i.has(x))break;C=x}i.delete(C);var T=outliner_slicedToArray(C,5);P=T[0];k=T[1];A=T[2];S=T[3];x=T[4];if(E!==P){g.push(E,I,P,I===k?k:A);E=P}I=I===k?A:k}g.push(E,I)}return{outlines:m,box:outliner_classPrivateFieldGet(this,Ul)}}function _binarySearch2(t){for(var r=outliner_classPrivateFieldGet(this,Vl),a=0,i=r.length-1;a<=i;){var o=a+i>>1,l=r[o][0];if(l===t)return o;l<t?a=o+1:i=o-1}return i+1}function _insert2(t){var r=outliner_slicedToArray(t,3),a=r[1],i=r[2],o=outliner_classPrivateMethodGet(this,Yl,_binarySearch2).call(this,a);outliner_classPrivateFieldGet(this,Vl).splice(o,0,[a,i])}function _remove2(t){for(var r=outliner_slicedToArray(t,3),a=r[1],i=r[2],o=outliner_classPrivateMethodGet(this,Yl,_binarySearch2).call(this,a),l=o;l<outliner_classPrivateFieldGet(this,Vl).length;l++){var c=outliner_slicedToArray(outliner_classPrivateFieldGet(this,Vl)[l],2),u=c[0],d=c[1];if(u!==a)break;if(u===a&&d===i){outliner_classPrivateFieldGet(this,Vl).splice(l,1);return}}for(var h=o-1;h>=0;h--){var p=outliner_slicedToArray(outliner_classPrivateFieldGet(this,Vl)[h],2),v=p[0],y=p[1];if(v!==a)break;if(v===a&&y===i){outliner_classPrivateFieldGet(this,Vl).splice(h,1);return}}}function _breakEdge2(t){for(var r=outliner_slicedToArray(t,3),a=r[0],i=r[1],o=r[2],l=[[a,i,o]],c=outliner_classPrivateMethodGet(this,Yl,_binarySearch2).call(this,o),u=0;u<c;u++)for(var d=outliner_slicedToArray(outliner_classPrivateFieldGet(this,Vl)[u],2),h=d[0],p=d[1],v=0,y=l.length;v<y;v++){var _=outliner_slicedToArray(l[v],3),g=_[1],m=_[2];if(!(p<=g||m<=h))if(g>=h)if(m>p)l[v][1]=p;else{if(1===y)return[];l.splice(v,1);v--;y--}else{l[v][2]=h;m>p&&l.push([a,p,m])}}return l}})();var i=a.AbortException,o=a.AnnotationEditorLayer,l=a.AnnotationEditorParamsType,c=a.AnnotationEditorType,u=a.AnnotationEditorUIManager,d=a.AnnotationLayer,h=a.AnnotationMode,p=a.CMapCompressionType,v=a.DOMSVGFactory,y=a.DrawLayer,_=a.FeatureTest,g=a.GlobalWorkerOptions,m=a.ImageKind,b=a.InvalidPDFException,w=a.MissingPDFException,P=a.OPS,k=a.Outliner,A=a.PDFDataRangeTransport,S=a.PDFDateString,x=a.PDFWorker,E=a.PasswordResponses,I=a.PermissionFlag,C=a.PixelsPerInch,T=a.PromiseCapability,M=a.RenderingCancelledException,O=a.UnexpectedResponseException,G=a.Util,R=a.VerbosityLevel,L=a.XfaLayer,D=a.build,j=a.createValidAbsoluteUrl,W=a.fetchData,N=a.getDocument,B=a.getFilenameFromUrl,z=a.getPdfFilenameFromUrl,H=a.getXfaPageViewport,U=a.isDataScheme,q=a.isPdfFile,V=a.noContextMenu,K=a.normalizeUnicode,Y=a.renderTextLayer,X=a.setLayerDimensions,$=a.shadow,J=a.updateTextLayer,Q=a.version;export{i as AbortException,o as AnnotationEditorLayer,l as AnnotationEditorParamsType,c as AnnotationEditorType,u as AnnotationEditorUIManager,d as AnnotationLayer,h as AnnotationMode,p as CMapCompressionType,v as DOMSVGFactory,y as DrawLayer,_ as FeatureTest,g as GlobalWorkerOptions,m as ImageKind,b as InvalidPDFException,w as MissingPDFException,P as OPS,k as Outliner,A as PDFDataRangeTransport,S as PDFDateString,x as PDFWorker,E as PasswordResponses,I as PermissionFlag,C as PixelsPerInch,T as PromiseCapability,M as RenderingCancelledException,O as UnexpectedResponseException,G as Util,R as VerbosityLevel,L as XfaLayer,D as build,j as createValidAbsoluteUrl,W as fetchData,N as getDocument,B as getFilenameFromUrl,z as getPdfFilenameFromUrl,H as getXfaPageViewport,U as isDataScheme,q as isPdfFile,V as noContextMenu,K as normalizeUnicode,Y as renderTextLayer,X as setLayerDimensions,$ as shadow,J as updateTextLayer,Q as version};