(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-73569296"],{"02f4":function(e,t,r){var n=r("4588"),i=r("be13");e.exports=function(e){return function(t,r){var a,o,s=String(i(t)),u=n(r),l=s.length;return u<0||u>=l?e?"":void 0:(a=s.charCodeAt(u),a<55296||a>56319||u+1===l||(o=s.charCodeAt(u+1))<56320||o>57343?e?s.charAt(u):a:e?s.slice(u,u+2):o-56320+(a-55296<<10)+65536)}}},"0390":function(e,t,r){"use strict";var n=r("02f4")(!0);e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},"0610":function(e,t,r){"use strict";r("dfe2")},"0bfb":function(e,t,r){"use strict";var n=r("cb7c");e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0de8":function(e,t,r){},"0edb":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAbCAYAAABiFp9rAAAEi0lEQVRIiZWWXYhVVRTHf+vMvc5Mk9LkFwh90piEEUyQL0ZgNVKRj0FCIWlQUxCBQVBi9RCovRRJWYZJ0UsMBdJD0dCDBFlaiTKCUMEIFYkfzHhn7sy9Z63Ya+9z7rlDlm04Z++z99prrb3+/7X2kemPV/I/WgZcC1wNnAemrnRrDTMEwTAwgdBL6sO32K1iPG7CfcAdQC+ILyN2HuMI8AXCJyAX0kLUblYOZfrgCsrFwo53thpkD/BwZ2d3KyYtdtPAW8DrwExcTHoNMgnj4Lka5Oa9mW1D5Thqm0RN/NThCTKW9ge59EhcX4zxEmbHUIZcn4IknVlQLrkSDfriTtTeF9W+8G2FASU9Crn65miAZBCXk9zWYHpE1O4Oui3pzXwUPtygPSemr5CnEObx8ZOGx1zGlbtjeTxZlCujgSiDltsYarcUTtZcQWx3ArsdOLeSUR9+gfrabbi72r48pbK6y7RO7qP105t+dIHlwBjYXQJzcumdQVct8J3BumLvwNZJ9NwEc4e3o+dOLtBs3VQwIVs5TO/63WSDQzQ+uKHgVXi9iLArS2HZaLmtK0MUYtu6RHNsI3r2RAxXZc2xqo5N0T+PMfvpBqzVcKzMyeVYbie3/pqom32iTJvkpPReQ+8DH3Xx959J3s3xsI+2VRZ0mYhsChj1GIzIAj2t4/up376F1s/v/bvyyqb68Cit7/f4SUQk2fb3Q9J4Y8ka4FRnV+yzJdfRu3mc2XeHOvOStPYvJVu0BL34G9V9Vz17hpm913clahqfylC7MSZXNf4xT7w5dTXOh5C0hf4tP7BoZG+cTxT3noRd24p0ifO53VST3AZKBywmiKS8cm8CMcJcElr0yBjSvxSd+h3LYyqYVDBpa4WQZWnry2jbjAXP2lpkdkrCaiLH09SGn6Ln5ntdR8/qB+l/ZgLL+pB24VhZHTp6VMN4rkauZ6SIvcenGGraqJGOi1dQv39XBfkBaE4hzYZj5ycuIuH0rejCJgNGp1FtVOLZwaqIefCscZH24T1Y46+0N2du/z0JH+3GKJ6ixEly+zEk7DxtG7dKsewkYqphYX5+ltZXO7GpPyL9PxvFzk1SEMmJAXQTq0zyL7MYRw56YSziGwTaHQ9FK1Vh9gI6cYj86IcdTPMKRkVl0cQ+tWnUxmoS2fU5MIFwW5ljVvFQJFZuYH7fxngtSqrgPhtl89Nfx3RIDLWYSG8jTMXqLSjGKMI3zu6gtzmDDCyn9+XJy1eGha09F0kUr/ngwmS8cQWZfb4nOhwz+TWEHZH/5UFiKoSLVhYUPbOuz7LexaIwj7EB+DZwshYvvnh8MXaCrDLY6ozX+OOSeB7JUSZ31CxJs5U/Od7mEdvsRhLri+pdOBTQe1KMM4bsEOgp8Ig/LSn2RXkqIUoG8WJ6FnhUjHEqzmShjFiFbaKYKa+K2XrUjmLFfGCSdK50j0RiVxznGAdQW4vaeCFX/DNIc7QSZPe8UvvFebNBjMdARgxWlcEpheWEwSGBA4j90sEqYBpUJLybT185qYBlQLgHgpU54Ff/h/uvBvwNax0e4kR5rCAAAAAASUVORK5CYII="},"14af":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAbCAYAAABiFp9rAAAFn0lEQVRIiXWWbYxUVxnHf8/MZWf2lVledhHZpSWWRdlsjcVlNWlU0rSxKiWxX2wisdb6ydDE+oGmacDGkjYmJhaNiZpY+8EPxiYSaZFa1kYDAaxabaGVtVBZK+wrL8POMveecx9zzzkzc3erJ5k7957n/Xn+z3mOnNy3SHMpS5f4LwkkgYLCKoEuhXngemBBGxzLV9AZ+RcNzBKeXkDV7Q+B7AbuStHbQUo57nlFTim8KPALRa8sN+XNC3Li8YXgtuaIkn1uBr4LfMFx5hzy/shydVWFZwUOINSyrXyMkbVpy440iPo1hYMKZa9XQ7T5VLZ2Qtq6BR5X+KKiOwWZyGhp4IhSk7LUtu4D9ue+c1XSpiltPnPWPfsW4BTIfcAfG/KRNTaf0ke8kaWr3Ftg8/0dVDZFFEqtyNJYuXbB8I9f1bg5l+Ycohd4Afgk8E/nx+++MZtVPXu/A+EEKm2OOaRxeHc36+4oUf234d2XF5l+o97IB30jbQzsaKdy6wou/7nOmeerudo5nX9HGEWlLke+fjmELSeB7ZJL19hjvXSvj3jt2atcOZd4SlZMFST8Z6troMj2R1exMGU4+fSVVor9314VnpHDD76XKb0H4bctovLRhyus29bOq49Nc3PeepCKonmPJbyr0tZV4DPP9DP1+iKv//RqQJbjmUV1sJDVyCbmqzY2ZD+TGNoqwvrtHZz+/iw3pmJMYt1+EltGH+3lQzs7/V7Gn8kllsUrCccPTLN+tJ1SjwRdjmeNSezOQhLbokns3V6ZM8rI7grV/8Rc+tMCNvZGTGwZ+9Ya1m4tM7Srh2J76vbcL8jOTdSYn6gzvLtCknhDweDnCjY2t5nYVDJvE+dhyuqhEhMvXfMGEuOMjX1zLf23t7tMXRi/zsJs4iKxISpT98789blZVm8pORnrdGYOmW2Ric0tjdZrgDMqF9h0Vw8Dn+hyO+XeiJ4NbY7nX3+4zukfTvHp/R9ERJb1mVAsiZPPHM+12K2RSdJO1+UBROIe0LuptLyduHiiyqvfmaSrv43+kY730fMrS5toOBWFcpTEpiaaP1Z9A828XcPUU/8tMPt2jVM/uuSAdmPqJu+9VqUYFZZqDyBcN9Lp0pk7SOqRqZvJoCv0LSSLKeeOznHmlzM+IRm9KPRt6eDymwskdXhxz4TXk5fNcnRnhdW33eJqlivHxYKJ7TlTtwtJC45c+luVj+xa20RTlu8d+zdy34+H2HjnyuZeA3WJg7gHw8gDfU7eBH2JB8xfCiYxsU3MMRM3oJgy/tR5KhvLDIx1+z6JLeWeyHnYubqIzRCWmCbqGuhauWEFfVs7GX/qgtPTQGSS2KOF0Ac/t4n3LiPOn1/g3JEZ7v3eZrr6V7ieCEOQbKwkrsltUOIUUYws9z83zMTRWebfqQYjDuJVm9gXCkHg1yY2Z12qjGc4tOcssxM1vnL4YwyO9XD5zSoLMzFz79aWNGomv2pTiYeOjXJ1cpFDj5x10Tg9PvU/MLG9LgcGX2mM8E+B/F78sRmGqrLr4DAf/nyfM3T84AUmXpmDVIlKRYbu7WPbgxtYN9zNW4enObTnTG5IOgRfVNgq6A158gMv56H5JPCEh7s/NLNeWDnQwWef3sLgaC8ryoUmjJNFy+Tpq7y09y2uTS4umcJADOwAjmdNKvvWHqHRVf785ycCD+UvRB6+suRe8f9WgHNm5IFs+DUOgig1NjeUXcUfFmRS4QnQYv4K1ZyfuU78H3e0GYEvAcea9xlxlxN1iMoNPIX02yBHEQ6i6TbfldqaMe9bTtqCPq/IXoHprNI+AV7WRaSuFsFGk5ieVJWPi8uzfhnRu1VZ3zh+faYzUX0Dld8o/EzgncadqBW3v0tEaZqLqJmlFqsq4wjj4XONCoNZwVSoC5xPlZob67kjrHmnCplVlP8CnqKBTRnLPoAAAAAASUVORK5CYII="},2:function(e,t){},"214f":function(e,t,r){"use strict";r("b0c5");var n=r("2aba"),i=r("32e9"),a=r("79e5"),o=r("be13"),s=r("2b4c"),u=r("520a"),l=s("species"),c=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),h=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2===r.length&&"a"===r[0]&&"b"===r[1]}();e.exports=function(e,t,r){var f=s(e),d=!a((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),p=d?!a((function(){var t=!1,r=/a/;return r.exec=function(){return t=!0,null},"split"===e&&(r.constructor={},r.constructor[l]=function(){return r}),r[f](""),!t})):void 0;if(!d||!p||"replace"===e&&!c||"split"===e&&!h){var v=/./[f],g=r(o,f,""[e],(function(e,t,r,n,i){return t.exec===u?d&&!i?{done:!0,value:v.call(t,r,n)}:{done:!0,value:e.call(r,t,n)}:{done:!1}})),y=g[0],m=g[1];n(String.prototype,e,y),i(RegExp.prototype,f,2==t?function(e,t){return m.call(e,this,t)}:function(e){return m.call(e,this)})}}},2613:function(e,t,r){"use strict";r("55bd")},"28a5":function(e,t,r){"use strict";var n=r("aae3"),i=r("cb7c"),a=r("ebd6"),o=r("0390"),s=r("9def"),u=r("5f1b"),l=r("520a"),c=r("79e5"),h=Math.min,f=[].push,d="split",p="length",v="lastIndex",g=4294967295,y=!c((function(){RegExp(g,"y")}));r("214f")("split",2,(function(e,t,r,c){var m;return m="c"=="abbc"[d](/(b)*/)[1]||4!="test"[d](/(?:)/,-1)[p]||2!="ab"[d](/(?:ab)*/)[p]||4!="."[d](/(.?)(.?)/)[p]||"."[d](/()()/)[p]>1||""[d](/.?/)[p]?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!n(e))return r.call(i,e,t);var a,o,s,u=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,d=void 0===t?g:t>>>0,y=new RegExp(e.source,c+"g");while(a=l.call(y,i)){if(o=y[v],o>h&&(u.push(i.slice(h,a.index)),a[p]>1&&a.index=d))break;y[v]===a.index&&y[v]++}return h===i[p]?!s&&y.test("")||u.push(""):u.push(i.slice(h)),u[p]>d?u.slice(0,d):u}:"0"[d](void 0,0)[p]?function(e,t){return void 0===e&&0===t?[]:r.call(this,e,t)}:r,[function(r,n){var i=e(this),a=void 0==r?void 0:r[t];return void 0!==a?a.call(r,i,n):m.call(String(i),r,n)},function(e,t){var n=c(m,e,this,t,m!==r);if(n.done)return n.value;var l=i(e),f=String(this),d=a(l,RegExp),p=l.unicode,v=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(y?"y":"g"),b=new d(y?l:"^(?:"+l.source+")",v),_=void 0===t?g:t>>>0;if(0===_)return[];if(0===f.length)return null===u(b,f)?[f]:[];var A=0,w=0,S=[];while(w1&&a.call(o[0],r,(function(){for(c=1;c1.15)&&this.pdf.renderPage(this.rotate)}},print:function(e,t){this.pdf.printPage(e,t)}},mounted:function(){this.pdf=new r(this.$refs.canvas,this.$refs.annotationLayer,this.$emit.bind(this)),this.$on("loaded",(function(){this.pdf.loadPage(this.page,this.rotate)})),this.$on("page-size",(function(e,t){this.$refs.canvas.style.height=this.$refs.canvas.offsetWidth*(t/e)+"px"})),this.pdf.loadDocument(this.src)},destroyed:function(){this.pdf.destroy()}}};if("server"!==Object({NODE_ENV:"production",BASE_URL:"/"}).VUE_ENV){var p=r("a068").default,v=r("edfb");if("undefined"!==typeof window&&"Worker"in window&&-1===navigator.appVersion.indexOf("MSIE 10")){var g=r("6085");v.GlobalWorkerOptions.workerPort=new g}var y=d(p(v))}else y=d({});var m,b,_=y,A=_,w=(r("0610"),Object(c["a"])(A,m,b,!1,null,null,null)),S=w.exports,k={name:"lineDetail",props:["lineItem"],components:{pdf:S},data:function(){return{init:"",nigai:"",textarea:"",searchData:"",lineList:null,pdfUrl:"",rightDialog:!1,pdfUrl1:"",districtList:[],value1:"",taiwanList:[],value2:"",scale:100,scale1:100,title:"原状图",host:"",cadFile:""}},methods:{enlargeBtn0:function(){var e=this;this.scale+=5,this.$nextTick((function(){e.$refs.pdf.$el.style.width=parseInt(e.scale)+"%"}))},enlargeBtn1:function(){var e=this;this.scale1+=5,this.$nextTick((function(){e.$refs.pdf1.$el.style.width=parseInt(e.scale1)+"%"}))},reduceBtn0:function(){var e=this;100!=this.scale&&(this.scale+=-5,this.$nextTick((function(){e.$refs.pdf.$el.style.width=parseInt(e.scale)+"%"})))},reduceBtn1:function(){var e=this;100!=this.scale1&&(this.scale1+=-5,this.$nextTick((function(){e.$refs.pdf1.$el.style.width=parseInt(e.scale1)+"%"})))},rowHandle:function(e){if(this.init="",this.nigai="",""!=e.url_init){var t=e.url_init.split("/")[4];this.init=this.cadFile+"?file="+t+"&&time="+(new Date).getTime()}if(""!=e.url_nigai){var r=e.url_nigai.split("/")[4];this.nigai=this.cadFile+"?file="+r+"&&time="+(new Date).getTime()}this.title="原状图",this.rightDialog=!0},handleClose:function(){this.$parent.lineItem=null,this.$parent.lineShow=""},handleClose1:function(){this.rightDialog=!1,this.init="",this.nigai=""},getCadFile:function(){var e=this;Object(s["i"])({action:"cad"}).then((function(t){1==t.data.state&&(e.cadFile=t.data.data)}))},openCad:function(e){if(this.init="",this.nigai="",""!=e.url_dest){var t=e.url_dest.split("/")[4];this.init=this.cadFile+"?file="+t}if(""!=e.url_nigai){var r=e.url_nigai.split("/")[4];this.nigai=this.cadFile+"?file="+r+"&&time="+(new Date).getTime()}this.rightDialog=!0,this.title="目标图"},openInit:function(e){var t=this;this.$nextTick((function(){if(t.init="",t.nigai="",""!=e.url_init){var r=e.url_init.split("/")[4];t.init=t.cadFile+"?file="+r+"&&time="+(new Date).getTime()}if(""!=e.url_nigai){var n=e.url_nigai.split("/")[4];t.nigai=t.cadFile+"?file="+n+"&&time="+(new Date).getTime()}t.title="原状图",t.rightDialog=!0}))},search:function(){var e=this;""==this.searchData?Object(s["i"])({action:"pdxl",qushu:this.value1,taiqu:this.value2}).then((function(t){var r=t.data;e.lineList=r.data})):Object(s["i"])({action:"pdxl",linename:this.searchData,qushu:this.value1,taiqu:this.value2}).then((function(t){var r=t.data;console.log(r,"数据"),e.lineList=r.data}))},refurbish:function(){this.lineList=this.lineItem,this.searchData="",this.value1="",this.value2=""}},created:function(){var e=this;this.getCadFile(),this.host=location.host,this.lineList=this.lineItem,Object(s["i"])({action:"qushu"}).then((function(t){var r=t.data;1==r.state&&(e.districtList=r.data)})),""!=this.value1&&Object(s["i"])({action:"taiqu",qushu:this.value1}).then((function(t){var r=t.data;1==r.state&&(e.taiwanList=r.data)}))},watch:{searchData:function(e,t){""==e&&(this.lineList=this.lineItem)},value1:function(e,t){var r=this;e&&Object(s["i"])({action:"taiqu",qushu:e}).then((function(e){var t=e.data;1==t.state&&(r.taiwanList=t.data)}))}}},x=k,C=(r("d724"),r("32e3"),Object(c["a"])(x,a,o,!1,null,"5c3a7f99",null));t["a"]=C.exports},c43c:function(e,t,r){(function(t,r){e.exports=r()})(0,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AnnotationLayerBuilder",{enumerable:!0,get:function(){return n.AnnotationLayerBuilder}}),Object.defineProperty(t,"DefaultAnnotationLayerFactory",{enumerable:!0,get:function(){return n.DefaultAnnotationLayerFactory}}),Object.defineProperty(t,"DefaultTextLayerFactory",{enumerable:!0,get:function(){return i.DefaultTextLayerFactory}}),Object.defineProperty(t,"TextLayerBuilder",{enumerable:!0,get:function(){return i.TextLayerBuilder}}),Object.defineProperty(t,"EventBus",{enumerable:!0,get:function(){return a.EventBus}}),Object.defineProperty(t,"NullL10n",{enumerable:!0,get:function(){return a.NullL10n}}),Object.defineProperty(t,"ProgressBar",{enumerable:!0,get:function(){return a.ProgressBar}}),Object.defineProperty(t,"PDFLinkService",{enumerable:!0,get:function(){return o.PDFLinkService}}),Object.defineProperty(t,"SimpleLinkService",{enumerable:!0,get:function(){return o.SimpleLinkService}}),Object.defineProperty(t,"DownloadManager",{enumerable:!0,get:function(){return s.DownloadManager}}),Object.defineProperty(t,"GenericL10n",{enumerable:!0,get:function(){return u.GenericL10n}}),Object.defineProperty(t,"PDFFindController",{enumerable:!0,get:function(){return l.PDFFindController}}),Object.defineProperty(t,"PDFHistory",{enumerable:!0,get:function(){return c.PDFHistory}}),Object.defineProperty(t,"PDFPageView",{enumerable:!0,get:function(){return h.PDFPageView}}),Object.defineProperty(t,"PDFSinglePageViewer",{enumerable:!0,get:function(){return f.PDFSinglePageViewer}}),Object.defineProperty(t,"PDFViewer",{enumerable:!0,get:function(){return d.PDFViewer}});var n=r(1),i=r(8),a=r(3),o=r(7),s=r(9),u=r(11),l=r(13),c=r(15),h=r(16),f=r(18),d=r(20)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultAnnotationLayerFactory=t.AnnotationLayerBuilder=void 0;var n=r(2),i=r(3),a=r(7);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"display";return this.pdfPage.getAnnotations({intent:r}).then((function(r){if(!t._cancelled&&0!==r.length){var i={viewport:e.clone({dontFlip:!0}),div:t.div,annotations:r,page:t.pdfPage,imageResourcesPath:t.imageResourcesPath,renderInteractiveForms:t.renderInteractiveForms,linkService:t.linkService,downloadManager:t.downloadManager,annotationStorage:t.annotationStorage};t.div?n.AnnotationLayer.update(i):(t.div=document.createElement("div"),t.div.className="annotationLayer",t.pageDiv.appendChild(t.div),i.div=t.div,n.AnnotationLayer.render(i),t.l10n.translate(t.div))}}))}},{key:"cancel",value:function(){this._cancelled=!0}},{key:"hide",value:function(){this.div&&this.div.setAttribute("hidden","true")}}]),e}();t.AnnotationLayerBuilder=l;var c=function(){function e(){o(this,e)}return u(e,[{key:"createAnnotationLayerBuilder",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:i.NullL10n;return new l({pageDiv:e,pdfPage:t,imageResourcesPath:n,renderInteractiveForms:o,linkService:new a.SimpleLinkService,l10n:s,annotationStorage:r})}}]),e}();t.DefaultAnnotationLayerFactory=c},function(e,t,n){"use strict";var i;i="undefined"!==typeof window&&window["pdfjs-dist/build/pdf"]?window["pdfjs-dist/build/pdf"]:r("edfb"),e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidRotation=Z,t.isValidScrollMode=Q,t.isValidSpreadMode=J,t.isPortraitOrientation=K,t.clamp=ne,t.getPDFFileNameFromURL=H,t.noContextMenuHandler=G,t.parseQueryString=N,t.backtrackBeforeAllVisibleElements=W,t.getVisibleElements=V,t.roundToDivide=B,t.getPageSizeInches=q,t.approximateFraction=U,t.getOutputScale=M,t.scrollIntoView=F,t.watchScroll=D,t.binarySearchFirstItem=j,t.normalizeWheelEventDirection=Y,t.normalizeWheelEventDelta=X,t.waitOnEventOrTimeout=ee,t.moveToEndOfArray=ae,t.WaitOnType=t.animationStarted=t.ProgressBar=t.EventBus=t.NullL10n=t.SpreadMode=t.ScrollMode=t.TextLayerMode=t.RendererType=t.PresentationModeState=t.VERTICAL_PADDING=t.SCROLLBAR_PADDING=t.MAX_AUTO_SCALE=t.UNKNOWN_SCALE=t.MAX_SCALE=t.MIN_SCALE=t.DEFAULT_SCALE=t.DEFAULT_SCALE_VALUE=t.CSS_UNITS=t.AutoPrintRegExp=void 0;var n=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]&&arguments[2],n=e.offsetParent;if(n){var i=e.offsetTop+e.clientTop,a=e.offsetLeft+e.clientLeft;while(n.clientHeight===n.scrollHeight&&n.clientWidth===n.scrollWidth||r&&"hidden"===getComputedStyle(n).overflow)if(n.dataset._scaleY&&(i/=n.dataset._scaleY,a/=n.dataset._scaleX),i+=n.offsetTop,a+=n.offsetLeft,n=n.offsetParent,!n)return;t&&(void 0!==t.top&&(i+=t.top),void 0!==t.left&&(a+=t.left,n.scrollLeft=a)),n.scrollTop=i}else console.error("offsetParent is not set -- cannot scroll")}function D(e,t){var r=function(r){i||(i=window.requestAnimationFrame((function(){i=null;var r=e.scrollLeft,a=n.lastX;r!==a&&(n.right=r>a),n.lastX=r;var o=e.scrollTop,s=n.lastY;o!==s&&(n.down=o>s),n.lastY=o,t(n)})))},n={right:!0,down:!0,lastX:e.scrollLeft,lastY:e.scrollTop,_eventHandler:r},i=null;return e.addEventListener("scroll",r,!0),n}function N(e){for(var t=e.split("&"),r=Object.create(null),n=0,i=t.length;n1?a[1]:null;r[decodeURIComponent(o)]=decodeURIComponent(s)}return r}function j(e,t){var r=0,n=e.length-1;if(n<0||!t(e[n]))return e.length;if(t(e[r]))return r;while(r>1,a=e[i];t(a)?n=i:r=i+1}return r}function U(e){if(Math.floor(e)===e)return[e,1];var t=1/e,r=8;if(t>r)return[1,r];if(Math.floor(t)===t)return[1,t];var n,i=e>1?t:e,a=0,o=1,s=1,u=1;while(1){var l=a+s,c=o+u;if(c>r)break;i<=l/c?(s=l,u=c):(a=l,o=c)}return n=i-a/o=r&&(n=t[e-1].div,i=n.offsetTop+n.clientTop);for(var a=e-2;a>=0;--a){if(n=t[a].div,n.offsetTop+n.clientTop+n.clientHeight<=i)break;e=a}return e}function V(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=e.scrollTop,a=i+e.clientHeight,o=e.scrollLeft,s=o+e.clientWidth;function u(e){var t=e.div,r=t.offsetTop+t.clientTop+t.clientHeight;return r>i}function l(e){var t=e.div,r=t.offsetLeft+t.clientLeft+t.clientWidth;return r>o}var c=[],h=t.length,f=0===h?0:j(t,n?l:u);f>0&&f=a&&(d=w);else if((n?y:m)>d)break;if(!(w<=i||m>=a||A<=o||y>=s)){var S=Math.max(0,i-m)+Math.max(0,w-a),k=Math.max(0,o-y)+Math.max(0,A-s),x=(_-S)*(b-k)*100/_/b|0;c.push({id:v.id,x:y,y:m,view:v,percent:x})}}var C=c[0],P=c[c.length-1];return r&&c.sort((function(e,t){var r=e.percent-t.percent;return Math.abs(r)>.001?-r:e.id-t.id})),{first:C,last:P,views:c}}function G(e){e.preventDefault()}function z(e){var t=0,r=e.length;while(t1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!==typeof e)return t;if(z(e))return console.warn('getPDFFileNameFromURL: ignoring "data:" URL for performance reasons.'),t;var r=/^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,n=/[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=r.exec(e),a=n.exec(i[1])||n.exec(i[2])||n.exec(i[3]);if(a&&(a=a[0],a.includes("%")))try{a=n.exec(decodeURIComponent(a))[0]}catch(o){}return a||t}function Y(e){var t=Math.sqrt(e.deltaX*e.deltaX+e.deltaY*e.deltaY),r=Math.atan2(e.deltaY,e.deltaX);return-.25*Math.PI=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function a(n){t instanceof re?t._off(r,o):t.removeEventListener(r,o),l&&clearTimeout(l),e(n)}var o=a.bind(null,$.EVENT);t instanceof re?t._on(r,o):t.addEventListener(r,o);var s=a.bind(null,$.TIMEOUT),l=setTimeout(s,i)}))}t.WaitOnType=$;var te=new Promise((function(e){window.requestAnimationFrame(e)}));t.animationStarted=te;var re=function(){function e(t){a(this,e),this._listeners=Object.create(null)}return s(e,[{key:"on",value:function(e,t){this._on(e,t,{external:!0})}},{key:"off",value:function(e,t){this._off(e,t,{external:!0})}},{key:"dispatch",value:function(e){var t=this._listeners[e];if(t&&0!==t.length){var r,n=Array.prototype.slice.call(arguments,1);t.slice(0).forEach((function(e){var t=e.listener,i=e.external;if(i)return r||(r=[]),void r.push(t);t.apply(null,n)})),r&&(r.forEach((function(e){e.apply(null,n)})),r=null)}}},{key:"_on",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this._listeners[e];n||(this._listeners[e]=n=[]),n.push({listener:t,external:!0===(r&&r.external)})}},{key:"_off",value:function(e,t){var r=this._listeners[e];if(r)for(var n=0,i=r.length;n1&&void 0!==arguments[1]?arguments[1]:{},n=r.height,i=r.width,o=r.units;a(this,e),this.visible=!0,this.div=document.querySelector(t+" .progress"),this.bar=this.div.parentNode,this.height=n||100,this.width=i||100,this.units=o||"%",this.div.style.height=this.height+this.units,this.percent=0}return s(e,[{key:"_updateBar",value:function(){if(this._indeterminate)return this.div.classList.add("indeterminate"),void(this.div.style.width=this.width+this.units);this.div.classList.remove("indeterminate");var e=this.width*this._percent/100;this.div.style.width=e+this.units}},{key:"setWidth",value:function(e){if(e){var t=e.parentNode,r=t.offsetWidth-e.offsetWidth;r>0&&(this.bar.style.width="calc(100% - ".concat(r,"px)"))}}},{key:"hide",value:function(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"),document.body.classList.remove("loadingInProgress"))}},{key:"show",value:function(){this.visible||(this.visible=!0,document.body.classList.add("loadingInProgress"),this.bar.classList.remove("hidden"))}},{key:"percent",get:function(){return this._percent},set:function(e){this._indeterminate=isNaN(e),this._percent=ne(e,0,100),this._updateBar()}}]),e}();function ae(e,t){for(var r=[],n=e.length,i=0,a=0;a=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;T(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),g}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(n){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(6)(e))},function(e,t,r){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleLinkService=t.PDFLinkService=void 0;var n=r(3);function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=t.eventBus,n=t.externalLinkTarget,i=void 0===n?null:n,o=t.externalLinkRel,s=void 0===o?null:o,u=t.externalLinkEnabled,l=void 0===u||u,c=t.ignoreDestinationZoom,h=void 0!==c&&c;a(this,e),this.eventBus=r,this.externalLinkTarget=i,this.externalLinkRel=s,this.externalLinkEnabled=l,this._ignoreDestinationZoom=h,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null,this._pagesRefCache=null}return s(e,[{key:"setDocument",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.baseUrl=t,this.pdfDocument=e,this._pagesRefCache=Object.create(null)}},{key:"setViewer",value:function(e){this.pdfViewer=e}},{key:"setHistory",value:function(e){this.pdfHistory=e}},{key:"navigateTo",value:function(e){var t=this,r=function r(n){var i,a=n.namedDest,o=n.explicitDest,s=o[0];if(s instanceof Object){if(i=t._cachedPageNumber(s),null===i)return void t.pdfDocument.getPageIndex(s).then((function(e){t.cachePageRef(e+1,s),r({namedDest:a,explicitDest:o})}))["catch"]((function(){console.error('PDFLinkService.navigateTo: "'.concat(s,'" is not ')+'a valid page reference, for dest="'.concat(e,'".'))}))}else{if(!Number.isInteger(s))return void console.error('PDFLinkService.navigateTo: "'.concat(s,'" is not ')+'a valid destination reference, for dest="'.concat(e,'".'));i=s+1}!i||i<1||i>t.pagesCount?console.error('PDFLinkService.navigateTo: "'.concat(i,'" is not ')+'a valid page number, for dest="'.concat(e,'".')):(t.pdfHistory&&(t.pdfHistory.pushCurrentPosition(),t.pdfHistory.push({namedDest:a,explicitDest:o,pageNumber:i})),t.pdfViewer.scrollPageIntoView({pageNumber:i,destArray:o,ignoreDestinationZoom:t._ignoreDestinationZoom}))};new Promise((function(r,n){"string"!==typeof e?r({namedDest:"",explicitDest:e}):t.pdfDocument.getDestination(e).then((function(t){r({namedDest:e,explicitDest:t})}))})).then((function(t){Array.isArray(t.explicitDest)?r(t):console.error('PDFLinkService.navigateTo: "'.concat(t.explicitDest,'" is')+' not a valid destination array, for dest="'.concat(e,'".'))}))}},{key:"getDestinationHash",value:function(e){if("string"===typeof e)return this.getAnchorUrl("#"+escape(e));if(Array.isArray(e)){var t=JSON.stringify(e);return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}},{key:"getAnchorUrl",value:function(e){return(this.baseUrl||"")+e}},{key:"setHash",value:function(e){var t,r;if(e.includes("=")){var i=(0,n.parseQueryString)(e);if("search"in i&&this.eventBus.dispatch("findfromurlhash",{source:this,query:i.search.replace(/"/g,""),phraseSearch:"true"===i.phrase}),"page"in i&&(t=0|i.page||1),"zoom"in i){var a=i.zoom.split(","),o=a[0],s=parseFloat(o);o.includes("Fit")?"Fit"===o||"FitB"===o?r=[null,{name:o}]:"FitH"===o||"FitBH"===o||"FitV"===o||"FitBV"===o?r=[null,{name:o},a.length>1?0|a[1]:null]:"FitR"===o?5!==a.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):r=[null,{name:o},0|a[1],0|a[2],0|a[3],0|a[4]]:console.error('PDFLinkService.setHash: "'.concat(o,'" is not ')+"a valid zoom value."):r=[null,{name:"XYZ"},a.length>1?0|a[1]:null,a.length>2?0|a[2]:null,s?s/100:o]}r?this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:r,allowNegativeOffset:!0}):t&&(this.page=t),"pagemode"in i&&this.eventBus.dispatch("pagemode",{source:this,mode:i.pagemode}),"nameddest"in i&&this.navigateTo(i.nameddest)}else{r=unescape(e);try{r=JSON.parse(r),Array.isArray(r)||(r=r.toString())}catch(u){}if("string"===typeof r||l(r))return void this.navigateTo(r);console.error('PDFLinkService.setHash: "'.concat(unescape(e),'" is not ')+"a valid destination.")}}},{key:"executeNamedAction",value:function(e){switch(e){case"GoBack":this.pdfHistory&&this.pdfHistory.back();break;case"GoForward":this.pdfHistory&&this.pdfHistory.forward();break;case"NextPage":this.page1&&this.page--;break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1;break;default:break}this.eventBus.dispatch("namedaction",{source:this,action:e})}},{key:"cachePageRef",value:function(e,t){if(t){var r=0===t.gen?"".concat(t.num,"R"):"".concat(t.num,"R").concat(t.gen);this._pagesRefCache[r]=e}}},{key:"_cachedPageNumber",value:function(e){var t=0===e.gen?"".concat(e.num,"R"):"".concat(e.num,"R").concat(e.gen);return this._pagesRefCache&&this._pagesRefCache[t]||null}},{key:"isPageVisible",value:function(e){return this.pdfViewer.isPageVisible(e)}},{key:"pagesCount",get:function(){return this.pdfDocument?this.pdfDocument.numPages:0}},{key:"page",get:function(){return this.pdfViewer.currentPageNumber},set:function(e){this.pdfViewer.currentPageNumber=e}},{key:"rotation",get:function(){return this.pdfViewer.pagesRotation},set:function(e){this.pdfViewer.pagesRotation=e}}]),e}();function l(e){if(!Array.isArray(e))return!1;var t=e.length;if(t<2)return!1;var r=e[0];if(("object"!==i(r)||!Number.isInteger(r.num)||!Number.isInteger(r.gen))&&!(Number.isInteger(r)&&r>=0))return!1;var n=e[1];if("object"!==i(n)||"string"!==typeof n.name)return!1;var a=!0;switch(n.name){case"XYZ":if(5!==t)return!1;break;case"Fit":case"FitB":return 2===t;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==t)return!1;break;case"FitR":if(6!==t)return!1;a=!1;break;default:return!1}for(var o=2;o0&&void 0!==arguments[0]?arguments[0]:0;if((this.textContent||this.textContentStream)&&!this.renderingDone){this.cancel(),this.textDivs=[];var r=document.createDocumentFragment();this.textLayerRenderTask=(0,n.renderTextLayer)({textContent:this.textContent,textContentStream:this.textContentStream,container:r,viewport:this.viewport,textDivs:this.textDivs,textContentItemsStr:this.textContentItemsStr,timeout:t,enhanceTextSelection:this.enhanceTextSelection}),this.textLayerRenderTask.promise.then((function(){e.textLayerDiv.appendChild(r),e._finishRendering(),e._updateMatches()}),(function(e){})),this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=function(t){t.pageIndex!==e.pageIdx&&-1!==t.pageIndex||e._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches))}}},{key:"cancel",value:function(){this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),this._onUpdateTextLayerMatches&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null)}},{key:"setTextContentStream",value:function(e){this.cancel(),this.textContentStream=e}},{key:"setTextContent",value:function(e){this.cancel(),this.textContent=e}},{key:"_convertMatches",value:function(e,t){if(!e)return[];for(var r=this.findController,n=this.textContentItemsStr,i=0,a=0,o=n.length-1,s=r.state.query.length,u=[],l=0,c=e.length;l=a+n[i].length)a+=n[i].length,i++;i===n.length&&console.error("Could not find a matching mapping");var f={begin:{divIdx:i,offset:h-a}};h+=t?t[l]:s;while(i!==o&&h>a+n[i].length)a+=n[i].length,i++;f.end={divIdx:i,offset:h-a},u.push(f)}return u}},{key:"_renderMatches",value:function(e){if(0!==e.length){var t=this.findController,r=this.pageIdx,n=this.textContentItemsStr,i=this.textDivs,a=r===t.selected.pageIdx,o=t.selected.matchIdx,s=t.state.highlightAll,u=null,l={divIdx:-1,offset:void 0},c=o,h=c+1;if(s)c=0,h=e.length;else if(!a)return;for(var f=c;f3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;return new u({textLayerDiv:e,pageIndex:t,viewport:r,enhanceTextSelection:n,eventBus:i})}}]),e}();t.DefaultTextLayerFactory=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadManager=void 0;var n=r(2),i=r(10);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r1,c=/CriOS/.test(i);(function(){(u||c)&&(n.disableCreateObjectURL=!0)})(),function(){(l||s)&&(n.maxCanvasPixels=5242880)}();var h=Object.freeze(n);t.viewerCompatibilityParams=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericL10n=void 0;var n=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,i)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,u,"next",e)}function u(e){a(o,n,i,s,u,"throw",e)}s(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r0?(i=t.substring(0,s),o=t.substring(s+1)):(i=t,o=a),n[i]||(n[i]={}),n[i][o]=e[t]}r&&r()}))}),o)}function g(e,t){e&&(e=e.toLowerCase()),t=t||function(){},y(),o=e;var r=c(),i=r.length;if(0!==i){var a=null,s=0;a=function(){s++,s>=i&&(t(),u="complete")};for(var l=0;l0&&(o=e.substring(i+1),e=e.substring(0,i)),r&&(n={},n[o]=r);var s=b(e,t,n);return s&&o in s?s[o]:"{{"+e+"}}"},getData:function(){return n},getText:function(){return i},getLanguage:function(){return o},setLanguage:function(e,t){g(e,(function(){t&&t()}))},getDirection:function(){var e=["ar","he","fa","ps","ur"],t=o.split("-",1)[0];return e.indexOf(t)>=0?"rtl":"ltr"},translate:k,getReadyState:function(){return u},ready:function(r){r&&("complete"==u||"interactive"==u?e.setTimeout((function(){r()})):t.addEventListener&&t.addEventListener("localized",(function e(){t.removeEventListener("localized",e),r()})))}}}(window,document)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFindController=t.FindState=void 0;var n=r(2),i=r(14),a=r(3);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r=1&&r<=n.pagesCount&&r!==n.page&&!n.isPageVisible(r);case"findhighlightallchange":return!1}return!0}},{key:"_prepareMatches",value:function(e,t,r){function n(t){var r=e[t],n=e[t+1];if(t=0;i--){var a=e[i];if(!a.skipped){if(a.match+a.matchLength=r.match+r.matchLength)return r.skipped=!0,!0}}return!1}e.sort((function(e,t){return e.match===t.match?e.matchLength-t.matchLength:e.match-t.match}));for(var i=0,a=e.length;i0){var n=e.charCodeAt(t),a=e.charCodeAt(t-1);if((0,i.getCharacterType)(n)===(0,i.getCharacterType)(a))return!1}var o=t+r-1;if(o0&&(this._matchesCountTotal+=s,this._updateUIResultsCount())}}},{key:"_extractText",value:function(){var e=this;if(!(this._extractTextPromises.length>0))for(var t=Promise.resolve(),r=function(r,i){var a=(0,n.createPromiseCapability)();e._extractTextPromises[r]=a.promise,t=t.then((function(){return e._pdfDocument.getPage(r+1).then((function(e){return e.getTextContent({normalizeWhitespace:!0})})).then((function(t){for(var n=t.items,i=[],o=0,s=n.length;o0)return a.matchIdx=t?a.matchIdx-1:a.matchIdx+1,void this._updateMatch(!0);this._advanceOffsetPage(t)}this._nextPageMatch()}}else this._updateUIState(l.FOUND)}},{key:"_matchesReady",value:function(e){var t=this._offset,r=e.length,n=this._state.findPrevious;return r?(t.matchIdx=n?r-1:0,this._updateMatch(!0),!0):(this._advanceOffsetPage(n),!!(t.wrapped&&(t.matchIdx=null,this._pagesToSearch<0))&&(this._updateMatch(!1),!0))}},{key:"_nextPageMatch",value:function(){null!==this._resumePageIdx&&console.error("There can only be one pending page.");var e=null;do{var t=this._offset.pageIdx;if(e=this._pageMatches[t],!e){this._resumePageIdx=t;break}}while(!this._matchesReady(e))}},{key:"_advanceOffsetPage",value:function(e){var t=this._offset,r=this._linkService.pagesCount;t.pageIdx=e?t.pageIdx-1:t.pageIdx+1,t.matchIdx=null,this._pagesToSearch--,(t.pageIdx>=r||t.pageIdx<0)&&(t.pageIdx=e?r-1:0,t.wrapped=!0)}},{key:"_updateMatch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=l.NOT_FOUND,r=this._offset.wrapped;if(this._offset.wrapped=!1,e){var n=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,t=r?l.WRAPPED:l.FOUND,-1!==n&&n!==this._selected.pageIdx&&this._updatePage(n)}this._updateUIState(t,this._state.findPrevious),-1!==this._selected.pageIdx&&(this._scrollMatches=!0,this._updatePage(this._selected.pageIdx))}},{key:"_onFindBarClose",value:function(e){var t=this,r=this._pdfDocument;this._firstPageCapability.promise.then((function(){!t._pdfDocument||r&&t._pdfDocument!==r||(t._findTimeout&&(clearTimeout(t._findTimeout),t._findTimeout=null),t._resumePageIdx&&(t._resumePageIdx=null,t._dirtyMatch=!0),t._updateUIState(l.FOUND),t._highlightMatches=!1,t._updateAllPages())}))}},{key:"_requestMatchesCount",value:function(){var e=this._selected,t=e.pageIdx,r=e.matchIdx,n=0,i=this._matchesCountTotal;if(-1!==r){for(var a=0;ai)&&(n=i=0),{current:n,total:i}}},{key:"_updateUIResultsCount",value:function(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:this._requestMatchesCount()})}},{key:"_updateUIState",value:function(e,t){this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:e,previous:t,matchesCount:this._requestMatchesCount(),rawQuery:this._state?this._state.query:null})}},{key:"highlightMatches",get:function(){return this._highlightMatches}},{key:"pageMatches",get:function(){return this._pageMatches}},{key:"pageMatchesLength",get:function(){return this._pageMatchesLength}},{key:"selected",get:function(){return this._selected}},{key:"state",get:function(){return this._state}},{key:"_query",get:function(){return this._state.query!==this._rawQuery&&(this._rawQuery=this._state.query,this._normalizedQuery=v(this._state.query)),this._normalizedQuery}}]),e}();t.PDFFindController=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCharacterType=p,t.CharacterType=void 0;var n={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};function i(e){return e<11904}function a(e){return 0===(65408&e)}function o(e){return e>=97&&e<=122||e>=65&&e<=90}function s(e){return e>=48&&e<=57}function u(e){return 32===e||9===e||13===e||10===e}function l(e){return e>=13312&&e<=40959||e>=63744&&e<=64255}function c(e){return e>=12448&&e<=12543}function h(e){return e>=12352&&e<=12447}function f(e){return e>=65376&&e<=65439}function d(e){return 3584===(65408&e)}function p(e){return i(e)?a(e)?u(e)?n.SPACE:o(e)||s(e)||95===e?n.ALPHA_LETTER:n.PUNCT:d(e)?n.THAI_LETTER:160===e?n.SPACE:n.ALPHA_LETTER:l(e)?n.HAN_LETTER:c(e)?n.KATAKANA_LETTER:h(e)?n.HIRAGANA_LETTER:f(e)?n.HALFWIDTH_KATAKANA_LETTER:n.ALPHA_LETTER}t.CharacterType=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDestHashesEqual=b,t.isDestArraysEqual=_,t.PDFHistory=void 0;var n=r(3);function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){return c(e)||l(e,t)||s(e,t)||o()}function o(){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 s(e,t){if(e){if("string"===typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rthis._maxUid&&(this._maxUid=this._uid),void 0!==f.rotation&&(this._initialRotation=f.rotation),f.dest?(this._initialBookmark=JSON.stringify(f.dest),this._destination.page=null):f.hash?this._initialBookmark=f.hash:f.page&&(this._initialBookmark="page=".concat(f.page))}else console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.')}},{key:"reset",value:function(){this._initialized&&(this._pageHide(),this._initialized=!1,this._unbindEvents()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}},{key:"push",value:function(e){var t=this,r=e.namedDest,n=void 0===r?null:r,i=e.explicitDest,a=e.pageNumber;if(this._initialized)if(n&&"string"!==typeof n)console.error("PDFHistory.push: "+'"'.concat(n,'" is not a valid namedDest parameter.'));else if(Array.isArray(i))if(Number.isInteger(a)&&a>0&&a<=this.linkService.pagesCount||null===a&&!this._destination){var o=n||JSON.stringify(i);if(o){var s=!1;if(this._destination&&(b(this._destination.hash,o)||_(this._destination.dest,i))){if(this._destination.page)return;s=!0}this._popStateInProgress&&!s||(this._pushOrReplaceState({dest:i,hash:o,page:a,rotation:this.linkService.rotation},s),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then((function(){t._popStateInProgress=!1}))))}}else console.error("PDFHistory.push: "+'"'.concat(a,'" is not a valid pageNumber parameter.'));else console.error("PDFHistory.push: "+'"'.concat(i,'" is not a valid explicitDest parameter.'))}},{key:"pushCurrentPosition",value:function(){this._initialized&&!this._popStateInProgress&&this._tryPushCurrentPosition()}},{key:"back",value:function(){if(this._initialized&&!this._popStateInProgress){var e=window.history.state;this._isValidState(e)&&e.uid>0&&window.history.back()}}},{key:"forward",value:function(){if(this._initialized&&!this._popStateInProgress){var e=window.history.state;this._isValidState(e)&&e.uid1&&void 0!==arguments[1]&&arguments[1],n=r||!this._destination,i={fingerprint:this._fingerprint,uid:n?this._uid:this._uid+1,destination:e};if(this._updateInternalState(e,i.uid),this._updateUrl&&e&&e.hash){var a=document.location.href.split("#")[0];a.startsWith("file://")||(t="".concat(a,"#").concat(e.hash))}n?window.history.replaceState(i,"",t):(this._maxUid=this._uid,window.history.pushState(i,"",t))}},{key:"_tryPushCurrentPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._position){var t=this._position;if(e&&(t=Object.assign(Object.create(null),this._position),t.temporary=!0),this._destination){if(this._destination.temporary)this._pushOrReplaceState(t,!0);else if(this._destination.hash!==t.hash&&(this._destination.page||!(v<=0||this._numPositionUpdates<=v))){var r=!1;if(this._destination.page>=t.first&&this._destination.page<=t.page){if(this._destination.dest||!this._destination.first)return;r=!0}this._pushOrReplaceState(t,r)}}else this._pushOrReplaceState(t)}}},{key:"_isValidState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return!1;if(e.fingerprint!==this._fingerprint){if(!t)return!1;if("string"!==typeof e.fingerprint||e.fingerprint.length!==this._fingerprint.length)return!1;var r=performance.getEntriesByType("navigation"),n=a(r,1),o=n[0];if(!o||"reload"!==o.type)return!1}return!(!Number.isInteger(e.uid)||e.uid<0)&&(null!==e.destination&&"object"===i(e.destination))}},{key:"_updateInternalState",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),r&&e&&e.temporary&&delete e.temporary,this._destination=e,this._uid=t,this._numPositionUpdates=0}},{key:"_parseCurrentHash",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=unescape(y()).substring(1),r=(0,n.parseQueryString)(t),i=r.nameddest||"",a=0|r.page;return Number.isInteger(a)&&a>0&&a<=this.linkService.pagesCount&&!(e&&i.length>0)||(a=null),{hash:t,page:a,rotation:this.linkService.rotation}}},{key:"_updateViewarea",value:function(e){var t=this,r=e.location;this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:this._isViewerInPresentationMode?"page=".concat(r.pageNumber):r.pdfOpenParams.substring(1),page:this.linkService.page,first:r.pageNumber,rotation:r.rotation},this._popStateInProgress||(v>0&&this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,g>0&&(this._updateViewareaTimeout=setTimeout((function(){t._popStateInProgress||t._tryPushCurrentPosition(!0),t._updateViewareaTimeout=null}),g)))}},{key:"_popState",value:function(e){var t=this,r=e.state,i=y(),a=this._currentHash!==i;if(this._currentHash=i,r){if(this._isValidState(r)){this._popStateInProgress=!0,a&&(this._blockHashChange++,(0,n.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:p}).then((function(){t._blockHashChange--})));var o=r.destination;this._updateInternalState(o,r.uid,!0),this._uid>this._maxUid&&(this._maxUid=this._uid),(0,n.isValidRotation)(o.rotation)&&(this.linkService.rotation=o.rotation),o.dest?this.linkService.navigateTo(o.dest):o.hash?this.linkService.setHash(o.hash):o.page&&(this.linkService.page=o.page),Promise.resolve().then((function(){t._popStateInProgress=!1}))}}else{this._uid++;var s=this._parseCurrentHash(),u=s.hash,l=s.page,c=s.rotation;this._pushOrReplaceState({hash:u,page:l,rotation:c},!0)}}},{key:"_pageHide",value:function(){this._destination&&!this._destination.temporary||this._tryPushCurrentPosition()}},{key:"_bindEvents",value:function(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}},{key:"_unbindEvents",value:function(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}},{key:"popStateInProgress",get:function(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}},{key:"initialBookmark",get:function(){return this._initialized?this._initialBookmark:null}},{key:"initialRotation",get:function(){return this._initialized?this._initialRotation:null}}]),e}();function b(e,t){if("string"!==typeof e||"string"!==typeof t)return!1;if(e===t)return!0;var r=(0,n.parseQueryString)(e),i=r.nameddest;return i===t}function _(e,t){function r(e,t){if(i(e)!==i(t))return!1;if(Array.isArray(e)||Array.isArray(t))return!1;if(null!==e&&"object"===i(e)&&null!==t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!r(e[n],t[n]))return!1;return!0}return e===t||Number.isNaN(e)&&Number.isNaN(t)}if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(var n=0,a=e.length;n0&&void 0!==arguments[0]&&arguments[0];if(this.zoomLayer){var t=this.zoomLayer.firstChild;this.paintedViewportMap["delete"](t),t.width=0,t.height=0,e&&this.zoomLayer.remove(),this.zoomLayer=null}}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.cancelRendering(t),this.renderingState=o.RenderingStates.INITIAL;var r=this.div;r.style.width=Math.floor(this.viewport.width)+"px",r.style.height=Math.floor(this.viewport.height)+"px";for(var n=r.childNodes,i=e&&this.zoomLayer||null,a=t&&this.annotationLayer&&this.annotationLayer.div||null,s=n.length-1;s>=0;s--){var u=n[s];i!==u&&a!==u&&r.removeChild(u)}r.removeAttribute("data-loaded"),a?this.annotationLayer.hide():this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null),i||(this.canvas&&(this.paintedViewportMap["delete"](this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer()),this.svg&&(this.paintedViewportMap["delete"](this.svg),delete this.svg),this.loadingIconDiv=document.createElement("div"),this.loadingIconDiv.className="loadingIcon",r.appendChild(this.loadingIconDiv)}},{key:"update",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.scale=e||this.scale,"undefined"!==typeof t&&(this.rotation=t),r instanceof Promise&&(this._optionalContentConfigPromise=r);var n=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*i.CSS_UNITS,rotation:n}),this.svg)return this.cssTransform(this.svg,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now()});var a=!1;if(this.canvas&&this.maxCanvasPixels>0){var o=this.outputScale;(Math.floor(this.viewport.width)*o.sx|0)*(Math.floor(this.viewport.height)*o.sy|0)>this.maxCanvasPixels&&(a=!0)}if(this.canvas){if(this.useOnlyCssZoom||this.hasRestrictedScaling&&a)return this.cssTransform(this.canvas,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now()});this.zoomLayer||this.canvas.hasAttribute("hidden")||(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform(this.zoomLayer.firstChild),this.reset(!0,!0)}},{key:"cancelRendering",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.paintTask&&(this.paintTask.cancel(),this.paintTask=null),this.resume=null,this.textLayer&&(this.textLayer.cancel(),this.textLayer=null),!e&&this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null)}},{key:"cssTransform",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.viewport.width,n=this.viewport.height,i=this.div;e.style.width=e.parentNode.style.width=i.style.width=Math.floor(r)+"px",e.style.height=e.parentNode.style.height=i.style.height=Math.floor(n)+"px";var a=this.viewport.rotation-this.paintedViewportMap.get(e).rotation,o=Math.abs(a),s=1,u=1;90!==o&&270!==o||(s=n/r,u=r/n);var l="rotate("+a+"deg) scale("+s+","+u+")";if(e.style.transform=l,this.textLayer){var c=this.textLayer.viewport,h=this.viewport.rotation-c.rotation,f=Math.abs(h),d=r/c.width;90!==f&&270!==f||(d=r/c.height);var p,v,g=this.textLayer.textLayerDiv;switch(f){case 0:p=v=0;break;case 90:p=0,v="-"+g.style.height;break;case 180:p="-"+g.style.width,v="-"+g.style.height;break;case 270:p="-"+g.style.width,v=0;break;default:console.error("Bad rotation value.");break}g.style.transform="rotate("+f+"deg) scale("+d+", "+d+") translate("+p+", "+v+")",g.style.transformOrigin="0% 0%"}t&&this.annotationLayer&&this._renderAnnotationLayer()}},{key:"getPagePoint",value:function(e,t){return this.viewport.convertToPdfPoint(e,t)}},{key:"draw",value:function(){var e=this;this.renderingState!==o.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());var t=this.div,r=this.pdfPage;if(!r)return this.renderingState=o.RenderingStates.FINISHED,this.loadingIconDiv&&(t.removeChild(this.loadingIconDiv),delete this.loadingIconDiv),Promise.reject(new Error("pdfPage is not loaded"));this.renderingState=o.RenderingStates.RUNNING;var s=document.createElement("div");s.style.width=t.style.width,s.style.height=t.style.height,s.classList.add("canvasWrapper"),this.annotationLayer&&this.annotationLayer.div?t.insertBefore(s,this.annotationLayer.div):t.appendChild(s);var u=null;if(this.textLayerMode!==i.TextLayerMode.DISABLE&&this.textLayerFactory){var l=document.createElement("div");l.className="textLayer",l.style.width=s.style.width,l.style.height=s.style.height,this.annotationLayer&&this.annotationLayer.div?t.insertBefore(l,this.annotationLayer.div):t.appendChild(l),u=this.textLayerFactory.createTextLayerBuilder(l,this.id-1,this.viewport,this.textLayerMode===i.TextLayerMode.ENABLE_ENHANCE,this.eventBus)}this.textLayer=u;var h=null;this.renderingQueue&&(h=function(t){if(!e.renderingQueue.isHighestPriority(e))return e.renderingState=o.RenderingStates.PAUSED,void(e.resume=function(){e.renderingState=o.RenderingStates.RUNNING,t()});t()});var f=function(){var i=c(n["default"].mark((function i(s){return n["default"].wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(d===e.paintTask&&(e.paintTask=null),!(s instanceof a.RenderingCancelledException)){n.next=4;break}return e.error=null,n.abrupt("return");case 4:if(e.renderingState=o.RenderingStates.FINISHED,e.loadingIconDiv&&(t.removeChild(e.loadingIconDiv),delete e.loadingIconDiv),e._resetZoomLayer(!0),e.error=s,e.stats=r.stats,e.eventBus.dispatch("pagerendered",{source:e,pageNumber:e.id,cssTransform:!1,timestamp:performance.now()}),!s){n.next=12;break}throw s;case 12:case"end":return n.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}(),d=this.renderer===i.RendererType.SVG?this.paintOnSvg(s):this.paintOnCanvas(s);d.onRenderContinue=h,this.paintTask=d;var p=d.promise.then((function(){return f(null).then((function(){if(u){var e=r.streamTextContent({normalizeWhitespace:!0});u.setTextContentStream(e),u.render()}}))}),(function(e){return f(e)}));return this.annotationLayerFactory&&(this.annotationLayer||(this.annotationLayer=this.annotationLayerFactory.createAnnotationLayerBuilder(t,r,this._annotationStorage,this.imageResourcesPath,this.renderInteractiveForms,this.l10n)),this._renderAnnotationLayer()),t.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),p}},{key:"paintOnCanvas",value:function(e){var t=(0,a.createPromiseCapability)(),r={promise:t.promise,onRenderContinue:function(e){e()},cancel:function(){m.cancel()}},n=this.viewport,o=document.createElement("canvas");this.l10n.get("page_canvas",{page:this.id},"Page {{page}}").then((function(e){o.setAttribute("aria-label",e)})),o.setAttribute("hidden","hidden");var s=!0,u=function(){s&&(o.removeAttribute("hidden"),s=!1)};e.appendChild(o),this.canvas=o,o.mozOpaque=!0;var l=o.getContext("2d",{alpha:!1}),c=(0,i.getOutputScale)(l);if(this.outputScale=c,this.useOnlyCssZoom){var h=n.clone({scale:i.CSS_UNITS});c.sx*=h.width/n.width,c.sy*=h.height/n.height,c.scaled=!0}if(this.maxCanvasPixels>0){var f=n.width*n.height,d=Math.sqrt(this.maxCanvasPixels/f);c.sx>d||c.sy>d?(c.sx=d,c.sy=d,c.scaled=!0,this.hasRestrictedScaling=!0):this.hasRestrictedScaling=!1}var p=(0,i.approximateFraction)(c.sx),v=(0,i.approximateFraction)(c.sy);o.width=(0,i.roundToDivide)(n.width*c.sx,p[0]),o.height=(0,i.roundToDivide)(n.height*c.sy,v[0]),o.style.width=(0,i.roundToDivide)(n.width,p[1])+"px",o.style.height=(0,i.roundToDivide)(n.height,v[1])+"px",this.paintedViewportMap.set(o,n);var g=c.scaled?[c.sx,0,0,c.sy,0,0]:null,y={canvasContext:l,transform:g,viewport:this.viewport,enableWebGL:this.enableWebGL,renderInteractiveForms:this.renderInteractiveForms,optionalContentConfigPromise:this._optionalContentConfigPromise},m=this.pdfPage.render(y);return m.onContinue=function(e){u(),r.onRenderContinue?r.onRenderContinue(e):e()},m.promise.then((function(){u(),t.resolve(void 0)}),(function(e){u(),t.reject(e)})),r}},{key:"paintOnSvg",value:function(e){var t=this,r=!1,n=function(){if(r)throw new a.RenderingCancelledException("Rendering cancelled, page ".concat(t.id),"svg")},s=this.pdfPage,u=this.viewport.clone({scale:i.CSS_UNITS}),l=s.getOperatorList().then((function(r){n();var i=new a.SVGGraphics(s.commonObjs,s.objs);return i.getSVG(r,u).then((function(r){n(),t.svg=r,t.paintedViewportMap.set(r,u),r.style.width=e.style.width,r.style.height=e.style.height,t.renderingState=o.RenderingStates.FINISHED,e.appendChild(r)}))}));return{promise:l,onRenderContinue:function(e){e()},cancel:function(){r=!0}}}},{key:"setPageLabel",value:function(e){this.pageLabel="string"===typeof e?e:null,null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}},{key:"width",get:function(){return this.viewport.width}},{key:"height",get:function(){return this.viewport.height}}]),e}();t.PDFPageView=v},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r=this._previousPageNumber;this._ensurePageViewVisible(),this.update(),l(y(r.prototype),"_scrollIntoView",this).call(this,{pageDiv:n,pageSpot:a,pageNumber:s}),this._updateScrollDown=function(){t.scroll.down=u,t._updateScrollDown=null}}},{key:"_getVisiblePages",value:function(){return this._getCurrentVisiblePage()}},{key:"_updateHelper",value:function(e){}},{key:"_updateScrollMode",value:function(){}},{key:"_updateSpreadMode",value:function(){}},{key:"_viewerElement",get:function(){return(0,i.shadow)(this,"_viewerElement",this._shadowViewer)}},{key:"_isScrollModeHorizontal",get:function(){return(0,i.shadow)(this,"_isScrollModeHorizontal",!1)}}]),r}(n.BaseViewer);t.PDFSinglePageViewer=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseViewer=void 0;var n=r(3),i=r(17),a=r(1),o=r(2),s=r(16),u=r(7),l=r(8);function c(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(s)throw a}}}}function h(e,t){if(e){if("string"===typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0&&t.splice(n,1),t.push(r),t.length>e&&t.shift().destroy()},this.resize=function(r,i){if(e=r,i){for(var a=new Set,o=0,s=i.length;oe)t.shift().destroy()}}function m(e,t){return t===e||Math.abs(t-e)<1e-15}var b=function(){function e(t){var r=this;if(d(this,e),this.constructor===e)throw new Error("Cannot initialize BaseViewer.");if(this._name=this.constructor.name,this.container=t.container,this.viewer=t.viewer||t.container.firstElementChild,!(this.container instanceof HTMLDivElement&&this.viewer instanceof HTMLDivElement))throw new Error("Invalid `container` and/or `viewer` option.");this.eventBus=t.eventBus,this.linkService=t.linkService||new u.SimpleLinkService,this.downloadManager=t.downloadManager||null,this.findController=t.findController||null,this.removePageBorders=t.removePageBorders||!1,this.textLayerMode=Number.isInteger(t.textLayerMode)?t.textLayerMode:n.TextLayerMode.ENABLE,this.imageResourcesPath=t.imageResourcesPath||"",this.renderInteractiveForms="boolean"!==typeof t.renderInteractiveForms||t.renderInteractiveForms,this.enablePrintAutoRotate=t.enablePrintAutoRotate||!1,this.renderer=t.renderer||n.RendererType.CANVAS,this.enableWebGL=t.enableWebGL||!1,this.useOnlyCssZoom=t.useOnlyCssZoom||!1,this.maxCanvasPixels=t.maxCanvasPixels,this.l10n=t.l10n||n.NullL10n,this.defaultRenderingQueue=!t.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new i.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=t.renderingQueue,this.scroll=(0,n.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=n.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),Promise.resolve().then((function(){r.eventBus.dispatch("baseviewerinit",{source:r})}))}return v(e,[{key:"getPageView",value:function(e){return this._pages[e]}},{key:"_setCurrentPageNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._currentPageNumber===e?(t&&this._resetCurrentPageView(),!0):07500)t._pagesCapability.resolve();else{var n=r-1;if(n<=0)t._pagesCapability.resolve();else for(var i=function(r){e.getPage(r).then((function(e){var i=t._pages[r-1];i.pdfPage||i.setPdfPage(e),t.linkService.cachePageRef(r,e.ref),0===--n&&t._pagesCapability.resolve()}),(function(e){console.error("Unable to get page ".concat(r," to initialize viewer"),e),0===--n&&t._pagesCapability.resolve()}))},a=2;a<=r;++a)i(a)}})),t.eventBus.dispatch("pagesinit",{source:t}),t.defaultRenderingQueue&&t.update()}))["catch"]((function(e){console.error("Unable to initialize viewer",e)}))}}},{key:"setPageLabels",value:function(e){if(this.pdfDocument){e?Array.isArray(e)&&this.pdfDocument.numPages===e.length?this._pageLabels=e:(this._pageLabels=null,console.error("".concat(this._name,".setPageLabels: Invalid page labels."))):this._pageLabels=null;for(var t=0,r=this._pages.length;t2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this._currentScaleValue=t.toString(),m(this._currentScale,e))n&&this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:t});else{for(var i=0,a=this._pages.length;i1&&void 0!==arguments[1]&&arguments[1],r=parseFloat(e);if(r>0)this._setScaleUpdatePages(r,e,t,!1);else{var i=this._pages[this._currentPageNumber-1];if(!i)return;var a=this.isInPresentationMode||this.removePageBorders,o=a?0:n.SCROLLBAR_PADDING,s=a?0:n.VERTICAL_PADDING;if(!a&&this._isScrollModeHorizontal){var u=[s,o];o=u[0],s=u[1]}var l=(this.container.clientWidth-o)/i.width*i.scale,c=(this.container.clientHeight-s)/i.height*i.scale;switch(e){case"page-actual":r=1;break;case"page-width":r=l;break;case"page-height":r=c;break;case"page-fit":r=Math.min(l,c);break;case"auto":var h=(0,n.isPortraitOrientation)(i)?l:Math.min(c,l);r=Math.min(n.MAX_AUTO_SCALE,h);break;default:return void console.error("".concat(this._name,'._setScale: "').concat(e,'" is an unknown zoom value.'))}this._setScaleUpdatePages(r,e,t,!0)}}},{key:"_resetCurrentPageView",value:function(){this.isInPresentationMode&&this._setScale(this._currentScaleValue,!0);var e=this._pages[this._currentPageNumber-1];this._scrollIntoView({pageDiv:e.div})}},{key:"scrollPageIntoView",value:function(e){var t=e.pageNumber,r=e.destArray,i=void 0===r?null:r,a=e.allowNegativeOffset,o=void 0!==a&&a,s=e.ignoreDestinationZoom,u=void 0!==s&&s;if(this.pdfDocument){var l=Number.isInteger(t)&&this._pages[t-1];if(l)if(!this.isInPresentationMode&&i){var c,h,f=0,d=0,p=0,v=0,g=l.rotation%180!==0,y=(g?l.height:l.width)/l.scale/n.CSS_UNITS,m=(g?l.width:l.height)/l.scale/n.CSS_UNITS,b=0;switch(i[1].name){case"XYZ":f=i[2],d=i[3],b=i[4],f=null!==f?f:0,d=null!==d?d:m;break;case"Fit":case"FitB":b="page-fit";break;case"FitH":case"FitBH":d=i[2],b="page-width",null===d&&this._location&&(f=this._location.left,d=this._location.top);break;case"FitV":case"FitBV":f=i[2],p=y,v=m,b="page-height";break;case"FitR":f=i[2],d=i[3],p=i[4]-f,v=i[5]-d;var _=this.removePageBorders?0:n.SCROLLBAR_PADDING,A=this.removePageBorders?0:n.VERTICAL_PADDING;c=(this.container.clientWidth-_)/p/n.CSS_UNITS,h=(this.container.clientHeight-A)/v/n.CSS_UNITS,b=Math.min(Math.abs(c),Math.abs(h));break;default:return void console.error("".concat(this._name,".scrollPageIntoView: ")+'"'.concat(i[1].name,'" is not a valid destination type.'))}if(u||(b&&b!==this._currentScale?this.currentScaleValue=b:this._currentScale===n.UNKNOWN_SCALE&&(this.currentScaleValue=n.DEFAULT_SCALE_VALUE)),"page-fit"!==b||i[4]){var w=[l.viewport.convertToViewportPoint(f,d),l.viewport.convertToViewportPoint(f+p,d+v)],S=Math.min(w[0][0],w[1][0]),k=Math.min(w[0][1],w[1][1]);o||(S=Math.max(S,0),k=Math.max(k,0)),this._scrollIntoView({pageDiv:l.div,pageSpot:{left:S,top:k},pageNumber:t})}else this._scrollIntoView({pageDiv:l.div,pageNumber:t})}else this._setCurrentPageNumber(t,!0);else console.error("".concat(this._name,".scrollPageIntoView: ")+'"'.concat(t,'" is not a valid pageNumber parameter.'))}}},{key:"_updateLocation",value:function(e){var t=this._currentScale,r=this._currentScaleValue,n=parseFloat(r)===t?Math.round(1e4*t)/100:r,i=e.id,a="#page="+i;a+="&zoom="+n;var o=this._pages[i-1],s=this.container,u=o.getPagePoint(s.scrollLeft-e.x,s.scrollTop-e.y),l=Math.round(u[0]),c=Math.round(u[1]);a+=","+l+","+c,this._location={pageNumber:i,scale:n,top:c,left:l,rotation:this._pagesRotation,pdfOpenParams:a}}},{key:"_updateHelper",value:function(e){throw new Error("Not implemented: _updateHelper")}},{key:"update",value:function(){var e=this._getVisiblePages(),t=e.views,r=t.length;if(0!==r){var n=Math.max(g,2*r+1);this._buffer.resize(n,t),this.renderingQueue.renderHighestPriority(e),this._updateHelper(t),this._updateLocation(e.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}}},{key:"containsElement",value:function(e){return this.container.contains(e)}},{key:"focus",value:function(){this.container.focus()}},{key:"_getCurrentVisiblePage",value:function(){if(!this.pagesCount)return{views:[]};var e=this._pages[this._currentPageNumber-1],t=e.div,r={id:e.id,x:t.offsetLeft+t.clientLeft,y:t.offsetTop+t.clientTop,view:e};return{first:r,last:r,views:[r]}}},{key:"_getVisiblePages",value:function(){return(0,n.getVisibleElements)(this.container,this._pages,!0,this._isScrollModeHorizontal)}},{key:"isPageVisible",value:function(e){return!!this.pdfDocument&&(e<1||e>this.pagesCount?(console.error("".concat(this._name,'.isPageVisible: "').concat(e,'" is out of bounds.')),!1):this._getVisiblePages().views.some((function(t){return t.id===e})))}},{key:"cleanup",value:function(){for(var e=0,t=this._pages.length;e3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;return new l.TextLayerBuilder({textLayerDiv:e,eventBus:i,pageIndex:t,viewport:r,findController:this.isInPresentationMode?null:this.findController,enhanceTextSelection:!this.isInPresentationMode&&n})}},{key:"createAnnotationLayerBuilder",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:n.NullL10n;return new a.AnnotationLayerBuilder({pageDiv:e,pdfPage:t,annotationStorage:r,imageResourcesPath:i,renderInteractiveForms:o,linkService:this.linkService,downloadManager:this.downloadManager,l10n:s})}},{key:"getPagesOverview",value:function(){var e=this._pages.map((function(e){var t=e.pdfPage.getViewport({scale:1});return{width:t.width,height:t.height,rotation:t.rotation}}));return this.enablePrintAutoRotate?e.map((function(e){return(0,n.isPortraitOrientation)(e)?e:{width:e.height,height:e.width,rotation:(e.rotation+90)%360}})):e}},{key:"_updateScrollMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this._scrollMode,r=this.viewer;r.classList.toggle("scrollHorizontal",t===n.ScrollMode.HORIZONTAL),r.classList.toggle("scrollWrapped",t===n.ScrollMode.WRAPPED),this.pdfDocument&&e&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&this._setScale(this._currentScaleValue,!0),this._setCurrentPageNumber(e,!0),this.update())}},{key:"_updateSpreadMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.pdfDocument){var t=this.viewer,r=this._pages;if(t.textContent="",this._spreadMode===n.SpreadMode.NONE)for(var i=0,a=r.length;i=0&&(t=r+1)}this._setCurrentPageNumber(t,!0)||console.error("".concat(this._name,'.currentPageLabel: "').concat(e,'" is not a valid page.'))}}},{key:"currentScale",get:function(){return this._currentScale!==n.UNKNOWN_SCALE?this._currentScale:n.DEFAULT_SCALE},set:function(e){if(isNaN(e))throw new Error("Invalid numeric scale.");this.pdfDocument&&this._setScale(e,!1)}},{key:"currentScaleValue",get:function(){return this._currentScaleValue},set:function(e){this.pdfDocument&&this._setScale(e,!1)}},{key:"pagesRotation",get:function(){return this._pagesRotation},set:function(e){if(!(0,n.isValidRotation)(e))throw new Error("Invalid pages rotation angle.");if(this.pdfDocument&&this._pagesRotation!==e){this._pagesRotation=e;for(var t=this._currentPageNumber,r=0,i=this._pages.length;rthis.container.clientWidth}},{key:"isVerticalScrollbarEnabled",get:function(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}},{key:"hasEqualPageSizes",get:function(){for(var e=this._pages[0],t=1,r=this._pages.length;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 a,o=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(u)throw a}}}}function s(e,t){if(e){if("string"===typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rc+h)&&(i={left:0,top:0})}f(_(r.prototype),"_scrollIntoView",this).call(this,{pageDiv:t,pageSpot:i,pageNumber:o})}},{key:"_getVisiblePages",value:function(){return this.isInPresentationMode?this._getCurrentVisiblePage():f(_(r.prototype),"_getVisiblePages",this).call(this)}},{key:"_updateHelper",value:function(e){if(!this.isInPresentationMode){var t,r=this._currentPageNumber,n=!1,i=o(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(a.percent<100)break;if(a.id===r){n=!0;break}}}catch(s){i.e(s)}finally{i.f()}n||(r=e[0].id),this._setCurrentPageNumber(r)}}},{key:"_viewerElement",get:function(){return(0,i.shadow)(this,"_viewerElement",this.viewer)}}]),r}(n.BaseViewer);t.PDFViewer=A}])}))},d4de:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABDklEQVQ4je3Uq0oFURSA4e/ICIKKYBNExIcwmQSTFt9AEAwGMRqNRqvBLmgQLILFcJ5AuxgEi3gDLxhUlsyROduZw7lF/7T32mv9zN7DWrWFk+dtDPnLOU5L4kFlTYZNjJUcfrUQVtZk+eIIa8nhe4UsmEatsJ/ERSwawg88YA4TLURl1PHUiGdJwhYWOxQu4bJKGNxhvQ1R3GYjDYbwES+F2CsO2xAOFtaf+ZO9ZfkD98oNxsMx0AdZE//C/gh3sdqjJ/7wHpZDuIL5HoUj+SyYLeuUqXzSdEUqrOed0gm3xdxUuNPlh8WtmoTxhmdJ0gH2KwTHGC7sf6d3CK8xipmk6Kc3K4j+j5oiV7j/Bgb6KVUzRmtkAAAAAElFTkSuQmCC"},d724:function(e,t,r){"use strict";r("9c93")},d991:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAA6ElEQVQ4jZXTvW0CQRCG4U8YEuQAiIgcUIA7QOAaCAgIgTLowx0QQOyMDqADkCgCB0iIFw3cSadlb39GGt3tau7R7M8JsBwCreI9J7+BptXbYArcgG0mNgL+gY1hDUmfkuw5kbSW1FI8RpL+JLUlDZ5Goc+BO6+IdTYuOrE4AL1yaTmYF3GhGOYi3eq3vtYXHiyI1EEutoshIcjFgohlI3DQR0nXyvgs6VJbnXDEx0pnm7qrEUP2xXIWMSwF8e3ZG5aKlLmsw8qCnwQkiPmQTsKf/4bZ5G8m4mInoG8TH8AqEylzBnwBegBPGLQMvNBPMAAAAABJRU5ErkJggg=="},dc98:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAVCAYAAABPPm7SAAACEElEQVQ4jaVUTWvUUBS9972XN0k6rZ2MVioIrhR1ozgVBVci/gNx2R9gVvoD3Ah+rKQNCAUXuhDcK7hUcKMGXPixUCh+0EVpR6edaZKXrysZZsZp5sUuvBAI75x77rnnhQAR7fmE766ZVRwGe1Tku7MAYOpYke/yfwpEvrs/CbJjFVgNAESlQOS781mSnw234scazErCrFG8awUi352jnC4F7fgWEBwtYXae0cGoE18AABS6ZiBY3NlUVymn04NjHDZTTkd2NtVxInCKM1FqLgK7HvxSF/OUzoxBFPluEeSJoB0fpoyaQ0CMNU8DwO2wE59LVX6qZMwAgJPh73guS/IDf2UHApHvSgBYUt30fEXqC2o7mRoGNyoEEMVdAsCDJMguq24yrws1CbNDqpfqAqfCwVKq8ivhVlwfhlUu1UsKLNBhhepPxpEQMdMRoK+KeRXEzJZ3hwm8aTvyBzJUOpbZMHrItAOov5fZ8u5zye7aTfkeGYZlFhfso92U68gwnXAwmtLyVrjBlm1HvkCEbon4hRvss+3IVUSIJxyMiTzhkj20nNojROiUsFUu+VerIT8BwmjViasxW95zIdlTc1beA4T2bmx5TZj8m7VPvi0+H61An7jgvTYs/sycMW4AwEZpwIZh87XatHhVKTAgfpBT4qWsi0UNtl2rG+u7QqwQ+W7OGG8qXBYrpP/3TySCPz/TKReIBFS6AAAAAElFTkSuQmCC"},de26:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjA1MTBCMDg2QUVBNDExRURCMDg3Qjg2NzBBQTUzODI1IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjA1MTBCMDg3QUVBNDExRURCMDg3Qjg2NzBBQTUzODI1Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MDUxMEIwODRBRUE0MTFFREIwODdCODY3MEFBNTM4MjUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MDUxMEIwODVBRUE0MTFFREIwODdCODY3MEFBNTM4MjUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz73TecNAAABK0lEQVR42qSUPUsDQRCGN5szZRSJhfhrgpzVtdppl04CgqKmN3hXWFhZaGWsFSwNxP+iiNoIKcWvZ2ASjuOO210HnmX3YF/mnZ2bRnw/bRhjDqEPqyYsXuAcsojlCIZwAxP49hQTjXU4hV857MEItk14XII47VuWFXgMFDqBd92PYc3qwcVmAh+5s1gcwJmev2SxHtl0YCknJg95rPt52ACblWKhgiKWwgW0/iP4UxCVer6W9ZBr3MEONHPf3lwEE32AfGa3MIVrly4vlkD+mHaJ3ZGLDVtycVG7Pg0pja1pjdS3Baxvn/nWcFgQa1W1R51gU7Pt6TibWf2EZR+tSKdFF6508oTGBjxHOi3E3gI8zKaGR8i9GDbhQAQzmbSwC1uB2T3BviT3J8AABcs8R9At2GwAAAAASUVORK5CYII="},dfe2:function(e,t,r){},edfb:function(module,exports,__webpack_require__){(function(Buffer,process,global){(function(e,t){module.exports=t()})(0,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLinkAttributes",{enumerable:!0,get:function(){return n.addLinkAttributes}}),Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function(){return n.getFilenameFromUrl}}),Object.defineProperty(t,"LinkTarget",{enumerable:!0,get:function(){return n.LinkTarget}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function(){return n.PDFDateString}}),Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function(){return n.RenderingCancelledException}}),Object.defineProperty(t,"build",{enumerable:!0,get:function(){return i.build}}),Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return i.getDocument}}),Object.defineProperty(t,"LoopbackPort",{enumerable:!0,get:function(){return i.LoopbackPort}}),Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return i.PDFDataRangeTransport}}),Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return i.PDFWorker}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return i.version}}),Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function(){return a.CMapCompressionType}}),Object.defineProperty(t,"createObjectURL",{enumerable:!0,get:function(){return a.createObjectURL}}),Object.defineProperty(t,"createPromiseCapability",{enumerable:!0,get:function(){return a.createPromiseCapability}}),Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return a.createValidAbsoluteUrl}}),Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function(){return a.InvalidPDFException}}),Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function(){return a.MissingPDFException}}),Object.defineProperty(t,"OPS",{enumerable:!0,get:function(){return a.OPS}}),Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function(){return a.PasswordResponses}}),Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function(){return a.PermissionFlag}}),Object.defineProperty(t,"removeNullCharacters",{enumerable:!0,get:function(){return a.removeNullCharacters}}),Object.defineProperty(t,"shadow",{enumerable:!0,get:function(){return a.shadow}}),Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function(){return a.UnexpectedResponseException}}),Object.defineProperty(t,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return a.UNSUPPORTED_FEATURES}}),Object.defineProperty(t,"Util",{enumerable:!0,get:function(){return a.Util}}),Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function(){return a.VerbosityLevel}}),Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function(){return o.AnnotationLayer}}),Object.defineProperty(t,"apiCompatibilityParams",{enumerable:!0,get:function(){return s.apiCompatibilityParams}}),Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function(){return u.GlobalWorkerOptions}}),Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return l.renderTextLayer}}),Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return c.SVGGraphics}});var n=r(1),i=r(202),a=r(5),o=r(216),s=r(206),u=r(209),l=r(217),c=r(218),h=r(7),f=h.isNodeJS;if(f){var d=r(219).PDFNodeStream;(0,i.setPDFNetworkStreamFactory)((function(e){return new d(e)}))}else{var p,v=r(222).PDFNetworkStream;(0,n.isFetchSupported)()&&(p=r(223).PDFFetchStream),(0,i.setPDFNetworkStreamFactory)((function(e){return p&&(0,n.isValidFetchUrl)(e.url)?new p(e):new v(e)}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=L,t.getFilenameFromUrl=I,t.isFetchSupported=D,t.isValidFetchUrl=N,t.loadScript=j,t.deprecated=U,t.PDFDateString=t.StatTimer=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.BaseCMapReaderFactory=t.DOMCanvasFactory=t.BaseCanvasFactory=t.DEFAULT_LINK_REL=t.LinkTarget=t.RenderingCancelledException=t.PageViewport=void 0;var n=a(r(2)),i=r(5);function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 a,o=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(u)throw a}}}}function s(e,t){if(e){if("string"===typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},i=n.ownerDocument,a=void 0===i?globalThis.document:i;return b(this,r),e=t.call(this),e._document=a,e}return A(r,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var r=this._document.createElement("canvas"),n=r.getContext("2d");return r.width=e,r.height=t,{canvas:r,context:n}}}]),r}(k);t.DOMCanvasFactory=x;var C=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r,a=t.isCompressed,o=void 0!==a&&a;b(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=n,this.isCompressed=o}return A(e,[{key:"fetch",value:function(){var e=c(n["default"].mark((function e(t){var r,a,o,s=this;return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.name,this.baseUrl){e.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){e.next=5;break}throw new Error("CMap name must be specified.");case 5:return a=this.baseUrl+r+(this.isCompressed?".bcmap":""),o=this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE,e.abrupt("return",this._fetchData(a,o)["catch"]((function(e){throw new Error("Unable to load ".concat(s.isCompressed?"binary ":"","CMap at: ").concat(a))})));case 8:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"_fetchData",value:function(e,t){(0,i.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseCMapReaderFactory=C;var P=function(e){f(r,e);var t=p(r);function r(){return b(this,r),t.apply(this,arguments)}return A(r,[{key:"_fetchData",value:function(e,t){var r=this;return D()&&N(e,document.baseURI)?fetch(e).then(function(){var e=c(n["default"].mark((function e(a){var o;return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a.ok){e.next=2;break}throw new Error(a.statusText);case 2:if(!r.isCompressed){e.next=10;break}return e.t0=Uint8Array,e.next=6,a.arrayBuffer();case 6:e.t1=e.sent,o=new e.t0(e.t1),e.next=15;break;case 10:return e.t2=i.stringToBytes,e.next=13,a.text();case 13:e.t3=e.sent,o=(0,e.t2)(e.t3);case 15:return e.abrupt("return",{cMapData:o,compressionType:t});case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):new Promise((function(n,a){var o=new XMLHttpRequest;o.open("GET",e,!0),r.isCompressed&&(o.responseType="arraybuffer"),o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE){var e;if(200===o.status||0===o.status)if(r.isCompressed&&o.response?e=new Uint8Array(o.response):!r.isCompressed&&o.responseText&&(e=(0,i.stringToBytes)(o.responseText)),e)return void n({cMapData:e,compressionType:t});a(new Error(o.statusText))}},o.send(null)}))}}]),r}(C);t.DOMCMapReaderFactory=P;var R=function(){function e(){b(this,e)}return A(e,[{key:"create",value:function(e,t){(0,i.assert)(e>0&&t>0,"Invalid SVG dimensions");var r=document.createElementNS(S,"svg:svg");return r.setAttribute("version","1.1"),r.setAttribute("width",e+"px"),r.setAttribute("height",t+"px"),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox","0 0 "+e+" "+t),r}},{key:"createElement",value:function(e){return(0,i.assert)("string"===typeof e,"Invalid SVG element type"),document.createElementNS(S,e)}}]),e}();t.DOMSVGFactory=R;var T=function(){function e(t){var r=t.viewBox,n=t.scale,i=t.rotation,a=t.offsetX,o=void 0===a?0:a,s=t.offsetY,u=void 0===s?0:s,l=t.dontFlip,c=void 0!==l&&l;b(this,e),this.viewBox=r,this.scale=n,this.rotation=i,this.offsetX=o,this.offsetY=u;var h,f,d,p,v,g,y,m,_=(r[2]+r[0])/2,A=(r[3]+r[1])/2;switch(i%=360,i=i<0?i+360:i,i){case 180:h=-1,f=0,d=0,p=1;break;case 90:h=0,f=1,d=1,p=0;break;case 270:h=0,f=-1,d=-1,p=0;break;case 0:h=1,f=0,d=0,p=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}c&&(d=-d,p=-p),0===h?(v=Math.abs(A-r[1])*n+o,g=Math.abs(_-r[0])*n+u,y=Math.abs(r[3]-r[1])*n,m=Math.abs(r[2]-r[0])*n):(v=Math.abs(_-r[0])*n+o,g=Math.abs(A-r[1])*n+u,y=Math.abs(r[2]-r[0])*n,m=Math.abs(r[3]-r[1])*n),this.transform=[h*n,f*n,d*n,p*n,v-h*n*_-d*n*A,g-f*n*_-p*n*A],this.width=y,this.height=m}return A(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,n=void 0===r?this.scale:r,i=t.rotation,a=void 0===i?this.rotation:i,o=t.offsetX,s=void 0===o?this.offsetX:o,u=t.offsetY,l=void 0===u?this.offsetY:u,c=t.dontFlip,h=void 0!==c&&c;return new e({viewBox:this.viewBox.slice(),scale:n,rotation:a,offsetX:s,offsetY:l,dontFlip:h})}},{key:"convertToViewportPoint",value:function(e,t){return i.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=i.Util.applyTransform([e[0],e[1]],this.transform),r=i.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}},{key:"convertToPdfPoint",value:function(e,t){return i.Util.applyInverseTransform([e,t],this.transform)}}]),e}();t.PageViewport=T;var E=function(e){f(r,e);var t=p(r);function r(e,n){var i;return b(this,r),i=t.call(this,e),i.type=n,i}return r}(i.BaseException);t.RenderingCancelledException=E;var O={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.url,n=t.target,a=t.rel,o=t.enabled,s=void 0===o||o;(0,i.assert)(r&&"string"===typeof r,'addLinkAttributes: A valid "url" parameter must provided.');var u=(0,i.removeNullCharacters)(r);s?e.href=e.title=u:(e.href="",e.title="Disabled: ".concat(u),e.onclick=function(){return!1});var l="";switch(n){case O.NONE:break;case O.SELF:l="_self";break;case O.BLANK:l="_blank";break;case O.PARENT:l="_parent";break;case O.TOP:l="_top";break}e.target=l,e.rel="string"===typeof a?a:w}function I(e){var t=e.indexOf("#"),r=e.indexOf("?"),n=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",n)+1,n)}t.LinkTarget=O;var M,F=function(){function e(){b(this,e),this.started=Object.create(null),this.times=[]}return A(e,[{key:"time",value:function(e){e in this.started&&(0,i.warn)("Timer is already running for ".concat(e)),this.started[e]=Date.now()}},{key:"timeEnd",value:function(e){e in this.started||(0,i.warn)("Timer has not been started for ".concat(e)),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}},{key:"toString",value:function(){var e,t=[],r=0,n=o(this.times);try{for(n.s();!(e=n.n()).done;){var i=e.value,a=i.name;a.length>r&&(r=a.length)}}catch(h){n.e(h)}finally{n.f()}var s,u=o(this.times);try{for(u.s();!(s=u.n()).done;){var l=s.value,c=l.end-l.start;t.push("".concat(l.name.padEnd(r)," ").concat(c,"ms\n"))}}catch(h){u.e(h)}finally{u.f()}return t.join("")}}]),e}();function D(){return"undefined"!==typeof fetch&&"undefined"!==typeof Response&&"body"in Response.prototype&&"undefined"!==typeof ReadableStream}function N(e,t){try{var r=t?new URL(e,t):new URL(e),n=r.protocol;return"http:"===n||"https:"===n}catch(i){return!1}}function j(e){return new Promise((function(t,r){var n=document.createElement("script");n.src=e,n.onload=t,n.onerror=function(){r(new Error("Cannot load script at: ".concat(n.src)))},(document.head||document.documentElement).appendChild(n)}))}function U(e){console.log("Deprecated API usage: "+e)}t.StatTimer=F;var B=function(){function e(){b(this,e)}return A(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,i.isString)(e))return null;M||(M=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=M.exec(e);if(!t)return null;var r=parseInt(t[1],10),n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;var a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;var o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;var s=parseInt(t[5],10);s=s>=0&&s<=59?s:0;var u=parseInt(t[6],10);u=u>=0&&u<=59?u:0;var l=t[7]||"Z",c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;var h=parseInt(t[9],10)||0;return h=h>=0&&h<=59?h:0,"-"===l?(o+=c,s+=h):"+"===l&&(o-=c,s-=h),new Date(Date.UTC(r,n,a,o,s,u))}}]),e}();t.PDFDateString=B},function(e,t,r){"use strict";e.exports=r(3)},function(e,t,r){"use strict";(function(e){function t(e){return t="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}var r=function(e){var r,n=Object.prototype,i=n.hasOwnProperty,a="function"===typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(I){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var i=t&&t.prototype instanceof y?t:y,a=Object.create(i.prototype),o=new E(n||[]);return a._invoke=C(e,r,o),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(I){return{type:"throw",arg:I}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function y(){}function m(){}function b(){}var _={};_[o]=function(){return this};var A=Object.getPrototypeOf,w=A&&A(A(O([])));w&&w!==n&&i.call(w,o)&&(_=w);var S=b.prototype=y.prototype=Object.create(_);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,r){function n(a,o,s,u){var l=h(e[a],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"===t(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):r.resolve(f).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,u)}))}u(l.arg)}var a;function o(e,t){function i(){return new r((function(r,i){n(e,t,r,i)}))}return a=a?a.then(i,i):i()}this._invoke=o}function C(e,t,r){var n=f;return function(i,a){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===i)throw a;return L()}r.method=i,r.arg=a;while(1){var o=r.delegate;if(o){var s=P(o,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=h(e,t,r);if("normal"===u.type){if(n=r.done?v:d,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=v,r.method="throw",r.arg=u.arg)}}}function P(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator["return"]&&(t.method="return",t.arg=r,P(e,t),"throw"===t.method))return g;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=h(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,g;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,g):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){while(++n=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;T(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),g}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(n){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(4)(e))},function(e,t,r){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";function n(e,t){for(var r=0;r=T.INFOS&&console.log("Info: ".concat(e))}function j(e){M>=T.WARNINGS&&console.log("Warning: ".concat(e))}function U(e){throw new Error(e)}function B(e,t){e||U(t)}function q(e,t){var r;try{if(r=new URL(e),!r.origin||"null"===r.origin)return!1}catch(i){return!1}var n=new URL(t,r);return r.origin===n.origin}function W(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function V(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(W(r))return r}catch(n){}return null}function G(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var z=function(){function e(t){this.constructor===e&&U("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=z;var H=function(e){s(r,e);var t=l(r);function r(e,n){var i;return o(this,r),i=t.call(this,e),i.code=n,i}return r}(z);t.PasswordException=H;var Y=function(e){s(r,e);var t=l(r);function r(e,n){var i;return o(this,r),i=t.call(this,e),i.details=n,i}return r}(z);t.UnknownErrorException=Y;var X=function(e){s(r,e);var t=l(r);function r(){return o(this,r),t.apply(this,arguments)}return r}(z);t.InvalidPDFException=X;var Z=function(e){s(r,e);var t=l(r);function r(){return o(this,r),t.apply(this,arguments)}return r}(z);t.MissingPDFException=Z;var Q=function(e){s(r,e);var t=l(r);function r(e,n){var i;return o(this,r),i=t.call(this,e),i.status=n,i}return r}(z);t.UnexpectedResponseException=Q;var J=function(e){s(r,e);var t=l(r);function r(){return o(this,r),t.apply(this,arguments)}return r}(z);t.FormatError=J;var K=function(e){s(r,e);var t=l(r);function r(){return o(this,r),t.apply(this,arguments)}return r}(z);t.AbortException=K;var $=/\x00/g;function ee(e){return"string"!==typeof e?(j("The argument for removeNullCharacters must be a string."),e):e.replace($,"")}function te(e){B(null!==e&&"object"===a(e)&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length,r=8192;if(t>24&255,e>>16&255,e>>8&255,255&e)}function oe(){var e=new Uint8Array(4);e[0]=1;var t=new Uint32Array(e.buffer,0,1);return 1===t[0]}var se={get value(){return G(this,"value",oe())}};function ue(){try{return new Function(""),!0}catch(e){return!1}}t.IsLittleEndianCached=se;var le={get value(){return G(this,"value",ue())}};t.IsEvalSupportedCached=le;var ce=["rgb(",0,",",0,",",0,")"],he=function(){function e(){o(this,e)}return i(e,null,[{key:"makeCssRgb",value:function(e,t,r){return ce[1]=e,ce[3]=t,ce[5]=r,ce.join("")}},{key:"transform",value:function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function(e,t){var r=e[0]*t[0]+e[1]*t[2]+t[4],n=e[0]*t[1]+e[1]*t[3]+t[5];return[r,n]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2],n=(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,i=(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r;return[n,i]}},{key:"getAxialAlignedBoundingBox",value:function(t,r){var n=e.applyTransform(t,r),i=e.applyTransform(t.slice(2,4),r),a=e.applyTransform([t[0],t[3]],r),o=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],i[0],a[0],o[0]),Math.min(n[1],i[1],a[1],o[1]),Math.max(n[0],i[0],a[0],o[0]),Math.max(n[1],i[1],a[1],o[1])]}},{key:"inverseTransform",value:function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"apply3dTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],o=(r+a)/2,s=Math.sqrt((r+a)*(r+a)-4*(r*a-i*n))/2,u=o+s||1,l=o-s||1;return[Math.sqrt(u),Math.sqrt(l)]}},{key:"normalizeRect",value:function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(t,r){function n(e,t){return e-t}var i=[t[0],t[2],r[0],r[2]].sort(n),a=[t[1],t[3],r[1],r[3]].sort(n),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),i[0]===t[0]&&i[1]===r[0]||i[0]===r[0]&&i[1]===t[0]?(o[0]=i[1],o[2]=i[2],a[0]===t[1]&&a[1]===r[1]||a[0]===r[1]&&a[1]===t[1]?(o[1]=a[1],o[3]=a[2],o):null):null}}]),e}();t.Util=he;var fe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function de(e){var t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(var n=2;n0&&void 0!==arguments[0]?arguments[0]:new Date(Date.now()),t=[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),(e.getUTCDate()+1).toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")];return t.join("")}function Se(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise((function(r,n){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,n(e)}})),e}var ke=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!n&&URL.createObjectURL){var i=new Blob([t],{type:r});return URL.createObjectURL(i)}for(var a="data:".concat(r,";base64,"),o=0,s=t.length;o>2,f=(3&u)<<4|l>>4,d=o+1>6:64,p=o+21?!!arguments[1]:!this.contains(e);return this[t?"add":"remove"](e),t})}}(),function(){if(a&&s){var e=window.history.pushState,t=window.history.replaceState;window.history.pushState=function(t,r,n){var i=void 0===n?[t,r]:[t,r,n];e.apply(this,i)},window.history.replaceState=function(e,r,n){var i=void 0===n?[e,r]:[e,r,n];t.apply(this,i)}}}(),function(){String.prototype.startsWith||r(53)}(),function(){String.prototype.endsWith||r(64)}(),function(){String.prototype.includes||r(66)}(),function(){Array.prototype.includes||r(68)}(),function(){Array.from||r(76)}(),function(){Object.assign||r(98)}(),function(){Object.fromEntries||r(101)}(),function(){Math.log2||(Math.log2=r(105))}(),function(){Number.isNaN||(Number.isNaN=r(107))}(),function(){Number.isInteger||(Number.isInteger=r(109))}(),function(){Uint8Array.prototype.slice||r(112)}(),function(){globalThis.Promise&&globalThis.Promise.allSettled||(globalThis.Promise=r(117))}(),function(){globalThis.URL=r(138)}(),function(){var e=!1;if("undefined"!==typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),e=!0}catch(t){}e||(globalThis.ReadableStream=r(145).ReadableStream)}(),function(){globalThis.Map&&globalThis.Map.prototype.entries||(globalThis.Map=r(146))}(),function(){globalThis.Set&&globalThis.Set.prototype.entries||(globalThis.Set=r(153))}(),function(){globalThis.WeakMap||(globalThis.WeakMap=r(155))}(),function(){globalThis.WeakSet||(globalThis.WeakSet=r(161))}(),function(){String.prototype.codePointAt||r(163)}(),function(){String.fromCodePoint||(String.fromCodePoint=r(165))}(),function(){globalThis.Symbol||r(167)}(),function(){String.prototype.padStart||r(190)}(),function(){String.prototype.padEnd||r(195)}(),function(){Object.values||(Object.values=r(197))}(),function(){Object.entries||(Object.entries=r(200))}()}},function(e,t,r){"use strict";function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;var i="object"===("undefined"===typeof process?"undefined":n(process))&&process+""==="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=i},function(e,t,r){r(9),e.exports=r(11)},function(e,t,r){var n=r(10),i=r(11);n({global:!0},{globalThis:i})},function(e,t,r){var n=r(11),i=r(12).f,a=r(26),o=r(29),s=r(30),u=r(40),l=r(52);e.exports=function(e,t){var r,c,h,f,d,p,v=e.target,g=e.global,y=e.stat;if(c=g?n:y?n[v]||s(v,{}):(n[v]||{}).prototype,c)for(h in t){if(d=t[h],e.noTargetGet?(p=i(c,h),f=p&&p.value):f=c[h],r=l(g?h:v+(y?".":"#")+h,e.forced),!r&&void 0!==f){if(typeof d===typeof f)continue;u(d,f)}(e.sham||f&&f.sham)&&a(d,"sham",!0),o(c,h,d,e)}}},function(e,t){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof global&&global)||Function("return this")()},function(e,t,r){var n=r(13),i=r(15),a=r(16),o=r(17),s=r(21),u=r(23),l=r(24),c=Object.getOwnPropertyDescriptor;t.f=n?c:function(e,t){if(e=o(e),t=s(t,!0),l)try{return c(e,t)}catch(r){}if(u(e,t))return a(!i.f.call(e,t),e[t])}},function(e,t,r){var n=r(14);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,r){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!n.call({1:2},1);t.f=a?function(e){var t=i(this,e);return!!t&&t.enumerable}:n},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(18),i=r(20);e.exports=function(e){return n(i(e))}},function(e,t,r){var n=r(14),i=r(19),a="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?a.call(e,""):Object(e)}:Object},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){var n=r(22);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(13),i=r(14),a=r(25);e.exports=!n&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(11),i=r(22),a=n.document,o=i(a)&&i(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},function(e,t,r){var n=r(13),i=r(27),a=r(16);e.exports=n?function(e,t,r){return i.f(e,t,a(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(13),i=r(24),a=r(28),o=r(21),s=Object.defineProperty;t.f=n?s:function(e,t,r){if(a(e),t=o(t,!0),a(r),i)try{return s(e,t,r)}catch(n){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(22);e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,r){var n=r(11),i=r(26),a=r(23),o=r(30),s=r(31),u=r(33),l=u.get,c=u.enforce,h=String(String).split("String");(e.exports=function(e,t,r,s){var u=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof r&&("string"!=typeof t||a(r,"name")||i(r,"name",t),c(r).source=h.join("string"==typeof t?t:"")),e!==n?(u?!f&&e[t]&&(l=!0):delete e[t],l?e[t]=r:i(e,t,r)):l?e[t]=r:o(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||s(this)}))},function(e,t,r){var n=r(11),i=r(26);e.exports=function(e,t){try{i(n,e,t)}catch(r){n[e]=t}return t}},function(e,t,r){var n=r(32),i=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return i.call(e)}),e.exports=n.inspectSource},function(e,t,r){var n=r(11),i=r(30),a="__core-js_shared__",o=n[a]||i(a,{});e.exports=o},function(e,t,r){var n,i,a,o=r(34),s=r(11),u=r(22),l=r(26),c=r(23),h=r(35),f=r(39),d=s.WeakMap,p=function(e){return a(e)?i(e):n(e,{})},v=function(e){return function(t){var r;if(!u(t)||(r=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}};if(o){var g=new d,y=g.get,m=g.has,b=g.set;n=function(e,t){return b.call(g,e,t),t},i=function(e){return y.call(g,e)||{}},a=function(e){return m.call(g,e)}}else{var _=h("state");f[_]=!0,n=function(e,t){return l(e,_,t),t},i=function(e){return c(e,_)?e[_]:{}},a=function(e){return c(e,_)}}e.exports={set:n,get:i,has:a,enforce:p,getterFor:v}},function(e,t,r){var n=r(11),i=r(31),a=n.WeakMap;e.exports="function"===typeof a&&/native code/.test(i(a))},function(e,t,r){var n=r(36),i=r(38),a=n("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},function(e,t,r){var n=r(37),i=r(32);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports=!1},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++r+n).toString(36)}},function(e,t){e.exports={}},function(e,t,r){var n=r(23),i=r(41),a=r(12),o=r(27);e.exports=function(e,t){for(var r=i(t),s=o.f,u=a.f,l=0;lu)n(s,r=t[u++])&&(~a(l,r)||l.push(r));return l}},function(e,t,r){var n=r(17),i=r(47),a=r(49),o=function(e){return function(t,r,o){var s,u=n(t),l=i(u.length),c=a(o,l);if(e&&r!=r){while(l>c)if(s=u[c++],s!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},function(e,t,r){var n=r(48),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(48),i=Math.max,a=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):a(r,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(14),i=/#|\.prototype\./,a=function(e,t){var r=s[o(e)];return r==l||r!=u&&("function"==typeof t?n(t):!!t)},o=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},function(e,t,r){r(54);var n=r(61);e.exports=n("String","startsWith")},function(e,t,r){"use strict";var n=r(10),i=r(12).f,a=r(47),o=r(55),s=r(20),u=r(60),l=r(37),c="".startsWith,h=Math.min,f=u("startsWith"),d=!l&&!f&&!!function(){var e=i(String.prototype,"startsWith");return e&&!e.writable}();n({target:"String",proto:!0,forced:!d&&!f},{startsWith:function(e){var t=String(s(this));o(e);var r=a(h(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return c?c.call(t,n,r):t.slice(r,r+n.length)===n}})},function(e,t,r){var n=r(56);e.exports=function(e){if(n(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,r){var n=r(22),i=r(19),a=r(57),o=a("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,r){var n=r(11),i=r(36),a=r(23),o=r(38),s=r(58),u=r(59),l=i("wks"),c=n.Symbol,h=u?c:c&&c.withoutSetter||o;e.exports=function(e){return a(l,e)||(s&&a(c,e)?l[e]=c[e]:l[e]=h("Symbol."+e)),l[e]}},function(e,t,r){var n=r(14);e.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},function(e,t,r){var n=r(58);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,r){var n=r(57),i=n("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[i]=!1,"/./"[e](t)}catch(n){}}return!1}},function(e,t,r){var n=r(11),i=r(62),a=Function.call;e.exports=function(e,t,r){return i(a,n[e].prototype[t],r)}},function(e,t,r){var n=r(63);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,r){r(65);var n=r(61);e.exports=n("String","endsWith")},function(e,t,r){"use strict";var n=r(10),i=r(12).f,a=r(47),o=r(55),s=r(20),u=r(60),l=r(37),c="".endsWith,h=Math.min,f=u("endsWith"),d=!l&&!f&&!!function(){var e=i(String.prototype,"endsWith");return e&&!e.writable}();n({target:"String",proto:!0,forced:!d&&!f},{endsWith:function(e){var t=String(s(this));o(e);var r=arguments.length>1?arguments[1]:void 0,n=a(t.length),i=void 0===r?n:h(a(r),n),u=String(e);return c?c.call(t,u,i):t.slice(i-u.length,i)===u}})},function(e,t,r){r(67);var n=r(61);e.exports=n("String","includes")},function(e,t,r){"use strict";var n=r(10),i=r(55),a=r(20),o=r(60);n({target:"String",proto:!0,forced:!o("includes")},{includes:function(e){return!!~String(a(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){r(69);var n=r(61);e.exports=n("Array","includes")},function(e,t,r){"use strict";var n=r(10),i=r(46).includes,a=r(70),o=r(75),s=o("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:!s},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},function(e,t,r){var n=r(57),i=r(71),a=r(27),o=n("unscopables"),s=Array.prototype;void 0==s[o]&&a.f(s,o,{configurable:!0,value:i(null)}),e.exports=function(e){s[o][e]=!0}},function(e,t,r){var n,i=r(28),a=r(72),o=r(50),s=r(39),u=r(74),l=r(25),c=r(35),h=">",f="<",d="prototype",p="script",v=c("IE_PROTO"),g=function(){},y=function(e){return f+p+h+e+f+"/"+p+h},m=function(e){e.write(y("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){var e,t=l("iframe"),r="java"+p+":";return t.style.display="none",u.appendChild(t),t.src=String(r),e=t.contentWindow.document,e.open(),e.write(y("document.F=Object")),e.close(),e.F},_=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(t){}_=n?m(n):b();var e=o.length;while(e--)delete _[d][o[e]];return _()};s[v]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(g[d]=i(e),r=new g,g[d]=null,r[v]=e):r=_(),void 0===t?r:a(r,t)}},function(e,t,r){var n=r(13),i=r(27),a=r(28),o=r(73);e.exports=n?Object.defineProperties:function(e,t){a(e);var r,n=o(t),s=n.length,u=0;while(s>u)i.f(e,r=n[u++],t[r]);return e}},function(e,t,r){var n=r(45),i=r(50);e.exports=Object.keys||function(e){return n(e,i)}},function(e,t,r){var n=r(42);e.exports=n("document","documentElement")},function(e,t,r){var n=r(13),i=r(14),a=r(23),o=Object.defineProperty,s={},u=function(e){throw e};e.exports=function(e,t){if(a(s,e))return s[e];t||(t={});var r=[][e],l=!!a(t,"ACCESSORS")&&t.ACCESSORS,c=a(t,0)?t[0]:u,h=a(t,1)?t[1]:void 0;return s[e]=!!r&&!i((function(){if(l&&!n)return!0;var e={length:-1};l?o(e,1,{enumerable:!0,get:u}):e[1]=1,r.call(e,c,h)}))}},function(e,t,r){r(77),r(89);var n=r(43);e.exports=n.Array.from},function(e,t,r){"use strict";var n=r(78).charAt,i=r(33),a=r(79),o="String Iterator",s=i.set,u=i.getterFor(o);a(String,"String",(function(e){s(this,{type:o,string:String(e),index:0})}),(function(){var e,t=u(this),r=t.string,i=t.index;return i>=r.length?{value:void 0,done:!0}:(e=n(r,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,r){var n=r(48),i=r(20),a=function(e){return function(t,r){var a,o,s=String(i(t)),u=n(r),l=s.length;return u<0||u>=l?e?"":void 0:(a=s.charCodeAt(u),a<55296||a>56319||u+1===l||(o=s.charCodeAt(u+1))<56320||o>57343?e?s.charAt(u):a:e?s.slice(u,u+2):o-56320+(a-55296<<10)+65536)}};e.exports={codeAt:a(!1),charAt:a(!0)}},function(e,t,r){"use strict";var n=r(10),i=r(80),a=r(82),o=r(87),s=r(85),u=r(26),l=r(29),c=r(57),h=r(37),f=r(86),d=r(81),p=d.IteratorPrototype,v=d.BUGGY_SAFARI_ITERATORS,g=c("iterator"),y="keys",m="values",b="entries",_=function(){return this};e.exports=function(e,t,r,c,d,A,w){i(r,t,c);var S,k,x,C=function(e){if(e===d&&O)return O;if(!v&&e in T)return T[e];switch(e){case y:return function(){return new r(this,e)};case m:return function(){return new r(this,e)};case b:return function(){return new r(this,e)}}return function(){return new r(this)}},P=t+" Iterator",R=!1,T=e.prototype,E=T[g]||T["@@iterator"]||d&&T[d],O=!v&&E||C(d),L="Array"==t&&T.entries||E;if(L&&(S=a(L.call(new e)),p!==Object.prototype&&S.next&&(h||a(S)===p||(o?o(S,p):"function"!=typeof S[g]&&u(S,g,_)),s(S,P,!0,!0),h&&(f[P]=_))),d==m&&E&&E.name!==m&&(R=!0,O=function(){return E.call(this)}),h&&!w||T[g]===O||u(T,g,O),f[t]=O,d)if(k={values:C(m),keys:A?O:C(y),entries:C(b)},w)for(x in k)(v||R||!(x in T))&&l(T,x,k[x]);else n({target:t,proto:!0,forced:v||R},k);return k}},function(e,t,r){"use strict";var n=r(81).IteratorPrototype,i=r(71),a=r(16),o=r(85),s=r(86),u=function(){return this};e.exports=function(e,t,r){var l=t+" Iterator";return e.prototype=i(n,{next:a(1,r)}),o(e,l,!1,!0),s[l]=u,e}},function(e,t,r){"use strict";var n,i,a,o=r(82),s=r(26),u=r(23),l=r(57),c=r(37),h=l("iterator"),f=!1,d=function(){return this};[].keys&&(a=[].keys(),"next"in a?(i=o(o(a)),i!==Object.prototype&&(n=i)):f=!0),void 0==n&&(n={}),c||u(n,h)||s(n,h,d),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:f}},function(e,t,r){var n=r(23),i=r(83),a=r(35),o=r(84),s=a("IE_PROTO"),u=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=i(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},function(e,t,r){var n=r(20);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(14);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,r){var n=r(27).f,i=r(23),a=r(57),o=a("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t){e.exports={}},function(e,t,r){var n=r(28),i=r(88);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(r,[]),t=r instanceof Array}catch(a){}return function(r,a){return n(r),i(a),t?e.call(r,a):r.__proto__=a,r}}():void 0)},function(e,t,r){var n=r(22);e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,r){var n=r(10),i=r(90),a=r(97),o=!a((function(e){Array.from(e)}));n({target:"Array",stat:!0,forced:o},{from:i})},function(e,t,r){"use strict";var n=r(62),i=r(83),a=r(91),o=r(92),s=r(47),u=r(93),l=r(94);e.exports=function(e){var t,r,c,h,f,d,p=i(e),v="function"==typeof this?this:Array,g=arguments.length,y=g>1?arguments[1]:void 0,m=void 0!==y,b=l(p),_=0;if(m&&(y=n(y,g>2?arguments[2]:void 0,2)),void 0==b||v==Array&&o(b))for(t=s(p.length),r=new v(t);t>_;_++)d=m?y(p[_],_):p[_],u(r,_,d);else for(h=b.call(p),f=h.next,r=new v;!(c=f.call(h)).done;_++)d=m?a(h,y,[c.value,_],!0):c.value,u(r,_,d);return r.length=_,r}},function(e,t,r){var n=r(28);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(o){var a=e["return"];throw void 0!==a&&n(a.call(e)),o}}},function(e,t,r){var n=r(57),i=r(86),a=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[a]===e)}},function(e,t,r){"use strict";var n=r(21),i=r(27),a=r(16);e.exports=function(e,t,r){var o=n(t);o in e?i.f(e,o,a(0,r)):e[o]=r}},function(e,t,r){var n=r(95),i=r(86),a=r(57),o=a("iterator");e.exports=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[n(e)]}},function(e,t,r){var n=r(96),i=r(19),a=r(57),o=a("toStringTag"),s="Arguments"==i(function(){return arguments}()),u=function(e,t){try{return e[t]}catch(r){}};e.exports=n?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=u(t=Object(e),o))?r:s?i(t):"Object"==(n=i(t))&&"function"==typeof t.callee?"Arguments":n}},function(e,t,r){var n=r(57),i=n("toStringTag"),a={};a[i]="z",e.exports="[object z]"===String(a)},function(e,t,r){var n=r(57),i=n("iterator"),a=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){a=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(u){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var n={};n[i]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(u){}return r}},function(e,t,r){r(99);var n=r(43);e.exports=n.Object.assign},function(e,t,r){var n=r(10),i=r(100);n({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,r){"use strict";var n=r(13),i=r(14),a=r(73),o=r(51),s=r(15),u=r(83),l=r(18),c=Object.assign,h=Object.defineProperty;e.exports=!c||i((function(){if(n&&1!==c({b:1},c(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach((function(e){t[e]=e})),7!=c({},e)[r]||a(c({},t)).join("")!=i}))?function(e,t){var r=u(e),i=arguments.length,c=1,h=o.f,f=s.f;while(i>c){var d,p=l(arguments[c++]),v=h?a(p).concat(h(p)):a(p),g=v.length,y=0;while(g>y)d=v[y++],n&&!f.call(p,d)||(r[d]=p[d])}return r}:c},function(e,t,r){r(102),r(103);var n=r(43);e.exports=n.Object.fromEntries},function(e,t,r){"use strict";var n=r(17),i=r(70),a=r(86),o=r(33),s=r(79),u="Array Iterator",l=o.set,c=o.getterFor(u);e.exports=s(Array,"Array",(function(e,t){l(this,{type:u,target:n(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e,t,r){var n=r(10),i=r(104),a=r(93);n({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,r){a(t,e,r)}),void 0,!0),t}})},function(e,t,r){var n=r(28),i=r(92),a=r(47),o=r(62),s=r(94),u=r(91),l=function(e,t){this.stopped=e,this.result=t},c=e.exports=function(e,t,r,c,h){var f,d,p,v,g,y,m,b=o(t,r,c?2:1);if(h)f=e;else{if(d=s(e),"function"!=typeof d)throw TypeError("Target is not iterable");if(i(d)){for(p=0,v=a(e.length);v>p;p++)if(g=c?b(n(m=e[p])[0],m[1]):b(e[p]),g&&g instanceof l)return g;return new l(!1)}f=d.call(e)}y=f.next;while(!(m=y.call(f)).done)if(g=u(f,b,m.value,c),"object"==typeof g&&g&&g instanceof l)return g;return new l(!1)};c.stop=function(e){return new l(!0,e)}},function(e,t,r){r(106);var n=r(43);e.exports=n.Math.log2},function(e,t,r){var n=r(10),i=Math.log,a=Math.LN2;n({target:"Math",stat:!0},{log2:function(e){return i(e)/a}})},function(e,t,r){r(108);var n=r(43);e.exports=n.Number.isNaN},function(e,t,r){var n=r(10);n({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,r){r(110);var n=r(43);e.exports=n.Number.isInteger},function(e,t,r){var n=r(10),i=r(111);n({target:"Number",stat:!0},{isInteger:i})},function(e,t,r){var n=r(22),i=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&i(e)===e}},function(e,t,r){r(113)},function(e,t,r){"use strict";var n=r(114),i=r(116),a=r(14),o=n.aTypedArray,s=n.aTypedArrayConstructor,u=n.exportTypedArrayMethod,l=[].slice,c=a((function(){new Int8Array(1).slice()}));u("slice",(function(e,t){var r=l.call(o(this),e,t),n=i(this,this.constructor),a=0,u=r.length,c=new(s(n))(u);while(u>a)c[a]=r[a++];return c}),c)},function(e,t,r){"use strict";var n,i=r(115),a=r(13),o=r(11),s=r(22),u=r(23),l=r(95),c=r(26),h=r(29),f=r(27).f,d=r(82),p=r(87),v=r(57),g=r(38),y=o.Int8Array,m=y&&y.prototype,b=o.Uint8ClampedArray,_=b&&b.prototype,A=y&&d(y),w=m&&d(m),S=Object.prototype,k=S.isPrototypeOf,x=v("toStringTag"),C=g("TYPED_ARRAY_TAG"),P=i&&!!p&&"Opera"!==l(o.opera),R=!1,T={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},E=function(e){var t=l(e);return"DataView"===t||u(T,t)},O=function(e){return s(e)&&u(T,l(e))},L=function(e){if(O(e))return e;throw TypeError("Target is not a typed array")},I=function(e){if(p){if(k.call(A,e))return e}else for(var t in T)if(u(T,n)){var r=o[t];if(r&&(e===r||k.call(r,e)))return e}throw TypeError("Target is not a typed array constructor")},M=function(e,t,r){if(a){if(r)for(var n in T){var i=o[n];i&&u(i.prototype,e)&&delete i.prototype[e]}w[e]&&!r||h(w,e,r?t:P&&m[e]||t)}},F=function(e,t,r){var n,i;if(a){if(p){if(r)for(n in T)i=o[n],i&&u(i,e)&&delete i[e];if(A[e]&&!r)return;try{return h(A,e,r?t:P&&y[e]||t)}catch(s){}}for(n in T)i=o[n],!i||i[e]&&!r||h(i,e,t)}};for(n in T)o[n]||(P=!1);if((!P||"function"!=typeof A||A===Function.prototype)&&(A=function(){throw TypeError("Incorrect invocation")},P))for(n in T)o[n]&&p(o[n],A);if((!P||!w||w===S)&&(w=A.prototype,P))for(n in T)o[n]&&p(o[n].prototype,w);if(P&&d(_)!==w&&p(_,w),a&&!u(w,x))for(n in R=!0,f(w,x,{get:function(){return s(this)?this[C]:void 0}}),T)o[n]&&c(o[n],C,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:R&&C,aTypedArray:L,aTypedArrayConstructor:I,exportTypedArrayMethod:M,exportTypedArrayStaticMethod:F,isView:E,isTypedArray:O,TypedArray:A,TypedArrayPrototype:w}},function(e,t){e.exports="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof DataView},function(e,t,r){var n=r(28),i=r(63),a=r(57),o=a("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||void 0==(r=n(a)[o])?t:i(r)}},function(e,t,r){r(118),r(77),r(120),r(122),r(136),r(137);var n=r(43);e.exports=n.Promise},function(e,t,r){var n=r(96),i=r(29),a=r(119);n||i(Object.prototype,"toString",a,{unsafe:!0})},function(e,t,r){"use strict";var n=r(96),i=r(95);e.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},function(e,t,r){var n=r(11),i=r(121),a=r(102),o=r(26),s=r(57),u=s("iterator"),l=s("toStringTag"),c=a.values;for(var h in i){var f=n[h],d=f&&f.prototype;if(d){if(d[u]!==c)try{o(d,u,c)}catch(v){d[u]=c}if(d[l]||o(d,l,h),i[h])for(var p in a)if(d[p]!==a[p])try{o(d,p,a[p])}catch(v){d[p]=a[p]}}}},function(e,t){e.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}},function(e,t,r){"use strict";var n,i,a,o,s=r(10),u=r(37),l=r(11),c=r(42),h=r(123),f=r(29),d=r(124),p=r(85),v=r(125),g=r(22),y=r(63),m=r(126),b=r(19),_=r(31),A=r(104),w=r(97),S=r(116),k=r(127).set,x=r(130),C=r(131),P=r(133),R=r(132),T=r(134),E=r(33),O=r(52),L=r(57),I=r(135),M=L("species"),F="Promise",D=E.get,N=E.set,j=E.getterFor(F),U=h,B=l.TypeError,q=l.document,W=l.process,V=c("fetch"),G=R.f,z=G,H="process"==b(W),Y=!!(q&&q.createEvent&&l.dispatchEvent),X="unhandledrejection",Z="rejectionhandled",Q=0,J=1,K=2,$=1,ee=2,te=O(F,(function(){var e=_(U)!==String(U);if(!e){if(66===I)return!0;if(!H&&"function"!=typeof PromiseRejectionEvent)return!0}if(u&&!U.prototype["finally"])return!0;if(I>=51&&/native code/.test(U))return!1;var t=U.resolve(1),r=function(e){e((function(){}),(function(){}))},n=t.constructor={};return n[M]=r,!(t.then((function(){}))instanceof r)})),re=te||!w((function(e){U.all(e)["catch"]((function(){}))})),ne=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},ie=function(e,t,r){if(!t.notified){t.notified=!0;var n=t.reactions;x((function(){var i=t.value,a=t.state==J,o=0;while(n.length>o){var s,u,l,c=n[o++],h=a?c.ok:c.fail,f=c.resolve,d=c.reject,p=c.domain;try{h?(a||(t.rejection===ee&&ue(e,t),t.rejection=$),!0===h?s=i:(p&&p.enter(),s=h(i),p&&(p.exit(),l=!0)),s===c.promise?d(B("Promise-chain cycle")):(u=ne(s))?u.call(s,f,d):f(s)):d(i)}catch(v){p&&!l&&p.exit(),d(v)}}t.reactions=[],t.notified=!1,r&&!t.rejection&&oe(e,t)}))}},ae=function(e,t,r){var n,i;Y?(n=q.createEvent("Event"),n.promise=t,n.reason=r,n.initEvent(e,!1,!0),l.dispatchEvent(n)):n={promise:t,reason:r},(i=l["on"+e])?i(n):e===X&&P("Unhandled promise rejection",r)},oe=function(e,t){k.call(l,(function(){var r,n=t.value,i=se(t);if(i&&(r=T((function(){H?W.emit("unhandledRejection",n,e):ae(X,e,n)})),t.rejection=H||se(t)?ee:$,r.error))throw r.value}))},se=function(e){return e.rejection!==$&&!e.parent},ue=function(e,t){k.call(l,(function(){H?W.emit("rejectionHandled",e):ae(Z,e,t.value)}))},le=function(e,t,r,n){return function(i){e(t,r,i,n)}},ce=function(e,t,r,n){t.done||(t.done=!0,n&&(t=n),t.value=r,t.state=K,ie(e,t,!0))},he=function(e,t,r,n){if(!t.done){t.done=!0,n&&(t=n);try{if(e===r)throw B("Promise can't be resolved itself");var i=ne(r);i?x((function(){var n={done:!1};try{i.call(r,le(he,e,n,t),le(ce,e,n,t))}catch(a){ce(e,n,a,t)}})):(t.value=r,t.state=J,ie(e,t,!1))}catch(a){ce(e,{done:!1},a,t)}}};te&&(U=function(e){m(this,U,F),y(e),n.call(this);var t=D(this);try{e(le(he,this,t),le(ce,this,t))}catch(r){ce(this,t,r)}},n=function(e){N(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:Q,value:void 0})},n.prototype=d(U.prototype,{then:function(e,t){var r=j(this),n=G(S(this,U));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=H?W.domain:void 0,r.parent=!0,r.reactions.push(n),r.state!=Q&&ie(this,r,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new n,t=D(e);this.promise=e,this.resolve=le(he,e,t),this.reject=le(ce,e,t)},R.f=G=function(e){return e===U||e===a?new i(e):z(e)},u||"function"!=typeof h||(o=h.prototype.then,f(h.prototype,"then",(function(e,t){var r=this;return new U((function(e,t){o.call(r,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof V&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(U,V.apply(l,arguments))}}))),s({global:!0,wrap:!0,forced:te},{Promise:U}),p(U,F,!1,!0),v(F),a=c(F),s({target:F,stat:!0,forced:te},{reject:function(e){var t=G(this);return t.reject.call(void 0,e),t.promise}}),s({target:F,stat:!0,forced:u||te},{resolve:function(e){return C(u&&this===a?U:this,e)}}),s({target:F,stat:!0,forced:re},{all:function(e){var t=this,r=G(t),n=r.resolve,i=r.reject,a=T((function(){var r=y(t.resolve),a=[],o=0,s=1;A(e,(function(e){var u=o++,l=!1;a.push(void 0),s++,r.call(t,e).then((function(e){l||(l=!0,a[u]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise},race:function(e){var t=this,r=G(t),n=r.reject,i=T((function(){var i=y(t.resolve);A(e,(function(e){i.call(t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}})},function(e,t,r){var n=r(11);e.exports=n.Promise},function(e,t,r){var n=r(29);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},function(e,t,r){"use strict";var n=r(42),i=r(27),a=r(57),o=r(13),s=a("species");e.exports=function(e){var t=n(e),r=i.f;o&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e}},function(e,t,r){var n,i,a,o=r(11),s=r(14),u=r(19),l=r(62),c=r(74),h=r(25),f=r(128),d=o.location,p=o.setImmediate,v=o.clearImmediate,g=o.process,y=o.MessageChannel,m=o.Dispatch,b=0,_={},A="onreadystatechange",w=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},S=function(e){return function(){w(e)}},k=function(e){w(e.data)},x=function(e){o.postMessage(e+"",d.protocol+"//"+d.host)};p&&v||(p=function(e){var t=[],r=1;while(arguments.length>r)t.push(arguments[r++]);return _[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},n(b),b},v=function(e){delete _[e]},"process"==u(g)?n=function(e){g.nextTick(S(e))}:m&&m.now?n=function(e){m.now(S(e))}:y&&!f?(i=new y,a=i.port2,i.port1.onmessage=k,n=l(a.postMessage,a,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||s(x)||"file:"===d.protocol?n=A in h("script")?function(e){c.appendChild(h("script"))[A]=function(){c.removeChild(this),w(e)}}:function(e){setTimeout(S(e),0)}:(n=x,o.addEventListener("message",k,!1))),e.exports={set:p,clear:v}},function(e,t,r){var n=r(129);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(n)},function(e,t,r){var n=r(42);e.exports=n("navigator","userAgent")||""},function(e,t,r){var n,i,a,o,s,u,l,c,h=r(11),f=r(12).f,d=r(19),p=r(127).set,v=r(128),g=h.MutationObserver||h.WebKitMutationObserver,y=h.process,m=h.Promise,b="process"==d(y),_=f(h,"queueMicrotask"),A=_&&_.value;A||(n=function(){var e,t;b&&(e=y.domain)&&e.exit();while(i){t=i.fn,i=i.next;try{t()}catch(r){throw i?o():a=void 0,r}}a=void 0,e&&e.enter()},b?o=function(){y.nextTick(n)}:g&&!v?(s=!0,u=document.createTextNode(""),new g(n).observe(u,{characterData:!0}),o=function(){u.data=s=!s}):m&&m.resolve?(l=m.resolve(void 0),c=l.then,o=function(){c.call(l,n)}):o=function(){p.call(h,n)}),e.exports=A||function(e){var t={fn:e,next:void 0};a&&(a.next=t),i||(i=t,o()),a=t}},function(e,t,r){var n=r(28),i=r(22),a=r(132);e.exports=function(e,t){if(n(e),i(t)&&t.constructor===e)return t;var r=a.f(e),o=r.resolve;return o(t),r.promise}},function(e,t,r){"use strict";var n=r(63),i=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new i(e)}},function(e,t,r){var n=r(11);e.exports=function(e,t){var r=n.console;r&&r.error&&(1===arguments.length?r.error(e):r.error(e,t))}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t,r){var n,i,a=r(11),o=r(129),s=a.process,u=s&&s.versions,l=u&&u.v8;l?(n=l.split("."),i=n[0]+n[1]):o&&(n=o.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/),n&&(i=n[1]))),e.exports=i&&+i},function(e,t,r){"use strict";var n=r(10),i=r(63),a=r(132),o=r(134),s=r(104);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=a.f(t),n=r.resolve,u=r.reject,l=o((function(){var r=i(t.resolve),a=[],o=0,u=1;s(e,(function(e){var i=o++,s=!1;a.push(void 0),u++,r.call(t,e).then((function(e){s||(s=!0,a[i]={status:"fulfilled",value:e},--u||n(a))}),(function(e){s||(s=!0,a[i]={status:"rejected",reason:e},--u||n(a))}))})),--u||n(a)}));return l.error&&u(l.value),r.promise}})},function(e,t,r){"use strict";var n=r(10),i=r(37),a=r(123),o=r(14),s=r(42),u=r(116),l=r(131),c=r(29),h=!!a&&o((function(){a.prototype["finally"].call({then:function(){}},(function(){}))}));n({target:"Promise",proto:!0,real:!0,forced:h},{finally:function(e){var t=u(this,s("Promise")),r="function"==typeof e;return this.then(r?function(r){return l(t,e()).then((function(){return r}))}:e,r?function(r){return l(t,e()).then((function(){throw r}))}:e)}}),i||"function"!=typeof a||a.prototype["finally"]||c(a.prototype,"finally",s("Promise").prototype["finally"])},function(e,t,r){r(139),r(144),r(142);var n=r(43);e.exports=n.URL},function(e,t,r){"use strict";r(77);var n,i=r(10),a=r(13),o=r(140),s=r(11),u=r(72),l=r(29),c=r(126),h=r(23),f=r(100),d=r(90),p=r(78).codeAt,v=r(141),g=r(85),y=r(142),m=r(33),b=s.URL,_=y.URLSearchParams,A=y.getState,w=m.set,S=m.getterFor("URL"),k=Math.floor,x=Math.pow,C="Invalid authority",P="Invalid scheme",R="Invalid host",T="Invalid port",E=/[A-Za-z]/,O=/[\d+-.A-Za-z]/,L=/\d/,I=/^(0x|0X)/,M=/^[0-7]+$/,F=/^\d+$/,D=/^[\dA-Fa-f]+$/,N=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,j=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,U=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,B=/[\u0009\u000A\u000D]/g,q=function(e,t){var r,n,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return R;if(r=V(t.slice(1,-1)),!r)return R;e.host=r}else if(K(e)){if(t=v(t),N.test(t))return R;if(r=W(t),null===r)return R;e.host=r}else{if(j.test(t))return R;for(r="",n=d(t),i=0;i4)return e;for(r=[],n=0;n1&&"0"==i.charAt(0)&&(a=I.test(i)?16:8,i=i.slice(8==a?1:2)),""===i)o=0;else{if(!(10==a?F:8==a?M:D).test(i))return e;o=parseInt(i,a)}r.push(o)}for(n=0;n=x(256,5-t))return null}else if(o>255)return null;for(s=r.pop(),n=0;n6)return;n=0;while(f()){if(i=null,n>0){if(!("."==f()&&n<4))return;h++}if(!L.test(f()))return;while(L.test(f())){if(a=parseInt(f(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;h++}u[l]=256*u[l]+i,n++,2!=n&&4!=n||l++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;u[l++]=t}else{if(null!==c)return;h++,l++,c=l}}if(null!==c){o=l-c,l=7;while(0!=l&&o>0)s=u[l],u[l--]=u[c+o-1],u[c+--o]=s}else if(8!=l)return;return u},G=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(t=n,r=i),t},z=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)t.unshift(e%256),e=k(e/256);return t.join(".")}if("object"==typeof e){for(t="",n=G(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=e[r].toString(16),r<7&&(t+=":")));return"["+t+"]"}return e},H={},Y=f({},H,{" ":1,'"':1,"<":1,">":1,"`":1}),X=f({},Y,{"#":1,"?":1,"{":1,"}":1}),Z=f({},X,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Q=function(e,t){var r=p(e,0);return r>32&&r<127&&!h(t,e)?e:encodeURIComponent(e)},J={ftp:21,file:null,http:80,https:443,ws:80,wss:443},K=function(e){return h(J,e.scheme)},$=function(e){return""!=e.username||""!=e.password},ee=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},te=function(e,t){var r;return 2==e.length&&E.test(e.charAt(0))&&(":"==(r=e.charAt(1))||!t&&"|"==r)},re=function(e){var t;return e.length>1&&te(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},ne=function(e){var t=e.path,r=t.length;!r||"file"==e.scheme&&1==r&&te(t[0],!0)||t.pop()},ie=function(e){return"."===e||"%2e"===e.toLowerCase()},ae=function(e){return e=e.toLowerCase(),".."===e||"%2e."===e||".%2e"===e||"%2e%2e"===e},oe={},se={},ue={},le={},ce={},he={},fe={},de={},pe={},ve={},ge={},ye={},me={},be={},_e={},Ae={},we={},Se={},ke={},xe={},Ce={},Pe=function(e,t,r,i){var a,o,s,u,l=r||oe,c=0,f="",p=!1,v=!1,g=!1;r||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(U,"")),t=t.replace(B,""),a=d(t);while(c<=a.length){switch(o=a[c],l){case oe:if(!o||!E.test(o)){if(r)return P;l=ue;continue}f+=o.toLowerCase(),l=se;break;case se:if(o&&(O.test(o)||"+"==o||"-"==o||"."==o))f+=o.toLowerCase();else{if(":"!=o){if(r)return P;f="",l=ue,c=0;continue}if(r&&(K(e)!=h(J,f)||"file"==f&&($(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=f,r)return void(K(e)&&J[e.scheme]==e.port&&(e.port=null));f="","file"==e.scheme?l=be:K(e)&&i&&i.scheme==e.scheme?l=le:K(e)?l=de:"/"==a[c+1]?(l=ce,c++):(e.cannotBeABaseURL=!0,e.path.push(""),l=ke)}break;case ue:if(!i||i.cannotBeABaseURL&&"#"!=o)return P;if(i.cannotBeABaseURL&&"#"==o){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,l=Ce;break}l="file"==i.scheme?be:he;continue;case le:if("/"!=o||"/"!=a[c+1]){l=he;continue}l=pe,c++;break;case ce:if("/"==o){l=ve;break}l=Se;continue;case he:if(e.scheme=i.scheme,o==n)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==o||"\\"==o&&K(e))l=fe;else if("?"==o)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",l=xe;else{if("#"!=o){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),l=Se;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",l=Ce}break;case fe:if(!K(e)||"/"!=o&&"\\"!=o){if("/"!=o){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,l=Se;continue}l=ve}else l=pe;break;case de:if(l=pe,"/"!=o||"/"!=f.charAt(c+1))continue;c++;break;case pe:if("/"!=o&&"\\"!=o){l=ve;continue}break;case ve:if("@"==o){p&&(f="%40"+f),p=!0,s=d(f);for(var y=0;y65535)return T;e.port=K(e)&&_===J[e.scheme]?null:_,f=""}if(r)return;l=we;continue}return T}f+=o;break;case be:if(e.scheme="file","/"==o||"\\"==o)l=_e;else{if(!i||"file"!=i.scheme){l=Se;continue}if(o==n)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==o)e.host=i.host,e.path=i.path.slice(),e.query="",l=xe;else{if("#"!=o){re(a.slice(c).join(""))||(e.host=i.host,e.path=i.path.slice(),ne(e)),l=Se;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",l=Ce}}break;case _e:if("/"==o||"\\"==o){l=Ae;break}i&&"file"==i.scheme&&!re(a.slice(c).join(""))&&(te(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),l=Se;continue;case Ae:if(o==n||"/"==o||"\\"==o||"?"==o||"#"==o){if(!r&&te(f))l=Se;else if(""==f){if(e.host="",r)return;l=we}else{if(u=q(e,f),u)return u;if("localhost"==e.host&&(e.host=""),r)return;f="",l=we}continue}f+=o;break;case we:if(K(e)){if(l=Se,"/"!=o&&"\\"!=o)continue}else if(r||"?"!=o)if(r||"#"!=o){if(o!=n&&(l=Se,"/"!=o))continue}else e.fragment="",l=Ce;else e.query="",l=xe;break;case Se:if(o==n||"/"==o||"\\"==o&&K(e)||!r&&("?"==o||"#"==o)){if(ae(f)?(ne(e),"/"==o||"\\"==o&&K(e)||e.path.push("")):ie(f)?"/"==o||"\\"==o&&K(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&te(f)&&(e.host&&(e.host=""),f=f.charAt(0)+":"),e.path.push(f)),f="","file"==e.scheme&&(o==n||"?"==o||"#"==o))while(e.path.length>1&&""===e.path[0])e.path.shift();"?"==o?(e.query="",l=xe):"#"==o&&(e.fragment="",l=Ce)}else f+=Q(o,X);break;case ke:"?"==o?(e.query="",l=xe):"#"==o?(e.fragment="",l=Ce):o!=n&&(e.path[0]+=Q(o,H));break;case xe:r||"#"!=o?o!=n&&("'"==o&&K(e)?e.query+="%27":e.query+="#"==o?"%23":Q(o,H)):(e.fragment="",l=Ce);break;case Ce:o!=n&&(e.fragment+=Q(o,Y));break}c++}},Re=function(e){var t,r,n=c(this,Re,"URL"),i=arguments.length>1?arguments[1]:void 0,o=String(e),s=w(n,{type:"URL"});if(void 0!==i)if(i instanceof Re)t=S(i);else if(r=Pe(t={},String(i)),r)throw TypeError(r);if(r=Pe(s,o,null,t),r)throw TypeError(r);var u=s.searchParams=new _,l=A(u);l.updateSearchParams(s.query),l.updateURL=function(){s.query=String(u)||null},a||(n.href=Ee.call(n),n.origin=Oe.call(n),n.protocol=Le.call(n),n.username=Ie.call(n),n.password=Me.call(n),n.host=Fe.call(n),n.hostname=De.call(n),n.port=Ne.call(n),n.pathname=je.call(n),n.search=Ue.call(n),n.searchParams=Be.call(n),n.hash=qe.call(n))},Te=Re.prototype,Ee=function(){var e=S(this),t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,s=e.query,u=e.fragment,l=t+":";return null!==i?(l+="//",$(e)&&(l+=r+(n?":"+n:"")+"@"),l+=z(i),null!==a&&(l+=":"+a)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},Oe=function(){var e=S(this),t=e.scheme,r=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(n){return"null"}return"file"!=t&&K(e)?t+"://"+z(e.host)+(null!==r?":"+r:""):"null"},Le=function(){return S(this).scheme+":"},Ie=function(){return S(this).username},Me=function(){return S(this).password},Fe=function(){var e=S(this),t=e.host,r=e.port;return null===t?"":null===r?z(t):z(t)+":"+r},De=function(){var e=S(this).host;return null===e?"":z(e)},Ne=function(){var e=S(this).port;return null===e?"":String(e)},je=function(){var e=S(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ue=function(){var e=S(this).query;return e?"?"+e:""},Be=function(){return S(this).searchParams},qe=function(){var e=S(this).fragment;return e?"#"+e:""},We=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(a&&u(Te,{href:We(Ee,(function(e){var t=S(this),r=String(e),n=Pe(t,r);if(n)throw TypeError(n);A(t.searchParams).updateSearchParams(t.query)})),origin:We(Oe),protocol:We(Le,(function(e){var t=S(this);Pe(t,String(e)+":",oe)})),username:We(Ie,(function(e){var t=S(this),r=d(String(e));if(!ee(t)){t.username="";for(var n=0;n=55296&&i<=56319&&r>1,e+=g(e/t);e>v*o>>1;n+=i)e=g(e/v);return g(n+(v+1)*e/(e+s))},A=function(e){var t=[];e=m(e);var r,s,u=e.length,f=c,d=0,v=l;for(r=0;r=f&&sg((n-d)/k))throw RangeError(p);for(d+=(S-f)*k,f=S,r=0;rn)throw RangeError(p);if(s==f){for(var x=d,C=i;;C+=i){var P=C<=v?a:C>=v+o?o:C-v;if(x0?arguments[0]:void 0,c=this,d=[];if(P(c,{type:x,entries:d,updateURL:function(){},updateSearchParams:B}),void 0!==l)if(g(l))if(e=_(l),"function"===typeof e){t=e.call(l),r=t.next;while(!(n=r.call(t)).done){if(i=b(v(n.value)),a=i.next,(o=a.call(i)).done||(s=a.call(i)).done||!a.call(i).done)throw TypeError("Expected sequence with length 2");d.push({key:o.value+"",value:s.value+""})}}else for(u in l)f(l,u)&&d.push({key:u,value:l[u]+""});else U(d,"string"===typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},G=V.prototype;s(G,{append:function(e,t){q(arguments.length,2);var r=R(this);r.entries.push({key:e+"",value:t+""}),r.updateURL()},delete:function(e){q(arguments.length,1);var t=R(this),r=t.entries,n=e+"",i=0;while(ie.key){i.splice(t,0,e);break}t===r&&i.push(e)}n.updateURL()},forEach:function(e){var t,r=R(this).entries,n=d(e,arguments.length>1?arguments[1]:void 0,3),i=0;while(i1&&(t=arguments[1],g(t)&&(r=t.body,p(r)===x&&(n=t.headers?new S(t.headers):new S,n.has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=y(t,{body:m(0,String(r)),headers:m(0,n)}))),i.push(t)),w.apply(this,i)}}),e.exports={URLSearchParams:V,getState:R}},function(e,t,r){var n=r(28),i=r(94);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return n(t.call(e))}},function(e,t,r){"use strict";var n=r(10);n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(e,t,r){(function(e,r){r(t)})(0,(function(e){"use strict";var t="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol:function(e){return"Symbol("+e+")"};function r(){}var n=Number.isNaN||function(e){return e!==e},i=r;function a(e){return"object"===typeof e&&null!==e||"function"===typeof e}function o(e){return e.slice()}function s(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)}function u(e){return!1!==l(e)&&e!==1/0}function l(e){return"number"===typeof e&&(!n(e)&&!(e<0))}function c(e,t,r){if("function"!==typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function h(e,t,r,n){var i=e[t];if(void 0!==i){if("function"!==typeof i)throw new TypeError(i+" is not a method");switch(r){case 0:return function(){return d(i,e,n)};case 1:return function(t){var r=[t].concat(n);return d(i,e,r)}}}return function(){return S(void 0)}}function f(e,t,r){var n=e[t];if(void 0!==n)return c(n,e,r)}function d(e,t,r){try{return S(c(e,t,r))}catch(n){return k(n)}}function p(e){return e}function v(e){return!1}function g(e){if(e=Number(e),n(e)||e<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return e}function y(e){if(void 0===e)return function(){return 1};if("function"!==typeof e)throw new TypeError("size property of a queuing strategy must be a function");return function(t){return e(t)}}var m=Promise,b=Promise.prototype.then,_=Promise.resolve.bind(m),A=Promise.reject.bind(m);function w(e){return new m(e)}function S(e){return _(e)}function k(e){return A(e)}function x(e,t,r){return b.call(e,t,r)}function C(e,t,r){x(x(e,t,r),void 0,i)}function P(e,t){C(e,t)}function R(e,t){C(e,void 0,t)}function T(e,t,r){return x(e,t,r)}function E(e){x(e,void 0,i)}var O=16384,L=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.push=function(e){var t=this._back,r=t;t._elements.length===O-1&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size},e.prototype.shift=function(){var e=this._front,t=e,r=this._cursor,n=r+1,i=e._elements,a=i[r];return n===O&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),i[r]=void 0,a},e.prototype.forEach=function(e){var t=this._cursor,r=this._front,n=r._elements;while(t!==n.length||void 0!==r._next){if(t===n.length&&(r=r._next,n=r._elements,t=0,0===n.length))break;e(n[t]),++t}},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}();function I(e,t,r){var n=null;!0===r&&(n=Object.prototype);var i=Object.create(n);return i.value=e,i.done=t,i}function M(e,t){e._forAuthorCode=!0,e._ownerReadableStream=t,t._reader=e,"readable"===t._state?j(e):"closed"===t._state?B(e):U(e,t._storedError)}function F(e,t){var r=e._ownerReadableStream;return Dr(r,t)}function D(e){"readable"===e._ownerReadableStream._state?q(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):W(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function N(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function j(e){e._closedPromise=w((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function U(e,t){j(e),q(e,t)}function B(e){j(e),V(e)}function q(e,t){E(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function W(e,t){U(e,t)}function V(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}var G=t("[[CancelSteps]]"),z=t("[[PullSteps]]");function H(e,t){void 0===t&&(t=!1);var r=new $(e);return r._forAuthorCode=t,r}function Y(e){var t=w((function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)}));return t}function X(e,t,r){var n=e._reader,i=n._readRequests.shift();i._resolve(I(t,r,n._forAuthorCode))}function Z(e){return e._reader._readRequests.length}function Q(e){var t=e._reader;return void 0!==t&&!!ee(t)}var J,K,$=function(){function e(e){if(!1===Mr(e))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Fr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");M(this,e),this._readRequests=new L}return Object.defineProperty(e.prototype,"closed",{get:function(){return ee(this)?this._closedPromise:k(re("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return ee(this)?void 0===this._ownerReadableStream?k(N("cancel")):F(this,e):k(re("cancel"))},e.prototype.read=function(){return ee(this)?void 0===this._ownerReadableStream?k(N("read from")):te(this):k(re("read"))},e.prototype.releaseLock=function(){if(!ee(this))throw re("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");D(this)}},e}();function ee(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function te(e){var t=e._ownerReadableStream;return t._disturbed=!0,"closed"===t._state?S(I(void 0,!0,e._forAuthorCode)):"errored"===t._state?k(t._storedError):t._readableStreamController[z]()}function re(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}"symbol"===typeof t.asyncIterator&&(J={},J[t.asyncIterator]=function(){return this},K=J,Object.defineProperty(K,t.asyncIterator,{enumerable:!1}));var ne={next:function(){if(!1===ae(this))return k(oe("next"));var e=this._asyncIteratorReader;return void 0===e._ownerReadableStream?k(N("iterate")):T(te(e),(function(t){var r=t.done;r&&D(e);var n=t.value;return I(n,r,!0)}))},return:function(e){if(!1===ae(this))return k(oe("next"));var t=this._asyncIteratorReader;if(void 0===t._ownerReadableStream)return k(N("finish iterating"));if(t._readRequests.length>0)return k(new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this._preventCancel){var r=F(t,e);return D(t),T(r,(function(){return I(e,!0,!0)}))}return D(t),S(I(e,!0,!0))}};function ie(e,t){void 0===t&&(t=!1);var r=H(e),n=Object.create(ne);return n._asyncIteratorReader=r,n._preventCancel=Boolean(t),n}function ae(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorReader")}function oe(e){return new TypeError("ReadableStreamAsyncIterator."+e+" can only be used on a ReadableSteamAsyncIterator")}function se(e){var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function ue(e,t,r){if(r=Number(r),!u(r))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function le(e){var t=e._queue.peek();return t.value}function ce(e){e._queue=new L,e._queueTotalSize=0}void 0!==K&&Object.setPrototypeOf(ne,K),Object.defineProperty(ne,"next",{enumerable:!1}),Object.defineProperty(ne,"return",{enumerable:!1});var he=t("[[AbortSteps]]"),fe=t("[[ErrorSteps]]"),de=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),ge(this);var r=t.size,n=t.highWaterMark,i=e.type;if(void 0!==i)throw new RangeError("Invalid type is specified");var a=y(r);void 0===n&&(n=1),n=g(n),Xe(this,e,n,a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===ye(this))throw ot("locked");return me(this)},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===ye(this)?k(ot("abort")):!0===me(this)?k(new TypeError("Cannot abort a stream that already has a writer")):be(this,e)},e.prototype.close=function(){return!1===ye(this)?k(ot("close")):!0===me(this)?k(new TypeError("Cannot close a stream that already has a writer")):!0===Te(this)?k(new TypeError("Cannot close an already-closing stream")):_e(this)},e.prototype.getWriter=function(){if(!1===ye(this))throw ot("getWriter");return pe(this)},e}();function pe(e){return new Fe(e)}function ve(e,t,r,n,i,a){void 0===i&&(i=1),void 0===a&&(a=function(){return 1});var o=Object.create(de.prototype);ge(o);var s=Object.create(ze.prototype);return Ye(o,s,e,t,r,n,i,a),o}function ge(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new L,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function ye(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function me(e){return void 0!==e._writer}function be(e,t){var r=e._state;if("closed"===r||"errored"===r)return S(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var n=!1;"erroring"===r&&(n=!0,t=void 0);var i=w((function(r,i){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:i,_reason:t,_wasAlreadyErroring:n}}));return e._pendingAbortRequest._promise=i,!1===n&&Se(e,t),i}function _e(e){var t=e._state;if("closed"===t||"errored"===t)return k(new TypeError("The stream (in "+t+" state) is not in the writable state and cannot be closed"));var r=w((function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;return void 0!==n&&!0===e._backpressure&&"writable"===t&&At(n),Qe(e._writableStreamController),r}function Ae(e){var t=w((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}));return t}function we(e,t){var r=e._state;"writable"!==r?ke(e):Se(e,t)}function Se(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&qe(n,t),!1===Ee(e)&&!0===r._started&&ke(e)}function ke(e){e._state="errored",e._writableStreamController[fe]();var t=e._storedError;if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new L,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===r._wasAlreadyErroring)return r._reject(t),void Ie(e);var n=e._writableStreamController[he](r._reason);C(n,(function(){r._resolve(),Ie(e)}),(function(t){r._reject(t),Ie(e)}))}else Ie(e)}function xe(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Ce(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,we(e,t)}function Pe(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0;var t=e._state;"erroring"===t&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var r=e._writer;void 0!==r&&pt(r)}function Re(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),we(e,t)}function Te(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function Ee(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function Oe(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Le(e){e._inFlightWriteRequest=e._writeRequests.shift()}function Ie(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&ft(t,e._storedError)}function Me(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?bt(r):At(r)),e._backpressure=t}var Fe=function(){function e(e){if(!1===ye(e))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===me(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;var t=e._state;if("writable"===t)!1===Te(e)&&!0===e._backpressure?vt(this):yt(this),lt(this);else if("erroring"===t)gt(this,e._storedError),lt(this);else if("closed"===t)yt(this),ht(this);else{var r=e._storedError;gt(this,r),ct(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return!1===De(this)?k(st("closed")):this._closedPromise},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===De(this))throw st("desiredSize");if(void 0===this._ownerWritableStream)throw ut("desiredSize");return We(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return!1===De(this)?k(st("ready")):this._readyPromise},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===De(this)?k(st("abort")):void 0===this._ownerWritableStream?k(ut("abort")):Ne(this,e)},e.prototype.close=function(){if(!1===De(this))return k(st("close"));var e=this._ownerWritableStream;return void 0===e?k(ut("close")):!0===Te(e)?k(new TypeError("Cannot close an already-closing stream")):je(this)},e.prototype.releaseLock=function(){if(!1===De(this))throw st("releaseLock");var e=this._ownerWritableStream;void 0!==e&&Ve(this)},e.prototype.write=function(e){return!1===De(this)?k(st("write")):void 0===this._ownerWritableStream?k(ut("write to")):Ge(this,e)},e}();function De(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function Ne(e,t){var r=e._ownerWritableStream;return be(r,t)}function je(e){var t=e._ownerWritableStream;return _e(t)}function Ue(e){var t=e._ownerWritableStream,r=t._state;return!0===Te(t)||"closed"===r?S(void 0):"errored"===r?k(t._storedError):je(e)}function Be(e,t){"pending"===e._closedPromiseState?ft(e,t):dt(e,t)}function qe(e,t){"pending"===e._readyPromiseState?mt(e,t):_t(e,t)}function We(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:Ke(t._writableStreamController)}function Ve(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");qe(e,r),Be(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function Ge(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,i=Je(n,t);if(r!==e._ownerWritableStream)return k(ut("write to"));var a=r._state;if("errored"===a)return k(r._storedError);if(!0===Te(r)||"closed"===a)return k(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return k(r._storedError);var o=Ae(r);return $e(n,t,i),o}var ze=function(){function e(){throw new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return e.prototype.error=function(e){if(!1===He(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");var t=this._controlledWritableStream._state;"writable"===t&&at(this,e)},e.prototype[he]=function(e){var t=this._abortAlgorithm(e);return Ze(this),t},e.prototype[fe]=function(){ce(this)},e}();function He(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}function Ye(e,t,r,n,i,a,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,ce(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a;var u=it(t);Me(e,u);var l=r(),c=S(l);C(c,(function(){t._started=!0,et(t)}),(function(r){t._started=!0,we(e,r)}))}function Xe(e,t,r,n){var i=Object.create(ze.prototype);function a(){return f(t,"start",[i])}var o=h(t,"write",1,[i]),s=h(t,"close",0,[]),u=h(t,"abort",1,[]);Ye(e,i,a,o,s,u,r,n)}function Ze(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Qe(e){ue(e,"close",0),et(e)}function Je(e,t){try{return e._strategySizeAlgorithm(t)}catch(r){return tt(e,r),1}}function Ke(e){return e._strategyHWM-e._queueTotalSize}function $e(e,t,r){var n={chunk:t};try{ue(e,n,r)}catch(o){return void tt(e,o)}var i=e._controlledWritableStream;if(!1===Te(i)&&"writable"===i._state){var a=it(e);Me(i,a)}et(e)}function et(e){var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest){var r=t._state;if("erroring"!==r){if(0!==e._queue.length){var n=le(e);"close"===n?rt(e):nt(e,n.chunk)}}else ke(t)}}function tt(e,t){"writable"===e._controlledWritableStream._state&&at(e,t)}function rt(e){var t=e._controlledWritableStream;Oe(t),se(e);var r=e._closeAlgorithm();Ze(e),C(r,(function(){Pe(t)}),(function(e){Re(t,e)}))}function nt(e,t){var r=e._controlledWritableStream;Le(r);var n=e._writeAlgorithm(t);C(n,(function(){xe(r);var t=r._state;if(se(e),!1===Te(r)&&"writable"===t){var n=it(e);Me(r,n)}et(e)}),(function(t){"writable"===r._state&&Ze(e),Ce(r,t)}))}function it(e){var t=Ke(e);return t<=0}function at(e,t){var r=e._controlledWritableStream;Ze(e),Se(r,t)}function ot(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function st(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function ut(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function lt(e){e._closedPromise=w((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function ct(e,t){lt(e),ft(e,t)}function ht(e){lt(e),pt(e)}function ft(e,t){E(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function dt(e,t){ct(e,t)}function pt(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}function vt(e){e._readyPromise=w((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function gt(e,t){vt(e),mt(e,t)}function yt(e){vt(e),At(e)}function mt(e,t){E(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function bt(e){vt(e)}function _t(e,t){gt(e,t)}function At(e){e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function wt(e){if("object"!==typeof e||null===e)return!1;try{return"boolean"===typeof e.aborted}catch(J){return!1}}var St="undefined"!==typeof DOMException?DOMException:void 0;function kt(e){if("function"!==typeof e&&"object"!==typeof e)return!1;try{return new e,!0}catch(J){return!1}}function xt(){var e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}var Ct=kt(St)?St:xt();function Pt(e,t,n,i,a,o){var s=H(e),u=pe(t);e._disturbed=!0;var l=!1,c=S(void 0);return w((function(h,f){var d;if(void 0!==o){if(d=function(){var r=new Ct("Aborted","AbortError"),n=[];!1===i&&n.push((function(){return"writable"===t._state?be(t,r):S(void 0)})),!1===a&&n.push((function(){return"readable"===e._state?Dr(e,r):S(void 0)})),_((function(){return Promise.all(n.map((function(e){return e()})))}),!0,r)},!0===o.aborted)return void d();o.addEventListener("abort",d)}function p(){return w((function(e,t){function r(n){n?e():x(v(),r,t)}r(!1)}))}function v(){return!0===l?S(!0):x(u._readyPromise,(function(){return x(te(s),(function(e){return!0===e.done||(c=x(Ge(u,e.value),void 0,r),!1)}))}))}if(m(e,s._closedPromise,(function(e){!1===i?_((function(){return be(t,e)}),!0,e):A(!0,e)})),m(t,u._closedPromise,(function(t){!1===a?_((function(){return Dr(e,t)}),!0,t):A(!0,t)})),b(e,s._closedPromise,(function(){!1===n?_((function(){return Ue(u)})):A()})),!0===Te(t)||"closed"===t._state){var g=new TypeError("the destination writable stream closed before all data could be piped to it");!1===a?_((function(){return Dr(e,g)}),!0,g):A(!0,g)}function y(){var e=c;return x(c,(function(){return e!==c?y():void 0}))}function m(e,t,r){"errored"===e._state?r(e._storedError):R(t,r)}function b(e,t,r){"closed"===e._state?r():P(t,r)}function _(e,r,n){function i(){C(e(),(function(){return k(r,n)}),(function(e){return k(!0,e)}))}!0!==l&&(l=!0,"writable"===t._state&&!1===Te(t)?P(y(),i):i())}function A(e,r){!0!==l&&(l=!0,"writable"===t._state&&!1===Te(t)?P(y(),(function(){return k(e,r)})):k(e,r))}function k(e,t){Ve(u),D(s),void 0!==o&&o.removeEventListener("abort",d),e?f(t):h(void 0)}E(p())}))}var Rt=function(){function e(){throw new TypeError}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Tt(this))throw qt("desiredSize");return Dt(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Tt(this))throw qt("close");if(!1===jt(this))throw new TypeError("The stream is not in a state that permits close");It(this)},e.prototype.enqueue=function(e){if(!1===Tt(this))throw qt("enqueue");if(!1===jt(this))throw new TypeError("The stream is not in a state that permits enqueue");return Mt(this,e)},e.prototype.error=function(e){if(!1===Tt(this))throw qt("error");Ft(this,e)},e.prototype[G]=function(e){ce(this);var t=this._cancelAlgorithm(e);return Lt(this),t},e.prototype[z]=function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=se(this);return!0===this._closeRequested&&0===this._queue.length?(Lt(this),Nr(e)):Et(this),S(I(t,!1,e._reader._forAuthorCode))}var r=Y(e);return Et(this),r},e}();function Tt(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function Et(e){var t=Ot(e);if(!1!==t)if(!0!==e._pulling){e._pulling=!0;var r=e._pullAlgorithm();C(r,(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Et(e))}),(function(t){Ft(e,t)}))}else e._pullAgain=!0}function Ot(e){var t=e._controlledReadableStream;if(!1===jt(e))return!1;if(!1===e._started)return!1;if(!0===Fr(t)&&Z(t)>0)return!0;var r=Dt(e);return r>0}function Lt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function It(e){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(Lt(e),Nr(t))}function Mt(e,t){var r=e._controlledReadableStream;if(!0===Fr(r)&&Z(r)>0)X(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(i){throw Ft(e,i),i}try{ue(e,t,n)}catch(a){throw Ft(e,a),a}}Et(e)}function Ft(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(ce(e),Lt(e),jr(r,t))}function Dt(e){var t=e._controlledReadableStream,r=t._state;return"errored"===r?null:"closed"===r?0:e._strategyHWM-e._queueTotalSize}function Nt(e){return!0!==Ot(e)}function jt(e){var t=e._controlledReadableStream._state;return!1===e._closeRequested&&"readable"===t}function Ut(e,t,r,n,i,a,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,ce(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t;var s=r();C(S(s),(function(){t._started=!0,Et(t)}),(function(e){Ft(t,e)}))}function Bt(e,t,r,n){var i=Object.create(Rt.prototype);function a(){return f(t,"start",[i])}var o=h(t,"pull",0,[i]),s=h(t,"cancel",1,[]);Ut(e,i,a,o,s,r,n)}function qt(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function Wt(e,t){var r,n,i,a,s,u=H(e),l=!1,c=!1,h=!1,f=w((function(e){s=e}));function d(){if(!0===l)return S(void 0);l=!0;var e=T(te(u),(function(e){l=!1;var t=e.done;if(!0===t)return!1===c&&It(i._readableStreamController),void(!1===h&&It(a._readableStreamController));var r=e.value,n=r,o=r;!1===c&&Mt(i._readableStreamController,n),!1===h&&Mt(a._readableStreamController,o)}));return E(e),S(void 0)}function p(t){if(c=!0,r=t,!0===h){var i=o([r,n]),a=Dr(e,i);s(a)}return f}function v(t){if(h=!0,n=t,!0===c){var i=o([r,n]),a=Dr(e,i);s(a)}return f}function g(){}return i=Lr(g,d,p),a=Lr(g,d,v),R(u._closedPromise,(function(e){Ft(i._readableStreamController,e),Ft(a._readableStreamController,e)})),[i,a]}var Vt=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},Gt=function(){function e(){throw new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!1===Yt(this))throw _r("view");return this._view},enumerable:!0,configurable:!0}),e.prototype.respond=function(e){if(!1===Yt(this))throw _r("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");v(this._view.buffer),vr(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!1===Yt(this))throw _r("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");v(e.buffer),gr(this._associatedReadableByteStreamController,e)},e}(),zt=function(){function e(){throw new TypeError("ReadableByteStreamController constructor cannot be used directly")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!1===Ht(this))throw Ar("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos.peek(),t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(Gt.prototype);br(r,this,t),this._byobRequest=r}return this._byobRequest},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Ht(this))throw Ar("desiredSize");return pr(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Ht(this))throw Ar("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");hr(this)},e.prototype.enqueue=function(e){if(!1===Ht(this))throw Ar("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");v(e.buffer),fr(this,e)},e.prototype.error=function(e){if(!1===Ht(this))throw Ar("error");dr(this,e)},e.prototype[G]=function(e){if(this._pendingPullIntos.length>0){var t=this._pendingPullIntos.peek();t.bytesFilled=0}ce(this);var r=this._cancelAlgorithm(e);return cr(this),r},e.prototype[z]=function(){var e=this._controlledReadableByteStream;if(this._queueTotalSize>0){var t=this._queue.shift();this._queueTotalSize-=t.byteLength,tr(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(s){return k(s)}return S(I(r,!1,e._reader._forAuthorCode))}var n=this._autoAllocateChunkSize;if(void 0!==n){var i=void 0;try{i=new ArrayBuffer(n)}catch(u){return k(u)}var a={buffer:i,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}var o=Y(e);return Xt(this),o},e}();function Ht(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function Yt(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Xt(e){var t=lr(e);if(!1!==t)if(!0!==e._pulling){e._pulling=!0;var r=e._pullAlgorithm();C(r,(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Xt(e))}),(function(t){dr(e,t)}))}else e._pullAgain=!0}function Zt(e){rr(e),e._pendingPullIntos=new L}function Qt(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=Jt(t);"default"===t.readerType?X(e,n,r):kr(e,n,r)}function Jt(e){var t=e.bytesFilled,r=e.elementSize;return new e.ctor(e.buffer,e.byteOffset,t/r)}function Kt(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function $t(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,o=a-a%r,u=i,l=!1;o>n&&(u=o-t.bytesFilled,l=!0);var c=e._queue;while(u>0){var h=c.peek(),f=Math.min(u,h.byteLength),d=t.byteOffset+t.bytesFilled;s(t.buffer,d,h.buffer,h.byteOffset,f),h.byteLength===f?c.shift():(h.byteOffset+=f,h.byteLength-=f),e._queueTotalSize-=f,er(e,f,t),u-=f}return l}function er(e,t,r){rr(e),r.bytesFilled+=t}function tr(e){0===e._queueTotalSize&&!0===e._closeRequested?(cr(e),Nr(e._controlledReadableByteStream)):Xt(e)}function rr(e){void 0!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=void 0,e._byobRequest=void 0)}function nr(e){while(e._pendingPullIntos.length>0){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();!0===$t(e,t)&&(ur(e),Qt(e._controlledReadableByteStream,t))}}function ir(e,t){var r=e._controlledReadableByteStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,a=p(t.buffer),o={buffer:a,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(o),Sr(r);if("closed"===r._state){var s=new i(o.buffer,o.byteOffset,0);return S(I(s,!0,r._reader._forAuthorCode))}if(e._queueTotalSize>0){if(!0===$t(e,o)){var u=Jt(o);return tr(e),S(I(u,!1,r._reader._forAuthorCode))}if(!0===e._closeRequested){var l=new TypeError("Insufficient bytes to fill elements in the given buffer");return dr(e,l),k(l)}}e._pendingPullIntos.push(o);var c=Sr(r);return Xt(e),c}function ar(e,t){t.buffer=p(t.buffer);var r=e._controlledReadableByteStream;if(!0===Cr(r))while(xr(r)>0){var n=ur(e);Qt(r,n)}}function or(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(er(e,t,r),!(r.bytesFilled0){var i=r.byteOffset+r.bytesFilled,a=r.buffer.slice(i-n,i);Kt(e,a,0,a.byteLength)}r.buffer=p(r.buffer),r.bytesFilled-=n,Qt(e._controlledReadableByteStream,r),nr(e)}}function sr(e,t){var r=e._pendingPullIntos.peek(),n=e._controlledReadableByteStream;if("closed"===n._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");ar(e,r)}else or(e,t,r);Xt(e)}function ur(e){var t=e._pendingPullIntos.shift();return rr(e),t}function lr(e){var t=e._controlledReadableByteStream;if("readable"!==t._state)return!1;if(!0===e._closeRequested)return!1;if(!1===e._started)return!1;if(!0===Q(t)&&Z(t)>0)return!0;if(!0===Cr(t)&&xr(t)>0)return!0;var r=pr(e);return r>0}function cr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function hr(e){var t=e._controlledReadableByteStream;if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos.peek();if(r.bytesFilled>0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw dr(e,n),n}}cr(e),Nr(t)}}function fr(e,t){var r=e._controlledReadableByteStream,n=t.buffer,i=t.byteOffset,a=t.byteLength,o=p(n);if(!0===Q(r))if(0===Z(r))Kt(e,o,i,a);else{var s=new Uint8Array(o,i,a);X(r,s,!1)}else!0===Cr(r)?(Kt(e,o,i,a),nr(e)):Kt(e,o,i,a);Xt(e)}function dr(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(Zt(e),ce(e),cr(e),jr(r,t))}function pr(e){var t=e._controlledReadableByteStream,r=t._state;return"errored"===r?null:"closed"===r?0:e._strategyHWM-e._queueTotalSize}function vr(e,t){if(t=Number(t),!1===u(t))throw new RangeError("bytesWritten must be a finite");sr(e,t)}function gr(e,t){var r=e._pendingPullIntos.peek();if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,sr(e,t.byteLength)}function yr(e,t,r,n,i,a,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=void 0,t._queue=t._queueTotalSize=void 0,ce(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=g(a),t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=o,t._pendingPullIntos=new L,e._readableStreamController=t;var s=r();C(S(s),(function(){t._started=!0,Xt(t)}),(function(e){dr(t,e)}))}function mr(e,t,r){var n=Object.create(zt.prototype);function i(){return f(t,"start",[n])}var a=h(t,"pull",0,[n]),o=h(t,"cancel",1,[]),s=t.autoAllocateChunkSize;if(void 0!==s&&(s=Number(s),!1===Vt(s)||s<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");yr(e,n,i,a,o,r,s)}function br(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function _r(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function Ar(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function wr(e,t){void 0===t&&(t=!1);var r=new Pr(e);return r._forAuthorCode=t,r}function Sr(e){var t=w((function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)}));return t}function kr(e,t,r){var n=e._reader,i=n._readIntoRequests.shift();i._resolve(I(t,r,n._forAuthorCode))}function xr(e){return e._reader._readIntoRequests.length}function Cr(e){var t=e._reader;return void 0!==t&&!!Rr(t)}var Pr=function(){function e(e){if(!Mr(e))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Ht(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Fr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");M(this,e),this._readIntoRequests=new L}return Object.defineProperty(e.prototype,"closed",{get:function(){return Rr(this)?this._closedPromise:k(Er("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return Rr(this)?void 0===this._ownerReadableStream?k(N("cancel")):F(this,e):k(Er("cancel"))},e.prototype.read=function(e){return Rr(this)?void 0===this._ownerReadableStream?k(N("read from")):ArrayBuffer.isView(e)?(v(e.buffer),0===e.byteLength?k(new TypeError("view must have non-zero byteLength")):Tr(this,e)):k(new TypeError("view must be an array buffer view")):k(Er("read"))},e.prototype.releaseLock=function(){if(!Rr(this))throw Er("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");D(this)}},e}();function Rr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function Tr(e,t){var r=e._ownerReadableStream;return r._disturbed=!0,"errored"===r._state?k(r._storedError):ir(r._readableStreamController,t)}function Er(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}var Or=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Ir(this);var r=t.size,n=t.highWaterMark,i=e.type,a=String(i);if("bytes"===a){if(void 0!==r)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===n&&(n=0),n=g(n),mr(this,e,n)}else{if(void 0!==i)throw new RangeError("Invalid type is specified");var o=y(r);void 0===n&&(n=1),n=g(n),Bt(this,e,n,o)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===Mr(this))throw Ur("locked");return Fr(this)},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return!1===Mr(this)?k(Ur("cancel")):!0===Fr(this)?k(new TypeError("Cannot cancel a stream that already has a reader")):Dr(this,e)},e.prototype.getReader=function(e){var t=(void 0===e?{}:e).mode;if(!1===Mr(this))throw Ur("getReader");if(void 0===t)return H(this,!0);if(t=String(t),"byob"===t)return wr(this,!0);throw new RangeError("Invalid mode is specified")},e.prototype.pipeThrough=function(e,t){var r=e.writable,n=e.readable,i=void 0===t?{}:t,a=i.preventClose,o=i.preventAbort,s=i.preventCancel,u=i.signal;if(!1===Mr(this))throw Ur("pipeThrough");if(!1===ye(r))throw new TypeError("writable argument to pipeThrough must be a WritableStream");if(!1===Mr(n))throw new TypeError("readable argument to pipeThrough must be a ReadableStream");if(a=Boolean(a),o=Boolean(o),s=Boolean(s),void 0!==u&&!wt(u))throw new TypeError("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Fr(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===me(r))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var l=Pt(this,r,a,o,s,u);return E(l),n},e.prototype.pipeTo=function(e,t){var r=void 0===t?{}:t,n=r.preventClose,i=r.preventAbort,a=r.preventCancel,o=r.signal;return!1===Mr(this)?k(Ur("pipeTo")):!1===ye(e)?k(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(n=Boolean(n),i=Boolean(i),a=Boolean(a),void 0===o||wt(o)?!0===Fr(this)?k(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===me(e)?k(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Pt(this,e,n,i,a,o):k(new TypeError("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},e.prototype.tee=function(){if(!1===Mr(this))throw Ur("tee");var e=Wt(this);return o(e)},e.prototype.getIterator=function(e){var t=(void 0===e?{}:e).preventCancel,r=void 0!==t&&t;if(!1===Mr(this))throw Ur("getIterator");return ie(this,r)},e}();function Lr(e,t,r,n,i){void 0===n&&(n=1),void 0===i&&(i=function(){return 1});var a=Object.create(Or.prototype);Ir(a);var o=Object.create(Rt.prototype);return Ut(a,o,e,t,r,n,i),a}function Ir(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Mr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function Fr(e){return void 0!==e._reader}function Dr(e,t){if(e._disturbed=!0,"closed"===e._state)return S(void 0);if("errored"===e._state)return k(e._storedError);Nr(e);var n=e._readableStreamController[G](t);return T(n,r)}function Nr(e){e._state="closed";var t=e._reader;void 0!==t&&(ee(t)&&(t._readRequests.forEach((function(e){e._resolve(I(void 0,!0,t._forAuthorCode))})),t._readRequests=new L),V(t))}function jr(e,t){e._state="errored",e._storedError=t;var r=e._reader;void 0!==r&&(ee(r)?(r._readRequests.forEach((function(e){e._reject(t)})),r._readRequests=new L):(r._readIntoRequests.forEach((function(e){e._reject(t)})),r._readIntoRequests=new L),q(r,t))}function Ur(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}"symbol"===typeof t.asyncIterator&&Object.defineProperty(Or.prototype,t.asyncIterator,{value:Or.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var Br=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(e){return e.byteLength},e}(),qr=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(){return 1},e}(),Wr=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={});var n=t.size,i=t.highWaterMark,a=r.size,o=r.highWaterMark,s=e.writableType;if(void 0!==s)throw new RangeError("Invalid writable type specified");var u=y(n);void 0===i&&(i=1),i=g(i);var l=e.readableType;if(void 0!==l)throw new RangeError("Invalid readable type specified");var c,h=y(a);void 0===o&&(o=0),o=g(o);var d=w((function(e){c=e}));Vr(this,d,i,u,o,h),Jr(this,e);var p=f(e,"start",[this._transformStreamController]);c(p)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!1===Gr(this))throw ln("readable");return this._readable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!1===Gr(this))throw ln("writable");return this._writable},enumerable:!0,configurable:!0}),e}();function Vr(e,t,r,n,i,a){function o(){return t}function s(t){return nn(e,t)}function u(t){return an(e,t)}function l(){return on(e)}function c(){return sn(e)}function h(t){return Hr(e,t),S(void 0)}e._writable=ve(o,s,l,u,r,n),e._readable=Lr(o,c,h,i,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Yr(e,!0),e._transformStreamController=void 0}function Gr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function zr(e,t){Ft(e._readable._readableStreamController,t),Hr(e,t)}function Hr(e,t){Kr(e._transformStreamController),tt(e._writable._writableStreamController,t),!0===e._backpressure&&Yr(e,!1)}function Yr(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=w((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}var Xr=function(){function e(){throw new TypeError("TransformStreamDefaultController instances cannot be created directly")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Zr(this))throw un("desiredSize");var e=this._controlledTransformStream._readable._readableStreamController;return Dt(e)},enumerable:!0,configurable:!0}),e.prototype.enqueue=function(e){if(!1===Zr(this))throw un("enqueue");$r(this,e)},e.prototype.error=function(e){if(!1===Zr(this))throw un("error");en(this,e)},e.prototype.terminate=function(){if(!1===Zr(this))throw un("terminate");rn(this)},e}();function Zr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function Qr(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function Jr(e,t){var r=Object.create(Xr.prototype),n=function(e){try{return $r(r,e),S(void 0)}catch(t){return k(t)}},i=t.transform;if(void 0!==i){if("function"!==typeof i)throw new TypeError("transform is not a method");n=function(e){return d(i,t,[e,r])}}var a=h(t,"flush",0,[r]);Qr(e,r,n,a)}function Kr(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function $r(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!1===jt(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Mt(n,t)}catch(a){throw Hr(r,a),r._readable._storedError}var i=Nt(n);i!==r._backpressure&&Yr(r,!0)}function en(e,t){zr(e._controlledTransformStream,t)}function tn(e,t){var r=e._transformAlgorithm(t);return T(r,void 0,(function(t){throw zr(e._controlledTransformStream,t),t}))}function rn(e){var t=e._controlledTransformStream,r=t._readable._readableStreamController;!0===jt(r)&&It(r);var n=new TypeError("TransformStream terminated");Hr(t,n)}function nn(e,t){var r=e._transformStreamController;if(!0===e._backpressure){var n=e._backpressureChangePromise;return T(n,(function(){var n=e._writable,i=n._state;if("erroring"===i)throw n._storedError;return tn(r,t)}))}return tn(r,t)}function an(e,t){return zr(e,t),S(void 0)}function on(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return Kr(r),T(n,(function(){if("errored"===t._state)throw t._storedError;var e=t._readableStreamController;!0===jt(e)&&It(e)}),(function(r){throw zr(e,r),t._storedError}))}function sn(e){return Yr(e,!1),e._backpressureChangePromise}function un(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function ln(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}e.ByteLengthQueuingStrategy=Br,e.CountQueuingStrategy=qr,e.ReadableStream=Or,e.TransformStream=Wr,e.WritableStream=de,Object.defineProperty(e,"__esModule",{value:!0})}))},function(e,t,r){r(147),r(118),r(77),r(120);var n=r(43);e.exports=n.Map},function(e,t,r){"use strict";var n=r(148),i=r(152);e.exports=n("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},function(e,t,r){"use strict";var n=r(10),i=r(11),a=r(52),o=r(29),s=r(149),u=r(104),l=r(126),c=r(22),h=r(14),f=r(97),d=r(85),p=r(151);e.exports=function(e,t,r){var v=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),y=v?"set":"add",m=i[e],b=m&&m.prototype,_=m,A={},w=function(e){var t=b[e];o(b,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:function(e,r){return t.call(this,0===e?0:e,r),this})};if(a(e,"function"!=typeof m||!(g||b.forEach&&!h((function(){(new m).entries().next()})))))_=r.getConstructor(t,e,v,y),s.REQUIRED=!0;else if(a(e,!0)){var S=new _,k=S[y](g?{}:-0,1)!=S,x=h((function(){S.has(1)})),C=f((function(e){new m(e)})),P=!g&&h((function(){var e=new m,t=5;while(t--)e[y](t,t);return!e.has(-0)}));C||(_=t((function(t,r){l(t,_,e);var n=p(new m,t,_);return void 0!=r&&u(r,n[y],n,v),n})),_.prototype=b,b.constructor=_),(x||P)&&(w("delete"),w("has"),v&&w("get")),(P||k)&&w(y),g&&b.clear&&delete b.clear}return A[e]=_,n({global:!0,forced:_!=m},A),d(_,e),g||r.setStrong(_,e,v),_}},function(e,t,r){var n=r(39),i=r(22),a=r(23),o=r(27).f,s=r(38),u=r(150),l=s("meta"),c=0,h=Object.isExtensible||function(){return!0},f=function(e){o(e,l,{value:{objectID:"O"+ ++c,weakData:{}}})},d=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,l)){if(!h(e))return"F";if(!t)return"E";f(e)}return e[l].objectID},p=function(e,t){if(!a(e,l)){if(!h(e))return!0;if(!t)return!1;f(e)}return e[l].weakData},v=function(e){return u&&g.REQUIRED&&h(e)&&!a(e,l)&&f(e),e},g=e.exports={REQUIRED:!1,fastKey:d,getWeakData:p,onFreeze:v};n[l]=!0},function(e,t,r){var n=r(14);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,r){var n=r(22),i=r(87);e.exports=function(e,t,r){var a,o;return i&&"function"==typeof(a=t.constructor)&&a!==r&&n(o=a.prototype)&&o!==r.prototype&&i(e,o),e}},function(e,t,r){"use strict";var n=r(27).f,i=r(71),a=r(124),o=r(62),s=r(126),u=r(104),l=r(79),c=r(125),h=r(13),f=r(149).fastKey,d=r(33),p=d.set,v=d.getterFor;e.exports={getConstructor:function(e,t,r,l){var c=e((function(e,n){s(e,c,t),p(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),h||(e.size=0),void 0!=n&&u(n,e[l],e,r)})),d=v(t),g=function(e,t,r){var n,i,a=d(e),o=y(e,t);return o?o.value=r:(a.last=o={index:i=f(t,!0),key:t,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=o),n&&(n.next=o),h?a.size++:e.size++,"F"!==i&&(a.index[i]=o)),e},y=function(e,t){var r,n=d(e),i=f(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return a(c.prototype,{clear:function(){var e=this,t=d(e),r=t.index,n=t.first;while(n)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete r[n.index],n=n.next;t.first=t.last=void 0,h?t.size=0:e.size=0},delete:function(e){var t=this,r=d(t),n=y(t,e);if(n){var i=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=i),i&&(i.previous=a),r.first==n&&(r.first=i),r.last==n&&(r.last=a),h?r.size--:t.size--}return!!n},forEach:function(e){var t,r=d(this),n=o(e,arguments.length>1?arguments[1]:void 0,3);while(t=t?t.next:r.first){n(t.value,t.key,this);while(t&&t.removed)t=t.previous}},has:function(e){return!!y(this,e)}}),a(c.prototype,r?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),h&&n(c.prototype,"size",{get:function(){return d(this).size}}),c},setStrong:function(e,t,r){var n=t+" Iterator",i=v(t),a=v(n);l(e,t,(function(e,t){p(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){var e=a(this),t=e.kind,r=e.last;while(r&&r.removed)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),c(t)}}},function(e,t,r){r(154),r(118),r(77),r(120);var n=r(43);e.exports=n.Set},function(e,t,r){"use strict";var n=r(148),i=r(152);e.exports=n("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},function(e,t,r){r(118),r(156),r(120);var n=r(43);e.exports=n.WeakMap},function(e,t,r){"use strict";var n,i=r(11),a=r(124),o=r(149),s=r(148),u=r(157),l=r(22),c=r(33).enforce,h=r(34),f=!i.ActiveXObject&&"ActiveXObject"in i,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},v=e.exports=s("WeakMap",p,u);if(h&&f){n=u.getConstructor(p,"WeakMap",!0),o.REQUIRED=!0;var g=v.prototype,y=g["delete"],m=g.has,b=g.get,_=g.set;a(g,{delete:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new n),y.call(this,e)||t.frozen["delete"](e)}return y.call(this,e)},has:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new n),m.call(this,e)||t.frozen.has(e)}return m.call(this,e)},get:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new n),m.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(l(e)&&!d(e)){var r=c(this);r.frozen||(r.frozen=new n),m.call(this,e)?_.call(this,e,t):r.frozen.set(e,t)}else _.call(this,e,t);return this}})}},function(e,t,r){"use strict";var n=r(124),i=r(149).getWeakData,a=r(28),o=r(22),s=r(126),u=r(104),l=r(158),c=r(23),h=r(33),f=h.set,d=h.getterFor,p=l.find,v=l.findIndex,g=0,y=function(e){return e.frozen||(e.frozen=new m)},m=function(){this.entries=[]},b=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};m.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var r=b(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=v(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,l){var h=e((function(e,n){s(e,h,t),f(e,{type:t,id:g++,frozen:void 0}),void 0!=n&&u(n,e[l],e,r)})),p=d(t),v=function(e,t,r){var n=p(e),o=i(a(t),!0);return!0===o?y(n).set(t,r):o[n.id]=r,e};return n(h.prototype,{delete:function(e){var t=p(this);if(!o(e))return!1;var r=i(e);return!0===r?y(t)["delete"](e):r&&c(r,t.id)&&delete r[t.id]},has:function(e){var t=p(this);if(!o(e))return!1;var r=i(e);return!0===r?y(t).has(e):r&&c(r,t.id)}}),n(h.prototype,r?{get:function(e){var t=p(this);if(o(e)){var r=i(e);return!0===r?y(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return v(this,e,t)}}:{add:function(e){return v(this,e,!0)}}),h}}},function(e,t,r){var n=r(62),i=r(18),a=r(83),o=r(47),s=r(159),u=[].push,l=function(e){var t=1==e,r=2==e,l=3==e,c=4==e,h=6==e,f=5==e||h;return function(d,p,v,g){for(var y,m,b=a(d),_=i(b),A=n(p,v,3),w=o(_.length),S=0,k=g||s,x=t?k(d,w):r?k(d,0):void 0;w>S;S++)if((f||S in _)&&(y=_[S],m=A(y,S,b),e))if(t)x[S]=m;else if(m)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:u.call(x,y)}else if(c)return!1;return h?-1:l||c?c:x}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},function(e,t,r){var n=r(22),i=r(160),a=r(57),o=a("species");e.exports=function(e,t){var r;return i(e)&&(r=e.constructor,"function"!=typeof r||r!==Array&&!i(r.prototype)?n(r)&&(r=r[o],null===r&&(r=void 0)):r=void 0),new(void 0===r?Array:r)(0===t?0:t)}},function(e,t,r){var n=r(19);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,r){r(118),r(162),r(120);var n=r(43);e.exports=n.WeakSet},function(e,t,r){"use strict";var n=r(148),i=r(157);n("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},function(e,t,r){r(164);var n=r(61);e.exports=n("String","codePointAt")},function(e,t,r){"use strict";var n=r(10),i=r(78).codeAt;n({target:"String",proto:!0},{codePointAt:function(e){return i(this,e)}})},function(e,t,r){r(166);var n=r(43);e.exports=n.String.fromCodePoint},function(e,t,r){var n=r(10),i=r(49),a=String.fromCharCode,o=String.fromCodePoint,s=!!o&&1!=o.length;n({target:"String",stat:!0,forced:s},{fromCodePoint:function(e){var t,r=[],n=arguments.length,o=0;while(n>o){if(t=+arguments[o++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},function(e,t,r){r(168),r(118),r(170),r(174),r(175),r(176),r(177),r(178),r(179),r(180),r(181),r(182),r(183),r(184),r(185),r(186),r(187),r(188),r(189);var n=r(43);e.exports=n.Symbol},function(e,t,r){"use strict";var n=r(10),i=r(14),a=r(160),o=r(22),s=r(83),u=r(47),l=r(93),c=r(159),h=r(169),f=r(57),d=r(135),p=f("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",y=d>=51||!i((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),m=h("concat"),b=function(e){if(!o(e))return!1;var t=e[p];return void 0!==t?!!t:a(e)},_=!y||!m;n({target:"Array",proto:!0,forced:_},{concat:function(e){var t,r,n,i,a,o=s(this),h=c(o,0),f=0;for(t=-1,n=arguments.length;tv)throw TypeError(g);for(r=0;r=v)throw TypeError(g);l(h,f++,a)}return h.length=f,h}})},function(e,t,r){var n=r(14),i=r(57),a=r(135),o=i("species");e.exports=function(e){return a>=51||!n((function(){var t=[],r=t.constructor={};return r[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,r){"use strict";var n=r(10),i=r(11),a=r(42),o=r(37),s=r(13),u=r(58),l=r(59),c=r(14),h=r(23),f=r(160),d=r(22),p=r(28),v=r(83),g=r(17),y=r(21),m=r(16),b=r(71),_=r(73),A=r(44),w=r(171),S=r(51),k=r(12),x=r(27),C=r(15),P=r(26),R=r(29),T=r(36),E=r(35),O=r(39),L=r(38),I=r(57),M=r(172),F=r(173),D=r(85),N=r(33),j=r(158).forEach,U=E("hidden"),B="Symbol",q="prototype",W=I("toPrimitive"),V=N.set,G=N.getterFor(B),z=Object[q],H=i.Symbol,Y=a("JSON","stringify"),X=k.f,Z=x.f,Q=w.f,J=C.f,K=T("symbols"),$=T("op-symbols"),ee=T("string-to-symbol-registry"),te=T("symbol-to-string-registry"),re=T("wks"),ne=i.QObject,ie=!ne||!ne[q]||!ne[q].findChild,ae=s&&c((function(){return 7!=b(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=X(z,t);n&&delete z[t],Z(e,t,r),n&&e!==z&&Z(z,t,n)}:Z,oe=function(e,t){var r=K[e]=b(H[q]);return V(r,{type:B,tag:e,description:t}),s||(r.description=t),r},se=l?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof H},ue=function(e,t,r){e===z&&ue($,t,r),p(e);var n=y(t,!0);return p(r),h(K,n)?(r.enumerable?(h(e,U)&&e[U][n]&&(e[U][n]=!1),r=b(r,{enumerable:m(0,!1)})):(h(e,U)||Z(e,U,m(1,{})),e[U][n]=!0),ae(e,n,r)):Z(e,n,r)},le=function(e,t){p(e);var r=g(t),n=_(r).concat(pe(r));return j(n,(function(t){s&&!he.call(r,t)||ue(e,t,r[t])})),e},ce=function(e,t){return void 0===t?b(e):le(b(e),t)},he=function(e){var t=y(e,!0),r=J.call(this,t);return!(this===z&&h(K,t)&&!h($,t))&&(!(r||!h(this,t)||!h(K,t)||h(this,U)&&this[U][t])||r)},fe=function(e,t){var r=g(e),n=y(t,!0);if(r!==z||!h(K,n)||h($,n)){var i=X(r,n);return!i||!h(K,n)||h(r,U)&&r[U][n]||(i.enumerable=!0),i}},de=function(e){var t=Q(g(e)),r=[];return j(t,(function(e){h(K,e)||h(O,e)||r.push(e)})),r},pe=function(e){var t=e===z,r=Q(t?$:g(e)),n=[];return j(r,(function(e){!h(K,e)||t&&!h(z,e)||n.push(K[e])})),n};if(u||(H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=L(e),r=function(e){this===z&&r.call($,e),h(this,U)&&h(this[U],t)&&(this[U][t]=!1),ae(this,t,m(1,e))};return s&&ie&&ae(z,t,{configurable:!0,set:r}),oe(t,e)},R(H[q],"toString",(function(){return G(this).tag})),R(H,"withoutSetter",(function(e){return oe(L(e),e)})),C.f=he,x.f=ue,k.f=fe,A.f=w.f=de,S.f=pe,M.f=function(e){return oe(I(e),e)},s&&(Z(H[q],"description",{configurable:!0,get:function(){return G(this).description}}),o||R(z,"propertyIsEnumerable",he,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:H}),j(_(re),(function(e){F(e)})),n({target:B,stat:!0,forced:!u},{for:function(e){var t=String(e);if(h(ee,t))return ee[t];var r=H(t);return ee[t]=r,te[r]=t,r},keyFor:function(e){if(!se(e))throw TypeError(e+" is not a symbol");if(h(te,e))return te[e]},useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),n({target:"Object",stat:!0,forced:!u,sham:!s},{create:ce,defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:fe}),n({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:de,getOwnPropertySymbols:pe}),n({target:"Object",stat:!0,forced:c((function(){S.f(1)}))},{getOwnPropertySymbols:function(e){return S.f(v(e))}}),Y){var ve=!u||c((function(){var e=H();return"[null]"!=Y([e])||"{}"!=Y({a:e})||"{}"!=Y(Object(e))}));n({target:"JSON",stat:!0,forced:ve},{stringify:function(e,t,r){var n,i=[e],a=1;while(arguments.length>a)i.push(arguments[a++]);if(n=t,(d(t)||void 0!==e)&&!se(e))return f(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!se(t))return t}),i[1]=t,Y.apply(null,i)}})}H[q][W]||P(H[q],W,H[q].valueOf),D(H,B),O[U]=!0},function(e,t,r){var n=r(17),i=r(44).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(t){return o.slice()}};e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?s(e):i(n(e))}},function(e,t,r){var n=r(57);t.f=n},function(e,t,r){var n=r(43),i=r(23),a=r(172),o=r(27).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||o(t,e,{value:a.f(e)})}},function(e,t,r){var n=r(173);n("asyncIterator")},function(e,t,r){"use strict";var n=r(10),i=r(13),a=r(11),o=r(23),s=r(22),u=r(27).f,l=r(40),c=a.Symbol;if(i&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var h={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new c(e):void 0===e?c():c(e);return""===e&&(h[t]=!0),t};l(f,c);var d=f.prototype=c.prototype;d.constructor=f;var p=d.toString,v="Symbol(test)"==String(c("test")),g=/^Symbol\((.*)\)[^)]+$/;u(d,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=p.call(e);if(o(h,e))return"";var r=v?t.slice(7,-1):t.replace(g,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:f})}},function(e,t,r){var n=r(173);n("hasInstance")},function(e,t,r){var n=r(173);n("isConcatSpreadable")},function(e,t,r){var n=r(173);n("iterator")},function(e,t,r){var n=r(173);n("match")},function(e,t,r){var n=r(173);n("matchAll")},function(e,t,r){var n=r(173);n("replace")},function(e,t,r){var n=r(173);n("search")},function(e,t,r){var n=r(173);n("species")},function(e,t,r){var n=r(173);n("split")},function(e,t,r){var n=r(173);n("toPrimitive")},function(e,t,r){var n=r(173);n("toStringTag")},function(e,t,r){var n=r(173);n("unscopables")},function(e,t,r){var n=r(85);n(Math,"Math",!0)},function(e,t,r){var n=r(11),i=r(85);i(n.JSON,"JSON",!0)},function(e,t,r){r(191);var n=r(61);e.exports=n("String","padStart")},function(e,t,r){"use strict";var n=r(10),i=r(192).start,a=r(194);n({target:"String",proto:!0,forced:a},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){var n=r(47),i=r(193),a=r(20),o=Math.ceil,s=function(e){return function(t,r,s){var u,l,c=String(a(t)),h=c.length,f=void 0===s?" ":String(s),d=n(r);return d<=h||""==f?c:(u=d-h,l=i.call(f,o(u/f.length)),l.length>u&&(l=l.slice(0,u)),e?c+l:l+c)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,r){"use strict";var n=r(48),i=r(20);e.exports="".repeat||function(e){var t=String(i(this)),r="",a=n(e);if(a<0||a==1/0)throw RangeError("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(r+=t);return r}},function(e,t,r){var n=r(129);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(n)},function(e,t,r){r(196);var n=r(61);e.exports=n("String","padEnd")},function(e,t,r){"use strict";var n=r(10),i=r(192).end,a=r(194);n({target:"String",proto:!0,forced:a},{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){r(198);var n=r(43);e.exports=n.Object.values},function(e,t,r){var n=r(10),i=r(199).values;n({target:"Object",stat:!0},{values:function(e){return i(e)}})},function(e,t,r){var n=r(13),i=r(73),a=r(17),o=r(15).f,s=function(e){return function(t){var r,s=a(t),u=i(s),l=u.length,c=0,h=[];while(l>c)r=u[c++],n&&!o.call(s,r)||h.push(e?[r,s[r]]:s[r]);return h}};e.exports={entries:s(!0),values:s(!1)}},function(e,t,r){r(201);var n=r(43);e.exports=n.Object.entries},function(e,t,r){var n=r(10),i=r(199).entries;n({target:"Object",stat:!0},{entries:function(e){return i(e)}})},function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.build=exports.version=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFWorker=exports.PDFDataRangeTransport=exports.LoopbackPort=void 0;var _regenerator=_interopRequireDefault(__w_pdfjs_require__(2)),_util=__w_pdfjs_require__(5),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(203),_node_utils=__w_pdfjs_require__(204),_annotation_storage=__w_pdfjs_require__(205),_api_compatibility=__w_pdfjs_require__(206),_canvas=__w_pdfjs_require__(207),_worker_options=__w_pdfjs_require__(209),_is_node=__w_pdfjs_require__(7),_message_handler=__w_pdfjs_require__(210),_metadata=__w_pdfjs_require__(211),_optional_content_config=__w_pdfjs_require__(213),_transport_stream=__w_pdfjs_require__(214),_webgl=__w_pdfjs_require__(215);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function asyncGeneratorStep(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,i)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){asyncGeneratorStep(a,n,i,o,s,"next",e)}function s(e){asyncGeneratorStep(a,n,i,o,s,"throw",e)}o(void 0)}))}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}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 _iterableToArray(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(s)throw a}}}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,e),this.length=t,this.initialData=r,this.progressiveDone=n,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}return _createClass(e,[{key:"addRangeListener",value:function(e){this._rangeListeners.push(e)}},{key:"addProgressListener",value:function(e){this._progressListeners.push(e)}},{key:"addProgressiveReadListener",value:function(e){this._progressiveReadListeners.push(e)}},{key:"addProgressiveDoneListener",value:function(e){this._progressiveDoneListeners.push(e)}},{key:"onDataRange",value:function(e,t){var r,n=_createForOfIteratorHelper(this._rangeListeners);try{for(n.s();!(r=n.n()).done;){var i=r.value;i(e,t)}}catch(a){n.e(a)}finally{n.f()}}},{key:"onDataProgress",value:function(e,t){var r=this;this._readyCapability.promise.then((function(){var n,i=_createForOfIteratorHelper(r._progressListeners);try{for(i.s();!(n=i.n()).done;){var a=n.value;a(e,t)}}catch(o){i.e(o)}finally{i.f()}}))}},{key:"onDataProgressiveRead",value:function(e){var t=this;this._readyCapability.promise.then((function(){var r,n=_createForOfIteratorHelper(t._progressiveReadListeners);try{for(n.s();!(r=n.n()).done;){var i=r.value;i(e)}}catch(a){n.e(a)}finally{n.f()}}))}},{key:"onDataProgressiveDone",value:function(){var e=this;this._readyCapability.promise.then((function(){var t,r=_createForOfIteratorHelper(e._progressiveDoneListeners);try{for(r.s();!(t=r.n()).done;){var n=t.value;n()}}catch(i){r.e(i)}finally{r.f()}}))}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}]),e}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function e(t,r){_classCallCheck(this,e),this._pdfInfo=t,this._transport=r}return _createClass(e,[{key:"getPage",value:function(e){return this._transport.getPage(e)}},{key:"getPageIndex",value:function(e){return this._transport.getPageIndex(e)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(e){return this._transport.getDestination(e)}},{key:"getPageLabels",value:function(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function(){return this._transport.getJavaScript()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"getStats",value:function(){return this._transport.getStats()}},{key:"cleanup",value:function(){return this._transport.startCleanup()}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"saveDocument",value:function(e){return this._transport.saveDocument(e)}},{key:"annotationStorage",get:function(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprint",get:function(){return this._pdfInfo.fingerprint}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}}]),e}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function e(t,r,n,i){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];_classCallCheck(this,e),this._pageIndex=t,this._pageInfo=r,this._ownerDocument=i,this._transport=n,this._stats=a?new _display_utils.StatTimer:null,this._pdfBug=a,this.commonObjs=n.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this.destroyed=!1}return _createClass(e,[{key:"getViewport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scale,r=e.rotation,n=void 0===r?this.rotate:r,i=e.offsetX,a=void 0===i?0:i,o=e.offsetY,s=void 0===o?0:o,u=e.dontFlip,l=void 0!==u&&u;return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:n,offsetX:a,offsetY:s,dontFlip:l})}},{key:"getAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.intent,r=void 0===t?null:t;return this.annotationsPromise&&this.annotationsIntent===r||(this.annotationsPromise=this._transport.getAnnotations(this._pageIndex,r),this.annotationsIntent=r),this.annotationsPromise}},{key:"render",value:function(e){var t=this,r=e.canvasContext,n=e.viewport,i=e.intent,a=void 0===i?"display":i,o=e.enableWebGL,s=void 0!==o&&o,u=e.renderInteractiveForms,l=void 0!==u&&u,c=e.transform,h=void 0===c?null:c,f=e.imageLayer,d=void 0===f?null:f,p=e.canvasFactory,v=void 0===p?null:p,g=e.background,y=void 0===g?null:g,m=e.annotationStorage,b=void 0===m?null:m,_=e.optionalContentConfigPromise,A=void 0===_?null:_;this._stats&&this._stats.time("Overall");var w="print"===a?"print":"display";this.pendingCleanup=!1,A||(A=this._transport.getOptionalContentConfig());var S=this._intentStates.get(w);S||(S=Object.create(null),this._intentStates.set(w,S)),S.streamReaderCancelTimeout&&(clearTimeout(S.streamReaderCancelTimeout),S.streamReaderCancelTimeout=null);var k=v||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),x=new _webgl.WebGLContext({enable:s});S.displayReadyCapability||(S.displayReadyCapability=(0,_util.createPromiseCapability)(),S.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:w,renderInteractiveForms:!0===l,annotationStorage:b&&b.getAll()||null}));var C=function(e){var r=S.renderTasks.indexOf(P);r>=0&&S.renderTasks.splice(r,1),(t.cleanupAfterRender||"print"===w)&&(t.pendingCleanup=!0),t._tryCleanup(),e?(P.capability.reject(e),t._abortOperatorList({intentState:S,reason:e})):P.capability.resolve(),t._stats&&(t._stats.timeEnd("Rendering"),t._stats.timeEnd("Overall"))},P=new InternalRenderTask({callback:C,params:{canvasContext:r,viewport:n,transform:h,imageLayer:d,background:y},objs:this.objs,commonObjs:this.commonObjs,operatorList:S.operatorList,pageIndex:this._pageIndex,canvasFactory:k,webGLContext:x,useRequestAnimationFrame:"print"!==w,pdfBug:this._pdfBug});S.renderTasks||(S.renderTasks=[]),S.renderTasks.push(P);var R=P.task;return Promise.all([S.displayReadyCapability.promise,A]).then((function(e){var r=_slicedToArray(e,2),n=r[0],i=r[1];t.pendingCleanup?C():(t._stats&&t._stats.time("Rendering"),P.initializeGraphics({transparency:n,optionalContentConfig:i}),P.operatorListChanged())}))["catch"](C),R}},{key:"getOperatorList",value:function(){function e(){if(n.operatorList.lastChunk){n.opListReadCapability.resolve(n.operatorList);var e=n.renderTasks.indexOf(t);e>=0&&n.renderTasks.splice(e,1)}}var t,r="oplist",n=this._intentStates.get(r);return n||(n=Object.create(null),this._intentStates.set(r,n)),n.opListReadCapability||(t=Object.create(null),t.operatorListChanged=e,n.opListReadCapability=(0,_util.createPromiseCapability)(),n.renderTasks=[],n.renderTasks.push(t),n.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:r})),n.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.normalizeWhitespace,r=void 0!==t&&t,n=e.disableCombineTextItems,i=void 0!==n&&n,a=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===r,combineTextItems:!0!==i},{highWaterMark:a,size:function(e){return e.items.length}})}},{key:"getTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.streamTextContent(e);return new Promise((function(e,r){function n(){i.read().then((function(t){var r,i=t.value,o=t.done;o?e(a):(Object.assign(a.styles,i.styles),(r=a.items).push.apply(r,_toConsumableArray(i.items)),n())}),r)}var i=t.getReader(),a={items:[],styles:Object.create(null)};n()}))}},{key:"_destroy",value:function(){this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;var e,t=[],r=_createForOfIteratorHelper(this._intentStates);try{for(r.s();!(e=r.n()).done;){var n=_slicedToArray(e.value,2),i=n[0],a=n[1];if(this._abortOperatorList({intentState:a,reason:new Error("Page was destroyed."),force:!0}),"oplist"!==i){var o,s=_createForOfIteratorHelper(a.renderTasks);try{for(s.s();!(o=s.n()).done;){var u=o.value;t.push(u.completed),u.cancel()}}catch(l){s.e(l)}finally{s.f()}}}}catch(l){r.e(l)}finally{r.f()}return this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(t)}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.pendingCleanup=!0,this._tryCleanup(e)}},{key:"_tryCleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.pendingCleanup)return!1;var t,r=_createForOfIteratorHelper(this._intentStates.values());try{for(r.s();!(t=r.n()).done;){var n=t.value,i=n.renderTasks,a=n.operatorList;if(0!==i.length||!a.lastChunk)return!1}}catch(o){r.e(o)}finally{r.f()}return this._intentStates.clear(),this.objs.clear(),this.annotationsPromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0}},{key:"_startRenderPage",value:function(e,t){var r=this._intentStates.get(t);r&&(this._stats&&this._stats.timeEnd("Page Request"),r.displayReadyCapability&&r.displayReadyCapability.resolve(e))}},{key:"_renderPageChunk",value:function(e,t){for(var r=0,n=e.length;r0&&void 0!==arguments[0])||arguments[0];_classCallCheck(this,e),this._listeners=[],this._defer=t,this._deferred=Promise.resolve(void 0)}return _createClass(e,[{key:"postMessage",value:function(e,t){var r=this;function n(e){if("object"!==_typeof(e)||null===e)return e;if(i.has(e))return i.get(e);var r,a;if((r=e.buffer)&&(0,_util.isArrayBuffer)(r)){var o=t&&t.includes(r);return a=o?new e.constructor(r,e.byteOffset,e.byteLength):new e.constructor(e),i.set(e,a),a}for(var s in a=Array.isArray(e)?[]:{},i.set(e,a),e){var u=void 0,l=e;while(!(u=Object.getOwnPropertyDescriptor(l,s)))l=Object.getPrototypeOf(l);if("undefined"!==typeof u.value)if("function"!==typeof u.value)a[s]=n(u.value);else if(e.hasOwnProperty&&e.hasOwnProperty(s))throw new Error("LoopbackPort.postMessage - cannot clone: ".concat(e[s]))}return a}if(this._defer){var i=new WeakMap,a={data:n(e)};this._deferred.then((function(){r._listeners.forEach((function(e){e.call(r,a)}))}))}else this._listeners.forEach((function(t){t.call(r,{data:e})}))}},{key:"addEventListener",value:function(e,t){this._listeners.push(t)}},{key:"removeEventListener",value:function(e,t){var r=this._listeners.indexOf(t);this._listeners.splice(r,1)}},{key:"terminate",value:function(){this._listeners.length=0}}]),e}();exports.LoopbackPort=LoopbackPort;var PDFWorker=function PDFWorkerClosure(){var pdfWorkerPorts=new WeakMap,isWorkerDisabled=!1,fallbackWorkerSrc,nextFakeWorkerId=0,fakeWorkerCapability;if(_is_node.isNodeJS)isWorkerDisabled=!0,fallbackWorkerSrc="./pdf.worker.js";else if("object"===("undefined"===typeof document?"undefined":_typeof(document))&&"currentScript"in document){var pdfjsFilePath=document.currentScript&&document.currentScript.src;pdfjsFilePath&&(fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}function _getWorkerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if("undefined"!==typeof fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}function getMainThreadWorkerMessageHandler(){var e;try{e=globalThis.pdfjsWorker&&globalThis.pdfjsWorker.WorkerMessageHandler}catch(t){}return e||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();var loader=function(){var _ref12=_asyncToGenerator(_regenerator["default"].mark((function _callee(){var mainWorkerMessageHandler,worker;return _regenerator["default"].wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(mainWorkerMessageHandler=getMainThreadWorkerMessageHandler(),!mainWorkerMessageHandler){_context.next=3;break}return _context.abrupt("return",mainWorkerMessageHandler);case 3:if(!_is_node.isNodeJS){_context.next=6;break}return worker=eval("require")(_getWorkerSrc()),_context.abrupt("return",worker.WorkerMessageHandler);case 6:return _context.next=8,(0,_display_utils.loadScript)(_getWorkerSrc());case 8:return _context.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context.stop()}}),_callee)})));return function(){return _ref12.apply(this,arguments)}}();return loader().then(fakeWorkerCapability.resolve,fakeWorkerCapability.reject),fakeWorkerCapability.promise}function createCDNWrapper(e){var t="importScripts('"+e+"');";return URL.createObjectURL(new Blob([t]))}var PDFWorker=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.name,n=void 0===r?null:r,i=t.port,a=void 0===i?null:i,o=t.verbosity,s=void 0===o?(0,_util.getVerbosityLevel)():o;if(_classCallCheck(this,e),a&&pdfWorkerPorts.has(a))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=n,this.destroyed=!1,this.postMessageTransfers=!0,this.verbosity=s,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,a)return pdfWorkerPorts.set(a,this),void this._initializeFromPort(a);this._initialize()}return _createClass(e,[{key:"_initializeFromPort",value:function(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve()}},{key:"_initialize",value:function(){var e=this;if("undefined"!==typeof Worker&&!isWorkerDisabled&&!getMainThreadWorkerMessageHandler()){var t=_getWorkerSrc();try{(0,_util.isSameOrigin)(window.location.href,t)||(t=createCDNWrapper(new URL(t,window.location).href));var r=new Worker(t),n=new _message_handler.MessageHandler("main","worker",r),i=function(){r.removeEventListener("error",a),n.destroy(),r.terminate(),e.destroyed?e._readyCapability.reject(new Error("Worker was destroyed")):e._setupFakeWorker()},a=function(){e._webWorker||i()};r.addEventListener("error",a),n.on("test",(function(t){r.removeEventListener("error",a),e.destroyed?i():t?(e._messageHandler=n,e._port=r,e._webWorker=r,t.supportTransfers||(e.postMessageTransfers=!1),e._readyCapability.resolve(),n.send("configure",{verbosity:e.verbosity})):(e._setupFakeWorker(),n.destroy(),r.terminate())})),n.on("ready",(function(t){if(r.removeEventListener("error",a),e.destroyed)i();else try{o()}catch(n){e._setupFakeWorker()}}));var o=function(){var t=new Uint8Array([e.postMessageTransfers?255:0]);try{n.send("test",t,[t.buffer])}catch(r){(0,_util.warn)("Cannot use postMessage transfers."),t[0]=0,n.send("test",t)}};return void o()}catch(s){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var e=this;isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),isWorkerDisabled=!0),setupFakeWorkerGlobal().then((function(t){if(e.destroyed)e._readyCapability.reject(new Error("Worker was destroyed"));else{var r=new LoopbackPort;e._port=r;var n="fake"+nextFakeWorkerId++,i=new _message_handler.MessageHandler(n+"_worker",n,r);t.setup(i,r);var a=new _message_handler.MessageHandler(n,n+"_worker",r);e._messageHandler=a,e._readyCapability.resolve(),a.send("configure",{verbosity:e.verbosity})}}))["catch"]((function(t){e._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(t.message,'".')))}))}},{key:"destroy",value:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),pdfWorkerPorts["delete"](this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}},{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}}],[{key:"fromPort",value:function(t){if(!t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pdfWorkerPorts.has(t.port)?pdfWorkerPorts.get(t.port):new e(t)}},{key:"getWorkerSrc",value:function(){return _getWorkerSrc()}}]),e}();return PDFWorker}();exports.PDFWorker=PDFWorker;var WorkerTransport=function(){function e(t,r,n,i){_classCallCheck(this,e),this.messageHandler=t,this.loadingTask=r,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:r.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:i.ownerDocument}),this._params=i,this.CMapReaderFactory=new i.CMapReaderFactory({baseUrl:i.cMapUrl,isCompressed:i.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}return _createClass(e,[{key:"destroy",value:function(){var e=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));var t=[];this.pageCache.forEach((function(e){e&&t.push(e._destroy())})),this.pageCache.length=0,this.pagePromises.length=0;var r=this.messageHandler.sendWithPromise("Terminate",null);return t.push(r),Promise.all(t).then((function(){e.fontLoader.clear(),e._networkStream&&e._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var e=this,t=this.messageHandler,r=this.loadingTask;t.on("GetReader",(function(t,r){(0,_util.assert)(e._networkStream,"GetReader - no `IPDFStream` instance available."),e._fullReader=e._networkStream.getFullReader(),e._fullReader.onProgress=function(t){e._lastProgress={loaded:t.loaded,total:t.total}},r.onPull=function(){e._fullReader.read().then((function(e){var t=e.value,n=e.done;n?r.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))}))["catch"]((function(e){r.error(e)}))},r.onCancel=function(t){e._fullReader.cancel(t),r.ready["catch"]((function(t){if(!e.destroyed)throw t}))}})),t.on("ReaderHeadersReady",(function(t){var n=(0,_util.createPromiseCapability)(),i=e._fullReader;return i.headersReady.then((function(){i.isStreamingSupported&&i.isRangeSupported||(e._lastProgress&&r.onProgress&&r.onProgress(e._lastProgress),i.onProgress=function(e){r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}),n.resolve({isStreamingSupported:i.isStreamingSupported,isRangeSupported:i.isRangeSupported,contentLength:i.contentLength})}),n.reject),n.promise})),t.on("GetRangeReader",(function(t,r){(0,_util.assert)(e._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var n=e._networkStream.getRangeReader(t.begin,t.end);n?(r.onPull=function(){n.read().then((function(e){var t=e.value,n=e.done;n?r.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))}))["catch"]((function(e){r.error(e)}))},r.onCancel=function(t){n.cancel(t),r.ready["catch"]((function(t){if(!e.destroyed)throw t}))}):r.close()})),t.on("GetDoc",(function(t){var n=t.pdfInfo;e._numPages=n.numPages,r._capability.resolve(new PDFDocumentProxy(n,e))})),t.on("DocException",(function(e){var t;switch(e.name){case"PasswordException":t=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":t=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":t=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":t=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":t=new _util.UnknownErrorException(e.message,e.details);break}if(!(t instanceof Error)){var n="DocException - expected a valid Error.";(0,_util.warn)(n)}r._capability.reject(t)})),t.on("PasswordRequest",(function(t){if(e._passwordCapability=(0,_util.createPromiseCapability)(),r.onPassword){var n=function(t){e._passwordCapability.resolve({password:t})};try{r.onPassword(n,t.code)}catch(i){e._passwordCapability.reject(i)}}else e._passwordCapability.reject(new _util.PasswordException(t.message,t.code));return e._passwordCapability.promise})),t.on("DataLoaded",(function(t){r.onProgress&&r.onProgress({loaded:t.length,total:t.length}),e.downloadInfoCapability.resolve(t)})),t.on("StartRenderPage",(function(t){if(!e.destroyed){var r=e.pageCache[t.pageIndex];r._startRenderPage(t.transparency,t.intent)}})),t.on("commonobj",(function(r){if(!e.destroyed){var n=_slicedToArray(r,3),i=n[0],a=n[1],o=n[2];if(!e.commonObjs.has(i))switch(a){case"Font":var s=e._params;if("error"in o){var u=o.error;(0,_util.warn)("Error during font loading: ".concat(u)),e.commonObjs.resolve(i,u);break}var l=null;s.pdfBug&&globalThis.FontInspector&&globalThis.FontInspector.enabled&&(l={registerFont:function(e,t){globalThis.FontInspector.fontAdded(e,t)}});var c=new _font_loader.FontFaceObject(o,{isEvalSupported:s.isEvalSupported,disableFontFace:s.disableFontFace,ignoreErrors:s.ignoreErrors,onUnsupportedFeature:e._onUnsupportedFeature.bind(e),fontRegistry:l});e.fontLoader.bind(c)["catch"]((function(e){return t.sendWithPromise("FontFallback",{id:i})}))["finally"]((function(){!s.fontExtraProperties&&c.data&&(c.data=null),e.commonObjs.resolve(i,c)}));break;case"FontPath":case"Image":e.commonObjs.resolve(i,o);break;default:throw new Error("Got unknown common object type ".concat(a))}}})),t.on("obj",(function(t){if(!e.destroyed){var r=_slicedToArray(t,4),n=r[0],i=r[1],a=r[2],o=r[3],s=e.pageCache[i];if(!s.objs.has(n))switch(a){case"Image":s.objs.resolve(n,o);var u=8e6;o&&"data"in o&&o.data.length>u&&(s.cleanupAfterRender=!0);break;default:throw new Error("Got unknown object type ".concat(a))}}})),t.on("DocProgress",(function(t){e.destroyed||r.onProgress&&r.onProgress({loaded:t.loaded,total:t.total})})),t.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),t.on("FetchBuiltInCMap",(function(t,r){if(e.destroyed)r.error(new Error("Worker was destroyed"));else{var n=!1;r.onPull=function(){n?r.close():(n=!0,e.CMapReaderFactory.fetch(t).then((function(e){r.enqueue(e,1,[e.cMapData.buffer])}))["catch"]((function(e){r.error(e)})))}}}))}},{key:"_onUnsupportedFeature",value:function(e){var t=e.featureId;this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(t)}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function(e){var t=this;if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request"));var r=e-1;if(r in this.pagePromises)return this.pagePromises[r];var n=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then((function(e){if(t.destroyed)throw new Error("Transport destroyed");var n=new PDFPageProxy(r,e,t,t._params.ownerDocument,t._params.pdfBug);return t.pageCache[r]=n,n}));return this.pagePromises[r]=n,n}},{key:"getPageIndex",value:function(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e})["catch"]((function(e){return Promise.reject(new Error(e))}))}},{key:"getAnnotations",value:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}},{key:"saveDocument",value:function(e){return this.messageHandler.sendWithPromise("SaveDocument",{numPages:this._numPages,annotationStorage:e&&e.getAll()||null,filename:this._fullReader?this._fullReader.filename:null})["finally"]((function(){e&&e.resetModified()}))}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(e){return"string"!==typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}},{key:"getPageLabels",value:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getJavaScript",value:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((function(e){return new _optional_content_config.OptionalContentConfig(e)}))}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var e=this;return this.messageHandler.sendWithPromise("GetMetadata",null).then((function(t){return{info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:e._fullReader?e._fullReader.filename:null}}))}},{key:"getStats",value:function(){return this.messageHandler.sendWithPromise("GetStats",null)}},{key:"startCleanup",value:function(){var e=this;return this.messageHandler.sendWithPromise("Cleanup",null).then((function(){for(var t=0,r=e.pageCache.length;t1&&void 0!==arguments[1]?arguments[1]:null;if(t)return this._ensureObj(e).capability.promise.then(t),null;var r=this._objs[e];if(!r||!r.resolved)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return r.data}},{key:"has",value:function(e){var t=this._objs[e];return!!t&&t.resolved}},{key:"resolve",value:function(e,t){var r=this._ensureObj(e);r.resolved=!0,r.data=t,r.capability.resolve(t)}},{key:"clear",value:function(){this._objs=Object.create(null)}}]),e}(),RenderTask=function(){function e(t){_classCallCheck(this,e),this._internalRenderTask=t,this.onContinue=null}return _createClass(e,[{key:"cancel",value:function(){this._internalRenderTask.cancel()}},{key:"promise",get:function(){return this._internalRenderTask.capability.promise}}]),e}(),InternalRenderTask=function(){var e=new WeakSet,t=function(){function t(e){var r=e.callback,n=e.params,i=e.objs,a=e.commonObjs,o=e.operatorList,s=e.pageIndex,u=e.canvasFactory,l=e.webGLContext,c=e.useRequestAnimationFrame,h=void 0!==c&&c,f=e.pdfBug,d=void 0!==f&&f;_classCallCheck(this,t),this.callback=r,this.params=n,this.objs=i,this.commonObjs=a,this.operatorListIdx=null,this.operatorList=o,this._pageIndex=s,this.canvasFactory=u,this.webGLContext=l,this._pdfBug=d,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===h&&"undefined"!==typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=n.canvasContext.canvas}return _createClass(t,[{key:"initializeGraphics",value:function(t){var r=t.transparency,n=void 0!==r&&r,i=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(e.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.");e.add(this._canvas)}this._pdfBug&&globalThis.StepperManager&&globalThis.StepperManager.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var a=this.params,o=a.canvasContext,s=a.viewport,u=a.transform,l=a.imageLayer,c=a.background;this.gfx=new _canvas.CanvasGraphics(o,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,l,i),this.gfx.beginDrawing({transform:u,viewport:s,transparency:n,background:c}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&e["delete"](this._canvas),this.callback(t||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var e=this;this._useRequestAnimationFrame?window.requestAnimationFrame((function(){e._nextBound()["catch"](e.cancel.bind(e))})):Promise.resolve().then(this._nextBound)["catch"](this.cancel.bind(this))}},{key:"_next",value:function(){var t=_asyncToGenerator(_regenerator["default"].mark((function t(){return _regenerator["default"].wrap((function(t){while(1)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),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&e["delete"](this._canvas),this.callback()));case 4:case"end":return t.stop()}}),t,this)})));function r(){return t.apply(this,arguments)}return r}()},{key:"completed",get:function(){return this.capability.promise["catch"]((function(){}))}}]),t}();return t}(),version="2.6.347";exports.version=version;var build="3be9c65f";exports.build=build},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var n=a(r(2)),i=r(5);function a(e){return e&&e.__esModule?e:{default:e}}function o(e){return o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function s(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function l(e){var t=f();return function(){var r,n=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return c(this,r)}}function c(e,t){return!t||"object"!==o(t)&&"function"!==typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,i)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){p(a,n,i,o,s,"next",e)}function s(e){p(a,n,i,o,s,"throw",e)}o(void 0)}))}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r0&&r.requests[0].done){var e=r.requests.shift();setTimeout(e.callback,0)}}var r=this.loadingContext,n={id:"pdfjs-font-loading-".concat(r.nextRequestId++),done:!1,complete:t,callback:e};return r.requests.push(n),n}},{key:"_prepareFontLoadEvent",value:function(e,t,r){var n,a,o=this;function s(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function u(e,t,r,n){var i=e.substring(0,t),a=e.substring(t+r);return i+n+a}var l=this._document.createElement("canvas");l.width=1,l.height=1;var c=l.getContext("2d"),h=0;function f(e,t){if(h++,h>30)return(0,i.warn)("Load test font never loaded."),void t();c.font="30px "+e,c.fillText(".",0,20);var r=c.getImageData(0,0,1,1);r.data[3]>0?t():setTimeout(f.bind(null,e,t))}var d="lt".concat(Date.now()).concat(this.loadTestFontId++),p=this._loadTestFont,v=976;p=u(p,v,d.length,d);var g=16,y=1482184792,m=s(p,g);for(n=0,a=d.length-3;n=14&&(e=!0)}return(0,i.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_loadTestFont",get:function(){var e=function(){return atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==")};return(0,i.shadow)(this,"_loadTestFont",e())}}]),r}(_);var A=function(){function e(t,r){var n=r.isEvalSupported,i=void 0===n||n,a=r.disableFontFace,o=void 0!==a&&a,s=r.ignoreErrors,u=void 0!==s&&s,l=r.onUnsupportedFeature,c=void 0===l?null:l,h=r.fontRegistry,f=void 0===h?null:h;for(var d in g(this,e),this.compiledGlyphs=Object.create(null),t)this[d]=t[d];this.isEvalSupported=!1!==i,this.disableFontFace=!0===o,this.ignoreErrors=!0===u,this._onUnsupportedFeature=c,this.fontRegistry=f}return m(e,[{key:"createNativeFontFace",value:function(){if(!this.data||this.disableFontFace)return null;var e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}},{key:"createFontFaceRule",value:function(){if(!this.data||this.disableFontFace)return null;var e=(0,i.bytesToString)(new Uint8Array(this.data)),t="url(data:".concat(this.mimetype,";base64,").concat(btoa(e),");"),r='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(t,"}");return this.fontRegistry&&this.fontRegistry.registerFont(this,t),r}},{key:"getPathGenerator",value:function(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];var r,n;try{r=e.get(this.loadedName+"_path_"+t)}catch(l){if(!this.ignoreErrors)throw l;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,i.warn)('getPathGenerator - ignoring character: "'.concat(l,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&i.IsEvalSupportedCached.value){for(var a,o="",s=0,u=r.length;s=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 a,s=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r["return"]||r["return"]()}finally{if(u)throw a}}}}function o(e,t){if(e){if("string"===typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)d[p++]=g&v?0:255,v>>=1}var y=0;for(p=0,0!==d[p]&&(l[0]=1,++y),r=1;r>2)+(d[p+1]?4:0)+(d[p-h+1]?8:0),c[m]&&(l[n+r]=c[m],++y),p++;if(d[p-h]!==d[p]&&(l[n+r]=d[p]?2:4,++y),y>a)return null}for(p=h*(s-1),n=t*u,0!==d[p]&&(l[n]=8,++y),r=1;ra)return null;var b=new Int32Array([0,u,-1,0,-u,0,0,0,1]),_=[];for(t=0;y&&t<=s;t++){var A=t*u,w=A+o;while(A>4,l[A]&=x>>2|x<<2),k.push(A%u),k.push(A/u|0),l[A]||--y}while(C!==A);_.push(k),--t}}var R=function(e){e.save(),e.scale(1/o,-1/s),e.translate(0,-s),e.beginPath();for(var t=0,r=_.length;t2&&void 0!==arguments[2]?arguments[2]:null;if("undefined"!==typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var i,a,o,s,u,l,c,h,f,d=t.height,v=t.width,g=d%p,y=(d-g)/p,m=0===g?y:y+1,b=e.createImageData(v,p),_=0,A=t.data,w=b.data;if(r)switch(r.length){case 1:l=r[0],c=r[0],h=r[0],f=r[0];break;case 4:l=r[0],c=r[1],h=r[2],f=r[3];break}if(t.kind===n.ImageKind.GRAYSCALE_1BPP){var S=A.byteLength,k=new Uint32Array(w.buffer,0,w.byteLength>>2),x=k.length,C=v+7>>3,P=4294967295,R=n.IsLittleEndianCached.value?4278190080:255;if(f&&255===f[0]&&0===f[255]){var T=[R,P];P=T[0],R=T[1]}for(a=0;aC?v:8*E-7,I=-8&L,M=0,F=0;O>=1}while(i=y&&(s=g,u=v*s),i=0,o=u;o--;)w[i++]=A[_++],w[i++]=A[_++],w[i++]=A[_++],w[i++]=255;if(U)for(var B=0;B>=1}e.putImageData(s,0,h*p)}}function b(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,i=r.length;n>8,e[a-2]=e[a-2]*o+r*s>>8,e[a-1]=e[a-1]*o+n*s>>8}}}function w(e,t,r){for(var n=e.length,i=1/255,a=3;a>8]>>8:t[i]*a>>16}}function k(e,t,r,n,i,a,o){var s,u=!!a,l=u?a[0]:0,c=u?a[1]:0,h=u?a[2]:0;s="Luminosity"===i?S:w;for(var f=1048576,d=Math.min(n,Math.ceil(f/r)),p=0;pt&&"function"===typeof o,p=d?Date.now()+e:0,v=0,g=this.commonObjs,y=this.objs;while(1){if(void 0!==s&&c===s.nextBreakPoint)return s.breakIt(c,o),c;if(f=l[c],f!==n.OPS.dependency)this[f].apply(this,u[c]);else{var m,b=a(u[c]);try{for(b.s();!(m=b.n()).done;){var _=m.value,A=_.startsWith("g_")?g:y;if(!A.has(_))return A.get(_,o),c}}catch(w){b.e(w)}finally{b.f()}}if(c++,c===h)return c;if(d&&++v>t){if(Date.now()>p)return o(),c;v=0}}},endDrawing:function(){null!==this.current.activeSMask&&this.endSMaskGroup(),this.ctx.restore(),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),this.cachedCanvases.clear(),this.webGLContext.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e},setLineCap:function(e){this.ctx.lineCap=C[e]},setLineJoin:function(e){this.ctx.lineJoin=P[e]},setMiterLimit:function(e){this.ctx.miterLimit=e},setDash:function(e,t){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)},setRenderingIntent:function(e){},setFlatness:function(e){},setGState:function(e){for(var t=0,r=e.length;t0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup()),this.current.activeSMask=a?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null;break;case"TR":this.current.transferMaps=a}}},beginSMaskGroup:function(){var e=this.current.activeSMask,t=e.canvas.width,r=e.canvas.height,n="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(n,t,r,!0),a=this.ctx,o=a.mozCurrentTransform;this.ctx.save();var s=i.context;s.scale(1/e.scaleX,1/e.scaleY),s.translate(-e.offsetX,-e.offsetY),s.transform.apply(s,o),e.startTransformInverse=s.mozCurrentTransformInverse,b(a,s),this.ctx=s,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(a),this.groupLevel++},suspendSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),x(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),this.ctx.save(),b(e,this.ctx),this.current.resumeSMaskCtx=e;var t=n.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t),e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.restore()},resumeSMaskGroup:function(){var e=this.current.resumeSMaskCtx,t=this.ctx;this.ctx=e,this.groupStack.push(t),this.groupLevel++},endSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),x(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),b(e,this.ctx);var t=n.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t)},save:function(){this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone(),this.current.resumeSMaskCtx=null},restore:function(){this.current.resumeSMaskCtx&&this.resumeSMaskGroup(),null===this.current.activeSMask||0!==this.stateStack.length&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask||this.endSMaskGroup(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null)},transform:function(e,t,r,n,i,a){this.ctx.transform(e,t,r,n,i,a),this._cachedGetSinglePixelWidth=null},constructPath:function(e,t){for(var r=this.ctx,i=this.current,a=i.x,o=i.y,s=0,u=0,l=e.length;sl&&(h=l),this.current.fontSizeScale=t/h,this.ctx.font="".concat(s," ").concat(o," ").concat(h,"px ").concat(c)}},setTextRenderingMode:function(e){this.current.textRenderingMode=e},setTextRise:function(e){this.current.textRise=e},moveText:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t},setLeadingMoveText:function(e,t){this.setLeading(-t),this.moveText(e,t)},setTextMatrix:function(e,t,r,n,i,a){this.current.textMatrix=[e,t,r,n,i,a],this.current.textMatrixScale=Math.sqrt(e*e+t*t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar:function(e,t,r,i){var a,o=this.ctx,s=this.current,u=s.font,l=s.textRenderingMode,c=s.fontSize/s.fontSizeScale,h=l&n.TextRenderingMode.FILL_STROKE_MASK,f=!!(l&n.TextRenderingMode.ADD_TO_PATH_FLAG),d=s.patternFill&&!u.missingFile;if((u.disableFontFace||f||d)&&(a=u.getPathGenerator(this.commonObjs,e)),u.disableFontFace||d?(o.save(),o.translate(t,r),o.beginPath(),a(o,c),i&&o.setTransform.apply(o,i),h!==n.TextRenderingMode.FILL&&h!==n.TextRenderingMode.FILL_STROKE||o.fill(),h!==n.TextRenderingMode.STROKE&&h!==n.TextRenderingMode.FILL_STROKE||o.stroke(),o.restore()):(h!==n.TextRenderingMode.FILL&&h!==n.TextRenderingMode.FILL_STROKE||o.fillText(e,t,r),h!==n.TextRenderingMode.STROKE&&h!==n.TextRenderingMode.FILL_STROKE||o.strokeText(e,t,r)),f){var p=this.pendingTextPaths||(this.pendingTextPaths=[]);p.push({transform:o.mozCurrentTransform,x:t,y:r,fontSize:c,addToPath:a})}},get isFontSubpixelAAEnabled(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10),t=e.context;t.scale(1.5,1),t.fillText("I",0,10);for(var r=t.getImageData(0,0,10,10).data,i=!1,a=3;a0&&r[a]<255){i=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",i)},showText:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var i=t.fontSize;if(0!==i){var a,o=this.ctx,s=t.fontSizeScale,u=t.charSpacing,l=t.wordSpacing,c=t.fontDirection,f=t.textHScale*c,d=e.length,p=r.vertical,v=p?1:-1,g=r.defaultVMetrics,y=i*t.fontMatrix[0],m=t.textRenderingMode===n.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;if(o.save(),t.patternFill){o.save();var b=t.fillColor.getPattern(o,this);a=o.mozCurrentTransform,o.restore(),o.fillStyle=b}o.transform.apply(o,t.textMatrix),o.translate(t.x,t.y+t.textRise),c>0?o.scale(f,-1):o.scale(f,1);var _=t.lineWidth,A=t.textMatrixScale;if(0===A||0===_){var w=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;w!==n.TextRenderingMode.STROKE&&w!==n.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,_=this.getSinglePixelWidth()*h)}else _/=A;1!==s&&(o.scale(s,s),_/=s),o.lineWidth=_;var S,k=0;for(S=0;S0){var U=1e3*o.measureText(D).width/i*s;if(jc&&(h=u/c,u=c),l>c&&(f=l/c,l=c);var d="groupAt"+this.groupLevel;e.smask&&(d+="_smask_"+this.smaskCounter++%2);var p=this.cachedCanvases.getCanvas(d,u,l,!0),v=p.context;v.scale(1/h,1/f),v.translate(-o,-s),v.transform.apply(v,r),e.smask?this.smaskStack.push({canvas:p.canvas,context:v,offsetX:o,offsetY:s,scaleX:h,scaleY:f,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(o,s),t.scale(h,f)),b(t,v),this.ctx=v,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++,this.current.activeSMask=null}},endGroup:function(e){if(this.contentVisible){this.groupLevel--;var t=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,e.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(t.canvas,0,0),this.restore()}},beginAnnotations:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function(){this.restore()},beginAnnotation:function(e,t,r){if(this.save(),_(this.ctx),this.current=new m,Array.isArray(e)&&4===e.length){var n=e[2]-e[0],i=e[3]-e[1];this.ctx.rect(e[0],e[1],n,i),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,r)},endAnnotation:function(){this.restore()},paintImageMaskXObject:function(e){if(this.contentVisible){var t=this.ctx,r=e.width,n=e.height,i=this.current.fillColor,a=this.current.patternFill,o=this.processingType3;if(f&&o&&void 0===o.compiled&&(o.compiled=r<=d&&n<=d?y({data:e.data,width:r,height:n}):null),o&&o.compiled)o.compiled(t);else{var u=this.cachedCanvases.getCanvas("maskCanvas",r,n),l=u.context;l.save(),s(l,e),l.globalCompositeOperation="source-in",l.fillStyle=a?i.getPattern(l,this):i,l.fillRect(0,0,r,n),l.restore(),this.paintInlineImageXObject(u.canvas)}}},paintImageMaskXObjectRepeat:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){var o=e.width,u=e.height,l=this.current.fillColor,c=this.current.patternFill,h=this.cachedCanvases.getCanvas("maskCanvas",o,u),f=h.context;f.save(),s(f,e),f.globalCompositeOperation="source-in",f.fillStyle=c?l.getPattern(f,this):l,f.fillRect(0,0,o,u),f.restore();for(var d=this.ctx,p=0,v=a.length;p2&&v>1||d>2&&g>1){var m=v,b=g;c>2&&v>1&&(m=Math.ceil(v/2),c/=v/m),d>2&&g>1&&(b=Math.ceil(g/2),d/=g/b),a=this.cachedCanvases.getCanvas(y,m,b),p=a.context,p.clearRect(0,0,m,b),p.drawImage(i,0,0,v,g,0,0,m,b),i=a.canvas,v=m,g=b,y="prescale1"===y?"prescale2":"prescale1"}if(n.drawImage(i,0,0,v,g,0,-r,t,r),this.imageLayer){var _=this.getCanvasPosition(0,-r);this.imageLayer.appendImage({imgData:e,left:_[0],top:_[1],width:t/s[0],height:r/s[3]})}this.restore()}},paintInlineImageXObjectGroup:function(e,t){if(this.contentVisible){var r=this.ctx,n=e.width,i=e.height,a=this.cachedCanvases.getCanvas("inlineImage",n,i),s=a.context;o(s,e,this.current.transferMaps);for(var u=0,l=t.length;u=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}},n.OPS)r.prototype[n.OPS[E]]=r.prototype[E];return r}();t.CanvasGraphics=b},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadingPatternFromIR=s,t.TilingPattern=void 0;var n=r(5),i={};function a(e,t){if(t&&"undefined"!==typeof Path2D){var r=t[2]-t[0],n=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],r,n),e.clip(i)}}i.RadialAxial={fromIR:function(e){var t=e[1],r=e[2],n=e[3],i=e[4],o=e[5],s=e[6],u=e[7];return{type:"Pattern",getPattern:function(e){var l;a(e,r),"axial"===t?l=e.createLinearGradient(i[0],i[1],o[0],o[1]):"radial"===t&&(l=e.createRadialGradient(i[0],i[1],s,o[0],o[1],u));for(var c=0,h=n.length;cl[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u),l[n+1]>l[i+1]&&(u=n,n=i,i=u,u=o,o=s,s=u),l[r+1]>l[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u);var d=(l[r]+t.offsetX)*t.scaleX,p=(l[r+1]+t.offsetY)*t.scaleY,v=(l[n]+t.offsetX)*t.scaleX,g=(l[n+1]+t.offsetY)*t.scaleY,y=(l[i]+t.offsetX)*t.scaleX,m=(l[i+1]+t.offsetY)*t.scaleY;if(!(p>=m))for(var b,_,A,w,S,k,x,C,P=c[a],R=c[a+1],T=c[a+2],E=c[o],O=c[o+1],L=c[o+2],I=c[s],M=c[s+1],F=c[s+2],D=Math.round(p),N=Math.round(m),j=D;j<=N;j++){if(jm?1:g===m?0:(g-j)/(g-m),b=v-(v-y)*B,_=E-(E-I)*B,A=O-(O-M)*B,w=L-(L-F)*B}var q=void 0;q=jm?1:(p-j)/(p-m),S=d-(d-y)*q,k=P-(P-I)*q,x=R-(R-M)*q,C=T-(T-F)*q;for(var W=Math.round(Math.min(b,S)),V=Math.round(Math.max(b,S)),G=f*j+4*W,z=W;z<=V;z++)q=(b-z)/(b-S),q<0?q=0:q>1&&(q=1),h[G++]=_-(_-k)*q|0,h[G++]=A-(A-x)*q|0,h[G++]=w-(w-C)*q|0,h[G++]=255}}function t(t,r,n){var i,a,o=r.coords,s=r.colors;switch(r.type){case"lattice":var u=r.verticesPerRow,l=Math.floor(o.length/u)-1,c=u-1;for(i=0;i=i?a=i:n=a/e,{scale:n,size:a}},clipBbox:function(e,t,r,n,i,a){if(Array.isArray(t)&&4===t.length){var o=i-r,s=a-n;e.ctx.rect(r,n,o,s),e.clip(),e.endPath()}},setFillAndStrokeStyleToContext:function(t,r,i){var a=t.ctx,o=t.current;switch(r){case e.COLORED:var s=this.ctx;a.fillStyle=s.fillStyle,a.strokeStyle=s.strokeStyle,o.fillColor=s.fillStyle,o.strokeColor=s.strokeStyle;break;case e.UNCOLORED:var u=n.Util.makeCssRgb(i[0],i[1],i[2]);a.fillStyle=u,a.strokeStyle=u,o.fillColor=u,o.strokeColor=u;break;default:throw new n.FormatError("Unsupported paint type: ".concat(r))}},getPattern:function(e,t){e=this.ctx,e.setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix);var r=this.createPatternCanvas(t);return e.createPattern(r,"repeat")}},r}();t.TilingPattern=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;var n=Object.create(null);t.GlobalWorkerOptions=n,n.workerPort=void 0===n.workerPort?null:n.workerPort,n.workerSrc=void 0===n.workerSrc?"":n.workerSrc},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n=a(r(2)),i=r(5);function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1,s=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var u=this.desiredSize;this.desiredSize-=r,u>0&&this.desiredSize<=0&&(this.sinkCapability=(0,i.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:a,targetName:o,stream:d.ENQUEUE,streamId:n,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:a,targetName:o,stream:d.CLOSE,streamId:n}),delete t.streamSinks[n])},error:function(e){(0,i.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:a,targetName:o,stream:d.ERROR,streamId:n,reason:p(e)}))},sinkCapability:(0,i.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};u.sinkCapability.resolve(),u.ready=u.sinkCapability.promise,this.streamSinks[n]=u,new Promise((function(t){t(r(e.data,u))})).then((function(){s.postMessage({sourceName:a,targetName:o,stream:d.START_COMPLETE,streamId:n,success:!0})}),(function(e){s.postMessage({sourceName:a,targetName:o,stream:d.START_COMPLETE,streamId:n,reason:p(e)})}))}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj;switch(e.stream){case d.START_COMPLETE:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(p(e.reason));break;case d.PULL_COMPLETE:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(p(e.reason));break;case d.PULL:if(!this.streamSinks[t]){a.postMessage({sourceName:r,targetName:n,stream:d.PULL_COMPLETE,streamId:t,success:!0});break}this.streamSinks[t].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[t].sinkCapability.resolve(),this.streamSinks[t].desiredSize=e.desiredSize;var o=this.streamSinks[e.streamId].onPull;new Promise((function(e){e(o&&o())})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:d.PULL_COMPLETE,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:d.PULL_COMPLETE,streamId:t,reason:p(e)})}));break;case d.ENQUEUE:if((0,i.assert)(this.streamControllers[t],"enqueue should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].controller.enqueue(e.chunk);break;case d.CLOSE:if((0,i.assert)(this.streamControllers[t],"close should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].isClosed=!0,this.streamControllers[t].controller.close(),this._deleteStreamController(t);break;case d.ERROR:(0,i.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(p(e.reason)),this._deleteStreamController(t);break;case d.CANCEL_COMPLETE:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(p(e.reason)),this._deleteStreamController(t);break;case d.CANCEL:if(!this.streamSinks[t])break;var s=this.streamSinks[e.streamId].onCancel;new Promise((function(t){t(s&&s(p(e.reason)))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:d.CANCEL_COMPLETE,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:d.CANCEL_COMPLETE,streamId:t,reason:p(e)})})),this.streamSinks[t].sinkCapability.reject(p(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:function(){var e=s(n["default"].mark((function e(t){return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Promise.allSettled([this.streamControllers[t].startCall,this.streamControllers[t].pullCall,this.streamControllers[t].cancelCall].map((function(e){return e&&e.promise})));case 2:delete this.streamControllers[t];case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"_postMessage",value:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)}},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]),e}();t.MessageHandler=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(5),i=r(212);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r\\376\\377([^<]+)/g,(function(e,t){for(var r=t.replace(/\\([0-3])([0-7])([0-7])/g,(function(e,t,r,n){return String.fromCharCode(64*t+8*r+1*n)})).replace(/&(amp|apos|gt|lt|quot);/g,(function(e,t){switch(t){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error("_repair: ".concat(t," isn't defined."))})),n="",i=0,a=r.length;i=32&&o<127&&60!==o&&62!==o&&38!==o?String.fromCharCode(o):"&#x"+(65536+o).toString(16).substring(1)+";"}return">"+n}))}},{key:"_parse",value:function(e){var t=e.documentElement;if("rdf:rdf"!==t.nodeName.toLowerCase()){t=t.firstChild;while(t&&"rdf:rdf"!==t.nodeName.toLowerCase())t=t.nextSibling}var r=t?t.nodeName.toLowerCase():null;if(t&&"rdf:rdf"===r&&t.hasChildNodes())for(var n=t.childNodes,i=0,a=n.length;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);r";case"amp":return"&";case"quot":return'"'}return t.onResolveEntity(r)}))}},{key:"_parseContent",value:function(e,t){var r=[],n=t;function i(){while(n"!==e[n]&&"/"!==e[n])++n;var a=e.substring(t,n);i();while(n"!==e[n]&&"/"!==e[n]&&"?"!==e[n]){i();var o="",s="";while(n"!==e[r]&&"/"!==e[r])++r;var i=e.substring(t,r);n();var a=r;while(r"!==e[r+1]))++r;var o=e.substring(a,r);return{name:i,value:o,parsed:r-t}}},{key:"parseXml",value:function(e){var t=0;while(t",n),a<0)return void this.onError(w.UnterminatedElement);this.onEndElement(e.substring(n,a)),n=a+1;break;case"?":++n;var o=this._parseProcessingInstruction(e,n);if("?>"!==e.substring(n+o.parsed,n+o.parsed+2))return void this.onError(w.UnterminatedXmlDeclaration);this.onPi(o.name,o.value),n+=o.parsed+2;break;case"!":if("--"===e.substring(n+1,n+3)){if(a=e.indexOf("--\x3e",n+3),a<0)return void this.onError(w.UnterminatedComment);this.onComment(e.substring(n+3,a)),n=a+3}else if("[CDATA["===e.substring(n+1,n+8)){if(a=e.indexOf("]]>",n+8),a<0)return void this.onError(w.UnterminatedCdat);this.onCdata(e.substring(n+8,a)),n=a+3}else{if("DOCTYPE"!==e.substring(n+1,n+8))return void this.onError(w.MalformedElement);var s=e.indexOf("[",n+8),u=!1;if(a=e.indexOf(">",n+8),a<0)return void this.onError(w.UnterminatedDoctypeDeclaration);if(s>0&&a>s){if(a=e.indexOf("]>",n+8),a<0)return void this.onError(w.UnterminatedDoctypeDeclaration);u=!0}var l=e.substring(n+8,a+(u?1:0));this.onDoctype(l),n=a+(u?2:1)}break;default:var c=this._parseContent(e,n);if(null===c)return void this.onError(w.MalformedElement);var h=!1;if("/>"===e.substring(n+c.parsed,n+c.parsed+2))h=!0;else if(">"!==e.substring(n+c.parsed,n+c.parsed+1))return void this.onError(w.UnterminatedElement);this.onBeginElement(c.name,c.attributes,h),n+=c.parsed+(h?2:1);break}}else{while(n0}},{key:"firstChild",get:function(){return this.childNodes&&this.childNodes[0]}},{key:"nextSibling",get:function(){var e=this.parentNode.childNodes;if(e){var t=e.indexOf(this);if(-1!==t)return e[t+1]}}},{key:"textContent",get:function(){return this.childNodes?this.childNodes.map((function(e){return e.textContent})).join(""):this.nodeValue||""}}]),e}(),P=function(e){f(r,e);var t=p(r);function r(){var e;return b(this,r),e=t.call(this),e._currentFragment=null,e._stack=null,e._errorCode=w.NoError,e}return A(r,[{key:"parseFromString",value:function(e){if(this._currentFragment=[],this._stack=[],this._errorCode=w.NoError,this.parseXml(e),this._errorCode===w.NoError){var t=i(this._currentFragment,1),r=t[0];if(r)return{documentElement:r}}}},{key:"onResolveEntity",value:function(e){switch(e){case"apos":return"'"}return c(m(r.prototype),"onResolveEntity",this).call(this,e)}},{key:"onText",value:function(e){if(!k(e)){var t=new C("#text",e);this._currentFragment.push(t)}}},{key:"onCdata",value:function(e){var t=new C("#text",e);this._currentFragment.push(t)}},{key:"onBeginElement",value:function(e,t,r){var n=new C(e);n.childNodes=[],this._currentFragment.push(n),r||(this._stack.push(this._currentFragment),this._currentFragment=n.childNodes)}},{key:"onEndElement",value:function(e){this._currentFragment=this._stack.pop()||[];var t=this._currentFragment[this._currentFragment.length-1];if(t)for(var r=0,n=t.childNodes.length;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,s=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==r["return"]||r["return"]()}finally{if(u)throw o}}}}function a(e,t){if(e){if("string"===typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1])||arguments[1];this._groups.has(e)?this._groups.get(e).visible=!!t:(0,n.warn)("Optional content group not found: ".concat(e))}},{key:"getOrder",value:function(){return this._groups.size?this._order?this._order.slice():Array.from(this._groups.keys()):null}},{key:"getGroups",value:function(){return this._groups.size?Object.fromEntries(this._groups):null}},{key:"getGroup",value:function(e){return this._groups.get(e)||null}}]),e}();t.OptionalContentConfig=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var n=a(r(2)),i=r(5);function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(s)throw a}}}}function l(e,t){if(e){if("string"===typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var o=new Uint8Array(a).buffer;this._queuedChunks.push(o)}this._pdfDataRangeTransport=r,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._contentLength=t.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((function(e,t){n._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener((function(e,t){n._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((function(e){n._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((function(){n._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}return d(e,[{key:"_onReceiveData",value:function(e){var t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{var r=this._rangeReaders.some((function(r){return r._begin===e.begin&&(r._enqueue(t),!0)}));(0,i.assert)(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_onProgress",value:function(e){if(void 0===e.total){var t=this._rangeReaders[0];t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{var r=this._fullRequestReader;r&&r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}}},{key:"_onProgressiveDone",value:function(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(e){var t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}},{key:"getFullReader",value:function(){(0,i.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var e=this._queuedChunks;return this._queuedChunks=null,new v(this,e,this._progressiveDone)}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new g(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t=this._rangeReaders.slice(0);t.forEach((function(t){t.cancel(e)})),this._pdfDataRangeTransport.abort()}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFDataTransportStream=p;var v=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];h(this,e),this._stream=t,this._done=n||!1,this._filename=null,this._queuedChunks=r||[],this._loaded=0;var i,a=u(this._queuedChunks);try{for(a.s();!(i=a.n()).done;){var o=i.value;this._loaded+=o.byteLength}}catch(s){a.e(s)}finally{a.f()}this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}return d(e,[{key:"_enqueue",value:function(e){if(!this._done){if(this._requests.length>0){var t=this._requests.shift();t.resolve({value:e,done:!1})}else this._queuedChunks.push(e);this._loaded+=e.byteLength}}},{key:"read",value:function(){var e=s(n["default"].mark((function e(){var t,r;return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(this._queuedChunks.length>0)){e.next=3;break}return t=this._queuedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 3:if(!this._done){e.next=5;break}return e.abrupt("return",{value:void 0,done:!0});case 5:return r=(0,i.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}},{key:"headersReady",get:function(){return this._headersReady}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function(){return this._stream._contentLength}}]),e}(),g=function(){function e(t,r,n){h(this,e),this._stream=t,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}return d(e,[{key:"_enqueue",value:function(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{var t=this._requests.shift();t.resolve({value:e,done:!1}),this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]}this._done=!0,this._stream._removeRangeReader(this)}}},{key:"read",value:function(){var e=s(n["default"].mark((function e(){var t,r;return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,i.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._stream._removeRangeReader(this)}},{key:"isStreamingSupported",get:function(){return!1}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLContext=void 0;var n=r(5);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(s)throw a}}}}function l(e,t){if(e){if("string"===typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];b(this,e),this.isRenderable=r,this.data=t.data,this.layer=t.layer,this.page=t.page,this.viewport=t.viewport,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderInteractiveForms=t.renderInteractiveForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,r&&(this.container=this._createContainer(n))}return A(e,[{key:"_createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data,r=this.page,n=this.viewport,a=document.createElement("section"),o=t.rect[2]-t.rect[0],s=t.rect[3]-t.rect[1];a.setAttribute("data-annotation-id",t.id);var u=i.Util.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]);if(a.style.transform="matrix(".concat(n.transform.join(","),")"),a.style.transformOrigin="-".concat(u[0],"px -").concat(u[1],"px"),!e&&t.borderStyle.width>0){a.style.borderWidth="".concat(t.borderStyle.width,"px"),t.borderStyle.style!==i.AnnotationBorderStyleType.UNDERLINE&&(o-=2*t.borderStyle.width,s-=2*t.borderStyle.width);var l=t.borderStyle.horizontalCornerRadius,c=t.borderStyle.verticalCornerRadius;if(l>0||c>0){var h="".concat(l,"px / ").concat(c,"px");a.style.borderRadius=h}switch(t.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:a.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:a.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:a.style.borderBottomStyle="solid";break;default:break}t.color?a.style.borderColor=i.Util.makeCssRgb(0|t.color[0],0|t.color[1],0|t.color[2]):a.style.borderWidth=0}return a.style.left="".concat(u[0],"px"),a.style.top="".concat(u[1],"px"),a.style.width="".concat(o,"px"),a.style.height="".concat(s,"px"),a}},{key:"_createPopup",value:function(e,t,r){t||(t=document.createElement("div"),t.style.height=e.style.height,t.style.width=e.style.width,e.appendChild(t));var n=new I({container:e,trigger:t,color:r.color,title:r.title,modificationDate:r.modificationDate,contents:r.contents,hideWrapper:!0}),i=n.render();i.style.left=e.style.width,e.appendChild(i)}},{key:"render",value:function(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}}]),e}(),k=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.url||e.data.dest||e.data.action);return t.call(this,e,n)}return A(r,[{key:"render",value:function(){this.container.className="linkAnnotation";var e=this.data,t=this.linkService,r=document.createElement("a");return e.url?(0,n.addLinkAttributes)(r,{url:e.url,target:e.newWindow?n.LinkTarget.BLANK:t.externalLinkTarget,rel:t.externalLinkRel,enabled:t.externalLinkEnabled}):e.action?this._bindNamedAction(r,e.action):this._bindLink(r,e.dest),this.container.appendChild(r),this.container}},{key:"_bindLink",value:function(e,t){var r=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&r.linkService.navigateTo(t),!1},t&&(e.className="internalLink")}},{key:"_bindNamedAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return r.linkService.executeNamedAction(t),!1},e.className="internalLink"}}]),r}(S),x=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n)}return A(r,[{key:"render",value:function(){this.container.className="textAnnotation";var e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(this.container,e,this.data),this.container.appendChild(e),this.container}}]),r}(S),C=function(e){f(r,e);var t=p(r);function r(){return b(this,r),t.apply(this,arguments)}return A(r,[{key:"render",value:function(){return this.container}}]),r}(S),P=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue;return t.call(this,e,n)}return A(r,[{key:"render",value:function(){var e=["left","center","right"],t=this.annotationStorage,r=this.data.id;this.container.className="textWidgetAnnotation";var n=null;if(this.renderInteractiveForms){var i=t.getOrCreateValue(r,this.data.fieldValue);if(this.data.multiLine?(n=document.createElement("textarea"),n.textContent=i):(n=document.createElement("input"),n.type="text",n.setAttribute("value",i)),n.addEventListener("input",(function(e){t.setValue(r,e.target.value)})),n.disabled=this.data.readOnly,n.name=this.data.fieldName,null!==this.data.maxLen&&(n.maxLength=this.data.maxLen),this.data.comb){var a=this.data.rect[2]-this.data.rect[0],o=a/this.data.maxLen;n.classList.add("comb"),n.style.letterSpacing="calc(".concat(o,"px - 1ch)")}}else{n=document.createElement("div"),n.textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell";var s=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(s=this.page.commonObjs.get(this.data.fontRefName)),this._setTextStyle(n,s)}return null!==this.data.textAlignment&&(n.style.textAlign=e[this.data.textAlignment]),this.container.appendChild(n),this.container}},{key:"_setTextStyle",value:function(e,t){var r=e.style;if(r.fontSize="".concat(this.data.fontSize,"px"),r.direction=this.data.fontDirection<0?"rtl":"ltr",t){var n="normal";t.black?n="900":t.bold&&(n="bold"),r.fontWeight=n,r.fontStyle=t.italic?"italic":"normal";var i=t.loadedName?'"'.concat(t.loadedName,'", '):"",a=t.fallbackName||"Helvetica, sans-serif";r.fontFamily=i+a}}}]),r}(C),R=function(e){f(r,e);var t=p(r);function r(e){return b(this,r),t.call(this,e,e.renderInteractiveForms)}return A(r,[{key:"render",value:function(){var e=this.annotationStorage,t=this.data,r=t.id,n=e.getOrCreateValue(r,t.fieldValue&&"Off"!==t.fieldValue);this.container.className="buttonWidgetAnnotation checkBox";var i=document.createElement("input");return i.disabled=t.readOnly,i.type="checkbox",i.name=this.data.fieldName,n&&i.setAttribute("checked",!0),i.addEventListener("change",(function(t){e.setValue(r,t.target.checked)})),this.container.appendChild(i),this.container}}]),r}(C),T=function(e){f(r,e);var t=p(r);function r(e){return b(this,r),t.call(this,e,e.renderInteractiveForms)}return A(r,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation radioButton";var e=this.annotationStorage,t=this.data,r=t.id,n=e.getOrCreateValue(r,t.fieldValue===t.buttonValue),i=document.createElement("input");return i.disabled=t.readOnly,i.type="radio",i.name=t.fieldName,n&&i.setAttribute("checked",!0),i.addEventListener("change",(function(t){var n,i=t.target.name,a=u(document.getElementsByName(i));try{for(a.s();!(n=a.n()).done;){var o=n.value;o!==t.target&&e.setValue(o.parentNode.getAttribute("data-annotation-id"),!1)}}catch(s){a.e(s)}finally{a.f()}e.setValue(r,t.target.checked)})),this.container.appendChild(i),this.container}}]),r}(C),E=function(e){f(r,e);var t=p(r);function r(){return b(this,r),t.apply(this,arguments)}return A(r,[{key:"render",value:function(){var e=o(m(r.prototype),"render",this).call(this);return e.className="buttonWidgetAnnotation pushButton",e}}]),r}(k),O=function(e){f(r,e);var t=p(r);function r(e){return b(this,r),t.call(this,e,e.renderInteractiveForms)}return A(r,[{key:"render",value:function(){this.container.className="choiceWidgetAnnotation";var e=this.annotationStorage,t=this.data.id;e.getOrCreateValue(t,this.data.fieldValue.length>0?this.data.fieldValue[0]:null);var r=document.createElement("select");r.disabled=this.data.readOnly,r.name=this.data.fieldName,this.data.combo||(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0));var n,i=u(this.data.options);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=document.createElement("option");o.textContent=a.displayValue,o.value=a.exportValue,this.data.fieldValue.includes(a.exportValue)&&o.setAttribute("selected",!0),r.appendChild(o)}}catch(s){i.e(s)}finally{i.f()}return r.addEventListener("input",(function(r){var n=r.target.options,i=n[n.selectedIndex].value;e.setValue(t,i)})),this.container.appendChild(r),this.container}}]),r}(C),L=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!(!e.data.title&&!e.data.contents);return t.call(this,e,n)}return A(r,[{key:"render",value:function(){var e=["Line","Square","Circle","PolyLine","Polygon","Ink"];if(this.container.className="popupAnnotation",e.includes(this.data.parentType))return this.container;var t='[data-annotation-id="'.concat(this.data.parentId,'"]'),r=this.layer.querySelector(t);if(!r)return this.container;var n=new I({container:this.container,trigger:r,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),i=parseFloat(r.style.left),a=parseFloat(r.style.width);return this.container.style.transformOrigin="-".concat(i+a,"px -").concat(r.style.top),this.container.style.left="".concat(i+a,"px"),this.container.appendChild(n.render()),this.container}}]),r}(S),I=function(){function e(t){b(this,e),this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.title=t.title,this.modificationDate=t.modificationDate,this.contents=t.contents,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}return A(e,[{key:"render",value:function(){var e=.7,t=document.createElement("div");t.className="popupWrapper",this.hideElement=this.hideWrapper?t:this.container,this.hideElement.setAttribute("hidden",!0);var r=document.createElement("div");r.className="popup";var a=this.color;if(a){var o=e*(255-a[0])+a[0],s=e*(255-a[1])+a[1],u=e*(255-a[2])+a[2];r.style.backgroundColor=i.Util.makeCssRgb(0|o,0|s,0|u)}var l=document.createElement("h1");l.textContent=this.title,r.appendChild(l);var c=n.PDFDateString.toDateObject(this.modificationDate);if(c){var h=document.createElement("span");h.textContent="{{date}}, {{time}}",h.dataset.l10nId="annotation_date_string",h.dataset.l10nArgs=JSON.stringify({date:c.toLocaleDateString(),time:c.toLocaleTimeString()}),r.appendChild(h)}var f=this._formatContents(this.contents);return r.appendChild(f),this.trigger.addEventListener("click",this._toggle.bind(this)),this.trigger.addEventListener("mouseover",this._show.bind(this,!1)),this.trigger.addEventListener("mouseout",this._hide.bind(this,!1)),r.addEventListener("click",this._hide.bind(this,!0)),t.appendChild(r),t}},{key:"_formatContents",value:function(e){for(var t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/),n=0,i=r.length;n0&&void 0!==arguments[0]&&arguments[0];e&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}},{key:"_hide",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}]),e}(),M=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return A(r,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(S),F=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return A(r,[{key:"render",value:function(){this.container.className="lineAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),i.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),i.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),i.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),n.appendChild(i),this.container.append(n),this._createPopup(this.container,i,e),this.container}}]),r}(S),D=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return A(r,[{key:"render",value:function(){this.container.className="squareAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:rect");return a.setAttribute("x",i/2),a.setAttribute("y",i/2),a.setAttribute("width",t-i),a.setAttribute("height",r-i),a.setAttribute("stroke-width",i||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),n.appendChild(a),this.container.append(n),this._createPopup(this.container,a,e),this.container}}]),r}(S),N=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return A(r,[{key:"render",value:function(){this.container.className="circleAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:ellipse");return a.setAttribute("cx",t/2),a.setAttribute("cy",r/2),a.setAttribute("rx",t/2-i/2),a.setAttribute("ry",r/2-i/2),a.setAttribute("stroke-width",i||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),n.appendChild(a),this.container.append(n),this._createPopup(this.container,a,e),this.container}}]),r}(S),j=function(e){f(r,e);var t=p(r);function r(e){var n;b(this,r);var i=!!(e.data.hasPopup||e.data.title||e.data.contents);return n=t.call(this,e,i,!0),n.containerClassName="polylineAnnotation",n.svgElementName="svg:polyline",n}return A(r,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,r=t.rect[2]-t.rect[0],n=t.rect[3]-t.rect[1],i=this.svgFactory.create(r,n),a=[],o=u(t.vertices);try{for(o.s();!(e=o.n()).done;){var s=e.value,l=s.x-t.rect[0],c=t.rect[3]-s.y;a.push(l+","+c)}}catch(f){o.e(f)}finally{o.f()}a=a.join(" ");var h=this.svgFactory.createElement(this.svgElementName);return h.setAttribute("points",a),h.setAttribute("stroke-width",t.borderStyle.width||1),h.setAttribute("stroke","transparent"),h.setAttribute("fill","none"),i.appendChild(h),this.container.append(i),this._createPopup(this.container,h,t),this.container}}]),r}(S),U=function(e){f(r,e);var t=p(r);function r(e){var n;return b(this,r),n=t.call(this,e),n.containerClassName="polygonAnnotation",n.svgElementName="svg:polygon",n}return r}(j),B=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return A(r,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(S),q=function(e){f(r,e);var t=p(r);function r(e){var n;b(this,r);var i=!!(e.data.hasPopup||e.data.title||e.data.contents);return n=t.call(this,e,i,!0),n.containerClassName="inkAnnotation",n.svgElementName="svg:polyline",n}return A(r,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,r=t.rect[2]-t.rect[0],n=t.rect[3]-t.rect[1],i=this.svgFactory.create(r,n),a=u(t.inkLists);try{for(a.s();!(e=a.n()).done;){var o,s=e.value,l=[],c=u(s);try{for(c.s();!(o=c.n()).done;){var h=o.value,f=h.x-t.rect[0],d=t.rect[3]-h.y;l.push("".concat(f,",").concat(d))}}catch(v){c.e(v)}finally{c.f()}l=l.join(" ");var p=this.svgFactory.createElement(this.svgElementName);p.setAttribute("points",l),p.setAttribute("stroke-width",t.borderStyle.width||1),p.setAttribute("stroke","transparent"),p.setAttribute("fill","none"),this._createPopup(this.container,p,t),i.appendChild(p)}}catch(v){a.e(v)}finally{a.f()}return this.container.append(i),this.container}}]),r}(S),W=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return A(r,[{key:"render",value:function(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(S),V=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return A(r,[{key:"render",value:function(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(S),G=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return A(r,[{key:"render",value:function(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(S),z=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return A(r,[{key:"render",value:function(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(S),H=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return A(r,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(S),Y=function(e){f(r,e);var t=p(r);function r(e){var a;b(this,r),a=t.call(this,e,!0);var o=a.data.file,s=o.filename,u=o.content;return a.filename=(0,n.getFilenameFromUrl)(s),a.content=u,a.linkService.eventBus&&a.linkService.eventBus.dispatch("fileattachmentannotation",{source:g(a),id:(0,i.stringToPDFString)(s),filename:s,content:u}),a}return A(r,[{key:"render",value:function(){this.container.className="fileAttachmentAnnotation";var e=document.createElement("div");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.addEventListener("dblclick",this._download.bind(this)),this.data.hasPopup||!this.data.title&&!this.data.contents||this._createPopup(this.container,e,this.data),this.container.appendChild(e),this.container}},{key:"_download",value:function(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,i.warn)("Download cannot be started due to unavailable download manager")}}]),r}(S),X=function(){function e(){b(this,e)}return A(e,null,[{key:"render",value:function(e){var t,r=[],o=[],s=u(e.annotations);try{for(s.s();!(t=s.n()).done;){var l=t.value;l&&(l.annotationType!==i.AnnotationType.POPUP?r.push(l):o.push(l))}}catch(p){s.e(p)}finally{s.f()}o.length&&r.push.apply(r,o);for(var c=0,h=r;c1)p=!0;else if(t.transform[0]!==t.transform[3]){var v=Math.abs(t.transform[0]),g=Math.abs(t.transform[3]);v!==g&&Math.max(v,g)/Math.min(v,g)>1.5&&(p=!0)}if(p&&(l.vertical?o.canvasWidth=t.height*e._viewport.scale:o.canvasWidth=t.width*e._viewport.scale),e._textDivProperties.set(a,o),e._textContentStream&&e._layoutText(a),e._enhanceTextSelection){var y=1,m=0;0!==u&&(y=Math.cos(u),m=Math.sin(u));var b,_,A=(l.vertical?t.height:t.width)*e._viewport.scale,w=f;0!==u?(b=[y,m,-m,y,c,h],_=n.Util.getAxialAlignedBoundingBox([0,0,A,w],b)):_=[c,h,c+A,h+w],e._bounds.push({left:_[0],top:_[1],right:_[2],bottom:_[3],div:a,size:[A,w],m:b})}}function a(t){if(!t._canceled){var r=t._textDivs,n=t._capability,i=r.length;if(i>e)return t._renderingDone=!0,void n.resolve();if(!t._textContentStream)for(var a=0;a0&&(n=n?Math.min(a,n):a)}return n}function s(e){for(var t=e._bounds,r=e._viewport,i=u(r.width,r.height,t),a=0;a=0&&n[a].start>=e.y2)a--;var o,s,u=-1/0;for(o=t;o<=a;o++){var l;r=n[o],i=r.boundary,l=i.x2>e.x1?i.index>e.index?i.x1New:e.x1:void 0===i.x2New?(i.x2+e.x1)/2:i.x2New,l>u&&(u=l)}for(e.x1New=u,o=t;o<=a;o++)r=n[o],i=r.boundary,void 0===i.x2New?i.x2>e.x1?i.index>e.index&&(i.x2New=i.x2):i.x2New=u:i.x2New>u&&(i.x2New=Math.max(u,i.x2));var c=[],h=null;for(o=t;o<=a;o++){r=n[o],i=r.boundary;var f=i.x2>e.x2?i:e;h===f?c[c.length-1].end=r.end:(c.push({start:r.start,end:r.end,boundary:f}),h=f)}for(n[t].start=0&&n[s].start>=i.y1;s--)d=n[s].boundary===i;for(s=a+1;!d&&s0&&(t.scale=t.canvasWidth/s,r="scaleX(".concat(t.scale,")"))}0!==t.angle&&(r="rotate(".concat(t.angle,"deg) ").concat(r)),r.length>0&&(this._enhanceTextSelection&&(t.originalTransform=r),e.style.transform=r),this._textDivProperties.set(e,t),this._container.appendChild(e)}},_render:function(e){var t=this,r=(0,n.createPromiseCapability)(),i=Object.create(null),o=this._document.createElement("canvas");if(o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent){var s=this._textContent.items,u=this._textContent.styles;this._processItems(s,u),r.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');var l=function e(){t._reader.read().then((function(n){var a=n.value,o=n.done;o?r.resolve():(Object.assign(i,a.styles),t._processItems(a.items,i),e())}),r.reject)};this._reader=this._textContentStream.getReader(),l()}r.promise.then((function(){i=null,e?t._renderTimer=setTimeout((function(){a(t),t._renderTimer=null}),e):a(t)}),this._capability.reject)},expandTextDivs:function(e){if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(s(this),this._bounds=null);for(var t=[],r=[],n=0,i=this._textDivs.length;n0?(r.push("".concat(o.paddingTop,"px")),t.push("translateY(".concat(-o.paddingTop,"px)"))):r.push(0),o.paddingRight>0?r.push("".concat(o.paddingRight/o.scale,"px")):r.push(0),o.paddingBottom>0?r.push("".concat(o.paddingBottom,"px")):r.push(0),o.paddingLeft>0?(r.push("".concat(o.paddingLeft/o.scale,"px")),t.push("translateX(".concat(-o.paddingLeft/o.scale,"px)"))):r.push(0),a.style.padding=r.join(" "),t.length&&(a.style.transform=t.join(" "))):(a.style.padding=null,a.style.transform=o.originalTransform))}}}},h}();t.renderTextLayer=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n=r(5),i=r(1),a=r(7);function o(e){return l(e)||u(e)||v(e)||s()}function s(){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 u(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function l(e){if(Array.isArray(e))return g(e)}function c(e,t){return d(e)||f(e,t)||v(e,t)||h()}function h(){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 f(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0)if(r.push(o.value),t&&r.length===t)break}catch(u){i=!0,a=u}finally{try{n||null==s["return"]||s["return"]()}finally{if(i)throw a}}return r}}function d(e){if(Array.isArray(e))return e}function p(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=v(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(s)throw a}}}}function v(e,t){if(e){if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r>1&2147483647:o>>1&2147483647;r[i]=o}function u(e,t,n){for(var i=-1,a=t;a>>8^s}return-1^i}function l(e,t,r,n){var i=n,a=t.length;r[i]=a>>24&255,r[i+1]=a>>16&255,r[i+2]=a>>8&255,r[i+3]=255&a,i+=4,r[i]=255&e.charCodeAt(0),r[i+1]=255&e.charCodeAt(1),r[i+2]=255&e.charCodeAt(2),r[i+3]=255&e.charCodeAt(3),i+=4,r.set(t,i),i+=t.length;var o=u(r,n+4,i);r[i]=o>>24&255,r[i+1]=o>>16&255,r[i+2]=o>>8&255,r[i+3]=255&o}function c(e,t,r){for(var n=1,i=0,a=t;a=8?e:Buffer.from(e);var r=__webpack_require__(4).deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(i){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+i)}return f(e)}function f(e){var t=e.length,r=65535,n=Math.ceil(t/r),i=new Uint8Array(2+t+5*n+4),a=0;i[a++]=120,i[a++]=156;var o=0;while(t>r)i[a++]=0,i[a++]=255,i[a++]=255,i[a++]=0,i[a++]=0,i.set(e.subarray(o,o+r),a),a+=r,o+=r,t-=r;i[a++]=1,i[a++]=255&t,i[a++]=t>>8&255,i[a++]=255&~t,i[a++]=(65535&~t)>>8&255,i.set(e.subarray(o),a),a+=e.length-o;var s=c(e,0,e.length);return i[a++]=s>>24&255,i[a++]=s>>16&255,i[a++]=s>>8&255,i[a++]=255&s,i}function d(r,i,a,o){var s,u,c,f=r.width,d=r.height,p=r.data;switch(i){case n.ImageKind.GRAYSCALE_1BPP:u=0,s=1,c=f+7>>3;break;case n.ImageKind.RGB_24BPP:u=2,s=8,c=3*f;break;case n.ImageKind.RGBA_32BPP:u=6,s=8,c=4*f;break;default:throw new Error("invalid format")}for(var v=new Uint8Array((1+c)*d),g=0,y=0,m=0;m>24&255,f>>16&255,f>>8&255,255&f,d>>24&255,d>>16&255,d>>8&255,255&d,s,u,0,0,0]),w=h(v),S=e.length+3*t+A.length+w.length,k=new Uint8Array(S),x=0;return k.set(e,x),x+=e.length,l("IHDR",A,k,x),x+=t+A.length,l("IDATA",w,k,x),x+=t+w.length,l("IEND",new Uint8Array(0),k,x),(0,n.createObjectURL)(k,"image/png",a)}return function(e,t,r){var i=void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind;return d(e,i,t,r)}}(),E=function(){function e(){y(this,e),this.fontSizeScale=1,this.fontWeight=k.fontWeight,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=n.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=k.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}return b(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),O=0,L=0,I=0;t.SVGGraphics=_=function(){function e(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var o in y(this,e),this.svgFactory=new i.DOMSVGFactory,this.current=new E,this.transformMatrix=n.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=t,this.objs=r,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!a,this._operatorIdMapping=[],n.OPS)this._operatorIdMapping[n.OPS[o]]=o}return b(e,[{key:"save",value:function(){this.transformStack.push(this.transformMatrix);var e=this.current;this.extraStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}},{key:"group",value:function(e){this.save(),this.executeOpTree(e),this.restore()}},{key:"loadDependencies",value:function(e){for(var t=this,r=e.fnArray,i=e.argsArray,a=0,o=r.length;a0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=P[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=R[e]}},{key:"setMiterLimit",value:function(e){this.current.miterLimit=e}},{key:"setStrokeAlpha",value:function(e){this.current.strokeAlpha=e}},{key:"setStrokeRGBColor",value:function(e,t,r){this.current.strokeColor=n.Util.makeCssRgb(e,t,r)}},{key:"setFillAlpha",value:function(e){this.current.fillAlpha=e}},{key:"setFillRGBColor",value:function(e,t,r){this.current.fillColor=n.Util.makeCssRgb(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}},{key:"setStrokeColorN",value:function(e){this.current.strokeColor=this._makeColorN_Pattern(e)}},{key:"setFillColorN",value:function(e){this.current.fillColor=this._makeColorN_Pattern(e)}},{key:"shadingFill",value:function(e){var t=this.viewport.width,r=this.viewport.height,i=n.Util.inverseTransform(this.transformMatrix),a=n.Util.applyTransform([0,0],i),o=n.Util.applyTransform([0,r],i),s=n.Util.applyTransform([t,0],i),u=n.Util.applyTransform([t,r],i),l=Math.min(a[0],o[0],s[0],u[0]),c=Math.min(a[1],o[1],s[1],u[1]),h=Math.max(a[0],o[0],s[0],u[0]),f=Math.max(a[1],o[1],s[1],u[1]),d=this.svgFactory.createElement("svg:rect");d.setAttributeNS(null,"x",l),d.setAttributeNS(null,"y",c),d.setAttributeNS(null,"width",h-l),d.setAttributeNS(null,"height",f-c),d.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&d.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(d)}},{key:"_makeColorN_Pattern",value:function(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}},{key:"_makeTilingPattern",value:function(e){var t=e[1],r=e[2],i=e[3]||n.IDENTITY_MATRIX,a=c(e[4],4),s=a[0],u=a[1],l=a[2],h=a[3],f=e[5],d=e[6],p=e[7],v="shading".concat(I++),g=n.Util.applyTransform([s,u],i),y=c(g,2),m=y[0],b=y[1],_=n.Util.applyTransform([l,h],i),A=c(_,2),w=A[0],S=A[1],k=n.Util.singularValueDecompose2dScale(i),x=c(k,2),C=x[0],P=x[1],R=f*C,T=d*P,E=this.svgFactory.createElement("svg:pattern");E.setAttributeNS(null,"id",v),E.setAttributeNS(null,"patternUnits","userSpaceOnUse"),E.setAttributeNS(null,"width",R),E.setAttributeNS(null,"height",T),E.setAttributeNS(null,"x","".concat(m)),E.setAttributeNS(null,"y","".concat(b));var O=this.svg,L=this.transformMatrix,M=this.current.fillColor,F=this.current.strokeColor,D=this.svgFactory.create(w-m,S-b);if(this.svg=D,this.transformMatrix=i,2===p){var N=n.Util.makeCssRgb.apply(n.Util,o(t));this.current.fillColor=N,this.current.strokeColor=N}return this.executeOpTree(this.convertOpList(r)),this.svg=O,this.transformMatrix=L,this.current.fillColor=M,this.current.strokeColor=F,E.appendChild(D.childNodes[0]),this.defs.appendChild(E),"url(#".concat(v,")")}},{key:"_makeShadingPattern",value:function(e){switch(e[0]){case"RadialAxial":var t,r="shading".concat(I++),i=e[3];switch(e[1]){case"axial":var a=e[4],o=e[5];t=this.svgFactory.createElement("svg:linearGradient"),t.setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",a[0]),t.setAttributeNS(null,"y1",a[1]),t.setAttributeNS(null,"x2",o[0]),t.setAttributeNS(null,"y2",o[1]);break;case"radial":var s=e[4],u=e[5],l=e[6],c=e[7];t=this.svgFactory.createElement("svg:radialGradient"),t.setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",u[0]),t.setAttributeNS(null,"cy",u[1]),t.setAttributeNS(null,"r",c),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",l);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var h,f=p(i);try{for(f.s();!(h=f.n()).done;){var d=h.value,v=this.svgFactory.createElement("svg:stop");v.setAttributeNS(null,"offset",d[0]),v.setAttributeNS(null,"stop-color",d[1]),t.appendChild(v)}}catch(g){f.e(g)}finally{f.f()}return this.defs.appendChild(t),"url(#".concat(r,")");case"Mesh":return(0,n.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}},{key:"setDash",value:function(e,t){this.current.dashArray=e,this.current.dashPhase=t}},{key:"constructPath",value:function(e,t){var r,i=this.current,a=i.x,o=i.y,s=[],u=0,l=p(e);try{for(l.s();!(r=l.n()).done;){var c=r.value;switch(0|c){case n.OPS.rectangle:a=t[u++],o=t[u++];var h=t[u++],f=t[u++],d=a+h,v=o+f;s.push("M",w(a),w(o),"L",w(d),w(o),"L",w(d),w(v),"L",w(a),w(v),"Z");break;case n.OPS.moveTo:a=t[u++],o=t[u++],s.push("M",w(a),w(o));break;case n.OPS.lineTo:a=t[u++],o=t[u++],s.push("L",w(a),w(o));break;case n.OPS.curveTo:a=t[u+4],o=t[u+5],s.push("C",w(t[u]),w(t[u+1]),w(t[u+2]),w(t[u+3]),w(a),w(o)),u+=6;break;case n.OPS.curveTo2:s.push("C",w(a),w(o),w(t[u]),w(t[u+1]),w(t[u+2]),w(t[u+3])),a=t[u+2],o=t[u+3],u+=4;break;case n.OPS.curveTo3:a=t[u+2],o=t[u+3],s.push("C",w(t[u]),w(t[u+1]),w(a),w(o),w(a),w(o)),u+=4;break;case n.OPS.closePath:s.push("Z");break}}}catch(g){l.e(g)}finally{l.f()}s=s.join(" "),i.path&&e.length>0&&e[0]!==n.OPS.rectangle&&e[0]!==n.OPS.moveTo?s=i.path.getAttributeNS(null,"d")+s:(i.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(i.path)),i.path.setAttributeNS(null,"d",s),i.path.setAttributeNS(null,"fill","none"),i.element=i.path,i.setCurrentPoint(a,o)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(O++),r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",S(this.transformMatrix));var n=e.element.cloneNode(!0);"evenodd"===this.pendingClip?n.setAttributeNS(null,"clip-rule","evenodd"):n.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.appendChild(n),this.defs.appendChild(r),e.activeClipUrl&&(e.clipGroup=null,this.extraStack.forEach((function(e){e.clipGroup=null})),r.setAttributeNS(null,"clip-path",e.activeClipUrl)),e.activeClipUrl="url(#".concat(t,")"),this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function(e){this.pendingClip=e}},{key:"closePath",value:function(){var e=this.current;if(e.path){var t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){var t,r=p(e);try{for(r.s();!(t=r.n()).done;){var i=c(t.value,2),a=i[0],o=i[1];switch(a){case"LW":this.setLineWidth(o);break;case"LC":this.setLineCap(o);break;case"LJ":this.setLineJoin(o);break;case"ML":this.setMiterLimit(o);break;case"D":this.setDash(o[0],o[1]);break;case"RI":this.setRenderingIntent(o);break;case"FL":this.setFlatness(o);break;case"Font":this.setFont(o);break;case"CA":this.setStrokeAlpha(o);break;case"ca":this.setFillAlpha(o);break;default:(0,n.warn)("Unimplemented graphic state operator ".concat(a));break}}}catch(s){r.e(s)}finally{r.f()}}},{key:"fill",value:function(){var e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}},{key:"stroke",value:function(){var e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.current,n=r.dashArray;1!==t&&n.length>0&&(n=n.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",r.strokeColor),e.setAttributeNS(null,"stroke-opacity",r.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",w(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",w(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",n.map(w).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",w(t*r.dashPhase)+"px")}},{key:"eoFill",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.closePath(),this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function(){var e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(e)}},{key:"paintImageXObject",value:function(e){var t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}},{key:"paintInlineImageXObject",value:function(e,t){var r=e.width,n=e.height,i=T(e,this.forceDataSchema,!!t),a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y","0"),a.setAttributeNS(null,"width",w(r)),a.setAttributeNS(null,"height",w(n)),this.current.element=a,this.clip("nonzero");var o=this.svgFactory.createElement("svg:image");o.setAttributeNS(C,"xlink:href",i),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",w(-n)),o.setAttributeNS(null,"width",w(r)+"px"),o.setAttributeNS(null,"height",w(n)+"px"),o.setAttributeNS(null,"transform","scale(".concat(w(1/r)," ").concat(w(-1/n),")")),t?t.appendChild(o):this._ensureTransformGroup().appendChild(o)}},{key:"paintImageMaskXObject",value:function(e){var t=this.current,r=e.width,n=e.height,i=t.fillColor;t.maskId="mask".concat(L++);var a=this.svgFactory.createElement("svg:mask");a.setAttributeNS(null,"id",t.maskId);var o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",w(r)),o.setAttributeNS(null,"height",w(n)),o.setAttributeNS(null,"fill",i),o.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(a),this._ensureTransformGroup().appendChild(o),this.paintInlineImageXObject(e,a)}},{key:"paintFormXObjectBegin",value:function(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){var r=t[2]-t[0],n=t[3]-t[1],i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x",t[0]),i.setAttributeNS(null,"y",t[1]),i.setAttributeNS(null,"width",w(r)),i.setAttributeNS(null,"height",w(n)),this.current.element=i,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){}},{key:"_initialize",value:function(e){var t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.appendChild(r),this.defs=r;var n=this.svgFactory.createElement("svg:g");return n.setAttributeNS(null,"transform",S(e.transform)),t.appendChild(n),this.svg=n,t}},{key:"_ensureClipGroup",value:function(){if(!this.current.clipGroup){var e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(e),this.current.clipGroup=e}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",S(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var n=o(r(2)),i=r(5),a=r(220);function o(e){return e&&e.__esModule?e:{default:e}}function s(e){return s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function c(e){var t=d();return function(){var r,n=p(e);if(t){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(e,t){return!t||"object"!==s(t)&&"function"!==typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,i)}function g(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){v(a,n,i,o,s,"next",e)}function s(e){v(a,n,i,o,s,"throw",e)}o(void 0)}))}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r0,"Range chunk size must be larger than zero");var o={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10);if(!Number.isInteger(s))return o;if(o.suggestedLength=s,s<=2*i)return o;if(a||!r)return o;if("bytes"!==t("Accept-Ranges"))return o;var u=t("Content-Encoding")||"identity";return"identity"!==u||(o.allowRangeRequests=!0),o}function o(e){var t=e("Content-Disposition");if(t){var r=(0,i.getFilenameFromContentDispositionHeader)(t);if(r.includes("%"))try{r=decodeURIComponent(r)}catch(n){}if(/\.pdf$/i.test(r))return r}return null}function s(e,t){return 404===e||0===e&&t.startsWith("file:")?new n.MissingPDFException('Missing PDF "'+t+'".'):new n.UnexpectedResponseException("Unexpected server response ("+e+') while retrieving PDF "'+t+'".',e)}function u(e){return 200===e||206===e}},function(e,t,r){"use strict";function n(e,t){return u(e)||s(e,t)||a(e,t)||i()}function i(){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 a(e,t){if(e){if("string"===typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4===n.readyState&&e in this.pendingRequests)if(delete this.pendingRequests[e],0===n.status&&this.isHttp)r.onError&&r.onError(n.status);else{var i=n.status||f,a=i===f&&r.expectedStatus===d;if(a||i===r.expectedStatus){var o=p(n);if(i===d){var s=n.getResponseHeader("Content-Range"),u=/bytes (\d+)-(\d+)\/(\d+)/.exec(s);r.onDone({begin:parseInt(u[1],10),chunk:o})}else o?r.onDone({begin:0,chunk:o}):r.onError&&r.onError(n.status)}else r.onError&&r.onError(n.status)}}}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{key:"abortRequest",value:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}]),e}(),g=function(){function e(t){l(this,e),this._source=t,this._manager=new v(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return h(e,[{key:"_onRangeRequestReaderClosed",value:function(e){var t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}},{key:"getFullReader",value:function(){return(0,i.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new y(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new m(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t=this._rangeRequestReaders.slice(0);t.forEach((function(t){t.cancel(e)}))}}]),e}();t.PDFNetworkStream=g;var y=function(){function e(t,r){l(this,e),this._manager=t;var n={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(n),this._headersReceivedCapability=(0,i.createPromiseCapability)(),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}return h(e,[{key:"_onHeadersReceived",value:function(){var e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=function(e){return t.getResponseHeader(e)},n=(0,a.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),i=n.allowRangeRequests,o=n.suggestedLength;i&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){if(e)if(this._requests.length>0){var t=this._requests.shift();t.resolve({value:e.chunk,done:!1})}else this._cachedChunks.push(e.chunk);this._done=!0,this._cachedChunks.length>0||(this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[])}},{key:"_onError",value:function(e){var t=this._url,r=(0,a.createResponseStatusError)(e,t);this._storedError=r,this._headersReceivedCapability.reject(r),this._requests.forEach((function(e){e.reject(r)})),this._requests=[],this._cachedChunks=[]}},{key:"_onProgress",value:function(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}},{key:"read",value:function(){var e=u(n["default"].mark((function e(){var t,r;return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){e.next=5;break}return t=this._cachedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 5:if(!this._done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return r=(0,i.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 10:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cancel",value:function(e){this._done=!0,this._headersReceivedCapability.reject(e),this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersReceivedCapability.promise}}]),e}(),m=function(){function e(t,r,n){l(this,e),this._manager=t;var i={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=t.requestRange(r,n,i),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}return h(e,[{key:"_close",value:function(){this.onClosed&&this.onClosed(this)}},{key:"_onDone",value:function(e){var t=e.chunk;if(this._requests.length>0){var r=this._requests.shift();r.resolve({value:t,done:!1})}else this._queuedChunk=t;this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._close()}},{key:"_onProgress",value:function(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}},{key:"read",value:function(){var e=u(n["default"].mark((function e(){var t,r;return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(null===this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,i.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}},{key:"isStreamingSupported",get:function(){return!1}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var n=o(r(2)),i=r(5),a=r(220);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){s(a,n,i,o,u,"next",e)}function u(e){s(a,n,i,o,u,"throw",e)}o(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r