PageSourceSearch

https://cdn.piramalfinance.com/employment-mf-web/1.0.852/_next/static/chunks/9839.1f46c3e636e38554-fed.js

js piramalfinance.com collected 2026-09-24 12:10:12 UTC 480,675 bytes, 1 lines download raw bytes

1(self.webpackChunkemploymentApp=self.webpackChunkemploymentApp||[]).push([[9839],{9609:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1983),a=r(1354),o=(0,r(1977).Z)("MuiBox",["root"]),i=(0,a.Z)({defaultClassName:o.root,generateClassName:n.Z.generate})},7182:function(e,t,r){"use strict";r.d(t,{Z:function(){return I}});var n=r(2729),a=r(3366),o=r(7462),i=r(6497),s=r(512),u=r(8510),l=r(917),c=r(6643),f=r(9567),d=r(7527),h=r(1977),p=r(5463);function v(e){return(0,p.ZP)("MuiCircularProgress",e)}(0,h.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var y=r(5893);function m(){let e=(0,n._)(["\n  0% {\n    transform: rotate(0deg);\n  }\n\n  100% {\n    transform: rotate(360deg);\n  }\n"]);return m=function(){return e},e}function g(){let e=(0,n._)(["\n  0% {\n    stroke-dasharray: 1px, 200px;\n    stroke-dashoffset: 0;\n  }\n\n  50% {\n    stroke-dasharray: 100px, 200px;\n    stroke-dashoffset: -15px;\n  }\n\n  100% {\n    stroke-dasharray: 100px, 200px;\n    stroke-dashoffset: -125px;\n  }\n"]);return g=function(){return e},e}function b(){let e=(0,n._)(["\n      animation: "," 1.4s linear infinite;\n    "]);return b=function(){return e},e}function _(){let e=(0,n._)(["\n      animation: "," 1.4s ease-in-out infinite;\n    "]);return _=function(){return e},e}let S=["className","color","disableShrink","size","style","thickness","value","variant"],A=e=>e,k,w,x,C,P=44,T=(0,l.F4)(k||(k=A(m()))),R=(0,l.F4)(w||(w=A(g()))),E=e=>{let{classes:t,variant:r,color:n,disableShrink:a}=e,o={root:["root",r,"color".concat((0,c.Z)(n))],svg:["svg"],circle:["circle","circle".concat((0,c.Z)(r)),a&&"circleDisableShrink"]};return(0,u.Z)(o,v,t)},O=(0,d.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t["color".concat((0,c.Z)(r.color))]]}})(e=>{let{ownerState:t,theme:r}=e;return(0,o.Z)({display:"inline-block"},"determinate"===t.variant&&{transition:r.transitions.create("transform")},"inherit"!==t.color&&{color:(r.vars||r).palette[t.color].main})},e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,l.iv)(x||(x=A(b(),0)),T)}),F=(0,d.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),M=(0,d.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.circle,t["circle".concat((0,c.Z)(r.variant))],r.disableShrink&&t.circleDisableShrink]}})(e=>{let{ownerState:t,theme:r}=e;return(0,o.Z)({stroke:"currentColor"},"determinate"===t.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})},e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,l.iv)(C||(C=A(_(),0)),R)});var I=i.forwardRef(function(e,t){let r=(0,f.Z)({props:e,name:"MuiCircularProgress"}),{className:n,color:i="primary",disableShrink:u=!1,size:l=40,style:c,thickness:d=3.6,value:h=0,variant:p="indeterminate"}=r,v=(0,a.Z)(r,S),m=(0,o.Z)({},r,{color:i,disableShrink:u,size:l,thickness:d,value:h,variant:p}),g=E(m),b={},_={},A={};if("determinate"===p){let e=2*Math.PI*((P-d)/2);b.strokeDasharray=e.toFixed(3),A["aria-valuenow"]=Math.round(h),b.strokeDashoffset="".concat(((100-h)/100*e).toFixed(3),"px"),_.transform="rotate(-90deg)"}return(0,y.jsx)(O,(0,o.Z)({className:(0,s.Z)(g.root,n),style:(0,o.Z)({width:l,height:l},_,c),ownerState:m,ref:t,role:"progressbar"},A,v,{children:(0,y.jsx)(F,{className:g.svg,ownerState:m,viewBox:"".concat(P/2," ").concat(P/2," ").concat(P," ").concat(P),children:(0,y.jsx)(M,{className:g.circle,style:b,ownerState:m,cx:P,cy:P,r:(P-d)/2,fill:"none",strokeWidth:d})})}))})},2283:function(e,t,r){"use strict";r.d(t,{Z:function(){return A}});var n,a=r(3366),o=r(7462),i=r(6497),s=r(512),u=r(8510),l=r(8962),c=r(7280),f=r(7527),d=r(6643),h=r(1977),p=r(5463);function v(e){return(0,p.ZP)("MuiFormHelperText",e)}var y=(0,h.Z)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),m=r(9567),g=r(5893);let b=["children","className","component","disabled","error","filled","focused","margin","required","variant"],_=e=>{let{classes:t,contained:r,size:n,disabled:a,error:o,filled:i,focused:s,required:l}=e,c={root:["root",a&&"disabled",o&&"error",n&&"size".concat((0,d.Z)(n)),r&&"contained",s&&"focused",i&&"filled",l&&"required"]};return(0,u.Z)(c,v,t)},S=(0,f.ZP)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.size&&t["size".concat((0,d.Z)(r.size))],r.contained&&t.contained,r.filled&&t.filled]}})(e=>{let{theme:t,ownerState:r}=e;return(0,o.Z)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(y.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(y.error)]:{color:(t.vars||t).palette.error.main}},"small"===r.size&&{marginTop:4},r.contained&&{marginLeft:14,marginRight:14})});var A=i.forwardRef(function(e,t){let r=(0,m.Z)({props:e,name:"MuiFormHelperText"}),{children:i,className:u,component:f="p"}=r,d=(0,a.Z)(r,b),h=(0,c.Z)(),p=(0,l.Z)({props:r,muiFormControl:h,states:["variant","size","disabled","error","filled","focused","required"]}),v=(0,o.Z)({},r,{component:f,contained:"filled"===p.variant||"outlined"===p.variant,variant:p.variant,size:p.size,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),y=_(v);return(0,g.jsx)(S,(0,o.Z)({as:f,ownerState:v,className:(0,s.Z)(y.root,u),ref:t},d,{children:" "===i?n||(n=(0,g.jsx)("span",{className:"notranslate",children:"​"})):i}))})},6788:function(e,t,r){"use strict";r.d(t,{Z:function(){return A}});var n=r(3366),a=r(7462),o=r(6497),i=r(512),s=r(9707),u=r(8510),l=r(7527),c=r(9567),f=r(6643),d=r(1977),h=r(5463);function p(e){return(0,h.ZP)("MuiTypography",e)}
1(0,d.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var v=r(5893);let y=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],m=e=>{let{align:t,gutterBottom:r,noWrap:n,paragraph:a,variant:o,classes:i}=e,s={root:["root",o,"inherit"!==e.align&&"align".concat((0,f.Z)(t)),r&&"gutterBottom",n&&"noWrap",a&&"paragraph"]};return(0,u.Z)(s,p,i)},g=(0,l.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],"inherit"!==r.align&&t["align".concat((0,f.Z)(r.align))],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(e=>{let{theme:t,ownerState:r}=e;return(0,a.Z)({margin:0},"inherit"===r.variant&&{font:"inherit"},"inherit"!==r.variant&&t.typography[r.variant],"inherit"!==r.align&&{textAlign:r.align},r.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r.gutterBottom&&{marginBottom:"0.35em"},r.paragraph&&{marginBottom:16})}),b={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},_={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},S=e=>_[e]||e;var A=o.forwardRef(function(e,t){let r=(0,c.Z)({props:e,name:"MuiTypography"}),o=S(r.color),u=(0,s.Z)((0,a.Z)({},r,{color:o})),{align:l="inherit",className:f,component:d,gutterBottom:h=!1,noWrap:p=!1,paragraph:_=!1,variant:A="body1",variantMapping:k=b}=u,w=(0,n.Z)(u,y),x=(0,a.Z)({},u,{align:l,color:o,className:f,component:d,gutterBottom:h,noWrap:p,paragraph:_,variant:A,variantMapping:k}),C=d||(_?"p":k[A]||b[A])||"span",P=m(x);return(0,v.jsx)(g,(0,a.Z)({as:C,ref:t,ownerState:x,className:(0,i.Z)(P.root,f)},w))})},1987:function(e,t,r){var n="/";!function(){var t={452:function(e){"use strict";e.exports=r(7334)}},a={};function o(e){var r=a[e];if(void 0!==r)return r.exports;var n=a[e]={exports:{}},i=!0;try{t[e](n,n.exports,o),i=!1}finally{i&&delete a[e]}return n.exports}o.ab=n+"/";var i={};!function(){var e,t=i,r=(e=o(452))&&"object"==typeof e&&"default"in e?e.default:e,n=/https?|ftp|gopher|file/;function a(e){"string"==typeof e&&(e=b(e));var t=function(e,t,r){var n=e.auth,a=e.hostname,o=e.protocol||"",i=e.pathname||"",s=e.hash||"",u=e.query||"",l=!1;n=n?encodeURIComponent(n).replace(/%3A/i,":")+"@":"",e.host?l=n+e.host:a&&(l=n+(~a.indexOf(":")?"["+a+"]":a),e.port&&(l+=":"+e.port)),u&&"object"==typeof u&&(u=t.encode(u));var c=e.search||u&&"?"+u||"";return o&&":"!==o.substr(-1)&&(o+=":"),e.slashes||(!o||r.test(o))&&!1!==l?(l="//"+(l||""),i&&"/"!==i[0]&&(i="/"+i)):l||(l=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),{protocol:o,host:l,pathname:i=i.replace(/[?#]/g,encodeURIComponent),search:c=c.replace("#","%23"),hash:s}}(e,r,n);return""+t.protocol+t.host+t.pathname+t.search+t.hash}var s="http://",u="w.w",l=s+u,c=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,f=/https?|ftp|gopher|file/;function d(e,t){var r="string"==typeof e?b(e):e;e="object"==typeof e?a(e):e;var n=b(t),o="";r.protocol&&!r.slashes&&(o=r.protocol,e=e.replace(r.protocol,""),o+="/"===t[0]||"/"===e[0]?"/":""),o&&n.protocol&&(o="",n.slashes||(o=n.protocol,t=t.replace(n.protocol,"")));var i=e.match(c);i&&!n.protocol&&(e=e.substr((o=i[1]+(i[2]||"")).length),/^\/\/[^/]/.test(t)&&(o=o.slice(0,-1)));var u=new URL(e,l+"/"),d=new URL(t,u).toString().replace(l,""),h=n.protocol||r.protocol;return h+=r.slashes||n.slashes?"//":"",!o&&h?d=d.replace(s,h):o&&(d=d.replace(s,"")),f.test(d)||~t.indexOf(".")||"/"===e.slice(-1)||"/"===t.slice(-1)||"/"!==d.slice(-1)||(d=d.slice(0,-1)),o&&(d=o+("/"===d[0]?d.substr(1):d)),d}function h(){}h.prototype.parse=b,h.prototype.format=a,h.prototype.resolve=d,h.prototype.resolveObject=d;var p=/^https?|ftp|gopher|file/,v=/^(.*?)([#?].*)/,y=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,m=/^([a-z0-9.+-]*:)?\/\/\/*/i,g=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function b(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),e&&"object"==typeof e&&e instanceof h)return e;var o=(e=e.trim()).match(v);e=o?o[1].replace(/\\/g,"/")+o[2]:e.replace(/\\/g,"/"),g.test(e)&&"/"!==e.slice(-1)&&(e+="/");var i=!/(^javascript)/.test(e)&&e.match(y),s=m.test(e),c="";i&&(p.test(i[1])||(c=i[1].toLowerCase(),e=""+i[2]+i[3]),i[2]||(s=!1,p.test(i[1])?(c=i[1],e=""+i[3]):e="//"+i[3]),3!==i[2].length&&1!==i[2].length||(c=i[1],e="/"+i[3]));var f,d=(o?o[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),b=d&&d[1],_=new h,S="",A="";
1try{f=new URL(e)}catch(t){S=t,c||n||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(A="/",e=e.substr(1));try{f=new URL(e,l)}catch(e){return _.protocol=c,_.href=c,_}}_.slashes=s&&!A,_.host=f.host===u?"":f.host,_.hostname=f.hostname===u?"":f.hostname.replace(/(\[|\])/g,""),_.protocol=S?c||null:f.protocol,_.search=f.search.replace(/\\/g,"%5C"),_.hash=f.hash.replace(/\\/g,"%5C");var k=e.split("#");!_.search&&~k[0].indexOf("?")&&(_.search="?"),_.hash||""!==k[1]||(_.hash="#"),_.query=t?r.decode(f.search.substr(1)):_.search.substr(1),_.pathname=A+(i?function(e){return e.replace(/['^|`]/g,function(e){return"%"+e.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(e,t){try{return decodeURIComponent(t).split("").map(function(e){var t=e.charCodeAt();return t>256||/^[a-z0-9]$/i.test(e)?e:"%"+t.toString(16).toUpperCase()}).join("")}catch(e){return t}})}(f.pathname):f.pathname),"about:"===_.protocol&&"blank"===_.pathname&&(_.protocol="",_.pathname=""),S&&"/"!==e[0]&&(_.pathname=_.pathname.substr(1)),c&&!p.test(c)&&"/"!==e.slice(-1)&&"/"===_.pathname&&(_.pathname=""),_.path=_.pathname+_.search,_.auth=[f.username,f.password].map(decodeURIComponent).filter(Boolean).join(":"),_.port=f.port,b&&!_.host.endsWith(b)&&(_.host+=b,_.port=b.slice(1)),_.href=A?""+_.pathname+_.search+_.hash:a(_);var w=/^(file)/.test(_.href)?["host","hostname"]:[];return Object.keys(_).forEach(function(e){~w.indexOf(e)||(_[e]=_[e]||null)}),_}t.parse=b,t.format=a,t.resolve=d,t.resolveObject=function(e,t){return b(d(e,t))},t.Url=h}(),e.exports=i}()},7334:function(e){var t="/";!function(){"use strict";var r={815:function(e){function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,a,o){n=n||"&",a=a||"=";var i={};if("string"!=typeof e||0===e.length)return i;var s=/\+/g;e=e.split(n);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var l=e.length;u>0&&l>u&&(l=u);for(var c=0;c<l;++c){var f,d,h,p,v=e[c].replace(s,"%20"),y=v.indexOf(a);y>=0?(f=v.substr(0,y),d=v.substr(y+1)):(f=v,d=""),h=decodeURIComponent(f),p=decodeURIComponent(d),t(i,h)?r(i[h])?i[h].push(p):i[h]=[i[h],p]:i[h]=p}return i};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},577:function(e){var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,o,i,s){return(o=o||"&",i=i||"=",null===e&&(e=void 0),"object"==typeof e)?n(a(e),function(a){var s=encodeURIComponent(t(a))+i;return r(e[a])?n(e[a],function(e){return s+encodeURIComponent(t(e))}).join(o):s+encodeURIComponent(t(e[a]))}).join(o):s?encodeURIComponent(t(s))+i+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}},i=!0;try{r[e](o,o.exports,a),i=!1}finally{i&&delete n[e]}return o.exports}a.ab=t+"/";var o={};!function(){var e=o;e.decode=e.parse=a(815),e.encode=e.stringify=a(577)}(),e.exports=o}()},8783:function(module,__unused_webpack_exports,__webpack_require__){var Buffer=__webpack_require__(1876).Buffer,process=__webpack_require__(4155);!function(e,t){module.exports=t()}(0,function(){return(()=>{var __webpack_modules__=[,(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})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PageViewport=t.PDFDateString=t.LinkTarget=t.DOMStandardFontDataFactory=t.DOMSVGFactory=t.DOMCanvasFactory=t.DOMCMapReaderFactory=void 0,t.addLinkAttributes=L,t.deprecated=G,t.getFilenameFromUrl=B,t.getPdfFilenameFromUrl=U,t.getXfaPageViewport=H,t.isDataScheme=D,t.isPdfFile=N,t.isValidFetchUrl=W,t.loadScript=z;var a,o=u(r(2)),i=r(4),s=r(135);
1function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,a)}function h(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){d(o,n,a,i,s,"next",e)}function s(e){d(o,n,a,i,s,"throw",e)}i(void 0)})}}function p(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),e}function m(e,t){if("function"!=typeof t&&null!==t)throw 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&&g(e,t)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=A();return function(){var r,n=k(e);return r=t?Reflect.construct(n,arguments,k(this).constructor):n.apply(this,arguments),_(this,r)}}function _(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return S(e)}function S(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w="noopener noreferrer nofollow",x="http://www.w3.org/2000/svg",C={CSS:96,PDF:72,get PDF_TO_CSS_UNITS(){return(0,i.shadow)(this,"PDF_TO_CSS_UNITS",this.CSS/this.PDF)}};t.PixelsPerInch=C;var P=function(e){m(r,e);var t=b(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n.ownerDocument,o=void 0===a?globalThis.document:a;return p(this,r),(e=t.call(this))._document=o,e}return y(r,[{key:"_createCanvas",value:function(e,t){var r=this._document.createElement("canvas");return r.width=e,r.height=t,r}}]),r}(s.BaseCanvasFactory);function T(e){return R.apply(this,arguments)}function R(){return(R=h(o.default.mark(function e(t){var r,n,a=arguments;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.length>1&&void 0!==a[1]&&a[1],!W(t,document.baseURI)){e.next=21;break}return e.next=4,fetch(t);case 4:if((n=e.sent).ok){e.next=7;break}throw Error(n.statusText);case 7:if(!r){e.next=15;break}return e.t1=Uint8Array,e.next=11,n.arrayBuffer();case 11:e.t2=e.sent,e.t0=new e.t1(e.t2),e.next=20;break;case 15:return e.t3=i.stringToBytes,e.next=18,n.text();case 18:e.t4=e.sent,e.t0=(0,e.t3)(e.t4);case 20:return e.abrupt("return",e.t0);case 21:return e.abrupt("return",new Promise(function(e,n){var a=new XMLHttpRequest;a.open("GET",t,!0),r&&(a.responseType="arraybuffer"),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){if(200===a.status||0===a.status){var t;if(r&&a.response?t=new Uint8Array(a.response):!r&&a.responseText&&(t=(0,i.stringToBytes)(a.responseText)),t){e(t);return}}n(Error(a.statusText))}},a.send(null)}));case 22:case"end":return e.stop()}},e)}))).apply(this,arguments)}t.DOMCanvasFactory=P;var E=function(e){m(r,e);var t=b(r);function r(){return p(this,r),t.apply(this,arguments)}return y(r,[{key:"_fetchData",value:function(e,t){return T(e,this.isCompressed).then(function(e){return{cMapData:e,compressionType:t}})}}]),r}(s.BaseCMapReaderFactory);t.DOMCMapReaderFactory=E;var O=function(e){m(r,e);var t=b(r);function r(){return p(this,r),t.apply(this,arguments)}return y(r,[{key:"_fetchData",value:function(e){return T(e,!0)}}]),r}(s.BaseStandardFontDataFactory);t.DOMStandardFontDataFactory=O;var F=function(e){m(r,e);var t=b(r);function r(){return p(this,r),t.apply(this,arguments)}return y(r,[{key:"_createSVG",value:function(e){return document.createElementNS(x,e)}}]),r}(s.BaseSVGFactory);t.DOMSVGFactory=F;var M=function(){function e(t){var r,n,a,o,i,s,u,l,c=t.viewBox,f=t.scale,d=t.rotation,h=t.offsetX,v=void 0===h?0:h,y=t.offsetY,m=void 0===y?0:y,g=t.dontFlip,b=void 0!==g&&g;p(this,e),this.viewBox=c,this.scale=f,this.rotation=d,this.offsetX=v,this.offsetY=m;var _=(c[2]+c[0])/2,S=(c[3]+c[1])/2;switch((d%=360)<0&&(d+=360),d){case 180:r=-1,n=0,a=0,o=1;break;case 90:r=0,n=1,a=1,o=0;break;case 270:r=0,n=-1,a=-1,o=0;break;case 0:r=1,n=0,a=0,o=-1;break;default:throw Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}b&&(a=-a,o=-o),0===r?(i=Math.abs(S-c[1])*f+v,s=Math.abs(_-c[0])*f+m,u=Math.abs(c[3]-c[1])*f,l=Math.abs(c[2]-c[0])*f):(i=Math.abs(_-c[0])*f+v,s=Math.abs(S-c[1])*f+m,u=Math.abs(c[2]-c[0])*f,l=Math.abs(c[3]-c[1])*f),this.transform=[r*f,n*f,a*f,o*f,i-r*f*_-a*f*S,s-n*f*_-o*f*S],this.width=u,this.height=l}return y(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,a=t.rotation,o=void 0===a?this.rotation:a,i=t.offsetX,s=void 0===i?this.offsetX:i,u=t.offsetY,l=void 0===u?this.offsetY:u,c=t.dontFlip,f=void 0!==c&&c;return new e({viewBox:this.viewBox.slice(),scale:n,rotation:o,offsetX:s,offsetY:l,dontFlip:f})}},{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=M;var I=function(e){m(r,e);var t=b(r);function r(e,n){var a;return p(this,r),(a=t.call(this,e,"RenderingCancelledException")).type=n,a}return r}(i.BaseException);t.RenderingCancelledException=I;var j={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 j.NONE:break;case j.SELF:l="_self";break;case j.BLANK:l="_blank";break;case j.PARENT:l="_parent";break;case j.TOP:l="_top"}e.target=l,e.rel="string"==typeof a?a:w}function D(e){for(var t=e.length,r=0;r<t&&""===e[r].trim();)r++;return"data:"===e.substring(r,r+5).toLowerCase()}function N(e){return"string"==typeof e&&/\.pdf$/i.test(e)}function B(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)}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof e)return t;if(D(e))return(0,i.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;var r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e),a=r.exec(n[1])||r.exec(n[2])||r.exec(n[3]);if(a&&(a=a[0]).includes("%"))try{a=r.exec(decodeURIComponent(a))[0]}catch(e){}return a||t}t.LinkTarget=j;var q=function(){function e(){p(this,e),this.started=Object.create(null),this.times=[]}return y(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=l(this.times);try{for(n.s();!(e=n.n()).done;){var a=e.value.name;a.length>r&&(r=a.length)}}catch(e){n.e(e)}finally{n.f()}var o,i=l(this.times);try{for(i.s();!(o=i.n()).done;){var s=o.value,u=s.end-s.start;t.push("".concat(s.name.padEnd(r)," ").concat(u,"ms\n"))}}catch(e){i.e(e)}finally{i.f()}return t.join("")}}]),e}();function W(e,t){try{var r=(t?new URL(e,t):new URL(e)).protocol;return"http:"===r||"https:"===r}catch(e){return!1}}function z(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(r,n){var a=document.createElement("script");a.src=e,a.onload=function(e){t&&a.remove(),r(e)},a.onerror=function(){n(Error("Cannot load script at: ".concat(a.src)))},(document.head||document.documentElement).appendChild(a)})}function G(e){console.log("Deprecated API usage: "+e)}t.StatTimer=q;var V=function(){function e(){p(this,e)}return y(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,i.isString)(e))return null;a||(a=RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=a.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 o=parseInt(t[3],10);o=o>=1&&o<=31?o:1;var s=parseInt(t[4],10);s=s>=0&&s<=23?s:0;var u=parseInt(t[5],10);u=u>=0&&u<=59?u:0;var l=parseInt(t[6],10);l=l>=0&&l<=59?l:0;var c=t[7]||"Z",f=parseInt(t[8],10);f=f>=0&&f<=23?f:0;var d=parseInt(t[9],10)||0;return d=d>=0&&d<=59?d:0,"-"===c?(s+=f,u+=d):"+"===c&&(s-=f,u-=d),new Date(Date.UTC(r,n,o,s,u,l))}}]),e}();function H(e,t){var r=t.scale,n=void 0===r?1:r,a=t.rotation,o=void 0===a?0:a,i=e.attributes.style,s=i.width,u=i.height;return new M({viewBox:[0,0,parseInt(s),parseInt(u)],scale:n,rotation:o})}t.PDFDateString=V},(e,t,r)=>{"use strict";e.exports=r(3)},(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})(e)}e=r.nmd(e);var a=function(e){var t,r=Object.prototype,a=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}
1try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=Object.create((t&&t.prototype instanceof m?t:m).prototype),o=new E(n||[]);return a._invoke=C(e,r,o),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function m(){}function g(){}function b(){}var _={};l(_,i,function(){return this});var S=Object.getPrototypeOf,A=S&&S(S(O([])));A&&A!==r&&a.call(A,i)&&(_=A);var k=b.prototype=m.prototype=Object.create(_);function w(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function x(e,t){var r;function o(r,i,s,u){var l=f(e[r],e,i);if("throw"===l.type)u(l.arg);else{var c=l.arg,d=c.value;return d&&"object"===n(d)&&a.call(d,"__await")?t.resolve(d.__await).then(function(e){o("next",e,s,u)},function(e){o("throw",e,s,u)}):t.resolve(d).then(function(e){c.value=e,s(c)},function(e){return o("throw",e,s,u)})}}function i(e,n){function a(){return new t(function(t,r){o(e,n,t,r)})}return r=r?r.then(a,a):a()}this._invoke=i}function C(e,t,r){var n=d;return function(a,o){if(n===p)throw Error("Generator is already running");if(n===v){if("throw"===a)throw o;return F()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var s=P(i,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=f(e,t,r);if("normal"===u.type){if(n=r.done?v:h,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=v,r.method="throw",r.arg=u.arg)}}}function P(e,r){var n=e.iterator[r.method];if(t===n){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method))return y;r.method="throw",r.arg=TypeError("The iterator does not provide a 'throw' method")}return y}var a=f(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,y)}function T(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 R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function O(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function r(){for(;++n<e.length;)if(a.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}return{next:F}}function F(){return{value:t,done:!0}}return g.prototype=b,l(k,"constructor",b),l(b,"constructor",g),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,u,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},w(x.prototype),l(x.prototype,s,function(){return this}),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(c(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then(function(e){return e.done?e.value:i.next()})},w(k),l(k,u,"Generator"),l(k,i,function(){return this}),l(k,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;
1var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else if(l){if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else throw Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return(i.type=e,i.arg=t,o)?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),y}},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 a=n.arg;R(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}("object"===n(e)?e.exports:{});try{regeneratorRuntime=a}catch(e){("undefined"==typeof globalThis?"undefined":n(globalThis))==="object"?globalThis.regeneratorRuntime=a:Function("r","regeneratorRuntime = r")(a)}},(e,t,r)=>{"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function o(e){return u(e)||s(e)||p(e)||i()}function i(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function u(e){if(Array.isArray(e))return v(e)}function l(e,t){return d(e)||f(e,t)||p(e,t)||c()}function c(){throw 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){var r,n,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(r=a.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw n}}return o}}function d(e){if(Array.isArray(e))return e}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function p(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(e,t)}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e){return(y="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})(e)}function m(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function g(e,t){if("function"!=typeof t&&null!==t)throw 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&&b(e,t)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=k();return function(){var r,n=w(e);return r=t?Reflect.construct(n,arguments,w(this).constructor):n.apply(this,arguments),S(this,r)}}function S(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}
1function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.UNSUPPORTED_FEATURES=t.TextRenderingMode=t.StreamType=t.RenderingIntentFlag=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.IsLittleEndianCached=t.IsEvalSupportedCached=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FontType=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMode=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.arrayByteLength=e_,t.arraysToBytes=eS,t.assert=er,t.bytesToString=eg,t.createObjectURL=eV,t.createPromiseCapability=eG,t.createValidAbsoluteUrl=eo,t.escapeString=eM,t.getModificationDate=ez,t.getVerbosityLevel=J,t.info=$,t.isArrayBuffer=eq,t.isArrayEqual=eW,t.isAscii=eI,t.isBool=eN,t.isNum=eB,t.isSameOrigin=en,t.isString=eU,t.objectFromMap=ew,t.objectSize=ek,t.removeNullCharacters=em,t.setVerbosityLevel=Q,t.shadow=ei,t.string32=eA,t.stringToBytes=eb,t.stringToPDFString=eF,t.stringToUTF16BEString=ej,t.stringToUTF8String=eL,t.unreachable=et,t.utf8StringToString=eD,t.warn=ee,r(5);var x=[1,0,0,1,0,0];t.IDENTITY_MATRIX=x;var C=[.001,0,0,.001,0,0];t.FONT_IDENTITY_MATRIX=C;var P={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};t.RenderingIntentFlag=P;var T={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};t.AnnotationMode=T;var R={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};t.PermissionFlag=R;var E={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};t.TextRenderingMode=E;var O={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};t.ImageKind=O;var F={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};t.AnnotationType=F;var M={MARKED:"Marked",REVIEW:"Review"};t.AnnotationStateModelType=M;var I={MARKED:"Marked",UNMARKED:"Unmarked"};t.AnnotationMarkedState=I;var j={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};t.AnnotationReviewState=j;var L={GROUP:"Group",REPLY:"R"};t.AnnotationReplyType=L;var D={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};t.AnnotationFlag=D;var N={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};t.AnnotationFieldFlag=N;var B={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};t.AnnotationBorderStyleType=B;var U={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};t.AnnotationActionEventType=U;var q={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};t.DocumentActionEventType=q;var W={O:"PageOpen",C:"PageClose"};t.PageActionEventType=W;var z={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};t.StreamType=z;var G={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};t.FontType=G;var V={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=V;var H={NONE:0,BINARY:1,STREAM:2};t.CMapCompressionType=H;
1var X={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};t.OPS=X;var Y={unknown:"unknown",forms:"forms",javaScript:"javaScript",signatures:"signatures",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontBuildPath:"errorFontBuildPath",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent",errorContentSubStream:"errorContentSubStream"};t.UNSUPPORTED_FEATURES=Y;var Z={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};t.PasswordResponses=Z;var K=V.WARNINGS;function Q(e){Number.isInteger(e)&&(K=e)}function J(){return K}function $(e){K>=V.INFOS&&console.log("Info: ".concat(e))}function ee(e){K>=V.WARNINGS&&console.log("Warning: ".concat(e))}function et(e){throw Error(e)}function er(e,t){e||et(t)}function en(e,t){try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}var r,n=new URL(t,r);return r.origin===n.origin}function ea(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function eo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;try{if(r&&"string"==typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){var n=e.match(/\./g);n&&n.length>=2&&(e="http://".concat(e))}if(r.tryConvertEncoding)try{e=eL(e)}catch(e){}}var a=t?new URL(e,t):new URL(e);if(ea(a))return a}catch(e){}return null}function ei(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var es=function(){function e(t,r){this.constructor===e&&et("Cannot initialize BaseException."),this.message=t,this.name=r}return e.prototype=Error(),e.constructor=e,e}();t.BaseException=es;var eu=function(e){g(r,e);var t=_(r);function r(e,n){var a;return m(this,r),(a=t.call(this,e,"PasswordException")).code=n,a}return r}(es);t.PasswordException=eu;var el=function(e){g(r,e);var t=_(r);function r(e,n){var a;return m(this,r),(a=t.call(this,e,"UnknownErrorException")).details=n,a}return r}(es);t.UnknownErrorException=el;var ec=function(e){g(r,e);var t=_(r);function r(e){return m(this,r),t.call(this,e,"InvalidPDFException")}return r}(es);t.InvalidPDFException=ec;var ef=function(e){g(r,e);var t=_(r);function r(e){return m(this,r),t.call(this,e,"MissingPDFException")}return r}(es);t.MissingPDFException=ef;var ed=function(e){g(r,e);var t=_(r);function r(e,n){var a;return m(this,r),(a=t.call(this,e,"UnexpectedResponseException")).status=n,a}return r}(es);t.UnexpectedResponseException=ed;var eh=function(e){g(r,e);var t=_(r);function r(e){return m(this,r),t.call(this,e,"FormatError")}return r}(es);t.FormatError=eh;var ep=function(e){g(r,e);var t=_(r);function r(e){return m(this,r),t.call(this,e,"AbortException")}return r}(es);t.AbortException=ep;var ev=/\x00+/g,ey=/[\x01-\x1F]/g;function em(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"!=typeof e?(ee("The argument for removeNullCharacters must be a string."),e):(t&&(e=e.replace(ey," ")),e.replace(ev,""))}function eg(e){er(null!==e&&"object"===y(e)&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length,r=8192;if(t<8192)return String.fromCharCode.apply(null,e);for(var n=[],a=0;a<t;a+=r){var o=Math.min(a+r,t),i=e.subarray(a,o);n.push(String.fromCharCode.apply(null,i))}return n.join("")}function eb(e){er("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function e_(e){return void 0!==e.length?e.length:(er(void 0!==e.byteLength,"arrayByteLength - invalid argument."),e.byteLength)}function eS(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var r=0,n=0;n<t;n++)r+=e_(e[n]);for(var a=0,o=new Uint8Array(r),i=0;i<t;i++){var s=e[i];s instanceof Uint8Array||(s="string"==typeof s?eb(s):new Uint8Array(s));var u=s.byteLength;o.set(s,a),a+=u}return o}function eA(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function ek(e){return Object.keys(e).length}function ew(e){var t,r=Object.create(null),n=h(e);try{for(n.s();!(t=n.n()).done;){var a=l(t.value,2),o=a[0],i=a[1];r[o]=i}}catch(e){n.e(e)}finally{n.f()}return r}function ex(){var e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}var eC={get value(){return ei(this,"value",ex())}};function eP(){try{return Function(""),!0}catch(e){return!1}}t.IsLittleEndianCached=eC;var eT={get value(){return ei(this,"value",eP())}};t.IsEvalSupportedCached=eT;var eR=o(Array(256).keys()).map(function(e){return e.toString(16).padStart(2,"0")}),eE=function(){function e(){m(this,e)}return a(e,null,[{key:"makeHexColor",value:function(e,t,r){return"#".concat(eR[e]).concat(eR[t]).concat(eR[r])}},{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){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(t,r){var n=e.applyTransform(t,r),a=e.applyTransform(t.slice(2,4),r),o=e.applyTransform([t[0],t[3]],r),i=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],a[0],o[0],i[0]),Math.min(n[1],a[1],o[1],i[1]),Math.max(n[0],a[0],o[0],i[0]),Math.max(n[1],a[1],o[1],i[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],a=e[2]*t[0]+e[3]*t[2],o=e[2]*t[1]+e[3]*t[3],i=(r+o)/2,s=Math.sqrt(Math.pow(r+o,2)-4*(r*o-a
1*n))/2;return[Math.sqrt(i+s||1),Math.sqrt(i-s||1)]}},{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 a=[t[0],t[2],r[0],r[2]].sort(n),o=[t[1],t[3],r[1],r[3]].sort(n),i=[];return(t=e.normalizeRect(t),r=e.normalizeRect(r),(a[0]!==t[0]||a[1]!==r[0])&&(a[0]!==r[0]||a[1]!==t[0]))?null:(i[0]=a[1],i[2]=a[2],(o[0]!==t[1]||o[1]!==r[1])&&(o[0]!==r[1]||o[1]!==t[1]))?null:(i[1]=o[1],i[3]=o[2],i)}},{key:"bezierBoundingBox",value:function(e,t,r,n,a,i,s,u){for(var l=[],c=[[],[]],f=0;f<2;++f){if(0===f?(h=6*e-12*r+6*a,d=-3*e+9*r-9*a+3*s,p=3*r-3*e):(h=6*t-12*n+6*i,d=-3*t+9*n-9*i+3*u,p=3*n-3*t),1e-12>Math.abs(d)){if(1e-12>Math.abs(h))continue;0<(v=-p/h)&&v<1&&l.push(v);continue}b=Math.sqrt(g=h*h-4*p*d),!(g<0)&&(0<(y=(-h+b)/(2*d))&&y<1&&l.push(y),0<(m=(-h-b)/(2*d))&&m<1&&l.push(m))}for(var d,h,p,v,y,m,g,b,_,S=l.length,A=S;S--;)_=1-(v=l[S]),c[0][S]=_*_*_*e+3*_*_*v*r+3*_*v*v*a+v*v*v*s,c[1][S]=_*_*_*t+3*_*_*v*n+3*_*v*v*i+v*v*v*u;return c[0][A]=e,c[1][A]=t,c[0][A+1]=s,c[1][A+1]=u,c[0].length=c[1].length=A+2,[Math.min.apply(Math,o(c[0])),Math.min.apply(Math,o(c[1])),Math.max.apply(Math,o(c[0])),Math.max.apply(Math,o(c[1]))]}}]),e}();t.Util=eE;var eO=[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 eF(e){var t=e.length,r=[];if("\xfe"===e[0]&&"\xff"===e[1])for(var n=2;n<t;n+=2)r.push(String.fromCharCode(e.charCodeAt(n)<<8|e.charCodeAt(n+1)));else if("\xff"===e[0]&&"\xfe"===e[1])for(var a=2;a<t;a+=2)r.push(String.fromCharCode(e.charCodeAt(a+1)<<8|e.charCodeAt(a)));else for(var o=0;o<t;++o){var i=eO[e.charCodeAt(o)];r.push(i?String.fromCharCode(i):e.charAt(o))}return r.join("")}function eM(e){return e.replace(/([()\\\n\r])/g,function(e){return"\n"===e?"\\n":"\r"===e?"\\r":"\\".concat(e)})}function eI(e){return/^[\x00-\x7F]*$/.test(e)}function ej(e){for(var t=["\xfe\xff"],r=0,n=e.length;r<n;r++){var a=e.charCodeAt(r);t.push(String.fromCharCode(a>>8&255),String.fromCharCode(255&a))}return t.join("")}function eL(e){return decodeURIComponent(escape(e))}function eD(e){return unescape(encodeURIComponent(e))}function eN(e){return"boolean"==typeof e}function eB(e){return"number"==typeof e}function eU(e){return"string"==typeof e}function eq(e){return"object"===y(e)&&null!==e&&void 0!==e.byteLength}function eW(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function ez(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")}function eG(){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}function eV(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&"undefined"!=typeof Blob&&!r)return URL.createObjectURL(new Blob([e],{type:t}));for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a="data:".concat(t,";base64,"),o=0,i=e.length;o<i;o+=3){var s=255&e[o],u=255&e[o+1],l=255&e[o+2],c=s>>2,f=(3&s)<<4|u>>4,d=o+1<i?(15&u)<<2|l>>6:64,h=o+2<i?63&l:64;a+=n[c]+n[f]+n[d]+n[h]}return a}},(e,t,r)=>{"use strict";var n=r(6);"undefined"!=typeof globalThis&&globalThis._pdfjsCompatibilityChecked||(("undefined"==typeof globalThis||globalThis.Math!==Math)&&(globalThis=r(7)),globalThis._pdfjsCompatibilityChecked=!0,function(){!globalThis.btoa&&n.isNodeJS&&(globalThis.btoa=function(e){return Buffer.from(e,"binary").toString("base64")})}(),function(){!globalThis.atob&&n.isNodeJS&&(globalThis.atob=function(e){return Buffer.from(e,"base64").toString("binary")})}(),function(){!globalThis.DOMMatrix&&n.isNodeJS&&(globalThis.DOMMatrix=r(69))}(),function(){Object.fromEntries||r(70)}(),function(){globalThis.Promise.allSettled||(globalThis.Promise=r(97))}(),function(){!globalThis.ReadableStream&&n.isNodeJS&&(globalThis.ReadableStream=r(134).ReadableStream)}())},(e,t)=>{"use strict";function r(e){return(r="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})(e)}
1Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;var n=(void 0===process?"undefined":r(process))==="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=n},(e,t,r)=>{r(8),e.exports=r(10)},(e,t,r)=>{r(9)({global:!0},{globalThis:r(10)})},(e,t,r)=>{var n=r(10),a=r(11).f,o=r(47),i=r(50),s=r(41),u=r(57),l=r(68);e.exports=function(e,t){var r,c,f,d,h,p=e.target,v=e.global,y=e.stat;if(r=v?n:y?n[p]||s(p,{}):(n[p]||{}).prototype)for(c in t){if(d=t[c],f=e.noTargetGet?(h=a(r,c))&&h.value:r[c],!l(v?c:p+(y?".":"#")+c,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;u(d,f)}(e.sham||f&&f.sham)&&o(d,"sham",!0),i(r,c,d,e)}}},e=>{var t=function(e){return e&&e.Math==Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof __webpack_require__.g&&__webpack_require__.g)||function(){return this}()||Function("return this")()},(e,t,r)=>{var n=r(12),a=r(14),o=r(15),i=r(16),s=r(17),u=r(22),l=r(42),c=r(45),f=Object.getOwnPropertyDescriptor;t.f=n?f:function(e,t){if(e=s(e),t=u(t),c)try{return f(e,t)}catch(e){}if(l(e,t))return i(!a(o.f,e,t),e[t])}},(e,t,r)=>{var n=r(13);e.exports=!n(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},e=>{var t=Function.prototype.call;e.exports=t.bind?t.bind(t):function(){return t.apply(t,arguments)}},(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,a=n&&!r.call({1:2},1);t.f=a?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,r)=>{var n=r(18),a=r(21);e.exports=function(e){return n(a(e))}},(e,t,r)=>{var n=r(10),a=r(19),o=r(13),i=r(20),s=n.Object,u=a("".split);e.exports=o(function(){return!s("z").propertyIsEnumerable(0)})?function(e){return"String"==i(e)?u(e,""):s(e)}:s},e=>{var t=Function.prototype,r=t.bind,n=t.call,a=r&&r.bind(n);e.exports=r?function(e){return e&&a(n,e)}:function(e){return e&&function(){return n.apply(e,arguments)}}},(e,t,r)=>{var n=r(19),a=n({}.toString),o=n("".slice);e.exports=function(e){return o(a(e),8,-1)}},(e,t,r)=>{var n=r(10).TypeError;e.exports=function(e){if(void 0==e)throw n("Can't call method on "+e);return e}},(e,t,r)=>{var n=r(23),a=r(26);e.exports=function(e){var t=n(e,"string");return a(t)?t:t+""}},(e,t,r)=>{var n=r(10),a=r(14),o=r(24),i=r(26),s=r(33),u=r(36),l=r(37),c=n.TypeError,f=l("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var r,n=s(e,f);if(n){if(void 0===t&&(t="default"),!o(r=a(n,e,t))||i(r))return r;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),u(e,t)}},(e,t,r)=>{var n=r(25);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},e=>{e.exports=function(e){return"function"==typeof e}},(e,t,r)=>{var n=r(10),a=r(27),o=r(25),i=r(28),s=r(29),u=n.Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=a("Symbol");return o(t)&&i(t.prototype,u(e))}},(e,t,r)=>{var n=r(10),a=r(25),o=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(n[e]):n[e]&&n[e][t]}},(e,t,r)=>{var n=r(19);e.exports=n({}.isPrototypeOf)},(e,t,r)=>{var n=r(30);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,r)=>{var n=r(31),a=r(13);e.exports=!!Object.getOwnPropertySymbols&&!a(function(){var e=Symbol();return!String(e)||!(Object(e) instanceof Symbol)||!Symbol.sham&&n&&n<41})},(e,t,r)=>{var n,a,o=r(10),i=r(32),s=o.process,u=o.Deno,l=s&&s.versions||u&&u.version,c=l&&l.v8;c&&(a=(n=c.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!a&&i&&(!(n=i.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=i.match(/Chrome\/(\d+)/))&&(a=+n[1]),e.exports=a},(e,t,r)=>{var n=r(27);e.exports=n("navigator","userAgent")||""},(e,t,r)=>{var n=r(34);e.exports=function(e,t){var r=e[t];return null==r?void 0:n(r)}},(e,t,r)=>{var n=r(10),a=r(25),o=r(35),i=n.TypeError;e.exports=function(e){if(a(e))return e;throw i(o(e)+" is not a function")}},(e,t,r)=>{var n=r(10).String;e.exports=function(e){try{return n(e)}catch(e){return"Object"}}},(e,t,r)=>{var n=r(10),a=r(14),o=r(25),i=r(24),s=n.TypeError;e.exports=function(e,t){var r,n;if("string"===t&&o(r=e.toString)&&!i(n=a(r,e))||o(r=e.valueOf)&&!i(n=a(r,e))||"string"!==t&&o(r=e.toString)&&!i(n=a(r,e)))return n;throw s("Can't convert object to primitive value")}},(e,t,r)=>{var n=r(10),a=r(38),o=r(42),i=r(44),s=r(30),u=r(29),l=a("wks"),c=n.Symbol,f=c&&c.for,d=u?c:c&&c.withoutSetter||i;e.exports=function(e){if(!o(l,e)||!(s||"string"==typeof l[e])){var t="Symbol."+e;s&&o(c,e)?l[e]=c[e]:u&&f?l[e]=f(t):l[e]=d(t)}return l[e]}},(e,t,r)=>{var n=r(39),a=r(40);(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:n?"pure":"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})},e=>{e.exports=!1},(e,t,r)=>{var n=r(10),a=r(41),o="__core-js_shared__",i=n[o]||a(o,{});e.exports=i},(e,t,r)=>{var n=r(10),a=Object.defineProperty;e.exports=function(e,t){try{a(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},(e,t,r)=>{var n=r(19),a=r(43),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(a(e),t)}},(e,t,r)=>{var n=r(10),a=r(21),o=n.Object;e.exports=function(e){return o(a(e))}},(e,t,r)=>{var n=r(19),a=0,o=Math.random(),i=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++a+o,36)}},(e,t,r)=>{var n=r(12),a=r(13),o=r(46);e.exports=!n&&!a(function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},(e,t,r)=>{var n=r(10),a=r(24),o=n.document,i=a(o)&&a(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},(e,t,r)=>{var n=r(12),a=r(48),o=r(16);e.exports=n?function(e,t,r){return a.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},(e,t,r)=>{var n=r(10),a=r(12),o=r(45),i=r(49),s=r(22),u=n.TypeError,l=Object.defineProperty;t.f=a?l:function(e,t,r){if(i(e),t=s(t),i(r),o)try{return l(e,t,r)}catch(e){}if("get"in r||"set"in r)throw u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},(e,t,r)=>
1{var n=r(10),a=r(24),o=n.String,i=n.TypeError;e.exports=function(e){if(a(e))return e;throw i(o(e)+" is not an object")}},(e,t,r)=>{var n=r(10),a=r(25),o=r(42),i=r(47),s=r(41),u=r(51),l=r(52),c=r(56).CONFIGURABLE,f=l.get,d=l.enforce,h=String(String).split("String");(e.exports=function(e,t,r,u){var l,f=!!u&&!!u.unsafe,p=!!u&&!!u.enumerable,v=!!u&&!!u.noTargetGet,y=u&&void 0!==u.name?u.name:t;if(a(r)&&("Symbol("===String(y).slice(0,7)&&(y="["+String(y).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(r,"name")||c&&r.name!==y)&&i(r,"name",y),(l=d(r)).source||(l.source=h.join("string"==typeof y?y:""))),e===n){p?e[t]=r:s(t,r);return}f?!v&&e[t]&&(p=!0):delete e[t],p?e[t]=r:i(e,t,r)})(Function.prototype,"toString",function(){return a(this)&&f(this).source||u(this)})},(e,t,r)=>{var n=r(19),a=r(25),o=r(40),i=n(Function.toString);a(o.inspectSource)||(o.inspectSource=function(e){return i(e)}),e.exports=o.inspectSource},(e,t,r)=>{var n,a,o,i=r(53),s=r(10),u=r(19),l=r(24),c=r(47),f=r(42),d=r(40),h=r(54),p=r(55),v="Object already 
1initialized",y=s.TypeError,m=s.WeakMap,g=function(e){return o(e)?a(e):n(e,{})},b=function(e){return function(t){var r;if(!l(t)||(r=a(t)).type!==e)throw y("Incompatible receiver, "+e+" required");return r}};if(i||d.state){var _=d.state||(d.state=new m),S=u(_.get),A=u(_.has),k=u(_.set);n=function(e,t){if(A(_,e))throw new y(v);return t.facade=e,k(_,e,t),t},a=function(e){return S(_,e)||{}},o=function(e){return A(_,e)}}else{var w=h("state");p[w]=!0,n=function(e,t){if(f(e,w))throw new y(v);return t.facade=e,c(e,w,t),t},a=function(e){return f(e,w)?e[w]:{}},o=function(e){return f(e,w)}}e.exports={set:n,get:a,has:o,enforce:g,getterFor:b}},(e,t,r)=>{var n=r(10),a=r(25),o=r(51),i=n.WeakMap;e.exports=a(i)&&/native code/.test(o(i))},(e,t,r)=>{var n=r(38),a=r(44),o=n("keys");e.exports=function(e){return o[e]||(o[e]=a(e))}},e=>{e.exports={}},(e,t,r)=>{var n=r(12),a=r(42),o=Function.prototype,i=n&&Object.getOwnPropertyDescriptor,s=a(o,"name"),u=s&&"something"===(function(){}).name,l=s&&(!n||n&&i(o,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:l}},(e,t,r)=>{var n=r(42),a=r(58),o=r(11),i=r(48);e.exports=function(e,t){for(var r=a(t),s=i.f,u=o.f,l=0;l<r.length;l++){var c=r[l];n(e,c)||s(e,c,u(t,c))}}},(e,t,r)=>{var n=r(27),a=r(19),o=r(59),i=r(67),s=r(49),u=a([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(s(e)),r=i.f;return r?u(t,r(e)):t}},(e,t,r)=>{var n=r(60),a=r(66).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},(e,t,r)=>{var n=r(19),a=r(42),o=r(17),i=r(61).indexOf,s=r(55),u=n([].push);e.exports=function(e,t){var r,n=o(e),l=0,c=[];for(r in n)!a(s,r)&&a(n,r)&&u(c,r);for(;t.length>l;)a(n,r=t[l++])&&(~i(c,r)||u(c,r));return c}},(e,t,r)=>{var n=r(17),a=r(62),o=r(64),i=function(e){return function(t,r,i){var s,u=n(t),l=o(u),c=a(i,l);if(e&&r!=r){for(;l>c;)if((s=u[c++])!=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:i(!0),indexOf:i(!1)}},(e,t,r)=>{var n=r(63),a=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?a(r+t,0):o(r,t)}},e=>{var t=Math.ceil,r=Math.floor;e.exports=function(e){var n=+e;return n!=n||0===n?0:(n>0?r:t)(n)}},(e,t,r)=>{var n=r(65);e.exports=function(e){return n(e.length)}},(e,t,r)=>{var n=r(63),a=Math.min;e.exports=function(e){return e>0?a(n(e),9007199254740991):0}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,r)=>{var n=r(13),a=r(25),o=/#|\.prototype\./,i=function(e,t){var r=u[s(e)];return r==c||r!=l&&(a(t)?n(t):!!t)},s=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},u=i.data={},l=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},(e,t,r)=>{"use strict";var n,a;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})(e)}!function(i,s){"object"===o(t)?e.exports=s():void 0!==(a="function"==typeof(n=s)?n.call(t,r,t,e):n)&&(e.exports=a)}(0,function(){function e(e){var t=new f,r=Array.from(e);if(!r.every(function(e){return!Number.isNaN(e)}))throw TypeError('CSSMatrix: "'+e+'" must only have numbers.');if(16===r.length){var n=r[0],a=r[1],o=r[2],i=r[3],s=r[4],u=r[5],l=r[6],c=r[7],d=r[8],h=r[9],p=r[10],v=r[11],y=r[12],m=r[13],g=r[14],b=r[15];t.m11=n,t.a=n,t.m21=s,t.c=s,t.m31=d,t.m41=y,t.e=y,t.m12=a,t.b=a,t.m22=u,t.d=u,t.m32=h,t.m42=m,t.f=m,t.m13=o,t.m23=l,t.m33=p,t.m43=g,t.m14=i,t.m24=c,t.m34=v,t.m44=b}else if(6===r.length){var _=r[0],S=r[1],A=r[2],k=r[3],w=r[4],x=r[5];t.m11=_,t.a=_,t.m12=S,t.b=S,t.m21=A,t.c=A,t.m22=k,t.d=k,t.m41=w,t.e=w,t.m42=x,t.f=x}else throw TypeError("CSSMatrix: expecting an Array of 6/16 values.");return t}function t(t){var r=Object.keys(new f);if("object"===o(t)&&r.every(function(e){return e in t}))return e([t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.m41,t.m42,t.m43,t.m44]);throw TypeError('CSSMatrix: "'+t+'" is not a DOMMatrix / CSSMatrix / JSON compatible object.')}function r(t){if("string"!=typeof t)throw TypeError('CSSMatrix: "'+t+'" is not a string.');
1var r=String(t).replace(/\s/g,""),n=new f,a='CSSMatrix: invalid transform string "'+t+'"';return r.split(")").filter(function(e){return e}).forEach(function(t){var r=t.split("("),o=r[0],i=r[1];if(!i)throw TypeError(a);var s=i.split(",").map(function(e){return e.includes("rad")?parseFloat(e)*(180/Math.PI):parseFloat(e)}),u=s[0],l=s[1],c=s[2],f=s[3],d=[u,l,c],h=[u,l,c,f];if("perspective"===o&&u&&[l,c].every(function(e){return void 0===e}))n.m34=-1/u;else if(o.includes("matrix")&&[6,16].includes(s.length)&&s.every(function(e){return!Number.isNaN(+e)})){var p=s.map(function(e){return 1e-6>Math.abs(e)?0:e});n=n.multiply(e(p))}else if("translate3d"===o&&d.every(function(e){return!Number.isNaN(+e)}))n=n.translate(u,l,c);else if("translate"===o&&u&&void 0===c)n=n.translate(u,l||0,0);else if("rotate3d"===o&&h.every(function(e){return!Number.isNaN(+e)})&&f)n=n.rotateAxisAngle(u,l,c,f);else if("rotate"===o&&u&&[l,c].every(function(e){return void 0===e}))n=n.rotate(0,0,u);else if("scale3d"===o&&d.every(function(e){return!Number.isNaN(+e)})&&d.some(function(e){return 1!==e}))n=n.scale(u,l,c);else if("scale"!==o||Number.isNaN(u)||1===u||void 0!==c){if("skew"===o&&u&&void 0===c)n=n.skewX(u),n=l?n.skewY(l):n;else if(/[XYZ]/.test(o)&&u&&[l,c].every(function(e){return void 0===e})&&["translate","rotate","scale","skew"].some(function(e){return o.includes(e)})){if(["skewX","skewY"].includes(o))n=n[o](u);else{var v=o.replace(/[XYZ]/,""),y=["X","Y","Z"].indexOf(o.replace(v,"")),m=[0===y?u:0,1===y?u:0,2===y?u:0];n=n[v].apply(n,m)}}else throw TypeError(a)}else{var g=Number.isNaN(+l)?u:l;n=n.scale(u,g,1)}}),n}function n(e,t,r){var n=new f;return n.m41=e,n.e=e,n.m42=t,n.f=t,n.m43=r,n}function a(e,t,r){var n=new f,a=Math.PI/180,o=e*a,i=t*a,s=r*a,u=Math.cos(o),l=-Math.sin(o),c=Math.cos(i),d=-Math.sin(i),h=Math.cos(s),p=-Math.sin(s),v=c*h,y=-c*p;n.m11=v,n.a=v,n.m12=y,n.b=y,n.m13=d;var m=l*d*h+u*p;n.m21=m,n.c=m;var g=u*h-l*d*p;return n.m22=g,n.d=g,n.m23=-l*c,n.m31=l*p-u*d*h,n.m32=l*h+u*d*p,n.m33=u*c,n}function i(e,t,r,n){var a=new f,o=Math.PI/360*n,i=Math.sin(o),s=Math.cos(o),u=i*i,l=Math.sqrt(e*e+t*t+r*r),c=e,d=t,h=r;0===l?(c=0,d=0,h=1):(c/=l,d/=l,h/=l);var p=c*c,v=d*d,y=h*h,m=1-2*(v+y)*u;a.m11=m,a.a=m;var g=2*(c*d*u+h*i*s);a.m12=g,a.b=g,a.m13=2*(c*h*u-d*i*s);var b=2*(d*c*u-h*i*s);a.m21=b,a.c=b;var _=1-2*(y+p)*u;return a.m22=_,a.d=_,a.m23=2*(d*h*u+c*i*s),a.m31=2*(h*c*u+d*i*s),a.m32=2*(h*d*u-c*i*s),a.m33=1-2*(p+v)*u,a}function s(e,t,r){var n=new f;return n.m11=e,n.a=e,n.m22=t,n.d=t,n.m33=r,n}function u(e){var t=new f,r=Math.tan(e*Math.PI/180);return t.m21=r,t.c=r,t}function l(e){var t=new f,r=Math.tan(e*Math.PI/180);return t.m12=r,t.b=r,t}function c(t,r){return e([r.m11*t.m11+r.m12*t.m21+r.m13*t.m31+r.m14*t.m41,r.m11*t.m12+r.m12*t.m22+r.m13*t.m32+r.m14*t.m42,r.m11*t.m13+r.m12*t.m23+r.m13*t.m33+r.m14*t.m43,r.m11*t.m14+r.m12*t.m24+r.m13*t.m34+r.m14*t.m44,r.m21*t.m11+r.m22*t.m21+r.m23*t.m31+r.m24*t.m41,r.m21*t.m12+r.m22*t.m22+r.m23*t.m32+r.m24*t.m42,r.m21*t.m13+r.m22*t.m23+r.m23*t.m33+r.m24*t.m43,r.m21*t.m14+r.m22*t.m24+r.m23*t.m34+r.m24*t.m44,r.m31*t.m11+r.m32*t.m21+r.m33*t.m31+r.m34*t.m41,r.m31*t.m12+r.m32*t.m22+r.m33*t.m32+r.m34*t.m42,r.m31*t.m13+r.m32*t.m23+r.m33*t.m33+r.m34*t.m43,r.m31*t.m14+r.m32*t.m24+r.m33*t.m34+r.m34*t.m44,r.m41*t.m11+r.m42*t.m21+r.m43*t.m31+r.m44*t.m41,r.m41*t.m12+r.m42*t.m22+r.m43*t.m32+r.m44*t.m42,r.m41*t.m13+r.m42*t.m23+r.m43*t.m33+r.m44*t.m43,r.m41*t.m14+r.m42*t.m24+r.m43*t.m34+r.m44*t.m44])}var f=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=this;if(r.a=1,r.b=0,r.c=0,r.d=1,r.e=0,r.f=0,r.m11=1,r.m12=0,r.m13=0,r.m14=0,r.m21=0,r.m22=1,r.m23=0,r.m24=0,r.m31=0,r.m32=0,r.m33=1,r.m34=0,r.m41=0,r.m42=0,r.m43=0,r.m44=1,e&&e.length){var n=[16,6].some(function(t){return t===e.length})?e:e[0];
1return r.setMatrixValue(n)}return r},d={isIdentity:{configurable:!0},is2D:{configurable:!0}};return d.isIdentity.set=function(e){this.isIdentity=e},d.isIdentity.get=function(){var e=this;return 1===e.m11&&0===e.m12&&0===e.m13&&0===e.m14&&0===e.m21&&1===e.m22&&0===e.m23&&0===e.m24&&0===e.m31&&0===e.m32&&1===e.m33&&0===e.m34&&0===e.m41&&0===e.m42&&0===e.m43&&1===e.m44},d.is2D.get=function(){var e=this;return 0===e.m31&&0===e.m32&&1===e.m33&&0===e.m34&&0===e.m43&&1===e.m44},d.is2D.set=function(e){this.is2D=e},f.prototype.setMatrixValue=function(n){var a=this;return[Array,Float64Array,Float32Array].some(function(e){return n instanceof e})?e(n):"string"==typeof n&&n.length&&"none"!==n?r(n):"object"===o(n)?t(n):a},f.prototype.toArray=function(){var e,t=this,r=1e6;return(e=t.is2D?[t.a,t.b,t.c,t.d,t.e,t.f]:[t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.m41,t.m42,t.m43,t.m44]).map(function(e){return 1e-6>Math.abs(e)?0:(e*r>>0)/r})},f.prototype.toString=function(){var e=this,t=e.toArray();return(e.is2D?"matrix":"matrix3d")+"("+t+")"},f.prototype.toJSON=function(){var e=this,t=e.is2D,r=e.isIdentity;return Object.assign({},e,{is2D:t,isIdentity:r})},f.prototype.multiply=function(e){return c(this,e)},f.prototype.translate=function(e,t,r){var a=t,o=r;return void 0===o&&(o=0),void 0===a&&(a=0),c(this,n(e,a,o))},f.prototype.scale=function(e,t,r){var n=e,a=t,o=r;return void 0===a&&(a=e),void 0===o&&(o=1),c(this,s(n,a,o))},f.prototype.rotate=function(e,t,r){var n=e,o=t,i=r;return void 0===o&&(o=0),void 0===i&&(i=n,n=0),c(this,a(n,o,i))},f.prototype.rotateAxisAngle=function(e,t,r,n){if([e,t,r,n].some(function(e){return Number.isNaN(e)}))throw TypeError("CSSMatrix: expecting 4 values");return c(this,i(e,t,r,n))},f.prototype.skewX=function(e){return c(this,u(e))},f.prototype.skewY=function(e){return c(this,l(e))},f.prototype.transformPoint=function(e){var t=this,r=n(e.x,e.y,e.z);return r.m44=e.w||1,{x:(r=t.multiply(r)).m41,y:r.m42,z:r.m43,w:r.m44}},f.prototype.transform=function(e){var t=this,r=t.m11*e.x+t.m12*e.y+t.m13*e.z+t.m14*e.w,n=t.m21*e.x+t.m22*e.y+t.m23*e.z+t.m24*e.w,a=t.m31*e.x+t.m32*e.y+t.m33*e.z+t.m34*e.w,o=t.m41*e.x+t.m42*e.y+t.m43*e.z+t.m44*e.w;return{x:r/o,y:n/o,z:a/o,w:o}},Object.defineProperties(f.prototype,d),Object.assign(f,{Translate:n,Rotate:a,RotateAxisAngle:i,Scale:s,SkewX:u,SkewY:l,Multiply:c,fromArray:e,fromMatrix:t,fromString:r}),Object.assign(f,{Version:"0.0.24"}),f})},(e,t,r)=>{r(71),r(86);var n=r(96);e.exports=n.Object.fromEntries},(e,t,r)=>{"use strict";var n=r(17),a=r(72),o=r(77),i=r(52),s=r(78),u="Array Iterator",l=i.set,c=i.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"),o.Arguments=o.Array,a("keys"),a("values"),a("entries")},(e,t,r)=>{var n=r(37),a=r(73),o=r(48),i=n("unscopables"),s=Array.prototype;void 0==s[i]&&o.f(s,i,{configurable:!0,value:a(null)}),e.exports=function(e){s[i][e]=!0}},(e,t,r)=>{var n,a=r(49),o=r(74),i=r(66),s=r(55),u=r(76),l=r(46),c=r(54),f=">",d="<",h="prototype",p="script",v=c("IE_PROTO"),y=function(){},m=function(e){return d+p+f+e+d+"/"+p+f},g=function(e){e.write(m("")),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).open(),e.write(m("document.F=Object")),e.close(),e.F},_=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}_="undefined"!=typeof document?document.domain&&n?g(n):b():g(n);for(var e=i.length;e--;)delete _[h][i[e]];return _()};s[v]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(y[h]=a(e),r=new y,y[h]=null,r[v]=e):r=_(),void 0===t?r:o(r,t)}},(e,t,r)=>{var n=r(12),a=r(48),o=r(49),i=r(17),s=r(75);e.exports=n?Object.defineProperties:function(e,t){o(e);for(var r,n=i(t),u=s(t),l=u.length,c=0;l>c;)a.f(e,r=u[c++],n[r]);return e}},(e,t,r)=>{var n=r(60),a=r(66);e.exports=Object.keys||function(e){return n(e,a)}},(e,t,r)=>{var n=r(27);e.exports=n("document","documentElement")},e=>{e.exports={}},(e,t,r)=>{"use strict";var n=r(9),a=r(14),o=r(39),i=r(56),s=r(25),u=r(79),l=r(81),c=r(84),f=r(83),d=r(47),h=r(50),p=r(37),v=r(77),y=r(80),m=i.PROPER,g=i.CONFIGURABLE,b=y.IteratorPrototype,_=y.BUGGY_SAFARI_ITERATORS,S=p("iterator"),A="keys",k="values",w="entries",x=function(){return this};e.exports=function(e,t,r,i,p,y,C){u(r,t,i);var P,T,R,E=function(e){if(e===p&&j)return j;if(!_&&e in M)return M[e];
1switch(e){case A:case k:case w:return function(){return new r(this,e)}}return function(){return new r(this)}},O=t+" Iterator",F=!1,M=e.prototype,I=M[S]||M["@@iterator"]||p&&M[p],j=!_&&I||E(p),L="Array"==t&&M.entries||I;if(L&&(P=l(L.call(new e)))!==Object.prototype&&P.next&&(o||l(P)===b||(c?c(P,b):s(P[S])||h(P,S,x)),f(P,O,!0,!0),o&&(v[O]=x)),m&&p==k&&I&&I.name!==k&&(!o&&g?d(M,"name",k):(F=!0,j=function(){return a(I,this)})),p){if(T={values:E(k),keys:y?j:E(A),entries:E(w)},C)for(R in T)!_&&!F&&R in M||h(M,R,T[R]);else n({target:t,proto:!0,forced:_||F},T)}return(!o||C)&&M[S]!==j&&h(M,S,j,{name:p}),v[t]=j,T}},(e,t,r)=>{"use strict";var n=r(80).IteratorPrototype,a=r(73),o=r(16),i=r(83),s=r(77),u=function(){return this};e.exports=function(e,t,r,l){var c=t+" Iterator";return e.prototype=a(n,{next:o(+!l,r)}),i(e,c,!1,!0),s[c]=u,e}},(e,t,r)=>{"use strict";var n,a,o,i=r(13),s=r(25),u=r(73),l=r(81),c=r(50),f=r(37),d=r(39),h=f("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(a=l(l(o)))!==Object.prototype&&(n=a):p=!0),void 0==n||i(function(){var e={};return n[h].call(e)!==e})?n={}:d&&(n=u(n)),s(n[h])||c(n,h,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},(e,t,r)=>{var n=r(10),a=r(42),o=r(25),i=r(43),s=r(54),u=r(82),l=s("IE_PROTO"),c=n.Object,f=c.prototype;e.exports=u?c.getPrototypeOf:function(e){var t=i(e);if(a(t,l))return t[l];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof c?f:null}},(e,t,r)=>{var n=r(13);e.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},(e,t,r)=>{var n=r(48).f,a=r(42),o=r(37)("toStringTag");e.exports=function(e,t,r){e&&!a(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},(e,t,r)=>{var n=r(19),a=r(49),o=r(85);
1e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return a(r),o(n),t?e(r,n):r.__proto__=n,r}}():void 0)},(e,t,r)=>{var n=r(10),a=r(25),o=n.String,i=n.TypeError;e.exports=function(e){if("object"==typeof e||a(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},(e,t,r)=>{var n=r(9),a=r(87),o=r(95);n({target:"Object",stat:!0},{fromEntries:function(e){var t={};return a(e,function(e,r){o(t,e,r)},{AS_ENTRIES:!0}),t}})},(e,t,r)=>{var n=r(10),a=r(88),o=r(14),i=r(49),s=r(35),u=r(89),l=r(64),c=r(28),f=r(90),d=r(91),h=r(94),p=n.TypeError,v=function(e,t){this.stopped=e,this.result=t},y=v.prototype;e.exports=function(e,t,r){var n,m,g,b,_,S,A,k=r&&r.that,w=!!(r&&r.AS_ENTRIES),x=!!(r&&r.IS_ITERATOR),C=!!(r&&r.INTERRUPTED),P=a(t,k),T=function(e){return n&&h(n,"normal",e),new v(!0,e)},R=function(e){return w?(i(e),C?P(e[0],e[1],T):P(e[0],e[1])):C?P(e,T):P(e)};if(x)n=e;else{if(!(m=d(e)))throw p(s(e)+" is not iterable");if(u(m)){for(g=0,b=l(e);b>g;g++)if((_=R(e[g]))&&c(y,_))return _;return new v(!1)}n=f(e,m)}for(S=n.next;!(A=o(S,n)).done;){try{_=R(A.value)}catch(e){h(n,"throw",e)}if("object"==typeof _&&_&&c(y,_))return _}return new v(!1)}},(e,t,r)=>{var n=r(19),a=r(34),o=n(n.bind);e.exports=function(e,t){return a(e),void 0===t?e:o?o(e,t):function(){return e.apply(t,arguments)}}},(e,t,r)=>{var n=r(37),a=r(77),o=n("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||i[o]===e)}},(e,t,r)=>{var n=r(10),a=r(14),o=r(34),i=r(49),s=r(35),u=r(91),l=n.TypeError;e.exports=function(e,t){var r=arguments.length<2?u(e):t;if(o(r))return i(a(r,e));throw l(s(e)+" is not iterable")}},(e,t,r)=>{var n=r(92),a=r(33),o=r(77),i=r(37)("iterator");e.exports=function(e){if(void 0!=e)return a(e,i)||a(e,"@@iterator")||o[n(e)]}},(e,t,r)=>{var n=r(10),a=r(93),o=r(25),i=r(20),s=r(37)("toStringTag"),u=n.Object,l="Arguments"==i(function(){return arguments}()),c=function(e,t){try{return e[t]}catch(e){}};e.exports=a?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=c(t=u(e),s))?r:l?i(t):"Object"==(n=i(t))&&o(t.callee)?"Arguments":n}},(e,t,r)=>{var n=r(37)("toStringTag"),a={};a[n]="z",e.exports="[object z]"===String(a)},(e,t,r)=>{var n=r(14),a=r(49),o=r(33);e.exports=function(e,t,r){var i,s;a(e);try{if(!(i=o(e,"return"))){if("throw"===t)throw r;return r}i=n(i,e)}catch(e){s=!0,i=e}if("throw"===t)throw r;if(s)throw i;return a(i),r}},(e,t,r)=>{"use strict";var n=r(22),a=r(48),o=r(16);e.exports=function(e,t,r){var i=n(t);i in e?a.f(e,i,o(0,r)):e[i]=r}},(e,t,r)=>{var n=r(10);e.exports=n},(e,t,r)=>{r(98),r(71),r(105),r(107),r(129),r(130),r(131),r(132);var n=r(96);e.exports=n.Promise},(e,t,r)=>{"use strict";var n=r(9),a=r(10),o=r(28),i=r(81),s=r(84),u=r(57),l=r(73),c=r(47),f=r(16),d=r(99),h=r(101),p=r(87),v=r(102),y=r(37),m=r(104),g=y("toStringTag"),b=a.Error,_=[].push,S=function(e,t){var r,n=arguments.length>2?arguments[2]:void 0,a=o(A,this);s?r=s(new b(void 0),a?i(this):A):c(r=a?this:l(A),g,"Error"),c(r,"message",v(t,"")),m&&c(r,"stack",d(r.stack,1)),h(r,n);var u=[];return p(e,_,{that:u}),c(r,"errors",u),r};s?s(S,b):u(S,b);var A=S.prototype=l(b.prototype,{constructor:f(1,S),message:f(1,""),name:f(1,"AggregateError")});n({global:!0},{AggregateError:S})},(e,t,r)=>{var n=r(19),a=r(100),o=n("".replace),i=n("".split),s=n([].join),u=function(e){return String(Error(e).stack)}("zxcasd"),l=/\n\s*at [^:]*:[^\n]*/,c=l.test(u),f=/@[^\n]*\n/.test(u)&&!/zxcasd/.test(u);e.exports=function(e,t){if("string"!=typeof e)return e;if(c)for(;t--;)e=o(e,l,"");else if(f)return s(a(i(e,"\n"),t),"\n");return e}},(e,t,r)=>{var n=r(10),a=r(62),o=r(64),i=r(95),s=n.Array,u=Math.max;e.exports=function(e,t,r){for(var n=o(e),l=a(t,n),c=a(void 0===r?n:r,n),f=s(u(c-l,0)),d=0;l<c;l++,d++)i(f,d,e[l]);return f.length=d,f}},(e,t,r)=>{var n=r(24),a=r(47);e.exports=function(e,t){n(t)&&"cause"in t&&a(e,"cause",t.cause)}},(e,t,r)=>{var n=r(103);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},(e,t,r)=>
1{var n=r(10),a=r(92),o=n.String;e.exports=function(e){if("Symbol"===a(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},(e,t,r)=>{var n=r(13),a=r(16);e.exports=!n(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",a(1,7)),7!==e.stack)})},(e,t,r)=>{var n=r(93),a=r(50),o=r(106);n||a(Object.prototype,"toString",o,{unsafe:!0})},(e,t,r)=>{"use strict";var n=r(93),a=r(92);e.exports=n?({}).toString:function(){return"[object "+a(this)+"]"}},(e,t,r)=>{"use strict";var n,a,o,i,s=r(9),u=r(39),l=r(10),c=r(27),f=r(14),d=r(108),h=r(50),p=r(109),v=r(84),y=r(83),m=r(110),g=r(34),b=r(25),_=r(24),S=r(111),A=r(51),k=r(87),w=r(112),x=r(113),C=r(116).set,P=r(121),T=r(124),R=r(126),E=r(125),O=r(127),F=r(52),M=r(68),I=r(37),j=r(128),L=r(120),D=r(31),N=I("species"),B="Promise",U=F.getterFor(B),q=F.set,W=F.getterFor(B),z=d&&d.prototype,G=d,V=z,H=l.TypeError,X=l.document,Y=l.process,Z=E.f,K=Z,Q=!!(X&&X.createEvent&&l.dispatchEvent),J=b(l.PromiseRejectionEvent),$="unhandledrejection",ee="rejectionhandled",et=0,er=1,en=2,ea=1,eo=2,ei=!1,es=M(B,function(){var e=A(G),t=e!==String(G);if(!t&&66===D||u&&!V.finally)return!0;if(D>=51&&/native code/.test(e))return!1;var r=new G(function(e){e(1)}),n=function(e){e(function(){},function(){})};return(r.constructor={})[N]=n,!(ei=r.then(function(){}) instanceof n)||!t&&j&&!J}),eu=es||!w(function(e){G.all(e).catch(function(){})}),el=function(e){var t;return!!(_(e)&&b(t=e.then))&&t},ec=function(e,t){if(!e.notified){e.notified=!0;var r=e.reactions;P(function(){for(var n=e.value,a=e.state==er,o=0;r.length>o;){var i,s,u,l=r[o++],c=a?l.ok:l.fail,d=l.resolve,h=l.reject,p=l.domain;try{c?(a||(e.rejection===eo&&ep(e),e.rejection=ea),!0===c?i=n:(p&&p.enter(),i=c(n),p&&(p.exit(),u=!0)),i===l.promise?h(H("Promise-chain cycle")):(s=el(i))?f(s,i,d,h):d(i)):h(n)}catch(e){p&&!u&&p.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&ed(e)})}},ef=function(e,t,r){var n,a;Q?((n=X.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),l.dispatchEvent(n)):n={promise:t,reason:r},!J&&(a=l["on"+e])?a(n):e===$&&R("Unhandled promise rejection",r)},ed=function(e){f(C,l,function(){var t,r=e.facade,n=e.value;if(eh(e)&&(t=O(function(){L?Y.emit("unhandledRejection",n,r):ef($,r,n)}),e.rejection=L||eh(e)?eo:ea,t.error))throw t.value})},eh=function(e){return e.rejection!==ea&&!e.parent},ep=function(e){f(C,l,function(){var t=e.facade;L?Y.emit("rejectionHandled",t):ef(ee,t,e.value)})},ev=function(e,t,r){return function(n){e(t,n,r)}},ey=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=en,ec(e,!0))},em=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw H("Promise can't be resolved itself");var n=el(t);n?P(function(){var r={done:!1};try{f(n,t,ev(em,r,e),ev(ey,r,e))}catch(t){ey(r,t,e)}}):(e.value=t,e.state=er,ec(e,!1))}catch(t){ey({done:!1},t,e)}}};if(es&&(V=(G=function(e){S(this,V),g(e),f(n,this);var t=U(this);try{e(ev(em,t),ev(ey,t))}catch(e){ey(t,e)}}).prototype,(n=function(e){q(this,{type:B,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:et,value:void 0})}).prototype=p(V,{then:function(e,t){var r=W(this),n=r.reactions,a=Z(x(this,G));return a.ok=!b(e)||e,a.fail=b(t)&&t,a.domain=L?Y.domain:void 0,r.parent=!0,n[n.length]=a,r.state!=et&&ec(r,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n,t=U(e);this.promise=e,this.resolve=ev(em,t),this.reject=ev(ey,t)},E.f=Z=function(e){return e===G||e===o?new a(e):K(e)},!u&&b(d)&&z!==Object.prototype)){i=z.then,ei||(h(z,"then",function(e,t){var r=this;return new G(function(e,t){f(i,r,e,t)}).then(e,t)},{unsafe:!0}),h(z,"catch",V.catch,{unsafe:!0}));try{delete z.constructor}catch(e){}v&&v(z,V)}s({global:!0,wrap:!0,forced:es},{Promise:G}),y(G,B,!1,!0),m(B),o=c(B),s({target:B,stat:!0,forced:es},{reject:function(e){var t=Z(this);return f(t.reject,void 0,e),t.promise}}),s({target:B,stat:!0,forced:u||es},{resolve:function(e){return T(u&&this===o?G:this,e)}}),s({target:B,stat:!0,forced:eu},{all:function(e){var t=this,r=Z(t),n=r.resolve,a=r.reject,o=O(function(){var r=g(t.resolve),o=[],i=0,s=1;k(e,function(e){var u=i++,l=!1;s++,f(r,t,e).then(function(e){!l&&(l=!0,o[u]=e,--s||n(o))},a)}),--s||n(o)});return o.error&&a(o.value),r.promise}
1,race:function(e){var t=this,r=Z(t),n=r.reject,a=O(function(){var a=g(t.resolve);k(e,function(e){f(a,t,e).then(r.resolve,n)})});return a.error&&n(a.value),r.promise}})},(e,t,r)=>{var n=r(10);e.exports=n.Promise},(e,t,r)=>{var n=r(50);e.exports=function(e,t,r){for(var a in t)n(e,a,t[a],r);return e}},(e,t,r)=>{"use strict";var n=r(27),a=r(48),o=r(37),i=r(12),s=o("species");e.exports=function(e){var t=n(e),r=a.f;i&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},(e,t,r)=>{var n=r(10),a=r(28),o=n.TypeError;e.exports=function(e,t){if(a(t,e))return e;throw o("Incorrect invocation")}},(e,t,r)=>{var n=r(37)("iterator"),a=!1;try{var o=0,i={next:function(){return{done:!!o++}},return:function(){a=!0}};i[n]=function(){return this},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},(e,t,r)=>{var n=r(49),a=r(114),o=r(37)("species");e.exports=function(e,t){var r,i=n(e).constructor;return void 0===i||void 0==(r=n(i)[o])?t:a(r)}},(e,t,r)=>{var n=r(10),a=r(115),o=r(35),i=n.TypeError;e.exports=function(e){if(a(e))return e;throw i(o(e)+" is not a constructor")}},(e,t,r)=>{var n=r(19),a=r(13),o=r(25),i=r(92),s=r(27),u=r(51),l=function(){},c=[],f=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,h=n(d.exec),p=!d.exec(l),v=function(e){if(!o(e))return!1;try{return f(l,c,e),!0}catch(e){return!1}},y=function(e){if(!o(e))return!1;switch(i(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return p||!!h(d,u(e))};e.exports=!f||a(function(){var e;return v(v.call)||!v(Object)||!v(function(){e=!0})||e})?y:v},(e,t,r)=>{var n,a,o,i,s=r(10),u=r(117),l=r(88),c=r(25),f=r(42),d=r(13),h=r(76),p=r(118),v=r(46),y=r(119),m=r(120),g=s.setImmediate,b=s.clearImmediate,_=s.process,S=s.Dispatch,A=s.Function,k=s.MessageChannel,w=s.String,x=0,C={},P="onreadystatechange";try{n=s.location}catch(e){}var T=function(e){if(f(C,e)){var t=C[e];delete C[e],t()}},R=function(e){return function(){T(e)}},E=function(e){T(e.data)},O=function(e){s.postMessage(w(e),n.protocol+"//"+n.host)};g&&b||(g=function(e){var t=p(arguments,1);return C[++x]=function(){u(c(e)?e:A(e),void 0,t)},a(x),x},b=function(e){delete C[e]},m?a=function(e){_.nextTick(R(e))}:S&&S.now?a=function(e){S.now(R(e))}:k&&!y?(i=(o=new k).port2,o.port1.onmessage=E,a=l(i.postMessage,i)):s.addEventListener&&c(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!d(O)?(a=O,s.addEventListener("message",E,!1)):a=P in v("script")?function(e){h.appendChild(v("script"))[P]=function(){h.removeChild(this),T(e)}}:function(e){setTimeout(R(e),0)}),e.exports={set:g,clear:b}},e=>{var t=Function.prototype,r=t.apply,n=t.bind,a=t.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(r):function(){return a.apply(r,arguments)})},(e,t,r)=>{var n=r(19);e.exports=n([].slice)},(e,t,r)=>{var n=r(32);
1e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},(e,t,r)=>{var n=r(20),a=r(10);e.exports="process"==n(a.process)},(e,t,r)=>{var n,a,o,i,s,u,l,c,f=r(10),d=r(88),h=r(11).f,p=r(116).set,v=r(119),y=r(122),m=r(123),g=r(120),b=f.MutationObserver||f.WebKitMutationObserver,_=f.document,S=f.process,A=f.Promise,k=h(f,"queueMicrotask"),w=k&&k.value;w||(n=function(){var e,t;for(g&&(e=S.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?i():o=void 0,e}}o=void 0,e&&e.enter()},v||g||m||!b||!_?!y&&A&&A.resolve?((l=A.resolve(void 0)).constructor=A,c=d(l.then,l),i=function(){c(n)}):g?i=function(){S.nextTick(n)}:(p=d(p,f),i=function(){p(n)}):(s=!0,u=_.createTextNode(""),new b(n).observe(u,{characterData:!0}),i=function(){u.data=s=!s})),e.exports=w||function(e){var t={fn:e,next:void 0};o&&(o.next=t),a||(a=t,i()),o=t}},(e,t,r)=>{var n=r(32),a=r(10);e.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==a.Pebble},(e,t,r)=>{var n=r(32);e.exports=/web0s(?!.*chrome)/i.test(n)},(e,t,r)=>{var n=r(49),a=r(24),o=r(125);e.exports=function(e,t){if(n(e),a(t)&&t.constructor===e)return t;var r=o.f(e);return(0,r.resolve)(t),r.promise}},(e,t,r)=>{"use strict";var n=r(34),a=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 a(e)}},(e,t,r)=>{var n=r(10);e.exports=function(e,t){var r=n.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}},e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},e=>{e.exports="object"==typeof window},(e,t,r)=>{"use strict";var n=r(9),a=r(14),o=r(34),i=r(125),s=r(127),u=r(87);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=i.f(t),n=r.resolve,l=r.reject,c=s(function(){var r=o(t.resolve),i=[],s=0,l=1;u(e,function(e){var o=s++,u=!1;l++,a(r,t,e).then(function(e){!u&&(u=!0,i[o]={status:"fulfilled",value:e},--l||n(i))},function(e){!u&&(u=!0,i[o]={status:"rejected",reason:e},--l||n(i))})}),--l||n(i)});return c.error&&l(c.value),r.promise}})},(e,t,r)=>{"use strict";var n=r(9),a=r(34),o=r(27),i=r(14),s=r(125),u=r(127),l=r(87),c="No one promise resolved";n({target:"Promise",stat:!0},{any:function(e){var t=this,r=o("AggregateError"),n=s.f(t),f=n.resolve,d=n.reject,h=u(function(){var n=a(t.resolve),o=[],s=0,u=1,h=!1;l(e,function(e){var a=s++,l=!1;u++,i(n,t,e).then(function(e){l||h||(h=!0,f(e))},function(e){!l&&!h&&(l=!0,o[a]=e,--u||d(new r(o,c)))})}),--u||d(new r(o,c))});return h.error&&d(h.value),n.promise}})},(e,t,r)=>{"use strict";var n=r(9),a=r(39),o=r(108),i=r(13),s=r(27),u=r(25),l=r(113),c=r(124),f=r(50);if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&i(function(){o.prototype.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=l(this,s("Promise")),r=u(e);return this.then(r?function(r){return c(t,e()).then(function(){return r})}:e,r?function(r){return c(t,e()).then(function(){throw r})}:e)}}),!a&&u(o)){var d=s("Promise").prototype.finally;o.prototype.finally!==d&&f(o.prototype,"finally",d,{unsafe:!0})}},(e,t,r)=>{"use strict";var n=r(133).charAt,a=r(103),o=r(52),i=r(78),s="String Iterator",u=o.set,l=o.getterFor(s);i(String,"String",function(e){u(this,{type:s,string:a(e),index:0})},function(){var e,t=l(this),r=t.string,a=t.index;return a>=r.length?{value:void 0,done:!0}:(e=n(r,a),t.index+=e.length,{value:e,done:!1})})},(e,t,r)=>{var n=r(19),a=r(63),o=r(103),i=r(21),s=n("".charAt),u=n("".charCodeAt),l=n("".slice),c=function(e){return function(t,r){var n,c,f=o(i(t)),d=a(r),h=f.length;return d<0||d>=h?e?"":void 0:(n=u(f,d))<55296||n>56319||d+1===h||(c=u(f,d+1))<56320||c>57343?e?s(f,d):n:e?l(f,d,d+2):(n-55296<<10)+(c-56320)+65536}};e.exports={codeAt:c(!1),charAt:c(!0)}},function(e,t){!function(e,r){r(t)}(0,function(e){"use strict";var t,r,n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(e){return"Symbol("+e+")"};function a(){}var o=function(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==__webpack_require__.g?__webpack_require__.g:void 0}();function i(e){return"object"==typeof e&&null!==e||"function"==typeof e}var s=a,u=Promise,l=Promise.prototype.then,c=Promise.resolve.bind(u),f=Promise.reject.bind(u);function d(e){return new u(e)}function h(e){return c(e)}function p(e){return f(e)}function v(e,t,r){return l.call(e,t,r)}function y(e,t,r){v(v(e,t,r),void 0,s)}function m(e,t){y(e,t)}
1function g(e,t){y(e,void 0,t)}function b(e,t,r){return v(e,t,r)}function _(e){v(e,void 0,s)}var S=function(){var e=o&&o.queueMicrotask;if("function"==typeof e)return e;var t=h(void 0);return function(e){return v(t,e)}}();function A(e,t,r){if("function"!=typeof e)throw TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function k(e,t,r){try{return h(A(e,t,r))}catch(e){return p(e)}}var w=16384,x=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:!1,configurable:!0}),e.prototype.push=function(e){var t=this._back,r=t;t._elements.length===w-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,a=e._elements,o=a[r];return n===w&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),a[r]=void 0,o},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;(t!==n.length||void 0!==r._next)&&(t!==n.length||(n=(r=r._next)._elements,t=0,0!==n.length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}();function C(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?E(e):"closed"===t._state?F(e):O(e,t._storedError)}function P(e,t){return r2(e._ownerReadableStream,t)}function T(e){"readable"===e._ownerReadableStream._state?M(e,TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):I(e,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 R(e){return TypeError("Cannot "+e+" a stream using a released reader")}function E(e){e._closedPromise=d(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r})}function O(e,t){E(e),M(e,t)}function F(e){E(e),j(e)}function M(e,t){void 0!==e._closedPromise_reject&&(_(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function I(e,t){O(e,t)}function j(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var L=n("[[AbortSteps]]"),D=n("[[ErrorSteps]]"),N=n("[[CancelSteps]]"),B=n("[[PullSteps]]"),U=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},q=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function W(e){return"object"==typeof e||"function"==typeof e}function z(e,t){if(void 0!==e&&!W(e))throw TypeError(t+" is not an object.")}function G(e,t){if("function"!=typeof e)throw TypeError(t+" is not a function.")}function V(e){return"object"==typeof e&&null!==e||"function"==typeof e}function H(e,t){if(!V(e))throw TypeError(t+" is not an object.")}function X(e,t,r){if(void 0===e)throw TypeError("Parameter "+t+" is required in '"+r+"'.")}function Y(e,t,r){if(void 0===e)throw TypeError(t+" is required in '"+r+"'.")}function Z(e){return Number(e)}function K(e){return 0===e?0:e}function Q(e){return K(q(e))}function J(e,t){var r=0,n=Number.MAX_SAFE_INTEGER,a=Number(e);if(!U(a=K(a)))throw TypeError(t+" is not a finite number");if((a=Q(a))<r||a>n)throw TypeError(t+" is outside the accepted range of "+r+" to "+n+", inclusive");return U(a)&&0!==a?a:0}function $(e,t){if(!r0(e))throw TypeError(t+" is not a ReadableStream.")}function ee(e){return new eo(e)}function et(e,t){e._reader._readRequests.push(t)}function er(e,t,r){var n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function en(e){return e._reader._readRequests.length}function ea(e){var t=e._reader;return!!(void 0!==t&&ei(t))}var eo=function(){function e(e){if(X(e,1,"ReadableStreamDefaultReader"),$(e,"First parameter"),r1(e))throw TypeError("This stream has already been locked for exclusive reading by another reader");C(this,e),this._readRequests=new x}return Object.defineProperty(e.prototype,"closed",{get:function(){return ei(this)?this._closedPromise:p(eu("closed"))}
1,enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return(void 0===e&&(e=void 0),ei(this))?void 0===this._ownerReadableStream?p(R("cancel")):P(this,e):p(eu("cancel"))},e.prototype.read=function(){if(!ei(this))return p(eu("read"));if(void 0===this._ownerReadableStream)return p(R("read from"));var e,t,r=d(function(r,n){e=r,t=n});return es(this,{_chunkSteps:function(t){return e({value:t,done:!1})},_closeSteps:function(){return e({value:void 0,done:!0})},_errorSteps:function(e){return t(e)}}),r},e.prototype.releaseLock=function(){if(!ei(this))throw eu("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");T(this)}},e}();function ei(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_readRequests"))&&e instanceof eo}function es(e,t){var r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[B](t)}function eu(e){return TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}Object.defineProperties(eo.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(eo.prototype,n.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof n.asyncIterator&&((t={})[n.asyncIterator]=function(){return this},Object.defineProperty(r=t,n.asyncIterator,{enumerable:!1}));var el=function(){function e(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}return e.prototype.next=function(){var e=this,t=function(){return e._nextSteps()};return this._ongoingPromise=this._ongoingPromise?b(this._ongoingPromise,t,t):t(),this._ongoingPromise},e.prototype.return=function(e){var t=this,r=function(){return t._returnSteps(e)};return this._ongoingPromise?b(this._ongoingPromise,r,r):r()},e.prototype._nextSteps=function(){var e,t,r=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var n=this._reader;if(void 0===n._ownerReadableStream)return p(R("iterate"));var a=d(function(r,n){e=r,t=n}),o={_chunkSteps:function(t){r._ongoingPromise=void 0,S(function(){return e({value:t,done:!1})})},_closeSteps:function(){r._ongoingPromise=void 0,r._isFinished=!0,T(n),e({value:void 0,done:!0})},_errorSteps:function(e){r._ongoingPromise=void 0,r._isFinished=!0,T(n),t(e)}};return es(n,o),a},e.prototype._returnSteps=function(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;var t=this._reader;if(void 0===t._ownerReadableStream)return p(R("finish iterating"));if(!this._preventCancel){var r=P(t,e);return T(t),b(r,function(){return{value:e,done:!0}})}return T(t),h({value:e,done:!0})},e}(),ec={next:function(){return ed(this)?this._asyncIteratorImpl.next():p(eh("next"))},return:function(e){return ed(this)?this._asyncIteratorImpl.return(e):p(eh("return"))}};function ef(e,t){var r=new el(ee(e),t),n=Object.create(ec);return n._asyncIteratorImpl=r,n}function ed(e){if(!i(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof el}catch(e){return!1}}function eh(e){return TypeError("ReadableStreamAsyncIterator."+e+" can only be used on a ReadableSteamAsyncIterator")}void 0!==r&&Object.setPrototypeOf(ec,r);var ep=Number.isNaN||function(e){return e!=e};function ev(e){return e.slice()}function ey(e,t,r,n,a){new Uint8Array(e).set(new Uint8Array(r,n,a),t)}function em(e){return e}function eg(e){return!1}function eb(e,t,r){if(e.slice)return e.slice(t,r);var n=r-t,a=new ArrayBuffer(n);return ey(a,0,e,t,n),a}function e_(e){return!("number"!=typeof e||ep(e))&&!(e<0)}function eS(e){return new Uint8Array(eb(e.buffer,e.byteOffset,e.byteOffset+e.byteLength))}function eA(e){var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function ek(e,t,r){if(!e_(r)||r===1/0)throw RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function ew(e){return e._queue.peek().value}function ex(e){e._queue=new x,e._queueTotalSize=0}var eC=function(){function e(){throw TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!eR(this))throw e3("view");return this._view}
1,enumerable:!1,configurable:!0}),e.prototype.respond=function(e){if(!eR(this))throw e3("respond");if(X(e,1,"respond"),e=J(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw TypeError("This BYOB request has been invalidated");eg(this._view.buffer),eJ(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!eR(this))throw e3("respondWithNewView");if(X(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw TypeError("You can only respond with array buffer views");if(void 0===this._associatedReadableByteStreamController)throw TypeError("This BYOB request has been invalidated");eg(e.buffer),e$(this._associatedReadableByteStreamController,e)},e}();Object.defineProperties(eC.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(eC.prototype,n.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var eP=function(){function e(){throw TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!eT(this))throw e4("byobRequest");return eK(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!eT(this))throw e4("desiredSize");return eQ(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!eT(this))throw e4("close");if(this._closeRequested)throw TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");eX(this)},e.prototype.enqueue=function(e){if(!eT(this))throw e4("enqueue");if(X(e,1,"enqueue"),!ArrayBuffer.isView(e))throw TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");eY(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!eT(this))throw e4("error");eZ(this,e)},e.prototype[N]=function(e){eO(this),ex(this);var t=this._cancelAlgorithm(e);return eH(this),t},e.prototype[B]=function(e){var t=this._controlledReadableByteStream;if(this._queueTotalSize>0){var r=this._queue.shift();this._queueTotalSize-=r.byteLength,eD(this);var n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);e._chunkSteps(n);return}var a=this._autoAllocateChunkSize;if(void 0!==a){var o=void 0;try{o=new ArrayBuffer(a)}catch(t){e._errorSteps(t);return}var i={buffer:o,bufferByteLength:a,byteOffset:0,byteLength:a,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}et(t,e),eE(this)},e}();function eT(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream"))&&e instanceof eP}function eR(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController"))&&e instanceof eC}function eE(e){if(eV(e)){if(e._pulling){e._pullAgain=!0;return}e._pulling=!0,y(e._pullAlgorithm(),function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,eE(e))},function(t){eZ(e,t)})}}function eO(e){eN(e),e._pendingPullIntos=new x}function eF(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=eM(t);"default"===t.readerType?er(e,n,r):e6(e,n,r)}function eM(e){var t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function eI(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function ej(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,a=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),o=t.bytesFilled+a,i=o-o%r,s=a,u=!1;i>n&&(s=i-t.bytesFilled,u=!0);for(var l=e._queue;s>0;){var c=l.peek(),f=Math.min(s,c.byteLength),d=t.byteOffset+t.bytesFilled;ey(t.buffer,d,c.buffer,c.byteOffset,f),c.byteLength===f?l.shift():(c.byteOffset+=f,c.byteLength-=f),e._queueTotalSize-=f,eL(e,f,t),s-=f}return u}function eL(e,t,r){r.bytesFilled+=t}function eD(e){0===e._queueTotalSize&&e._closeRequested?(eH(e),r3(e._controlledReadableByteStream)):eE(e)}function eN(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function eB(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();ej(e,t)&&(eG(e),eF(e._controlledReadableByteStream,t))}}function eU(e,t,r){var n=e._controlledReadableByteStream,a=1;
1t.constructor!==DataView&&(a=t.constructor.BYTES_PER_ELEMENT);var o=t.constructor,i=em(t.buffer),s={buffer:i,bufferByteLength:i.byteLength,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:a,viewConstructor:o,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(s),e8(n,r);return}if("closed"===n._state){var u=new o(s.buffer,s.byteOffset,0);r._closeSteps(u);return}if(e._queueTotalSize>0){if(ej(e,s)){var l=eM(s);eD(e),r._chunkSteps(l);return}if(e._closeRequested){var c=TypeError("Insufficient bytes to fill elements in the given buffer");eZ(e,c),r._errorSteps(c);return}}e._pendingPullIntos.push(s),e8(n,r),eE(e)}function eq(e,t){var r=e._controlledReadableByteStream;if(e9(r))for(;e7(r)>0;)eF(r,eG(e))}function eW(e,t,r){if(eL(e,t,r),!(r.bytesFilled<r.elementSize)){eG(e);var n=r.bytesFilled%r.elementSize;if(n>0){var a=r.byteOffset+r.bytesFilled,o=eb(r.buffer,a-n,a);eI(e,o,0,o.byteLength)}r.bytesFilled-=n,eF(e._controlledReadableByteStream,r),eB(e)}}function ez(e,t){var r=e._pendingPullIntos.peek();eN(e),"closed"===e._controlledReadableByteStream._state?eq(e):eW(e,t,r),eE(e)}function eG(e){return e._pendingPullIntos.shift()}function eV(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&!e._closeRequested&&!!e._started&&!!(ea(t)&&en(t)>0||e9(t)&&e7(t)>0||eQ(e)>0)}function eH(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function eX(e){var t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state){if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0&&e._pendingPullIntos.peek().bytesFilled>0){var r=TypeError("Insufficient bytes to fill elements in the given buffer");throw eZ(e,r),r}eH(e),r3(t)}}function eY(e,t){var r=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===r._state){var n=t.buffer,a=t.byteOffset,o=t.byteLength,i=em(n);if(e._pendingPullIntos.length>0){var s=e._pendingPullIntos.peek();eg(s.buffer),s.buffer=em(s.buffer)}eN(e),ea(r)?0===en(r)?eI(e,i,a,o):(e._pendingPullIntos.length>0&&eG(e),er(r,new Uint8Array(i,a,o),!1)):e9(r)?(eI(e,i,a,o),eB(e)):eI(e,i,a,o),eE(e)}}function eZ(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(eO(e),ex(e),eH(e),r4(r,t))}function eK(e){if(null===e._byobRequest&&e._pendingPullIntos.length>0){var t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(eC.prototype);e2(n,e,r),e._byobRequest=n}return e._byobRequest}function eQ(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function eJ(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw RangeError("bytesWritten out of range")}r.buffer=em(r.buffer),ez(e,t)}function e$(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw RangeError("The region specified by view is larger than byobRequest");var n=t.byteLength;r.buffer=em(t.buffer),ez(e,n)}function e0(e,t,r,n,a,o,i){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,ex(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=a,t._autoAllocateChunkSize=i,t._pendingPullIntos=new x,e._readableStreamController=t,y(h(r()),function(){t._started=!0,eE(t)},function(e){eZ(t,e)})}function e1(e,t,r){var n=Object.create(eP.prototype),a=function(){},o=function(){return h(void 0)},i=function(){return h(void 0)};void 0!==t.start&&(a=function(){return t.start(n)}),void 0!==t.pull&&(o=function(){return t.pull(n)}),void 0!==t.cancel&&(i=function(e){return t.cancel(e)});var s=t.autoAllocateChunkSize;if(0===s)throw TypeError("autoAllocateChunkSize must be greater than 0");e0(e,n,a,o,i,r,s)}function e2(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function e3(e){return TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function e4(e){return TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function e5(e){return new te(e)}function e8(e,t){e._reader._readIntoRequests.push(t)}function e6(e,t,r){var n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}function e7(e){return e._reader._readIntoRequests.length}function e9(e){var t=e._reader;return!!(void 0!==t&&tt(t))}Object.defineProperties(eP.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(eP.prototype,n.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var te=function(){function e(e){if(X(e,1,"ReadableStreamBYOBReader"),$(e,"First parameter"),r1(e))throw TypeError("This stream has already been locked for exclusive reading by another reader");if(!eT(e._readableStreamController))throw TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");C(this,e),this._readIntoRequests=new x}return Object.defineProperty(e.prototype,"closed",{get:function(){return tt(this)?this._closedPromise:p(tn("closed"))}
1,enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return(void 0===e&&(e=void 0),tt(this))?void 0===this._ownerReadableStream?p(R("cancel")):P(this,e):p(tn("cancel"))},e.prototype.read=function(e){if(!tt(this))return p(tn("read"));if(!ArrayBuffer.isView(e))return p(TypeError("view must be an array buffer view"));if(0===e.byteLength)return p(TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return p(TypeError("view's buffer must have non-zero byteLength"));if(eg(e.buffer),void 0===this._ownerReadableStream)return p(R("read from"));var t,r,n=d(function(e,n){t=e,r=n});return tr(this,e,{_chunkSteps:function(e){return t({value:e,done:!1})},_closeSteps:function(e){return t({value:e,done:!0})},_errorSteps:function(e){return r(e)}}),n},e.prototype.releaseLock=function(){if(!tt(this))throw tn("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");T(this)}},e}();function tt(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_readIntoRequests"))&&e instanceof te}function tr(e,t,r){var n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?r._errorSteps(n._storedError):eU(n._readableStreamController,t,r)}function tn(e){return TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function ta(e,t){var r=e.highWaterMark;if(void 0===r)return t;if(ep(r)||r<0)throw RangeError("Invalid highWaterMark");return r}function to(e){return e.size||function(){return 1}}function ti(e,t){z(e,t);var r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:Z(r),size:void 0===n?void 0:ts(n,t+" has member 'size' that")}}function ts(e,t){return G(e,t),function(t){return Z(e(t))}}function tu(e,t){z(e,t);var r=null==e?void 0:e.abort,n=null==e?void 0:e.close,a=null==e?void 0:e.start,o=null==e?void 0:e.type,i=null==e?void 0:e.write;return{abort:void 0===r?void 0:tl(r,e,t+" has member 'abort' that"),close:void 0===n?void 0:tc(n,e,t+" has member 'close' that"),start:void 0===a?void 0:tf(a,e,t+" has member 'start' that"),write:void 0===i?void 0:td(i,e,t+" has member 'write' that"),type:o}}function tl(e,t,r){return G(e,r),function(r){return k(e,t,[r])}}function tc(e,t,r){return G(e,r),function(){return k(e,t,[])}}function tf(e,t,r){return G(e,r),function(r){return A(e,t,[r])}}function td(e,t,r){return G(e,r),function(r,n){return k(e,t,[r,n])}}function th(e,t){if(!tS(e))throw TypeError(t+" is not a WritableStream.")}function tp(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}Object.defineProperties(te.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(te.prototype,n.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var tv="function"==typeof AbortController;function ty(){if(tv)return new AbortController}var tm=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:H(e,"First parameter");var r=ti(t,"Second parameter"),n=tu(e,"First parameter");if(t_(this),void 0!==n.type)throw RangeError("Invalid type is specified");var a=to(r);t$(this,n,ta(r,1),a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!tS(this))throw rt("locked");return tA(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return(void 0===e&&(e=void 0),tS(this))?tA(this)?p(TypeError("Cannot abort a stream that already has a writer")):tk(this,e):p(rt("abort"))},e.prototype.close=function(){return tS(this)?tA(this)?p(TypeError("Cannot close a stream that already has a writer")):tM(this)?p(TypeError("Cannot close an already-closing stream")):tw(this):p(rt("close"))},e.prototype.getWriter=function(){if(!tS(this))throw rt("getWriter");return tg(this)},e}();function tg(e){return new tB(e)}function tb(e,t,r,n,a,o){void 0===a&&(a=1),void 0===o&&(o=function(){return 1});var i=Object.create(tm.prototype);return t_(i),tJ(i,Object.create(tK.prototype),e,t,r,n,a,o),i}function t_(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new x,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function tS(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_writableStreamController"))&&e instanceof tm}function tA(e){return void 0!==e._writer}function tk(e,t){if("closed"===e._state||"errored"===e._state)return h(void 0);e._writableStreamController._abortReason=t,null===(r=e._writableStreamController._abortController)||void 0===r||r.abort();var r,n=e._state;if("closed"===n||"errored"===n)return h(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var a=!1;"erroring"===n&&(a=!0,t=void 0);var o=d(function(r,n){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:a}});return e._pendingAbortRequest._promise=o,a||tP(e,t),o}function tw(e){var t=e._state;if("closed"===t||"errored"===t)return p(TypeError("The stream (in "+t+" state) is not in the writable state and cannot be closed"));var r=d(function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n}),n=e._writer;return void 0!==n&&e._backpressure&&"writable"===t&&rm(n),t1(e._writableStreamController),r}function tx(e){return d(function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)})}function tC(e,t){if("writable"===e._state){tP(e,t);return}tT(e)}function tP(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&tV(n,t),!tI(e)&&r._started&&tT(e)}function tT(e){e._state="errored",e._writableStreamController[D]();var t=e._storedError;
1if(e._writeRequests.forEach(function(e){e._reject(t)}),e._writeRequests=new x,void 0===e._pendingAbortRequest){tD(e);return}var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring){r._reject(t),tD(e);return}y(e._writableStreamController[L](r._reason),function(){r._resolve(),tD(e)},function(t){r._reject(t),tD(e)})}function tR(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function tE(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,tC(e,t)}function tO(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&rc(t)}function tF(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),tC(e,t)}function tM(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function tI(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function tj(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function tL(e){e._inFlightWriteRequest=e._writeRequests.shift()}function tD(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&ru(t,e._storedError)}function tN(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(t?rv(r):rm(r)),e._backpressure=t}Object.defineProperties(tm.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(tm.prototype,n.toStringTag,{value:"WritableStream",configurable:!0});var tB=function(){function e(e){if(X(e,1,"WritableStreamDefaultWriter"),th(e,"First parameter"),tA(e))throw 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)!tM(e)&&e._backpressure?rf(this):rh(this),ro(this);else if("erroring"===t)rd(this,e._storedError),ro(this);else if("closed"===t)rh(this),rs(this);else{var r=e._storedError;rd(this,r),ri(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return tU(this)?this._closedPromise:p(rn("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!tU(this))throw rn("desiredSize");if(void 0===this._ownerWritableStream)throw ra("desiredSize");return tH(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return tU(this)?this._readyPromise:p(rn("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return(void 0===e&&(e=void 0),tU(this))?void 0===this._ownerWritableStream?p(ra("abort")):tq(this,e):p(rn("abort"))},e.prototype.close=function(){if(!tU(this))return p(rn("close"));var e=this._ownerWritableStream;return void 0===e?p(ra("close")):tM(e)?p(TypeError("Cannot close an already-closing stream")):tW(this)},e.prototype.releaseLock=function(){if(!tU(this))throw rn("releaseLock");void 0!==this._ownerWritableStream&&tX(this)},e.prototype.write=function(e){return(void 0===e&&(e=void 0),tU(this))?void 0===this._ownerWritableStream?p(ra("write to")):tY(this,e):p(rn("write"))},e}();function tU(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream"))&&e instanceof tB}function tq(e,t){return tk(e._ownerWritableStream,t)}function tW(e){return tw(e._ownerWritableStream)}function tz(e){var t=e._ownerWritableStream,r=t._state;return tM(t)||"closed"===r?h(void 0):"errored"===r?p(t._storedError):tW(e)}function tG(e,t){"pending"===e._closedPromiseState?ru(e,t):rl(e,t)}function tV(e,t){"pending"===e._readyPromiseState?rp(e,t):ry(e,t)}function tH(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:t3(t._writableStreamController)}function tX(e){var t=e._ownerWritableStream,r=TypeError("Writer was released and can no longer be used to monitor the stream's closedness");tV(e,r),tG(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function tY(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,a=t2(n,t);if(r!==e._ownerWritableStream)return p(ra("write to"));var o=r._state;if("errored"===o)return p(r._storedError);if(tM(r)||"closed"===o)return p(TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===o)return p(r._storedError);var i=tx(r);return t4(n,t,a),i}Object.defineProperties(tB.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(tB.prototype,n.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var tZ={},tK=function(){function e(){throw TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"abortReason",{get:function(){if(!tQ(this))throw rr("abortReason");return this._abortReason}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"signal",{get:function(){if(!tQ(this))throw rr("signal");if(void 0===this._abortController)throw TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),e.prototype.error=function(e){if(void 0===e&&(e=void 0),!tQ(this))throw rr("error");"writable"===this._controlledWritableStream._state&&re(this,e)},e.prototype[L]=function(e){var t=this._abortAlgorithm(e);return t0(this),t},e.prototype[D]=function(){ex(this)},e}();function tQ(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream"))&&e instanceof tK}function tJ(e,t,r,n,a,o,i,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,ex(t),t._abortReason=void 0,t._abortController=ty(),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=i,t._writeAlgorithm=n,t._closeAlgorithm=a,t._abortAlgorithm=o,tN(e,t9(t)),y(h(r()),function(){t._started=!0,t5(t)},function(r){t._started=!0,tC(e,r)})}function t$(e,t,r,n){var a=Object.create(tK.prototype),o=function(){},i=function(){return h(void 0)},s=function(){return h(void 0)},u=function(){return h(void 0)};void 0!==t.start&&(o=function(){return t.start(a)}),void 0!==t.write&&(i=function(e){return t.write(e,a)}),void 0!==t.close&&(s=function(){return t.close()}),void 0!==t.abort&&(u=function(e){return t.abort(e)}),tJ(e,a,o,i,s,u,r,n)}function t0(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function t1(e){ek(e,tZ,0),t5(e)}function t2(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return t8(e,t),1}}function t3(e){return e._strategyHWM-e._queueTotalSize}function t4(e,t,r){try{ek(e,t,r)}catch(t){t8(e,t);return}var n=e._controlledWritableStream;tM(n)||"writable"!==n._state||tN(n,t9(e)),t5(e)}function t5(e){var t=e._controlledWritableStream;if(e._started&&void 0===t._inFlightWriteRequest){if("erroring"===t._state){tT(t);return}if(0!==e._queue.length){var r=ew(e);r===tZ?t6(e):t7(e,r)}}}function t8(e,t){"writable"===e._controlledWritableStream._state&&re(e,t)}function t6(e){var t=e._controlledWritableStream;tj(t),eA(e);var r=e._closeAlgorithm();t0(e),y(r,function(){tO(t)},function(e){tF(t,e)})}function t7(e,t){var r=e._controlledWritableStream;tL(r),y(e._writeAlgorithm(t),function(){tR(r);var t=r._state;eA(e),tM(r)||"writable"!==t||tN(r,t9(e)),t5(e)},function(t){"writable"===r._state&&t0(e),tE(r,t)})}function t9(e){return 0>=t3(e)}function re(e,t){var r=e._controlledWritableStream;t0(e),tP(r,t)}function rt(e){return TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function rr(e){return TypeError("WritableStreamDefaultController.prototype."+e+" can only be used on a WritableStreamDefaultController")}function rn(e){return TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function ra(e){return TypeError("Cannot "+e+" a stream using a released writer")}function ro(e){e._closedPromise=d(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function ri(e,t){ro(e),ru(e,t)}function rs(e){ro(e),rc(e)}function ru(e,t){void 0!==e._closedPromise_reject&&(_(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function rl(e,t){ri(e,t)}function rc(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function rf(e){e._readyPromise=d(function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}function rd(e,t){rf(e),rp(e,t)}function rh(e){rf(e),rm(e)}function rp(e,t){void 0!==e._readyPromise_reject&&(_(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function rv(e){rf(e)}function ry(e,t){rd(e,t)}function rm(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(tK.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(tK.prototype,n.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var rg="undefined"!=typeof DOMException?DOMException:void 0;function rb(){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 r_=!function(e){if(!("function"==typeof e||"object"==typeof e))return!1;try{return new e,!0}catch(e){return!1}}(rg)?rb():rg;function rS(e,t,r,n,o,i){var s=ee(e),u=tg(t);e._disturbed=!0;var l=!1,c=h(void 0);return d(function(f,p){var b;if(void 0!==i){if(b=function(){var r=new r_("Aborted","AbortError"),a=[];n||a.push(function(){return"writable"===t._state?tk(t,r):h(void 0)}),o||a.push(function(){return"readable"===e._state?r2(e,r):h(void 0)}),P(function(){return Promise.all(a.map(function(e){return e()}))},!0,r)},i.aborted){b();return}i.addEventListener("abort",b)}function S(){return d(function(e,t){function r(n){n?e():v(A(),r,t)}r(!1)})}function A(){return l?h(!0):v(u._readyPromise,function(){return d(function(e,t){es(s,{_chunkSteps:function(t){c=v(tY(u,t),void 0,a),e(!1)},_closeSteps:function(){return e(!0)},_errorSteps:t})})})}if(x(e,s._closedPromise,function(e){n?R(!0,e):P(function(){return tk(t,e)},!0,e)}),x(t,u._closedPromise,function(t){o?R(!0,t):P(function(){return r2(e,t)},!0,t)}),C(e,s._closedPromise,function(){r?R():P(function(){return tz(u)})}),tM(t)||"closed"===t._state){var k=TypeError("the destination writable stream closed before all data could be piped to it");o?R(!0,k):P(function(){return r2(e,k)},!0,k)}function w(){var e=c;return v(c,function(){return e!==c?w():void 0})}function x(e,t,r){"errored"===e._state?r(e._storedError):g(t,r)}function C(e,t,r){"closed"===e._state?r():m(t,r)}function P(e,r,n){l||(l=!0,"writable"!==t._state||tM(t)?a():m(w(),a));function a(){y(e(),function(){return E(r,n)},function(e){return E(!0,e)})}}function R(e,r){l||(l=!0,"writable"!==t._state||tM(t)?E(e,r):m(w(),function(){return E(e,r)}))}function E(e,t){tX(u),T(s),void 0!==i&&i.removeEventListener("abort",b),e?p(t):f(void 0)}_(S())})}var rA=function(){function e(){throw TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!rk(this))throw rj("desiredSize");return rE(this)}
1,enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!rk(this))throw rj("close");if(!rF(this))throw TypeError("The stream is not in a state that permits close");rP(this)},e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!rk(this))throw rj("enqueue");if(!rF(this))throw TypeError("The stream is not in a state that permits enqueue");return rT(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!rk(this))throw rj("error");rR(this,e)},e.prototype[N]=function(e){ex(this);var t=this._cancelAlgorithm(e);return rC(this),t},e.prototype[B]=function(e){var t=this._controlledReadableStream;if(this._queue.length>0){var r=eA(this);this._closeRequested&&0===this._queue.length?(rC(this),r3(t)):rw(this),e._chunkSteps(r)}else et(t,e),rw(this)},e}();function rk(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream"))&&e instanceof rA}function rw(e){if(rx(e)){if(e._pulling){e._pullAgain=!0;return}e._pulling=!0,y(e._pullAlgorithm(),function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,rw(e))},function(t){rR(e,t)})}}function rx(e){var t=e._controlledReadableStream;return!!rF(e)&&!!e._started&&!!(r1(t)&&en(t)>0||rE(e)>0)}function rC(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function rP(e){if(rF(e)){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(rC(e),r3(t))}}function rT(e,t){if(rF(e)){var r=e._controlledReadableStream;if(r1(r)&&en(r)>0)er(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw rR(e,t),t}try{ek(e,t,n)}catch(t){throw rR(e,t),t}}rw(e)}}function rR(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(ex(e),rC(e),r4(r,t))}function rE(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function rO(e){return!rx(e)}function rF(e){var t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function rM(e,t,r,n,a,o,i){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,ex(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=i,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=a,e._readableStreamController=t,y(h(r()),function(){t._started=!0,rw(t)},function(e){rR(t,e)})}function rI(e,t,r,n){var a=Object.create(rA.prototype),o=function(){},i=function(){return h(void 0)},s=function(){return h(void 0)};void 0!==t.start&&(o=function(){return t.start(a)}),void 0!==t.pull&&(i=function(){return t.pull(a)}),void 0!==t.cancel&&(s=function(e){return t.cancel(e)}),rM(e,a,o,i,s,r,n)}function rj(e){return TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function rL(e,t){return eT(e._readableStreamController)?rN(e):rD(e)}function rD(e,t){var r,n,a,o,i,s=ee(e),u=!1,l=!1,c=!1,f=!1,p=d(function(e){i=e});function v(){return u?l=!0:(u=!0,es(s,{_chunkSteps:function(e){S(function(){l=!1;var t=e,r=e;c||rT(a._readableStreamController,t),f||rT(o._readableStreamController,r),u=!1,l&&v()})},_closeSteps:function(){u=!1,c||rP(a._readableStreamController),f||rP(o._readableStreamController),c&&f||i(void 0)},_errorSteps:function(){u=!1}})),h(void 0)}function y(t){if(f=!0,n=t,c){var a=r2(e,ev([r,n]));i(a)}return p}function m(){}return a=rQ(m,v,function(t){if(c=!0,r=t,f){var a=r2(e,ev([r,n]));i(a)}return p}),o=rQ(m,v,y),g(s._closedPromise,function(e){rR(a._readableStreamController,e),rR(o._readableStreamController,e),c&&f||i(void 0)}),[a,o]}function rN(e){var t,r,n,a,o,i=ee(e),s=!1,u=!1,l=!1,c=!1,f=!1,p=d(function(e){o=e});function v(e){g(e._closedPromise,function(t){e===i&&(eZ(n._readableStreamController,t),eZ(a._readableStreamController,t),c&&f||o(void 0))})}function y(){tt(i)&&(T(i),v(i=ee(e))),es(i,{_chunkSteps:function(t){S(function(){u=!1,l=!1;var r=t,i=t;if(!c&&!f)try{i=eS(t)}catch(t){eZ(n._readableStreamController,t),eZ(a._readableStreamController,t),o(r2(e,t));return}c||eY(n._readableStreamController,r),f||eY(a._readableStreamController,i),s=!1,u?b():l&&_()})},_closeSteps:function(){s=!1,c||eX(n._readableStreamController),f||eX(a._readableStreamController),n._readableStreamController._pendingPullIntos.length>0&&eJ(n._readableStreamController,0),a._readableStreamController._pendingPullIntos.length>0&&eJ(a._readableStreamController,0),c&&f||o(void 0)},_errorSteps:function(){s=!1}})}function m(t,r){ei(i)&&(T(i),v(i=e5(e)));var d=r?a:n,h=r?n:a;tr(i,t,{_chunkSteps:function(t){S(function(){u=!1,l=!1;var n=r?f:c;if(r?c:f)n||e$(d._readableStreamController,t);else{var a=void 0;try{a=eS(t)}catch(t){eZ(d._readableStreamController,t),eZ(h._readableStreamController,t),o(r2(e,t));return}n||e$(d._readableStreamController,t),eY(h._readableStreamController,a)}s=!1,u?b():l&&_()})},_closeSteps:function(e){s=!1;var t=r?f:c,n=r?c:f;t||eX(d._readableStreamController),n||eX(h._readableStreamController),void 0!==e&&(t||e$(d._readableStreamController,e),!n&&h._readableStreamController._pendingPullIntos.length>0&&eJ(h._readableStreamController,0)),t&&n||o(void 0)},_errorSteps:function(){s=!1}})}function b(){if(s)return u=!0,h(void 0);s=!0;var e=eK(n._readableStreamController);return null===e?y():m(e._view,!1),h(void 0)}function _(){if(s)return l=!0,h(void 0);s=!0;var e=eK(a._readableStreamController);return null===e?y():m(e._view,!0),h(void 0)}function A(n){if(f=!0,r=n,c){var a=r2(e,ev([t,r]));o(a)}return p}function k(){}return n=rJ(k,b,function(n){if(c=!0,t=n,f){var a=r2(e,ev([t,r]));o(a)}return p}),a=rJ(k,_,A),v(i),[n,a]}function rB(e,t){z(e,t);var r=e,n=null==r?void 0:r.autoAllocateChunkSize,a=null==r?void 0:r.cancel,o=null==r?void 0:r.pull,i=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:J(n,t+" has member 'autoAllocateChunkSize' that"),cancel:void 0===a?void 0:rU(a,r,t+" has member 'cancel' that"),pull:void 0===o?void 0:rq(o,r,t+" has member 'pull' that"),start:void 0===i?void 0:rW(i,r,t+" has member 'start' that"),type:void 0===s?void 0:rz(s,t+" has member 'type' that")}}function rU(e,t,r){return G(e,r),function(r){return k(e,t,[r])}}function rq(e,t,r){return G(e,r),function(r){return k(e,t,[r])}}function rW(e,t,r){return G(e,r),function(r){return A(e,t,[r])}}function rz(e,t){if("bytes"!=(e=""+e))throw TypeError(t+" '"+e+"' is not a valid enumeration value for ReadableStreamType");return e}function rG(e,t){z(e,t);var r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:rV(r,t+" has member 'mode' that")}}function rV(e,t){if("byob"!=(e=""+e))throw TypeError(t+" '"+e+"' is not a valid enumeration value for ReadableStreamReaderMode");return e}function rH(e,t){return z(e,t),{preventCancel:!!(null==e?void 0:e.preventCancel)}}function rX(e,t){z(e,t);var r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,a=null==e?void 0:e.preventClose,o=null==e?void 0:e.signal;return void 0!==o&&rY(o,t+" has member 'signal' that"),{preventAbort:!!r,preventCancel:!!n,preventClose:!!a,signal:o}}function rY(e,t){if(!tp(e))throw TypeError(t+" is not an AbortSignal.")}function rZ(e,t){z(e,t);var r=null==e?void 0:e.readable;Y(r,"readable","ReadableWritablePair"),$(r,t+" has member 'readable' that");var n=null==e?void 0:e.writable;return Y(n,"writable","ReadableWritablePair"),th(n,t+" has member 'writable' that"),{readable:r,writable:n}}Object.defineProperties(rA.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(rA.prototype,n.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var rK=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:H(e,"First parameter");var r=ti(t,"Second parameter"),n=rB(e,"First parameter");if(r$(this),"bytes"===n.type){if(void 0!==r.size)throw RangeError("The strategy for a byte stream cannot have a size function");var a=ta(r,0);e1(this,n,a)}else{var o=to(r),a=ta(r,1);rI(this,n,a,o)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!r0(this))throw r5("locked");return r1(this)}
1,enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return(void 0===e&&(e=void 0),r0(this))?r1(this)?p(TypeError("Cannot cancel a stream that already has a reader")):r2(this,e):p(r5("cancel"))},e.prototype.getReader=function(e){if(void 0===e&&(e=void 0),!r0(this))throw r5("getReader");return void 0===rG(e,"First parameter").mode?ee(this):e5(this)},e.prototype.pipeThrough=function(e,t){if(void 0===t&&(t={}),!r0(this))throw r5("pipeThrough");X(e,1,"pipeThrough");var r=rZ(e,"First parameter"),n=rX(t,"Second parameter");if(r1(this))throw TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(tA(r.writable))throw TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return _(rS(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable},e.prototype.pipeTo=function(e,t){var r;if(void 0===t&&(t={}),!r0(this))return p(r5("pipeTo"));if(void 0===e)return p("Parameter 1 is required in 'pipeTo'.");if(!tS(e))return p(TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));try{r=rX(t,"Second parameter")}catch(e){return p(e)}return r1(this)?p(TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):tA(e)?p(TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):rS(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)},e.prototype.tee=function(){if(!r0(this))throw r5("tee");return ev(rL(this))},e.prototype.values=function(e){if(void 0===e&&(e=void 0),!r0(this))throw r5("values");return ef(this,rH(e,"First parameter").preventCancel)},e}();function rQ(e,t,r,n,a){void 0===n&&(n=1),void 0===a&&(a=function(){return 1});var o=Object.create(rK.prototype);return r$(o),rM(o,Object.create(rA.prototype),e,t,r,n,a),o}function rJ(e,t,r){var n=Object.create(rK.prototype);return r$(n),e0(n,Object.create(eP.prototype),e,t,r,0,void 0),n}function r$(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function r0(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_readableStreamController"))&&e instanceof rK}function r1(e){return void 0!==e._reader}function r2(e,t){if(e._disturbed=!0,"closed"===e._state)return h(void 0);if("errored"===e._state)return p(e._storedError);r3(e);var r=e._reader;return void 0!==r&&tt(r)&&(r._readIntoRequests.forEach(function(e){e._closeSteps(void 0)}),r._readIntoRequests=new x),b(e._readableStreamController[N](t),a)}function r3(e){e._state="closed";var t=e._reader;void 0!==t&&(j(t),ei(t)&&(t._readRequests.forEach(function(e){e._closeSteps()}),t._readRequests=new x))}function r4(e,t){e._state="errored",e._storedError=t;var r=e._reader;void 0!==r&&(M(r,t),ei(r)?(r._readRequests.forEach(function(e){e._errorSteps(t)}),r._readRequests=new x):(r._readIntoRequests.forEach(function(e){e._errorSteps(t)}),r._readIntoRequests=new x))}function r5(e){return TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function r8(e,t){z(e,t);var r=null==e?void 0:e.highWaterMark;return Y(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Z(r)}}Object.defineProperties(rK.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(rK.prototype,n.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof n.asyncIterator&&Object.defineProperty(rK.prototype,n.asyncIterator,{value:rK.prototype.values,writable:!0,configurable:!0});var r6=function(e){return e.byteLength};Object.defineProperty(r6,"name",{value:"size",configurable:!0});var r7=function(){function e(e){X(e,1,"ByteLengthQueuingStrategy"),e=r8(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!ne(this))throw r9("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!ne(this))throw r9("size");return r6}
1,enumerable:!1,configurable:!0}),e}();function r9(e){return TypeError("ByteLengthQueuingStrategy.prototype."+e+" can only be used on a ByteLengthQueuingStrategy")}function ne(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark"))&&e instanceof r7}Object.defineProperties(r7.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(r7.prototype,n.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var nt=function(){return 1};Object.defineProperty(nt,"name",{value:"size",configurable:!0});var nr=function(){function e(e){X(e,1,"CountQueuingStrategy"),e=r8(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!na(this))throw nn("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!na(this))throw nn("size");return nt},enumerable:!1,configurable:!0}),e}();function nn(e){return TypeError("CountQueuingStrategy.prototype."+e+" can only be used on a CountQueuingStrategy")}function na(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark"))&&e instanceof nr}function no(e,t){z(e,t);var r=null==e?void 0:e.flush,n=null==e?void 0:e.readableType,a=null==e?void 0:e.start,o=null==e?void 0:e.transform,i=null==e?void 0:e.writableType;return{flush:void 0===r?void 0:ni(r,e,t+" has member 'flush' that"),readableType:n,start:void 0===a?void 0:ns(a,e,t+" has member 'start' that"),transform:void 0===o?void 0:nu(o,e,t+" has member 'transform' that"),writableType:i}}function ni(e,t,r){return G(e,r),function(r){return k(e,t,[r])}}function ns(e,t,r){return G(e,r),function(r){return A(e,t,[r])}}function nu(e,t,r){return G(e,r),function(r,n){return k(e,t,[r,n])}}Object.defineProperties(nr.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(nr.prototype,n.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var nl=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={}),void 0===e&&(e=null);var n,a=ti(t,"Second parameter"),o=ti(r,"Third parameter"),i=no(e,"First parameter");if(void 0!==i.readableType)throw RangeError("Invalid readableType specified");if(void 0!==i.writableType)throw RangeError("Invalid writableType specified");var s=ta(o,0),u=to(o),l=ta(a,1),c=to(a);nc(this,d(function(e){n=e}),l,c,s,u),ng(this,i),void 0!==i.start?n(i.start(this._transformStreamController)):n(void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!nf(this))throw nR("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!nf(this))throw nR("writable");return this._writable},enumerable:!1,configurable:!0}),e}();function nc(e,t,r,n,a,o){function i(){return t}function s(t){return nw(e,t)}function u(t){return nx(e,t)}function l(){return nC(e)}function c(){return nP(e)}function f(t){return nh(e,t),h(void 0)}e._writable=tb(i,s,l,u,r,n),e._readable=rQ(i,c,f,a,o),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,np(e,!0),e._transformStreamController=void 0}function nf(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_transformStreamController"))&&e instanceof nl}function nd(e,t){rR(e._readable._readableStreamController,t),nh(e,t)}function nh(e,t){nb(e._transformStreamController),t8(e._writable._writableStreamController,t),e._backpressure&&np(e,!1)}function np(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=d(function(t){e._backpressureChangePromise_resolve=t}),e._backpressure=t}Object.defineProperties(nl.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(nl.prototype,n.toStringTag,{value:"TransformStream",configurable:!0});var nv=function(){function e(){throw TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!ny(this))throw nT("desiredSize");return rE(this._controlledTransformStream._readable._readableStreamController)}
1,enumerable:!1,configurable:!0}),e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!ny(this))throw nT("enqueue");n_(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!ny(this))throw nT("error");nS(this,e)},e.prototype.terminate=function(){if(!ny(this))throw nT("terminate");nk(this)},e}();function ny(e){return!!(i(e)&&Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream"))&&e instanceof nv}function nm(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function ng(e,t){var r=Object.create(nv.prototype),n=function(e){try{return n_(r,e),h(void 0)}catch(e){return p(e)}},a=function(){return h(void 0)};void 0!==t.transform&&(n=function(e){return t.transform(e,r)}),void 0!==t.flush&&(a=function(){return t.flush(r)}),nm(e,r,n,a)}function nb(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function n_(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!rF(n))throw TypeError("Readable side is not in a state that permits enqueue");try{rT(n,t)}catch(e){throw nh(r,e),r._readable._storedError}rO(n)!==r._backpressure&&np(r,!0)}function nS(e,t){nd(e._controlledTransformStream,t)}function nA(e,t){return b(e._transformAlgorithm(t),void 0,function(t){throw nd(e._controlledTransformStream,t),t})}function nk(e){var t=e._controlledTransformStream;rP(t._readable._readableStreamController),nh(t,TypeError("TransformStream terminated"))}function nw(e,t){var r=e._transformStreamController;return e._backpressure?b(e._backpressureChangePromise,function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return nA(r,t)}):nA(r,t)}function nx(e,t){return nd(e,t),h(void 0)}function nC(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return nb(r),b(n,function(){if("errored"===t._state)throw t._storedError;rP(t._readableStreamController)},function(r){throw nd(e,r),t._storedError})}function nP(e){return np(e,!1),e._backpressureChangePromise}function nT(e){return TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function nR(e){return TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}Object.defineProperties(nv.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(nv.prototype,n.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),e.ByteLengthQueuingStrategy=r7,e.CountQueuingStrategy=nr,e.ReadableByteStreamController=eP,e.ReadableStream=rK,e.ReadableStreamBYOBReader=te,e.ReadableStreamBYOBRequest=eC,e.ReadableStreamDefaultController=rA,e.ReadableStreamDefaultReader=eo,e.TransformStream=nl,e.TransformStreamDefaultController=nv,e.WritableStream=tm,e.WritableStreamDefaultController=tK,e.WritableStreamDefaultWriter=tB,Object.defineProperty(e,"__esModule",{value:!0})})},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0;var n=o(r(2)),a=r(4);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,u,"next",e)}function u(e){i(o,n,a,s,u,"throw",e)}s(void 0)})}}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}var f=function(){function e(){u(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseCanvasFactory.")}return c(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw Error("Invalid canvas size");var r=this._createCanvas(e,t);return{canvas:r,context:r.getContext("2d")}}},{key:"reset",value:function(e,t,r){if(!e.canvas)throw Error("Canvas is not specified");if(t<=0||r<=0)throw Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}},{key:"destroy",value:function(e){if(!e.canvas)throw Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}},{key:"_createCanvas",value:function(e,t){(0,a.unreachable)("Abstract method `_createCanvas` called.")}}]),e}();t.BaseCanvasFactory=f;var d=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r,o=t.isCompressed,i=void 0!==o&&o;u(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=n,this.isCompressed=i}return c(e,[{key:"fetch",value:function(){var e=s(n.default.mark(function e(t){var r,o,i,s=this;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,this.baseUrl){e.next=3;break}throw 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 Error("CMap name must be specified.");case 5:return o=this.baseUrl+r+(this.isCompressed?".bcmap":""),i=this.isCompressed?a.CMapCompressionType.BINARY:a.CMapCompressionType.NONE,e.abrupt("return",this._fetchData(o,i).catch(function(e){throw Error("Unable to load ".concat(s.isCompressed?"binary ":"","CMap at: ").concat(o))}));case 8:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"_fetchData",value:function(e,t){(0,a.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseCMapReaderFactory=d;var h=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r;u(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=n}return c(e,[{key:"fetch",value:function(){var e=s(n.default.mark(function e(t){var r,a;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.filename,this.baseUrl){e.next=3;break}throw Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');case 3:if(r){e.next=5;break}throw Error("Font filename must be specified.");case 5:return a="".concat(this.baseUrl).concat(r),e.abrupt("return",this._fetchData(a).catch(function(e){throw Error("Unable to load font data at: ".concat(a))}));case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"_fetchData",value:function(e){(0,a.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseStandardFontDataFactory=h;var p=function(){function e(){u(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseSVGFactory.")}return c(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw Error("Invalid SVG dimensions");var r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),r.setAttribute("width","".concat(e,"px")),r.setAttribute("height","".concat(t,"px")),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox","0 0 ".concat(e," ").concat(t)),r}},{key:"createElement",value:function(e){if("string"!=typeof e)throw Error("Invalid SVG element type");return this._createSVG(e)}},{key:"_createSVG",value:function(e){(0,a.unreachable)("Abstract method `_createSVG` called.")}}]),e}();t.BaseSVGFactory=p},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=exports.RenderTask=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.version=void 0;var _regenerator=_interopRequireDefault(__w_pdfjs_require__(2)),_util=__w_pdfjs_require__(4),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(137),_node_utils=__w_pdfjs_require__(138),_annotation_storage=__w_pdfjs_require__(139),_canvas=__w_pdfjs_require__(140),_worker_options=__w_pdfjs_require__(142),_is_node=__w_pdfjs_require__(6),_message_handler=__w_pdfjs_require__(143),_metadata=__w_pdfjs_require__(144),_optional_content_config=__w_pdfjs_require__(145),_transport_stream=__w_pdfjs_require__(146),_xfa_text=__w_pdfjs_require__(147);
1function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classPrivateFieldInitSpec(e,t,r){_checkPrivateRedeclaration(e,t),t.set(e,r)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(e,t,r){var n=_classExtractFieldDescriptor(e,t,"set");return _classApplyDescriptorSet(e,n,r),r}function _classApplyDescriptorSet(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=r}}function _classPrivateFieldGet(e,t){var r=_classExtractFieldDescriptor(e,t,"get");return _classApplyDescriptorGet(e,r)}function _classExtractFieldDescriptor(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function _classApplyDescriptorGet(e,t){return t.get?t.get.call(e):t.value}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw 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&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function asyncGeneratorStep(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,a)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){asyncGeneratorStep(o,n,a,i,s,"next",e)}function s(e){asyncGeneratorStep(o,n,a,i,s,"throw",e)}i(void 0)})}}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(e,t)}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r,n,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(r=a.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw n}}return o}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _typeof(e){return(_typeof="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})(e)}var DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DefaultCanvasFactory=_is_node.isNodeJS?_node_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;var DefaultCMapReaderFactory=_is_node.isNodeJS?_node_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;var DefaultStandardFontDataFactory=_is_node.isNodeJS?_node_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){var t,r=new PDFDocumentLoadingTask;if("string"==typeof e||e instanceof URL)t={url:e};else if((0,_util.isArrayBuffer)(e))t={data:e};else if(e instanceof PDFDataRangeTransport)t={range:e};else{if("object"!==_typeof(e))throw Error("Invalid parameter in getDocument, need either string, URL, Uint8Array, or parameter object.");if(!e.url&&!e.data&&!e.range)throw Error("Invalid parameter object: need either .data, .range or .url");t=e}var n=Object.create(null),a=null,o=null;for(var i in t){var s=t[i];switch(i){case"url":if("undefined"!=typeof window)try{n[i]=new URL(s,window.location).href;continue}catch(e){(0,_util.warn)('Cannot create valid URL: "'.concat(e,'".'))}else if("string"==typeof s||s instanceof URL){n[i]=s.toString();continue}throw Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":a=s;continue;case"worker":o=s;continue;case"data":if(_is_node.isNodeJS&&void 0!==Buffer&&s instanceof Buffer)n[i]=new Uint8Array(s);else if(s instanceof Uint8Array)break;else if("string"==typeof s)n[i]=(0,_util.stringToBytes)(s);else if("object"!==_typeof(s)||null===s||isNaN(s.length)){if((0,_util.isArrayBuffer)(s))n[i]=new Uint8Array(s);else throw Error("Invalid PDF binary data: either typed array, string, or array-like object is expected in the data property.")}else n[i]=new Uint8Array(s);continue}n[i]=s}if(n.rangeChunkSize=n.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,n.CM
1apReaderFactory=n.CMapReaderFactory||DefaultCMapReaderFactory,n.StandardFontDataFactory=n.StandardFontDataFactory||DefaultStandardFontDataFactory,n.ignoreErrors=!0!==n.stopAtErrors,n.fontExtraProperties=!0===n.fontExtraProperties,n.pdfBug=!0===n.pdfBug,n.enableXfa=!0===n.enableXfa,("string"!=typeof n.docBaseUrl||(0,_display_utils.isDataScheme)(n.docBaseUrl))&&(n.docBaseUrl=null),Number.isInteger(n.maxImageSize)||(n.maxImageSize=-1),"boolean"!=typeof n.useWorkerFetch&&(n.useWorkerFetch=n.CMapReaderFactory===_display_utils.DOMCMapReaderFactory&&n.StandardFontDataFactory===_display_utils.DOMStandardFontDataFactory),"boolean"!=typeof n.isEvalSupported&&(n.isEvalSupported=!0),"boolean"!=typeof n.disableFontFace&&(n.disableFontFace=_is_node.isNodeJS),"boolean"!=typeof n.useSystemFonts&&(n.useSystemFonts=!_is_node.isNodeJS&&!n.disableFontFace),void 0===n.ownerDocument&&(n.ownerDocument=globalThis.document),"boolean"!=typeof n.disableRange&&(n.disableRange=!1),"boolean"!=typeof n.disableStream&&(n.disableStream=!1),"boolean"!=typeof n.disableAutoFetch&&(n.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(n.verbosity),!o){var u={verbosity:n.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};o=u.port?PDFWorker.fromPort(u):new PDFWorker(u),r._worker=o}var l=r.docId;return o.promise.then(function(){if(r.destroyed)throw Error("Loading aborted");return Promise.all([_fetchDocument(o,n,a,l),new Promise(function(e){var t;a?t=new _transport_stream.PDFDataTransportStream({length:n.length,initialData:n.initialData,progressiveDone:n.progressiveDone,contentDispositionFilename:n.contentDispositionFilename,disableRange:n.disableRange,disableStream:n.disableStream},a):n.data||(t=createPDFNetworkStream({url:n.url,length:n.length,httpHeaders:n.httpHeaders,withCredentials:n.withCredentials,rangeChunkSize:n.rangeChunkSize,disableRange:n.disableRange,disableStream:n.disableStream})),e(t)})]).then(function(e){var t=_slicedToArray(e,2),a=t[0],i=t[1];if(r.destroyed)throw Error("Loading aborted");var s=new _message_handler.MessageHandler(l,a,o.port),u=new WorkerTransport(s,r,i,n);r._transport=u,s.send("Ready",null)})}).catch(r._capability.reject),r}function _fetchDocument(e,t,r,n){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){return(_fetchDocument2=_asyncToGenerator(_regenerator.default.mark(function e(t,r,n,a){var o;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.destroyed){e.next=2;break}throw Error("Worker was destroyed");case 2:return n&&(r.length=n.length,r.initialData=n.initialData,r.progressiveDone=n.progressiveDone,r.contentDispositionFilename=n.contentDispositionFilename),e.next=5,t.messageHandler.sendWithPromise("GetDocRequest",{docId:a,apiVersion:"2.12.313",source:{data:r.data,url:r.url,password:r.password,disableAutoFetch:r.disableAutoFetch,rangeChunkSize:r.rangeChunkSize,length:r.length},maxImageSize:r.maxImageSize,disableFontFace:r.disableFontFace,docBaseUrl:r.docBaseUrl,ignoreErrors:r.ignoreErrors,isEvalSupported:r.isEvalSupported,fontExtraProperties:r.fontExtraProperties,enableXfa:r.enableXfa,useSystemFonts:r.useSystemFonts,cMapUrl:r.useWorkerFetch?r.cMapUrl:null,standardFontDataUrl:r.useWorkerFetch?r.standardFontDataUrl:null});case 5:if(o=e.sent,!t.destroyed){e.next=8;break}throw Error("Worker was destroyed");case 8:return e.abrupt("return",o);case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;var PDFDocumentLoadingTask=function(){function e(){_classCallCheck(this,e),this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d".concat(e.idCounters.doc++),this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}return _createClass(e,[{key:"promise",get:function(){return this._capability.promise}},{key:"destroy",value:function(){var e=_asyncToGenerator(_regenerator.default.mark(function e(){var t;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.destroyed=!0,e.next=3,null===(t=this._transport)||void 0===t?void 0:t.destroy();case 3:this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null);case 5:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}],[{key:"idCounters",get:function(){return(0,_util.shadow)(this,"idCounters",{doc:0})}}]),e}();exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;var PDFDataRangeTransport=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,e),this.length=t,this.initialData=r,this.progressiveDone=n,this.contentDispositionFilename=a,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;)(0,r.value)(e,t)}catch(e){n.e(e)}finally{n.f()}}},{key:"onDataProgress",value:function(e,t){var r=this;this._readyCapability.promise.then(function(){var n,a=_createForOfIteratorHelper(r._progressListeners);try{for(a.s();!(n=a.n()).done;)(0,n.value)(e,t)}catch(e){a.e(e)}finally{a.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;)(0,r.value)(e)}catch(e){n.e(e)}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;)(0,t.value)()}catch(e){r.e(e)}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){var n=this;_classCallCheck(this,e),this._pdfInfo=t,this._transport=r,Object.defineProperty(this,"fingerprint",{get:function(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, please use `PDFDocumentProxy.fingerprints` instead."),this.fingerprints[0]}}),Object.defineProperty(this,"getStats",{value:function(){var e=_asyncToGenerator(_regenerator.default.mark(function e(){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(0,_display_utils.deprecated)("`PDFDocumentProxy.getStats`, please use the `PDFDocumentProxy.stats`-getter instead."),e.abrupt("return",n.stats||{streamTypes:{},fontTypes:{}});case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}()})}return _createClass(e,[{key:"annotationStorage",get:function(){return this._transport.annotationStorage}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function(){return this._pdfInfo.fingerprints}},{key:"stats",get:function(){return this._transport.stats}},{key:"isPureXfa",get:function(){return!!this._transport._htmlForXfa}},{key:"allXfaHtml",get:function(){return this._transport._htmlForXfa}},{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:"getJSActions",value:function(){return this._transport.getDocJSActions()}},{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:"getMarkInfo",value:function(){return this._transport.getMarkInfo()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(e||this.isPureXfa)}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}},{key:"saveDocument",value:function(){return this._transport.annotationStorage.size<=0&&(0,_display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this._transport.saveDocument()}},{key:"getFieldObjects",value:function(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function(){return this._transport.getCalculationOrderIds()}}]),e}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function e(t,r,n,a){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];_classCallCheck(this,e),this._pageIndex=t,this._pageInfo=r,this._ownerDocument=a,this._transport=n,this._stats=o?new _display_utils.StatTimer:null,this._pdfBug=o,this.commonObjs=n.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this._annotationPromises=new Map,this.destroyed=!1}return _createClass(e,[{key:"pageNumber",get:function(){return this._pageIndex+1}},{key:"rotate",get:function(){return this._pageInfo.rotate}},{key:"ref",get:function(){return this._pageInfo.ref}},{key:"userUnit",get:function(){return this._pageInfo.userUnit}},{key:"view",get:function(){return this._pageInfo.view}},{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,a=e.offsetX,o=void 0===a?0:a,i=e.offsetY,s=void 0===i?0:i,u=e.dontFlip,l=void 0!==u&&u;return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:n,offsetX:o,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?"display":t,n=this._transport.getRenderingIntent
1(r),a=this._annotationPromises.get(n.cacheKey);return a||(a=this._transport.getAnnotations(this._pageIndex,n.renderingIntent),this._annotationPromises.set(n.cacheKey,a),a=a.then(function(e){var t,r=_createForOfIteratorHelper(e);try{var n=function(){var e=t.value;void 0!==e.titleObj&&Object.defineProperty(e,"title",{get:function(){return(0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead."),e.titleObj.str}}),void 0!==e.contentsObj&&Object.defineProperty(e,"contents",{get:function(){return(0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead."),e.contentsObj.str}})};for(r.s();!(t=r.n()).done;)n()}catch(e){r.e(e)}finally{r.f()}return e})),a}},{key:"getJSActions",value:function(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}},{key:"getXfa",value:function(){var e=_asyncToGenerator(_regenerator.default.mark(function e(){var t;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(null===(t=this._transport._htmlForXfa)||void 0===t?void 0:t.children[this._pageIndex])||null);case 1:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(e){var t,r,n,a=this,o=e.canvasContext,i=e.viewport,s=e.intent,u=void 0===s?"display":s,l=e.annotationMode,c=void 0===l?_util.AnnotationMode.ENABLE:l,f=e.transform,d=void 0===f?null:f,h=e.imageLayer,p=void 0===h?null:h,v=e.canvasFactory,y=void 0===v?null:v,m=e.background,g=void 0===m?null:m,b=e.optionalContentConfigPromise,_=void 0===b?null:b,S=e.annotationCanvasMap,A=void 0===S?null:S;(null===(t=arguments[0])||void 0===t?void 0:t.renderInteractiveForms)!==void 0&&((0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead."),!0===arguments[0].renderInteractiveForms&&c===_util.AnnotationMode.ENABLE&&(c=_util.AnnotationMode.ENABLE_FORMS)),(null===(r=arguments[0])||void 0===r?void 0:r.includeAnnotationStorage)!==void 0&&((0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead."),!0===arguments[0].includeAnnotationStorage&&c===_util.AnnotationMode.ENABLE&&(c=_util.AnnotationMode.ENABLE_STORAGE)),this._stats&&this._stats.time("Overall");var k=this._transport.getRenderingIntent(u,c);this.pendingCleanup=!1,_||(_=this._transport.getOptionalContentConfig());var w=this._intentStates.get(k.cacheKey);w||(w=Object.create(null),this._intentStates.set(k.cacheKey,w)),w.streamReaderCancelTimeout&&(clearTimeout(w.streamReaderCancelTimeout),w.streamReaderCancelTimeout=null);var x=y||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),C=!!(k.renderingIntent&_util.RenderingIntentFlag.PRINT);w.displayReadyCapability||(w.displayReadyCapability=(0,_util.createPromiseCapability)(),w.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(k));var P=function(e){w.renderTasks.delete(T),(a.cleanupAfterRender||C)&&(a.pendingCleanup=!0),a._tryCleanup(),e?(T.capability.reject(e),a._abortOperatorList({intentState:w,reason:e instanceof Error?e:Error(e)})):T.capability.resolve(),a._stats&&(a._stats.timeEnd("Rendering"),a._stats.timeEnd("Overall"))},T=new InternalRenderTask({callback:P,params:{canvasContext:o,viewport:i,transform:d,imageLayer:p,background:g},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:A,operatorList:w.operatorList,pageIndex:this._pageIndex,canvasFactory:x,useRequestAnimationFrame:!C,pdfBug:this._pdfBug});((n=w).renderTasks||(n.renderTasks=new Set)).add(T);var R=T.task;return Promise.all([w.displayReadyCapability.promise,_]).then(function(e){var t=_slicedToArray(e,2),r=t[0],n=t[1];if(a.pendingCleanup){P();return}a._stats&&a._stats.time("Rendering"),T.initializeGraphics({transparency:r,optionalContentConfig:n}),T.operatorListChanged()}).catch(P),R}},{key:"getOperatorList",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.intent,a=void 0===n?"display":n,o=r.annotationMode,i=void 0===o?_util.AnnotationMode.ENABLE:o;function s(){l.operatorList.lastChunk&&(l.opListReadCapability.resolve(l.operatorList),l.renderTasks.delete(e))}
1var u=this._transport.getRenderingIntent(a,i,!0),l=this._intentStates.get(u.cacheKey);return l||(l=Object.create(null),this._intentStates.set(u.cacheKey,l)),l.opListReadCapability||((e=Object.create(null)).operatorListChanged=s,l.opListReadCapability=(0,_util.createPromiseCapability)(),((t=l).renderTasks||(t.renderTasks=new Set)).add(e),l.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(u)),l.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,a=void 0!==n&&n,o=e.includeMarkedContent,i=void 0!==o&&o,s=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===r,combineTextItems:!0!==a,includeMarkedContent:!0===i},{highWaterMark:s,size:function(e){return e.items.length}})}},{key:"getTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(function(e){return _xfa_text.XfaText.textContent(e)});var t=this.streamTextContent(e);return new Promise(function(e,r){function n(){a.read().then(function(t){var r,a=t.value;if(t.done){e(o);return}Object.assign(o.styles,a.styles),(r=o.items).push.apply(r,_toConsumableArray(a.items)),n()},r)}var a=t.getReader(),o={items:[],styles:Object.create(null)};n()})}},{key:"getStructTree",value:function(){return this._structTreePromise||(this._structTreePromise=this._transport.getStructTree(this._pageIndex))}},{key:"_destroy",value:function(){this.destroyed=!0;var e,t=[],r=_createForOfIteratorHelper(this._intentStates.values());try{for(r.s();!(e=r.n()).done;){var n=e.value;if(this._abortOperatorList({intentState:n,reason:Error("Page was destroyed."),force:!0}),!n.opListReadCapability){var a,o=_createForOfIteratorHelper(n.renderTasks);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.push(i.completed),i.cancel()}}catch(e){o.e(e)}finally{o.f()}}}}catch(e){r.e(e)}finally{r.f()}return this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=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,a=n.renderTasks,o=n.operatorList;if(a.size>0||!o.lastChunk)return!1}}catch(e){r.e(e)}finally{r.f()}return this._intentStates.clear(),this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=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;r<n;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk;var a,o=_createForOfIteratorHelper(t.renderTasks);try{for(o.s();!(a=o.n()).done;)a.value.operatorListChanged()}catch(e){o.e(e)}finally{o.f()}e.lastChunk&&this._tryCleanup()}},{key:"_pumpOperatorList",value:function(e){var t=this,r=e.renderingIntent,n=e.cacheKey,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:r,cacheKey:n,annotationStorage:r&_util.RenderingIntentFlag.ANNOTATIONS_STORAGE?this._transport.annotationStorage.serializable:null}).getReader(),o=this._intentStates.get(n);o.streamReader=a,function e(){a.read().then(function(r){var n=r.value;if(r.done){o.streamReader=null;return}t._transport.destroyed||(t._renderPageChunk(n,o),e())}
1,function(e){if(o.streamReader=null,!t._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;var r,n=_createForOfIteratorHelper(o.renderTasks);try{for(n.s();!(r=n.n()).done;)r.value.operatorListChanged()}catch(e){n.e(e)}finally{n.f()}t._tryCleanup()}if(o.displayReadyCapability)o.displayReadyCapability.reject(e);else if(o.opListReadCapability)o.opListReadCapability.reject(e);else throw e}})}()}},{key:"_abortOperatorList",value:function(e){var t=this,r=e.intentState,n=e.reason,a=e.force,o=void 0!==a&&a;if(r.streamReader){if(!o){if(r.renderTasks.size>0)return;if(n instanceof _display_utils.RenderingCancelledException){r.streamReaderCancelTimeout=setTimeout(function(){t._abortOperatorList({intentState:r,reason:n,force:!0}),r.streamReaderCancelTimeout=null},RENDERING_CANCELLED_TIMEOUT);return}}if(r.streamReader.cancel(new _util.AbortException(n.message)).catch(function(){}),r.streamReader=null,!this._transport.destroyed){var i,s=_createForOfIteratorHelper(this._intentStates);try{for(s.s();!(i=s.n()).done;){var u=_slicedToArray(i.value,2),l=u[0];if(u[1]===r){this._intentStates.delete(l);break}}}catch(e){s.e(e)}finally{s.f()}this.cleanup()}}}},{key:"stats",get:function(){return this._stats}}]),e}();exports.PDFPageProxy=PDFPageProxy;var LoopbackPort=function(){function e(){_classCallCheck(this,e),this._listeners=[],this._deferred=Promise.resolve()}return _createClass(e,[{key:"postMessage",value:function(e,t){var r=this,n={data:function(e){if(globalThis.structuredClone)return globalThis.structuredClone(e,t);function r(e){if("function"==typeof e||"symbol"===_typeof(e)||e instanceof URL)throw Error("LoopbackPort.postMessage - cannot clone: ".concat(null==e?void 0:e.toString()));if("object"!==_typeof(e)||null===e)return e;if(n.has(e))return n.get(e);if((a=e.buffer)&&(0,_util.isArrayBuffer)(a))return o=null!=t&&t.includes(a)?new e.constructor(a,e.byteOffset,e.byteLength):new e.constructor(e),n.set(e,o),o;if(e instanceof Map){o=new Map,n.set(e,o);var a,o,i,s=_createForOfIteratorHelper(e);try{for(s.s();!(i=s.n()).done;){var u=_slicedToArray(i.value,2),l=u[0],c=u[1];o.set(l,r(c))}}catch(e){s.e(e)}finally{s.f()}return o}if(e instanceof Set){o=new Set,n.set(e,o);var f,d=_createForOfIteratorHelper(e);try{for(d.s();!(f=d.n()).done;){var h=f.value;o.add(r(h))}}catch(e){d.e(e)}finally{d.f()}return o}for(var p in o=Array.isArray(e)?[]:Object.create(null),n.set(e,o),e){for(var v,y=void 0,m=e;!(y=Object.getOwnPropertyDescriptor(m,p));)m=Object.getPrototypeOf(m);void 0!==y.value&&("function"!=typeof y.value||null!==(v=e.hasOwnProperty)&&void 0!==v&&v.call(e,p))&&(o[p]=r(y.value))}return o}var n=new WeakMap;return r(e)}(e)};this._deferred.then(function(){var e,t=_createForOfIteratorHelper(r._listeners);try{for(t.s();!(e=t.n()).done;)e.value.call(r,n)}catch(e){t.e(e)}finally{t.f()}})}},{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 PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(_is_node.isNodeJS)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if(("undefined"==typeof document?"undefined":_typeof(document))==="object"){var createPDFNetworkStream,_document,_document$currentScri,pdfjsFilePath=null===(_document=document)||void 0===_document?void 0:null===(_document$currentScri=_document.currentScript)||void 0===_document$currentScri?void 0:_document$currentScri.src;pdfjsFilePath&&(PDFWorkerUtil.fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.createCDNWrapper=function(e){var t='importScripts("'.concat(e,'");');return URL.createObjectURL(new Blob([t]))};var PDFWorker=function(){function PDFWorker(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,r=void 0===t?null:t,n=e.port,a=void 0===n?null:n,o=e.verbosity,i=void 0===o?(0,_util.getVerbosityLevel)():o;if(_classCallCheck(this,PDFWorker),a&&PDFWorker._workerPorts.has(a))throw Error("Cannot use more than one PDFWorker per port.");if(this.name=r,this.destroyed=!1,this.verbosity=i,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,a){PDFWorker._workerPorts.set(a,this),this._initializeFromPort(a);return}this._initialize()}return _createClass(PDFWorker,[{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}},{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&&!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){var t=PDFWorker.workerSrc;try{(0,_util.isSameOrigin)(window.location.href,t)||(t=PDFWorkerUtil.createCDNWrapper(new URL(t,window.location).href));var r=new Worker(t),n=new _message_handler.MessageHandler("main","worker",r),a=function(){r.removeEventListener("error",o),n.destroy(),r.terminate(),e.destroyed?e._readyCapability.reject(Error("Worker was destroyed")):e._setupFakeWorker()},o=function(){e._webWorker||a()};r.addEventListener("error",o),n.on("test",function(t){if(r.removeEventListener("error",o),e.destroyed){a();return}t?(e._messageHandler=n,e._port=r,e._webWorker=r,e._readyCapability.resolve(),n.send("configure",{verbosity:e.verbosity})):(e._setupFakeWorker(),n.destroy(),r.terminate())}),n.on("ready",function(t){if(r.removeEventListener("error",o),e.destroyed){a();return}try{i()}catch(t){e._setupFakeWorker()}});var i=function(){var e=new Uint8Array([255]);try{n.send("test",e,[e.buffer])}catch(t){(0,_util.warn)("Cannot use postMessage transfers."),e[0]=0,n.send("test",e)}};i();return}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var e=this;PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then(function(t){if(e.destroyed){e._readyCapability.reject(Error("Worker was destroyed"));return}var r=new LoopbackPort;e._port=r;var n="fake".concat(PDFWorkerUtil.fakeWorkerId++),a=new _message_handler.MessageHandler(n+"_worker",n,r);t.setup(a,r);var o=new _message_handler.MessageHandler(n,n+"_worker",r);e._messageHandler=o,e._readyCapability.resolve(),o.send("configure",{verbosity:e.verbosity})}).catch(function(t){e._readyCapability.reject(Error('Setting up fake worker failed: "'.concat(t.message,'".')))})}},{key:"destroy",value:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),PDFWorker._workerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}}],[{key:"_workerPorts",get:function(){return(0,_util.shadow)(this,"_workerPorts",new WeakMap)}},{key:"fromPort",value:function(e){if(!(null!=e&&e.port))throw Error("PDFWorker.fromPort - invalid method signature.");return this._workerPorts.has(e.port)?this._workerPorts.get(e.port):new PDFWorker(e)}},{key:"workerSrc",get:function(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw Error('No "GlobalWorkerOptions.workerSrc" specified.')}},{key:"_mainThreadWorkerMessageHandler",get:function(){try{var e;return(null===(e=globalThis.pdfjsWorker)||void 0===e?void 0:e.WorkerMessageHandler)||null}catch(e){return null}}},{key:"_setupFakeWorkerGlobal",get:function get(){var _this11=this,loader=function(){var _ref15=_asyncToGenerator(_regenerator.default.mark(function _callee4(){var mainWorkerMessageHandler,worker;return _regenerator.default.wrap(function _callee4$(_context4){for(;;)switch(_context4.prev=_context4.next){case 0:if(mainWorkerMessageHandler=_this11._mainThreadWorkerMessageHandler,!mainWorkerMessageHandler){_context4.next=3;break}return _context4.abrupt("return",mainWorkerMessageHandler);case 3:if(!_is_node.isNodeJS){_context4.next=6;break}return worker=eval("require")(_this11.workerSrc),_context4.abrupt("return",worker.WorkerMessageHandler);case 6:return _context4.next=8,(0,_display_utils.loadScript)(_this11.workerSrc);case 8:return _context4.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context4.stop()}},_callee4)}));return function(){return _ref15.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}]),PDFWorker}();exports.PDFWorker=PDFWorker,PDFWorker.getWorkerSrc=function(){return(0,_display_utils.deprecated)("`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead."),this.workerSrc};var _docStats=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_metadataPromise=new WeakMap,WorkerTransport=function(){function e(t,r,n,a){_classCallCheck(this,e),_classPrivateFieldInitSpec(this,_docStats,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,_pageCache,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_pagePromises,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_metadataPromise,{writable:!0,value:null}),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:a.ownerDocument,styleElement:a.styleElement}),this._params=a,a.useWorkerFetch||(this.CMapReaderFactory=new a.CMapReaderFactory({baseUrl:a.cMapUrl,isCompressed:a.cMapPacked}),this.StandardFontDataFactory=new a.StandardFontDataFactory({baseUrl:a.standardFontDataUrl})),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}return _createClass(e,[{key:"annotationStorage",get:function(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"stats",get:function(){return _classPrivateFieldGet(this,_docStats)}},{key:"getRenderingIntent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=_util.RenderingIntentFlag.DISPLAY,a="";switch(e){case"any":n=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":n=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(e))}switch(t){case _util.AnnotationMode.DISABLE:n+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:n+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:n+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,a=this.annotationStorage.lastModified;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(t))}return r&&(n+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:n,cacheKey:"".concat(n,"_").concat(a)}}},{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(Error("Worker was destroyed during onPassword callback"));var t,r=[],n=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values());try{for(n.s();!(t=n.n()).done;){var a=t.value;r.push(a._destroy())}}catch(e){n.e(e)}finally{n.f()}_classPrivateFieldGet(this,_pageCache).clear(),_classPrivateFieldGet(this,_pagePromises).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();
1var o=this.messageHandler.sendWithPromise("Terminate",null);return r.push(o),Promise.all(r).then(function(){e.commonObjs.clear(),e.fontLoader.clear(),_classPrivateFieldSet(e,_metadataPromise,null),e._getFieldObjectsPromise=null,e._hasJSActionsPromise=null,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;if(e.done){r.close();return}(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)(),a=e._fullReader;return a.headersReady.then(function(){if(!a.isStreamingSupported||!a.isRangeSupported){if(e._lastProgress){var t;null===(t=r.onProgress)||void 0===t||t.call(r,e._lastProgress)}a.onProgress=function(e){var t;null===(t=r.onProgress)||void 0===t||t.call(r,{loaded:e.loaded,total:e.total})}}n.resolve({isStreamingSupported:a.isStreamingSupported,isRangeSupported:a.isRangeSupported,contentLength:a.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);if(!n){r.close();return}r.onPull=function(){n.read().then(function(e){var t=e.value;if(e.done){r.close();return}(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})}}),t.on("GetDoc",function(t){var n=t.pdfInfo;e._numPages=n.numPages,e._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,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;default:(0,_util.unreachable)("DocException - expected a valid Error.")}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(t){e._passwordCapability.reject(t)}}else e._passwordCapability.reject(new _util.PasswordException(t.message,t.code));return e._passwordCapability.promise}),t.on("DataLoaded",function(t){var n;null===(n=r.onProgress)||void 0===n||n.call(r,{loaded:t.length,total:t.length}),e.downloadInfoCapability.resolve(t)}),t.on("StartRenderPage",function(t){e.destroyed||_classPrivateFieldGet(e,_pageCache).get(t.pageIndex)._startRenderPage(t.transparency,t.cacheKey)}),t.on("commonobj",function(r){var n,a=_slicedToArray(r,3),o=a[0],i=a[1],s=a[2];if(!(e.destroyed||e.commonObjs.has(o)))switch(i){case"Font":var u=e._params;if("error"in s){var l=s.error;(0,_util.warn)("Error during font loading: ".concat(l)),e.commonObjs.resolve(o,l);break}var c=null;u.pdfBug&&null!==(n=globalThis.FontInspector)&&void 0!==n&&n.enabled&&(c={registerFont:function(e,t){globalThis.FontInspector.fontAdded(e,t)}});var f=new _font_loader.FontFaceObject(s,{isEvalSupported:u.isEvalSupported,disableFontFace:u.disableFontFace,ignoreErrors:u.ignoreErrors,onUnsupportedFeature:e._onUnsupportedFeature.bind(e),fontRegistry:c});
1e.fontLoader.bind(f).catch(function(e){return t.sendWithPromise("FontFallback",{id:o})}).finally(function(){!u.fontExtraProperties&&f.data&&(f.data=null),e.commonObjs.resolve(o,f)});break;case"FontPath":case"Image":e.commonObjs.resolve(o,s);break;default:throw Error("Got unknown common object type ".concat(i))}}),t.on("obj",function(t){var r,n=_slicedToArray(t,4),a=n[0],o=n[1],i=n[2],s=n[3];if(!e.destroyed){var u=_classPrivateFieldGet(e,_pageCache).get(o);if(!u.objs.has(a))switch(i){case"Image":u.objs.resolve(a,s);var l=8e6;(null==s?void 0:null===(r=s.data)||void 0===r?void 0:r.length)>l&&(u.cleanupAfterRender=!0);break;case"Pattern":u.objs.resolve(a,s);break;default:throw Error("Got unknown object type ".concat(i))}}}),t.on("DocProgress",function(t){var n;e.destroyed||null===(n=r.onProgress)||void 0===n||n.call(r,{loaded:t.loaded,total:t.total})}),t.on("DocStats",function(t){e.destroyed||_classPrivateFieldSet(e,_docStats,Object.freeze({streamTypes:Object.freeze(t.streamTypes),fontTypes:Object.freeze(t.fontTypes)}))}),t.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),t.on("FetchBuiltInCMap",function(t){return e.destroyed?Promise.reject(Error("Worker was destroyed.")):e.CMapReaderFactory?e.CMapReaderFactory.fetch(t):Promise.reject(Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))}),t.on("FetchStandardFontData",function(t){return e.destroyed?Promise.reject(Error("Worker was destroyed.")):e.StandardFontDataFactory?e.StandardFontDataFactory.fetch(t):Promise.reject(Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))})}},{key:"_onUnsupportedFeature",value:function(e){var t,r,n=e.featureId;this.destroyed||null===(t=(r=this.loadingTask).onUnsupportedFeature)||void 0===t||t.call(r,n)}},{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(Error("Invalid page request"));var r=e-1,n=_classPrivateFieldGet(this,_pagePromises).get(r);if(n)return n;var a=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then(function(e){if(t.destroyed)throw Error("Transport destroyed");var n=new PDFPageProxy(r,e,t,t._params.ownerDocument,t._params.pdfBug);return _classPrivateFieldGet(t,_pageCache).set(r,n),n});return _classPrivateFieldGet(this,_pagePromises).set(r,a),a}},{key:"getPageIndex",value:function(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e})}},{key:"getAnnotations",value:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}},{key:"saveDocument",value:function(){var e,t,r=this;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:null!==(e=null===(t=this._fullReader)||void 0===t?void 0:t.filename)&&void 0!==e?e:null}).finally(function(){r.annotationStorage.resetModified()})}},{key:"getFieldObjects",value:function(){return this._getFieldObjectsPromise||(this._getFieldObjectsPromise=this.messageHandler.sendWithPromise("GetFieldObjects",null))}},{key:"hasJSActions",value:function(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}},{key:"getCalculationOrderIds",value:function(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(e){return"string"!=typeof e?Promise.reject(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.sendWithProm
1ise("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:"getDocJSActions",value:function(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}},{key:"getPageJSActions",value:function(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}},{key:"getStructTree",value:function(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}},{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 _classPrivateFieldGet(this,_metadataPromise)||_classPrivateFieldSet(this,_metadataPromise,this.messageHandler.sendWithPromise("GetMetadata",null).then(function(t){var r,n,a,o;return{info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:null!==(r=null===(n=e._fullReader)||void 0===n?void 0:n.filename)&&void 0!==r?r:null,contentLength:null!==(a=null===(o=e._fullReader)||void 0===o?void 0:o.contentLength)&&void 0!==a?a:null}}))}},{key:"getMarkInfo",value:function(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:function(){var e=_asyncToGenerator(_regenerator.default.mark(function e(){var t,r,n,a,o=arguments;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]&&o[0],e.next=3,this.messageHandler.sendWithPromise("Cleanup",null);case 3:if(!this.destroyed){e.next=5;break}return e.abrupt("return");case 5:r=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values()),e.prev=6,r.s();case 8:if((n=r.n()).done){e.next=15;break}if((a=n.value).cleanup()){e.next=13;break}throw Error("startCleanup: Page ".concat(a.pageNumber," is currently rendering."));case 13:e.next=8;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(6),r.e(e.t0);case 20:return e.prev=20,r.f(),e.finish(20);case 23:this.commonObjs.clear(),t||this.fontLoader.clear(),_classPrivateFieldSet(this,_metadataPromise,null),this._getFieldObjectsPromise=null,this._hasJSActionsPromise=null;case 28:case"end":return e.stop()}},e,this,[[6,17,20,23]])}));return function(){return e.apply(this,arguments)}}()},{key:"loadingParams",get:function(){var e=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,enableXfa:e.enableXfa})}}]),e}(),PDFObjects=function(){function e(){_classCallCheck(this,e),this._objs=Object.create(null)}return _createClass(e,[{key:"_ensureObj",value:function(e){return this._objs[e]?this._objs[e]:this._objs[e]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}},{key:"get",value:function(e){var t=arguments.length>1&&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 Error("Requesting object that isn't resolved yet ".concat(e,"."));return r.data}},{key:"has",value:function(e){var t=this._objs[e];return(null==t?void 0:t.resolved)||!1}},{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:"promise",get:function(){return this._internalRenderTask.capability.promise}},{key:"cancel",value:function(){this._internalRenderTask.cancel()}}]),e}();exports.RenderTask=RenderTask;var InternalRenderTask=function(){function e(t){var r=t.callback,n=t.params,a=t.objs,o=t.commonObjs,i=t.annotationCanvasMap,s=t.o
1peratorList,u=t.pageIndex,l=t.canvasFactory,c=t.useRequestAnimationFrame,f=void 0!==c&&c,d=t.pdfBug,h=void 0!==d&&d;_classCallCheck(this,e),this.callback=r,this.params=n,this.objs=a,this.commonObjs=o,this.annotationCanvasMap=i,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=u,this.canvasFactory=l,this._pdfBug=h,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===f&&"undefined"!=typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=n.canvasContext.canvas}return _createClass(e,[{key:"completed",get:function(){return this.capability.promise.catch(function(){})}},{key:"initializeGraphics",value:function(t){var r,n=t.transparency,a=void 0!==n&&n,o=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(e.canvasInUse.has(this._canvas))throw Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");e.canvasInUse.add(this._canvas)}this._pdfBug&&null!==(r=globalThis.StepperManager)&&void 0!==r&&r.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var i=this.params,s=i.canvasContext,u=i.viewport,l=i.transform,c=i.imageLayer,f=i.background;this.gfx=new _canvas.CanvasGraphics(s,this.commonObjs,this.objs,this.canvasFactory,c,o,this.annotationCanvasMap),this.gfx.beginDrawing({transform:l,viewport:u,transparency:a,background:f}),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.canvasInUse.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function(){if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()}},{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._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}},{key:"_next",value:function(){var t=_asyncToGenerator(_regenerator.default.mark(function t(){return _regenerator.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cancelled){t.next=2;break}return t.abrupt("return");case 2:this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&e.canvasInUse.delete(this._canvas),this.callback()));case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}],[{key:"canvasInUse",get:function(){return(0,_util.shadow)(this,"canvasInUse",new WeakSet)}}]),e}(),version="2.12.313";exports.version=version;var build="a2ae56f39";exports.build=build},(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})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var a,o=s(r(2)),i=r(4);
1function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if("function"!=typeof t&&null!==t)throw 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})(e,t)}function c(e){var t=h();return function(){var r,n=p(e);return r=t?Reflect.construct(n,arguments,p(this).constructor):n.apply(this,arguments),f(this,r)}}function f(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,a)}function y(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){v(o,n,a,i,s,"next",e)}function s(e){v(o,n,a,i,s,"throw",e)}i(void 0)})}}function m(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=g(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function g(e,t){if(e){if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function A(e,t,r){return t&&S(e.prototype,t),r&&S(e,r),e}var k=function(){function e(t){var r=t.docId,n=t.onUnsupportedFeature,a=t.ownerDocument,o=void 0===a?globalThis.document:a;t.styleElement,_(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BaseFontLoader."),this.docId=r,this._onUnsupportedFeature=n,this._document=o,this.nativeFontFaces=[],this.styleElement=null}return A(e,[{key:"addNativeFontFace",value:function(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}},{key:"insertRule",value:function(e){var t=this.styleElement;t||((t=this.styleElement=this._document.createElement("style")).id="PDFJS_FONT_STYLE_TAG_".concat(this.docId),this._document.documentElement.getElementsByTagName("head")[0].appendChild(t));var r=t.sheet;r.insertRule(e,r.cssRules.length)}},{key:"clear",value:function(){var e,t=m(this.nativeFontFaces);try{for(t.s();!(e=t.n()).done;){var r=e.value;this._document.fonts.delete(r)}}catch(e){t.e(e)}finally{t.f()}this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"bind",value:function(){var e=y(o.default.mark(function e(t){var r,n,a=this;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.attached||t.missingFile)){e.next=2;break}return e.abrupt("return");case 2:if(t.attached=!0,!this.isFontLoadingAPISupported){e.next=19;break}if(!(r=t.createNativeFontFace())){e.next=18;break}return this.addNativeFontFace(r),e.prev=7,e.next=10,r.loaded;case 10:e.next=18;break;case 12:throw e.prev=12,e.t0=e.catch(7),this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontLoadNative}
1),(0,i.warn)("Failed to load font '".concat(r.family,"': '").concat(e.t0,"'.")),t.disableFontFace=!0,e.t0;case 18:return e.abrupt("return");case 19:if(!(n=t.createFontFaceRule())){e.next=26;break}if(this.insertRule(n),!this.isSyncFontLoadingSupported){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,new Promise(function(e){var r=a._queueLoadingCallback(e);a._prepareFontLoadEvent([n],[t],r)});case 26:case"end":return e.stop()}},e,this,[[7,12]])}));return function(t){return e.apply(this,arguments)}}()},{key:"_queueLoadingCallback",value:function(e){(0,i.unreachable)("Abstract method `_queueLoadingCallback`.")}},{key:"isFontLoadingAPISupported",get:function(){var e,t=!!(null!==(e=this._document)&&void 0!==e&&e.fonts);return(0,i.shadow)(this,"isFontLoadingAPISupported",t)}},{key:"isSyncFontLoadingSupported",get:function(){(0,i.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}},{key:"_loadTestFont",get:function(){(0,i.unreachable)("Abstract method `_loadTestFont`.")}},{key:"_prepareFontLoadEvent",value:function(e,t,r){(0,i.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}]),e}();t.FontLoader=a,t.FontLoader=a=function(e){u(r,e);var t=c(r);function r(e){var n;return _(this,r),(n=t.call(this,e)).loadingContext={requests:[],nextRequestId:0},n.loadTestFontId=0,n}return A(r,[{key:"isSyncFontLoadingSupported",get:function(){var e=!1;if("undefined"==typeof navigator)e=!0;else{var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);(null==t?void 0:t[1])>=14&&(e=!0)}return(0,i.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_queueLoadingCallback",value:function(e){function t(){for((0,i.assert)(!n.done,"completeRequest() cannot be called twice."),n.done=!0;r.requests.length>0&&r.requests[0].done;)setTimeout(r.requests.shift().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:"_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())}},{key:"_prepareFontLoadEvent",value:function(e,t,r){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,r,n){return e.substring(0,t)+n+e.substring(t+r)}var o=this._document.createElement("canvas");o.width=1,o.height=1;var s=o.getContext("2d"),u=0;function l(e,t){if(++u>30){(0,i.warn)("Load test font never loaded."),t();return}if(s.font="30px "+e,s.fillText(".",0,20),s.getImageData(0,0,1,1).data[3]>0){t();return}setTimeout(l.bind(null,e,t))}var c="lt".concat(Date.now()).concat(this.loadTestFontId++),f=this._loadTestFont;f=a(f,976,c.length,c);var d=16,h=1482184792,p=n(f,16);for(g=0,b=c.length-3;g<b;g+=4)p=p-h+n(c,g)|0;g<c.length&&(p=p-h+n(c+"XXX",g)|0),f=a(f,d,4,(0,i.string32)(p));var v="url(data:font/opentype;base64,".concat(btoa(f),");"),y='@font-face {font-family:"'.concat(c,'";src:').concat(v,"}");this.insertRule(y);var g,b,_,S=[],A=m(t);try{for(A.s();!(_=A.n()).done;){var k=_.value;S.push(k.loadedName)}}catch(e){A.e(e)}finally{A.f()}S.push(c);var w=this._document.createElement("div");
1w.style.visibility="hidden",w.style.width=w.style.height="10px",w.style.position="absolute",w.style.top=w.style.left="0px";for(var x=0,C=S;x<C.length;x++){var P=C[x],T=this._document.createElement("span");T.textContent="Hi",T.style.fontFamily=P,w.appendChild(T)}this._document.body.appendChild(w),l(c,function(){w.remove(),r.complete()})}}]),r}(k);var w=function(){function e(t,r){var n=r.isEvalSupported,a=void 0===n||n,o=r.disableFontFace,i=void 0!==o&&o,s=r.ignoreErrors,u=void 0!==s&&s,l=r.onUnsupportedFeature,c=r.fontRegistry,f=void 0===c?null:c;for(var d in _(this,e),this.compiledGlyphs=Object.create(null),t)this[d]=t[d];this.isEvalSupported=!1!==a,this.disableFontFace=!0===i,this.ignoreErrors=!0===u,this._onUnsupportedFeature=l,this.fontRegistry=f}return A(e,[{key:"createNativeFontFace",value:function(){if(!this.data||this.disableFontFace)return null;if(this.cssFontInfo){var e,t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else 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,t=(0,i.bytesToString)(this.data),r="url(data:".concat(this.mimetype,";base64,").concat(btoa(t),");");if(this.cssFontInfo){var n="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(n+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),e='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(n,"src:").concat(r,"}")}else e='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(r,"}");return this.fontRegistry&&this.fontRegistry.registerFont(this,r),e}},{key:"getPathGenerator",value:function(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];try{r=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e;return this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,i.warn)('getPathGenerator - ignoring character: "'.concat(e,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&i.IsEvalSupportedCached.value){var r,n,a=[],o=m(r);try{for(o.s();!(n=o.n()).done;){var s=n.value,u=void 0!==s.args?s.args.join(","):"";a.push("c.",s.cmd,"(",u,");\n")}}catch(e){o.e(e)}finally{o.f()}return this.compiledGlyphs[t]=Function("c","size",a.join(""))}return this.compiledGlyphs[t]=function(e,t){var n,a=m(r);try{for(a.s();!(n=a.n()).done;){var o=n.value;"scale"===o.cmd&&(o.args=[t,-t]),e[o.cmd].apply(e,o.args)}}catch(e){a.e(e)}finally{a.f()}}}}]),e}();t.FontFaceObject=w},(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})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var a=r(135),o=r(6),i=r(4);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}function l(e,t){if("function"!=typeof t&&null!==t)throw 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&&c(e,t)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=p();return function(){var r,n=v(e);return r=t?Reflect.construct(n,arguments,v(this).constructor):n.apply(this,arguments),d(this,r)}}function d(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return h(e)}function h(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var m=function e(){y(this,e),(0,i.unreachable)("Not implemented: NodeCanvasFactory")};t.NodeCanvasFactory=m;var g=function e(){y(this,e),(0,i.unreachable)("Not implemented: NodeCMapReaderFactory")};t.NodeCMapReaderFactory=g;var b=function e(){y(this,e),(0,i.unreachable)("Not implemented: NodeStandardFontDataFactory")};if(t.NodeStandardFontDataFactory=b,o.isNodeJS){var _=function(e){return new Promise(function(t,r){__webpack_require__(6131).readFile(e,function(e,n){if(e||!n){r(Error(e));return}
1t(new Uint8Array(n))})})};t.NodeCanvasFactory=m=function(e){l(r,e);var t=f(r);function r(){return y(this,r),t.apply(this,arguments)}return u(r,[{key:"_createCanvas",value:function(e,t){return __webpack_require__(4601).createCanvas(e,t)}}]),r}(a.BaseCanvasFactory),t.NodeCMapReaderFactory=g=function(e){l(r,e);var t=f(r);function r(){return y(this,r),t.apply(this,arguments)}return u(r,[{key:"_fetchData",value:function(e,t){return _(e).then(function(e){return{cMapData:e,compressionType:t}})}}]),r}(a.BaseCMapReaderFactory),t.NodeStandardFontDataFactory=b=function(e){l(r,e);var t=f(r);function r(){return y(this,r),t.apply(this,arguments)}return u(r,[{key:"_fetchData",value:function(e){return _(e)}}]),r}(a.BaseStandardFontDataFactory)}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationStorage=void 0;var n=r(4);function a(e,t){return l(e)||u(e,t)||i(e,t)||o()}function o(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r,n,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(r=a.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw n}}return o}}function l(e){if(Array.isArray(e))return e}function c(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}var h=function(){function e(){c(this,e),this._storage=new Map,this._timeStamp=Date.now(),this._modified=!1,this.onSetModified=null,this.onResetModified=null}return d(e,[{key:"getValue",value:function(e,t){var r=this._storage.get(e);return void 0===r?t:Object.assign(t,r)}},{key:"setValue",value:function(e,t){var r=this._storage.get(e),n=!1;if(void 0!==r)for(var o=0,i=Object.entries(t);o<i.length;o++){var s=a(i[o],2),u=s[0],l=s[1];r[u]!==l&&(n=!0,r[u]=l)}else n=!0,this._storage.set(e,t);n&&(this._timeStamp=Date.now(),this._setModified())}},{key:"getAll",value:function(){return this._storage.size>0?(0,n.objectFromMap)(this._storage):null}},{key:"size",get:function(){return this._storage.size}},{key:"_setModified",value:function(){this._modified||(this._modified=!0,"function"==typeof this.onSetModified&&this.onSetModified())}},{key:"resetModified",value:function(){this._modified&&(this._modified=!1,"function"==typeof this.onResetModified&&this.onResetModified())}},{key:"serializable",get:function(){return this._storage.size>0?this._storage:null}},{key:"lastModified",get:function(){return this._timeStamp.toString()}}]),e}();t.AnnotationStorage=h},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var n=r(4),a=r(141),o=r(1);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})(e)}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}function f(e,t){return y(e)||v(e,t)||h(e,t)||d()}
1function d(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){var r,n,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(r=a.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw n}}return o}}function y(e){if(Array.isArray(e))return e}var m=16,g=100,b=4096,_=15,S=10,A=!0,k=1e3,w=16,x=1.000001;function C(e,t){if(e._removeMirroring)throw Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=function(){e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,r){t.translate(e,r),this.__originalTranslate(e,r)},e.scale=function(e,r){t.scale(e,r),this.__originalScale(e,r)},e.transform=function(e,r,n,a,o,i){t.transform(e,r,n,a,o,i),this.__originalTransform(e,r,n,a,o,i)},e.setTransform=function(e,r,n,a,o,i){t.setTransform(e,r,n,a,o,i),this.__originalSetTransform(e,r,n,a,o,i)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,r){t.moveTo(e,r),this.__originalMoveTo(e,r)},e.lineTo=function(e,r){t.lineTo(e,r),this.__originalLineTo(e,r)},e.bezierCurveTo=function(e,r,n,a,o,i){t.bezierCurveTo(e,r,n,a,o,i),this.__originalBezierCurveTo(e,r,n,a,o,i)},e.rect=function(e,r,n,a){t.rect(e,r,n,a),this.__originalRect(e,r,n,a)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}function P(e){if(!e.mozCurrentTransform){e._originalSave=e.save,e._originalRestore=e.restore,e._originalRotate=e.rotate,e._originalScale=e.scale,e._originalTranslate=e.translate,e._originalTransform=e.transform,e._originalSetTransform=e.setTransform,e._originalResetTransform=e.resetTransform,e._transformMatrix=e._transformMatrix||[1,0,0,1,0,0],e._transformStack=[];try{var t=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"lineWidth");e._setLineWidth=t.set,e._getLineWidth=t.get,Object.defineProperty(e,"lineWidth",{set:function(e){this._setLineWidth(e*x)},get:function(){return this._getLineWidth()}})}catch(e){}Object.defineProperty(e,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(e,"mozCurrentTransformInverse",{get:function(){var e=f(this._transformMatrix,6),t=e[0],r=e[1],n=e[2],a=e[3],o=e[4],i=e[5],s=t*a-r*n,u=r*n-t*a;return[a/s,r/u,n/u,t/s,(a*o-n*i)/u,(r*o-t*i)/s]}}),e.save=function(){var e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},e.restore=function(){var e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},e.translate=function(e,t){var r=this._transformMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5],this._originalTranslate(e,t)},e.scale=function(e,t){var r=this._transformMatrix;r[0]*=e,r[1]*=e,r[2]*=t,r[3]*=t,this._originalScale(e,t)},e.transform=function(t,r,n,a,o,i){var s=this._transformMatrix;
1this._transformMatrix=[s[0]*t+s[2]*r,s[1]*t+s[3]*r,s[0]*n+s[2]*a,s[1]*n+s[3]*a,s[0]*o+s[2]*i+s[4],s[1]*o+s[3]*i+s[5]],e._originalTransform(t,r,n,a,o,i)},e.setTransform=function(t,r,n,a,o,i){this._transformMatrix=[t,r,n,a,o,i],e._originalSetTransform(t,r,n,a,o,i)},e.resetTransform=function(){this._transformMatrix=[1,0,0,1,0,0],e._originalResetTransform()},e.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),n=this._transformMatrix;this._transformMatrix=[n[0]*t+n[2]*r,n[1]*t+n[3]*r,-(n[0]*r)+n[2]*t,-(n[1]*r)+n[3]*t,n[4],n[5]],this._originalRotate(e)}}}var T=function(){function e(t){u(this,e),this.canvasFactory=t,this.cache=Object.create(null)}return c(e,[{key:"getCanvas",value:function(e,t,r,n){var a;return void 0!==this.cache[e]?(a=this.cache[e],this.canvasFactory.reset(a,t,r),a.context.setTransform(1,0,0,1,0,0)):(a=this.canvasFactory.create(t,r),this.cache[e]=a),n&&P(a.context),a}},{key:"clear",value:function(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}]),e}();function R(e){var t,r,n,a,o=1e3,i=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),s=e.width,u=e.height,l=s+1,c=new Uint8Array(l*(u+1)),f=s+7&-8,d=e.data,h=new Uint8Array(f*u),p=0;for(t=0,r=d.length;t<r;t++)for(var v=d[t],y=128;y>0;)h[p++]=v&y?0:255,y>>=1;var m=0;for(0!==h[p=0]&&(c[0]=1,++m),n=1;n<s;n++)h[p]!==h[p+1]&&(c[n]=h[p]?2:1,++m),p++;for(0!==h[p]&&(c[n]=2,++m),t=1;t<u;t++){p=t*f,a=t*l,h[p-f]!==h[p]&&(c[a]=h[p]?1:8,++m);var g=(h[p]?4:0)+(h[p-f]?8:0);for(n=1;n<s;n++)i[g=(g>>2)+(h[p+1]?4:0)+(h[p-f+1]?8:0)]&&(c[a+n]=i[g],++m),p++;if(h[p-f]!==h[p]&&(c[a+n]=h[p]?2:4,++m),m>o)return null}for(p=f*(u-1),a=t*l,0!==h[p]&&(c[a]=8,++m),n=1;n<s;n++)h[p]!==h[p+1]&&(c[a+n]=h[p]?4:8,++m),p++;if(0!==h[p]&&(c[a+n]=4,++m),m>o)return null;var b=new Int32Array([0,l,-1,0,-l,0,0,0,1]),_=[];for(t=0;m&&t<=u;t++){for(var S=t*l,A=S+s;S<A&&!c[S];)S++;if(S!==A){var k=[S%l,t],w=S,x=c[S];do{var C=b[x];do S+=C;while(!c[S]);var P=c[S];5!==P&&10!==P?(x=P,c[S]=0):(x=P&51*x>>4,c[S]&=x>>2|x<<2),k.push(S%l,S/l|0),!c[S]&&--m}while(w!==S);_.push(k),--t}}return function(e){e.save(),e.scale(1/s,-1/u),e.translate(0,-u),e.beginPath();for(var t=0,r=_.length;t<r;t++){var n=_[t];e.moveTo(n[0],n[1]);for(var a=2,o=n.length;a<o;a+=2)e.lineTo(n[a],n[a+1])}e.fill(),e.beginPath(),e.restore()}}var E=function(){function e(t,r){u(this,e),this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=n.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=n.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps=null,this.startNewPathAndClipBox([0,0,t,r])}return c(e,[{key:"clone",value:function(){var e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}},{key:"updatePathMinMax",value:function(e,t,r){var a=f(n.Util.applyTransform([t,r],e),2);t=a[0],r=a[1],this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,r)}},{key:"updateCurvePathMinMax",value:function(e,t,r,a,o,i,s,u,l){var c=n.Util.bezierBoundingBox(t,r,a,o,i,s,u,l);this.updatePathMinMax(e,c[0],c[1]),this.updatePathMinMax(e,c[2],c[3])}},{key:"getPathBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[this.minX,this.minY,this.maxX,this.maxY];if(e===a.PathType.STROKE){t||(0,n.unreachable)("Stroke bounding box must include transform.");var o=n.Util.singularValueDecompose2dScale(t),i=o[0]*this.lineWidth/2,s=o[1]*this.lineWidth/2;r[0]-=i,r[1]-=s,r[2]+=i,r[3]+=s}return r}},{key:"updateClipFromPath",value:function(){var e=n.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}},{key:"startNewPathAndClipBox",value:function(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}},{key:"getClippedPathBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}]),e}();function O(e,t){var r,a,o,i,s,u,l,c,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("undefined"!=typeof ImageData&&t instanceof ImageData){e.putImageData(t,0,0);return}var d,h=t.height,p=t.width,v=h%w,y=(h-v)/w,m=0===v?y:y+1,g=e.createImageData(p,w),b=0,_=t.data,S=g.data;if(f)switch(f.length){case 1:s=f[0],u=f[0],l=f[0],c=f[0];break;case 4:s=f[0],u=f[1],l=f[2],c=f[3]}if(t.kind===n.ImageKind.GRAYSCALE_1BPP){var A=_.byteLength,k=new Uint32Array(S.buffer,0,S.byteLength>>2),x=k.length,C=p+7>>3,P=4294967295,T=n.IsLittleEndianCached.value?4278190080:255;if(c&&255===c[0]&&0===c[255]){var R=[T,P];P=R[0],T=R[1]}for(r=0;r<m;
1r++){for(a=0,o=r<y?w:v,d=0;a<o;a++){for(var E=A-b,O=0,F=E>C?p:8*E-7,M=-8&F,I=0,j=0;O<M;O+=8)j=_[b++],k[d++]=128&j?P:T,k[d++]=64&j?P:T,k[d++]=32&j?P:T,k[d++]=16&j?P:T,k[d++]=8&j?P:T,k[d++]=4&j?P:T,k[d++]=2&j?P:T,k[d++]=1&j?P:T;for(;O<F;O++)0===I&&(j=_[b++],I=128),k[d++]=j&I?P:T,I>>=1}for(;d<x;)k[d++]=0;e.putImageData(g,0,r*w)}}else if(t.kind===n.ImageKind.RGBA_32BPP){var L=!!(s||u||l);for(r=0,a=0,i=p*w*4;r<y;r++){if(S.set(_.subarray(b,b+i)),b+=i,L)for(var D=0;D<i;D+=4)s&&(S[D+0]=s[S[D+0]]),u&&(S[D+1]=u[S[D+1]]),l&&(S[D+2]=l[S[D+2]]);e.putImageData(g,0,a),a+=w}if(r<m){if(i=p*v*4,S.set(_.subarray(b,b+i)),L)for(var N=0;N<i;N+=4)s&&(S[N+0]=s[S[N+0]]),u&&(S[N+1]=u[S[N+1]]),l&&(S[N+2]=l[S[N+2]]);e.putImageData(g,0,a)}}else if(t.kind===n.ImageKind.RGB_24BPP){var B=!!(s||u||l);for(r=0,i=p*(o=w);r<m;r++){for(r>=y&&(i=p*(o=v)),d=0,a=i;a--;)S[d++]=_[b++],S[d++]=_[b++],S[d++]=_[b++],S[d++]=255;if(B)for(var U=0;U<d;U+=4)s&&(S[U+0]=s[S[U+0]]),u&&(S[U+1]=u[S[U+1]]),l&&(S[U+2]=l[S[U+2]]);e.putImageData(g,0,r*w)}}else throw Error("bad image kind: ".concat(t.kind))}function F(e,t){for(var r=t.height,n=t.width,a=r%w,o=(r-a)/w,i=0===a?o:o+1,s=e.createImageData(n,w),u=0,l=t.data,c=s.data,f=0;f<i;f++){for(var d=f<o?w:a,h=3,p=0;p<d;p++)for(var v=void 0,y=0,m=0;m<n;m++)y||(v=l[u++],y=128),c[h]=v&y?0:255,h+=4,y>>=1;e.putImageData(s,0,f*w)}}function M(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,a=r.length;n<a;n++){var o=r[n];void 0!==e[o]&&(t[o]=e[o])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function I(e){e.strokeStyle="#000000",e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0)}function j(e,t,r,n){for(var a=e.length,o=3;o<a;o+=4){var i=e[o];if(0===i)e[o-3]=t,e[o-2]=r,e[o-1]=n;else if(i<255){var s=255-i;e[o-3]=e[o-3]*i+t*s>>8,e[o-2]=e[o-2]*i+r*s>>8,e[o-1]=e[o-1]*i+n*s>>8}}}function L(e,t,r){for(var n=e.length,a=1/255,o=3;o<n;o+=4){var i=r?r[e[o]]:e[o];t[o]=t[o]*i*a|0}}function D(e,t,r){for(var n=e.length,a=3;a<n;a+=4){var o=77*e[a-3]+152*e[a-2]+28*e[a-1];t[a]=r?t[a]*r[o>>8]>>8:t[a]*o>>16}}function N(e,t,r,n,a,o,i,s,u,l,c){var f,d=!!o,h=d?o[0]:0,p=d?o[1]:0,v=d?o[2]:0;f="Luminosity"===a?D:L;for(var y=Math.min(n,Math.ceil(1048576/r)),m=0;m<n;m+=y){var g=Math.min(y,n-m),b=e.getImageData(s-l,m+(u-c),r,g),_=t.getImageData(s,m+u,r,g);d&&j(b.data,h,p,v),f(b.data,_.data,i),t.putImageData(_,s,m+u)}}function B(e,t,r,n){var a=n[0],o=n[1],i=n[2]-a,s=n[3]-o;0!==i&&0!==s&&(N(t.context,r,i,s,t.subtype,t.backdrop,t.transferMap,a,o,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(r.canvas,0,0),e.restore())}function U(e,t){var r=n.Util.singularValueDecompose2dScale(e);r[0]=Math.fround(r[0]),r[1]=Math.fround(r[1]);var a=Math.fround((globalThis.devicePixelRatio||1)*o.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==t?t:r[0]<=a||r[1]<=a}var q=["butt","round","square"],W=["miter","round","bevel"],z={},G={},V=function(){function e(t,r,n,a,o,i,s){u(this,e),this.ctx=t,this.current=new E(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=r,this.objs=n,this.canvasFactory=a,this.imageLayer=o,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=[],this.optionalContentConfig=i,this.cachedCanvases=new T(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=s,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,t&&P(t),this._cachedGetSinglePixelWidth=null}return c(e,[{key:"beginDrawing",value:function(e){var t=e.transform,r=e.viewport,n=e.transparency,a=void 0!==n&&n,o=e.background,i=void 0===o?null:o,s=this.ctx.canvas.width,u=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=i||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,s,u),this.ctx.restore(
1),a){var l=this.cachedCanvases.getCanvas("transparent",s,u,!0);this.compositeCtx=this.ctx,this.transparentCanvas=l.canvas,this.ctx=l.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),I(this.ctx),t&&(this.ctx.transform.apply(this.ctx,t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform.apply(this.ctx,r.transform),this.viewportScale=r.scale,this.baseTransform=this.ctx.mozCurrentTransform.slice(),this._combinedScaleFactor=Math.hypot(this.baseTransform[0],this.baseTransform[2]),this.imageLayer&&this.imageLayer.beginLayout()}},{key:"executeOperatorList",value:function(e,t,r,a){var o=e.argsArray,i=e.fnArray,u=t||0,l=o.length;if(l===u)return u;for(var c=l-u>S&&"function"==typeof r,f=c?Date.now()+_:0,d=0,h=this.commonObjs,p=this.objs;;){if(void 0!==a&&u===a.nextBreakPoint)return a.breakIt(u,r),u;if((v=i[u])!==n.OPS.dependency)this[v].apply(this,o[u]);else{var v,y,m=s(o[u]);try{for(m.s();!(y=m.n()).done;){var g=y.value,b=g.startsWith("g_")?h:p;if(!b.has(g))return b.get(g,r),u}}catch(e){m.e(e)}finally{m.f()}}if(++u===l)return u;if(c&&++d>S){if(Date.now()>f)return r(),u;d=0}}}},{key:"endDrawing",value:function(){for(;this.stateStack.length||null!==this.current.activeSMask;)this.restore();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.cachedPatterns.clear(),this.imageLayer&&this.imageLayer.endLayout()}},{key:"_scaleImage",value:function(e,t){for(var r,n,a=e.width,o=e.height,i=Math.max(Math.hypot(t[0],t[1]),1),s=Math.max(Math.hypot(t[2],t[3]),1),u=a,l=o,c="prescale1";i>2&&u>1||s>2&&l>1;){var f=u,d=l;i>2&&u>1&&(f=Math.ceil(u/2),i/=u/f),s>2&&l>1&&(d=Math.ceil(l/2),s/=l/d),(n=(r=this.cachedCanvases.getCanvas(c,f,d)).context).clearRect(0,0,f,d),n.drawImage(e,0,0,u,l,0,0,f,d),e=r.canvas,u=f,l=d,c="prescale1"===c?"prescale2":"prescale1"}return{img:e,paintWidth:u,paintHeight:l}}},{key:"_createMaskCanvas",value:function(e){var t=this.ctx,r=e.width,o=e.height,i=this.current.fillColor,s=this.current.patternFill,u=this.cachedCanvases.getCanvas("maskCanvas",r,o);F(u.context,e);var l=t.mozCurrentTransform,c=n.Util.transform(l,[1/r,0,0,-1/o,0,0]);c=n.Util.transform(c,[1,0,0,1,0,-o]);var f=n.Util.applyTransform([0,0],c),d=n.Util.applyTransform([r,o],c),h=n.Util.normalizeRect([f[0],f[1],d[0],d[1]]),p=Math.ceil(h[2]-h[0]),v=Math.ceil(h[3]-h[1]),y=this.cachedCanvases.getCanvas("fillCanvas",p,v,!0),m=y.context,g=Math.min(f[0],d[0]),b=Math.min(f[1],d[1]);m.translate(-g,-b),m.transform.apply(m,c);var _=this._scaleImage(u.canvas,m.mozCurrentTransformInverse);m.imageSmoothingEnabled=U(m.mozCurrentTransform,e.interpolate),m.drawImage(_.img,0,0,_.img.width,_.img.height,0,0,r,o),m.globalCompositeOperation="source-in";var S=n.Util.transform(m.mozCurrentTransformInverse,[1,0,0,1,-g,-b]);return m.fillStyle=s?i.getPattern(t,this,S,a.PathType.FILL):i,m.fillRect(0,0,r,o),{canvas:y.canvas,offsetX:Math.round(g),offsetY:Math.round(b)}}},{key:"setLineWidth",value:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e}},{key:"setLineCap",value:function(e){this.ctx.lineCap=q[e]}},{key:"setLineJoin",value:function(e){this.ctx.lineJoin=W[e]}},{key:"setMiterLimit",value:function(e){this.ctx.miterLimit=e}},{key:"setDash",value:function(e,t){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){for(var t=0,r=e.length;t<r;t++){var n=e[t],a=n[0],o=n[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[0],o[1]);break;case"CA":this.current.strokeAlpha=n[1];break;case"ca":this.current.fillAlpha=n[1],this.ctx.globalAlpha=n[1];break;case"BM":this.ctx.globalCompositeOperation=o;break;case"SMask":this.current.activeSMask=o?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.current.transferMaps=o}}}},{key:"checkSMaskState",value:function(){var e=!!this.suspendedCtx;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function(){if(this.suspendedCtx)throw Error("beginSMaskMode called while already in smask mode");var e=this.ctx.canvas.width,t=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(r,e,t,!0);this.suspendedCtx=this.ctx,this.ctx=n.context;var a=this.ctx;a.setTransform.apply(a,this.suspendedCtx.mozCurrentTransform),M(this.suspendedCtx,a),C(a,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}},{key:"endSMaskMode",value:function(){if(!this.suspendedCtx)throw Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),M(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.current.activeSMask=null,this.suspendedCtx=null}},{key:"compose",value:function(e){if(this.current.activeSMask){e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var t=this.current.activeSMask;B(this.suspendedCtx,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore(
1)}}},{key:"save",value:function(){this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){0===this.stateStack.length&&this.current.activeSMask&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null)}},{key:"transform",value:function(e,t,r,n,a,o){this.ctx.transform(e,t,r,n,a,o),this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function(e,t){for(var r,a,o=this.ctx,i=this.current,s=i.x,u=i.y,l=0,c=0,f=e.length;l<f;l++)switch(0|e[l]){case n.OPS.rectangle:s=t[c++],u=t[c++];var d=t[c++],h=t[c++],p=s+d,v=u+h;o.moveTo(s,u),0===d||0===h?o.lineTo(p,v):(o.lineTo(p,u),o.lineTo(p,v),o.lineTo(s,v)),i.updatePathMinMax(o.mozCurrentTransform,s,u),i.updatePathMinMax(o.mozCurrentTransform,p,v),o.closePath();break;case n.OPS.moveTo:s=t[c++],u=t[c++],o.moveTo(s,u),i.updatePathMinMax(o.mozCurrentTransform,s,u);break;case n.OPS.lineTo:s=t[c++],u=t[c++],o.lineTo(s,u),i.updatePathMinMax(o.mozCurrentTransform,s,u);break;case n.OPS.curveTo:r=s,a=u,s=t[c+4],u=t[c+5],o.bezierCurveTo(t[c],t[c+1],t[c+2],t[c+3],s,u),i.updateCurvePathMinMax(o.mozCurrentTransform,r,a,t[c],t[c+1],t[c+2],t[c+3],s,u),c+=6;break;case n.OPS.curveTo2:r=s,a=u,o.bezierCurveTo(s,u,t[c],t[c+1],t[c+2],t[c+3]),i.updateCurvePathMinMax(o.mozCurrentTransform,r,a,s,u,t[c],t[c+1],t[c+2],t[c+3]),s=t[c+2],u=t[c+3],c+=4;break;case n.OPS.curveTo3:r=s,a=u,s=t[c+2],u=t[c+3],o.bezierCurveTo(t[c],t[c+1],s,u,s,u),i.updateCurvePathMinMax(o.mozCurrentTransform,r,a,t[c],t[c+1],s,u,s,u),c+=4;break;case n.OPS.closePath:o.closePath()}i.setCurrentPoint(s,u)}},{key:"closePath",value:function(){this.ctx.closePath()}},{key:"stroke",value:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.strokeColor;if(t.globalAlpha=this.current.strokeAlpha,this.contentVisible){if("object"===i(r)&&null!=r&&r.getPattern){var n=this.getSinglePixelWidth();t.save(),t.strokeStyle=r.getPattern(t,this,t.mozCurrentTransformInverse,a.PathType.STROKE),t.lineWidth=Math.max(n,this.current.lineWidth),t.stroke(),t.restore()}else{var o=this.getSinglePixelWidth();o<0&&-o>=this.current.lineWidth?(t.save(),t.resetTransform(),t.lineWidth=Math.round(this._combinedScaleFactor),t.stroke(),t.restore()):(t.lineWidth=Math.max(o,this.current.lineWidth),t.stroke())}}e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"fill",value:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.fillColor,n=this.current.patternFill,o=!1;n&&(t.save(),t.fillStyle=r.getPattern(t,this,t.mozCurrentTransformInverse,a.PathType.FILL),o=!0);var i=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==i&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),o&&t.restore(),e&&this.consumePath(i)}},{key:"eoFill",value:function(){this.pendingEOFill=!0,this.fill()}},{key:"fillStroke",value:function(){this.fill(!1),this.stroke(!1),this.consumePath()}},{key:"eoFillStroke",value:function(){this.pendingEOFill=!0,this.fillStroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}},{key:"endPath",value:function(){this.consumePath()}},{key:"clip",value:function(){this.pendingClip=z}},{key:"eoClip",value:function(){this.pendingClip=G}},{key:"beginText",value:function(){this.current.textMatrix=n.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"endText",value:function(){var e=this.pendingTextPaths,t=this.ctx;if(void 0===e){t.beginPath();return}t.save(),t.beginPath();for(var r=0;r<e.length;r++){var n=e[r];t.setTransform.apply(t,n.transform),t.translate(n.x,n.y),n.addToPath(t,n.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setFont",value:function(e,t){var r=this.commonObjs.get(e),a=this.current;if(!r)throw Error("Can't find font for ".concat(e));
1if(a.fontMatrix=r.fontMatrix||n.FONT_IDENTITY_MATRIX,(0===a.fontMatrix[0]||0===a.fontMatrix[3])&&(0,n.warn)("Invalid font matrix for font "+e),t<0?(t=-t,a.fontDirection=-1):a.fontDirection=1,this.current.font=r,this.current.fontSize=t,!r.isType3Font){var o=r.loadedName||"sans-serif",i="normal";r.black?i="900":r.bold&&(i="bold");var s=r.italic?"italic":"normal",u='"'.concat(o,'", ').concat(r.fallbackName),l=t;t<m?l=m:t>g&&(l=g),this.current.fontSizeScale=t/l,this.ctx.font="".concat(s," ").concat(i," ").concat(l,"px ").concat(u)}}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"moveText",value:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"setTextMatrix",value:function(e,t,r,n,a,o){this.current.textMatrix=[e,t,r,n,a,o],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function(e,t,r,a,o){var i,s=this.ctx,u=this.current,l=u.font,c=u.textRenderingMode,f=u.fontSize/u.fontSizeScale,d=c&n.TextRenderingMode.FILL_STROKE_MASK,h=!!(c&n.TextRenderingMode.ADD_TO_PATH_FLAG),p=u.patternFill&&!l.missingFile;(l.disableFontFace||h||p)&&(i=l.getPathGenerator(this.commonObjs,e)),l.disableFontFace||p?(s.save(),s.translate(t,r),s.beginPath(),i(s,f),a&&s.setTransform.apply(s,a),(d===n.TextRenderingMode.FILL||d===n.TextRenderingMode.FILL_STROKE)&&s.fill(),(d===n.TextRenderingMode.STROKE||d===n.TextRenderingMode.FILL_STROKE)&&(o&&(s.resetTransform(),s.lineWidth=Math.round(this._combinedScaleFactor)),s.stroke()),s.restore()):((d===n.TextRenderingMode.FILL||d===n.TextRenderingMode.FILL_STROKE)&&s.fillText(e,t,r),(d===n.TextRenderingMode.STROKE||d===n.TextRenderingMode.FILL_STROKE)&&(o?(s.save(),s.moveTo(t,r),s.resetTransform(),s.lineWidth=Math.round(this._combinedScaleFactor),s.strokeText(e,0,0),s.restore()):s.strokeText(e,t,r))),h&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:s.mozCurrentTransform,x:t,y:r,fontSize:f,addToPath:i})}},{key:"isFontSubpixelAAEnabled",get:function(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,r=!1,a=3;a<t.length;a+=4)if(t[a]>0&&t[a]<255){r=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",r)}},{key:"showText",value:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var o=t.fontSize;if(0!==o){var i=this.ctx,s=t.fontSizeScale,u=t.charSpacing,l=t.wordSpacing,c=t.fontDirection,f=t.textHScale*c,d=e.length,h=r.vertical,p=h?1:-1,v=r.defaultVMetrics,y=o*t.fontMatrix[0],m=t.textRenderingMode===n.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;if(i.save(),i.transform.apply(i,t.textMatrix),i.translate(t.x,t.y+t.textRise),c>0?i.scale(f,-1):i.scale(f,1),t.patternFill){i.save();var g=t.fillColor.getPattern(i,this,i.mozCurrentTransformInverse,a.PathType.FILL);k=i.mozCurrentTransform,i.restore(),i.fillStyle=g}var b=t.lineWidth,_=!1,S=t.textMatrixScale;if(0===S||0===b){var A=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;(A===n.TextRenderingMode.STROKE||A===n.TextRenderingMode.FILL_STROKE)&&(this._cachedGetSinglePixelWidth=null,_=(b=this.getSinglePixelWidth())<0)}else b/=S;1!==s&&(i.scale(s,s),b/=s),i.lineWidth=b;var k,w,x=0;for(w=0;w<d;++w){var C=e[w];if((0,n.isNum)(C)){x+=p*C*o/1e3;continue}var P=!1,T=(C.isSpace?l:0)+u,R=C.fontChar,E=C.accent,O=void 0,F=void 0,M=C.width;if(h){var I=C.vmetric||v,j=-(C.vmetric?I[1]:.5*M)*y,L=I[2]*y;M=I?-I[0]:M,O=j/s,F=(x+L)/s}else O=x/s,F=0;if(r.remeasure&&M>0){var D=1e3*i.measureText(R).width/o*s;if(M<D&&this.isFontSubpixelAAEnabled){var N=M/D;P=!0,i.save(),i.scale(N,1),O/=N}else M!==D&&(O+=(M-D)/2e3*o/s)}if(this.contentVisible&&(C.isInFont||r.missingFile)){if(m&&!E)i.fillText(R,O,F);else if(this.paintChar(R,O,F,k,_),E){var B=O+o*E.offset.x/s,U=F-o*E.offset.y/s;this.paintChar(E.fontChar,B,U,k,_)}}var q=void 0;
1x+=q=h?M*y-T*c:M*y+T*c,P&&i.restore()}h?t.y-=x:t.x+=x*f,i.restore(),this.compose()}}},{key:"showType3Text",value:function(e){var t,r,a,o,i=this.ctx,s=this.current,u=s.font,l=s.fontSize,c=s.fontDirection,f=u.vertical?1:-1,d=s.charSpacing,h=s.wordSpacing,p=s.textHScale*c,v=s.fontMatrix||n.FONT_IDENTITY_MATRIX,y=e.length;if(s.textRenderingMode!==n.TextRenderingMode.INVISIBLE&&0!==l){for(this._cachedGetSinglePixelWidth=null,i.save(),i.transform.apply(i,s.textMatrix),i.translate(s.x,s.y),i.scale(p,c),t=0;t<y;++t){if(r=e[t],(0,n.isNum)(r)){o=f*r*l/1e3,this.ctx.translate(o,0),s.x+=o*p;continue}var m=(r.isSpace?h:0)+d,g=u.charProcOperatorList[r.operatorListId];if(!g){(0,n.warn)('Type3 character "'.concat(r.operatorListId,'" is not available.'));continue}this.contentVisible&&(this.processingType3=r,this.save(),i.scale(l,l),i.transform.apply(i,v),this.executeOperatorList(g),this.restore()),a=n.Util.applyTransform([r.width,0],v)[0]*l+m,i.translate(a,0),s.x+=a*p}i.restore(),this.processingType3=null}}},{key:"setCharWidth",value:function(e,t){}},{key:"setCharWidthAndBounds",value:function(e,t,r,n,a,o){this.ctx.rect(r,n,a-r,o-n),this.clip(),this.endPath()}},{key:"getColorN_Pattern",value:function(t){var r,n=this;if("TilingPattern"===t[0]){var o=t[1],i=this.baseTransform||this.ctx.mozCurrentTransform.slice(),s={createCanvasGraphics:function(t){return new e(t,n.commonObjs,n.objs,n.canvasFactory)}};r=new a.TilingPattern(t,o,this.ctx,s,i)}else r=this._getPattern(t[1],t[2]);return r}},{key:"setStrokeColorN",value:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)}},{key:"setFillColorN",value:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}},{key:"setStrokeRGBColor",value:function(e,t,r){var a=n.Util.makeHexColor(e,t,r);this.ctx.strokeStyle=a,this.current.strokeColor=a}},{key:"setFillRGBColor",value:function(e,t,r){var a=n.Util.makeHexColor(e,t,r);this.ctx.fillStyle=a,this.current.fillColor=a,this.current.patternFill=!1}},{key:"_getPattern",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(e)?t=this.cachedPatterns.get(e):(t=(0,a.getShadingPattern)(this.objs.get(e)),this.cachedPatterns.set(e,t)),r&&(t.matrix=r),t}},{key:"shadingFill",value:function(e){if(this.contentVisible){var t=this.ctx;this.save();var r=this._getPattern(e);t.fillStyle=r.getPattern(t,this,t.mozCurrentTransformInverse,a.PathType.SHADING);var o=t.mozCurrentTransformInverse;if(o){var i=t.canvas,s=i.width,u=i.height,l=n.Util.applyTransform([0,0],o),c=n.Util.applyTransform([0,u],o),f=n.Util.applyTransform([s,0],o),d=n.Util.applyTransform([s,u],o),h=Math.min(l[0],c[0],f[0],d[0]),p=Math.min(l[1],c[1],f[1],d[1]),v=Math.max(l[0],c[0],f[0],d[0]),y=Math.max(l[1],c[1],f[1],d[1]);this.ctx.fillRect(h,p,v-h,y-p)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}}},{key:"beginInlineImage",value:function(){(0,n.unreachable)("Should not call beginInlineImage")}},{key:"beginImageData",value:function(){(0,n.unreachable)("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,t)){var r=t[2]-t[0],n=t[3]-t[1];this.ctx.rect(t[0],t[1],r,n),this.current.updatePathMinMax(this.ctx.mozCurrentTransform,t[0],t[1]),this.current.updatePathMinMax(this.ctx.mozCurrentTransform,t[2],t[3]),this.clip(),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}},{key:"beginGroup",value:function(e){if(this.contentVisible){this.save();var t=this.suspendedCtx;this.current.activeSMask&&(this.suspendedCtx=null,this.current.activeSMask=null);var r=this.ctx;e.isolated||(0,n.info)("TODO: Support non-isolated groups."),e.knockout&&(0,n.warn)("Knockout groups not supported.");var a=r.mozCurrentTransform;if(e.matrix&&r.transform.apply(r,e.matrix),!e.bbox)throw Error("Bounding box is required.");var o=n.Util.getAxialAlignedBoundingBox(e.bbox,r.mozCurrentTransform),i=[0,0,r.canvas.width,r.canvas.height],s=Math.floor((o=n.Util.intersect(o,i)||[0,0,0,0])[0]),u=Math.floor(o[1]),l=Math.max(Math.ceil(o[2])-s,1),c=Math.max(Math.ceil(o[3])-u,1),f=1,d=1;l>b&&(f=l/b,l=b),c>b&&(d=c/b,c=b),this.current.startNewPathAndClipBox([0,0,l,c]);var h="groupAt"+this.groupLevel;e.smask&&(h+="_smask_"+this.smaskCounter++%2);var p=this.cachedCanvases.getCanvas(h,l,c,!0),v=p.context;v.scale(1/f,1/d),v.translate(-s,-u),v.transform.apply(v,a),e.smask?this.smaskStack.push({canvas:p.canvas,context:v,offsetX:s,offsetY:u,scaleX:f,scaleY:d,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(r.setTransform(1,0,0,1,0,0),r.translate(s,u),r.scale(f,d),r.save()),M(r,v),this.ctx=v,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push({ctx:r,suspendedCtx:t}),this.groupLevel++}}},{key:"endGroup",value:function(e){if(this.contentVisible){this.groupLevel--;var t=this.ctx,r=this.groupStack.pop(),a=r.ctx,o=r.suspendedCtx;if(this.ctx=a,this.ctx.imageSmoothingEnabled=!1,o&&(this.suspendedCtx=o),e.smask)this.tempSMask=this.smaskStack.pop(),this.restore(
1);else{this.ctx.restore();var i=this.ctx.mozCurrentTransform;this.restore(),this.ctx.save(),this.ctx.setTransform.apply(this.ctx,i);var s=n.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],i);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(s)}}}},{key:"beginAnnotations",value:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)}},{key:"endAnnotations",value:function(){this.restore()}},{key:"beginAnnotation",value:function(e,t,r,a,o){if(this.save(),Array.isArray(t)&&4===t.length){var i=t[2]-t[0],s=t[3]-t[1];if(o&&this.annotationCanvasMap){r=r.slice(),r[4]-=t[0],r[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=i,t[3]=s;var u=f(n.Util.singularValueDecompose2dScale(this.ctx.mozCurrentTransform),2),l=u[0],c=u[1],d=this.viewportScale,h=Math.ceil(i*this.outputScaleX*d),p=Math.ceil(s*this.outputScaleY*d);this.annotationCanvas=this.canvasFactory.create(h,p);var v=this.annotationCanvas,y=v.canvas,m=v.context;y.style.width="calc(".concat(i,"px * var(--viewport-scale-factor))"),y.style.height="calc(".concat(s,"px * var(--viewport-scale-factor))"),this.annotationCanvasMap.set(e,y),this.annotationCanvas.savedCtx=this.ctx,this.ctx=m,this.ctx.setTransform(l,0,0,-c,0,s*c),P(this.ctx),I(this.ctx)}else I(this.ctx),this.ctx.rect(t[0],t[1],i,s),this.clip(),this.endPath()}this.current=new E(this.ctx.canvas.width,this.ctx.canvas.height),this.transform.apply(this,r),this.transform.apply(this,a)}},{key:"endAnnotation",value:function(){this.annotationCanvas&&(this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas),this.restore()}},{key:"paintImageMaskXObject",value:function(e){if(this.contentVisible){var t=this.ctx,r=e.width,n=e.height,a=this.processingType3;if(A&&a&&void 0===a.compiled&&(r<=k&&n<=k?a.compiled=R({data:e.data,width:r,height:n}):a.compiled=null),null!=a&&a.compiled){a.compiled(t);return}var o=this._createMaskCanvas(e),i=o.canvas;t.save(),t.setTransform(1,0,0,1,0,0),t.drawImage(i,o.offsetX,o.offsetY),t.restore(),this.compose()}}},{key:"paintImageMaskXObjectRepeat",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){var s=this.ctx;s.save();var u=s.mozCurrentTransform;s.transform(t,r,a,o,0,0);var l=this._createMaskCanvas(e);s.setTransform(1,0,0,1,0,0);for(var c=0,d=i.length;c<d;c+=2){var h=n.Util.transform(u,[t,r,a,o,i[c],i[c+1]]),p=f(n.Util.applyTransform([0,0],h),2),v=p[0],y=p[1];s.drawImage(l.canvas,v,y)}s.restore(),this.compose()}}},{key:"paintImageMaskXObjectGroup",value:function(e){if(this.contentVisible){for(var t=this.ctx,r=this.current.fillColor,n=this.current.patternFill,o=0,i=e.length;o<i;o++){var s=e[o],u=s.width,l=s.height,c=this.cachedCanvases.getCanvas("maskCanvas",u,l),f=c.context;f.save(),F(f,s),f.globalCompositeOperation="source-in",f.fillStyle=n?r.getPattern(f,this,t.mozCurrentTransformInverse,a.PathType.FILL):r,f.fillRect(0,0,u,l),f.restore(),t.save(),t.transform.apply(t,s.transform),t.scale(1,-1),t.drawImage(c.canvas,0,0,u,l,0,-1,1,1),t.restore()}this.compose()}}},{key:"paintImageXObject",value:function(e){if(this.contentVisible){var t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);if(!t){(0,n.warn)("Dependent image isn't ready yet");return}this.paintInlineImageXObject(t)}}},{key:"paintImageXObjectRepeat",value:function(e,t,r,a){if(this.contentVisible){var o=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);if(!o){(0,n.warn)("Dependent image isn't ready yet");return}for(var i=o.width,s=o.height,u=[],l=0,c=a.length;l<c;l+=2)u.push({transform:[t,0,0,r,a[l],a[l+1]],x:0,y:0,w:i,h:s});this.paintInlineImageXObjectGroup(o,u)}}},{key:"paintInlineImageXObject",value:function(e){if(this.contentVisible){var t,r=e.width,n=e.height,a=this.ctx;if(this.save(),a.scale(1/r,-1/n),"function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)t=e;else{var o=this.cachedCanvases.getCanvas("inlineImage",r,n);O(o.context,e,this.current.transferMaps),t=o.canvas}var i=this._scaleImage(t,a.mozCurrentTransformInverse);
1if(a.imageSmoothingEnabled=U(a.mozCurrentTransform,e.interpolate),a.drawImage(i.img,0,0,i.paintWidth,i.paintHeight,0,-n,r,n),this.imageLayer){var s=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:e,left:s[0],top:s[1],width:r/a.mozCurrentTransformInverse[0],height:n/a.mozCurrentTransformInverse[3]})}this.compose(),this.restore()}}},{key:"paintInlineImageXObjectGroup",value:function(e,t){if(this.contentVisible){var r=this.ctx,n=e.width,a=e.height,o=this.cachedCanvases.getCanvas("inlineImage",n,a);O(o.context,e,this.current.transferMaps);for(var i=0,s=t.length;i<s;i++){var u=t[i];if(r.save(),r.transform.apply(r,u.transform),r.scale(1,-1),r.drawImage(o.canvas,u.x,u.y,u.w,u.h,0,-1,1,1),this.imageLayer){var l=this.getCanvasPosition(u.x,u.y);this.imageLayer.appendImage({imgData:e,left:l[0],top:l[1],width:n,height:a})}r.restore()}this.compose()}}},{key:"paintSolidColorImageMask",value:function(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}},{key:"markPoint",value:function(e){}},{key:"markPointProps",value:function(e,t){}},{key:"beginMarkedContent",value:function(e){this.markedContentStack.push({visible:!0})}},{key:"beginMarkedContentProps",value:function(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}},{key:"endMarkedContent",value:function(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}},{key:"beginCompat",value:function(){}},{key:"endCompat",value:function(){}},{key:"consumePath",value:function(e){this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);var t=this.ctx;this.pendingClip&&(this.pendingClip===G?t.clip("evenodd"):t.clip(),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),t.beginPath()}},{key:"getSinglePixelWidth",value:function(){if(null===this._cachedGetSinglePixelWidth){var e=this.ctx.mozCurrentTransform,t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.pow(e[0],2)+Math.pow(e[2],2),n=Math.pow(e[1],2)+Math.pow(e[3],2),a=Math.sqrt(Math.max(r,n))/t;r!==n&&this._combinedScaleFactor*a>1?this._cachedGetSinglePixelWidth=-(this._combinedScaleFactor*a):t>Number.EPSILON?this._cachedGetSinglePixelWidth=a:this._cachedGetSinglePixelWidth=1}return this._cachedGetSinglePixelWidth}},{key:"getCanvasPosition",value:function(e,t){var r=this.ctx.mozCurrentTransform;return[r[0]*e+r[2]*t+r[4],r[1]*e+r[3]*t+r[5]]}},{key:"isContentVisible",value:function(){for(var e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}]),e}();for(var H in t.CanvasGraphics=V,n.OPS)void 0!==V.prototype[H]&&(V.prototype[n.OPS[H]]=V.prototype[H])},(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})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=C;var a=r(4);function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw 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=r.call(e)},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 i(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){if("function"!=typeof t&&null!==t)throw 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})(e,t)}function c(e){var t=h();return function(){var r,n=p(e);return r=t?Reflect.construct(n,arguments,p(this).constructor):n.apply(this,arguments),f(this,r)}}function f(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}
1function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function m(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),e}var g={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function b(e,t){if(t&&"undefined"!=typeof Path2D){var r=t[2]-t[0],n=t[3]-t[1],a=new Path2D;a.rect(t[0],t[1],r,n),e.clip(a)}}t.PathType=g;var _=function(){function e(){v(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseShadingPattern.")}return m(e,[{key:"getPattern",value:function(){(0,a.unreachable)("Abstract method `getPattern` called.")}}]),e}(),S=function(e){u(r,e);var t=c(r);function r(e){var n;return v(this,r),(n=t.call(this))._type=e[1],n._bbox=e[2],n._colorStops=e[3],n._p0=e[4],n._p1=e[5],n._r0=e[6],n._r1=e[7],n.matrix=null,n}return m(r,[{key:"_createGradient",value:function(e){"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));var t,r,n=o(this._colorStops);try{for(n.s();!(r=n.n()).done;){var a=r.value;t.addColorStop(a[0],a[1])}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"getPattern",value:function(e,t,r,n){var o;if(n===g.STROKE||n===g.FILL){var i=t.current.getClippedPathBoundingBox(n,e.mozCurrentTransform)||[0,0,0,0],s=Math.ceil(i[2]-i[0])||1,u=Math.ceil(i[3]-i[1])||1,l=t.cachedCanvases.getCanvas("pattern",s,u,!0),c=l.context;c.clearRect(0,0,c.canvas.width,c.canvas.height),c.beginPath(),c.rect(0,0,c.canvas.width,c.canvas.height),c.translate(-i[0],-i[1]),r=a.Util.transform(r,[1,0,0,1,i[0],i[1]]),c.transform.apply(c,t.baseTransform),this.matrix&&c.transform.apply(c,this.matrix),b(c,this._bbox),c.fillStyle=this._createGradient(c),c.fill(),o=e.createPattern(l.canvas,"no-repeat");var f=new DOMMatrix(r);try{o.setTransform(f)}catch(e){(0,a.warn)('RadialAxialShadingPattern.getPattern: "'.concat(null==e?void 0:e.message,'".'))}}else b(e,this._bbox),o=this._createGradient(e);return o}}]),r}(_);function A(e,t,r,n,a,o,i,s){var u,l,c,f,d,h,p,v,y,m=t.coords,g=t.colors,b=e.data,_=4*e.width;m[r+1]>m[n+1]&&(u=r,r=n,n=u,u=o,o=i,i=u),m[n+1]>m[a+1]&&(u=n,n=a,a=u,u=i,i=s,s=u),m[r+1]>m[n+1]&&(u=r,r=n,n=u,u=o,o=i,i=u);var S=(m[r]+t.offsetX)*t.scaleX,A=(m[r+1]+t.offsetY)*t.scaleY,k=(m[n]+t.offsetX)*t.scaleX,w=(m[n+1]+t.offsetY)*t.scaleY,x=(m[a]+t.offsetX)*t.scaleX,C=(m[a+1]+t.offsetY)*t.scaleY;if(!(A>=C))for(var P=g[o],T=g[o+1],R=g[o+2],E=g[i],O=g[i+1],F=g[i+2],M=g[s],I=g[s+1],j=g[s+2],L=Math.round(A),D=Math.round(C),N=L;N<=D;N++){if(N<w){var B=void 0;l=S-(S-k)*(B=N<A?0:(A-N)/(A-w)),c=P-(P-E)*B,f=T-(T-O)*B,d=R-(R-F)*B}else{var U=void 0;l=k-(k-x)*(U=N>C?1:w===C?0:(w-N)/(w-C)),c=E-(E-M)*U,f=O-(O-I)*U,d=F-(F-j)*U}var q=void 0;h=S-(S-x)*(q=N<A?0:N>C?1:(A-N)/(A-C)),p=P-(P-M)*q,v=T-(T-I)*q,y=R-(R-j)*q;for(var W=Math.round(Math.min(l,h)),z=Math.round(Math.max(l,h)),G=_*N+4*W,V=W;V<=z;V++)(q=(l-V)/(l-h))<0?q=0:q>1&&(q=1),b[G++]=c-(c-p)*q|0,b[G++]=f-(f-v)*q|0,b[G++]=d-(d-y)*q|0,b[G++]=255}}function k(e,t,r){var n,a,o=t.coords,i=t.colors;switch(t.type){case"lattice":var s=t.verticesPerRow,u=Math.floor(o.length/s)-1,l=s-1;for(n=0;n<u;n++)for(var c=n*s,f=0;f<l;f++,c++)A(e,r,o[c],o[c+1],o[c+s],i[c],i[c+1],i[c+s]),A(e,r,o[c+s+1],o[c+1],o[c+s],i[c+s+1],i[c+1],i[c+s]);break;case"triangles":for(n=0,a=o.length;n<a;n+=3)A(e,r,o[n],o[n+1],o[n+2],i[n],i[n+1],i[n+2]);break;default:throw Error("illegal figure")}}var w=function(e){u(r,e);var t=c(r);function r(e){var n;return v(this,r),(n=t.call(this))._coords=e[2],n._colors=e[3],n._figures=e[4],n._bounds=e[5],n._bbox=e[7],n._background=e[8],n.matrix=null,n}return m(r,[{key:"_createMeshCanvas",value:function(e,t,r){var n=1.1,a=3e3,i=2,s=Math.floor(this._bounds[0]),u=Math.floor(this._bounds[1]),l=Math.ceil(this._bounds[2])-s,c=Math.ceil(this._bounds[3])-u,f=Math.min(Math.ceil(Math.abs(l*e[0]*n)),a),d=Math.min(Math.ceil(Math.abs(c*e[1]*n)),a),h=l/f,p=c/d,v={coords:this._coords,colors:this._colors,offsetX:-s,offsetY:-u,scaleX:1/h,scaleY:1/p},y=f+2*i,m=d+2*i,g=r.getCanvas("mesh",y,m,!1),b=g.context,_=b.createImageData(f,d);if(t)for(var S=_.data,A=0,w=S.length;A<w;A+=4)S[A]=t[0],S[A+1]=t[1],S[A+2]=t[2],S[A+3]=255;var x,C=o(this._figures);try{for(C.s();!(x=C.n()).done;){var P=x.value;k(_,P,v)}}catch(e){C.e(e)}finally{C.f()}return b.putImageData(_,i,i),{canvas:g.canvas,offsetX:s-i*h,offsetY:u-i*p,scaleX:h,scaleY:p}}},{key:"getPattern",value:function(e,t,r,n){if(b(e,this._bbox),n===g.SHADING)o=a.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(o=a.Util.singularValueDecompose2dScale(t.baseTransform),this.matrix
1){var o,i=a.Util.singularValueDecompose2dScale(this.matrix);o=[o[0]*i[0],o[1]*i[1]]}var s=this._createMeshCanvas(o,n===g.SHADING?null:this._background,t.cachedCanvases);return n!==g.SHADING&&(e.setTransform.apply(e,t.baseTransform),this.matrix&&e.transform.apply(e,this.matrix)),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}]),r}(_),x=function(e){u(r,e);var t=c(r);function r(){return v(this,r),t.apply(this,arguments)}return m(r,[{key:"getPattern",value:function(){return"hotpink"}}]),r}(_);function C(e){switch(e[0]){case"RadialAxial":return new S(e);case"Mesh":return new w(e);case"Dummy":return new x}throw Error("Unknown IR type: ".concat(e[0]))}var P={COLORED:1,UNCOLORED:2},T=function(){function e(t,r,n,a,o){v(this,e),this.operatorList=t[2],this.matrix=t[3]||[1,0,0,1,0,0],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.color=r,this.ctx=n,this.canvasGraphicsFactory=a,this.baseTransform=o}return m(e,[{key:"createPatternCanvas",value:function(e){var t=this.operatorList,r=this.bbox,n=this.xstep,o=this.ystep,i=this.paintType,s=this.tilingType,u=this.color,l=this.canvasGraphicsFactory;(0,a.info)("TilingType: "+s);var c=r[0],f=r[1],d=r[2],h=r[3],p=a.Util.singularValueDecompose2dScale(this.matrix),v=a.Util.singularValueDecompose2dScale(this.baseTransform),y=[p[0]*v[0],p[1]*v[1]],m=this.getSizeAndScale(n,this.ctx.canvas.width,y[0]),g=this.getSizeAndScale(o,this.ctx.canvas.height,y[1]),b=e.cachedCanvases.getCanvas("pattern",m.size,g.size,!0),_=b.context,S=l.createCanvasGraphics(_);S.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(S,i,u);var A=c,k=f,w=d,x=h;return c<0&&(A=0,w+=Math.abs(c)),f<0&&(k=0,x+=Math.abs(f)),_.translate(-(m.scale*A),-(g.scale*k)),S.transform(m.scale,0,0,g.scale,0,0),this.clipBbox(S,A,k,w,x),S.baseTransform=S.ctx.mozCurrentTransform.slice(),S.executeOperatorList(t),S.endDrawing(),{canvas:b.canvas,scaleX:m.scale,scaleY:g.scale,offsetX:A,offsetY:k}}},{key:"getSizeAndScale",value:function(t,r,n){t=Math.abs(t);var a=Math.max(e.MAX_PATTERN_SIZE,r),o=Math.ceil(t*n);return o>=a?o=a:n=o/t,{scale:n,size:o}}},{key:"clipBbox",value:function(e,t,r,n,a){var o=n-t,i=a-r;e.ctx.rect(t,r,o,i),e.clip(),e.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function(e,t,r){var n=e.ctx,o=e.current;switch(t){case P.COLORED:var i=this.ctx;n.fillStyle=i.fillStyle,n.strokeStyle=i.strokeStyle,o.fillColor=i.fillStyle,o.strokeColor=i.strokeStyle;break;case P.UNCOLORED:var s=a.Util.makeHexColor(r[0],r[1],r[2]);n.fillStyle=s,n.strokeStyle=s,o.fillColor=s,o.strokeColor=s;break;default:throw new a.FormatError("Unsupported paint type: ".concat(t))}}},{key:"getPattern",value:function(e,t,r,n){var o=r;n!==g.SHADING&&(o=a.Util.transform(o,t.baseTransform),this.matrix&&(o=a.Util.transform(o,this.matrix)));var i=this.createPatternCanvas(t),s=new DOMMatrix(o);s=(s=s.translate(i.offsetX,i.offsetY)).scale(1/i.scaleX,1/i.scaleY);var u=e.createPattern(i.canvas,"repeat");try{u.setTransform(s)}catch(e){(0,a.warn)('TilingPattern.getPattern: "'.concat(null==e?void 0:e.message,'".'))}return u}}],[{key:"MAX_PATTERN_SIZE",get:function(){return(0,a.shadow)(this,"MAX_PATTERN_SIZE",3e3)}}]),e}();t.TilingPattern=T},(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;var r=Object.create(null);t.GlobalWorkerOptions=r,r.workerPort=void 0===r.workerPort?null:r.workerPort,r.workerSrc=void 0===r.workerSrc?"":r.workerSrc},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n=o(r(2)),a=r(4);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,u,"next",e)}function u(e){i(o,n,a,s,u,"throw",e)}s(void 0)})}}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}function f(e){return(f="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})(e)}var d={DATA:1,ERROR:2},h={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function p(e){if(!(e instanceof Error||"object"===f(e)&&null!==e))return(0,a.warn)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e;switch(e.name){case"AbortException":return new a.AbortException(e.message);case"MissingPDFException":return new a.MissingPDFException(e.message);case"PasswordException":return new a.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new a.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new a.UnknownErrorException(e.message,e.details);default:return new a.UnknownErrorException(e.message,e.toString())}}var v=function(){function e(t,r,n){var a=this;u(this,e),this.sourceName=t,this.targetName=r,this.comObj=n,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===a.sourceName){if(t.stream){a._processStreamMessage(t);return}if(t.callback){var r=t.callbackId,o=a.callbackCapabilities[r];if(!o)throw Error("Cannot resolve callback ".concat(r));if(delete a.callbackCapabilities[r],t.callback===d.DATA)o.resolve(t.data);else if(t.callback===d.ERROR)o.reject(p(t.reason));else throw Error("Unexpected callback case");return}var i=a.actionHandler[t.action];if(!i)throw Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){var s=a.sourceName,u=t.sourceName;new Promise(function(e){e(i(t.data))}).then(function(e){n.postMessage({sourceName:s,targetName:u,callback:d.DATA,callbackId:t.callbackId,data:e})},function(e){n.postMessage({sourceName:s,targetName:u,callback:d.ERROR,callbackId:t.callbackId,reason:p(e)})});return}if(t.streamId){a._createStreamSink(t);return}i(t.data)}},n.addEventListener("message",this._onComObjOnMessage)}return c(e,[{key:"on",value:function(e,t){var r=this.actionHandler;if(r[e])throw Error('There is already an actionName called "'.concat(e,'"'));r[e]=t}},{key:"send",value:function(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}}
1,{key:"sendWithPromise",value:function(e,t,r){var n=this.callbackId++,o=(0,a.createPromiseCapability)();this.callbackCapabilities[n]=o;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},r)}catch(e){o.reject(e)}return o.promise}},{key:"sendWithStream",value:function(e,t,r,n){var o=this,i=this.streamId++,s=this.sourceName,u=this.targetName,l=this.comObj;return new ReadableStream({start:function(r){var c=(0,a.createPromiseCapability)();return o.streamControllers[i]={controller:r,startCall:c,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:s,targetName:u,action:e,streamId:i,data:t,desiredSize:r.desiredSize},n),c.promise},pull:function(e){var t=(0,a.createPromiseCapability)();return o.streamControllers[i].pullCall=t,l.postMessage({sourceName:s,targetName:u,stream:h.PULL,streamId:i,desiredSize:e.desiredSize}),t.promise},cancel:function(e){(0,a.assert)(e instanceof Error,"cancel must have a valid reason");var t=(0,a.createPromiseCapability)();return o.streamControllers[i].cancelCall=t,o.streamControllers[i].isClosed=!0,l.postMessage({sourceName:s,targetName:u,stream:h.CANCEL,streamId:i,reason:p(e)}),t.promise}},r)}},{key:"_createStreamSink",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,o=this.comObj,i=this,s=this.actionHandler[e.action],u={enqueue:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var u=this.desiredSize;this.desiredSize-=i,u>0&&this.desiredSize<=0&&(this.sinkCapability=(0,a.createPromiseCapability)(),this.ready=this.sinkCapability.promise),o.postMessage({sourceName:r,targetName:n,stream:h.ENQUEUE,streamId:t,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:r,targetName:n,stream:h.CLOSE,streamId:t}),delete i.streamSinks[t])},error:function(e){(0,a.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:r,targetName:n,stream:h.ERROR,streamId:t,reason:p(e)}))},sinkCapability:(0,a.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};u.sinkCapability.resolve(),u.ready=u.sinkCapability.promise,this.streamSinks[t]=u,new Promise(function(t){t(s(e.data,u))}).then(function(){o.postMessage({sourceName:r,targetName:n,stream:h.START_COMPLETE,streamId:t,success:!0})},function(e){o.postMessage({sourceName:r,targetName:n,stream:h.START_COMPLETE,streamId:t,reason:p(e)})})}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,o=this.comObj,i=this.streamControllers[t],s=this.streamSinks[t];switch(e.stream){case h.START_COMPLETE:e.success?i.startCall.resolve():i.startCall.reject(p(e.reason));break;case h.PULL_COMPLETE:e.success?i.pullCall.resolve():i.pullCall.reject(p(e.reason));break;case h.PULL:if(!s){o.postMessage({sourceName:r,targetName:n,stream:h.PULL_COMPLETE,streamId:t,success:!0});break}s.desiredSize<=0&&e.desiredSize>0&&s.sinkCapability.resolve(),s.desiredSize=e.desiredSize,new Promise(function(e){e(s.onPull&&s.onPull())}).then(function(){o.postMessage({sourceName:r,targetName:n,stream:h.PULL_COMPLETE,streamId:t,success:!0})},function(e){o.postMessage({sourceName:r,targetName:n,stream:h.PULL_COMPLETE,streamId:t,reason:p(e)})});break;case h.ENQUEUE:if((0,a.assert)(i,"enqueue should have stream controller"),i.isClosed)break;i.controller.enqueue(e.chunk);break;case h.CLOSE:if((0,a.assert)(i,"close should have stream controller"),i.isClosed)break;i.isClosed=!0,i.controller.close(),this._deleteStreamController(i,t);break;case h.ERROR:(0,a.assert)(i,"error should have stream controller"),i.controller.error(p(e.reason)),this._deleteStreamController(i,t);break;case h.CANCEL_COMPLETE:e.success?i.cancelCall.resolve():i.cancelCall.reject(p(e.reason)),this._deleteStreamController(i,t);break;case h.CANCEL:if(!s)break;new Promise(function(t){t(s.onCancel&&s.onCancel(p(e.reason)))}).then(function(){o.postMessage({sourceName:r,targetName:n,stream:h.CANCEL_COMPLETE,streamId:t,success:!0})},function(e){o.postMessage({sourceName:r,targetName:n,stream:h.CANCEL_COMPLETE,streamId:t,reason:p(e)})}),s.sinkCapability.reject(p(e.reason)),s.isCancelled=!0,delete this.streamSinks[t];break;default:throw Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:function(){var e=s(n.default.mark(function e(t,r){return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.allSettled([t.startCall&&t.startCall.promise,t.pullCall&&t.pullCall.promise,t.cancelCall&&t.cancelCall.promise]);case 2:delete this.streamControllers[r];case 3:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]),e}();t.MessageHandler=v},(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(4);function a(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),e}function s(e,t,r){u(e,t),t.set(e,r)}function u(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t){var r=d(e,t,"get");return c(e,r)}function c(e,t){return t.get?t.get.call(e):t.value}function f(e,t,r){var n=d(e,t,"set");return h(e,n,r),r}function d(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function h(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=r}}var p=new WeakMap,v=new WeakMap,y=function(){function e(t){var r=t.parsedData,n=t.rawData;a(this,e),s(this,p,{writable:!0,value:void 0}),s(this,v,{writable:!0,value:void 0}),f(this,p,r),f(this,v,n)}return i(e,[{key:"getRaw",value:function(){return l(this,v)}},{key:"get",value:function(e){var t;return null!==(t=l(this,p).get(e))&&void 0!==t?t:null}},{key:"getAll",value:function(){return(0,n.objectFromMap)(l(this,p))}},{key:"has",value:function(e){return l(this,p).has(e)}}]),e}();t.Metadata=y},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var n=r(4);function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}function l(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var c=function e(t,r){l(this,e),this.visible=!0,this.name=t,this.intent=r},f=function(){function e(t){if(l(this,e),this.name=null,this.creator=null,this._order=null,this._groups=new Map,null!==t){this.name=t.name,this.creator=t.creator,this._order=t.order;var r,n=a(t.groups);try{for(n.s();!(r=n.n()).done;){var o=r.value;this._groups.set(o.id,new c(o.name,o.intent))}}catch(e){n.e(e)}finally{n.f()}if("OFF"===t.baseState){var i,s=a(this._groups);try{for(s.s();!(i=s.n()).done;)i.value.visible=!1}catch(e){s.e(e)}finally{s.f()}}var u,f=a(t.on);try{for(f.s();!(u=f.n()).done;){var d=u.value;this._groups.get(d).visible=!0}}catch(e){f.e(e)}finally{f.f()}var h,p=a(t.off);try{for(p.s();!(h=p.n()).done;){var v=h.value;this._groups.get(v).visible=!1}}catch(e){p.e(e)}finally{p.f()}}}return u(e,[{key:"_evaluateVisibilityExpression",value:function(e){var t=e.length;if(t<2)return!0;for(var r=e[0],a=1;a<t;a++){var o=e[a],i=void 0;if(Array.isArray(o))i=this._evaluateVisibilityExpression(o);else{if(!this._groups.has(o))return(0,n.warn)("Optional content group not found: ".concat(o)),!0;i=this._groups.get(o).visible}switch(r){case"And":if(!i)return!1;break;case"Or":if(i)return!0;break;case"Not":return!i;default:return!0}}return"And"===r}},{key:"isVisible",value:function(e){if(0===this._groups.size)return!0;
1if(!e)return(0,n.warn)("Optional content group not defined."),!0;if("OCG"===e.type)return this._groups.has(e.id)?this._groups.get(e.id).visible:((0,n.warn)("Optional content group not found: ".concat(e.id)),!0);if("OCMD"===e.type){if(e.expression)return this._evaluateVisibilityExpression(e.expression);if(e.policy&&"AnyOn"!==e.policy){if("AllOn"===e.policy){var t,r=a(e.ids);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(!this._groups.has(o))return(0,n.warn)("Optional content group not found: ".concat(o)),!0;if(!this._groups.get(o).visible)return!1}}catch(e){r.e(e)}finally{r.f()}return!0}if("AnyOff"===e.policy){var i,s=a(e.ids);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(!this._groups.has(u))return(0,n.warn)("Optional content group not found: ".concat(u)),!0;if(!this._groups.get(u).visible)return!0}}catch(e){s.e(e)}finally{s.f()}return!1}if("AllOff"===e.policy){var l,c=a(e.ids);try{for(c.s();!(l=c.n()).done;){var f=l.value;if(!this._groups.has(f))return(0,n.warn)("Optional content group not found: ".concat(f)),!0;if(this._groups.get(f).visible)return!1}}catch(e){c.e(e)}finally{c.f()}return!0}}else{var d,h=a(e.ids);try{for(h.s();!(d=h.n()).done;){var p=d.value;if(!this._groups.has(p))return(0,n.warn)("Optional content group not found: ".concat(p)),!0;if(this._groups.get(p).visible)return!0}}catch(e){h.e(e)}finally{h.f()}return!1}return(0,n.warn)("Unknown optional content policy ".concat(e.policy,".")),!0}return(0,n.warn)("Unknown group type ".concat(e.type,".")),!0}},{key:"setVisibility",value:function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!this._groups.has(e)){(0,n.warn)("Optional content group not found: ".concat(e));return}this._groups.get(e).visible=!!t}},{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>0?(0,n.objectFromMap)(this._groups):null}},{key:"getGroup",value:function(e){return this._groups.get(e)||null}}]),e}();t.OptionalContentConfig=f},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}
1),t.PDFDataTransportStream=void 0;var n=i(r(2)),a=r(4),o=r(1);function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,a)}function u(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,u,"next",e)}function u(e){s(o,n,a,i,u,"throw",e)}i(void 0)})}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}var v=function(){function e(t,r){var n=this;d(this,e),(0,a.assert)(r,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=t.progressiveDone||!1,this._contentDispositionFilename=t.contentDispositionFilename||null;var o=t.initialData;if((null==o?void 0:o.length)>0){var i=new Uint8Array(o).buffer;this._queuedChunks.push(i)}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 p(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,a.assert)(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"_onProgress",value:function(e){if(void 0===e.total){var t=this._rangeReaders[0];null!=t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{var r=this._fullRequestReader;null!=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,a.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var e=this._queuedChunks;return this._queuedChunks=null,new y(this,e,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new m(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,r=l(this._rangeReaders.slice(0));try{for(r.s();!(t=r.n()).done;)t.value.cancel(e)}catch(e){r.e(e)}finally{r.f()}this._pdfDataRangeTransport.abort()}}]),e}();t.PDFDataTransportStream=v;var y=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;d(this,e),this._stream=t,this._done=n||!1,this._filename=(0,o.isPdfFile)(a)?a:null,this._queuedChunks=r||[],this._loaded=0;var i,s=l(this._queuedChunks);try{for(s.s();!(i=s.n()).done;){var u=i.value;this._loaded+=u.byteLength}}catch(e){s.e(e)}finally{s.f()}
1this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}return p(e,[{key:"_enqueue",value:function(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}},{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}},{key:"read",value:function(){var e=u(n.default.mark(function e(){var t,r;return n.default.wrap(function(e){for(;;)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,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 8:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0;var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}}]),e}(),m=function(){function e(t,r,n){d(this,e),this._stream=t,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}return p(e,[{key:"_enqueue",value:function(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:function(){var e=u(n.default.mark(function e(){var t,r;return n.default.wrap(function(e){for(;;)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,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0;var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._stream._removeRangeReader(this)}}]),e}()},(e,t)=>{"use strict";function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0,o=function(){};return{s:o,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}function n(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}
1Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;var u=function(){function e(){o(this,e)}return s(e,null,[{key:"textContent",value:function(t){var n=[],a={items:n,styles:Object.create(null)};function o(t){if(t){var a=null,i=t.name;if("#text"===i)a=t.value;else{if(!e.shouldBuildText(i))return;null!=t&&null!==(s=t.attributes)&&void 0!==s&&s.textContent?a=t.attributes.textContent:t.value&&(a=t.value)}if(null!==a&&n.push({str:a}),t.children){var s,u,l=r(t.children);try{for(l.s();!(u=l.n()).done;){var c=u.value;o(c)}}catch(e){l.e(e)}finally{l.f()}}}}return o(t),a}},{key:"shouldBuildText",value:function(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}]),e}();t.XfaText=u},(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})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var a=r(4),o=r(1),i=r(139),s=r(149),u=r(150);function l(e,t,r){return c(e,t),r}function c(e,t){if(e!==t)throw TypeError("Private static access of wrong provenance")}function f(e,t,r){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=d(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(r):a.value}})(e,t,r||e)}function d(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=w(e)););return e}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return m(e)||y(e)||T(e)||v()}function v(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m(e){if(Array.isArray(e))return R(e)}function g(e,t){if("function"!=typeof t&&null!==t)throw 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&&b(e,t)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=k();return function(){var r,n=w(e);return r=t?Reflect.construct(n,arguments,w(this).constructor):n.apply(this,arguments),S(this,r)}}function S(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function x(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=T(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function C(e,t){return O(e)||E(e,t)||T(e,t)||P()}function P(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(e,t){if(e){if("string"==typeof e)return R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return R(e,t)}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function E(e,t){var r,n,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(r=a.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw n}}return o}}function O(e){if(Array.isArray(e))return e}function F(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function M(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e,t,r){return t&&M(e.prototype,t),r&&M(e,r),e}var j=1e3,L=new WeakSet,D=function(){function e(){F(this,e)}return I(e,null,[{key:"create",value:function(e){switch(e.data.annotationType){case a.AnnotationType.LINK:return new B(e);case a.AnnotationType.TEXT:return new U(e);case a.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new W(e);case"Btn":if(e.data.radioButton)return new G(e);if(e.data.checkBox)return new z(e);return new V(e);case"Ch":return new H(e)}return new q(e);case a.AnnotationType.POPUP:return new X(e);case a.AnnotationType.FREETEXT:return new Z(e);case a.AnnotationType.LINE:return new K(e);case a.AnnotationType.SQUARE:return new Q(e);
1case a.AnnotationType.CIRCLE:return new J(e);case a.AnnotationType.POLYLINE:return new $(e);case a.AnnotationType.CARET:return new et(e);case a.AnnotationType.INK:return new er(e);case a.AnnotationType.POLYGON:return new ee(e);case a.AnnotationType.HIGHLIGHT:return new en(e);case a.AnnotationType.UNDERLINE:return new ea(e);case a.AnnotationType.SQUIGGLY:return new eo(e);case a.AnnotationType.STRIKEOUT:return new ei(e);case a.AnnotationType.STAMP:return new es(e);case a.AnnotationType.FILEATTACHMENT:return new eu(e);default:return new N(e)}}}]),e}(),N=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.isRenderable,a=void 0!==n&&n,o=r.ignoreBorder,i=void 0!==o&&o,s=r.createQuadrilaterals,u=void 0!==s&&s;F(this,e),this.isRenderable=a,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.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this._mouseState=t.mouseState,a&&(this.container=this._createContainer(i)),u&&(this.quadrilaterals=this._createQuadrilaterals(i))}return I(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,o=document.createElement("section"),i=t.rect[2]-t.rect[0],s=t.rect[3]-t.rect[1];o.setAttribute("data-annotation-id",t.id);var u=a.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(t.hasOwnCanvas){var l=n.transform.slice(),c=C(a.Util.singularValueDecompose2dScale(l),2),f=c[0],d=c[1];i=Math.ceil(i*f),s=Math.ceil(s*d),u[0]*=f,u[1]*=d;for(var h=0;h<4;h++)l[h]=Math.sign(l[h]);o.style.transform="matrix(".concat(l.join(","),")")}else o.style.transform="matrix(".concat(n.transform.join(","),")");if(o.style.transformOrigin="".concat(-u[0],"px ").concat(-u[1],"px"),!e&&t.borderStyle.width>0){o.style.borderWidth="".concat(t.borderStyle.width,"px"),t.borderStyle.style!==a.AnnotationBorderStyleType.UNDERLINE&&(i-=2*t.borderStyle.width,s-=2*t.borderStyle.width);var p=t.borderStyle.horizontalCornerRadius,v=t.borderStyle.verticalCornerRadius;if(p>0||v>0){var y="".concat(p,"px / ").concat(v,"px");o.style.borderRadius=y}switch(t.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:o.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:o.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:o.style.borderBottomStyle="solid"}t.borderColor||t.color?o.style.borderColor=a.Util.makeHexColor(0|t.color[0],0|t.color[1],0|t.color[2]):o.style.borderWidth=0}return o.style.left="".concat(u[0],"px"),o.style.top="".concat(u[1],"px"),t.hasOwnCanvas?o.style.width=o.style.height="auto":(o.style.width="".concat(i,"px"),o.style.height="".concat(s,"px")),o}},{key:"_createQuadrilaterals",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.data.quadPoints)return null;var t,r=[],n=this.data.rect,a=x(this.data.quadPoints);try{for(a.s();!(t=a.n()).done;){var o=t.value;this.data.rect=[o[2].x,o[2].y,o[1].x,o[1].y],r.push(this._createContainer(e))}}catch(e){a.e(e)}finally{a.f()}return this.data.rect=n,r}},{key:"_createPopup",value:function(e,t){var r=this.container;this.quadrilaterals&&(e=e||this.quadrilaterals,r=this.quadrilaterals[0]),e||((e=document.createElement("div")).style.height=r.style.height,e.style.width=r.style.width,r.appendChild(e));var n=new Y({container:r,trigger:e,color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,hideWrapper:!0}).render();n.style.left=r.style.width,r.appendChild(n)}},{key:"_renderQuadrilaterals",value:function(e){var t,r=x(this.quadrilaterals);try{for(r.s();!(t=r.n()).done;)t.value.className=e}catch(e){r.e(e)}finally{r.f()}return this.quadrilaterals}},{key:"render",value:function(){(0,a.unreachable)("Abstract method `AnnotationElement.render` called")}},{key:"_getElementsByName",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[];if(this._fieldObjects){var n=this._fieldObjects[e];if(n){var o,i=x(n);try{for(i.s();!(o=i.n()).done;){var s=o.value,u=s.page,l=s.id,c=s.exportValues;if(-1!==u&&l!==t){var f="string"==typeof c?c:null,d=document.getElementById(l);if(d&&!L.has(d)){(0,a.warn)("_getElementsByName - element not allowed: ".concat(l));continue}r.push({id:l,exportValue:f,domElement:d})}}}catch(e){i.e(e)}finally{i.f()}}return r}var h,p=x(document.getElementsByName(e));try{for(p.s();!(h=p.n()).done;
1){var v=h.value,y=v.id,m=v.exportValue;y!==t&&L.has(v)&&r.push({id:y,exportValue:m,domElement:v})}}catch(e){p.e(e)}finally{p.f()}return r}}],[{key:"platform",get:function(){var e="undefined"!=typeof navigator?navigator.platform:"";return(0,a.shadow)(this,"platform",{isWin:e.includes("Win"),isMac:e.includes("Mac")})}}]),e}(),B=function(e){g(r,e);var t=_(r);function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;F(this,r);var a=!!(e.data.url||e.data.dest||e.data.action||e.data.isTooltipOnly||e.data.resetForm||e.data.actions&&(e.data.actions.Action||e.data.actions["Mouse Up"]||e.data.actions["Mouse Down"]));return t.call(this,e,{isRenderable:a,ignoreBorder:!!(null!=n&&n.ignoreBorder),createQuadrilaterals:!0})}return I(r,[{key:"render",value:function(){var e,t=this.data,r=this.linkService,n=document.createElement("a");if(t.url)r.addLinkAttributes||(0,a.warn)("LinkAnnotationElement.render - missing `addLinkAttributes`-method on the `linkService`-instance."),null===(e=r.addLinkAttributes)||void 0===e||e.call(r,n,t.url,t.newWindow);else if(t.action)this._bindNamedAction(n,t.action);else if(t.dest)this._bindLink(n,t.dest);else{var o=!1;t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(o=!0,this._bindJSAction(n,t)),t.resetForm?this._bindResetFormAction(n,t.resetForm):o||this._bindLink(n,"")}return this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map(function(e,t){var r=0===t?n:n.cloneNode();return e.appendChild(r),e}):(this.container.className="linkAnnotation",this.container.appendChild(n),this.container)}},{key:"_bindLink",value:function(e,t){var r=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&r.linkService.goToDestination(t),!1},(t||""===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"}},{key:"_bindJSAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl("");for(var n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),a=function(){var a=i[o],s=n.get(a);if(!s)return"continue";e[s]=function(){var e;return null===(e=r.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:r,detail:{id:t.id,name:a}}),!1}},o=0,i=Object.keys(t.actions);o<i.length;o++)if("continue"===a())continue;e.onclick||(e.onclick=function(){return!1}),e.className="internalLink"}},{key:"_bindResetFormAction",value:function(e,t){var r=this,n=e.onclick;if(n||(e.href=this.linkService.getAnchorUrl("")),e.className="internalLink",!this._fieldObjects){(0,a.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),n||(e.onclick=function(){return!1});return}e.onclick=function(){n&&n();var e,a=t.fields,o=t.refs,i=t.include,s=[];if(0!==a.length||0!==o.length){var u,l=new Set(o),c=x(a);try{for(c.s();!(u=c.n()).done;){var f,d=u.value,h=r._fieldObjects[d]||[],v=x(h);try{for(v.s();!(f=v.n()).done;){var y=f.value.id;l.add(y)}}catch(e){v.e(e)}finally{v.f()}}}catch(e){c.e(e)}finally{c.f()}for(var m=0,g=Object.values(r._fieldObjects);m<g.length;m++){var b,_=x(g[m]);try{for(_.s();!(b=_.n()).done;){var S=b.value;l.has(S.id)===i&&s.push(S)}}catch(e){_.e(e)}finally{_.f()}}}else for(var A=0,k=Object.values(r._fieldObjects);A<k.length;A++){var w=k[A];s.push.apply(s,p(w))}for(var C=r.annotationStorage,P=[],T=0,R=s;T<R.length;T++){var E=R[T],O=E.id;switch(P.push(O),E.type){case"text":var F=E.defaultValue||"";C.setValue(O,{value:F,valueAsString:F});break;case"checkbox":case"radiobutton":var M=E.defaultValue===E.exportValues;C.setValue(O,{value:M});break;case"combobox":case"listbox":var I=E.defaultValue||"";C.setValue(O,{value:I});break;default:continue}var j=document.getElementById(O);j&&L.has(j)&&j.dispatchEvent(new Event("resetform"))}return r.enableScripting&&(null===(e=r.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:r,detail
1:{id:"app",ids:P,name:"ResetForm"}})),!1}}}]),r}(N),U=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i})}return I(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(e,this.data),this.container.appendChild(e),this.container}}]),r}(N),q=function(e){g(r,e);var t=_(r);function r(){return F(this,r),t.apply(this,arguments)}return I(r,[{key:"render",value:function(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}},{key:"_getKeyModifier",value:function(e){var t=N.platform,r=t.isWin,n=t.isMac;return r&&e.ctrlKey||n&&e.metaKey}},{key:"_setEventListener",value:function(e,t,r,n){var a=this;t.includes("mouse")?e.addEventListener(t,function(e){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:r,value:n(e),shift:e.shiftKey,modifier:a._getKeyModifier(e)}})}):e.addEventListener(t,function(e){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:r,value:e.target.checked}})})}},{key:"_setEventListeners",value:function(e,t,r){var n,a=x(t);try{for(a.s();!(n=a.n()).done;){var o,i=C(n.value,2),s=i[0],u=i[1];("Action"===u||null!==(o=this.data.actions)&&void 0!==o&&o[u])&&this._setEventListener(e,s,u,r)}}catch(e){a.e(e)}finally{a.f()}}},{key:"_setBackgroundColor",value:function(e){var t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":a.Util.makeHexColor(t[0],t[1],t[2])}},{key:"_dispatchEventFromSandbox",value:function(e,t){for(var r=this,n=function(e,t,r){var n=r.detail[e];r.target.style[t]=s.ColorConverters["".concat(n[0],"_HTML")](n.slice(1))},a={display:function(e){var t=e.detail.display%2==1;e.target.style.visibility=t?"hidden":"visible",r.annotationStorage.setValue(r.data.id,{hidden:t,print:0===e.detail.display||3===e.detail.display})},print:function(e){r.annotationStorage.setValue(r.data.id,{print:e.detail.print})},hidden:function(e){e.target.style.visibility=e.detail.hidden?"hidden":"visible",r.annotationStorage.setValue(r.data.id,{hidden:e.detail.hidden})},focus:function(e){setTimeout(function(){return e.target.focus({preventScroll:!1})},0)},userName:function(e){e.target.title=e.detail.userName},readonly:function(e){e.detail.readonly?e.target.setAttribute("readonly",""):e.target.removeAttribute("readonly")},required:function(e){e.detail.required?e.target.setAttribute("required",""):e.target.removeAttribute("required")},bgColor:function(e){n("bgColor","backgroundColor",e)},fillColor:function(e){n("fillColor","backgroundColor",e)},fgColor:function(e){n("fgColor","color",e)},textColor:function(e){n("textColor","color",e)},borderColor:function(e){n("borderColor","borderColor",e)},strokeColor:function(e){n("strokeColor","borderColor",e)}},o=0,i=Object.keys(t.detail);o<i.length;o++){var u=i[o],l=e[u]||a[u];l&&l(t)}}}]),r}(N),W=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n=e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue;return t.call(this,e,{isRenderable:n})}return I(r,[{key:"setPropertyOnSiblings",value:function(e,t,r,n){var a,o=this.annotationStorage,i=x(this._getElementsByName(e.name,e.id));try{for(i.s();!(a=i.n()).done;){var s=a.value;s.domElement&&(s.domElement[t]=r),o.setValue(s.id,h({},n,r))}}catch(e){i.e(e)}finally{i.f()}}},{key:"render",value:function(){var e=this,t=this.annotationStorage,r=this.data.id;this.container.className="textWidgetAnnotation";var n=null;if(this.renderForms){var a=t.getValue(r,{value:this.data.fieldValue,valueAsString:this.data.fieldValue}),o=a.valueAsString||a.value||"",i={userValue:null,formattedValue:null,beforeInputSelectionRange:null,beforeInputValue:null};this.data.multiLine?(n=document.createElement("textarea")).textContent=o:((n=document.createElement("input")).type="text",n.setAttribute("value",o)),L.add(n),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=j,i.userValue=o,n.setAttribute("id",r),n.addEventListener("input",function(a){t.setValue(r,{value:a.target.value}),e.setPropertyOnSiblings(n,"value",a.target.value,"value")}),n.addEventListener("resetform",function(t){var r=e.data.defaultFieldValue||"";n.value=i.userValue=r,delete i.formattedValue});var s=function(e){i.formattedValue&&(e.target.value=i.formattedValue),e.target.scrollLeft=0,i.beforeInputSelectionRange=null};if(this.enableScripting&&this.hasJSActions){n.addEventListener("focus",function(e){i.userValue&&(e.target.value=i.userValue)}),n.addEventListener("updatefromsandbox",function(n){var a={value:function(e){i.userValue=e.detail.value||"",t.setValue(r,{value:i.userValue.toString()}),i.formattedValue||(e.target.value=i.userValue)},valueAsString:function(e){i.formattedValue=e.detail.valueAsString||"",e.target!==document.activeElement&&(e.target.value=i.formattedValue),t.setValue(r,{formattedValue:i.formattedValue})},selRange:function(e){var t=C(e.detail.selRange,2),r=t[0],n=t[1];r>=0&&n<e.target.value.length&&e.target.setSelectionRange(r,n)}};e._dispatchEventFromSandbox(a,n)}),n.addEventListener("keydown",function(t){i.beforeInputValue=t.target.value;var n,a=-1;"Escape"===t.key?a=0:"Enter"===t.key?a=2:"Tab"===t.key&&(a=3),-1!==a&&(i.userValue=t.target.value,null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:t.target.value,willC
1ommit:!0,commitKey:a,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}))});var u,l=s;s=null,n.addEventListener("blur",function(t){if(e._mouseState.isDown){var n;i.userValue=t.target.value,null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:t.target.value,willCommit:!0,commitKey:1,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}})}l(t)}),n.addEventListener("mousedown",function(e){i.beforeInputValue=e.target.value,i.beforeInputSelectionRange=null}),n.addEventListener("keyup",function(e){e.target.selectionStart===e.target.selectionEnd&&(i.beforeInputSelectionRange=null)}),n.addEventListener("select",function(e){i.beforeInputSelectionRange=[e.target.selectionStart,e.target.selectionEnd]}),null!==(u=this.data.actions)&&void 0!==u&&u.Keystroke&&n.addEventListener("input",function(t){var n,a=-1,o=-1;if(i.beforeInputSelectionRange){var s=C(i.beforeInputSelectionRange,2);a=s[0],o=s[1]}null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:i.beforeInputValue,change:t.data,willCommit:!1,selStart:a,selEnd:o}})}),this._setEventListeners(n,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(e){return e.target.value})}if(s&&n.addEventListener("blur",s),null!==this.data.maxLen&&(n.maxLength=this.data.maxLen),this.data.comb){var c=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;n.classList.add("comb"),n.style.letterSpacing="calc(".concat(c,"px - 1ch)")}}else(n=document.createElement("div")).textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell";return this._setTextStyle(n),this._setBackgroundColor(n),this.container.appendChild(n),this.container}},{key:"_setTextStyle",value:function(e){var t=["left","center","right"],r=this.data.defaultAppearanceData,n=r.fontSize,o=r.fontColor,i=e.style;n&&(i.fontSize="".concat(n,"px")),i.color=a.Util.makeHexColor(o[0],o[1],o[2]),null!==this.data.textAlignment&&(i.textAlign=t[this.data.textAlignment])}}]),r}(q),z=function(e){g(r,e);var t=_(r);function r(e){return F(this,r),t.call(this,e,{isRenderable:e.renderForms})}return I(r,[{key:"render",value:function(){var e=this,t=this.annotationStorage,r=this.data,n=r.id,a=t.getValue(n,{value:r.exportValue===r.fieldValue}).value;"string"==typeof a&&(a="Off"!==a,t.setValue(n,{value:a})),this.container.className="buttonWidgetAnnotation checkBox";var o=document.createElement("input");return L.add(o),o.disabled=r.readOnly,o.type="checkbox",o.name=r.fieldName,a&&o.setAttribute("checked",!0),o.setAttribute("id",n),o.setAttribute("exportValue",r.exportValue),o.tabIndex=j,o.addEventListener("change",function(a){var o,i=a.target,s=i.name,u=i.checked,l=x(e._getElementsByName(s,n));try{for(l.s();!(o=l.n()).done;){var c=o.value,f=u&&c.exportValue===r.exportValue;c.domElement&&(c.domElement.checked=f),t.setValue(c.id,{value:f})}}catch(e){l.e(e)}finally{l.f()}t.setValue(n,{value:u})}),o.addEventListener("resetform",function(e){var t=r.defaultFieldValue||"Off";e.target.checked=t===r.exportValue}),this.enableScripting&&this.hasJSActions&&(o.addEventListener("updatefromsandbox",function(r){var a={value:function(e){e.target.checked="Off"!==e.detail.value,t.setValue(n,{value:e.target.checked})}};e._dispatchEventFromSandbox(a,r)}),this._setEventListeners(o,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(e){return e.target.checked})),this._setBackgroundColor(o),this.container.appendChild(o),this.container}}]),r}(q),G=function(e){g(r,e);var t=_(r);function r(e){return F(this,r),t.call(this,e,{isRenderable:e.renderForms})}return I(r,[{key:"render",value:function(){var e=this;this.container.className="buttonWidgetAnnotation radioButton";var t=this.annotationStorage,r=this.data,n=r.id,a=t.getValue(n,{value:r.fieldValue===r.buttonValue}).value;"string"==typeof a&&(a=a!==r.buttonValue,t.setValue(n,{value:a}));var o=document.createElement("input");if(L.add(o),o.disabled=r.readOnly,o.type="radio",o.name=r.fieldName,a&&o.setAttribute("checked",!0),o.setAttribute("id",n),o.tabIndex=j,o.addEventListener("change",function(r){var a,o=r.target,i=o.name,s=o.checked,u=x(e._getElementsByName(i,n));try{for(u.s();!(a=u.n()).done;){var l=a.value;t.setValue(l.id,{value:!1})}}catch(e){u.e(e)}finally{u.f()}t.setValue(n,{value:s})}),o.addEventListener("resetform",function(e){var t=r.defaultFieldValue;e.target.checked=null!=t&&t===r.buttonValue}),this.enableScripting&&this.hasJSActions){var i=r.buttonValue;o.addEventListener("updatefromsandbox",function(r){var a={value:function(r){var a,o=i===r.detail.value,s=x(e._getElementsByName(r.target.name));try{for(s.s();!(a=s.n()).done;){var u=a.value,l=o&&u.id===n;u.domElement&&(u.domElement.checked=l),t.setValue(u.id,{value:l})}}catch(e){s.e(e)}finally{s.f()}}};e._dispatchEventFromSandbox(a,r)}),this._setEventListeners(o,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(e){return e.target.checked})}
1return this._setBackgroundColor(o),this.container.appendChild(o),this.container}}]),r}(q),V=function(e){g(r,e);var t=_(r);function r(e){return F(this,r),t.call(this,e,{ignoreBorder:e.data.hasAppearance})}return I(r,[{key:"render",value:function(){var e=f(w(r.prototype),"render",this).call(this);return e.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(e.title=this.data.alternativeText),e}}]),r}(B),H=function(e){g(r,e);var t=_(r);function r(e){return F(this,r),t.call(this,e,{isRenderable:e.renderForms})}return I(r,[{key:"render",value:function(){var e=this;this.container.className="choiceWidgetAnnotation";var t=this.annotationStorage,r=this.data.id;t.getValue(r,{value:this.data.fieldValue.length>0?this.data.fieldValue[0]:void 0});var n=this.data.defaultAppearanceData.fontSize;n||(n=9);var a="calc(".concat(n,"px * var(--zoom-factor))"),o=document.createElement("select");L.add(o),o.disabled=this.data.readOnly,o.name=this.data.fieldName,o.setAttribute("id",r),o.tabIndex=j,o.style.fontSize="".concat(n,"px"),!this.data.combo&&(o.size=this.data.options.length,this.data.multiSelect&&(o.multiple=!0)),o.addEventListener("resetform",function(t){var r,n=e.data.defaultFieldValue,a=x(o.options);try{for(a.s();!(r=a.n()).done;){var i=r.value;i.selected=i.value===n}}catch(e){a.e(e)}finally{a.f()}});var i,s=x(this.data.options);try{for(s.s();!(i=s.n()).done;){var u=i.value,l=document.createElement("option");l.textContent=u.displayValue,l.value=u.exportValue,this.data.combo&&(l.style.fontSize=a),this.data.fieldValue.includes(u.exportValue)&&l.setAttribute("selected",!0),o.appendChild(l)}}catch(e){s.e(e)}finally{s.f()}var c=function(e,t){var r=t?"value":"textContent",n=e.target.options;return e.target.multiple?Array.prototype.filter.call(n,function(e){return e.selected}).map(function(e){return e[r]}):-1===n.selectedIndex?null:n[n.selectedIndex][r]},f=function(e){var t=e.target.options;return Array.prototype.map.call(t,function(e){return{displayValue:e.textContent,exportValue:e.value}})};return this.enableScripting&&this.hasJSActions?(o.addEventListener("updatefromsandbox",function(n){var a={value:function(e){var n,a=e.detail.value,i=new Set(Array.isArray(a)?a:[a]),s=x(o.options);try{for(s.s();!(n=s.n()).done;){var u=n.value;u.selected=i.has(u.value)}}catch(e){s.e(e)}finally{s.f()}t.setValue(r,{value:c(e,!0)})},multipleSelection:function(e){o.multiple=!0},remove:function(e){var n=o.options,a=e.detail.remove;n[a].selected=!1,o.remove(a),n.length>0&&-1===Array.prototype.findIndex.call(n,function(e){return e.selected})&&(n[0].selected=!0),t.setValue(r,{value:c(e,!0),items:f(e)})},clear:function(e){for(;0!==o.length;)o.remove(0);t.setValue(r,{value:null,items:[]})},insert:function(e){var n=e.detail.insert,a=n.index,i=n.displayValue,s=n.exportValue,u=document.createElement("option");u.textContent=i,u.value=s,o.insertBefore(u,o.children[a]),t.setValue(r,{value:c(e,!0),items:f(e)})},items:function(e){for(var n=e.detail.items;0!==o.length;)o.remove(0);var a,i=x(n);try{for(i.s();!(a=i.n()).done;){var s=a.value,u=s.displayValue,l=s.exportValue,d=document.createElement("option");d.textContent=u,d.value=l,o.appendChild(d)}}catch(e){i.e(e)}finally{i.f()}o.options.length>0&&(o.options[0].selected=!0),t.setValue(r,{value:c(e,!0),items:f(e)})},indices:function(e){var n,a=new Set(e.detail.indices),o=x(e.target.options);try{for(o.s();!(n=o.n()).done;){var i=n.value;i.selected=a.has(i.index)}}catch(e){o.e(e)}finally{o.f()}t.setValue(r,{value:c(e,!0)})},editable:function(e){e.target.disabled=!e.detail.editable}};e._dispatchEventFromSandbox(a,n)}),o.addEventListener("input",function(n){var a,o=c(n,!0),i=c(n,!1);t.setValue(r,{value:o}),null===(a=e.linkService.eventBus)||void 0===a||a.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:i,changeEx:o,willCommit:!0,commitKey:1,keyDown:!1}})}),this._setEventListeners(o,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],function(e){return e.target.checked})):o.addEventListener("input",function(e){t.setValue(r,{value:c(e)})}
1),this._setBackgroundColor(o),this.container.appendChild(o),this.container}}]),r}(q),X=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i=!!(null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i})}return I(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.querySelectorAll(t);if(0===r.length)return this.container;var n=new Y({container:this.container,trigger:Array.from(r),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),o=this.page,i=a.Util.normalizeRect([this.data.parentRect[0],o.view[3]-this.data.parentRect[1]+o.view[1],this.data.parentRect[2],o.view[3]-this.data.parentRect[3]+o.view[1]]),s=i[0]+this.data.parentRect[2]-this.data.parentRect[0],u=i[1];return this.container.style.transformOrigin="".concat(-s,"px ").concat(-u,"px"),this.container.style.left="".concat(s,"px"),this.container.style.top="".concat(u,"px"),this.container.appendChild(n.render()),this.container}}]),r}(N),Y=function(){function e(t){F(this,e),this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.titleObj=t.titleObj,this.modificationDate=t.modificationDate,this.contentsObj=t.contentsObj,this.richText=t.richText,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}return I(e,[{key:"render",value:function(){var e=.7,t=document.createElement("div");t.className="popupWrapper",this.hideElement=this.hideWrapper?t:this.container,this.hideElement.hidden=!0;var r=document.createElement("div");r.className="popup";var n=this.color;if(n){var i=e*(255-n[0])+n[0],s=e*(255-n[1])+n[1],l=e*(255-n[2])+n[2];r.style.backgroundColor=a.Util.makeHexColor(0|i,0|s,0|l)}var c=document.createElement("h1");c.dir=this.titleObj.dir,c.textContent=this.titleObj.str,r.appendChild(c);var f=o.PDFDateString.toDateObject(this.modificationDate);if(f){var d=document.createElement("span");d.className="popupDate",d.textContent="{{date}}, {{time}}",d.dataset.l10nId="annotation_date_string",d.dataset.l10nArgs=JSON.stringify({date:f.toLocaleDateString(),time:f.toLocaleTimeString()}),r.appendChild(d)}if(null!==(p=this.richText)&&void 0!==p&&p.str&&(!(null!==(v=this.contentsObj)&&void 0!==v&&v.str)||this.contentsObj.str===this.richText.str))u.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:r}),r.lastChild.className="richText popupContent";else{var h=this._formatContents(this.contentsObj);r.appendChild(h)}Array.isArray(this.trigger)||(this.trigger=[this.trigger]);var p,v,y,m=x(this.trigger);try{for(m.s();!(y=m.n()).done;){var g=y.value;g.addEventListener("click",this._toggle.bind(this)),g.addEventListener("mouseover",this._show.bind(this,!1)),g.addEventListener("mouseout",this._hide.bind(this,!1))}}catch(e){m.e(e)}finally{m.f()}return r.addEventListener("click",this._hide.bind(this,!0)),t.appendChild(r),t}},{key:"_formatContents",value:function(e){var t=e.str,r=e.dir,n=document.createElement("p");n.className="popupContent",n.dir=r;for(var a=t.split(/(?:\r\n?|\n)/),o=0,i=a.length;o<i;++o){var s=a[o];n.appendChild(document.createTextNode(s)),o<i-1&&n.appendChild(document.createElement("br"))}return n}},{key:"_toggle",value:function(){this.pinned?this._hide(!0):this._show(!0)}},{key:"_show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,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.hidden||this.pinned||(this.hideElement.hidden=!0,this.container.style.zIndex-=1)}}]),e}(),Z=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return I(r,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}
1]),r}(N),K=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return I(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),a=this.svgFactory.createElement("svg:line");return a.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),a.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),a.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),a.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),n.appendChild(a),this.container.append(n),this._createPopup(a,e),this.container}}]),r}(N),Q=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return I(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),a=e.borderStyle.width,o=this.svgFactory.createElement("svg:rect");return o.setAttribute("x",a/2),o.setAttribute("y",a/2),o.setAttribute("width",t-a),o.setAttribute("height",r-a),o.setAttribute("stroke-width",a||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),n.appendChild(o),this.container.append(n),this._createPopup(o,e),this.container}}]),r}(N),J=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return I(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),a=e.borderStyle.width,o=this.svgFactory.createElement("svg:ellipse");return o.setAttribute("cx",t/2),o.setAttribute("cy",r/2),o.setAttribute("rx",t/2-a/2),o.setAttribute("ry",r/2-a/2),o.setAttribute("stroke-width",a||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),n.appendChild(o),this.container.append(n),this._createPopup(o,e),this.container}}]),r}(N),$=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i,s=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return(i=t.call(this,e,{isRenderable:s,ignoreBorder:!0})).containerClassName="polylineAnnotation",i.svgElementName="svg:polyline",i}return I(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],a=this.svgFactory.create(r,n),o=[],i=x(t.vertices);try{for(i.s();!(e=i.n()).done;){var s=e.value,u=s.x-t.rect[0],l=t.rect[3]-s.y;o.push(u+","+l)}}catch(e){i.e(e)}finally{i.f()}o=o.join(" ");var c=this.svgFactory.createElement(this.svgElementName);return c.setAttribute("points",o),c.setAttribute("stroke-width",t.borderStyle.width||1),c.setAttribute("stroke","transparent"),c.setAttribute("fill","transparent"),a.appendChild(c),this.container.append(a),this._createPopup(c,t),this.container}}]),r}(N),ee=function(e){g(r,e);var t=_(r);function r(e){var n;return F(this,r),(n=t.call(this,e)).containerClassName="polygonAnnotation",n.svgElementName="svg:polygon",n}return r}($),et=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return I(r,[{key:"render",value:function(){return this.container.className="
1caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(N),er=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i,s=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return(i=t.call(this,e,{isRenderable:s,ignoreBorder:!0})).containerClassName="inkAnnotation",i.svgElementName="svg:polyline",i}return I(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],a=this.svgFactory.create(r,n),o=x(t.inkLists);try{for(o.s();!(e=o.n()).done;){var i,s=e.value,u=[],l=x(s);try{for(l.s();!(i=l.n()).done;){var c=i.value,f=c.x-t.rect[0],d=t.rect[3]-c.y;u.push("".concat(f,",").concat(d))}}catch(e){l.e(e)}finally{l.f()}u=u.join(" ");var h=this.svgFactory.createElement(this.svgElementName);h.setAttribute("points",u),h.setAttribute("stroke-width",t.borderStyle.width||1),h.setAttribute("stroke","transparent"),h.setAttribute("fill","transparent"),this._createPopup(h,t),a.appendChild(h)}}catch(e){o.e(e)}finally{o.f()}return this.container.append(a),this.container}}]),r}(N),en=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return I(r,[{key:"render",value:function(){return(this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals)?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}]),r}(N),ea=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return I(r,[{key:"render",value:function(){return(this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals)?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}]),r}(N),eo=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return I(r,[{key:"render",value:function(){return(this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals)?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}]),r}(N),ei=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return I(r,[{key:"render",value:function(){return(this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals)?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}]),r}(N),es=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,a,o,i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return I(r,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(N),eu=function(e){g(r,e);var t=_(r);function r(e){F(this,r);var n,i,s=(i=t.call(this,e,{isRenderable:!0})).data.file,u=s.filename,l=s.content;return i.filename=(0,o.getFilenameFromUrl)(u),i.content=l,null===(n=i.linkService.eventBus)||void 0===n||n.dispatch("fileattachmentannotation",{source:A(i),id:(0,a.stringToPDFString)(u),filename:u,content:l}),i}return I(r,[{key:"render",value:function(){this.container.className="fileAttachmentAnnotation";var e,t,r=document.createElement("div");return r.style.height=this.container.style.height,r.style.width=this.container.style.width,r.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&(null!==(e=this.data.titleObj)&&void 0!==e&&e.str||null!==(t=this.data.contentsObj)&&void 0!==t&&t.str||this.data.richText)&&this._createPopup(r,this.data),this.container.appendChild(r),this.container}}
1,{key:"_download",value:function(){var e;null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,this.content,this.filename)}}]),r}(N),el=function(){function e(){F(this,e)}return I(e,null,[{key:"render",value:function(t){var r,n=[],s=[],u=x(t.annotations);try{for(u.s();!(r=u.n()).done;){var c=r.value;if(c){if(c.annotationType===a.AnnotationType.POPUP){s.push(c);continue}n.push(c)}}}catch(e){u.e(e)}finally{u.f()}s.length&&n.push.apply(n,s);for(var f=t.div,d=0,h=n;d<h.length;d++){var p=h[d],v=D.create({data:p,layer:f,page:t.page,viewport:t.viewport,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new o.DOMSVGFactory,annotationStorage:t.annotationStorage||new i.AnnotationStorage,enableScripting:t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,mouseState:t.mouseState||{isDown:!1}});if(v.isRenderable){var y=v.render();if(p.hidden&&(y.style.visibility="hidden"),Array.isArray(y)){var m,g=x(y);try{for(g.s();!(m=g.n()).done;){var b=m.value;f.appendChild(b)}}catch(e){g.e(e)}finally{g.f()}}else v instanceof X?f.prepend(y):f.appendChild(y)}}l(this,e,ec).call(this,f,t.annotationCanvasMap)}},{key:"update",value:function(t){var r,n,o,i=t.page,s=t.viewport,u=t.annotations,c=t.annotationCanvasMap,f=t.div,d=s.transform,h="matrix(".concat(d.join(","),")"),p=x(u);try{for(p.s();!(o=p.n()).done;){var v=o.value,y=f.querySelectorAll('[data-annotation-id="'.concat(v.id,'"]'));if(y){var m,g=x(y);try{for(g.s();!(m=g.n()).done;){var b=m.value;if(v.hasOwnCanvas){var _=a.Util.normalizeRect([v.rect[0],i.view[3]-v.rect[1]+i.view[1],v.rect[2],i.view[3]-v.rect[3]+i.view[1]]);if(!n){r=Math.abs(d[0]||d[1]);for(var S=d.slice(),A=0;A<4;A++)S[A]=Math.sign(S[A]);n="matrix(".concat(S.join(","),")")}var k=_[0]*r,w=_[1]*r;b.style.left="".concat(k,"px"),b.style.top="".concat(w,"px"),b.style.transformOrigin="".concat(-k,"px ").concat(-w,"px"),b.style.transform=n}else b.style.transform=h}}catch(e){g.e(e)}finally{g.f()}}}}catch(e){p.e(e)}finally{p.f()}l(this,e,ec).call(this,f,c),f.hidden=!1}}]),e}();function ec(e,t){if(t){var r,n=x(t);try{for(n.s();!(r=n.n()).done;){var a=C(r.value,2),o=a[0],i=a[1],s=e.querySelector('[data-annotation-id="'.concat(o,'"]'));if(s){var u=s.firstChild;"CANVAS"===u.nodeName?s.replaceChild(i,u):s.insertBefore(i,u)}}}catch(e){n.e(e)}finally{n.f()}t.clear()}}t.AnnotationLayer=el},(e,t)=>{"use strict";function r(e,t){return s(e)||i(e,t)||a(e,t)||n()}function n(){throw 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);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){var r,n,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(r=a.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw n}}return o}}function s(e){if(Array.isArray(e))return e}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}function f(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0;var d=function(){function e(){u(this,e)}return c(e,null,[{key:"CMYK_G",value:function(e){var t=r(e,4),n=t[0],a=t[1];return["G",1-Math.min(1,.3*n+.59*t[2]+.11*a+t[3])]}},{key:"G_CMYK",value:function(e){return["CMYK",0,0,0,1-r(e,1)[0]]}},{key:"G_RGB",value:function(e){var t=r(e,1)[0];return["RGB",t,t,t]}},{key:"G_HTML",value:function(e){var t=f(r(e,1)[0]);return"#".concat(t).concat(t).concat(t)}},{key:"RGB_G",value:function(e){var t=r(e,3);return["G",.3*t[0]+.59*t[1]+.11*t[2]]}},{key:"RGB_HTML",value:function(e){var t=r(e,3),n=t[0],a=t[1],o=t[2],i=f(n),s=f(a),u=f(o);
1return"#".concat(i).concat(s).concat(u)}},{key:"T_HTML",value:function(){return"#00000000"}},{key:"CMYK_RGB",value:function(e){var t=r(e,4),n=t[0],a=t[1],o=t[2],i=t[3];return["RGB",1-Math.min(1,n+i),1-Math.min(1,o+i),1-Math.min(1,a+i)]}},{key:"CMYK_HTML",value:function(e){return this.RGB_HTML(this.CMYK_RGB(e))}},{key:"RGB_CMYK",value:function(e){var t=r(e,3),n=t[0],a=t[1],o=t[2],i=1-n,s=1-a,u=1-o,l=Math.min(i,s,u);return["CMYK",i,s,u,l]}}]),e}();t.ColorConverters=d},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var n=r(4),a=r(147);function o(e,t){return u(e)||s(e,t)||c(e,t)||i()}function i(){throw 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){var r,n,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(r=a.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw n}}return o}}function u(e){if(Array.isArray(e))return e}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}var v=function(){function e(){d(this,e)}return p(e,null,[{key:"setupStorage",value:function(e,t,r,n,a){var o=n.getValue(t,{value:null});switch(r.name){case"textarea":if(null!==o.value&&(e.textContent=o.value),"print"===a)break;e.addEventListener("input",function(e){n.setValue(t,{value:e.target.value})});break;case"input":if("radio"===r.attributes.type||"checkbox"===r.attributes.type){if(o.value===r.attributes.xfaOn?e.setAttribute("checked",!0):o.value===r.attributes.xfaOff&&e.removeAttribute("checked"),"print"===a)break;e.addEventListener("change",function(e){n.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})})}else{if(null!==o.value&&e.setAttribute("value",o.value),"print"===a)break;e.addEventListener("input",function(e){n.setValue(t,{value:e.target.value})})}break;case"select":if(null!==o.value){var i,s=l(r.children);try{for(s.s();!(i=s.n()).done;){var u=i.value;u.attributes.value===o.value&&(u.attributes.selected=!0)}}catch(e){s.e(e)}finally{s.f()}}e.addEventListener("input",function(e){var r=e.target.options,a=-1===r.selectedIndex?"":r[r.selectedIndex].value;n.setValue(t,{value:a})})}}},{key:"setAttributes",value:function(e){var t,r=e.html,a=e.element,i=e.storage,s=void 0===i?null:i,u=e.intent,l=e.linkService,c=a.attributes,f=r instanceof HTMLAnchorElement;"radio"===c.type&&(c.name="".concat(c.name,"-").concat(u));for(var d=0,h=Object.entries(c);d<h.length;d++){var p=o(h[d],2),v=p[0],y=p[1];if(null!=y&&"dataId"!==v){if("style"!==v){if("textContent"===v)r.textContent=y;else if("class"===v)y.length&&r.setAttribute(v,y.join(" "));else{if(f&&("href"===v||"newWindow"===v))continue;r.setAttribute(v,y)}}else Object.assign(r.style,y)}}f&&(l.addLinkAttributes||(0,n.warn)("XfaLayer.setAttribute - missing `addLinkAttributes`-method on the `linkService`-instance."),null===(t=l.addLinkAttributes)||void 0===t||t.call(l,r,c.href,c.newWindow)),s&&c.dataId&&this.setupStorage(r,c.dataId,a,s)}},{key:"render",value:function(e){var t=e.annotationStorage,r=e.linkService,n=e.xfaHtml,i=e.intent||"display",s=document.createElement(n.name);n.attributes&&this.setAttributes({html:s,element:n,intent:i,linkService:r});var u=[[n,-1,s]],c=e.div;if(c.appendChild(s),e.viewport){var f="matrix(".concat(e.viewport.transform.join(","),")");c.style.transform=f}"richText"!==i&&c.setAttribute("class","xfaLayer xfaFont");for(var d=[];u.length>0;){var h,p=o(u[u.length-1],3),v=p[0],y=p[1],m=p[2];if(y+1===v.children.length){u.pop();continue}var g=v.children[++u[u.length-1][1]];if(null!==g){var b=g.name;if("#text"===b){var _=document.createTextNode(g.value);d.push(_),m.appendChild(_);continue}var S=void 0;if(S=null!=g&&null!==(h=g.attributes)&&void 0!==h&&h.xmlns?document.createElementNS(g.attributes.xmlns,b):document.createElement(b),m.appendChild(S),g.attributes&&this.setAttributes({html:S,element:g,storage:t,intent:i,linkService:r}),g.children&&g.children.length>0)u.push([g,-1,S]);else if(g.value){var A=document.createTextNode(g.value);a.XfaText.shouldBuildText(b)&&d.push(A),S.appendChild(A)}}}var k,w=l(c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"));try{for(w.s();!(k=w.n()).done;)k.value.setAttribute("readOnly",!0)}catch(e){w.e(e)}finally{w.f()}return{textDivs:d}}},{key:"update",value:function(e){var t="matrix(".concat(e.viewport.transform.join(","),")");e.div.style.transform=t,e.div.hidden=!1}}]),e}();t.XfaLayer=v},(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=k;var n=r(4);function a(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),e}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function u(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var c=1e5,f=30,d=.8,h=new Map,p=/^\s+$/g;function v(e,t){var r=h.get(e);if(r)return r;t.save(),t.font="".concat(f,"px ").concat(e);var n=t.measureText(""),a=n.fontBoundingBoxAscent,o=Math.abs(n.fontBoundingBoxDescent);if(a){t.restore();var i=a/(a+o);return h.set(e,i),i}t.strokeStyle="red",t.clearRect(0,0,f,f),t.strokeText("g",0,0);var s=t.getImageData(0,0,f,f).data;o=0;for(var u=s.length-1-3;u>=0;u-=4)if(s[u]>0){o=Math.ceil(u/4/f);break}t.clearRect(0,0,f,f),t.strokeText("A",0,f),s=t.getImageData(0,0,f,f).data,a=0;for(var l=0,c=s.length;l<c;l+=4)if(s[l]>0){a=f-Math.floor(l/4/f);break}if(t.restore(),a){var p=a/(a+o);return h.set(e,p),p}return h.set(e,d),d}function y(e,t,r,a){var o=document.createElement("span"),i=e._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1}:{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL};e._textDivs.push(o);var s=n.Util.transform(e._viewport.transform,t.transform),u=Math.atan2(s[1],s[0]),l=r[t.fontName];l.vertical&&(u+=Math.PI/2);var c=Math.hypot(s[2],s[3]),f=c*v(l.fontFamily,a);0===u?(m=s[4],g=s[5]-f):(m=s[4]+f*Math.sin(u),g=s[5]-f*Math.cos(u)),o.style.left="".concat(m,"px"),o.style.top="".concat(g,"px"),o.style.fontSize="".concat(c,"px"),o.style.fontFamily=l.fontFamily,o.setAttribute("role","presentation"),o.textContent=t.str,o.dir=t.dir,e._fontInspectorEnabled&&(o.dataset.fontName=t.fontName),0!==u&&(i.angle=180/Math.PI*u);var d=!1;if(t.str.length>1||e._enhanceTextSelection&&p.test(t.str))d=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){var h=Math.abs(t.transform[0]),y=Math.abs(t.transform[3]);h!==y&&Math.max(h,y)/Math.min(h,y)>1.5&&(d=!0)}if(d&&(l.vertical?i.canvasWidth=t.height*e._viewport.scale:i.canvasWidth=t.width*e._viewport.scale),e._textDivProperties.set(o,i),e._textContentStream&&e._layoutText(o),e._enhanceTextSelection&&i.hasText){var m,g,b,_,S=1,A=0;0!==u&&(S=Math.cos(u),A=Math.sin(u));var k=(l.vertical?t.height:t.width)*e._viewport.scale,w=c;0!==u?(b=[S,A,-A,S,m,g],_=n.Util.getAxialAlignedBoundingBox([0,0,k,w],b)):_=[m,g,m+k,g+w],e._bounds.push({left:_[0],top:_[1],right:_[2],bottom:_[3],div:o,size:[k,w],m:b})}}function m(e){if(!e._canceled){var t=e._textDivs,r=e._capability,n=t.length;if(n>c){e._renderingDone=!0,r.resolve();return}if(!e._textContentStream)for(var a=0;a<n;a++)e._layoutText(t[a]);e._renderingDone=!0,r.resolve()}}function g(e,t,r){for(var n=0,a=0;a<r;a++){var o=e[t++];o>0&&(n=n?Math.min(o,n):o)}return n}function b(e){for(var t=e._bounds,r=e._viewport,a=_(r.width,r.height,t),o=0;o<a.length;o++){var i=t[o].div,s=e._textDivProperties.get(i);if(0===s.angle){s.paddingLeft=t[o].left-a[o].left,s.paddingTop=t[o].top-a[o].top,s.paddingRight=a[o].right-t[o].right,s.paddingBottom=a[o].bottom-t[o].bottom,e._textDivProperties.set(i,s);continue}for(var u=a[o],l=t[o],c=l.m,f=c[0],d=c[1],h=[[0,0],[0,l.size[1]],[l.size[0],0],l.size],p=new Float64Array(64),v=0,y=h.length;v<y;v++){var m=n.Util.applyTransform(h[v],c);
1p[v+0]=f&&(u.left-m[0])/f,p[v+4]=d&&(u.top-m[1])/d,p[v+8]=f&&(u.right-m[0])/f,p[v+12]=d&&(u.bottom-m[1])/d,p[v+16]=d&&-((u.left-m[0])/d),p[v+20]=f&&(u.top-m[1])/f,p[v+24]=d&&-((u.right-m[0])/d),p[v+28]=f&&(u.bottom-m[1])/f,p[v+32]=f&&-((u.left-m[0])/f),p[v+36]=d&&-((u.top-m[1])/d),p[v+40]=f&&-((u.right-m[0])/f),p[v+44]=d&&-((u.bottom-m[1])/d),p[v+48]=d&&(u.left-m[0])/d,p[v+52]=f&&-((u.top-m[1])/f),p[v+56]=d&&(u.right-m[0])/d,p[v+60]=f&&-((u.bottom-m[1])/f)}var b=1+Math.min(Math.abs(f),Math.abs(d));s.paddingLeft=g(p,32,16)/b,s.paddingTop=g(p,48,16)/b,s.paddingRight=g(p,0,16)/b,s.paddingBottom=g(p,16,16)/b,e._textDivProperties.set(i,s)}}function _(e,t,r){var n=r.map(function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}});S(e,n);var a,o=Array(r.length),i=s(n);try{for(i.s();!(a=i.n()).done;){var u=a.value;o[u.index]={left:u.x1New,top:0,right:u.x2New,bottom:0}}}catch(e){i.e(e)}finally{i.f()}r.map(function(t,r){var a=o[r],i=n[r];i.x1=t.top,i.y1=e-a.right,i.x2=t.bottom,i.y2=e-a.left,i.index=r,i.x1New=void 0,i.x2New=void 0}),S(t,n);var l,c=s(n);try{for(c.s();!(l=c.n()).done;){var f=l.value,d=f.index;o[d].top=f.x1New,o[d].bottom=f.x2New}}catch(e){c.e(e)}finally{c.f()}return o}function S(e,t){t.sort(function(e,t){return e.x1-t.x1||e.index-t.index});var r,n=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}],a=s(t);try{for(a.s();!(r=a.n()).done;){for(var o=r.value,i=0;i<n.length&&n[i].end<=o.y1;)i++;for(var u=n.length-1;u>=0&&n[u].start>=o.y2;)u--;var l=void 0,c=void 0,f=void 0,d=void 0,h=-1/0;for(f=i;f<=u;f++){c=(l=n[f]).boundary;var p=void 0;(p=c.x2>o.x1?c.index>o.index?c.x1New:o.x1:void 0===c.x2New?(c.x2+o.x1)/2:c.x2New)>h&&(h=p)}for(o.x1New=h,f=i;f<=u;f++)c=(l=n[f]).boundary,void 0===c.x2New?c.x2>o.x1?c.index>o.index&&(c.x2New=c.x2):c.x2New=h:c.x2New>h&&(c.x2New=Math.max(h,c.x2));var v=[],y=null;for(f=i;f<=u;f++){var m=(c=(l=n[f]).boundary).x2>o.x2?c:o;y===m?v[v.length-1].end=l.end:(v.push({start:l.start,end:l.end,boundary:m}),y=m)}for(n[i].start<o.y1&&(v[0].start=o.y1,v.unshift({start:n[i].start,end:o.y1,boundary:n[i].boundary})),o.y2<n[u].end&&(v[v.length-1].end=o.y2,v.push({start:o.y2,end:n[u].end,boundary:n[u].boundary})),f=i;f<=u;f++)if(c=(l=n[f]).boundary,void 0===c.x2New){var g=!1;for(d=i-1;!g&&d>=0&&n[d].start>=c.y1;d--)g=n[d].boundary===c;for(d=u+1;!g&&d<n.length&&n[d].end<=c.y2;d++)g=n[d].boundary===c;for(d=0;!g&&d<v.length;d++)g=v[d].boundary===c;g||(c.x2New=h)}Array.prototype.splice.apply(n,[i,u-i+1].concat(v))}}catch(e){a.e(e)}finally{a.f()}for(var b=0,_=n;b<_.length;b++){var S=_[b].boundary;void 0===S.x2New&&(S.x2New=Math.max(e,S.x2))}}var A=function(){function e(t){var r,o=this,i=t.textContent,s=t.textContentStream,u=t.container,l=t.viewport,c=t.textDivs,f=t.textContentItemsStr,d=t.enhanceTextSelection;a(this,e),this._textContent=i,this._textContentStream=s,this._container=u,this._document=u.ownerDocument,this._viewport=l,this._textDivs=c||[],this._textContentItemsStr=f||[],this._enhanceTextSelection=!!d,this._fontInspectorEnabled=!!(null!==(r=globalThis.FontInspector)&&void 0!==r&&r.enabled),this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,n.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally(function(){o._enhanceTextSelection||(o._textDivProperties=null),o._layoutTextCtx&&(o._layoutTextCtx.canvas.width=0,o._layoutTextCtx.canvas.height=0,o._layoutTextCtx=null)}).catch(function(){})}return i(e,[{key:"promise",get:function(){return this._capability.promise}},{key:"cancel",value:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new n.AbortException("TextLayer task cancelled.")).catch(function(){}),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(Error("TextLayer task cancelled."))}},{key:"_processItems",value:function(e,t){for(var r=0,n=e.length;r<n;r++){if(void 0===e[r].str){if("beginMarkedContentProps"===e[r].type||"beginMarkedContent"===e[r].type){var a=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==e[r].id&&this._container.setAttribute("id","".concat(e[r].id)),a.appendChild(this._container)}else"endMarkedContent"===e[r].type&&(this._container=this._container.parentNode);continue}this._textContentItemsStr.push(e[r].str),y(this,e[r],t,this._layoutTextCtx)}}},{key:"_layoutText",value:function(e){var t=this._textDivProperties.get(e),r="";if(0!==t.canvasWidth&&t.hasText){var n=e.style,a=n.fontSize,o=n.fontFamily;(a!==this._layoutTextLastFontSize||o!==this._layoutTextLastFontFamily)&&(this._layoutTextCtx.font="".concat(a," ").concat(o),this._layoutTextLastFontSize=a,this._layoutTextLastFontFamily=o);var i=this._layoutTextCtx.measureText(e.textContent).width;if(i>0){var s=t.canvasWidth/i;this._enhanceTextSelection&&(t.scale=s),r="scaleX(".concat(s,")")}}if(0!==t.angle&&(r="rotate(".concat(t.angle,"deg) ").concat(r)),r.length>0&&(this._enhanceTextSelection&&(t.originalTransform=r),e.style.transform=r),t.hasText&&this._container.appendChild(e),t.hasEOL){var u=document.createElement("br");u.setAttribute("role","presentation"),this._container.appendChild(u)}}},{key:"_render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=(0,n.createPromiseCapability)(),a=Object.create(null),o=this._document.createElement("canvas");if(o.height=o.width=f,o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent){var i=this._textContent.items,s=this._textContent.styles;this._processItems(i,s),r.resolve()}else if(this._textContentStream){var u=function t(){e._reader.read().then(function(n){var o=n.value;if(n.done){r.resolve();return}Object.assign(a,o.styles),e._processItems(o.items,a),t()},r.reject)};this._reader=this._textContentStream.getReader(),u()}else throw Error('Neither "textContent" nor "textContentStream" parameters specified.');r.promise.then(function(){a=null,t?e._renderTimer=setTimeout(function(){m(e),e._renderTimer=null},t):m(e)},this._capability.reject)}},{key:"expandTextDivs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(b
1(this),this._bounds=null);for(var t=[],r=[],n=0,a=this._textDivs.length;n<a;n++){var o=this._textDivs[n],i=this._textDivProperties.get(o);i.hasText&&(e?(t.length=0,r.length=0,i.originalTransform&&t.push(i.originalTransform),i.paddingTop>0?(r.push("".concat(i.paddingTop,"px")),t.push("translateY(".concat(-i.paddingTop,"px)"))):r.push(0),i.paddingRight>0?r.push("".concat(i.paddingRight/i.scale,"px")):r.push(0),i.paddingBottom>0?r.push("".concat(i.paddingBottom,"px")):r.push(0),i.paddingLeft>0?(r.push("".concat(i.paddingLeft/i.scale,"px")),t.push("translateX(".concat(-i.paddingLeft/i.scale,"px)"))):r.push(0),o.style.padding=r.join(" "),t.length&&(o.style.transform=t.join(" "))):(o.style.padding=null,o.style.transform=i.originalTransform))}}}}]),e}();function k(e){var t=new A({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n=r(4),a=r(1),o=r(6);function i(e){return l(e)||u(e)||v(e)||s()}function s(){throw 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&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e){if(Array.isArray(e))return y(e)}function c(e,t){return h(e)||d(e,t)||v(e,t)||f()}function f(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){var r,n,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(r=a.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw n}}return o}}function h(e){if(Array.isArray(e))return e}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=v(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function v(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),e}function b(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var _=function e(){b(this,e),(0,n.unreachable)("Not implemented: SVGGraphics")};t.SVGGraphics=_;var S=function(e){var t,r=[],n=[],a=p(e);try{for(a.s();!(t=a.n()).done;){var o=t.value;if("save"===o.fn){r.push({fnId:92,fn:"group",items:[]}),n.push(r),r=r[r.length-1].items;continue}"restore"===o.fn?r=n.pop():r.push(o)}}catch(e){a.e(e)}finally{a.f()}return r},A=function(e){if(Number.isInteger(e))return e.toString();var t=e.toFixed(10),r=t.length-1;if("0"!==t[r])return t;do r--;while("0"===t[r]);return t.substring(0,"."===t[r]?r:r+1)},k=function(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":"scale(".concat(A(e[0])," ").concat(A(e[3]),")");
1if(e[0]===e[3]&&e[1]===-e[2]){var t=180*Math.acos(e[0])/Math.PI;return"rotate(".concat(A(t),")")}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return"translate(".concat(A(e[4])," ").concat(A(e[5]),")");return"matrix(".concat(A(e[0])," ").concat(A(e[1])," ").concat(A(e[2])," ").concat(A(e[3])," ").concat(A(e[4])," ")+"".concat(A(e[5]),")")},w={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},x="http://www.w3.org/XML/1998/namespace",C="http://www.w3.org/1999/xlink",P=["butt","round","square"],T=["miter","round","bevel"],R=function(){for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),t=12,r=new Int32Array(256),a=0;a<256;a++){for(var i=a,s=0;s<8;s++)i=1&i?3988292384^i>>1&2147483647:i>>1&2147483647;r[a]=i}function u(e,t,n){for(var a=-1,o=t;o<n;o++){var i=r[(a^e[o])&255];a=a>>>8^i}return -1^a}function l(e,t,r,n){var a=n,o=t.length;r[a]=o>>24&255,r[a+1]=o>>16&255,r[a+2]=o>>8&255,r[a+3]=255&o,r[a+=4]=255&e.charCodeAt(0),r[a+1]=255&e.charCodeAt(1),r[a+2]=255&e.charCodeAt(2),r[a+3]=255&e.charCodeAt(3),a+=4,r.set(t,a);var i=u(r,n+4,a+=t.length);r[a]=i>>24&255,r[a+1]=i>>16&255,r[a+2]=i>>8&255,r[a+3]=255&i}function c(e,t,r){for(var n=1,a=0,o=t;o<r;++o)a=(a+(n=(n+(255&e[o]))%65521))%65521;return a<<16|n}function f(e){if(!o.isNodeJS)return d(e);try{t=parseInt(process.versions.node)>=8?e:Buffer.from(e);var t,r=__webpack_require__(7324).deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return d(e)}function d(e){var t=e.length,r=65535,n=Math.ceil(t/65535),a=new Uint8Array(2+t+5*n+4),o=0;a[o++]=120,a[o++]=156;for(var i=0;t>r;)a[o++]=0,a[o++]=255,a[o++]=255,a[o++]=0,a[o++]=0,a.set(e.subarray(i,i+r),o),o+=r,i+=r,t-=r;a[o++]=1,a[o++]=255&t,a[o++]=t>>8&255,a[o++]=255&~t,a[o++]=(65535&~t)>>8&255,a.set(e.subarray(i),o),o+=e.length-i;var s=c(e,0,e.length);return a[o++]=s>>24&255,a[o++]=s>>16&255,a[o++]=s>>8&255,a[o++]=255&s,a}function h(r,a,o,i){var s,u,c,d=r.width,h=r.height,p=r.data;switch(a){case n.ImageKind.GRAYSCALE_1BPP:u=0,s=1,c=d+7>>3;break;case n.ImageKind.RGB_24BPP:u=2,s=8,c=3*d;break;case n.ImageKind.RGBA_32BPP:u=6,s=8,c=4*d;break;default:throw Error("invalid format")}for(var v=new Uint8Array((1+c)*h),y=0,m=0,g=0;g<h;++g)v[y++]=0,v.set(p.subarray(m,m+c),y),m+=c,y+=c;if(a===n.ImageKind.GRAYSCALE_1BPP&&i){y=0;for(var b=0;b<h;b++){y++;for(var _=0;_<c;_++)v[y++]^=255}}var S=new Uint8Array([d>>24&255,d>>16&255,d>>8&255,255&d,h>>24&255,h>>16&255,h>>8&255,255&h,s,u,0,0,0]),A=f(v),k=new Uint8Array(e.length+3*t+S.length+A.length),w=0;return k.set(e,w),l("IHDR",S,k,w+=e.length),l("IDATA",A,k,w+=t+S.length),w+=t+A.length,l("IEND",new Uint8Array(0),k,w),(0,n.createObjectURL)(k,"image/png",o)}return function(e,t,r){var a=void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind;return h(e,a,t,r)}}(),E=function(){function e(){b(this,e),this.fontSizeScale=1,this.fontWeight=w.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=w.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 g(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),O=0,F=0,M=0;t.SVGGraphics=_=function(){function e(t,r){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var i in b(this,e),this.svgFactory=new a.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=!!o,this._operatorIdMapping=[],n.OPS)this._operatorIdMapping[n.OPS[i]]=i}return g(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(
1)}},{key:"loadDependencies",value:function(e){for(var t=this,r=e.fnArray,a=e.argsArray,o=0,i=r.length;o<i;o++)if(r[o]===n.OPS.dependency){var s,u=p(a[o]);try{var l=function(){var e=s.value,r=e.startsWith("g_")?t.commonObjs:t.objs,n=new Promise(function(t){r.get(e,t)});t.current.dependencies.push(n)};for(u.s();!(s=u.n()).done;)l()}catch(e){u.e(e)}finally{u.f()}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function(e,t,r,a,o,i){var s=[e,t,r,a,o,i];this.transformMatrix=n.Util.transform(this.transformMatrix,s),this.tgrp=null}},{key:"getSVG",value:function(e,t){var r=this;this.viewport=t;var a=this._initialize(t);return this.loadDependencies(e).then(function(){return r.transformMatrix=n.IDENTITY_MATRIX,r.executeOpTree(r.convertOpList(e)),a})}},{key:"convertOpList",value:function(e){for(var t=this._operatorIdMapping,r=e.argsArray,n=e.fnArray,a=[],o=0,i=n.length;o<i;o++){var s=n[o];a.push({fnId:s,fn:t[s],args:r[o]})}return S(a)}},{key:"executeOpTree",value:function(e){var t,r=p(e);try{for(r.s();!(t=r.n()).done;){var a=t.value,o=a.fn,i=a.fnId,s=a.args;switch(0|i){case n.OPS.beginText:this.beginText();break;case n.OPS.dependency:break;case n.OPS.setLeading:this.setLeading(s);break;case n.OPS.setLeadingMoveText:this.setLeadingMoveText(s[0],s[1]);break;case n.OPS.setFont:this.setFont(s);break;case n.OPS.showText:case n.OPS.showSpacedText:this.showText(s[0]);break;case n.OPS.endText:this.endText();break;case n.OPS.moveText:this.moveText(s[0],s[1]);break;case n.OPS.setCharSpacing:this.setCharSpacing(s[0]);break;case n.OPS.setWordSpacing:this.setWordSpacing(s[0]);break;case n.OPS.setHScale:this.setHScale(s[0]);break;case n.OPS.setTextMatrix:this.setTextMatrix(s[0],s[1],s[2],s[3],s[4],s[5]);break;case n.OPS.setTextRise:this.setTextRise(s[0]);break;case n.OPS.setTextRenderingMode:this.setTextRenderingMode(s[0]);break;case n.OPS.setLineWidth:this.setLineWidth(s[0]);break;case n.OPS.setLineJoin:this.setLineJoin(s[0]);break;case n.OPS.setLineCap:this.setLineCap(s[0]);break;case n.OPS.setMiterLimit:this.setMiterLimit(s[0]);break;case n.OPS.setFillRGBColor:this.setFillRGBColor(s[0],s[1],s[2]);break;case n.OPS.setStrokeRGBColor:this.setStrokeRGBColor(s[0],s[1],s[2]);break;case n.OPS.setStrokeColorN:this.setStrokeColorN(s);break;case n.OPS.setFillColorN:this.setFillColorN(s);break;case n.OPS.shadingFill:this.shadingFill(s[0]);break;case n.OPS.setDash:this.setDash(s[0],s[1]);break;case n.OPS.setRenderingIntent:this.setRenderingIntent(s[0]);break;case n.OPS.setFlatness:this.setFlatness(s[0]);break;case n.OPS.setGState:this.setGState(s[0]);break;case n.OPS.fill:this.fill();break;case n.OPS.eoFill:this.eoFill();break;case n.OPS.stroke:this.stroke();break;case n.OPS.fillStroke:this.fillStroke();break;case n.OPS.eoFillStroke:this.eoFillStroke();break;case n.OPS.clip:this.clip("nonzero");break;case n.OPS.eoClip:this.clip("evenodd");break;case n.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case n.OPS.paintImageXObject:this.paintImageXObject(s[0]);break;case n.OPS.paintInlineImageXObject:this.paintInlineImageXObject(s[0]);break;case n.OPS.paintImageMaskXObject:this.paintImageMaskXObject(s[0]);break;case n.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(s[0],s[1]);break;case n.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case n.OPS.closePath:this.closePath();break;case n.OPS.closeStroke:this.closeStroke();break;case n.OPS.closeFillStroke:this.closeFillStroke();break;case n.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case n.OPS.nextLine:this.nextLine();break;case n.OPS.transform:this.transform(s[0],s[1],s[2],s[3],s[4],s[5]);break;case n.OPS.constructPath:this.constructPath(s[0],s[1]);break;case n.OPS.endPath:this.endPath();break;case 92:this.group(a.items);break;default:(0,n.warn)("Unimplemented operator ".concat(o))}}}catch(e){r.e(e)}finally{r.f()}}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function(e,t,r,n,a,o){var i=this.current;i.textMatrix=i.lineMatrix=[e,t,r,n,a,o],i.textMatrixScale=Math.hypot(e,t),i.x=i.lineX=0,i.y=i.lineY=0,i.xcoords=[],i.ycoords=[],i.tspan=this.svgFactory.createElement("svg:tspan"),i.tspan.setAttributeNS(null,"font-family",
1i.fontFamily),i.tspan.setAttributeNS(null,"font-size","".concat(A(i.fontSize),"px")),i.tspan.setAttributeNS(null,"y",A(-i.y)),i.txtElement=this.svgFactory.createElement("svg:text"),i.txtElement.appendChild(i.tspan)}},{key:"beginText",value:function(){var e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=n.IDENTITY_MATRIX,e.lineMatrix=n.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}},{key:"moveText",value:function(e,t){var r=this.current;r.x=r.lineX+=e,r.y=r.lineY+=t,r.xcoords=[],r.ycoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size","".concat(A(r.fontSize),"px")),r.tspan.setAttributeNS(null,"y",A(-r.y))}},{key:"showText",value:function(e){var t=this.current,r=t.font,a=t.fontSize;if(0!==a){var o,i=t.fontSizeScale,s=t.charSpacing,u=t.wordSpacing,l=t.fontDirection,c=t.textHScale*l,f=r.vertical,d=f?1:-1,h=r.defaultVMetrics,v=a*t.fontMatrix[0],y=0,m=p(e);try{for(m.s();!(o=m.n()).done;){var g=o.value;if(null===g){y+=l*u;continue}if((0,n.isNum)(g)){y+=d*g*a/1e3;continue}var b=(g.isSpace?u:0)+s,_=g.fontChar,S=void 0,C=void 0,P=g.width;if(f){var T=void 0,R=g.vmetric||h;T=-(T=g.vmetric?R[1]:.5*P)*v;var E=R[2]*v;P=R?-R[0]:P,S=T/i,C=(y+E)/i}else S=y/i,C=0;(g.isInFont||r.missingFile)&&(t.xcoords.push(t.x+S),f&&t.ycoords.push(-t.y+C),t.tspan.textContent+=_);var O=void 0;O=f?P*v-b*l:P*v+b*l,y+=O}}catch(e){m.e(e)}finally{m.f()}t.tspan.setAttributeNS(null,"x",t.xcoords.map(A).join(" ")),f?t.tspan.setAttributeNS(null,"y",t.ycoords.map(A).join(" ")):t.tspan.setAttributeNS(null,"y",A(-t.y)),f?t.y-=y:t.x+=y*c,t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size","".concat(A(t.fontSize),"px")),t.fontStyle!==w.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==w.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);var F=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;if(F===n.TextRenderingMode.FILL||F===n.TextRenderingMode.FILL_STROKE?(t.fillColor!==w.fillColor&&t.tspan.setAttributeNS(null,"fill",t.fillColor),t.fillAlpha<1&&t.tspan.setAttributeNS(null,"fill-opacity",t.fillAlpha)):t.textRenderingMode===n.TextRenderingMode.ADD_TO_PATH?t.tspan.setAttributeNS(null,"fill","transparent"):t.tspan.setAttributeNS(null,"fill","none"),F===n.TextRenderingMode.STROKE||F===n.TextRenderingMode.FILL_STROKE){var M=1/(t.textMatrixScale||1);this._setStrokeAttributes(t.tspan,M)}var I=t.textMatrix;0!==t.textRise&&(I=I.slice(),I[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform","".concat(k(I)," scale(").concat(A(c),", -1)")),t.txtElement.setAttributeNS(x,"xml:space","preserve"),t.txtElement.appendChild(t.tspan),t.txtgrp.appendChild(t.txtElement),this._ensureTransformGroup().appendChild(t.txtElement)}}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"addFontStyle",value:function(e){if(!e.data)throw Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var t=(0,n.createObjectURL)(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(e.loadedName,'";')+" src: url(".concat(t,"); }\n")}},{key:"setFont",value:function(e){var t=this.current,r=this.commonObjs.get(e[0]),a=e[1];t.font=r,!this.embedFonts||r.missingFile||this.embeddedFonts[r.loadedName]||(this.addFontStyle(r),this.embeddedFonts[r.loadedName]=r),t.fontMatrix=r.fontMatrix||n.FONT_IDENTITY_MATRIX;var o="normal";r.black?o="900":r.bold&&(o="bold");var i=r.italic?"italic":"normal";a<0?(a=-a,t.fontDirection=-1):t.fontDirection=1,t.fontSize=a,t.fontFamily=r.loadedName,t.fontWeight=o,t.fontStyle=i,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",A(-t.y)),t.xcoords=[],t.ycoords=[]}},{key:"endText",value:function(){var e,t=this.current;t.textRenderingMode&n.TextRenderingMode.ADD_TO_PATH_FLAG&&null!==(e=t.txtElement)&&void 0!==e&&e.hasChildNodes()&&(t.element=t.txtElement,this.clip("nonzero"),this.endPath())}},{key:"setLineWidth",value:function(e){e>0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=P[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=T[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.makeHexColor(e,t,r)}},{key:"setFillAlpha",value:function(e){this.current.fillAlpha=e}},{key:"setFillRGBColor",value:function(e,t,r){this.current.fillColor=n.Util.makeHexColor(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,a=n.Util.inverseTransform(this.transformMatrix),o=n.Util.applyTransform([0,0],a),i=n.Util.applyTransform([0,r],a),s=n.Util.applyTransform([t,0],a),u=n.Util.applyTransform([t,r],a),l=Math.min(o[0],i[0],s[0],u[0]),c=Math.min(o[1],i[1],s[1],u[1]),f=Math.max(o[0],i[0],s[0],u[0]),d=Math.max(o[1],i[1],s[1],u[1]),h=this.svgFactory.createElement("svg:rect");h.setAttributeNS(null,"x",l),h.setAttributeNS(null,"y",c),h.setAttributeNS(null,"width",f-l),h.setAttributeNS(null,"height",d-c),h.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&h.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(h)}},{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],a=e[3]||n.IDENTITY_MATRIX,o=c(e[4],4),s=o[0],u=o[1],l=o[2],f=o[3],d=e[5],h=e[6],p=e[7],v="shading".concat(M++),y=c(n.Util.normalizeRect([].
1concat(i(n.Util.applyTransform([s,u],a)),i(n.Util.applyTransform([l,f],a)))),4),m=y[0],g=y[1],b=y[2],_=y[3],S=c(n.Util.singularValueDecompose2dScale(a),2),A=S[0],k=S[1],w=d*A,x=h*k,C=this.svgFactory.createElement("svg:pattern");C.setAttributeNS(null,"id",v),C.setAttributeNS(null,"patternUnits","userSpaceOnUse"),C.setAttributeNS(null,"width",w),C.setAttributeNS(null,"height",x),C.setAttributeNS(null,"x","".concat(m)),C.setAttributeNS(null,"y","".concat(g));var P=this.svg,T=this.transformMatrix,R=this.current.fillColor,E=this.current.strokeColor,O=this.svgFactory.create(b-m,_-g);if(this.svg=O,this.transformMatrix=a,2===p){var F=n.Util.makeHexColor.apply(n.Util,i(t));this.current.fillColor=F,this.current.strokeColor=F}return this.executeOpTree(this.convertOpList(r)),this.svg=P,this.transformMatrix=T,this.current.fillColor=R,this.current.strokeColor=E,C.appendChild(O.childNodes[0]),this.defs.appendChild(C),"url(#".concat(v,")")}},{key:"_makeShadingPattern",value:function(e){switch("string"==typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":var t="shading".concat(M++),r=e[3];switch(e[1]){case"axial":var a=e[4],o=e[5];(c=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",t),c.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),c.setAttributeNS(null,"x1",a[0]),c.setAttributeNS(null,"y1",a[1]),c.setAttributeNS(null,"x2",o[0]),c.setAttributeNS(null,"y2",o[1]);break;case"radial":var i=e[4],s=e[5],u=e[6],l=e[7];(c=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",t),c.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),c.setAttributeNS(null,"cx",s[0]),c.setAttributeNS(null,"cy",s[1]),c.setAttributeNS(null,"r",l),c.setAttributeNS(null,"fx",i[0]),c.setAttributeNS(null,"fy",i[1]),c.setAttributeNS(null,"fr",u);break;default:throw Error("Unknown RadialAxial type: ".concat(e[1]))}var c,f,d=p(r);try{for(d.s();!(f=d.n()).done;){var h=f.value,v=this.svgFactory.createElement("svg:stop");v.setAttributeNS(null,"offset",h[0]),v.setAttributeNS(null,"stop-color",h[1]),c.appendChild(v)}}catch(e){d.e(e)}finally{d.f()}return this.defs.appendChild(c),"url(#".concat(t,")");case"Mesh":return(0,n.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw 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,a=this.current,o=a.x,i=a.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:o=t[u++],i=t[u++];var f=t[u++],d=t[u++],h=o+f,v=i+d;s.push("M",A(o),A(i),"L",A(h),A(i),"L",A(h),A(v),"L",A(o),A(v),"Z");break;case n.OPS.moveTo:o=t[u++],i=t[u++],s.push("M",A(o),A(i));break;case n.OPS.lineTo:o=t[u++],i=t[u++],s.push("L",A(o),A(i));break;case n.OPS.curveTo:o=t[u+4],i=t[u+5],s.push("C",A(t[u]),A(t[u+1]),A(t[u+2]),A(t[u+3]),A(o),A(i)),u+=6;break;case n.OPS.curveTo2:s.push("C",A(o),A(i),A(t[u]),A(t[u+1]),A(t[u+2]),A(t[u+3])),o=t[u+2],i=t[u+3],u+=4;break;case n.OPS.curveTo3:o=t[u+2],i=t[u+3],s.push("C",A(t[u]),A(t[u+1]),A(o),A(i),A(o),A(i)),u+=4;break;case n.OPS.closePath:s.push("Z")}}}catch(e){l.e(e)}finally{l.f()}s=s.join(" "),a.path&&e.length>0&&e[0]!==n.OPS.rectangle&&e[0]!==n.OPS.moveTo?s=a.path.getAttributeNS(null,"d")+s:(a.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(a.path)),a.path.setAttributeNS(null,"d",s),a.path.setAttributeNS(null,"fill","none"),a.element=a.path,a.setCurrentPoint(o,i)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip){if(!e.element){this.pendingClip=null;return}var t="clippath".concat(O++),r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",k(this.transformMatrix));var n=e.element.cloneNode(!0);if("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;var a,o=p(this.extraStack);try{for(o.s();!(a=o.n()).done;)a.value.clipGroup=null}catch(e){o.e(e)}finally{o.f()}r.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl="url(#".concat(t,")"),this.tgrp=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 a=c(t.value,2),o=a[0],i=a[1];switch(o){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;
1case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i);break;case"CA":this.setStrokeAlpha(i);break;case"ca":this.setFillAlpha(i);break;default:(0,n.warn)("Unimplemented graphic state operator ".concat(o))}}}catch(e){r.e(e)}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",A(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",A(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",n.map(A).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",A(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);if(!t){(0,n.warn)("Dependent image with object ID ".concat(e," is not ready yet"));return}this.paintInlineImageXObject(t)}},{key:"paintInlineImageXObject",value:function(e,t){var r=e.width,n=e.height,a=R(e,this.forceDataSchema,!!t),o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",A(r)),o.setAttributeNS(null,"height",A(n)),this.current.element=o,this.clip("nonzero");var i=this.svgFactory.createElement("svg:image");i.setAttributeNS(C,"xlink:href",a),i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y",A(-n)),i.setAttributeNS(null,"width",A(r)+"px"),i.setAttributeNS(null,"height",A(n)+"px"),i.setAttributeNS(null,"transform","scale(".concat(A(1/r)," ").concat(A(-1/n),")")),t?t.appendChild(i):this._ensureTransformGroup().appendChild(i)}},{key:"paintImageMaskXObject",value:function(e){var t=this.current,r=e.width,n=e.height,a=t.fillColor;t.maskId="mask".concat(F++);var o=this.svgFactory.createElement("svg:mask");o.setAttributeNS(null,"id",t.maskId);var i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",A(r)),i.setAttributeNS(null,"height",A(n)),i.setAttributeNS(null,"fill",a),i.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(o),this._ensureTransformGroup().appendChild(i),this.paintInlineImageXObject(e,o)}},{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],a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x",t[0]),a.setAttributeNS(null,"y",t[1]),a.setAttributeNS(null,"width",A(r)),a.setAttributeNS(null,"height",A(n)),this.current.element=a,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",k(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",k(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},(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})(e)}
1Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var a=s(r(2)),o=r(4),i=r(154);function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if("function"!=typeof t&&null!==t)throw 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})(e,t)}function c(e){var t=h();return function(){var r,n=p(e);return r=t?Reflect.construct(n,arguments,p(this).constructor):n.apply(this,arguments),f(this,r)}}function f(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,a)}function y(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){v(o,n,a,i,s,"next",e)}function s(e){v(o,n,a,i,s,"throw",e)}i(void 0)})}}function m(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=g(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function g(e,t){if(e){if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function A(e,t,r){return t&&S(e.prototype,t),r&&S(e,r),e}var k=__webpack_require__(6131),w=__webpack_require__(9107),x=__webpack_require__(7677),C=__webpack_require__(1987),P=/^file:\/\/\/[a-zA-Z]:\//;function T(e){var t=C.parse(e);return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?C.parse("file:///".concat(e)):(t.host||(t.protocol="file:"),t)}var R=function(){function e(t){_(this,e),this.source=t,this.url=T(t.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return A(e,[{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,o.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new j(this):new M(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=this.isFsUrl?new L(this,e,t):new I(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=m(this._rangeRequestReaders.slice(0));try{for(r.s();!(t=r.n()).done;)t.value.cancel(e)}catch(e){r.e(e)}finally{r.f()}}}]),e}();t.PDFNodeStream=R;var E=function(){function e(t){_(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;var r=t.source;this._contentLength=r.length,this._loaded=0,this._filename=null,this._disableRange=r.disableRange||!1,this._rangeChunkSize=r.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!r.disableStream,this._isRangeSupported=!r.disableRange,this._readableStream=null,this._readCapability=(0,o.createPromiseCapability)(),this._headersCapability=(0,o.createPromiseCapability)()}return A(e,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=y(a.default.mark(function e(){var t,r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,o.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}
1),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){if(!this._readableStream){this._error(e);return}this._readableStream.destroy(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",function(){t._readCapability.resolve()}),e.on("end",function(){e.destroy(),t._done=!0,t._readCapability.resolve()}),e.on("error",function(e){t._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new o.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}]),e}(),O=function(){function e(t){_(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,o.createPromiseCapability)();var r=t.source;this._isStreamingSupported=!r.disableStream}return A(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=y(a.default.mark(function e(){var t,r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,o.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded}),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){if(!this._readableStream){this._error(e);return}this._readableStream.destroy(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",function(){t._readCapability.resolve()}),e.on("end",function(){e.destroy(),t._done=!0,t._readCapability.resolve()}),e.on("error",function(e){t._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}}]),e}();function F(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}var M=function(e){u(r,e);var t=c(r);function r(e){_(this,r);var n,a=function(t){if(404===t.statusCode){var r=new o.MissingPDFException('Missing PDF "'.concat(n._url,'".'));n._storedError=r,n._headersCapability.reject(r);return}n._headersCapability.resolve(),n._setReadableStream(t);var a=function(e){return n._readableStream.headers[e.toLowerCase()]},s=(0,i.validateRangeRequestCapabilities)({getResponseHeader:a,isHttp:e.isHttp,rangeChunkSize:n._rangeChunkSize,disableRange:n._disableRange}),u=s.allowRangeRequests,l=s.suggestedLength;n._isRangeSupported=u,n._contentLength=l||n._contentLength,n._filename=(0,i.extractFilenameFromHeader)(a)};return(n=t.call(this,e))._request=null,"http:"===n._url.protocol?n._request=w.request(F(n._url,e.httpHeaders),a):n._request=x.request(F(n._url,e.httpHeaders),a),n._request.on("error",function(e){n._storedError=e,n._headersCapability.reject(e)}),n._request.end(),n}return r}(E),I=function(e){u(r,e);var t=c(r);function r(e,n,a){for(var i in _(this,r),(s=t.call(this,e))._httpHeaders={},e.httpHeaders){var s,u=e.httpHeaders[i];void 0!==u&&(s._httpHeaders[i]=u)}s._httpHeaders.Range="bytes=".concat(n,"-").concat(a-1);var l=function(e){if(404===e.statusCode){var t=new o.MissingPDFException('Missing PDF "'.concat(s._url,'".'));s._storedError=t;return}s._setReadableStream(e)};return s._request=null,"http:"===s._url.protocol?s._request=w.request(F(s._url,s._httpHeaders),l):s._request=x.request(F(s._url,s._httpHeaders),l),s._request.on("error",function(e){s._storedError=e}),s._request.end(),s}return r}(O),j=function(e){u(r,e);var t=c(r);function r(e){_(this,r);var n,a=decodeURIComponent((n=t.call(this,e))._url.path);return P.test(n._url.href)&&(a=a.replace(/^\//,"")),k.lstat(a,function(e,t){if(e){"ENOENT"===e.code&&(e=new o.MissingPDFException('Missing PDF "'.concat(a,'".'))),n._storedError=e,n._headersCapability.reject(e);return}n._contentLength=t.size,n._setReadableStream(k.createReadStream(a)),n._headersCapability.resolve()}),n}return r}(E),L=function(e){u(r,e);var t=c(r);function r(e,n,a){_(this,r);var o,i=decodeURIComponent((o=t.call(this,e))._url.path);return P.test(o._url.href)&&(i=i.replace(/^\//,"")),o._setReadableStream(k.createReadStream(i,{start:n,end:a-1})),o}return r}(O)},(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=u,t.extractFilenameFromHeader=s,t.validateRangeRequestCapabilities=i,t.validateResponseStatus=l;var n=r(4),a=r(155),o=r(1);function i(e){var t=e.getResponseHeader,r=e.isHttp,a=e.rangeChunkSize,o=e.disableRange;(0,n.assert)(a>0,"Range chunk size must be larger than zero");var i={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10);return Number.isInteger(s)&&(i.suggestedLength=s,s<=2*a||o||!r||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(i.allowRangeRequests=!0)),i}function s(e){var t=e("Content-Disposition");if(t){var r=(0,a.getFilenameFromContentDispositionHeader)(t);if(r.includes("%"))try{r=decodeURIComponent(r)}catch(e){}if((0,o.isPdfFile)(r))return r}return null}function u(e,t){return 404===e||0===e&&t.startsWith("file:")?new n.MissingPDFException('Missing PDF "'+t+'".'):new n.UnexpectedResponseException("Unexpected server response (".concat(e,') while retrieving PDF "').concat(t,'".'),e)}function l(e){return 200===e||206===e}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=c;var n=r(4);function a(e,t){return l(e)||u(e,t)||i(e,t)||o()}function o(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r,n,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(r=a.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw n}}return o}}function l(e){if(Array.isArray(e))return e}function c(e){var t=!0,r=s("filename\\*","i").exec(e);if(r){var o=f(r=r[1]);return l(o=h(o=d(o=unescape(o))))}if(r=c(e))return l(h(r));if(r=s("filename","i").exec(e)){var i=f(r=r[1]);return l(i=h(i))}function s(e,t){return RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function u(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r;try{var a=new TextDecoder(e,{fatal:!0}),o=(0,n.stringToBytes)(r);r=a.decode(o),t=!1}catch(n){if(/^utf-?8$/i.test(e))try{r=decodeURIComponent(escape(r)),t=!1}catch(e){}}}return r}function l(e){return t&&/[\x80-\xff]/.test(e)&&(e=u("utf-8",e),t&&(e=u("iso-8859-1",e))),e}function c(e){for(var t,r=[],n=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(t=n.exec(e));){var o=a(t,4),i=o[1],u=o[2],l=o[3];if((i=parseInt(i,10))in r){if(0===i)break;continue}r[i]=[u,l]}for(var c=[],h=0;h<r.length&&(h in r);++h){var p=a(r[h],2),v=p[0],y=p[1];y=f(y),v&&(y=unescape(y),0===h&&(y=d(y))),c.push(y)}return c.join("")}function f(e){if(e.startsWith('"')){for(var t=e.slice(1).split('\\"'),r=0;r<t.length;++r){var n=t[r].indexOf('"');-1!==n&&(t[r]=t[r].slice(0,n),t.length=r+1),t[r]=t[r].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function d(e){var t=e.indexOf("'");return -1===t?e:u(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function h(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(e,t,r,n){if("q"===r||"Q"===r)return u(t,n=(n=n.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,function(e,t){return String.fromCharCode(parseInt(t,16))}));try{n=atob(n)}catch(e){}return u(t,n)})}return""}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var n=i(r(2)),a=r(4),o=r(154);function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,a)}function u(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,u,"next",e)}function u(e){s(o,n,a,i,u,"throw",e)}i(void 0)})}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}var v=200,y=206;function m(e){var t=e.response;return"string"!=typeof t?t:(0,a.stringToBytes)(t).buffer}var g=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d(this,e),this.url=t,this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&r.httpHeaders||Object.create(null),this.withCredentials=r.withCredentials||!1,this.getXhr=r.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}return p(e,[{key:"requestRange",value:function(e,t,r){var n={begin:e,end:t};for(var a in r)n[a]=r[a];return this.request(n)}},{key:"requestFull",value:function(e){return this.request(e)}},{key:"request",value:function(e){var t=this.getXhr(),r=this.currXhrId++,n=this.pendingRequests[r]={x
1hr:t};for(var a in t.open("GET",this.url),t.withCredentials=this.withCredentials,this.httpHeaders){var o=this.httpHeaders[a];void 0!==o&&t.setRequestHeader(a,o)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range","bytes=".concat(e.begin,"-").concat(e.end-1)),n.expectedStatus=y):n.expectedStatus=v,t.responseType="arraybuffer",e.onError&&(t.onerror=function(r){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),n.onHeadersReceived=e.onHeadersReceived,n.onDone=e.onDone,n.onError=e.onError,n.onProgress=e.onProgress,t.send(null),r}},{key:"onProgress",value:function(e,t){var r,n=this.pendingRequests[e];n&&(null===(r=n.onProgress)||void 0===r||r.call(n,t))}},{key:"onStateChange",value:function(e,t){var r,n,a,o=this.pendingRequests[e];if(o){var i=o.xhr;if(i.readyState>=2&&o.onHeadersReceived&&(o.onHeadersReceived(),delete o.onHeadersReceived),4===i.readyState&&e in this.pendingRequests){if(delete this.pendingRequests[e],0===i.status&&this.isHttp){null===(r=o.onError)||void 0===r||r.call(o,i.status);return}var s=i.status||v;if(!(s===v&&o.expectedStatus===y)&&s!==o.expectedStatus){null===(n=o.onError)||void 0===n||n.call(o,i.status);return}var u=m(i);if(s===y){var l=i.getResponseHeader("Content-Range"),c=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);o.onDone({begin:parseInt(c[1],10),chunk:u})}else u?o.onDone({begin:0,chunk:u}):null===(a=o.onError)||void 0===a||a.call(o,i.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}(),b=function(){function e(t){d(this,e),this._source=t,this._manager=new g(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return p(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,a.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new _(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new S(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);var t,r,n=l(this._rangeRequestReaders.slice(0));try{for(n.s();!(r=n.n()).done;)r.value.cancel(e)}catch(e){n.e(e)}finally{n.f()}}}]),e}();t.PDFNetworkStream=b;var _=function(){function e(t,r){d(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,a.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 p(e,[{key:"_onHeadersReceived",value:function(){var e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=function(e){return t.getResponseHeader(e)},n=(0,o.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),a=n.allowRangeRequests,i=n.suggestedLength;a&&(this._isRangeSupported=!0),this._contentLength=i||this._contentLength,this._filename=(0,o.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0}}},{key:"_onError",value:function(e){this._storedError=(0,o.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError);var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.reject(this._storedError)}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._cachedChunks.length=0}},{key:"_onProgress",value:function(e){var t;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}},{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}},{key:"read",value:function(){var e=u(n.default.mark(function e(){var t,r;return n.default.wrap(function(e){for(;;)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,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 10:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0,this._headersReceivedCapability.reject(e);var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest
1(this._fullRequestId),this._fullRequestReader=null}}]),e}(),S=function(){function e(t,r,n){d(this,e),this._manager=t;var a={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._requestId=t.requestRange(r,n,a),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}return p(e,[{key:"_close",value:function(){var e;null===(e=this.onClosed)||void 0===e||e.call(this,this)}},{key:"_onDone",value:function(e){var t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;var r,n=l(this._requests);try{for(n.s();!(r=n.n()).done;)r.value.resolve({value:void 0,done:!0})}catch(e){n.e(e)}finally{n.f()}this._requests.length=0,this._close()}},{key:"_onError",value:function(e){this._storedError=(0,o.createResponseStatusError)(e,this._url);var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.reject(this._storedError)}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._queuedChunk=null}},{key:"_onProgress",value:function(e){if(!this.isStreamingSupported){var t;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded})}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:function(){var e=u(n.default.mark(function e(){var t,r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(!(null!==this._queuedChunk)){e.next=6;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 6:if(!this._done){e.next=8;break}return e.abrupt("return",{value:void 0,done:!0});case 8:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 11:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0;var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]),e}()},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var n=i(r(2)),a=r(4),o=r(154);function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,a)}function u(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,u,"next",e)}function u(e){s(o,n,a,i,u,"throw",e)}i(void 0)})}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}function v(e,t,r){return{method:"GET",headers:e,signal:null==r?void 0:r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function y(e){var t=new Headers;for(var r in e){var n=e[r];void 0!==n&&t.append(r,n)}return t}var m=function(){function e(t){d(this,e),this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return p(e,[{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,a.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new g(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new b(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=l(this._rangeRequestReaders.slice(0));try{for(r.s();!(t=r.n()).done;)t.value.cancel(e)}catch(e){r.e(e)}finally{r.f()}}}]),e}();t.PDFFetchStream=m;var g=function(){function e(t){var r=this;d(this,e),this._stream=t,this._reader=null,this._loaded=0,this._filename=null;var n=t.source;this._withCredentials=n.withCredentials||!1,this._contentLength=n.length,this._headersCapability=(0,a.createPromiseCapability)(),this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._headers=y(this._stream.httpHeaders);var i=n.url;fetch(i,v(this._headers,this._withCredentials,this._abortController)).then(function(e){if(!(0,o.validateResponseStatus)(e.status))throw(0,o.createResponseStatusError)(e.status,i);r._reader=e.body.getReader(),r._headersCapability.resolve();var t=function(t){return e.headers.get(t)},n=(0,o.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:r._stream.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),s=n.allowRangeRequests,u=n.suggestedLength;r._isRangeSupported=s,r._contentLength=u||r._contentLength,r._filename=(0,o.extractFilenameFromHeader)(t),!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new a.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}return p(e,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=u(n.default.mark(function e(){var t,r,a,o;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._headersCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(r=(t=e.sent).value,!(a=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:a});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),o=new Uint8Array(r).buffer,e.abrupt("return",{value:o,done:!1});case 13:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}]),e}(),b=function(){function e(t,r,n){var i=this;d(this,e),this._stream=t,this._reader=null,this._loaded=0;var s=t.source;this._withCredentials=s.withCredentials||!1,this._readCapability=(0,a.createPromiseCapability)(),this._isStreamingSupported=!s.disableStream,"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._headers=y(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(r,"-").concat(n-1));var u=s.url;fetch(u,v(this._headers,this._withCredentials,this._abortController)).then(function(e){if(!(0,o.validateResponseStatus)(e.status))throw(0,o.createResponseStatusError)(e.status,u);i._readCapability.resolve(),i._reader=e.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}return p(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=u(n.default.mark(function e(){var t,r,a,o;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(r=(t=e.sent).value,!(a=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:a});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),o=new Uint8Array(r).buffer,e.abrupt("return",{value:o,done:!1});case 13:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}]),e}()}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};
1return __webpack_modules__[e].call(r.exports,r,r.exports,__w_pdfjs_require__),r.loaded=!0,r.exports}(()=>{__w_pdfjs_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e)})();var __nested_webpack_exports__={};return(()=>{"use strict";var e=__nested_webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return a.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return r.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return r.CMapCompressionType}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return o.GlobalWorkerOptions}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return r.InvalidPDFException}}),Object.defineProperty(e,"LinkTarget",{enumerable:!0,get:function(){return t.LinkTarget}}),Object.defineProperty(e,"LoopbackPort",{enumerable:!0,get:function(){return n.LoopbackPort}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return r.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return r.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return n.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return t.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return n.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return r.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return r.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return t.PixelsPerInch}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return t.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return u.SVGGraphics}}),Object.defineProperty(e,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return r.UNSUPPORTED_FEATURES}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return r.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return r.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return r.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return l.XfaLayer}}),Object.defineProperty(e,"addLinkAttributes",{enumerable:!0,get:function(){return t.addLinkAttributes}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return n.build}}),Object.defineProperty(e,"createObjectURL",{enumerable:!0,get:function(){return r.createObjectURL}}),Object.defineProperty(e,"createPromiseCapability",{enumerable:!0,get:function(){return r.createPromiseCapability}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return r.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return n.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return t.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return t.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return t.getXfaPageViewport}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return t.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return t.loadScript}}),Object.defineProperty(e,"removeNullCharacters",{enumerable:!0,get:function(){return r.removeNullCharacters}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return s.renderTextLayer}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return r.shadow}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return n.version}});var t=__w_pdfjs_require__(1),r=__w_pdfjs_require__(4),n=__w_pdfjs_require__(136),a=__w_pdfjs_require__(148),o=__w_pdfjs_require__(142),i=__w_pdfjs_require__(6),s=__w_pdfjs_require__(151),u=__w_pdfjs_require__(152),l=__w_pdfjs_require__(150);if(i.isNodeJS){var c=__w_pdfjs_require__(153).PDFNodeStream;(0,n.setPDFNetworkStreamFactory)(function(e){return new c(e)})}else{var f=__w_pdfjs_require__(156).PDFNetworkStream,d=__w_pdfjs_require__(157).PDFFetchStream;(0,n.setPDFNetworkStreamFactory)(function(e){return(0,t.isValidFetchUrl)(e.url)?new d(e):new f(e)})}})(),__nested_webpack_exports__})()})},2703:function(e,t,r){"use strict";var n=r(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,o,i){if(i!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
1:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return r.PropTypes=r,r}},5697:function(e,t,r){e.exports=r(2703)()},414:function(e){"use strict";var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=t},5695:function(e,t,r){"use strict";r.d(t,{BB:function(){return eH},T3:function(){return tP},v0:function(){return n}});var n=r(8783),a=r(7462),o=r(3366);function i(e,t){if(null==e)return{};var r,n,a=(0,o.Z)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||({}).propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}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})(e)}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function l(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function c(e){var t=l(e,"string");return"symbol"==s(t)?t:t+""}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var h=r(7326),p=r(9611);function v(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,p.Z)(e,t)}function y(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return(0,h.Z)(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t,r){return(t=c(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var b=r(3062),_=r.n(b),S=r(5697),A=r.n(S),k=function(e,t,r){if(r||2==arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))},w=["onCompositionEnd","onCompositionStart","onCompositionUpdate"],x=["onFocus","onBlur"],C=["onInput","onInvalid","onReset","onSubmit"],P=["onLoad","onError"],T=["onKeyDown","onKeyPress","onKeyUp"],R=["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],E=["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],O=["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],F=["onSelect"],M=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],I=["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],j=["onScroll"],L=["onWheel"],D=["onAnimationStart","onAnimationEnd","onAnimationIteration"],N=["onTransitionEnd"],B=["onToggle"],U=["onChange"],q=k(k(k(k(k(k(k(k(k(k(k(k(k(k(k(k(k(k([],["onCopy","onCut","onPaste"],!0),w,!0),x,!0),C,!0),P,!0),T,!0),R,!0),E,!0),O,!0),F,!0),M,!0),I,!0),j,!0),L,!0),D,!0),N,!0),U,!0),B,!0);function W(e,t){var r={};return q.forEach(function(n){var a=e[n];a&&(t?r[n]=function(e){return a(e,t(n))}:r[n]=a)}),r}function z(e){var t=!1;return{promise:new Promise(function(r,n){e.then(function(e){return!t&&r(e)}).catch(function(e){return!t&&n(e)})}),cancel:function(){t=!0}}}function G(){return Array.prototype.slice.call(arguments).reduce(function(e,t){return e.concat(t)},[]).filter(function(e){return"string"==typeof e}).join(" ")}var V=!0,H="Invariant failed";function X(e,t){if(!e){if(V)throw Error(H);var r="function"==typeof t?t():t;throw Error(r?"".concat(H,": ").concat(r):H)}}var Y=r(8665),Z=(0,b.createContext)(null);function K(e){var t=e.children,r=e.type;return _().createElement("div",{className:"react-pdf__message react-pdf__message--".concat(r)},t)}K.propTypes={children:A().node,type:A().oneOf(["error","loading","no-data"]).isRequired};var Q="noopener noreferrer nofollow",J=function(){function e(){u(this,e),this.externalLinkTarget=null,this.externalLinkRel=null}return d(e,[{key:"setDocument",value:function(e){this.pdfDocument=e}}
1,{key:"setViewer",value:function(e){this.pdfViewer=e}},{key:"setExternalLinkRel",value:function(e){this.externalLinkRel=e}},{key:"setExternalLinkTarget",value:function(e){this.externalLinkTarget=e}},{key:"setHistory",value:function(){}},{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 0},set:function(e){}},{key:"goToDestination",value:function(e){var t=this;new Promise(function(r){"string"==typeof e?t.pdfDocument.getDestination(e).then(r):Array.isArray(e)?r(e):e.then(r)}).then(function(r){X(Array.isArray(r),'"'.concat(r,'" is not a valid destination array.'));var n=r[0];new Promise(function(e){n instanceof Object?t.pdfDocument.getPageIndex(n).then(function(t){e(t)}).catch(function(){X(!1,'"'.concat(n,'" is not a valid page reference.'))}):"number"==typeof n?e(n):X(!1,'"'.concat(n,'" is not a valid destination reference.'))}).then(function(r){var n=r+1;X(n>=1&&n<=t.pagesCount,'"'.concat(n,'" is not a valid page number.')),t.pdfViewer.scrollPageIntoView({dest:e,pageIndex:r,pageNumber:n})})})}},{key:"navigateTo",value:function(e){this.goToDestination(e)}},{key:"goToPage",value:function(){}},{key:"addLinkAttributes",value:function(e,t,r){e.href=t,e.rel=this.externalLinkRel||Q,e.target=r?"_blank":this.externalLinkTarget||""}},{key:"getDestinationHash",value:function(){return"#"}},{key:"getAnchorUrl",value:function(){return"#"}},{key:"setHash",value:function(){}},{key:"executeNamedAction",value:function(){}},{key:"cachePageRef",value:function(){}},{key:"isPageVisible",value:function(){return!0}},{key:"isPageCached",value:function(){return!0}}]),e}(),$={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};function ee(e){if(Array.isArray(e))return e}function et(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,a=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}function er(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function en(e,t){if(e){if("string"==typeof e)return er(e,t);var r=({}).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)?er(e,t):void 0}}function ea(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function eo(e,t){return ee(e)||et(e,t)||en(e,t)||ea()}var ei="undefined"!=typeof window,es=ei&&"file:"===window.location.protocol;function eu(e){return void 0!==e}function el(e){return eu(e)&&null!==e}function ec(e){return"string"==typeof e}function ef(e){return e instanceof ArrayBuffer}function ed(e){return X(ei,"isBlob can only be used in a browser environment"),e instanceof Blob}function eh(e){return X(ei,"isFile can only be used in a browser environment"),e instanceof File}function ep(e){return ec(e)&&/^data:/.test(e)}function ev(e){X(ep(e),"Invalid data URI.");var t=eo(e.split(","),2),r=t[0],n=t[1];return -1!==r.split(";").indexOf("base64")?atob(n):unescape(n)}function ey(){return ei&&window.devicePixelRatio||1}var em="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function eg(){(0,Y.Z)(!es,"Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ".concat(em))}function eb(){(0,Y.Z)(!es,"Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ".concat(em))}function e_(e){e&&e.cancel&&e.cancel()}function eS(e,t){return Object.defineProperty(e,"width",{get:function(){return this.view[2]*t},configurable:!0}),Object.defineProperty(e,"height",{get:function(){return this.view[3]*t},configurable:!0}),Object.defineProperty(e,"originalWidth",{get:function(){return this.view[2]},configurable:!0}),Object.defineProperty(e,"originalHeight",{get:function(){return this.view[3]},configurable:!0}),e}
1function eA(e){return"RenderingCancelledException"===e.name}function ek(e){return new Promise(function(t,r){var n=new FileReader;return n.onload=function(){return t(new Uint8Array(n.result))},n.onerror=function(e){switch(e.target.error.code){case e.target.error.NOT_FOUND_ERR:return r(Error("Error while reading a file: File not found."));case e.target.error.NOT_READABLE_ERR:return r(Error("Error while reading a file: File not readable."));case e.target.error.SECURITY_ERR:return r(Error("Error while reading a file: Security error."));case e.target.error.ABORT_ERR:return r(Error("Error while reading a file: Aborted."));default:return r(Error("Error while reading a file."))}},n.readAsArrayBuffer(e),null})}function ew(e){if(Array.isArray(e))return er(e)}function ex(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function eC(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function eP(e){return ew(e)||ex(e)||en(e)||eC()}var eT=function(){var e={};
1return[].concat(eP(E),eP(M),eP(T)).forEach(function(t){e[t]=A().func}),e}(),eR=[A().string,A().instanceOf(ArrayBuffer),A().shape({data:A().oneOfType([A().object,A().string]),httpHeaders:A().object,range:A().object,url:A().string,withCredentials:A().bool})];"undefined"!=typeof File&&eR.push(A().instanceOf(File)),"undefined"!=typeof Blob&&eR.push(A().instanceOf(Blob));var eE=A().oneOfType([A().string,A().arrayOf(A().string)]),eO=A().oneOfType(eR),eF=A().instanceOf(J);A().oneOf(["_self","_blank","_parent","_top"]);var eM=A().shape({_transport:A().shape({fontLoader:A().object.isRequired}).isRequired,commonObjs:A().shape({_objs:A().object.isRequired}).isRequired,getAnnotations:A().func.isRequired,getTextContent:A().func.isRequired,getViewport:A().func.isRequired,render:A().func.isRequired}),eI=function(e,t,r){var n=e[t],a=e.pageNumber,o=e.pdf;if(!eu(o))return null;if(eu(n)){if("number"!=typeof n)return Error("`".concat(t,"` of type `").concat(s(n),"` supplied to `").concat(r,"`, expected `number`."));if(n<0)return Error("Expected `".concat(t,"` to be greater or equal to 0."));var i=o.numPages;if(n+1>i)return Error("Expected `".concat(t,"` to be less or equal to ").concat(i-1,"."))}else if(!eu(a))return Error("`".concat(t,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(r,"`."));return null},ej=function(e,t,r){var n=e[t],a=e.pageIndex,o=e.pdf;if(!eu(o))return null;if(eu(n)){if("number"!=typeof n)return Error("`".concat(t,"` of type `").concat(s(n),"` supplied to `").concat(r,"`, expected `number`."));if(n<1)return Error("Expected `".concat(t,"` to be greater or equal to 1."));var i=o.numPages;if(n>i)return Error("Expected `".concat(t,"` to be less or equal to ").concat(i,"."))}else if(!eu(a))return Error("`".concat(t,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(r,"`."));return null},eL=A().oneOfType([A().shape({getDestination:A().func.isRequired,getOutline:A().func.isRequired,getPage:A().func.isRequired,numPages:A().number.isRequired}),A().bool]),eD=A().oneOfType([A().func,A().shape({current:A().any})]),eN=A().oneOf(["canvas","none","svg"]),eB=A().oneOf([0,90,180,270]),eU=["url"];function eq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eW(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eq(Object(r),!0).forEach(function(t){g(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eq(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ez(e){var t=eG();return function(){var r,n=m(e);return r=t?Reflect.construct(n,arguments,m(this).constructor):n.apply(this,arguments),y(this,r)}}function eG(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var eV=n.PDFDataRangeTransport,eH=function(e){v(r,e);var t=ez(r);function r(){var e;u(this,r);for(var a=arguments.length,o=Array(a),l=0;l<a;l++)o[l]=arguments[l];return e=t.call.apply(t,[this].concat(o)),g((0,h.Z)(e),"state",{pdf:null}),g((0,h.Z)(e),"viewer",{scrollPageIntoView:function(t){var r=t.dest,n=t.pageIndex,a=t.pageNumber,o=e.props.onItemClick;if(o){o({dest:r,pageIndex:n,pageNumber:a});return}var i=e.pages[n];if(i){i.scrollIntoView();return}(0,Y.Z)(!1,"An internal link leading to page ".concat(a," was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>."))}}),g((0,h.Z)(e),"linkService",new J),g((0,h.Z)(e),"loadDocument",function(){e_(e.runningTask),e.loadingTask&&e.loadingTask.destroy();var t=z(e.findDocumentSource());e.runningTask=t,t.promise.then(function(t){if(e.onSourceSuccess(),t){e.setState(function(e){return e.pdf?{pdf:null}:null});var r=e.props,a=r.options,o=r.onLoadProgress,i=r.onPassword;e.loadingTask=n.getDocument(eW(eW({},t),a)),e.loadingTask.onPassword=i,o&&(e.loadingTask.onProgress=o);var s=z(e.loadingTask.promise);e.runningTask=s,s.promise.then(function(t){e.setState(function(e){return e.pdf&&e.pdf.fingerprint===t.fingerprint?null:{pdf:t}},e.onLoadSuccess)}).catch(function(t){e.onLoadError(t)})}}).catch(function(t){e.onSourceError(t)})}),g((0,h.Z)(e),"setupLinkService",function(){var t=e.props,r=t.externalLinkRel,n=t.externalLinkTarget;e.linkService.setViewer(e.viewer),e.linkService.setExternalLinkRel(r),e.linkService.setExternalLinkTarget(n)}),g((0,h.Z)(e),"onSourceSuccess",function(){var t=e.props.onSourceSuccess;t&&t()}),g((0,h.Z)(e),"onSourceError",function(t){(0,Y.Z)(t);var r=e.props.onSourceError;r&&r(t)}),g((0,h.Z)(e),"onLoadSuccess",function(){var t=e.props.onLoadSuccess,r=e.state.pdf;t&&t(r),e.pages=Array(r.numPages),e.linkService.setDocument(r)}),g((0,h.Z)(e),"onLoadError",function(t){e.setState({pdf:!1}),(0,Y.Z)(t);var r=e.props.onLoadError;r&&r(t)}),g((0,h.Z)(e),"findDocumentSource",function(){return new Promise(function(t){var r=e.props.file;if(r||t(null),"string"==typeof r&&(ep(r)&&t({data:ev(r)}),eg(),t({url:r})),r instanceof eV&&t({range:r}),ef(r)&&t({data:r}),ei&&(ed(r)||eh(r))){ek(r).then(function(e){t({data:e})});return}if(X("object"===s(r),"Invalid parameter in file, need either Uint8Array, string or a parameter object"),X(r.url||r.data||r.range,"Invalid parameter object: need either .data, .range or .url"),"string"==typeof r.url){if(ep(r.url)){var n=r.url,a=i(r,eU);t(eW({data:ev(n)},a))}eg()}t(r)})}),g((0,h.Z)(e),"registerPage",function(t,r){e.pages[t]=r}),g((0,h.Z)(e),"unregisterPage",function(t){delete e.pages[t]}),e}
1return d(r,[{key:"componentDidMount",value:function(){this.loadDocument(),this.setupLinkService()}},{key:"componentDidUpdate",value:function(e){this.props.file!==e.file&&this.loadDocument()}},{key:"componentWillUnmount",value:function(){e_(this.runningTask),this.loadingTask&&this.loadingTask.destroy()}},{key:"childContext",get:function(){var e=this.linkService,t=this.registerPage,r=this.unregisterPage,n=this.props,a=n.imageResourcesPath,o=n.renderMode,i=n.rotate;return{imageResourcesPath:a,linkService:e,pdf:this.state.pdf,registerPage:t,renderMode:o,rotate:i,unregisterPage:r}}},{key:"eventProps",get:function(){var e=this;return W(this.props,function(){return e.state.pdf})}},{key:"renderChildren",value:function(){var e=this.props.children;return _().createElement(Z.Provider,{value:this.childContext},e)}},{key:"renderContent",value:function(){var e=this.props.file,t=this.state.pdf;if(!e){var r=this.props.noData;return _().createElement(K,{type:"no-data"},"function"==typeof r?r():r)}if(null===t){var n=this.props.loading;return _().createElement(K,{type:"loading"},"function"==typeof n?n():n)}if(!1===t){var a=this.props.error;return _().createElement(K,{type:"error"},"function"==typeof a?a():a)}return this.renderChildren()}},{key:"render",value:function(){var e=this.props,t=e.className,r=e.inputRef;return _().createElement("div",(0,a.Z)({className:G("react-pdf__Document",t),ref:r},this.eventProps),this.renderContent())}}]),r}(b.PureComponent);eH.defaultProps={error:"Failed to load PDF file.",loading:"Loading PDF…",noData:"No PDF file specified.",onPassword:function(e,t){switch(t){case $.NEED_PASSWORD:e(prompt("Enter the password to open this PDF file."));break;case $.INCORRECT_PASSWORD:e(prompt("Invalid password. Please try again."))}}};var eX=A().oneOfType([A().func,A().node]);eH.propTypes=eW(eW({},eT),{},{children:A().node,className:eE,error:eX,externalLinkRel:A().string,externalLinkTarget:A().string,file:eO,imageResourcesPath:A().string,inputRef:eD,loading:eX,noData:eX,onItemClick:A().func,onLoadError:A().func,onLoadProgress:A().func,onLoadSuccess:A().func,onPassword:A().func,onSourceError:A().func,onSourceSuccess:A().func,rotate:A().number});var eY=(0,b.createContext)(null),eZ=function(){function e(t){var r=t.num,n=t.gen;u(this,e),this.num=r,this.gen=n}return d(e,[{key:"toString",value:function(){var e="".concat(this.num,"R");return 0!==this.gen&&(e+=this.gen),e}}]),e}(),eK=["item"];function eQ(e){var t=eJ();return function(){var r,n=m(e);return r=t?Reflect.construct(n,arguments,m(this).constructor):n.apply(this,arguments),y(this,r)}}function eJ(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var e$=function(e){v(r,e);var t=eQ(r);function r(){var e;u(this,r);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];return e=t.call.apply(t,[this].concat(a)),g((0,h.Z)(e),"getDestination",function(){return new Promise(function(t,r){var n=e.props,a=n.item,o=n.pdf;return eu(e.destination)||("string"==typeof a.dest?o.getDestination(a.dest).then(t).catch(r):t(a.dest)),e.destination}).then(function(t){return e.destination=t,t})}),g((0,h.Z)(e),"getPageIndex",function(){return new Promise(function(t,r){var n=e.props.pdf;eu(e.pageIndex)&&t(e.pageIndex),e.getDestination().then(function(e){if(e){var a=eo(e,1)[0];n.getPageIndex(new eZ(a)).then(t).catch(r)}})}).then(function(t){return e.pageIndex=t,e.pageIndex})}),g((0,h.Z)(e),"getPageNumber",function(){return new Promise(function(t,r){eu(e.pageNumber)&&t(e.pageNumber),e.getPageIndex().then(function(e){t(e+1)}).catch(r)}).then(function(t){return e.pageNumber=t,t})}),g((0,h.Z)(e),"onClick",function(t){var r=e.props.onClick;return t.preventDefault(),!!r&&Promise.all([e.getDestination(),e.getPageIndex(),e.getPageNumber()]).then(function(e){var t=eo(e,3);r({dest:t[0],pageIndex:t[1],pageNumber:t[2]})})}),e}return d(r,[{key:"renderSubitems",value:function(){var e=this.props,t=e.item,n=i(e,eK);if(!t.items||!t.items.length)return null;var o=t.items;return _().createElement("ul",null,o.map(function(e,t){return _().createElement(r,(0,a.Z)({key:"string"==typeof e.destination?e.destination:t,item:e},n))}))}},{key:"render",value:function(){var e=this.props.item;return _().createElement("li",null,_().createElement("a",{href:"#",onClick:this.onClick},e.title),this.renderSubitems())}}]),r}
1(b.PureComponent),e0=A().oneOfType([A().string,A().arrayOf(A().any)]);e$.propTypes={item:A().shape({dest:e0,items:A().arrayOf(A().shape({dest:e0,title:A().string})),title:A().string}).isRequired,onClick:A().func,pdf:eL.isRequired};var e1=function(e){return _().createElement(Z.Consumer,null,function(t){return _().createElement(eY.Consumer,null,function(r){return _().createElement(e$,(0,a.Z)({},t,r,e))})})};function e2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function e3(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?e2(Object(r),!0).forEach(function(t){g(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e2(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function e4(e){var t=e5();return function(){var r,n=m(e);return r=t?Reflect.construct(n,arguments,m(this).constructor):n.apply(this,arguments),y(this,r)}}function e5(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function e8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.filter(Boolean);return r.length<=1?r[0]||null:function(e){r.forEach(function(t){"function"==typeof t?t(e):t&&(t.current=e)})}}(function(e){v(r,e);var t=e4(r);function r(){var e;u(this,r);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];return e=t.call.apply(t,[this].concat(a)),g((0,h.Z)(e),"state",{outline:null}),g((0,h.Z)(e),"loadOutline",function(){var t=e.props.pdf;e.setState(function(e){return e.outline?{outline:null}:null});var r=z(t.getOutline());e.runningTask=r,r.promise.then(function(t){e.setState({outline:t},e.onLoadSuccess)}).catch(function(t){e.onLoadError(t)})}),g((0,h.Z)(e),"onLoadSuccess",function(){var t=e.props.onLoadSuccess,r=e.state.outline;t&&t(r)}),g((0,h.Z)(e),"onLoadError",function(t){e.setState({outline:!1}),(0,Y.Z)(t);var r=e.props.onLoadError;r&&r(t)}),g((0,h.Z)(e),"onItemClick",function(t){var r=t.dest,n=t.pageIndex,a=t.pageNumber,o=e.props.onItemClick;o&&o({dest:r,pageIndex:n,pageNumber:a})}),e}return d(r,[{key:"componentDidMount",value:function(){X(this.props.pdf,"Attempted to load an outline, but no document was specified."),this.loadOutline()}},{key:"componentDidUpdate",value:function(e){var t=this.props.pdf;e.pdf&&t!==e.pdf&&this.loadOutline()}},{key:"componentWillUnmount",value:function(){e_(this.runningTask)}},{key:"childContext",get:function(){return{onClick:this.onItemClick}}},{key:"eventProps",get:function(){var e=this;return W(this.props,function(){return e.state.outline})}},{key:"renderOutline",value:function(){var e=this.state.outline;return _().createElement("ul",null,e.map(function(e,t){return _().createElement(e1,{key:"string"==typeof e.destination?e.destination:t,item:e})}))}},{key:"render",value:function(){var e=this.props.pdf,t=this.state.outline;if(!e||!t)return null;var r=this.props,n=r.className,o=r.inputRef;return _().createElement("div",(0,a.Z)({className:G("react-pdf__Outline",n),ref:o},this.eventProps),_().createElement(eY.Provider,{value:this.childContext},this.renderOutline()))}}]),r})(b.PureComponent).propTypes=e3({className:eE,inputRef:eD,onItemClick:A().func,onLoadError:A().func,onLoadSuccess:A().func,pdf:eL},eT);var e6=(0,b.createContext)(null);function e7(e){var t=e9();return function(){var r,n=m(e);return r=t?Reflect.construct(n,arguments,m(this).constructor):n.apply(this,arguments),y(this,r)}}function e9(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var te=n.AnnotationMode,tt=function(e){v(r,e);var t=e7(r);function r(){var e;u(this,r);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];return e=t.call.apply(t,[this].concat(a)),g((0,h.Z)(e),"canvasElement",(0,b.createRef)()),g((0,h.Z)(e),"onRenderSuccess",function(){e.renderer=null;var t=e.props,r=t.onRenderSuccess,n=t.page,a=t.scale;r&&r(eS(n,a))}),g((0,h.Z)(e),"onRenderError",function(t){if(!eA(t)){(0,Y.Z)(t);var r=e.props.onRenderError;r&&r(t)}}),g((0,h.Z)(e),"drawPageOnCanvas",function(){var t=e.canvasElement.current;if(!t)return null;var r=(0,h.Z)(e),n=r.renderViewport,a=r.viewport,o=e.props,i=o.canvasBackgroun
1d,s=o.page,u=o.renderForms;t.width=n.width,t.height=n.height,t.style.width="".concat(Math.floor(a.width),"px"),t.style.height="".concat(Math.floor(a.height),"px");var l={annotationMode:u?te.ENABLE_FORMS:te.ENABLE,get canvasContext(){return t.getContext("2d")},viewport:n};return i&&(l.background=i),e.cancelRenderingTask(),e.renderer=s.render(l),e.renderer.promise.then(e.onRenderSuccess).catch(e.onRenderError)}),e}return d(r,[{key:"componentDidMount",value:function(){this.drawPageOnCanvas()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.canvasBackground,n=t.page,a=t.renderForms;(r!==e.canvasBackground||a!==e.renderForms)&&(n.cleanup(),this.drawPageOnCanvas())}},{key:"componentWillUnmount",value:function(){this.cancelRenderingTask();var e=this.canvasElement.current;e&&(e.width=0,e.height=0)}},{key:"cancelRenderingTask",value:function(){this.renderer&&(this.renderer.cancel(),this.renderer=null)}},{key:"renderViewport",get:function(){var e=this.props,t=e.page,r=e.rotate,n=e.scale,a=ey();return t.getViewport({scale:n*a,rotation:r})}},{key:"viewport",get:function(){var e=this.props,t=e.page,r=e.rotate,n=e.scale;return t.getViewport({scale:n,rotation:r})}},{key:"render",value:function(){var e=this.props.canvasRef;return _().createElement("canvas",{className:"react-pdf__Page__canvas",dir:"ltr",ref:e8(e,this.canvasElement),style:{display:"block",userSelect:"none"}})}}]),r}(b.PureComponent);function tr(e){return _().createElement(e6.Consumer,null,function(t){return _().createElement(tt,(0,a.Z)({},t,e))})}function tn(e){var t=ta();return function(){var r,n=m(e);return r=t?Reflect.construct(n,arguments,m(this).constructor):n.apply(this,arguments),y(this,r)}}function ta(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}tt.propTypes={canvasBackground:A().string,canvasRef:eD,onRenderError:A().func,onRenderSuccess:A().func,page:eM.isRequired,renderForms:A().bool,rotate:eB,scale:A().number.isRequired};var to=function(e){v(r,e);var t=tn(r);function r(){var e;u(this,r);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),g((0,h.Z)(e),"state",{svg:null}),g((0,h.Z)(e),"onRenderSuccess",function(){e.renderer=null;var t=e.props,r=t.onRenderSuccess,n=t.page,a=t.scale;r&&r(eS(n,a))}),g((0,h.Z)(e),"onRenderError",function(t){if(!eA(t)){(0,Y.Z)(t);var r=e.props.onRenderError;r&&r(t)}}),g((0,h.Z)(e),"renderSVG",function(){var t=e.props.page;return e.renderer=t.getOperatorList(),e.renderer.then(function(r){var a=new n.SVGGraphics(t.commonObjs,t.objs);e.renderer=a.getSVG(r,e.viewport).then(function(t){e.setState({svg:t},e.onRenderSuccess)}).catch(e.onRenderError)}).catch(e.onRenderError)}),g((0,h.Z)(e),"drawPageOnContainer",function(t){var r=e.state.svg;if(t&&r){t.firstElementChild||t.appendChild(r);var n=e.viewport,a=n.width,o=n.height;r.setAttribute("width",a),r.setAttribute("height",o)}}),e}return d(r,[{key:"componentDidMount",value:function(){this.renderSVG()}},{key:"viewport",get:function(){var e=this.props,t=e.page,r=e.rotate,n=e.scale;return t.getViewport({scale:n,rotation:r})}},{key:"render",value:function(){var e=this,t=this.viewport,r=t.width,n=t.height;return _().createElement("div",{className:"react-pdf__Page__svg",ref:function(t){return e.drawPageOnContainer(t)},style:{display:"block",backgroundColor:"white",overflow:"hidden",width:r,height:n,userSelect:"none"}})}}]),r}(b.PureComponent);function ti(e){return _().createElement(e6.Consumer,null,function(t){return _().createElement(to,(0,a.Z)({},t,e))})}function ts(e){var t=tu();return function(){var r,n=m(e);return r=t?Reflect.construct(n,arguments,m(this).constructor):n.apply(this,arguments),y(this,r)}}function tu(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}to.propTypes={onRenderError:A().func,onRenderSuccess:A().func,page:eM.isRequired,rotate:eB,scale:A().number.isRequired};var tl=function(e){v(r,e);var t=ts(r);function r(){var e;u(this,r);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];return e=t.call.apply(t,[this].concat(a)),g((0,h.Z)(e),"itemElement",(0,b.createRef)()),g((0,h.Z)(e),"getElementWidth",function(t){var r=(0,h.Z)(e).sideways;return t.getBoundingClientRect()[r?"height":"width"]}),e}
1return d(r,[{key:"componentDidMount",value:function(){this.alignTextItem()}},{key:"componentDidUpdate",value:function(){this.alignTextItem()}},{key:"unrotatedViewport",get:function(){var e=this.props,t=e.page,r=e.scale;return t.getViewport({scale:r})}},{key:"rotate",get:function(){var e=this.props,t=e.page;return e.rotate-t.rotate}},{key:"sideways",get:function(){return this.rotate%180!=0}},{key:"defaultSideways",get:function(){return this.unrotatedViewport.rotation%180!=0}},{key:"fontSize",get:function(){var e=this.props.transform,t=this.defaultSideways,r=eo(e,2),n=r[0],a=r[1];return t?a:n}},{key:"top",get:function(){var e=this.props.transform,t=this.unrotatedViewport,r=this.defaultSideways,n=eo(e,6),a=n[2],o=n[3],i=n[4],s=n[5],u=eo(t.viewBox,4),l=u[1],c=u[3];return r?i+a+l:c-(s+o)}},{key:"left",get:function(){var e=this.props.transform,t=this.unrotatedViewport,r=this.defaultSideways,n=eo(e,6),a=n[4],o=n[5],i=eo(t.viewBox,1)[0];return r?o-i:a-i}},{key:"getFontData",value:function(e){var t=this.props.page;return new Promise(function(r){t.commonObjs.get(e,r)})}},{key:"alignTextItem",value:function(){var e=this,t=this.itemElement.current;if(t){t.style.transform="";var r=this.props,n=r.fontName,a=r.scale,o=r.width;t.style.fontFamily="".concat(n,", sans-serif"),this.getFontData(n).then(function(r){var i=r?r.fallbackName:"sans-serif";t.style.fontFamily="".concat(n,", ").concat(i);var s=o*a,u=e.getElementWidth(t),l="scaleX(".concat(s/u,")"),c=r?r.ascent:0;c&&(l+=" translateY(".concat((1-c)*100,"%)")),t.style.transform=l,t.style.WebkitTransform=l})}}},{key:"render",value:function(){var e=this.fontSize,t=this.top,r=this.left,n=this.props,a=n.customTextRenderer,o=n.scale,i=n.str;return _().createElement("span",{ref:this.itemElement,style:{height:"1em",fontFamily:"sans-serif",fontSize:"".concat(e*o,"px"),position:"absolute",top:"".concat(t*o,"px"),left:"".concat(r*o,"px"),transformOrigin:"left bottom",whiteSpace:"pre",pointerEvents:"all"}},a?a(this.props):i)}}]),r}(b.PureComponent);function tc(e){return _().createElement(e6.Consumer,null,function(t){return _().createElement(tl,(0,a.Z)({},t,e))})}function tf(e){var t=td();return function(){var r,n=m(e);return r=t?Reflect.construct(n,arguments,m(this).constructor):n.apply(this,arguments),y(this,r)}}function td(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}tl.propTypes={customTextRenderer:A().func,fontName:A().string.isRequired,itemIndex:A().number.isRequired,page:eM.isRequired,rotate:eB,scale:A().number,str:A().string.isRequired,transform:A().arrayOf(A().number).isRequired,width:A().number.isRequired};var th=function(e){v(r,e);var t=tf(r);function r(){var e;u(this,r);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];return e=t.call.apply(t,[this].concat(a)),g((0,h.Z)(e),"state",{textItems:null}),g((0,h.Z)(e),"loadTextItems",function(){var t=z(e.props.page.getTextContent());e.runningTask=t,t.promise.then(function(t){var r=t.items;e.setState({textItems:r},e.onLoadSuccess)}).catch(function(t){e.onLoadError(t)})}),g((0,h.Z)(e),"onLoadSuccess",function(){var t=e.props.onGetTextSuccess,r=e.state.textItems;t&&t(r)}),g((0,h.Z)(e),"onLoadError",function(t){e.setState({textItems:!1}),(0,Y.Z)(t);var r=e.props.onGetTextError;r&&r(t)}),e}return d(r,[{key:"componentDidMount",value:function(){X(this.props.page,"Attempted to load page text content, but no page was specified."),this.loadTextItems()}},{key:"componentDidUpdate",value:function(e){var t=this.props.page;e.page&&t!==e.page&&this.loadTextItems()}},{key:"componentWillUnmount",value:function(){e_(this.runningTask)}},{key:"unrotatedViewport",get:function(){var e=this.props,t=e.page,r=e.scale;return t.getViewport({scale:r})}},{key:"rotate",get:function(){var e=this.props,t=e.page;return e.rotate-t.rotate}},{key:"renderTextItems",value:function(){var e=this.state.textItems;return e?e.map(function(e,t){return _().createElement(tc,(0,a.Z)({key:t,itemIndex:t},e))}):null}},{key:"render",value:function(){var e=this.unrotatedViewport,t=this.rotate;return _().createElement("div",{className:"react-pdf__Page__textContent",style:{position:"absolute",top:"50%",left:"50%",width:"".concat(e.width,"px"),height:"".concat(e.height,"px"),color:"transparent",transform:"translate(-50%, -50%) rotate(".concat(t,"deg)"),WebkitTransform:"translate(-50%, -50%) rotate(".concat(t,"deg)"),pointerEvents:"none"}},this.renderTextItems())}}]),r}(b.PureComponent);function tp(e){return _().createElement(e6.Consumer,null,function(t){return _().createElement(th,(0,a.Z)({},t,e))})}function tv(e){var t=ty();return function(){var r,n=m(e);return r=t?Reflect.construct(n,arguments,m(this).constructor):n.apply(this,arguments),y(this,r)}}function ty(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}th.propTypes={onGetTextError:A().func,onGetTextSuccess:A().func,page:eM.isRequired,rotate:eB,scale:A().number};var tm=function(e){v(r,e);var t=tv(r);function r(){var e;u(this,r);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];return e=t.call.apply(t,[this].concat(a)),g((0,h.Z)(e),"state",{annotations:null}),g((0,h.Z)(e),"layerElement",(0,b.createRef)()),g((0,h.Z)(e),"loadAnnotations",function(){var t=z(e.props.page.getAnnotations());e.runningTask=t,t.promise.then(function(t){e.setState({annotations:t},e.onLoadSuccess)}).catch(function(t){e.onLoadError(t)})}),g((0,h.Z)(e),"onLoadSuccess",function(){var t=e.props.onGetAnnotationsSuccess,r=e.state.annotations;t&&t(r)}),g((0,h.Z)(e),"onLoadError",function(t){e.setState({annotations:!1}),(0,Y.Z)(t);var r=e.props.onGetAnnotationsError;r&&r(t)}),g((0,h.Z)(e),"onRenderSuccess",function(){var t=e.props.onRenderAnnotationLayerSuccess;t&&t()}),g((0,h.Z)(e),"onRenderError",function(t){(0,Y.Z)(t);var r=e.props.onRenderAnnotationLayerError;r&&r(t)}),e}
1return d(r,[{key:"componentDidMount",value:function(){X(this.props.page,"Attempted to load page annotations, but no page was specified."),this.loadAnnotations()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.page,n=t.renderForms;(e.page&&r!==e.page||n!==e.renderForms)&&this.loadAnnotations()}},{key:"componentWillUnmount",value:function(){e_(this.runningTask)}},{key:"viewport",get:function(){var e=this.props,t=e.page,r=e.rotate,n=e.scale;return t.getViewport({scale:n,rotation:r})}},{key:"renderAnnotationLayer",value:function(){var e=this.state.annotations;if(e){var t=this.props,r=t.imageResourcesPath,a=t.linkService,o=t.page,i=t.renderForms,s=this.viewport.clone({dontFlip:!0}),u={annotations:e,div:this.layerElement.current,imageResourcesPath:r,linkService:a,page:o,renderForms:i,viewport:s};this.layerElement.current.innerHTML="";try{n.AnnotationLayer.render(u),this.onRenderSuccess()}catch(e){this.onRenderError(e)}}}},{key:"render",value:function(){return _().createElement("div",{className:"react-pdf__Page__annotations annotationLayer",ref:this.layerElement},this.renderAnnotationLayer())}}]),r}(b.PureComponent);tm.propTypes={imageResourcesPath:A().string,linkService:eF.isRequired,onGetAnnotationsError:A().func,onGetAnnotationsSuccess:A().func,onRenderAnnotationLayerError:A().func,onRenderAnnotationLayerSuccess:A().func,page:eM,renderForms:A().bool,rotate:eB,scale:A().number};var tg=function(e){return _().createElement(Z.Consumer,null,function(t){return _().createElement(e6.Consumer,null,function(r){return _().createElement(tm,(0,a.Z)({},t,r,e))})})};function tb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function t_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tb(Object(r),!0).forEach(function(t){g(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tb(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function tS(e){var t=tA();return function(){var r,n=m(e);return r=t?Reflect.construct(n,arguments,m(this).constructor):n.apply(this,arguments),y(this,r)}}function tA(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var tk=1,tw=function(e){v(r,e);var t=tS(r);function r(){var e;u(this,r);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];return e=t.call.apply(t,[this].concat(a)),g((0,h.Z)(e),"state",{page:null}),g((0,h.Z)(e),"pageElement",(0,b.createRef)()),g((0,h.Z)(e),"onLoadSuccess",function(){var t=e.props,r=t.onLoadSuccess,n=t.registerPage,a=e.state.page;r&&r(eS(a,e.scale)),n&&n(e.pageIndex,e.pageElement.current)}),g((0,h.Z)(e),"onLoadError",function(t){e.setState({page:!1}),(0,Y.Z)(t);var r=e.props.onLoadError;r&&r(t)}),g((0,h.Z)(e),"loadPage",function(){var t=e.props.pdf,r=e.getPageNumber();if(r){e.setState(function(e){return e.page?{page:null}:null});var n=z(t.getPage(r));e.runningTask=n,n.promise.then(function(t){e.setState({page:t},e.onLoadSuccess)}).catch(function(t){e.onLoadError(t)})}}),e}return d(r,[{key:"componentDidMount",value:function(){X(this.props.pdf,"Attempted to load a page, but no document was specified."),this.loadPage()}},{key:"componentDidUpdate",value:function(e){var t=this.props.pdf;if(e.pdf&&t!==e.pdf||this.getPageNumber()!==this.getPageNumber(e)){var r=this.props.unregisterPage;r&&r(this.getPageIndex(e)),this.loadPage()}}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterPage;e&&e(this.pageIndex),e_(this.runningTask)}},{key:"childContext",get:function(){var e=this.state.page;if(!e)return{};var t=this.props,r=t.canvasBackground,n=t.customTextRenderer,a=t.onGetAnnotationsError,o=t.onGetAnnotationsSuccess,i=t.onGetTextError,s=t.onGetTextSuccess,u=t.onRenderAnnotationLayerError,l=t.onRenderAnnotationLayerSuccess,c=t.onRenderError,f=t.onRenderSuccess,d=t.renderForms,h=t.renderInteractiveForms;
1return{canvasBackground:r,customTextRenderer:n,onGetAnnotationsError:a,onGetAnnotationsSuccess:o,onGetTextError:i,onGetTextSuccess:s,onRenderAnnotationLayerError:u,onRenderAnnotationLayerSuccess:l,onRenderError:c,onRenderSuccess:f,page:e,renderForms:null!=d?d:h,rotate:this.rotate,scale:this.scale}}},{key:"getPageIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return el(e.pageNumber)?e.pageNumber-1:el(e.pageIndex)?e.pageIndex:null}},{key:"getPageNumber",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return el(e.pageNumber)?e.pageNumber:el(e.pageIndex)?e.pageIndex+1:null}},{key:"pageIndex",get:function(){return this.getPageIndex()}},{key:"pageNumber",get:function(){return this.getPageNumber()}},{key:"rotate",get:function(){var e=this.props.rotate;if(el(e))return e;var t=this.state.page;return t?t.rotate:null}},{key:"scale",get:function(){var e=this.state.page;if(!e)return null;var t=this.props,r=t.scale,n=t.width,a=t.height,o=this.rotate,i=1,s=null===r?tk:r;if(n||a){var u=e.getViewport({scale:1,rotation:o});i=n?n/u.width:a/u.height}return s*i}},{key:"eventProps",get:function(){var e=this;return W(this.props,function(){var t=e.state.page;return t?eS(t,e.scale):t})}},{key:"pageKey",get:function(){var e=this.state.page;return"".concat(e.pageIndex,"@").concat(this.scale,"/").concat(this.rotate)}},{key:"pageKeyNoScale",get:function(){var e=this.state.page;return"".concat(e.pageIndex,"/").concat(this.rotate)}},{key:"renderMainLayer",value:function(){var e=this.props,t=e.canvasRef;switch(e.renderMode){case"none":return null;case"svg":return _().createElement(ti,{key:"".concat(this.pageKeyNoScale,"_svg")});default:return _().createElement(tr,{key:"".concat(this.pageKey,"_canvas"),canvasRef:t})}}},{key:"renderTextLayer",value:function(){return this.props.renderTextLayer?_().createElement(tp,{key:"".concat(this.pageKey,"_text")}):null}},{key:"renderAnnotationLayer",value:function(){return this.props.renderAnnotationLayer?_().createElement(tg,{key:"".concat(this.pageKey,"_annotations")}):null}},{key:"renderChildren",value:function(){var e=this.props.children;return _().createElement(e6.Provider,{value:this.childContext},this.renderMainLayer(),this.renderTextLayer(),this.renderAnnotationLayer(),e)}},{key:"renderContent",value:function(){var e=this.pageNumber,t=this.props.pdf,r=this.state.page;if(!e){var n=this.props.noData;return _().createElement(K,{type:"no-data"},"function"==typeof n?n():n)}if(null===t||null===r){var a=this.props.loading;return _().createElement(K,{type:"loading"},"function"==typeof a?a():a)}if(!1===t||!1===r){var o=this.props.error;return _().createElement(K,{type:"error"},"function"==typeof o?o():o)}return this.renderChildren()}},{key:"render",value:function(){var e=this.pageNumber,t=this.props,r=t.className,n=t.inputRef;return _().createElement("div",(0,a.Z)({className:G("react-pdf__Page",r),"data-page-number":e,ref:e8(n,this.pageElement),style:{position:"relative"}},this.eventProps),this.renderContent())}}]),r}(b.PureComponent);tw.defaultProps={error:"Failed to load the page.",loading:"Loading page…",noData:"No page specified.",renderAnnotationLayer:!0,renderForms:!1,renderMode:"canvas",renderTextLayer:!0,scale:tk};var tx=A().oneOfType([A().func,A().node]);function tC(e,t){return _().createElement(Z.Consumer,null,function(r){return _().createElement(tw,(0,a.Z)({ref:t},r,e))})}tw.propTypes=t_(t_({},eT),{},{canvasBackground:A().string,children:A().node,className:eE,customTextRenderer:A().func,error:tx,height:A().number,imageResourcesPath:A().string,inputRef:eD,loading:tx,noData:tx,onGetTextError:A().func,onGetTextSuccess:A().func,onLoadError:A().func,onLoadSuccess:A().func,onRenderError:A().func,onRenderSuccess:A().func,pageIndex:eI,pageNumber:ej,pdf:eL,registerPage:A().func,renderAnnotationLayer:A().bool,renderForms:A().bool,renderInteractiveForms:A().bool,renderMode:eN,renderTextLayer:A().bool,rotate:eB,scale:A().number,unregisterPage:A().func,width:A().number});var tP=_().forwardRef(tC);eb(),n.GlobalWorkerOptions.workerSrc="pdf.worker.js"},7632:function(e,t,r){"use strict";let n;r.d(t,{Z:function(){return l}});var a={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o=new Uint8Array(16);function i(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(o)}let s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function u(e,t=0){return s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]}var l=function(e,t,r){if(a.randomUUID&&!t&&!e)return a.randomUUID();let n=(e=e||{}).random||(e.rng||i)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return u(n)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.