@dingrtc/whiteboard 1.1.6 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/PdfPlugin.js DELETED
@@ -1,64 +0,0 @@
1
- function asyncGeneratorStep(e,t,r,n,a,i,s){try{var o=e[i](s),c=o.value}catch(e){return void r(e)}o.done?t(c):Promise.resolve(c).then(n,a)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){asyncGeneratorStep(i,n,a,s,o,"next",e)}function o(e){asyncGeneratorStep(i,n,a,s,o,"throw",e)}s(void 0)}))}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _typeof$1(e){return _typeof$1="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},_typeof$1(e)}function toPrimitive(e,t){if("object"!=_typeof$1(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=_typeof$1(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}function toPropertyKey(e){var t=toPrimitive(e,"string");return"symbol"==_typeof$1(t)?t:t+""}function _defineProperties(e,t){for(var r=0;t.length>r;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,toPropertyKey(n.key),n)}}function _createClass(e,t,r){return r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var regeneratorRuntime$1={exports:{}},_typeof={exports:{}};!function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(_typeof);var _typeofExports=_typeof.exports;!function(e){var t=_typeofExports.default;function r(){e.exports=r=function(){return a},e.exports.__esModule=!0,e.exports.default=e.exports;var n,a={},i=Object.prototype,s=i.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",h=c.asyncIterator||"@@asyncIterator",u=c.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(n){d=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var a=Object.create((t&&t.prototype instanceof v?t:v).prototype),i=new M(n||[]);return o(a,"_invoke",{value:O(e,r,i)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}a.wrap=f;var g="suspendedStart",m="suspendedYield",b="executing",y="completed",w={};function v(){}function S(){}function x(){}var A={};d(A,l,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(R([])));C&&C!==i&&s.call(C,l)&&(A=C);var _=x.prototype=v.prototype=Object.create(A);function F(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,r){function n(a,i,o,c){var l=p(e[a],e,i);if("throw"!==l.type){var h=l.arg,u=h.value;return u&&"object"==t(u)&&s.call(u,"__await")?r.resolve(u.__await).then((function(e){n("next",e,o,c)}),(function(e){n("throw",e,o,c)})):r.resolve(u).then((function(e){h.value=e,o(h)}),(function(e){return n("throw",e,o,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,t){function i(){return new r((function(r,a){n(e,t,r,a)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var a=g;return function(i,s){if(a===b)throw Error("Generator is already running");if(a===y){if("throw"===i)throw s;return{value:n,done:!0}}for(r.method=i,r.arg=s;;){var o=r.delegate;if(o){var c=P(o,r);if(c){if(c===w)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===g)throw a=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=b;var l=p(e,t,r);if("normal"===l.type){if(a=r.done?y:m,l.arg===w)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a=y,r.method="throw",r.arg=l.arg)}}}function P(e,t){var r=t.method,a=e.iterator[r];if(a===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=n,P(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),w;var i=p(a,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,w;var s=i.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,w):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,w)}function I(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function R(e){if(e||""===e){var r=e[l];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function t(){for(;++a<e.length;)if(s.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=n,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return S.prototype=x,o(_,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:S,configurable:!0}),S.displayName=d(x,u,"GeneratorFunction"),a.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,d(e,u,"GeneratorFunction")),e.prototype=Object.create(_),e},a.awrap=function(e){return{__await:e}},F(T.prototype),d(T.prototype,h,(function(){return this})),a.AsyncIterator=T,a.async=function(e,t,r,n,i){void 0===i&&(i=Promise);var s=new T(f(e,t,r,n),i);return a.isGeneratorFunction(t)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},F(_),d(_,u,"Generator"),d(_,l,(function(){return this})),d(_,"toString",(function(){return"[object Generator]"})),a.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},a.values=R,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&s.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,a){return o.type="throw",o.arg=e,t.next=r,a&&(t.method="next",t.arg=n),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return r("end");if(this.prev>=i.tryLoc){var c=s.call(i,"catchLoc"),l=s.call(i,"finallyLoc");if(c&&l){if(i.catchLoc>this.prev)return r(i.catchLoc,!0);if(i.finallyLoc>this.prev)return r(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return r(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(this.prev>=n.tryLoc&&s.call(n,"finallyLoc")&&n.finallyLoc>this.prev){var a=n;break}}a&&("break"===e||"continue"===e)&&t>=a.tryLoc&&a.finallyLoc>=t&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,w):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),w},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),E(r),w}},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;E(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:R(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),w}},a}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(regeneratorRuntime$1);var regeneratorRuntimeExports=regeneratorRuntime$1.exports,runtime=regeneratorRuntimeExports(),regenerator=runtime;try{regeneratorRuntime=runtime}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}var _regeneratorRuntime=getDefaultExportFromCjs(regenerator);function commonjsRequire(e){throw Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pdf={exports:{}},dommatrix={exports:{}},hasRequiredDommatrix;function requireDommatrix(){return hasRequiredDommatrix||(hasRequiredDommatrix=1,dommatrix.exports=function(){function e(e){var t=new d,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],i=r[2],s=r[3],o=r[4],c=r[5],l=r[6],h=r[7],u=r[8],f=r[9],p=r[10],g=r[11],m=r[12],b=r[13],y=r[14],w=r[15];t.m11=n,t.a=n,t.m21=o,t.c=o,t.m31=u,t.m41=m,t.e=m,t.m12=a,t.b=a,t.m22=c,t.d=c,t.m32=f,t.m42=b,t.f=b,t.m13=i,t.m23=l,t.m33=p,t.m43=y,t.m14=s,t.m24=h,t.m34=g,t.m44=w}else{if(6!==r.length)throw new TypeError("CSSMatrix: expecting an Array of 6/16 values.");var v=r[0],S=r[1],x=r[2],A=r[3],k=r[4],C=r[5];t.m11=v,t.a=v,t.m12=S,t.b=S,t.m21=x,t.c=x,t.m22=A,t.d=A,t.m41=k,t.e=k,t.m42=C,t.f=C}return t}function t(t){var r=Object.keys(new d);if("object"==typeof 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: "'+JSON.stringify(t)+'" is not a DOMMatrix / CSSMatrix / JSON compatible object.')}
2
- /**
3
- * Creates a new mutable `CSSMatrix` given any valid CSS transform string,
4
- * or what we call `TransformList`:
5
- *
6
- * * `matrix(a, b, c, d, e, f)` - valid matrix() transform function
7
- * * `matrix3d(m11, m12, m13, ...m44)` - valid matrix3d() transform function
8
- * * `translate(tx, ty) rotateX(alpha)` - any valid transform function(s)
9
- *
10
- * @copyright thednp © 2021
11
- *
12
- * @param {string} source valid CSS transform string syntax.
13
- * @return {CSSMatrix} the resulted matrix.
14
- */function r(t){if("string"!=typeof t)throw TypeError('CSSMatrix: "'+t+'" is not a string.');var r=(t+"").replace(/\s/g,""),n=new d,a='CSSMatrix: invalid transform string "'+t+'"';return r.split(")").filter((function(e){return e})).forEach((function(t){var r=t.split("("),i=r[0],s=r[1];if(!s)throw TypeError(a);var o=s.split(",").map((function(e){return e.includes("rad")?parseFloat(e)*(180/Math.PI):parseFloat(e)})),c=o[0],l=o[1],h=o[2],u=o[3],d=[c,l,h],f=[c,l,h,u];if("perspective"===i&&c&&[l,h].every((function(e){return void 0===e})))n.m34=-1/c;else if(i.includes("matrix")&&[6,16].includes(o.length)&&o.every((function(e){return!Number.isNaN(+e)}))){var p=o.map((function(e){return 1e-6>Math.abs(e)?0:e}));n=n.multiply(e(p))}else if("translate3d"===i&&d.every((function(e){return!Number.isNaN(+e)})))n=n.translate(c,l,h);else if("translate"===i&&c&&void 0===h)n=n.translate(c,l||0,0);else if("rotate3d"===i&&f.every((function(e){return!Number.isNaN(+e)}))&&u)n=n.rotateAxisAngle(c,l,h,u);else if("rotate"===i&&c&&[l,h].every((function(e){return void 0===e})))n=n.rotate(0,0,c);else if("scale3d"===i&&d.every((function(e){return!Number.isNaN(+e)}))&&d.some((function(e){return 1!==e})))n=n.scale(c,l,h);else if("scale"!==i||Number.isNaN(c)||1===c||void 0!==h)if("skew"===i&&(c||!Number.isNaN(c)&&l)&&void 0===h)n=n.skew(c,l||0);else{if(!(/[XYZ]/.test(i)&&c&&[l,h].every((function(e){return void 0===e}))&&["translate","rotate","scale","skew"].some((function(e){return i.includes(e)}))))throw TypeError(a);if(["skewX","skewY"].includes(i))n=n[i](c);else{var g=i.replace(/[XYZ]/,""),m=i.replace(g,""),b=["X","Y","Z"].indexOf(m),y="scale"===g?1:0;n=n[g].call(n,0===b?c:y,1===b?c:y,2===b?c:y)}}else n=n.scale(c,Number.isNaN(+l)?c:l,1)})),n}function n(e,t){return t?[e.a,e.b,e.c,e.d,e.e,e.f]:[e.m11,e.m12,e.m13,e.m14,e.m21,e.m22,e.m23,e.m24,e.m31,e.m32,e.m33,e.m34,e.m41,e.m42,e.m43,e.m44]}function a(e,t,r){var n=new d;return n.m41=e,n.e=e,n.m42=t,n.f=t,n.m43=r,n}function i(e,t,r){var n=new d,a=Math.PI/180,i=e*a,s=t*a,o=r*a,c=Math.cos(i),l=-Math.sin(i),h=Math.cos(s),u=-Math.sin(s),f=Math.cos(o),p=-Math.sin(o),g=h*f,m=-h*p;n.m11=g,n.a=g,n.m12=m,n.b=m,n.m13=u;var b=l*u*f+c*p;n.m21=b,n.c=b;var y=c*f-l*u*p;return n.m22=y,n.d=y,n.m23=-l*h,n.m31=l*p-c*u*f,n.m32=l*f+c*u*p,n.m33=c*h,n}function s(e,t,r,n){var a=new d,i=Math.sqrt(e*e+t*t+r*r);if(0===i)return a;var s=e/i,o=t/i,c=r/i,l=n*(Math.PI/360),h=Math.sin(l),u=Math.cos(l),f=h*h,p=s*s,g=o*o,m=c*c,b=1-2*(g+m)*f;a.m11=b,a.a=b;var y=2*(s*o*f+c*h*u);a.m12=y,a.b=y,a.m13=2*(s*c*f-o*h*u);var w=2*(o*s*f-c*h*u);a.m21=w,a.c=w;var v=1-2*(m+p)*f;return a.m22=v,a.d=v,a.m23=2*(o*c*f+s*h*u),a.m31=2*(c*s*f+o*h*u),a.m32=2*(c*o*f-s*h*u),a.m33=1-2*(p+g)*f,a}function o(e,t,r){var n=new d;return n.m11=e,n.a=e,n.m22=t,n.d=t,n.m33=r,n}function c(e,t){var r=new d;if(e){var n=Math.tan(e*Math.PI/180);r.m21=n,r.c=n}if(t){var a=Math.tan(t*Math.PI/180);r.m12=a,r.b=a}return r}function l(e){return c(e,0)}function h(e){return c(0,e)}function u(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 d=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.length){var n=[16,6].some((function(t){return t===e.length}))?e:e[0];return r.setMatrixValue(n)}return r},f={isIdentity:{configurable:!0},is2D:{configurable:!0}};return f.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},f.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.prototype.setMatrixValue=function(n){var a=this;return"string"==typeof n&&n.length&&"none"!==n?r(n):[Array,Float64Array,Float32Array].some((function(e){return n instanceof e}))?e(n):[d,DOMMatrix,Object].some((function(e){return n instanceof e}))?t(n):a},d.prototype.toFloat32Array=function(e){return Float32Array.from(n(this,e))},d.prototype.toFloat64Array=function(e){return Float64Array.from(n(this,e))},d.prototype.toString=function(){var e=this,t=e.is2D;return(t?"matrix":"matrix3d")+"("+e.toFloat64Array(t).join(", ")+")"},d.prototype.toJSON=function(){var e=this;return Object.assign({},e,{is2D:e.is2D,isIdentity:e.isIdentity})},d.prototype.multiply=function(e){return u(this,e)},d.prototype.translate=function(e,t,r){var n=t,i=r;return void 0===n&&(n=0),void 0===i&&(i=0),u(this,a(e,n,i))},d.prototype.scale=function(e,t,r){var n=t,a=r;return void 0===n&&(n=e),void 0===a&&(a=1),u(this,o(e,n,a))},d.prototype.rotate=function(e,t,r){var n=e,a=t||0,s=r||0;return"number"==typeof e&&void 0===t&&void 0===r&&(s=n,n=0,a=0),u(this,i(n,a,s))},d.prototype.rotateAxisAngle=function(e,t,r,n){if([e,t,r,n].some((function(e){return Number.isNaN(+e)})))throw new TypeError("CSSMatrix: expecting 4 values");return u(this,s(e,t,r,n))},d.prototype.skewX=function(e){return u(this,l(e))},d.prototype.skewY=function(e){return u(this,h(e))},d.prototype.skew=function(e,t){return u(this,c(e,t))},d.prototype.transformPoint=function(e){var t=this,r=t.m11*e.x+t.m21*e.y+t.m31*e.z+t.m41*e.w,n=t.m12*e.x+t.m22*e.y+t.m32*e.z+t.m42*e.w,a=t.m13*e.x+t.m23*e.y+t.m33*e.z+t.m43*e.w,i=t.m14*e.x+t.m24*e.y+t.m34*e.z+t.m44*e.w;return e instanceof DOMPoint?new DOMPoint(r,n,a,i):{x:r,y:n,z:a,w:i}},Object.defineProperties(d.prototype,f),Object.assign(d,{Translate:a,Rotate:i,RotateAxisAngle:s,Scale:o,SkewX:l,SkewY:h,Skew:c,Multiply:u,fromArray:e,fromMatrix:t,fromString:r,toArray:n}),Object.assign(d,{Version:"1.0.3"}),d}()),dommatrix.exports}var ponyfill={exports:{}},hasRequiredPonyfill;
15
- /**
16
- * @license
17
- * web-streams-polyfill v3.3.3
18
- * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
19
- * This code is released under the MIT license.
20
- * SPDX-License-Identifier: MIT
21
- */function requirePonyfill(){return hasRequiredPonyfill||(hasRequiredPonyfill=1,function(e){var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(e){return"Symbol(".concat(e,")")};function r(e,t){var r,n,a,i,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(e){return function(t){return c([e,t])}}function c(o){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,o[0]&&(s=0)),s;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((a=(a=s.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&a[3]>o[1])){s.label=o[1];break}if(6===o[0]&&a[1]>s.label){s.label=a[1],a=o;break}if(a&&a[2]>s.label){s.label=a[2],s.ops.push(o);break}a[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function n(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e){return this instanceof a?(this.v=e,this):new a(e)}function i(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||c(e,t)}))})}function c(e,t){try{l(i[e](t))}catch(e){d(s[0][3],e)}}function l(e){e.value instanceof a?Promise.resolve(e.value.v).then(h,u):d(s[0][2],e)}function h(e){c("next",e)}function u(e){c("throw",e)}function d(e,t){e(t),s.shift(),s.length&&c(s[0][0],s[0][1])}}function s(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:a(e[n](t)),done:!1}:i?i(t):t}:i}}function o(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof n?n(e):e[Symbol.iterator](),t={},a("next"),a("throw"),a("return"),t[Symbol.asyncIterator]=function(){return this},t);function a(r){t[r]=e[r]&&function(t){return new Promise((function(n,a){i(n,a,(t=e[r](t)).done,t.value)}))}}function i(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}}function c(){}function l(e){return"object"==typeof e&&null!==e||"function"==typeof e}"function"==typeof SuppressedError&&SuppressedError;var h=c;function u(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch(e){}}var d=Promise,f=Promise.prototype.then,p=Promise.reject.bind(d);function g(e){return new d(e)}function m(e){return g((function(t){return t(e)}))}function b(e){return p(e)}function y(e,t,r){return f.call(e,t,r)}function w(e,t,r){y(y(e,t,r),void 0,h)}function v(e,t){w(e,t)}function S(e,t){w(e,void 0,t)}function x(e,t,r){return y(e,t,r)}function A(e){y(e,void 0,h)}var k=function(e){if("function"==typeof queueMicrotask)k=queueMicrotask;else{var t=m(void 0);k=function(e){return y(t,e)}}return k(e)};function C(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function _(e,t,r){try{return m(C(e,t,r))}catch(e){return b(e)}}var F=16384,T=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===F-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,i=a[r];return n===F&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),a[r]=void 0,i},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&&(t=0,0===(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){return this._front._elements[this._cursor]},e}(),O=t("[[AbortSteps]]"),P=t("[[ErrorSteps]]"),I=t("[[CancelSteps]]"),E=t("[[PullSteps]]"),M=t("[[ReleaseSteps]]");function R(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?j(e):"closed"===t._state?U(e):B(e,t._storedError)}function D(e,t){return aa(e._ownerReadableStream,t)}function N(e){var t=e._ownerReadableStream;"readable"===t._state?$(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):q(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),t._readableStreamController[M](),t._reader=void 0,e._ownerReadableStream=void 0}function L(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function j(e){e._closedPromise=g((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function B(e,t){j(e),$(e,t)}function U(e){j(e),X(e)}function $(e,t){void 0!==e._closedPromise_reject&&(A(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function q(e,t){B(e,t)}function X(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var H=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},W=Math.trunc||function(e){return 0>e?Math.ceil(e):Math.floor(e)};function z(e){return"object"==typeof e||"function"==typeof e}function G(e,t){if(void 0!==e&&!z(e))throw new TypeError("".concat(t," is not an object."))}function V(e,t){if("function"!=typeof e)throw new TypeError("".concat(t," is not a function."))}function Y(e){return"object"==typeof e&&null!==e||"function"==typeof e}function K(e,t){if(!Y(e))throw new TypeError("".concat(t," is not an object."))}function J(e,t,r){if(void 0===e)throw new TypeError("Parameter ".concat(t," is required in '").concat(r,"'."))}function Z(e,t,r){if(void 0===e)throw new TypeError("".concat(t," is required in '").concat(r,"'."))}function Q(e){return Number(e)}function ee(e){return 0===e?0:e}function te(e){return ee(W(e))}function re(e,t){var r=0,n=Number.MAX_SAFE_INTEGER,a=Number(e);if(a=ee(a),!H(a))throw new TypeError("".concat(t," is not a finite number"));if(r>(a=te(a))||a>n)throw new TypeError("".concat(t," is outside the accepted range of ").concat(r," to ").concat(n,", inclusive"));return H(a)&&0!==a?a:0}function ne(e,t){if(!ra(e))throw new TypeError("".concat(t," is not a ReadableStream."))}function ae(e){return new de(e)}function ie(e,t){e._reader._readRequests.push(t)}function se(e,t,r){var n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function oe(e){return e._reader._readRequests.length}function ce(e){var t=e._reader;return void 0!==t&&!!fe(t)}var le,he,ue,de=function(){function e(e){if(J(e,1,"ReadableStreamDefaultReader"),ne(e,"First parameter"),na(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");R(this,e),this._readRequests=new T}return Object.defineProperty(e.prototype,"closed",{get:function(){return fe(this)?this._closedPromise:b(be("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),fe(this)?void 0===this._ownerReadableStream?b(L("cancel")):D(this,e):b(be("cancel"))},e.prototype.read=function(){if(!fe(this))return b(be("read"));if(void 0===this._ownerReadableStream)return b(L("read from"));var e,t,r=g((function(r,n){e=r,t=n}));return pe(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(!fe(this))throw be("releaseLock");void 0!==this._ownerReadableStream&&ge(this)},e}();function fe(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof de}function pe(e,t){var r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[E](t)}function ge(e){N(e),me(e,new TypeError("Reader was released"))}function me(e,t){var r=e._readRequests;e._readRequests=new T,r.forEach((function(e){e._errorSteps(t)}))}function be(e){return new TypeError("ReadableStreamDefaultReader.prototype.".concat(e," can only be used on a ReadableStreamDefaultReader"))}function ye(e){return e.slice()}function we(e,t,r,n,a){new Uint8Array(e).set(new Uint8Array(r,n,a),t)}Object.defineProperties(de.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),u(de.prototype.cancel,"cancel"),u(de.prototype.read,"read"),u(de.prototype.releaseLock,"releaseLock"),"symbol"==typeof t.toStringTag&&Object.defineProperty(de.prototype,t.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});var ve=function(e){return(ve="function"==typeof e.transfer?function(e){return e.transfer()}:"function"==typeof structuredClone?function(e){return structuredClone(e,{transfer:[e]})}:function(e){return e})(e)},Se=function(e){return(Se="boolean"==typeof e.detached?function(e){return e.detached}:function(e){return 0===e.byteLength})(e)};function xe(e,t,r){if(e.slice)return e.slice(t,r);var n=r-t,a=new ArrayBuffer(n);return we(a,0,e,t,n),a}function Ae(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError("".concat(t+""," is not a function"));return r}}function ke(e){var c,l=((c={})[t.iterator]=function(){return e.iterator},c),h=function(){return i(this,arguments,(function(){return r(this,(function(e){switch(e.label){case 0:return[5,n(s(o(l)))];case 1:case 2:return[4,a.call(void 0,e.sent())];case 3:return[2,e.sent()]}}))}))}();return{iterator:h,nextMethod:h.next,done:!1}}var Ce,_e=null!==(ue=null!==(le=t.asyncIterator)&&void 0!==le?le:null===(he=t.for)||void 0===he?void 0:he.call(t,"Symbol.asyncIterator"))&&void 0!==ue?ue:"@@asyncIterator";function Fe(e,r,n){if(void 0===r&&(r="sync"),void 0===n)if("async"===r){if(void 0===(n=Ae(e,_e)))return ke(Fe(e,"sync",Ae(e,t.iterator)))}else n=Ae(e,t.iterator);if(void 0===n)throw new TypeError("The object is not iterable");var a=C(n,e,[]);if(!l(a))throw new TypeError("The iterator method must return an object");return{iterator:a,nextMethod:a.next,done:!1}}function Te(e){var t=C(e.nextMethod,e.iterator,[]);if(!l(t))throw new TypeError("The iterator.next() method must return an object");return t}function Oe(e){return!!e.done}function Pe(e){return e.value}var Ie=((Ce={})[_e]=function(){return this},Ce);Object.defineProperty(Ie,_e,{enumerable:!1});var Ee=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?x(this._ongoingPromise,t,t):t(),this._ongoingPromise},e.prototype.return=function(e){var t=this,r=function(){return t._returnSteps(e)};return this._ongoingPromise?x(this._ongoingPromise,r,r):r()},e.prototype._nextSteps=function(){var e=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var t,r,n=this._reader,a=g((function(e,n){t=e,r=n}));return pe(n,{_chunkSteps:function(r){e._ongoingPromise=void 0,k((function(){return t({value:r,done:!1})}))},_closeSteps:function(){e._ongoingPromise=void 0,e._isFinished=!0,N(n),t({value:void 0,done:!0})},_errorSteps:function(t){e._ongoingPromise=void 0,e._isFinished=!0,N(n),r(t)}}),a},e.prototype._returnSteps=function(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;var t=this._reader;if(!this._preventCancel){var r=D(t,e);return N(t),x(r,(function(){return{value:e,done:!0}}))}return N(t),m({value:e,done:!0})},e}(),Me={next:function(){return De(this)?this._asyncIteratorImpl.next():b(Ne("next"))},return:function(e){return De(this)?this._asyncIteratorImpl.return(e):b(Ne("return"))}};function Re(e,t){var r=ae(e),n=new Ee(r,t),a=Object.create(Me);return a._asyncIteratorImpl=n,a}function De(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof Ee}catch(e){return!1}}function Ne(e){return new TypeError("ReadableStreamAsyncIterator.".concat(e," can only be used on a ReadableSteamAsyncIterator"))}Object.setPrototypeOf(Me,Ie);var Le=Number.isNaN||function(e){return e!=e};function je(e){return"number"==typeof e&&!Le(e)&&e>=0}function Be(e){var t=xe(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function Ue(e){var t=e._queue.shift();return e._queueTotalSize-=t.size,0>e._queueTotalSize&&(e._queueTotalSize=0),t.value}function $e(e,t,r){if(!je(r)||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function qe(e){return e._queue.peek().value}function Xe(e){e._queue=new T,e._queueTotalSize=0}function He(e){return e===DataView}function We(e){return He(e.constructor)}function ze(e){return He(e)?1:e.BYTES_PER_ELEMENT}var Ge=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!Ke(this))throw Tt("view");return this._view},enumerable:!1,configurable:!0}),e.prototype.respond=function(e){if(!Ke(this))throw Tt("respond");if(J(e,1,"respond"),e=re(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(Se(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");At(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!Ke(this))throw Tt("respondWithNewView");if(J(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(Se(e.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");kt(this._associatedReadableByteStreamController,e)},e}();Object.defineProperties(Ge.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),u(Ge.prototype.respond,"respond"),u(Ge.prototype.respondWithNewView,"respondWithNewView"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ge.prototype,t.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Ve=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!Ye(this))throw Ot("byobRequest");return St(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Ye(this))throw Ot("desiredSize");return xt(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!Ye(this))throw Ot("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in ".concat(e," state) is not in the readable state and cannot be closed"));bt(this)},e.prototype.enqueue=function(e){if(!Ye(this))throw Ot("enqueue");if(J(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in ".concat(t," state) is not in the readable state and cannot be enqueued to"));yt(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Ye(this))throw Ot("error");wt(this,e)},e.prototype[I]=function(e){Ze(this),Xe(this);var t=this._cancelAlgorithm(e);return mt(this),t},e.prototype[E]=function(e){var t=this._controlledReadableByteStream;if(this._queueTotalSize>0)vt(this,e);else{var r=this._autoAllocateChunkSize;if(void 0!==r){var n=void 0;try{n=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}var a={buffer:n,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}ie(t,e),Je(this)}},e.prototype[M]=function(){if(this._pendingPullIntos.length>0){var e=this._pendingPullIntos.peek();e.readerType="none",this._pendingPullIntos=new T,this._pendingPullIntos.push(e)}},e}();function Ye(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof Ve}function Ke(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof Ge}function Je(e){gt(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,w(e._pullAlgorithm(),(function(){return e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Je(e)),null}),(function(t){return wt(e,t),null}))))}function Ze(e){ot(e),e._pendingPullIntos=new T}function Qe(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=et(t);"default"===t.readerType?se(e,n,r):Dt(e,n,r)}function et(e){return new e.viewConstructor(e.buffer,e.byteOffset,e.bytesFilled/e.elementSize)}function tt(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function rt(e,t,r,n){var a;try{a=xe(t,r,r+n)}catch(t){throw wt(e,t),t}tt(e,a,0,n)}function nt(e,t){t.bytesFilled>0&&rt(e,t.buffer,t.byteOffset,t.bytesFilled),pt(e)}function at(e,t){var r=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),n=t.bytesFilled+r,a=r,i=!1,s=n-n%t.elementSize;t.minimumFill>s||(a=s-t.bytesFilled,i=!0);for(var o=e._queue;a>0;){var c=o.peek(),l=Math.min(a,c.byteLength);we(t.buffer,t.byteOffset+t.bytesFilled,c.buffer,c.byteOffset,l),c.byteLength===l?o.shift():(c.byteOffset+=l,c.byteLength-=l),e._queueTotalSize-=l,it(e,l,t),a-=l}return i}function it(e,t,r){r.bytesFilled+=t}function st(e){0===e._queueTotalSize&&e._closeRequested?(mt(e),ia(e._controlledReadableByteStream)):Je(e)}function ot(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function ct(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();at(e,t)&&(pt(e),Qe(e._controlledReadableByteStream,t))}}function lt(e){for(var t=e._controlledReadableByteStream._reader;t._readRequests.length>0;){if(0===e._queueTotalSize)return;vt(e,t._readRequests.shift())}}function ht(e,t,r,n){var a,i=e._controlledReadableByteStream,s=t.constructor,o=ze(s),c=t.byteOffset,l=t.byteLength,h=r*o;try{a=ve(t.buffer)}catch(f){return void n._errorSteps(f)}var u={buffer:a,bufferByteLength:a.byteLength,byteOffset:c,byteLength:l,bytesFilled:0,minimumFill:h,elementSize:o,viewConstructor:s,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(u),void Rt(i,n);if("closed"!==i._state){if(e._queueTotalSize>0){if(at(e,u)){var d=et(u);return st(e),void n._chunkSteps(d)}if(e._closeRequested){var f=new TypeError("Insufficient bytes to fill elements in the given buffer");return wt(e,f),void n._errorSteps(f)}}e._pendingPullIntos.push(u),Rt(i,n),Je(e)}else{var p=new s(u.buffer,u.byteOffset,0);n._closeSteps(p)}}function ut(e,t){"none"===t.readerType&&pt(e);var r=e._controlledReadableByteStream;if(Lt(r))for(;Nt(r)>0;)Qe(r,pt(e))}function dt(e,t,r){if(it(e,t,r),"none"===r.readerType)return nt(e,r),void ct(e);if(r.bytesFilled>=r.minimumFill){pt(e);var n=r.bytesFilled%r.elementSize;n>0&&rt(e,r.buffer,r.byteOffset+r.bytesFilled-n,n),r.bytesFilled-=n,Qe(e._controlledReadableByteStream,r),ct(e)}}function ft(e,t){var r=e._pendingPullIntos.peek();ot(e),"closed"===e._controlledReadableByteStream._state?ut(e,r):dt(e,t,r),Je(e)}function pt(e){return e._pendingPullIntos.shift()}function gt(e){var t=e._controlledReadableByteStream;return!("readable"!==t._state||e._closeRequested||!e._started||(!ce(t)||0>=oe(t))&&(!Lt(t)||0>=Nt(t))&&0>=xt(e))}function mt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function bt(e){var t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos.peek();if(r.bytesFilled%r.elementSize!=0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw wt(e,n),n}}mt(e),ia(t)}}function yt(e,t){var r=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===r._state){var n=t.buffer,a=t.byteOffset,i=t.byteLength;if(Se(n))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");var s=ve(n);if(e._pendingPullIntos.length>0){var o=e._pendingPullIntos.peek();if(Se(o.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");ot(e),o.buffer=ve(o.buffer),"none"===o.readerType&&nt(e,o)}ce(r)?(lt(e),0===oe(r)?tt(e,s,a,i):(e._pendingPullIntos.length>0&&pt(e),se(r,new Uint8Array(s,a,i),!1))):Lt(r)?(tt(e,s,a,i),ct(e)):tt(e,s,a,i),Je(e)}}function wt(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(Ze(e),Xe(e),mt(e),sa(r,t))}function vt(e,t){var r=e._queue.shift();e._queueTotalSize-=r.byteLength,st(e);var n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);t._chunkSteps(n)}function St(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(Ge.prototype);Ft(n,e,r),e._byobRequest=n}return e._byobRequest}function xt(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function At(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=ve(r.buffer),ft(e,t)}function kt(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw new 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 new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var n=t.byteLength;r.buffer=ve(t.buffer),ft(e,n)}function Ct(e,t,r,n,a,i,s){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Xe(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=i,t._pullAlgorithm=n,t._cancelAlgorithm=a,t._autoAllocateChunkSize=s,t._pendingPullIntos=new T,e._readableStreamController=t,w(m(r()),(function(){return t._started=!0,Je(t),null}),(function(e){return wt(t,e),null}))}function _t(e,t,r){var n,a,i,s=Object.create(Ve.prototype);n=void 0!==t.start?function(){return t.start(s)}:function(){},a=void 0!==t.pull?function(){return t.pull(s)}:function(){return m(void 0)},i=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return m(void 0)};var o=t.autoAllocateChunkSize;if(0===o)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ct(e,s,n,a,i,r,o)}function Ft(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function Tt(e){return new TypeError("ReadableStreamBYOBRequest.prototype.".concat(e," can only be used on a ReadableStreamBYOBRequest"))}function Ot(e){return new TypeError("ReadableByteStreamController.prototype.".concat(e," can only be used on a ReadableByteStreamController"))}function Pt(e,t){G(e,t);var r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:It(r,"".concat(t," has member 'mode' that"))}}function It(e,t){if("byob"!==(e="".concat(e)))throw new TypeError("".concat(t," '").concat(e,"' is not a valid enumeration value for ReadableStreamReaderMode"));return e}function Et(e,t){var r;return G(e,t),{min:re(null!==(r=null==e?void 0:e.min)&&void 0!==r?r:1,"".concat(t," has member 'min' that"))}}function Mt(e){return new jt(e)}function Rt(e,t){e._reader._readIntoRequests.push(t)}function Dt(e,t,r){var n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}function Nt(e){return e._reader._readIntoRequests.length}function Lt(e){var t=e._reader;return void 0!==t&&!!Bt(t)}Object.defineProperties(Ve.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),u(Ve.prototype.close,"close"),u(Ve.prototype.enqueue,"enqueue"),u(Ve.prototype.error,"error"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ve.prototype,t.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var jt=function(){function e(e){if(J(e,1,"ReadableStreamBYOBReader"),ne(e,"First parameter"),na(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Ye(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");R(this,e),this._readIntoRequests=new T}return Object.defineProperty(e.prototype,"closed",{get:function(){return Bt(this)?this._closedPromise:b(Xt("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),Bt(this)?void 0===this._ownerReadableStream?b(L("cancel")):D(this,e):b(Xt("cancel"))},e.prototype.read=function(e,t){if(void 0===t&&(t={}),!Bt(this))return b(Xt("read"));if(!ArrayBuffer.isView(e))return b(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return b(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return b(new TypeError("view's buffer must have non-zero byteLength"));if(Se(e.buffer))return b(new TypeError("view's buffer has been detached"));var r;try{r=Et(t,"options")}catch(e){return b(e)}var n,a,i=r.min;if(0===i)return b(new TypeError("options.min must be greater than 0"));if(We(e)){if(i>e.byteLength)return b(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(i>e.length)return b(new RangeError("options.min must be less than or equal to view's length"));if(void 0===this._ownerReadableStream)return b(L("read from"));var s=g((function(e,t){n=e,a=t}));return Ut(this,e,i,{_chunkSteps:function(e){return n({value:e,done:!1})},_closeSteps:function(e){return n({value:e,done:!0})},_errorSteps:function(e){return a(e)}}),s},e.prototype.releaseLock=function(){if(!Bt(this))throw Xt("releaseLock");void 0!==this._ownerReadableStream&&$t(this)},e}();function Bt(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof jt}function Ut(e,t,r,n){var a=e._ownerReadableStream;a._disturbed=!0,"errored"===a._state?n._errorSteps(a._storedError):ht(a._readableStreamController,t,r,n)}function $t(e){N(e),qt(e,new TypeError("Reader was released"))}function qt(e,t){var r=e._readIntoRequests;e._readIntoRequests=new T,r.forEach((function(e){e._errorSteps(t)}))}function Xt(e){return new TypeError("ReadableStreamBYOBReader.prototype.".concat(e," can only be used on a ReadableStreamBYOBReader"))}function Ht(e,t){var r=e.highWaterMark;if(void 0===r)return t;if(Le(r)||0>r)throw new RangeError("Invalid highWaterMark");return r}function Wt(e){var t=e.size;return t||function(){return 1}}function zt(e,t){G(e,t);var r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:Q(r),size:void 0===n?void 0:Gt(n,"".concat(t," has member 'size' that"))}}function Gt(e,t){return V(e,t),function(t){return Q(e(t))}}function Vt(e,t){G(e,t);var r=null==e?void 0:e.abort,n=null==e?void 0:e.close,a=null==e?void 0:e.start,i=null==e?void 0:e.type,s=null==e?void 0:e.write;return{abort:void 0===r?void 0:Yt(r,e,"".concat(t," has member 'abort' that")),close:void 0===n?void 0:Kt(n,e,"".concat(t," has member 'close' that")),start:void 0===a?void 0:Jt(a,e,"".concat(t," has member 'start' that")),write:void 0===s?void 0:Zt(s,e,"".concat(t," has member 'write' that")),type:i}}function Yt(e,t,r){return V(e,r),function(r){return _(e,t,[r])}}function Kt(e,t,r){return V(e,r),function(){return _(e,t,[])}}function Jt(e,t,r){return V(e,r),function(r){return C(e,t,[r])}}function Zt(e,t,r){return V(e,r),function(r,n){return _(e,t,[r,n])}}function Qt(e,t){if(!or(e))throw new TypeError("".concat(t," is not a WritableStream."))}function er(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}Object.defineProperties(jt.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),u(jt.prototype.cancel,"cancel"),u(jt.prototype.read,"read"),u(jt.prototype.releaseLock,"releaseLock"),"symbol"==typeof t.toStringTag&&Object.defineProperty(jt.prototype,t.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var tr="function"==typeof AbortController;function rr(){if(tr)return new AbortController}var nr=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:K(e,"First parameter");var r=zt(t,"Second parameter"),n=Vt(e,"First parameter");if(sr(this),void 0!==n.type)throw new RangeError("Invalid type is specified");var a=Wt(r);Br(this,n,Ht(r,1),a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!or(this))throw Jr("locked");return cr(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),or(this)?cr(this)?b(new TypeError("Cannot abort a stream that already has a writer")):lr(this,e):b(Jr("abort"))},e.prototype.close=function(){return or(this)?cr(this)?b(new TypeError("Cannot close a stream that already has a writer")):wr(this)?b(new TypeError("Cannot close an already-closing stream")):hr(this):b(Jr("close"))},e.prototype.getWriter=function(){if(!or(this))throw Jr("getWriter");return ar(this)},e}();function ar(e){return new Cr(e)}function ir(e,t,r,n,a,i){void 0===a&&(a=1),void 0===i&&(i=function(){return 1});var s=Object.create(nr.prototype);return sr(s),jr(s,Object.create(Nr.prototype),e,t,r,n,a,i),s}function sr(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new T,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function or(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof nr}function cr(e){return void 0!==e._writer}function lr(e,t){var r;if("closed"===e._state||"errored"===e._state)return m(void 0);e._writableStreamController._abortReason=t,null===(r=e._writableStreamController._abortController)||void 0===r||r.abort(t);var n=e._state;if("closed"===n||"errored"===n)return m(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var a=!1;"erroring"===n&&(a=!0,t=void 0);var i=g((function(r,n){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:a}}));return e._pendingAbortRequest._promise=i,a||fr(e,t),i}function hr(e){var t=e._state;if("closed"===t||"errored"===t)return b(new TypeError("The stream (in ".concat(t," state) is not in the writable state and cannot be closed")));var r=g((function(t,r){e._closeRequest={_resolve:t,_reject:r}})),n=e._writer;return void 0!==n&&e._backpressure&&"writable"===t&&pn(n),$r(e._writableStreamController),r}function ur(e){return g((function(t,r){e._writeRequests.push({_resolve:t,_reject:r})}))}function dr(e,t){"writable"!==e._state?pr(e):fr(e,t)}function fr(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&Ir(n,t),!vr(e)&&r._started&&pr(e)}function pr(e){e._state="errored",e._writableStreamController[P]();var t=e._storedError;if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new T,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void Ar(e);w(e._writableStreamController[O](r._reason),(function(){return r._resolve(),Ar(e),null}),(function(t){return r._reject(t),Ar(e),null}))}else Ar(e)}function gr(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function mr(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,dr(e,t)}function br(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&&on(t)}function yr(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),dr(e,t)}function wr(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function vr(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function Sr(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function xr(e){e._inFlightWriteRequest=e._writeRequests.shift()}function Ar(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&an(t,e._storedError)}function kr(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(t?dn(r):pn(r)),e._backpressure=t}Object.defineProperties(nr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),u(nr.prototype.abort,"abort"),u(nr.prototype.close,"close"),u(nr.prototype.getWriter,"getWriter"),"symbol"==typeof t.toStringTag&&Object.defineProperty(nr.prototype,t.toStringTag,{value:"WritableStream",configurable:!0});var Cr=function(){function e(e){if(J(e,1,"WritableStreamDefaultWriter"),Qt(e,"First parameter"),cr(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;var t=e._state;if("writable"===t)!wr(e)&&e._backpressure?cn(this):hn(this),tn(this);else if("erroring"===t)ln(this,e._storedError),tn(this);else if("closed"===t)hn(this),nn(this);else{var r=e._storedError;ln(this,r),rn(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return _r(this)?this._closedPromise:b(Qr("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!_r(this))throw Qr("desiredSize");if(void 0===this._ownerWritableStream)throw en("desiredSize");return Er(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return _r(this)?this._readyPromise:b(Qr("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),_r(this)?void 0===this._ownerWritableStream?b(en("abort")):Fr(this,e):b(Qr("abort"))},e.prototype.close=function(){if(!_r(this))return b(Qr("close"));var e=this._ownerWritableStream;return void 0===e?b(en("close")):wr(e)?b(new TypeError("Cannot close an already-closing stream")):Tr(this)},e.prototype.releaseLock=function(){if(!_r(this))throw Qr("releaseLock");void 0!==this._ownerWritableStream&&Mr(this)},e.prototype.write=function(e){return void 0===e&&(e=void 0),_r(this)?void 0===this._ownerWritableStream?b(en("write to")):Rr(this,e):b(Qr("write"))},e}();function _r(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof Cr}function Fr(e,t){return lr(e._ownerWritableStream,t)}function Tr(e){return hr(e._ownerWritableStream)}function Or(e){var t=e._ownerWritableStream,r=t._state;return wr(t)||"closed"===r?m(void 0):"errored"===r?b(t._storedError):Tr(e)}function Pr(e,t){"pending"===e._closedPromiseState?an(e,t):sn(e,t)}function Ir(e,t){"pending"===e._readyPromiseState?un(e,t):fn(e,t)}function Er(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:Xr(t._writableStreamController)}function Mr(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Ir(e,r),Pr(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function Rr(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,a=qr(n,t);if(r!==e._ownerWritableStream)return b(en("write to"));var i=r._state;if("errored"===i)return b(r._storedError);if(wr(r)||"closed"===i)return b(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===i)return b(r._storedError);var s=ur(r);return Hr(n,t,a),s}Object.defineProperties(Cr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),u(Cr.prototype.abort,"abort"),u(Cr.prototype.close,"close"),u(Cr.prototype.releaseLock,"releaseLock"),u(Cr.prototype.write,"write"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Cr.prototype,t.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var Dr={},Nr=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"abortReason",{get:function(){if(!Lr(this))throw Zr("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"signal",{get:function(){if(!Lr(this))throw Zr("signal");if(void 0===this._abortController)throw new 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),!Lr(this))throw Zr("error");"writable"===this._controlledWritableStream._state&&Kr(this,e)},e.prototype[O]=function(e){var t=this._abortAlgorithm(e);return Ur(this),t},e.prototype[P]=function(){Xe(this)},e}();function Lr(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof Nr}function jr(e,t,r,n,a,i,s,o){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Xe(t),t._abortReason=void 0,t._abortController=rr(),t._started=!1,t._strategySizeAlgorithm=o,t._strategyHWM=s,t._writeAlgorithm=n,t._closeAlgorithm=a,t._abortAlgorithm=i;var c=Yr(t);kr(e,c),w(m(r()),(function(){return t._started=!0,Wr(t),null}),(function(r){return t._started=!0,dr(e,r),null}))}function Br(e,t,r,n){var a=Object.create(Nr.prototype);jr(e,a,void 0!==t.start?function(){return t.start(a)}:function(){},void 0!==t.write?function(e){return t.write(e,a)}:function(){return m(void 0)},void 0!==t.close?function(){return t.close()}:function(){return m(void 0)},void 0!==t.abort?function(e){return t.abort(e)}:function(){return m(void 0)},r,n)}function Ur(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function $r(e){$e(e,Dr,0),Wr(e)}function qr(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return zr(e,t),1}}function Xr(e){return e._strategyHWM-e._queueTotalSize}function Hr(e,t,r){try{$e(e,t,r)}catch(t){return void zr(e,t)}var n=e._controlledWritableStream;wr(n)||"writable"!==n._state||kr(n,Yr(e)),Wr(e)}function Wr(e){var t=e._controlledWritableStream;if(e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=qe(e);r===Dr?Gr(e):Vr(e,r)}}else pr(t)}function zr(e,t){"writable"===e._controlledWritableStream._state&&Kr(e,t)}function Gr(e){var t=e._controlledWritableStream;Sr(t),Ue(e);var r=e._closeAlgorithm();Ur(e),w(r,(function(){return br(t),null}),(function(e){return yr(t,e),null}))}function Vr(e,t){var r=e._controlledWritableStream;xr(r),w(e._writeAlgorithm(t),(function(){gr(r);var t=r._state;if(Ue(e),!wr(r)&&"writable"===t){var n=Yr(e);kr(r,n)}return Wr(e),null}),(function(t){return"writable"===r._state&&Ur(e),mr(r,t),null}))}function Yr(e){return 0>=Xr(e)}function Kr(e,t){var r=e._controlledWritableStream;Ur(e),fr(r,t)}function Jr(e){return new TypeError("WritableStream.prototype.".concat(e," can only be used on a WritableStream"))}function Zr(e){return new TypeError("WritableStreamDefaultController.prototype.".concat(e," can only be used on a WritableStreamDefaultController"))}function Qr(e){return new TypeError("WritableStreamDefaultWriter.prototype.".concat(e," can only be used on a WritableStreamDefaultWriter"))}function en(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function tn(e){e._closedPromise=g((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function rn(e,t){tn(e),an(e,t)}function nn(e){tn(e),on(e)}function an(e,t){void 0!==e._closedPromise_reject&&(A(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function sn(e,t){rn(e,t)}function on(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 cn(e){e._readyPromise=g((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function ln(e,t){cn(e),un(e,t)}function hn(e){cn(e),pn(e)}function un(e,t){void 0!==e._readyPromise_reject&&(A(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function dn(e){cn(e)}function fn(e,t){ln(e,t)}function pn(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}function gn(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==commonjsGlobal?commonjsGlobal:void 0}Object.defineProperties(Nr.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Nr.prototype,t.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var mn=gn();function bn(e){if("function"!=typeof e&&"object"!=typeof e)return!1;if("DOMException"!==e.name)return!1;try{return new e,!0}catch(e){return!1}}function yn(){var e=null==mn?void 0:mn.DOMException;return bn(e)?e:void 0}function wn(){var e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return u(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}var vn=yn()||wn();function Sn(e,t,r,n,a,i){var s=ae(e),o=ar(t);e._disturbed=!0;var l=!1,h=m(void 0);return g((function(u,d){var f;if(void 0!==i){if(f=function(){var r=void 0!==i.reason?i.reason:new vn("Aborted","AbortError"),s=[];n||s.push((function(){return"writable"===t._state?lr(t,r):m(void 0)})),a||s.push((function(){return"readable"===e._state?aa(e,r):m(void 0)})),F((function(){return Promise.all(s.map((function(e){return e()})))}),!0,r)},i.aborted)return void f();i.addEventListener("abort",f)}function p(){return g((function(e,t){function r(n){n?e():y(b(),r,t)}r(!1)}))}function b(){return l?m(!0):y(o._readyPromise,(function(){return g((function(e,t){pe(s,{_chunkSteps:function(t){h=y(Rr(o,t),void 0,c),e(!1)},_closeSteps:function(){return e(!0)},_errorSteps:t})}))}))}if(C(e,s._closedPromise,(function(e){return n?T(!0,e):F((function(){return lr(t,e)}),!0,e),null})),C(t,o._closedPromise,(function(t){return a?T(!0,t):F((function(){return aa(e,t)}),!0,t),null})),_(e,s._closedPromise,(function(){return r?T():F((function(){return Or(o)})),null})),wr(t)||"closed"===t._state){var x=new TypeError("the destination writable stream closed before all data could be piped to it");a?T(!0,x):F((function(){return aa(e,x)}),!0,x)}function k(){var e=h;return y(h,(function(){return e!==h?k():void 0}))}function C(e,t,r){"errored"===e._state?r(e._storedError):S(t,r)}function _(e,t,r){"closed"===e._state?r():v(t,r)}function F(e,r,n){function a(){return w(e(),(function(){return O(r,n)}),(function(e){return O(!0,e)})),null}l||(l=!0,"writable"!==t._state||wr(t)?a():v(k(),a))}function T(e,r){l||(l=!0,"writable"!==t._state||wr(t)?O(e,r):v(k(),(function(){return O(e,r)})))}function O(e,t){return Mr(o),N(s),void 0!==i&&i.removeEventListener("abort",f),e?d(t):u(void 0),null}A(p())}))}var xn=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!An(this))throw Dn("desiredSize");return Pn(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!An(this))throw Dn("close");if(!En(this))throw new TypeError("The stream is not in a state that permits close");Fn(this)},e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!An(this))throw Dn("enqueue");if(!En(this))throw new TypeError("The stream is not in a state that permits enqueue");return Tn(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!An(this))throw Dn("error");On(this,e)},e.prototype[I]=function(e){Xe(this);var t=this._cancelAlgorithm(e);return _n(this),t},e.prototype[E]=function(e){var t=this._controlledReadableStream;if(this._queue.length>0){var r=Ue(this);this._closeRequested&&0===this._queue.length?(_n(this),ia(t)):kn(this),e._chunkSteps(r)}else ie(t,e),kn(this)},e.prototype[M]=function(){},e}();function An(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof xn}function kn(e){Cn(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,w(e._pullAlgorithm(),(function(){return e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,kn(e)),null}),(function(t){return On(e,t),null}))))}function Cn(e){var t=e._controlledReadableStream;return!!(En(e)&&e._started&&(na(t)&&oe(t)>0||Pn(e)>0))}function _n(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Fn(e){if(En(e)){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(_n(e),ia(t))}}function Tn(e,t){if(En(e)){var r=e._controlledReadableStream;if(na(r)&&oe(r)>0)se(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw On(e,t),t}try{$e(e,t,n)}catch(t){throw On(e,t),t}}kn(e)}}function On(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(Xe(e),_n(e),sa(r,t))}function Pn(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function In(e){return!Cn(e)}function En(e){return!e._closeRequested&&"readable"===e._controlledReadableStream._state}function Mn(e,t,r,n,a,i,s){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Xe(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=s,t._strategyHWM=i,t._pullAlgorithm=n,t._cancelAlgorithm=a,e._readableStreamController=t,w(m(r()),(function(){return t._started=!0,kn(t),null}),(function(e){return On(t,e),null}))}function Rn(e,t,r,n){var a=Object.create(xn.prototype);Mn(e,a,void 0!==t.start?function(){return t.start(a)}:function(){},void 0!==t.pull?function(){return t.pull(a)}:function(){return m(void 0)},void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return m(void 0)},r,n)}function Dn(e){return new TypeError("ReadableStreamDefaultController.prototype.".concat(e," can only be used on a ReadableStreamDefaultController"))}function Nn(e,t){return Ye(e._readableStreamController)?jn(e):Ln(e)}function Ln(e,t){var r,n,a,i,s,o=ae(e),c=!1,l=!1,h=!1,u=!1,d=g((function(e){s=e}));function f(){return c?(l=!0,m(void 0)):(c=!0,pe(o,{_chunkSteps:function(e){k((function(){l=!1;var t=e;h||Tn(a._readableStreamController,e),u||Tn(i._readableStreamController,t),c=!1,l&&f()}))},_closeSteps:function(){c=!1,h||Fn(a._readableStreamController),u||Fn(i._readableStreamController),h&&u||s(void 0)},_errorSteps:function(){c=!1}}),m(void 0))}function p(t){if(h=!0,r=t,u){var a=ye([r,n]),i=aa(e,a);s(i)}return d}function b(t){if(u=!0,n=t,h){var a=ye([r,n]),i=aa(e,a);s(i)}return d}function y(){}return a=Qn(y,f,p),i=Qn(y,f,b),S(o._closedPromise,(function(e){return On(a._readableStreamController,e),On(i._readableStreamController,e),h&&u||s(void 0),null})),[a,i]}function jn(e){var t,r,n,a,i,s=ae(e),o=!1,c=!1,l=!1,h=!1,u=!1,d=g((function(e){i=e}));function f(e){S(e._closedPromise,(function(t){return e!==s||(wt(n._readableStreamController,t),wt(a._readableStreamController,t),h&&u||i(void 0)),null}))}function p(){Bt(s)&&(N(s),f(s=ae(e))),pe(s,{_chunkSteps:function(t){k((function(){c=!1,l=!1;var r=t,s=t;if(!h&&!u)try{s=Be(t)}catch(t){return wt(n._readableStreamController,t),wt(a._readableStreamController,t),void i(aa(e,t))}h||yt(n._readableStreamController,r),u||yt(a._readableStreamController,s),o=!1,c?y():l&&w()}))},_closeSteps:function(){o=!1,h||bt(n._readableStreamController),u||bt(a._readableStreamController),n._readableStreamController._pendingPullIntos.length>0&&At(n._readableStreamController,0),a._readableStreamController._pendingPullIntos.length>0&&At(a._readableStreamController,0),h&&u||i(void 0)},_errorSteps:function(){o=!1}})}function b(t,r){fe(s)&&(N(s),f(s=Mt(e)));var d=r?a:n,p=r?n:a;Ut(s,t,1,{_chunkSteps:function(t){k((function(){c=!1,l=!1;var n=r?u:h;if(r?h:u)n||kt(d._readableStreamController,t);else{var a=void 0;try{a=Be(t)}catch(t){return wt(d._readableStreamController,t),wt(p._readableStreamController,t),void i(aa(e,t))}n||kt(d._readableStreamController,t),yt(p._readableStreamController,a)}o=!1,c?y():l&&w()}))},_closeSteps:function(e){o=!1;var t=r?u:h,n=r?h:u;t||bt(d._readableStreamController),n||bt(p._readableStreamController),void 0!==e&&(t||kt(d._readableStreamController,e),!n&&p._readableStreamController._pendingPullIntos.length>0&&At(p._readableStreamController,0)),t&&n||i(void 0)},_errorSteps:function(){o=!1}})}function y(){if(o)return c=!0,m(void 0);o=!0;var e=St(n._readableStreamController);return null===e?p():b(e._view,!1),m(void 0)}function w(){if(o)return l=!0,m(void 0);o=!0;var e=St(a._readableStreamController);return null===e?p():b(e._view,!0),m(void 0)}function v(n){if(h=!0,t=n,u){var a=ye([t,r]),s=aa(e,a);i(s)}return d}function x(n){if(u=!0,r=n,h){var a=ye([t,r]),s=aa(e,a);i(s)}return d}function A(){}return n=ea(A,y,v),a=ea(A,w,x),f(s),[n,a]}function Bn(e){return l(e)&&void 0!==e.getReader}function Un(e){return Bn(e)?qn(e.getReader()):$n(e)}function $n(e){var t,r=Fe(e,"async");function n(){var e;try{e=Te(r)}catch(e){return b(e)}return x(m(e),(function(e){if(!l(e))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(Oe(e))Fn(t._readableStreamController);else{var r=Pe(e);Tn(t._readableStreamController,r)}}))}function a(e){var t,n,a=r.iterator;try{t=Ae(a,"return")}catch(e){return b(e)}if(void 0===t)return m(void 0);try{n=C(t,a,[e])}catch(e){return b(e)}return x(m(n),(function(e){if(!l(e))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")}))}return t=Qn(c,n,a,0)}function qn(e){var t;function r(){var r;try{r=e.read()}catch(e){return b(e)}return x(r,(function(e){if(!l(e))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");e.done?Fn(t._readableStreamController):Tn(t._readableStreamController,e.value)}))}function n(t){try{return m(e.cancel(t))}catch(e){return b(e)}}return t=Qn(c,r,n,0)}function Xn(e,t){G(e,t);var r=e,n=null==r?void 0:r.autoAllocateChunkSize,a=null==r?void 0:r.cancel,i=null==r?void 0:r.pull,s=null==r?void 0:r.start,o=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:re(n,"".concat(t," has member 'autoAllocateChunkSize' that")),cancel:void 0===a?void 0:Hn(a,r,"".concat(t," has member 'cancel' that")),pull:void 0===i?void 0:Wn(i,r,"".concat(t," has member 'pull' that")),start:void 0===s?void 0:zn(s,r,"".concat(t," has member 'start' that")),type:void 0===o?void 0:Gn(o,"".concat(t," has member 'type' that"))}}function Hn(e,t,r){return V(e,r),function(r){return _(e,t,[r])}}function Wn(e,t,r){return V(e,r),function(r){return _(e,t,[r])}}function zn(e,t,r){return V(e,r),function(r){return C(e,t,[r])}}function Gn(e,t){if("bytes"!==(e="".concat(e)))throw new TypeError("".concat(t," '").concat(e,"' is not a valid enumeration value for ReadableStreamType"));return e}function Vn(e,t){return G(e,t),{preventCancel:!!(null==e?void 0:e.preventCancel)}}function Yn(e,t){G(e,t);var r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,a=null==e?void 0:e.preventClose,i=null==e?void 0:e.signal;return void 0!==i&&Kn(i,"".concat(t," has member 'signal' that")),{preventAbort:!!r,preventCancel:!!n,preventClose:!!a,signal:i}}function Kn(e,t){if(!er(e))throw new TypeError("".concat(t," is not an AbortSignal."))}function Jn(e,t){G(e,t);var r=null==e?void 0:e.readable;Z(r,"readable","ReadableWritablePair"),ne(r,"".concat(t," has member 'readable' that"));var n=null==e?void 0:e.writable;return Z(n,"writable","ReadableWritablePair"),Qt(n,"".concat(t," has member 'writable' that")),{readable:r,writable:n}}Object.defineProperties(xn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),u(xn.prototype.close,"close"),u(xn.prototype.enqueue,"enqueue"),u(xn.prototype.error,"error"),"symbol"==typeof t.toStringTag&&Object.defineProperty(xn.prototype,t.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var Zn=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:K(e,"First parameter");var r=zt(t,"Second parameter"),n=Xn(e,"First parameter");if(ta(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");_t(this,n,Ht(r,0))}else{var a=Wt(r);Rn(this,n,Ht(r,1),a)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!ra(this))throw oa("locked");return na(this)},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),ra(this)?na(this)?b(new TypeError("Cannot cancel a stream that already has a reader")):aa(this,e):b(oa("cancel"))},e.prototype.getReader=function(e){if(void 0===e&&(e=void 0),!ra(this))throw oa("getReader");return void 0===Pt(e,"First parameter").mode?ae(this):Mt(this)},e.prototype.pipeThrough=function(e,t){if(void 0===t&&(t={}),!ra(this))throw oa("pipeThrough");J(e,1,"pipeThrough");var r=Jn(e,"First parameter"),n=Yn(t,"Second parameter");if(na(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(cr(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return A(Sn(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable},e.prototype.pipeTo=function(e,t){if(void 0===t&&(t={}),!ra(this))return b(oa("pipeTo"));if(void 0===e)return b("Parameter 1 is required in 'pipeTo'.");if(!or(e))return b(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var r;try{r=Yn(t,"Second parameter")}catch(e){return b(e)}return na(this)?b(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):cr(e)?b(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Sn(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)},e.prototype.tee=function(){if(!ra(this))throw oa("tee");return ye(Nn(this))},e.prototype.values=function(e){if(void 0===e&&(e=void 0),!ra(this))throw oa("values");return Re(this,Vn(e,"First parameter").preventCancel)},e.prototype[_e]=function(e){return this.values(e)},e.from=function(e){return Un(e)},e}();function Qn(e,t,r,n,a){void 0===n&&(n=1),void 0===a&&(a=function(){return 1});var i=Object.create(Zn.prototype);return ta(i),Mn(i,Object.create(xn.prototype),e,t,r,n,a),i}function ea(e,t,r){var n=Object.create(Zn.prototype);return ta(n),Ct(n,Object.create(Ve.prototype),e,t,r,0,void 0),n}function ta(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function ra(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof Zn}function na(e){return void 0!==e._reader}function aa(e,t){if(e._disturbed=!0,"closed"===e._state)return m(void 0);if("errored"===e._state)return b(e._storedError);ia(e);var r=e._reader;if(void 0!==r&&Bt(r)){var n=r._readIntoRequests;r._readIntoRequests=new T,n.forEach((function(e){e._closeSteps(void 0)}))}return x(e._readableStreamController[I](t),c)}function ia(e){e._state="closed";var t=e._reader;if(void 0!==t&&(X(t),fe(t))){var r=t._readRequests;t._readRequests=new T,r.forEach((function(e){e._closeSteps()}))}}function sa(e,t){e._state="errored",e._storedError=t;var r=e._reader;void 0!==r&&($(r,t),fe(r)?me(r,t):qt(r,t))}function oa(e){return new TypeError("ReadableStream.prototype.".concat(e," can only be used on a ReadableStream"))}function ca(e,t){G(e,t);var r=null==e?void 0:e.highWaterMark;return Z(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Q(r)}}Object.defineProperties(Zn,{from:{enumerable:!0}}),Object.defineProperties(Zn.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),u(Zn.from,"from"),u(Zn.prototype.cancel,"cancel"),u(Zn.prototype.getReader,"getReader"),u(Zn.prototype.pipeThrough,"pipeThrough"),u(Zn.prototype.pipeTo,"pipeTo"),u(Zn.prototype.tee,"tee"),u(Zn.prototype.values,"values"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Zn.prototype,t.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Zn.prototype,_e,{value:Zn.prototype.values,writable:!0,configurable:!0});var la=function(e){return e.byteLength};u(la,"size");var ha=function(){function e(e){J(e,1,"ByteLengthQueuingStrategy"),e=ca(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!da(this))throw ua("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!da(this))throw ua("size");return la},enumerable:!1,configurable:!0}),e}();function ua(e){return new TypeError("ByteLengthQueuingStrategy.prototype.".concat(e," can only be used on a ByteLengthQueuingStrategy"))}function da(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")&&e instanceof ha}Object.defineProperties(ha.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(ha.prototype,t.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var fa=function(){return 1};u(fa,"size");var pa=function(){function e(e){J(e,1,"CountQueuingStrategy"),e=ca(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!ma(this))throw ga("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!ma(this))throw ga("size");return fa},enumerable:!1,configurable:!0}),e}();function ga(e){return new TypeError("CountQueuingStrategy.prototype.".concat(e," can only be used on a CountQueuingStrategy"))}function ma(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")&&e instanceof pa}function ba(e,t){G(e,t);var r=null==e?void 0:e.cancel,n=null==e?void 0:e.flush,a=null==e?void 0:e.readableType,i=null==e?void 0:e.start,s=null==e?void 0:e.transform,o=null==e?void 0:e.writableType;return{cancel:void 0===r?void 0:Sa(r,e,"".concat(t," has member 'cancel' that")),flush:void 0===n?void 0:ya(n,e,"".concat(t," has member 'flush' that")),readableType:a,start:void 0===i?void 0:wa(i,e,"".concat(t," has member 'start' that")),transform:void 0===s?void 0:va(s,e,"".concat(t," has member 'transform' that")),writableType:o}}function ya(e,t,r){return V(e,r),function(r){return _(e,t,[r])}}function wa(e,t,r){return V(e,r),function(r){return C(e,t,[r])}}function va(e,t,r){return V(e,r),function(r,n){return _(e,t,[r,n])}}function Sa(e,t,r){return V(e,r),function(r){return _(e,t,[r])}}Object.defineProperties(pa.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(pa.prototype,t.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var xa=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=zt(t,"Second parameter"),a=zt(r,"Third parameter"),i=ba(e,"First parameter");if(void 0!==i.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==i.writableType)throw new RangeError("Invalid writableType specified");var s,o=Ht(a,0),c=Wt(a),l=Ht(n,1),h=Wt(n);Aa(this,g((function(e){s=e})),l,h,o,c),Ea(this,i),s(void 0!==i.start?i.start(this._transformStreamController):void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!ka(this))throw za("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!ka(this))throw za("writable");return this._writable},enumerable:!1,configurable:!0}),e}();function Aa(e,t,r,n,a,i){function s(){return t}function o(t){return ja(e,t)}function c(t){return Ba(e,t)}function l(){return Ua(e)}function h(){return $a(e)}function u(t){return qa(e,t)}e._writable=ir(s,o,l,c,r,n),e._readable=Qn(s,h,u,a,i),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Ta(e,!0),e._transformStreamController=void 0}function ka(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")&&e instanceof xa}function Ca(e,t){On(e._readable._readableStreamController,t),_a(e,t)}function _a(e,t){Ma(e._transformStreamController),zr(e._writable._writableStreamController,t),Fa(e)}function Fa(e){e._backpressure&&Ta(e,!1)}function Ta(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=g((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(xa.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(xa.prototype,t.toStringTag,{value:"TransformStream",configurable:!0});var Oa=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Pa(this))throw Xa("desiredSize");return Pn(this._controlledTransformStream._readable._readableStreamController)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!Pa(this))throw Xa("enqueue");Ra(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Pa(this))throw Xa("error");Da(this,e)},e.prototype.terminate=function(){if(!Pa(this))throw Xa("terminate");La(this)},e}();function Pa(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof Oa}function Ia(e,t,r,n,a){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n,t._cancelAlgorithm=a,t._finishPromise=void 0,t._finishPromise_resolve=void 0,t._finishPromise_reject=void 0}function Ea(e,t){var r=Object.create(Oa.prototype);Ia(e,r,void 0!==t.transform?function(e){return t.transform(e,r)}:function(e){try{return Ra(r,e),m(void 0)}catch(e){return b(e)}},void 0!==t.flush?function(){return t.flush(r)}:function(){return m(void 0)},void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return m(void 0)})}function Ma(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function Ra(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!En(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Tn(n,t)}catch(e){throw _a(r,e),r._readable._storedError}In(n)!==r._backpressure&&Ta(r,!0)}function Da(e,t){Ca(e._controlledTransformStream,t)}function Na(e,t){return x(e._transformAlgorithm(t),void 0,(function(t){throw Ca(e._controlledTransformStream,t),t}))}function La(e){var t=e._controlledTransformStream;Fn(t._readable._readableStreamController),_a(t,new TypeError("TransformStream terminated"))}function ja(e,t){var r=e._transformStreamController;return e._backpressure?x(e._backpressureChangePromise,(function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return Na(r,t)})):Na(r,t)}function Ba(e,t){var r=e._transformStreamController;if(void 0!==r._finishPromise)return r._finishPromise;var n=e._readable;r._finishPromise=g((function(e,t){r._finishPromise_resolve=e,r._finishPromise_reject=t}));var a=r._cancelAlgorithm(t);return Ma(r),w(a,(function(){return"errored"===n._state?Wa(r,n._storedError):(On(n._readableStreamController,t),Ha(r)),null}),(function(e){return On(n._readableStreamController,e),Wa(r,e),null})),r._finishPromise}function Ua(e){var t=e._transformStreamController;if(void 0!==t._finishPromise)return t._finishPromise;var r=e._readable;t._finishPromise=g((function(e,r){t._finishPromise_resolve=e,t._finishPromise_reject=r}));var n=t._flushAlgorithm();return Ma(t),w(n,(function(){return"errored"===r._state?Wa(t,r._storedError):(Fn(r._readableStreamController),Ha(t)),null}),(function(e){return On(r._readableStreamController,e),Wa(t,e),null})),t._finishPromise}function $a(e){return Ta(e,!1),e._backpressureChangePromise}function qa(e,t){var r=e._transformStreamController;if(void 0!==r._finishPromise)return r._finishPromise;var n=e._writable;r._finishPromise=g((function(e,t){r._finishPromise_resolve=e,r._finishPromise_reject=t}));var a=r._cancelAlgorithm(t);return Ma(r),w(a,(function(){return"errored"===n._state?Wa(r,n._storedError):(zr(n._writableStreamController,t),Fa(e),Ha(r)),null}),(function(t){return zr(n._writableStreamController,t),Fa(e),Wa(r,t),null})),r._finishPromise}function Xa(e){return new TypeError("TransformStreamDefaultController.prototype.".concat(e," can only be used on a TransformStreamDefaultController"))}function Ha(e){void 0!==e._finishPromise_resolve&&(e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function Wa(e,t){void 0!==e._finishPromise_reject&&(A(e._finishPromise),e._finishPromise_reject(t),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function za(e){return new TypeError("TransformStream.prototype.".concat(e," can only be used on a TransformStream"))}Object.defineProperties(Oa.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),u(Oa.prototype.enqueue,"enqueue"),u(Oa.prototype.error,"error"),u(Oa.prototype.terminate,"terminate"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Oa.prototype,t.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),e.ByteLengthQueuingStrategy=ha,e.CountQueuingStrategy=pa,e.ReadableByteStreamController=Ve,e.ReadableStream=Zn,e.ReadableStreamBYOBReader=jt,e.ReadableStreamBYOBRequest=Ge,e.ReadableStreamDefaultController=xn,e.ReadableStreamDefaultReader=de,e.TransformStream=xa,e.TransformStreamDefaultController=Oa,e.WritableStream=nr,e.WritableStreamDefaultController=Nr,e.WritableStreamDefaultWriter=Cr}(ponyfill.exports)),ponyfill.exports}var _nodeResolve_empty={},_nodeResolve_empty$1=Object.freeze({__proto__:null,default:_nodeResolve_empty}),require$$7=getAugmentedNamespace(_nodeResolve_empty$1);
22
- /**
23
- * @licstart The following is the entire license notice for the
24
- * JavaScript code in this page
25
- *
26
- * Copyright 2022 Mozilla Foundation
27
- *
28
- * Licensed under the Apache License, Version 2.0 (the "License");
29
- * you may not use this file except in compliance with the License.
30
- * You may obtain a copy of the License at
31
- *
32
- * http://www.apache.org/licenses/LICENSE-2.0
33
- *
34
- * Unless required by applicable law or agreed to in writing, software
35
- * distributed under the License is distributed on an "AS IS" BASIS,
36
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37
- * See the License for the specific language governing permissions and
38
- * limitations under the License.
39
- *
40
- * @licend The above is the entire license notice for the
41
- * JavaScript code in this page
42
- */
43
- (function(module,exports){var factory;globalThis,factory=()=>(()=>{var __webpack_modules__=[,(e,t,r)=>{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.LINE_FACTOR=t.LINE_DESCENT_FACTOR=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FontType=t.FeatureTest=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.AnnotationEditorType=t.AnnotationEditorPrefix=t.AnnotationEditorParamsType=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.arrayByteLength=h,t.arraysToBytes=function(e){const t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];let r=0;for(let n=0;t>n;n++)r+=h(e[n]);let n=0;const a=new Uint8Array(r);for(let r=0;t>r;r++){let t=e[r];t instanceof Uint8Array||(t="string"==typeof t?l(t):new Uint8Array(t));const i=t.byteLength;a.set(t,n),n+=i}return a},t.assert=function(e,t){e||s(t)},t.bytesToString=function(e){"object"==typeof e&&null!==e&&void 0!==e.length||s("Invalid argument for bytesToString");const t=e.length,r=8192;if(r>t)return String.fromCharCode.apply(null,e);const n=[];for(let a=0;t>a;a+=r){const i=e.subarray(a,Math.min(a+r,t));n.push(String.fromCharCode.apply(null,i))}return n.join("")},t.createPromiseCapability=function(){const e=Object.create(null);let t=!1;return Object.defineProperty(e,"settled",{get:()=>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},t.createValidAbsoluteUrl=function(e){let 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.")){const t=e.match(/\./g);t&&t.length>=2&&(e="http://"+e)}if(r.tryConvertEncoding)try{e=p(e)}catch(e){}}const n=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(n))return n}catch(e){}return null},t.escapeString=function(e){return e.replace(/([()\\\n\r])/g,(e=>"\n"===e?"\\n":"\r"===e?"\\r":"\\"+e))},t.getModificationDate=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return""+e.getUTCFullYear()+(""+(e.getUTCMonth()+1)).padStart(2,"0")+(""+e.getUTCDate()).padStart(2,"0")+(""+e.getUTCHours()).padStart(2,"0")+(""+e.getUTCMinutes()).padStart(2,"0")+(""+e.getUTCSeconds()).padStart(2,"0")},t.getVerbosityLevel=function(){return a},t.info=function(e){n.INFOS>a||console.log("Info: "+e)},t.isArrayBuffer=function(e){return"object"==typeof e&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(let r=0,n=e.length;n>r;r++)if(e[r]!==t[r])return!1;return!0},t.isAscii=function(e){return/^[\x00-\x7F]*$/.test(e)},t.objectFromMap=function(e){const t=Object.create(null);for(const[r,n]of e)t[r]=n;return t},t.objectSize=function(e){return Object.keys(e).length},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(a=e)},t.shadow=o,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=l,t.stringToPDFString=function(e){if(e[0]>="ï"){let t;if("þ"===e[0]&&"ÿ"===e[1]?t="utf-16be":"ÿ"===e[0]&&"þ"===e[1]?t="utf-16le":"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t)try{const r=new TextDecoder(t,{fatal:!0}),n=l(e);return r.decode(n)}catch(e){i(`stringToPDFString: "${e}".`)}}const t=[];for(let r=0,n=e.length;n>r;r++){const n=f[e.charCodeAt(r)];t.push(n?String.fromCharCode(n):e.charAt(r))}return t.join("")},t.stringToUTF16BEString=function(e){const t=["þÿ"];for(let r=0,n=e.length;n>r;r++){const n=e.charCodeAt(r);t.push(String.fromCharCode(n>>8&255),String.fromCharCode(255&n))}return t.join("")},t.stringToUTF8String=p,t.unreachable=s,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=i,r(2),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.LINE_FACTOR=1.35,t.LINE_DESCENT_FACTOR=.35,t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},t.AnnotationEditorPrefix="pdfjs_internal_editor_",t.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,INK:15},t.AnnotationEditorParamsType={FREETEXT_SIZE:1,FREETEXT_COLOR:2,FREETEXT_OPACITY:3,INK_COLOR:11,INK_THICKNESS:12,INK_OPACITY:13},t.PermissionFlag={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.TextRenderingMode={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.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={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.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={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.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationActionEventType={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.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"},t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};const n={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=n,t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},t.OPS={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.UNSUPPORTED_FEATURES={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.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let a=n.WARNINGS;function i(e){n.WARNINGS>a||console.log("Warning: "+e)}function s(e){throw Error(e)}function o(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}const c=function(){function e(t,r){this.constructor===e&&s("Cannot initialize BaseException."),this.message=t,this.name=r}return e.prototype=Error(),e.constructor=e,e}();function l(e){"string"!=typeof e&&s("Invalid argument for stringToBytes");const t=e.length,r=new Uint8Array(t);for(let n=0;t>n;++n)r[n]=255&e.charCodeAt(n);return r}function h(e){return void 0!==e.length?e.length:void 0!==e.byteLength?e.byteLength:void s("Invalid argument for arrayByteLength")}t.BaseException=c,t.PasswordException=class extends c{constructor(e,t){super(e,"PasswordException"),this.code=t}},t.UnknownErrorException=class extends c{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}},t.InvalidPDFException=class extends c{constructor(e){super(e,"InvalidPDFException")}},t.MissingPDFException=class extends c{constructor(e){super(e,"MissingPDFException")}},t.UnexpectedResponseException=class extends c{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}},t.FormatError=class extends c{constructor(e){super(e,"FormatError")}},t.AbortException=class extends c{constructor(e){super(e,"AbortException")}},t.FeatureTest=class{static get isLittleEndian(){return o(this,"isLittleEndian",function(){const e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return o(this,"isEvalSupported",function(){try{return Function(""),!0}catch(e){return!1}}())}static get isOffscreenCanvasSupported(){return o(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}};const u=[...Array(256).keys()].map((e=>e.toString(16).padStart(2,"0")));class d{static makeHexColor(e,t,r){return`#${u[e]}${u[t]}${u[r]}`}static scaleMinMax(e,t){let r;e[0]?(0>e[0]&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[0],t[1]*=e[0],0>e[3]&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[3],t[3]*=e[3]):(r=t[0],t[0]=t[2],t[2]=r,r=t[1],t[1]=t[3],t[3]=r,0>e[1]&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[1],t[3]*=e[1],0>e[2]&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[2],t[1]*=e[2]),t[0]+=e[4],t[1]+=e[4],t[2]+=e[5],t[3]+=e[5]}static transform(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]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const 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]}static getAxialAlignedBoundingBox(e,t){const r=d.applyTransform(e,t),n=d.applyTransform(e.slice(2,4),t),a=d.applyTransform([e[0],e[3]],t),i=d.applyTransform([e[2],e[1]],t);return[Math.min(r[0],n[0],a[0],i[0]),Math.min(r[1],n[1],a[1],i[1]),Math.max(r[0],n[0],a[0],i[0]),Math.max(r[1],n[1],a[1],i[1])]}static inverseTransform(e){const 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]}static apply3dTransform(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]]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[2]*t[1]+e[3]*t[3],a=(r+n)/2,i=Math.sqrt((r+n)**2-4*(r*n-(e[2]*t[0]+e[3]*t[2])*(e[0]*t[1]+e[1]*t[3])))/2,s=a-i||1;return[Math.sqrt(a+i||1),Math.sqrt(s)]}static normalizeRect(e){const 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}static intersect(e,t){const r=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),n=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(r>n)return null;const a=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),i=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return a>i?null:[r,a,n,i]}static bezierBoundingBox(e,t,r,n,a,i,s,o){const c=[],l=[[],[]];let h,u,d,f,p,g,m,b;for(let l=0;2>l;++l)if(0===l?(u=6*e-12*r+6*a,h=-3*e+9*r-9*a+3*s,d=3*r-3*e):(u=6*t-12*n+6*i,h=-3*t+9*n-9*i+3*o,d=3*n-3*t),1e-12>Math.abs(h)){if(1e-12>Math.abs(u))continue;f=-d/u,f>0&&1>f&&c.push(f)}else m=u*u-4*d*h,b=Math.sqrt(m),0>m||(p=(-u+b)/(2*h),p>0&&1>p&&c.push(p),g=(-u-b)/(2*h),g>0&&1>g&&c.push(g));let y,w=c.length;const v=w;for(;w--;)f=c[w],y=1-f,l[0][w]=y*y*y*e+3*y*y*f*r+3*y*f*f*a+f*f*f*s,l[1][w]=y*y*y*t+3*y*y*f*n+3*y*f*f*i+f*f*f*o;return l[0][v]=e,l[1][v]=t,l[0][v+1]=s,l[1][v+1]=o,l[0].length=l[1].length=v+2,[Math.min(...l[0]),Math.min(...l[1]),Math.max(...l[0]),Math.max(...l[1])]}}t.Util=d;const f=[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 p(e){return decodeURIComponent(escape(e))}},(e,t,r)=>{var n=r(3);globalThis._pdfjsCompatibilityChecked||(globalThis._pdfjsCompatibilityChecked=!0,!globalThis.btoa&&n.isNodeJS&&(globalThis.btoa=function(e){return Buffer.from(e,"binary").toString("base64")}),!globalThis.atob&&n.isNodeJS&&(globalThis.atob=function(e){return Buffer.from(e,"base64").toString("binary")}),!globalThis.DOMMatrix&&n.isNodeJS&&(globalThis.DOMMatrix=requireDommatrix()),!globalThis.ReadableStream&&n.isNodeJS&&(globalThis.ReadableStream=requirePonyfill().ReadableStream),Array.prototype.at||r(4),Uint8Array.prototype.at||r(76),globalThis.structuredClone||r(86))},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;const r=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=r},(e,t,r)=>{r(5);var n=r(75);e.exports=n("Array","at")},(e,t,r)=>{var n=r(6),a=r(41),i=r(65),s=r(63),o=r(70);n({target:"Array",proto:!0},{at:function(e){var t=a(this),r=i(t),n=s(e),o=0>n?r+n:n;return 0>o||o>=r?void 0:t[o]}}),o("at")},(e,t,r)=>{var n=r(7),a=r(8).f,i=r(45),s=r(49),o=r(39),c=r(57),l=r(69);e.exports=function(e,t){var r,h,u,d,f,p=e.target,g=e.global,m=e.stat;if(r=g?n:m?n[p]||o(p,{}):(n[p]||{}).prototype)for(h in t){if(d=t[h],u=e.dontCallGetSet?(f=a(r,h))&&f.value:r[h],!l(g?h:p+(m?".":"#")+h,e.forced)&&void 0!==u){if(typeof d==typeof u)continue;c(d,u)}(e.sham||u&&u.sham)&&i(d,"sham",!0),s(r,h,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 commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")()},(e,t,r)=>{var n=r(9),a=r(11),i=r(13),s=r(14),o=r(15),c=r(20),l=r(40),h=r(43),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(e,t){if(e=o(e),t=c(t),h)try{return u(e,t)}catch(e){}if(l(e,t))return s(!a(i.f,e,t),e[t])}},(e,t,r)=>{var n=r(10);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,t,r)=>{var n=r(12),a=Function.prototype.call;e.exports=n?a.bind(a):function(){return a.apply(a,arguments)}},(e,t,r)=>{var n=r(10);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},(e,t)=>{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(16),a=r(19);e.exports=function(e){return n(a(e))}},(e,t,r)=>{var n=r(17),a=r(10),i=r(18),s=Object,o=n("".split);e.exports=a((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o(e,""):s(e)}:s},(e,t,r)=>{var n=r(12),a=Function.prototype,i=a.call,s=n&&a.bind.bind(i,i);e.exports=n?function(e){return e&&s(e)}:function(e){return e&&function(){return i.apply(e,arguments)}}},(e,t,r)=>{var n=r(17),a=n({}.toString),i=n("".slice);e.exports=function(e){return i(a(e),8,-1)}},e=>{var t=TypeError;e.exports=function(e){if(null==e)throw t("Can't call method on "+e);return e}},(e,t,r)=>{var n=r(21),a=r(24);e.exports=function(e){var t=n(e,"string");return a(t)?t:t+""}},(e,t,r)=>{var n=r(11),a=r(22),i=r(24),s=r(31),o=r(34),c=r(35),l=TypeError,h=c("toPrimitive");e.exports=function(e,t){if(!a(e)||i(e))return e;var r,c=s(e,h);if(c){if(void 0===t&&(t="default"),r=n(c,e,t),!a(r)||i(r))return r;throw l("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},(e,t,r)=>{var n=r(23);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(25),a=r(23),i=r(26),s=r(27),o=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return a(t)&&i(t.prototype,o(e))}},(e,t,r)=>{var n=r(7),a=r(23);e.exports=function(e,t){return 2>arguments.length?a(r=n[e])?r:void 0:n[e]&&n[e][t];var r}},(e,t,r)=>{var n=r(17);e.exports=n({}.isPrototypeOf)},(e,t,r)=>{var n=r(28);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,r)=>{var n=r(29),a=r(10);e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol();return!(e+"")||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&41>n}))},(e,t,r)=>{var n,a,i=r(7),s=r(30),o=i.process,c=i.Deno,l=o&&o.versions||c&&c.version,h=l&&l.v8;h&&(a=(n=h.split("."))[0]>0&&4>n[0]?1:+(n[0]+n[1])),!a&&s&&((n=s.match(/Edge\/(\d+)/))&&74>n[1]||(n=s.match(/Chrome\/(\d+)/))&&(a=+n[1])),e.exports=a},(e,t,r)=>{var n=r(25);e.exports=n("navigator","userAgent")||""},(e,t,r)=>{var n=r(32);e.exports=function(e,t){var r=e[t];return null==r?void 0:n(r)}},(e,t,r)=>{var n=r(23),a=r(33),i=TypeError;e.exports=function(e){if(n(e))return e;throw i(a(e)+" is not a function")}},e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},(e,t,r)=>{var n=r(11),a=r(23),i=r(22),s=TypeError;e.exports=function(e,t){var r,o;if("string"===t&&a(r=e.toString)&&!i(o=n(r,e)))return o;if(a(r=e.valueOf)&&!i(o=n(r,e)))return o;if("string"!==t&&a(r=e.toString)&&!i(o=n(r,e)))return o;throw s("Can't convert object to primitive value")}},(e,t,r)=>{var n=r(7),a=r(36),i=r(40),s=r(42),o=r(28),c=r(27),l=a("wks"),h=n.Symbol,u=h&&h.for,d=c?h:h&&h.withoutSetter||s;e.exports=function(e){if(!i(l,e)||!o&&"string"!=typeof l[e]){var t="Symbol."+e;l[e]=o&&i(h,e)?h[e]:c&&u?u(t):d(t)}return l[e]}},(e,t,r)=>{var n=r(37),a=r(38);(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"})},e=>{e.exports=!1},(e,t,r)=>{var n=r(7),a=r(39),i="__core-js_shared__",s=n[i]||a(i,{});e.exports=s},(e,t,r)=>{var n=r(7),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(17),a=r(41),i=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(a(e),t)}},(e,t,r)=>{var n=r(19),a=Object;e.exports=function(e){return a(n(e))}},(e,t,r)=>{var n=r(17),a=0,i=Math.random(),s=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++a+i,36)}},(e,t,r)=>{var n=r(9),a=r(10),i=r(44);e.exports=!n&&!a((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},(e,t,r)=>{var n=r(7),a=r(22),i=n.document,s=a(i)&&a(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},(e,t,r)=>{var n=r(9),a=r(46),i=r(14);e.exports=n?function(e,t,r){return a.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},(e,t,r)=>{var n=r(9),a=r(43),i=r(47),s=r(48),o=r(20),c=TypeError,l=Object.defineProperty,h=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",f="writable";t.f=n?i?function(e,t,r){if(s(e),t=o(t),s(r),"function"==typeof e&&"prototype"===t&&"value"in r&&f in r&&!r[f]){var n=h(e,t);n&&n[f]&&(e[t]=r.value,r={configurable:d in r?r[d]:n[d],enumerable:u in r?r[u]:n[u],writable:!1})}return l(e,t,r)}:l:function(e,t,r){if(s(e),t=o(t),s(r),a)try{return l(e,t,r)}catch(e){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},(e,t,r)=>{var n=r(9),a=r(10);e.exports=n&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(e,t,r)=>{var n=r(22),a=String,i=TypeError;e.exports=function(e){if(n(e))return e;throw i(a(e)+" is not an object")}},(e,t,r)=>{var n=r(23),a=r(46),i=r(50),s=r(39);e.exports=function(e,t,r,o){o||(o={});var c=o.enumerable,l=void 0!==o.name?o.name:t;if(n(r)&&i(r,l,o),o.global)c?e[t]=r:s(t,r);else{try{o.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=r:a.f(e,t,{value:r,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},(e,t,r)=>{var n=r(10),a=r(23),i=r(40),s=r(9),o=r(51).CONFIGURABLE,c=r(52),l=r(53),h=l.enforce,u=l.get,d=Object.defineProperty,f=s&&!n((function(){return 8!==d((function(){}),"length",{value:8}).length})),p=(String+"").split("String"),g=e.exports=function(e,t,r){"Symbol("===(t+"").slice(0,7)&&(t="["+(t+"").replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!i(e,"name")||o&&e.name!==t)&&(s?d(e,"name",{value:t,configurable:!0}):e.name=t),f&&r&&i(r,"arity")&&e.length!==r.arity&&d(e,"length",{value:r.arity});try{r&&i(r,"constructor")&&r.constructor?s&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=h(e);return i(n,"source")||(n.source=p.join("string"==typeof t?t:"")),e};Function.prototype.toString=g((function(){return a(this)&&u(this).source||c(this)}),"toString")},(e,t,r)=>{var n=r(9),a=r(40),i=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,o=a(i,"name"),c=o&&!1,l=o&&(!n||n&&s(i,"name").configurable);e.exports={EXISTS:o,PROPER:c,CONFIGURABLE:l}},(e,t,r)=>{var n=r(17),a=r(23),i=r(38),s=n(Function.toString);a(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},(e,t,r)=>{var n,a,i,s=r(54),o=r(7),c=r(17),l=r(22),h=r(45),u=r(40),d=r(38),f=r(55),p=r(56),g="Object already initialized",m=o.TypeError;if(s||d.state){var b=d.state||(d.state=new(0,o.WeakMap)),y=c(b.get),w=c(b.has),v=c(b.set);n=function(e,t){if(w(b,e))throw new m(g);return t.facade=e,v(b,e,t),t},a=function(e){return y(b,e)||{}},i=function(e){return w(b,e)}}else{var S=f("state");p[S]=!0,n=function(e,t){if(u(e,S))throw new m(g);return t.facade=e,h(e,S,t),t},a=function(e){return u(e,S)?e[S]:{}},i=function(e){return u(e,S)}}e.exports={set:n,get:a,has:i,enforce:function(e){return i(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!l(t)||(r=a(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return r}}}},(e,t,r)=>{var n=r(7),a=r(23),i=r(52),s=n.WeakMap;e.exports=a(s)&&/native code/.test(i(s))},(e,t,r)=>{var n=r(36),a=r(42),i=n("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},e=>{e.exports={}},(e,t,r)=>{var n=r(40),a=r(58),i=r(8),s=r(46);e.exports=function(e,t,r){for(var o=a(t),c=s.f,l=i.f,h=0;o.length>h;h++){var u=o[h];n(e,u)||r&&n(r,u)||c(e,u,l(t,u))}}},(e,t,r)=>{var n=r(25),a=r(17),i=r(59),s=r(68),o=r(48),c=a([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=i.f(o(e)),r=s.f;return r?c(t,r(e)):t}},(e,t,r)=>{var n=r(60),a=r(67).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},(e,t,r)=>{var n=r(17),a=r(40),i=r(15),s=r(61).indexOf,o=r(56),c=n([].push);e.exports=function(e,t){var r,n=i(e),l=0,h=[];for(r in n)!a(o,r)&&a(n,r)&&c(h,r);for(;t.length>l;)a(n,r=t[l++])&&(~s(h,r)||c(h,r));return h}},(e,t,r)=>{var n=r(15),a=r(62),i=r(65),s=function(e){return function(t,r,s){var o,c=n(t),l=i(c),h=a(s,l);if(e&&r!=r){for(;l>h;)if((o=c[h++])!=o)return!0}else for(;l>h;h++)if((e||h in c)&&c[h]===r)return e||h||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},(e,t,r)=>{var n=r(63),a=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return 0>r?a(r+t,0):i(r,t)}},(e,t,r)=>{var n=r(64);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},e=>{var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},(e,t,r)=>{var n=r(66);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(10),a=r(23),i=/#|\.prototype\./,s=function(e,t){var r=c[o(e)];return r==h||r!=l&&(a(t)?n(t):!!t)},o=s.normalize=function(e){return(e+"").replace(i,".").toLowerCase()},c=s.data={},l=s.NATIVE="N",h=s.POLYFILL="P";e.exports=s},(e,t,r)=>{var n=r(35),a=r(71),i=r(46).f,s=n("unscopables"),o=Array.prototype;null==o[s]&&i(o,s,{configurable:!0,value:a(null)}),e.exports=function(e){o[s][e]=!0}},(e,t,r)=>{var n,a=r(48),i=r(72),s=r(67),o=r(56),c=r(74),l=r(44),h=r(55),u="prototype",d="script",f=h("IE_PROTO"),p=function(){},g=function(e){return"<"+d+">"+e+"</"+d+">"},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;b="undefined"!=typeof document?document.domain&&n?m(n):(t=l("iframe"),r="java"+d+":",t.style.display="none",c.appendChild(t),t.src=r+"",(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F):m(n);for(var a=s.length;a--;)delete b[u][s[a]];return b()};o[f]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p[u]=a(e),r=new p,p[u]=null,r[f]=e):r=b(),void 0===t?r:i.f(r,t)}},(e,t,r)=>{var n=r(9),a=r(47),i=r(46),s=r(48),o=r(15),c=r(73);t.f=n&&!a?Object.defineProperties:function(e,t){s(e);for(var r,n=o(t),a=c(t),l=a.length,h=0;l>h;)i.f(e,r=a[h++],n[r]);return e}},(e,t,r)=>{var n=r(60),a=r(67);e.exports=Object.keys||function(e){return n(e,a)}},(e,t,r)=>{var n=r(25);e.exports=n("document","documentElement")},(e,t,r)=>{var n=r(7),a=r(17);e.exports=function(e,t){return a(n[e].prototype[t])}},(e,t,r)=>{r(77)},(e,t,r)=>{var n=r(78),a=r(65),i=r(63),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("at",(function(e){var t=s(this),r=a(t),n=i(e),o=0>n?r+n:n;return 0>o||o>=r?void 0:t[o]}))},(e,t,r)=>{var n,a,i,s=r(79),o=r(9),c=r(7),l=r(23),h=r(22),u=r(40),d=r(80),f=r(33),p=r(45),g=r(49),m=r(46).f,b=r(26),y=r(82),w=r(84),v=r(35),S=r(42),x=r(53),A=x.enforce,k=x.get,C=c.Int8Array,_=C&&C.prototype,F=c.Uint8ClampedArray,T=F&&F.prototype,O=C&&y(C),P=_&&y(_),I=Object.prototype,E=c.TypeError,M=v("toStringTag"),R=S("TYPED_ARRAY_TAG"),D="TypedArrayConstructor",N=s&&!!w&&"Opera"!==d(c.opera),L=!1,j={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},B={BigInt64Array:8,BigUint64Array:8},U=function(e){var t=y(e);if(h(t)){var r=k(t);return r&&u(r,D)?r[D]:U(t)}},$=function(e){if(!h(e))return!1;var t=d(e);return u(j,t)||u(B,t)};for(n in j)(i=(a=c[n])&&a.prototype)?A(i)[D]=a:N=!1;for(n in B)(i=(a=c[n])&&a.prototype)&&(A(i)[D]=a);if((!N||!l(O)||O===Function.prototype)&&(O=function(){throw E("Incorrect invocation")},N))for(n in j)c[n]&&w(c[n],O);if((!N||!P||P===I)&&(P=O.prototype,N))for(n in j)c[n]&&w(c[n].prototype,P);if(N&&y(T)!==P&&w(T,P),o&&!u(P,M))for(n in L=!0,m(P,M,{get:function(){return h(this)?this[R]:void 0}}),j)c[n]&&p(c[n],R,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:N,TYPED_ARRAY_TAG:L&&R,aTypedArray:function(e){if($(e))return e;throw E("Target is not a typed array")},aTypedArrayConstructor:function(e){if(l(e)&&(!w||b(O,e)))return e;throw E(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(o){if(r)for(var a in j){var i=c[a];if(i&&u(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}P[e]&&!r||g(P,e,r?t:N&&_[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,a;if(o){if(w){if(r)for(n in j)if((a=c[n])&&u(a,e))try{delete a[e]}catch(e){}if(O[e]&&!r)return;try{return g(O,e,r?t:N&&O[e]||t)}catch(e){}}for(n in j)!(a=c[n])||a[e]&&!r||g(a,e,t)}},getTypedArrayConstructor:U,isView:function(e){if(!h(e))return!1;var t=d(e);return"DataView"===t||u(j,t)||u(B,t)},isTypedArray:$,TypedArray:O,TypedArrayPrototype:P}},e=>{e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},(e,t,r)=>{var n=r(81),a=r(23),i=r(18),s=r(35)("toStringTag"),o=Object,c="Arguments"==i(function(){return arguments}());e.exports=n?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=o(e),s))?r:c?i(t):"Object"==(n=i(t))&&a(t.callee)?"Arguments":n}},(e,t,r)=>{var n={};n[r(35)("toStringTag")]="z",e.exports=n+""=="[object z]"},(e,t,r)=>{var n=r(40),a=r(23),i=r(41),s=r(55),o=r(83),c=s("IE_PROTO"),l=Object,h=l.prototype;e.exports=o?l.getPrototypeOf:function(e){var t=i(e);if(n(t,c))return t[c];var r=t.constructor;return a(r)&&t instanceof r?r.prototype:t instanceof l?h:null}},(e,t,r)=>{var n=r(10);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},(e,t,r)=>{var n=r(17),a=r(48),i=r(85);e.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),i(n),t?e(r,n):r.__proto__=n,r}}():void 0)},(e,t,r)=>{var n=r(23),a=String,i=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw i("Can't set "+a(e)+" as a prototype")}},(e,t,r)=>{r(87),r(93),r(95),r(117),r(119);var n=r(128);e.exports=n.structuredClone},(e,t,r)=>{var n=r(15),a=r(70),i=r(88),s=r(53),o=r(46).f,c=r(89),l=r(37),h=r(9),u="Array Iterator",d=s.set,f=s.getterFor(u);e.exports=c(Array,"Array",(function(e,t){d(this,{type:u,target:n(e),index:0,kind:t})}),(function(){var e=f(this),t=e.target,r=e.kind,n=e.index++;return t&&t.length>n?"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),"values");var p=i.Arguments=i.Array;if(a("keys"),a("values"),a("entries"),!l&&h&&"values"!==p.name)try{o(p,"name",{value:"values"})}catch(e){}},e=>{e.exports={}},(e,t,r)=>{var n=r(6),a=r(11),i=r(37),s=r(51),o=r(23),c=r(90),l=r(82),h=r(84),u=r(92),d=r(45),f=r(49),p=r(35),g=r(88),m=r(91),b=s.PROPER,y=s.CONFIGURABLE,w=m.IteratorPrototype,v=m.BUGGY_SAFARI_ITERATORS,S=p("iterator"),x="keys",A="values",k="entries",C=function(){return this};e.exports=function(e,t,r,s,p,m,_){c(r,t,s);var F,T,O,P=function(e){if(e===p&&D)return D;if(!v&&e in M)return M[e];switch(e){case x:case A:case k:return function(){return new r(this,e)}}return function(){return new r(this)}},I=t+" Iterator",E=!1,M=e.prototype,R=M[S]||M["@@iterator"]||p&&M[p],D=!v&&R||P(p),N="Array"==t&&M.entries||R;if(N&&(F=l(N.call(new e)))!==Object.prototype&&F.next&&(i||l(F)===w||(h?h(F,w):o(F[S])||f(F,S,C)),u(F,I,!0,!0),i&&(g[I]=C)),b&&p==A&&R&&R.name!==A&&(!i&&y?d(M,"name",A):(E=!0,D=function(){return a(R,this)})),p)if(T={values:P(A),keys:m?D:P(x),entries:P(k)},_)for(O in T)(v||E||!(O in M))&&f(M,O,T[O]);else n({target:t,proto:!0,forced:v||E},T);return i&&!_||M[S]===D||f(M,S,D,{name:p}),g[t]=D,T}},(e,t,r)=>{var n=r(91).IteratorPrototype,a=r(71),i=r(14),s=r(92),o=r(88),c=function(){return this};e.exports=function(e,t,r,l){var h=t+" Iterator";return e.prototype=a(n,{next:i(+!l,r)}),s(e,h,!1,!0),o[h]=c,e}},(e,t,r)=>{var n,a,i,s=r(10),o=r(23),c=r(71),l=r(82),h=r(49),u=r(35),d=r(37),f=u("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(a=l(l(i)))!==Object.prototype&&(n=a):p=!0),null==n||s((function(){var e={};return n[f].call(e)!==e}))?n={}:d&&(n=c(n)),o(n[f])||h(n,f,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},(e,t,r)=>{var n=r(46).f,a=r(40),i=r(35)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!a(e,i)&&n(e,i,{configurable:!0,value:t})}},(e,t,r)=>{var n=r(81),a=r(49),i=r(94);n||a(Object.prototype,"toString",i,{unsafe:!0})},(e,t,r)=>{var n=r(81),a=r(80);e.exports=n?{}.toString:function(){return"[object "+a(this)+"]"}},(e,t,r)=>{r(96)},(e,t,r)=>{r(97)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(114))},(e,t,r)=>{var n=r(6),a=r(7),i=r(17),s=r(69),o=r(49),c=r(98),l=r(105),h=r(111),u=r(23),d=r(22),f=r(10),p=r(112),g=r(92),m=r(113);e.exports=function(e,t,r){var b=-1!==e.indexOf("Map"),y=-1!==e.indexOf("Weak"),w=b?"set":"add",v=a[e],S=v&&v.prototype,x=v,A={},k=function(e){var t=i(S[e]);o(S,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(y&&!d(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return y&&!d(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!d(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(s(e,!u(v)||!(y||S.forEach&&!f((function(){(new v).entries().next()})))))x=r.getConstructor(t,e,b,w),c.enable();else if(s(e,!0)){var C=new x,_=C[w](y?{}:-0,1)!=C,F=f((function(){C.has(1)})),T=p((function(e){new v(e)})),O=!y&&f((function(){for(var e=new v,t=5;t--;)e[w](t,t);return!e.has(-0)}));T||((x=t((function(e,t){h(e,S);var r=m(new v,e,x);return null!=t&&l(t,r[w],{that:r,AS_ENTRIES:b}),r}))).prototype=S,S.constructor=x),(F||O)&&(k("delete"),k("has"),b&&k("get")),(O||_)&&k(w),y&&S.clear&&delete S.clear}return A[e]=x,n({global:!0,constructor:!0,forced:x!=v},A),g(x,e),y||r.setStrong(x,e,b),x}},(e,t,r)=>{var n=r(6),a=r(17),i=r(56),s=r(22),o=r(40),c=r(46).f,l=r(59),h=r(99),u=r(102),d=r(42),f=r(104),p=!1,g=d("meta"),m=0,b=function(e){c(e,g,{value:{objectID:"O"+m++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},p=!0;var e=l.f,t=a([].splice),r={};r[g]=1,e(r).length&&(l.f=function(r){for(var n=e(r),a=0,i=n.length;i>a;a++)if(n[a]===g){t(n,a,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:h.f}))},fastKey:function(e,t){if(!s(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,g)){if(!u(e))return"F";if(!t)return"E";b(e)}return e[g].objectID},getWeakData:function(e,t){if(!o(e,g)){if(!u(e))return!0;if(!t)return!1;b(e)}return e[g].weakData},onFreeze:function(e){return f&&p&&u(e)&&!o(e,g)&&b(e),e}};i[g]=!0},(e,t,r)=>{var n=r(18),a=r(15),i=r(59).f,s=r(100),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"Window"==n(e)?function(e){try{return i(e)}catch(e){return s(o)}}(e):i(a(e))}},(e,t,r)=>{var n=r(62),a=r(65),i=r(101),s=Array,o=Math.max;e.exports=function(e,t,r){for(var c=a(e),l=n(t,c),h=n(void 0===r?c:r,c),u=s(o(h-l,0)),d=0;h>l;l++,d++)i(u,d,e[l]);return u.length=d,u}},(e,t,r)=>{var n=r(20),a=r(46),i=r(14);e.exports=function(e,t,r){var s=n(t);s in e?a.f(e,s,i(0,r)):e[s]=r}},(e,t,r)=>{var n=r(10),a=r(22),i=r(18),s=r(103),o=Object.isExtensible,c=n((function(){}));e.exports=c||s?function(e){return!!a(e)&&(!s||"ArrayBuffer"!=i(e))&&(!o||o(e))}:o},(e,t,r)=>{var n=r(10);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},(e,t,r)=>{var n=r(10);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},(e,t,r)=>{var n=r(106),a=r(11),i=r(48),s=r(33),o=r(107),c=r(65),l=r(26),h=r(108),u=r(109),d=r(110),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},g=p.prototype;e.exports=function(e,t,r){var m,b,y,w,v,S,x,A=!(!r||!r.AS_ENTRIES),k=!(!r||!r.IS_RECORD),C=!(!r||!r.IS_ITERATOR),_=!(!r||!r.INTERRUPTED),F=n(t,r&&r.that),T=function(e){return m&&d(m,"normal",e),new p(!0,e)},O=function(e){return A?(i(e),_?F(e[0],e[1],T):F(e[0],e[1])):_?F(e,T):F(e)};if(k)m=e.iterator;else if(C)m=e;else{if(!(b=u(e)))throw f(s(e)+" is not iterable");if(o(b)){for(y=0,w=c(e);w>y;y++)if((v=O(e[y]))&&l(g,v))return v;return new p(!1)}m=h(e,b)}for(S=k?e.next:m.next;!(x=a(S,m)).done;){try{v=O(x.value)}catch(e){d(m,"throw",e)}if("object"==typeof v&&v&&l(g,v))return v}return new p(!1)}},(e,t,r)=>{var n=r(17),a=r(32),i=r(12),s=n(n.bind);e.exports=function(e,t){return a(e),void 0===t?e:i?s(e,t):function(){return e.apply(t,arguments)}}},(e,t,r)=>{var n=r(35),a=r(88),i=n("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||s[i]===e)}},(e,t,r)=>{var n=r(11),a=r(32),i=r(48),s=r(33),o=r(109),c=TypeError;e.exports=function(e,t){var r=2>arguments.length?o(e):t;if(a(r))return i(n(r,e));throw c(s(e)+" is not iterable")}},(e,t,r)=>{var n=r(80),a=r(31),i=r(88),s=r(35)("iterator");e.exports=function(e){if(null!=e)return a(e,s)||a(e,"@@iterator")||i[n(e)]}},(e,t,r)=>{var n=r(11),a=r(48),i=r(31);e.exports=function(e,t,r){var s,o;a(e);try{if(!(s=i(e,"return"))){if("throw"===t)throw r;return r}s=n(s,e)}catch(e){o=!0,s=e}if("throw"===t)throw r;if(o)throw s;return a(s),r}},(e,t,r)=>{var n=r(26),a=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw a("Incorrect invocation")}},(e,t,r)=>{var n=r(35)("iterator"),a=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){a=!0}};s[n]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}return r}},(e,t,r)=>{var n=r(23),a=r(22),i=r(84);e.exports=function(e,t,r){var s,o;return i&&n(s=t.constructor)&&s!==r&&a(o=s.prototype)&&o!==r.prototype&&i(e,o),e}},(e,t,r)=>{var n=r(46).f,a=r(71),i=r(115),s=r(106),o=r(111),c=r(105),l=r(89),h=r(116),u=r(9),d=r(98).fastKey,f=r(53),p=f.set,g=f.getterFor;e.exports={getConstructor:function(e,t,r,l){var h=e((function(e,n){o(e,f),p(e,{type:t,index:a(null),first:void 0,last:void 0,size:0}),u||(e.size=0),null!=n&&c(n,e[l],{that:e,AS_ENTRIES:r})})),f=h.prototype,m=g(t),b=function(e,t,r){var n,a,i=m(e),s=y(e,t);return s?s.value=r:(i.last=s={index:a=d(t,!0),key:t,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=s),n&&(n.next=s),u?i.size++:e.size++,"F"!==a&&(i.index[a]=s)),e},y=function(e,t){var r,n=m(e),a=d(t);if("F"!==a)return n.index[a];for(r=n.first;r;r=r.next)if(r.key==t)return r};return i(f,{clear:function(){for(var e=m(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,u?e.size=0:this.size=0},delete:function(e){var t=this,r=m(t),n=y(t,e);if(n){var a=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=a),a&&(a.previous=i),r.first==n&&(r.first=a),r.last==n&&(r.last=i),u?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=m(this),n=s(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!y(this,e)}}),i(f,r?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return b(this,0===e?0:e,t)}}:{add:function(e){return b(this,e=0===e?0:e,e)}}),u&&n(f,"size",{get:function(){return m(this).size}}),h},setStrong:function(e,t,r){var n=t+" Iterator",a=g(t),i=g(n);l(e,t,(function(e,t){p(this,{type:n,target:e,state:a(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),h(t)}}},(e,t,r)=>{var n=r(49);e.exports=function(e,t,r){for(var a in t)n(e,a,t[a],r);return e}},(e,t,r)=>{var n=r(25),a=r(46),i=r(35),s=r(9),o=i("species");e.exports=function(e){var t=n(e);s&&t&&!t[o]&&(0,a.f)(t,o,{configurable:!0,get:function(){return this}})}},(e,t,r)=>{r(118)},(e,t,r)=>{r(97)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(114))},(e,t,r)=>{var n,a=r(37),i=r(6),s=r(7),o=r(25),c=r(17),l=r(10),h=r(42),u=r(23),d=r(120),f=r(22),p=r(24),g=r(105),m=r(48),b=r(80),y=r(40),w=r(101),v=r(45),S=r(65),x=r(121),A=r(122),k=r(124),C=r(29),_=r(125),F=r(126),T=r(127),O=s.Object,P=s.Date,I=s.Error,E=s.EvalError,M=s.RangeError,R=s.ReferenceError,D=s.SyntaxError,N=s.TypeError,L=s.URIError,j=s.PerformanceMark,B=s.WebAssembly,U=B&&B.CompileError||I,$=B&&B.LinkError||I,q=B&&B.RuntimeError||I,X=o("DOMException"),H=o("Set"),W=o("Map"),z=W.prototype,G=c(z.has),V=c(z.get),Y=c(z.set),K=c(H.prototype.add),J=o("Object","keys"),Z=c([].push),Q=c((!0).valueOf),ee=c(1..valueOf),te=c("".valueOf),re=c(P.prototype.getTime),ne=h("structuredClone"),ae="DataCloneError",ie="Transferring",se=function(e){return!l((function(){var t=new s.Set([7]),r=e(t),n=e(O(7));return r==t||!r.has(7)||"object"!=typeof n||7!=n}))&&e},oe=function(e,t){return!l((function(){var r=new t,n=e({a:r,b:r});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===r.stack)}))},ce=s.structuredClone,le=a||!oe(ce,I)||!oe(ce,X)||(n=ce,!!l((function(){var e=n(new s.AggregateError([1],ne,{cause:3}));return"AggregateError"!=e.name||1!=e.errors[0]||e.message!=ne||3!=e.cause}))),he=!ce&&se((function(e){return new j(ne,{detail:e}).detail})),ue=se(ce)||he,de=function(e){throw new X("Uncloneable type: "+e,ae)},fe=function(e,t){throw new X((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",ae)},pe=function(e,t){if(p(e)&&de("Symbol"),!f(e))return e;if(t){if(G(t,e))return V(t,e)}else t=new W;var r,n,a,i,c,l,h,g,m,x,C=b(e),_=!1;switch(C){case"Array":a=[],_=!0;break;case"Object":a={},_=!0;break;case"Map":a=new W,_=!0;break;case"Set":a=new H,_=!0;break;case"RegExp":a=RegExp(e.source,A(e));break;case"Error":switch(n=e.name){case"AggregateError":a=o("AggregateError")([]);break;case"EvalError":a=E();break;case"RangeError":a=M();break;case"ReferenceError":a=R();break;case"SyntaxError":a=D();break;case"TypeError":a=N();break;case"URIError":a=L();break;case"CompileError":a=U();break;case"LinkError":a=$();break;case"RuntimeError":a=q();break;default:a=I()}_=!0;break;case"DOMException":a=new X(e.message,e.name),_=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":f(r=s[C])||fe(C),a=new r(pe(e.buffer,t),e.byteOffset,"DataView"===C?e.byteLength:e.length);break;case"DOMQuad":try{a=new DOMQuad(pe(e.p1,t),pe(e.p2,t),pe(e.p3,t),pe(e.p4,t))}catch(t){ue?a=ue(e):fe(C)}break;case"FileList":if(d(r=s.DataTransfer)){for(i=new r,c=0,l=S(e);l>c;c++)i.items.add(pe(e[c],t));a=i.files}else ue?a=ue(e):fe(C);break;case"ImageData":try{a=new ImageData(pe(e.data,t),e.width,e.height,{colorSpace:e.colorSpace})}catch(t){ue?a=ue(e):fe(C)}break;default:if(ue)a=ue(e);else switch(C){case"BigInt":a=O(e.valueOf());break;case"Boolean":a=O(Q(e));break;case"Number":a=O(ee(e));break;case"String":a=O(te(e));break;case"Date":a=new P(re(e));break;case"ArrayBuffer":(r=s.DataView)||"function"==typeof e.slice||fe(C);try{if("function"==typeof e.slice)a=e.slice(0);else for(l=e.byteLength,a=new ArrayBuffer(l),m=new r(e),x=new r(a),c=0;l>c;c++)x.setUint8(c,m.getUint8(c))}catch(e){throw new X("ArrayBuffer is detached",ae)}break;case"SharedArrayBuffer":a=e;break;case"Blob":try{a=e.slice(0,e.size,e.type)}catch(e){fe(C)}break;case"DOMPoint":case"DOMPointReadOnly":r=s[C];try{a=r.fromPoint?r.fromPoint(e):new r(e.x,e.y,e.z,e.w)}catch(e){fe(C)}break;case"DOMRect":case"DOMRectReadOnly":r=s[C];try{a=r.fromRect?r.fromRect(e):new r(e.x,e.y,e.width,e.height)}catch(e){fe(C)}break;case"DOMMatrix":case"DOMMatrixReadOnly":r=s[C];try{a=r.fromMatrix?r.fromMatrix(e):new r(e)}catch(e){fe(C)}break;case"AudioData":case"VideoFrame":u(e.clone)||fe(C);try{a=e.clone()}catch(e){de(C)}break;case"File":try{a=new File([e],e.name,e)}catch(e){fe(C)}break;case"CryptoKey":case"GPUCompilationMessage":case"GPUCompilationInfo":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":fe(C);default:de(C)}}if(Y(t,e,a),_)switch(C){case"Array":case"Object":for(h=J(e),c=0,l=S(h);l>c;c++)w(a,g=h[c],pe(e[g],t));break;case"Map":e.forEach((function(e,r){Y(a,pe(r,t),pe(e,t))}));break;case"Set":e.forEach((function(e){K(a,pe(e,t))}));break;case"Error":v(a,"message",pe(e.message,t)),y(e,"cause")&&v(a,"cause",pe(e.cause,t)),"AggregateError"==n&&(a.errors=pe(e.errors,t));case"DOMException":k&&v(a,"stack",pe(e.stack,t))}return a},ge=ce&&!l((function(){if(F&&C>92||T&&C>94||_&&C>97)return!1;var e=new ArrayBuffer(8),t=ce(e,{transfer:[e]});return 0!=e.byteLength||8!=t.byteLength}));i({global:!0,enumerable:!0,sham:!ge,forced:le},{structuredClone:function(e){var t,r=x(arguments.length,1)>1&&null!=arguments[1]?m(arguments[1]):void 0,n=r?r.transfer:void 0;return void 0!==n&&function(e,t){if(!f(e))throw N("Transfer option cannot be converted to a sequence");var r=[];g(e,(function(e){Z(r,m(e))}));var n,a,i,o,c,l,h=0,p=S(r);if(ge)for(o=ce(r,{transfer:r});p>h;)Y(t,r[h],o[h++]);else for(;p>h;){if(n=r[h++],G(t,n))throw new X("Duplicate transferable",ae);switch(a=b(n)){case"ImageBitmap":d(i=s.OffscreenCanvas)||fe(a,ie);try{(l=new i(n.width,n.height)).getContext("bitmaprenderer").transferFromImageBitmap(n),c=l.transferToImageBitmap()}catch(e){}break;case"AudioData":case"VideoFrame":u(n.clone)&&u(n.close)||fe(a,ie);try{c=n.clone(),n.close()}catch(e){}break;case"ArrayBuffer":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":fe(a,ie)}if(void 0===c)throw new X("This object cannot be transferred: "+a,ae);Y(t,n,c)}}(n,t=new W),pe(e,t)}})},(e,t,r)=>{var n=r(17),a=r(10),i=r(23),s=r(80),o=r(25),c=r(52),l=function(){},h=[],u=o("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=n(d.exec),p=!d.exec(l),g=function(e){if(!i(e))return!1;try{return u(l,h,e),!0}catch(e){return!1}},m=function(e){if(!i(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!f(d,c(e))}catch(e){return!0}};m.sham=!0,e.exports=!u||a((function(){var e;return g(g.call)||!g(Object)||!g((function(){e=!0}))||e}))?m:g},e=>{var t=TypeError;e.exports=function(e,r){if(r>e)throw t("Not enough arguments");return e}},(e,t,r)=>{var n=r(11),a=r(40),i=r(26),s=r(123),o=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in o||a(e,"flags")||!i(o,e)?t:n(s,e)}},(e,t,r)=>{var n=r(48);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},(e,t,r)=>{var n=r(10),a=r(14);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(126),a=r(127);e.exports=!n&&!a&&"object"==typeof window&&"object"==typeof document},e=>{e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},(e,t,r)=>{var n=r(18),a=r(7);e.exports="process"==n(a.process)},(e,t,r)=>{var n=r(7);e.exports=n},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=exports.RenderTask=exports.PDFWorkerUtil=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 _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(130),_display_utils=__w_pdfjs_require__(133),_font_loader=__w_pdfjs_require__(136),_canvas=__w_pdfjs_require__(137),_worker_options=__w_pdfjs_require__(140),_is_node=__w_pdfjs_require__(3),_message_handler=__w_pdfjs_require__(141),_metadata=__w_pdfjs_require__(142),_optional_content_config=__w_pdfjs_require__(143),_transport_stream=__w_pdfjs_require__(144),_xfa_text=__w_pdfjs_require__(145);function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _classPrivateMethodGet(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function _classPrivateFieldInitSpec(e,t,r){_checkPrivateRedeclaration(e,t),t.set(e,r)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(e,t,r){return _classApplyDescriptorSet(e,_classExtractFieldDescriptor(e,t,"set"),r),r}function _classPrivateFieldGet(e,t){return _classApplyDescriptorGet(e,_classExtractFieldDescriptor(e,t,"get"))}function _classExtractFieldDescriptor(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function _classStaticPrivateFieldSpecSet(e,t,r,n){return _classCheckPrivateStaticAccess(e,t),_classCheckPrivateStaticFieldDescriptor(r,"set"),_classApplyDescriptorSet(e,r,n),n}function _classApplyDescriptorSet(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}function _classStaticPrivateFieldSpecGet(e,t,r){return _classCheckPrivateStaticAccess(e,t),_classCheckPrivateStaticFieldDescriptor(r,"get"),_classApplyDescriptorGet(e,r)}function _classCheckPrivateStaticFieldDescriptor(e,t){if(void 0===e)throw new TypeError("attempted to "+t+" private static field before its declaration")}function _classCheckPrivateStaticAccess(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}function _classApplyDescriptorGet(e,t){return t.get?t.get.call(e):t.value}const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100;let DefaultCanvasFactory=_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;let DefaultCMapReaderFactory=_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;let DefaultStandardFontDataFactory=_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream;if(exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory,_is_node.isNodeJS){const{NodeCanvasFactory:e,NodeCMapReaderFactory:t,NodeStandardFontDataFactory:r}=__w_pdfjs_require__(146);exports.DefaultCanvasFactory=DefaultCanvasFactory=e,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=t,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=r}function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){const t=new PDFDocumentLoadingTask;let r;if("string"==typeof e||e instanceof URL)r={url:e};else if((0,_util.isArrayBuffer)(e))r={data:e};else if(e instanceof PDFDataRangeTransport)r={range:e};else{if("object"!=typeof e)throw Error("Invalid parameter in getDocument, need either string, URL, TypedArray, or parameter object.");if(!e.url&&!e.data&&!e.range)throw Error("Invalid parameter object: need either .data, .range or .url");r=e}const n=Object.create(null);let a=null,i=null;for(const e in r){const t=r[e];switch(e){case"url":if("undefined"!=typeof window)try{n[e]=new URL(t,window.location).href;continue}catch(e){(0,_util.warn)(`Cannot create valid URL: "${e}".`)}else if("string"==typeof t||t instanceof URL){n[e]=""+t;continue}throw Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":a=t;continue;case"worker":i=t;continue;case"data":if(_is_node.isNodeJS&&"undefined"!=typeof Buffer&&t instanceof Buffer)n[e]=new Uint8Array(t);else{if(t instanceof Uint8Array)break;if("string"==typeof t)n[e]=(0,_util.stringToBytes)(t);else if("object"!=typeof t||null===t||isNaN(t.length)){if(!(0,_util.isArrayBuffer)(t))throw Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.");n[e]=new Uint8Array(t)}else n[e]=new Uint8Array(t)}continue}n[e]=t}if(n.CMapReaderFactory=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,Number.isInteger(n.rangeChunkSize)&&n.rangeChunkSize>=1||(n.rangeChunkSize=DEFAULT_RANGE_CHUNK_SIZE),("string"!=typeof n.docBaseUrl||(0,_display_utils.isDataScheme)(n.docBaseUrl))&&(n.docBaseUrl=null),Number.isInteger(n.maxImageSize)&&n.maxImageSize>=-1||(n.maxImageSize=-1),"string"!=typeof n.cMapUrl&&(n.cMapUrl=null),"string"!=typeof n.standardFontDataUrl&&(n.standardFontDataUrl=null),"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),"object"==typeof n.ownerDocument&&null!==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),!i){const e={verbosity:n.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};i=e.port?PDFWorker.fromPort(e):new PDFWorker(e),t._worker=i}const s=t.docId;return i.promise.then((function(){if(t.destroyed)throw Error("Loading aborted");const e=_fetchDocument(i,n,a,s),r=new Promise((function(e){let 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)}));return Promise.all([e,r]).then((function(e){let[r,a]=e;if(t.destroyed)throw Error("Loading aborted");const o=new _message_handler.MessageHandler(s,r,i.port),c=new WorkerTransport(o,t,a,n);t._transport=c,o.send("Ready",null)}))})).catch(t._capability.reject),t}async function _fetchDocument(e,t,r,n){if(e.destroyed)throw Error("Worker was destroyed");r&&(t.length=r.length,t.initialData=r.initialData,t.progressiveDone=r.progressiveDone,t.contentDispositionFilename=r.contentDispositionFilename);const a=await e.messageHandler.sendWithPromise("GetDocRequest",{docId:n,apiVersion:"2.16.105",source:{data:t.data,url:t.url,password:t.password,disableAutoFetch:t.disableAutoFetch,rangeChunkSize:t.rangeChunkSize,length:t.length},maxImageSize:t.maxImageSize,disableFontFace:t.disableFontFace,docBaseUrl:t.docBaseUrl,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported,fontExtraProperties:t.fontExtraProperties,enableXfa:t.enableXfa,useSystemFonts:t.useSystemFonts,cMapUrl:t.useWorkerFetch?t.cMapUrl:null,standardFontDataUrl:t.useWorkerFetch?t.standardFontDataUrl:null});if(t.data&&(t.data=null),e.destroyed)throw Error("Worker was destroyed");return a}class PDFDocumentLoadingTask{constructor(){var e,t;this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+(_classStaticPrivateFieldSpecSet(PDFDocumentLoadingTask,PDFDocumentLoadingTask,_docId,(e=_classStaticPrivateFieldSpecGet(PDFDocumentLoadingTask,PDFDocumentLoadingTask,_docId),t=e++,e)),t),this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}get promise(){return this._capability.promise}async destroy(){var e;this.destroyed=!0,await(null===(e=this._transport)||void 0===e?void 0:e.destroy()),this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;var _docId={writable:!0,value:0};class PDFDataRangeTransport{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.length=e,this.initialData=t,this.progressiveDone=r,this.contentDispositionFilename=n,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const r of this._rangeListeners)r(e,t)}onDataProgress(e,t){this._readyCapability.promise.then((()=>{for(const r of this._progressListeners)r(e,t)}))}onDataProgressiveRead(e){this._readyCapability.promise.then((()=>{for(const t of this._progressiveReadListeners)t(e)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const e of this._progressiveDoneListeners)e()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(e,t){this._pdfInfo=e,this._transport=t,Object.defineProperty(this,"fingerprint",{get(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, please use `PDFDocumentProxy.fingerprints` instead."),this.fingerprints[0]}}),Object.defineProperty(this,"getStats",{value:async()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getStats`, please use the `PDFDocumentProxy.stats`-getter instead."),this.stats||{streamTypes:{},fontTypes:{}})})}get annotationStorage(){return this._transport.annotationStorage}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get stats(){return this._transport.stats}get isPureXfa(){return!!this._transport._htmlForXfa}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJavaScript(){return this._transport.getJavaScript()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(){return this._transport.startCleanup(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}saveDocument(){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()}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(e,t,r,n){let a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this._pageIndex=e,this._pageInfo=t,this._ownerDocument=n,this._transport=r,this._stats=a?new _display_utils.StatTimer:null,this._pdfBug=a,this.commonObjs=r.commonObjs,this.objs=new PDFObjects,this._bitmaps=new Set,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this._annotationPromises=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport(){let{scale:e,rotation:t=this.rotate,offsetX:r=0,offsetY:n=0,dontFlip:a=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:r,offsetY:n,dontFlip:a})}getAnnotations(){let{intent:e="display"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this._transport.getRenderingIntent(e);let r=this._annotationPromises.get(t.cacheKey);return r||(r=this._transport.getAnnotations(this._pageIndex,t.renderingIntent),this._annotationPromises.set(t.cacheKey,r),r=r.then((e=>{for(const t of e)void 0!==t.titleObj&&Object.defineProperty(t,"title",{get:()=>((0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead."),t.titleObj.str)}),void 0!==t.contentsObj&&Object.defineProperty(t,"contents",{get:()=>((0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead."),t.contentsObj.str)});return e}))),r}getJSActions(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}async getXfa(){var e;return(null===(e=this._transport._htmlForXfa)||void 0===e?void 0:e.children[this._pageIndex])||null}render(e){var t,r,n;let{canvasContext:a,viewport:i,intent:s="display",annotationMode:o=_util.AnnotationMode.ENABLE,transform:c=null,imageLayer:l=null,canvasFactory:h=null,background:u=null,optionalContentConfigPromise:d=null,annotationCanvasMap:f=null,pageColors:p=null,printAnnotationStorage:g=null}=e;void 0!==(null===(t=arguments[0])||void 0===t?void 0:t.renderInteractiveForms)&&((0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead."),!0===arguments[0].renderInteractiveForms&&o===_util.AnnotationMode.ENABLE&&(o=_util.AnnotationMode.ENABLE_FORMS)),void 0!==(null===(r=arguments[0])||void 0===r?void 0:r.includeAnnotationStorage)&&((0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead."),!0===arguments[0].includeAnnotationStorage&&o===_util.AnnotationMode.ENABLE&&(o=_util.AnnotationMode.ENABLE_STORAGE)),this._stats&&this._stats.time("Overall");const m=this._transport.getRenderingIntent(s,o,g);this.pendingCleanup=!1,d||(d=this._transport.getOptionalContentConfig());let b=this._intentStates.get(m.cacheKey);b||(b=Object.create(null),this._intentStates.set(m.cacheKey,b)),b.streamReaderCancelTimeout&&(clearTimeout(b.streamReaderCancelTimeout),b.streamReaderCancelTimeout=null);const y=h||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),w=!!(m.renderingIntent&_util.RenderingIntentFlag.PRINT);b.displayReadyCapability||(b.displayReadyCapability=(0,_util.createPromiseCapability)(),b.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(m));const v=e=>{b.renderTasks.delete(S),(this.cleanupAfterRender||w)&&(this.pendingCleanup=!0),this._tryCleanup(),e?(S.capability.reject(e),this._abortOperatorList({intentState:b,reason:e instanceof Error?e:Error(e)})):S.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"))},S=new InternalRenderTask({callback:v,params:{canvasContext:a,viewport:i,transform:c,imageLayer:l,background:u},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:f,operatorList:b.operatorList,pageIndex:this._pageIndex,canvasFactory:y,useRequestAnimationFrame:!w,pdfBug:this._pdfBug,pageColors:p});((n=b).renderTasks||(n.renderTasks=new Set)).add(S);const x=S.task;return Promise.all([b.displayReadyCapability.promise,d]).then((e=>{let[t,r]=e;this.pendingCleanup?v():(this._stats&&this._stats.time("Rendering"),S.initializeGraphics({transparency:t,optionalContentConfig:r}),S.operatorListChanged())})).catch(v),x}getOperatorList(){let{intent:e="display",annotationMode:t=_util.AnnotationMode.ENABLE,printAnnotationStorage:r=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=this._transport.getRenderingIntent(e,t,r,!0);let a,i=this._intentStates.get(n.cacheKey);var s;return i||(i=Object.create(null),this._intentStates.set(n.cacheKey,i)),i.opListReadCapability||(a=Object.create(null),a.operatorListChanged=function(){i.operatorList.lastChunk&&(i.opListReadCapability.resolve(i.operatorList),i.renderTasks.delete(a))},i.opListReadCapability=(0,_util.createPromiseCapability)(),((s=i).renderTasks||(s.renderTasks=new Set)).add(a),i.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(n)),i.opListReadCapability.promise}streamTextContent(){let{disableCombineTextItems:e=!1,includeMarkedContent:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,combineTextItems:!0!==e,includeMarkedContent:!0===t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((e=>_xfa_text.XfaText.textContent(e)));const t=this.streamTextContent(e);return new Promise((function(e,r){const n=t.getReader(),a={items:[],styles:Object.create(null)};!function t(){n.read().then((function(r){let{value:n,done:i}=r;i?e(a):(Object.assign(a.styles,n.styles),a.items.push(...n.items),t())}),r)}()}))}getStructTree(){return this._structTreePromise||(this._structTreePromise=this._transport.getStructTree(this._pageIndex))}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const r of t.renderTasks)e.push(r.completed),r.cancel();this.objs.clear();for(const e of this._bitmaps)e.close();return this._bitmaps.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,this.pendingCleanup=!1,Promise.all(e)}cleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.pendingCleanup=!0,this._tryCleanup(e)}_tryCleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.pendingCleanup)return!1;for(const{renderTasks:e,operatorList:t}of this._intentStates.values())if(e.size>0||!t.lastChunk)return!1;this._intentStates.clear(),this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer);for(const e of this._bitmaps)e.close();return this._bitmaps.clear(),this.pendingCleanup=!1,!0}_startRenderPage(e,t){const r=this._intentStates.get(t);r&&(this._stats&&this._stats.timeEnd("Page Request"),r.displayReadyCapability&&r.displayReadyCapability.resolve(e))}_renderPageChunk(e,t){for(let r=0,n=e.length;n>r;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const e of t.renderTasks)e.operatorListChanged();e.lastChunk&&this._tryCleanup()}_pumpOperatorList(e){let{renderingIntent:t,cacheKey:r,annotationStorageMap:n}=e;const a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:t,cacheKey:r,annotationStorage:n}).getReader(),i=this._intentStates.get(r);i.streamReader=a;const s=()=>{a.read().then((e=>{let{value:t,done:r}=e;r?i.streamReader=null:this._transport.destroyed||(this._renderPageChunk(t,i),s())}),(e=>{if(i.streamReader=null,!this._transport.destroyed){if(i.operatorList){i.operatorList.lastChunk=!0;for(const e of i.renderTasks)e.operatorListChanged();this._tryCleanup()}if(i.displayReadyCapability)i.displayReadyCapability.reject(e);else{if(!i.opListReadCapability)throw e;i.opListReadCapability.reject(e)}}}))};s()}_abortOperatorList(e){let{intentState:t,reason:r,force:n=!1}=e;if(t.streamReader){if(!n){if(t.renderTasks.size>0)return;if(r instanceof _display_utils.RenderingCancelledException)return void(t.streamReaderCancelTimeout=setTimeout((()=>{this._abortOperatorList({intentState:t,reason:r,force:!0}),t.streamReaderCancelTimeout=null}),RENDERING_CANCELLED_TIMEOUT))}if(t.streamReader.cancel(new _util.AbortException(r.message)).catch((()=>{})),t.streamReader=null,!this._transport.destroyed){for(const[e,r]of this._intentStates)if(r===t){this._intentStates.delete(e);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){this._listeners=[],this._deferred=Promise.resolve()}postMessage(e,t){const r={data:structuredClone(e,t)};this._deferred.then((()=>{for(const e of this._listeners)e.call(this,r)}))}addEventListener(e,t){this._listeners.push(t)}removeEventListener(e,t){const r=this._listeners.indexOf(t);this._listeners.splice(r,1)}terminate(){this._listeners.length=0}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_is_node.isNodeJS&&"function"==typeof commonjsRequire)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document){var _document,_document$currentScri;const e=null===(_document=document)||void 0===_document||null===(_document$currentScri=_document.currentScript)||void 0===_document$currentScri?void 0:_document$currentScri.src;e&&(PDFWorkerUtil.fallbackWorkerSrc=e.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(e,t){let r;try{if(r=new URL(e),!r.origin||"null"===r.origin)return!1}catch(e){return!1}const n=new URL(t,r);return r.origin===n.origin},PDFWorkerUtil.createCDNWrapper=function(e){return URL.createObjectURL(new Blob([`importScripts("${e}");`]))};class PDFWorker{constructor(){let{name:e=null,port:t=null,verbosity:r=(0,_util.getVerbosityLevel)()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t&&_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts).has(t))throw Error("Cannot use more than one PDFWorker per port.");if(this.name=e,this.destroyed=!1,this.verbosity=r,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,t)return _classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts).set(t,this),void this._initializeFromPort(t);this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve()}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:e}=PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,e)||(e=PDFWorkerUtil.createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e),r=new _message_handler.MessageHandler("main","worker",t),n=()=>{t.removeEventListener("error",a),r.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(Error("Worker was destroyed")):this._setupFakeWorker()},a=()=>{this._webWorker||n()};t.addEventListener("error",a),r.on("test",(e=>{t.removeEventListener("error",a),this.destroyed?n():e?(this._messageHandler=r,this._port=t,this._webWorker=t,this._readyCapability.resolve(),r.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),r.destroy(),t.terminate())})),r.on("ready",(e=>{if(t.removeEventListener("error",a),this.destroyed)n();else try{i()}catch(e){this._setupFakeWorker()}}));const i=()=>{const e=new Uint8Array;r.send("test",e,[e.buffer])};return void i()}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then((e=>{if(this.destroyed)return void this._readyCapability.reject(Error("Worker was destroyed"));const t=new LoopbackPort;this._port=t;const r="fake"+PDFWorkerUtil.fakeWorkerId++,n=new _message_handler.MessageHandler(r+"_worker",r,t);e.setup(n,t);const a=new _message_handler.MessageHandler(r,r+"_worker",t);this._messageHandler=a,this._readyCapability.resolve(),a.send("configure",{verbosity:this.verbosity})})).catch((e=>{this._readyCapability.reject(Error(`Setting up fake worker failed: "${e.message}".`))}))}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts).delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(null==e||!e.port)throw Error("PDFWorker.fromPort - invalid method signature.");return _classStaticPrivateFieldSpecGet(this,PDFWorker,_workerPorts).has(e.port)?_classStaticPrivateFieldSpecGet(this,PDFWorker,_workerPorts).get(e.port):new PDFWorker(e)}static get workerSrc(){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.')}static get _mainThreadWorkerMessageHandler(){try{var e;return(null===(e=globalThis.pdfjsWorker)||void 0===e?void 0:e.WorkerMessageHandler)||null}catch(e){return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS&&"function"==typeof commonjsRequire){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}exports.PDFWorker=PDFWorker;var _workerPorts={writable:!0,value:new WeakMap};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;class WorkerTransport{constructor(e,t,r,n){_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=e,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:t.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:n.ownerDocument,styleElement:n.styleElement}),this._params=n,n.useWorkerFetch||(this.CMapReaderFactory=new n.CMapReaderFactory({baseUrl:n.cMapUrl,isCompressed:n.cMapPacked}),this.StandardFontDataFactory=new n.StandardFontDataFactory({baseUrl:n.standardFontDataUrl})),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}get stats(){return _classPrivateFieldGet(this,_docStats)}getRenderingIntent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=_util.RenderingIntentFlag.DISPLAY,i=null;switch(e){case"any":a=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":a=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: "+e)}switch(t){case _util.AnnotationMode.DISABLE:a+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:a+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:a+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,i=(a&_util.RenderingIntentFlag.PRINT&&r instanceof _annotation_storage.PrintAnnotationStorage?r:this.annotationStorage).serializable;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: "+t)}return n&&(a+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:a,cacheKey:`${a}_${_annotation_storage.AnnotationStorage.getHash(i)}`,annotationStorageMap:i}}destroy(){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"));const e=[];for(const t of _classPrivateFieldGet(this,_pageCache).values())e.push(t._destroy());_classPrivateFieldGet(this,_pageCache).clear(),_classPrivateFieldGet(this,_pagePromises).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then((()=>{this.commonObjs.clear(),this.fontLoader.clear(),_classPrivateFieldSet(this,_metadataPromise,null),this._getFieldObjectsPromise=null,this._hasJSActionsPromise=null,this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then((function(e){let{value:r,done:n}=e;n?t.close():((0,_util.assert)((0,_util.isArrayBuffer)(r),"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(r),1,[r]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}})),e.on("ReaderHeadersReady",(e=>{const r=(0,_util.createPromiseCapability)(),n=this._fullReader;return n.headersReady.then((()=>{var e;n.isStreamingSupported&&n.isRangeSupported||(this._lastProgress&&(null===(e=t.onProgress)||void 0===e||e.call(t,this._lastProgress)),n.onProgress=e=>{var r;null===(r=t.onProgress)||void 0===r||r.call(t,{loaded:e.loaded,total:e.total})});r.resolve({isStreamingSupported:n.isStreamingSupported,isRangeSupported:n.isRangeSupported,contentLength:n.contentLength})}),r.reject),r.promise})),e.on("GetRangeReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const r=this._networkStream.getRangeReader(e.begin,e.end);r?(t.onPull=()=>{r.read().then((function(e){let{value:r,done:n}=e;n?t.close():((0,_util.assert)((0,_util.isArrayBuffer)(r),"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(r),1,[r]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{r.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}):t.close()})),e.on("GetDoc",(e=>{let{pdfInfo:r}=e;this._numPages=r.numPages,this._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,t._capability.resolve(new PDFDocumentProxy(r,this))})),e.on("DocException",(function(e){let r;switch(e.name){case"PasswordException":r=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":r=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":r=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":r=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":r=new _util.UnknownErrorException(e.message,e.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}t._capability.reject(r)})),e.on("PasswordRequest",(e=>{if(this._passwordCapability=(0,_util.createPromiseCapability)(),t.onPassword){const r=e=>{e instanceof Error?this._passwordCapability.reject(e):this._passwordCapability.resolve({password:e})};try{t.onPassword(r,e.code)}catch(e){this._passwordCapability.reject(e)}}else this._passwordCapability.reject(new _util.PasswordException(e.message,e.code));return this._passwordCapability.promise})),e.on("DataLoaded",(e=>{var r;null===(r=t.onProgress)||void 0===r||r.call(t,{loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(e=>{this.destroyed||_classPrivateFieldGet(this,_pageCache).get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)})),e.on("commonobj",(t=>{var r;let[n,a,i]=t;if(!this.destroyed&&!this.commonObjs.has(n))switch(a){case"Font":const t=this._params;if("error"in i){const e=i.error;(0,_util.warn)("Error during font loading: "+e),this.commonObjs.resolve(n,e);break}let s=null;t.pdfBug&&null!==(r=globalThis.FontInspector)&&void 0!==r&&r.enabled&&(s={registerFont(e,t){globalThis.FontInspector.fontAdded(e,t)}});const o=new _font_loader.FontFaceObject(i,{isEvalSupported:t.isEvalSupported,disableFontFace:t.disableFontFace,ignoreErrors:t.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:s});this.fontLoader.bind(o).catch((t=>e.sendWithPromise("FontFallback",{id:n}))).finally((()=>{!t.fontExtraProperties&&o.data&&(o.data=null),this.commonObjs.resolve(n,o)}));break;case"FontPath":case"Image":this.commonObjs.resolve(n,i);break;default:throw Error("Got unknown common object type "+a)}})),e.on("obj",(e=>{let[t,r,n,a]=e;if(this.destroyed)return;const i=_classPrivateFieldGet(this,_pageCache).get(r);if(!i.objs.has(t))switch(n){case"Image":i.objs.resolve(t,a);const e=8e6;if(a){let t;if(a.bitmap){const{bitmap:e,width:r,height:n}=a;t=r*n*4,i._bitmaps.add(e)}else{var s;t=(null===(s=a.data)||void 0===s?void 0:s.length)||0}t>e&&(i.cleanupAfterRender=!0)}break;case"Pattern":i.objs.resolve(t,a);break;default:throw Error("Got unknown object type "+n)}})),e.on("DocProgress",(e=>{var r;this.destroyed||null===(r=t.onProgress)||void 0===r||r.call(t,{loaded:e.loaded,total:e.total})})),e.on("DocStats",(e=>{this.destroyed||_classPrivateFieldSet(this,_docStats,Object.freeze({streamTypes:Object.freeze(e.streamTypes),fontTypes:Object.freeze(e.fontTypes)}))})),e.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),e.on("FetchBuiltInCMap",(e=>this.destroyed?Promise.reject(Error("Worker was destroyed.")):this.CMapReaderFactory?this.CMapReaderFactory.fetch(e):Promise.reject(Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.")))),e.on("FetchStandardFontData",(e=>this.destroyed?Promise.reject(Error("Worker was destroyed.")):this.StandardFontDataFactory?this.StandardFontDataFactory.fetch(e):Promise.reject(Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))))}_onUnsupportedFeature(e){var t,r;let{featureId:n}=e;this.destroyed||null===(t=(r=this.loadingTask).onUnsupportedFeature)||void 0===t||t.call(r,n)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}getPage(e){if(!Number.isInteger(e)||0>=e||e>this._numPages)return Promise.reject(Error("Invalid page request."));const t=e-1,r=_classPrivateFieldGet(this,_pagePromises).get(t);if(r)return r;const n=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then((e=>{if(this.destroyed)throw Error("Transport destroyed");const r=new PDFPageProxy(t,e,this,this._params.ownerDocument,this._params.pdfBug);return _classPrivateFieldGet(this,_pageCache).set(t,r),r}));return _classPrivateFieldGet(this,_pagePromises).set(t,n),n}getPageIndex(e){return"object"!=typeof e||null===e||!Number.isInteger(e.num)||0>e.num||!Number.isInteger(e.gen)||0>e.gen?Promise.reject(Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen})}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}saveDocument(){var e,t;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((()=>{this.annotationStorage.resetModified()}))}getFieldObjects(){return this._getFieldObjectsPromise||(this._getFieldObjectsPromise=this.messageHandler.sendWithPromise("GetFieldObjects",null))}hasJSActions(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((e=>new _optional_content_config.OptionalContentConfig(e)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){return _classPrivateFieldGet(this,_metadataPromise)||_classPrivateFieldSet(this,_metadataPromise,this.messageHandler.sendWithPromise("GetMetadata",null).then((e=>{var t,r,n,a;return{info:e[0],metadata:e[1]?new _metadata.Metadata(e[1]):null,contentDispositionFilename:null!==(t=null===(r=this._fullReader)||void 0===r?void 0:r.filename)&&void 0!==t?t:null,contentLength:null!==(n=null===(a=this._fullReader)||void 0===a?void 0:a.contentLength)&&void 0!==n?n:null}})))}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(await this.messageHandler.sendWithPromise("Cleanup",null),!this.destroyed){for(const e of _classPrivateFieldGet(this,_pageCache).values())if(!e.cleanup())throw Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),_classPrivateFieldSet(this,_metadataPromise,null),this._getFieldObjectsPromise=null,this._hasJSActionsPromise=null}}get loadingParams(){const e=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,enableXfa:e.enableXfa})}}var _objs=new WeakMap,_ensureObj=new WeakSet;class PDFObjects{constructor(){_classPrivateMethodInitSpec(this,_ensureObj),_classPrivateFieldInitSpec(this,_objs,{writable:!0,value:Object.create(null)})}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t){const r=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,e);return r.capability.promise.then((()=>t(r.data))),null}const r=_classPrivateFieldGet(this,_objs)[e];if(null==r||!r.capability.settled)throw Error(`Requesting object that isn't resolved yet ${e}.`);return r.data}has(e){const t=_classPrivateFieldGet(this,_objs)[e];return(null==t?void 0:t.capability.settled)||!1}resolve(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,e);r.data=t,r.capability.resolve()}clear(){_classPrivateFieldSet(this,_objs,Object.create(null))}}function _ensureObj2(e){const t=_classPrivateFieldGet(this,_objs)[e];return t||(_classPrivateFieldGet(this,_objs)[e]={capability:(0,_util.createPromiseCapability)(),data:null})}var _internalRenderTask=new WeakMap;class RenderTask{constructor(e){_classPrivateFieldInitSpec(this,_internalRenderTask,{writable:!0,value:null}),_classPrivateFieldSet(this,_internalRenderTask,e),this.onContinue=null}get promise(){return _classPrivateFieldGet(this,_internalRenderTask).capability.promise}cancel(){_classPrivateFieldGet(this,_internalRenderTask).cancel()}get separateAnnots(){const{separateAnnots:e}=_classPrivateFieldGet(this,_internalRenderTask).operatorList;if(!e)return!1;const{annotationCanvasMap:t}=_classPrivateFieldGet(this,_internalRenderTask);return e.form||e.canvas&&(null==t?void 0:t.size)>0}}exports.RenderTask=RenderTask;class InternalRenderTask{constructor(e){let{callback:t,params:r,objs:n,commonObjs:a,annotationCanvasMap:i,operatorList:s,pageIndex:o,canvasFactory:c,useRequestAnimationFrame:l=!1,pdfBug:h=!1,pageColors:u=null}=e;this.callback=t,this.params=r,this.objs=n,this.commonObjs=a,this.annotationCanvasMap=i,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=o,this.canvasFactory=c,this._pdfBug=h,this.pageColors=u,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===l&&"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=r.canvasContext.canvas}get completed(){return this.capability.promise.catch((function(){}))}initializeGraphics(e){var t;let{transparency:r=!1,optionalContentConfig:n}=e;if(this.cancelled)return;if(this._canvas){if(_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_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.");_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).add(this._canvas)}this._pdfBug&&null!==(t=globalThis.StepperManager)&&void 0!==t&&t.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:a,viewport:i,transform:s,imageLayer:o,background:c}=this.params;this.gfx=new _canvas.CanvasGraphics(a,this.commonObjs,this.objs,this.canvasFactory,o,n,this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:s,viewport:i,transparency:r,background:c}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}cancel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).delete(this._canvas),this.callback(e||new _display_utils.RenderingCancelledException("Rendering cancelled, page "+(this._pageIndex+1),"canvas"))}operatorListChanged(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame((()=>{this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(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&&_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).delete(this._canvas),this.callback())))}}var _canvasInUse={writable:!0,value:new WeakSet};const version="2.16.105";exports.version=version;const build="172ccdbe5";exports.build=build},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PrintAnnotationStorage=t.AnnotationStorage=void 0;var n=r(1),a=r(131),i=r(135);function s(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,o(e,t,"set"),r),r}function o(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var l=new WeakSet;class h{constructor(){var e,t;c(e=this,t=l),t.add(e),this._storage=new Map,this._modified=!1,this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const r=this._storage.get(e);return void 0===r?t:Object.assign(t,r)}getRawValue(e){return this._storage.get(e)}remove(e){if(this._storage.delete(e),0===this._storage.size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(const e of this._storage.values())if(e instanceof a.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(e,t){const r=this._storage.get(e);let n=!1;if(void 0!==r)for(const[e,a]of Object.entries(t))r[e]!==a&&(n=!0,r[e]=a);else n=!0,this._storage.set(e,t);n&&function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,l,u).call(this),t instanceof a.AnnotationEditor&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(t.constructor._type)}has(e){return this._storage.has(e)}getAll(){return this._storage.size>0?(0,n.objectFromMap)(this._storage):null}get size(){return this._storage.size}resetModified(){this._modified&&(this._modified=!1,"function"==typeof this.onResetModified&&this.onResetModified())}get print(){return new f(this)}get serializable(){if(0===this._storage.size)return null;const e=new Map;for(const[t,r]of this._storage){const n=r instanceof a.AnnotationEditor?r.serialize():r;n&&e.set(t,n)}return e}static getHash(e){if(!e)return"";const t=new i.MurmurHash3_64;for(const[r,n]of e)t.update(`${r}:${JSON.stringify(n)}`);return t.hexdigest()}}function u(){this._modified||(this._modified=!0,"function"==typeof this.onSetModified&&this.onSetModified())}t.AnnotationStorage=h;var d=new WeakMap;class f extends h{constructor(e){var t,r,n;super(),n={writable:!0,value:null},c(t=this,r=d),r.set(t,n),s(this,d,structuredClone(e.serializable))}get print(){(0,n.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return function(e,t){return t.get?t.get.call(e):t.value}(e=this,o(e,d,"get"));var e}}t.PrintAnnotationStorage=f},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditor=void 0;var n=r(132),a=r(1);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,l(e,t,"set"),r),r}function c(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,l(e,t,"get"))}function l(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var h=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap;class m{constructor(e){s(this,h,{writable:!0,value:this.focusin.bind(this)}),s(this,u,{writable:!0,value:this.focusout.bind(this)}),s(this,d,{writable:!0,value:!1}),s(this,f,{writable:!0,value:!1}),s(this,p,{writable:!0,value:!1}),s(this,g,{writable:!0,value:m._zIndex++}),this.constructor===m&&(0,a.unreachable)("Cannot initialize AnnotationEditor."),this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null;const[t,r]=this.parent.viewportBaseDimensions;this.x=e.x/t,this.y=e.y/r,this.rotation=this.parent.viewport.rotation,this.isAttachedToDOM=!1}static get _defaultLineColor(){return(0,a.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=c(this,g)}focusin(e){c(this,d)?o(this,d,!1):this.parent.setSelected(this)}focusout(e){if(!this.isAttachedToDOM)return;const t=e.relatedTarget;null!=t&&t.closest("#"+this.id)||(e.preventDefault(),this.parent.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.parent.addToAnnotationStorage(this)}dragstart(e){const t=this.parent.div.getBoundingClientRect();this.startX=e.clientX-t.x,this.startY=e.clientY-t.y,e.dataTransfer.setData("text/plain",this.id),e.dataTransfer.effectAllowed="move"}setAt(e,t,r,n){const[a,i]=this.parent.viewportBaseDimensions;[r,n]=this.screenToPageTranslation(r,n),this.x=(e+r)/a,this.y=(t+n)/i,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}translate(e,t){const[r,n]=this.parent.viewportBaseDimensions;[e,t]=this.screenToPageTranslation(e,t),this.x+=e/r,this.y+=t/n,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}screenToPageTranslation(e,t){const{rotation:r}=this.parent.viewport;switch(r){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}}setDims(e,t){const[r,n]=this.parent.viewportBaseDimensions;this.div.style.width=100*e/r+"%",this.div.style.height=100*t/n+"%"}getInitialTranslation(){return[0,0]}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",c(this,h)),this.div.addEventListener("focusout",c(this,u));const[e,t]=this.getInitialTranslation();return this.translate(e,t),(0,n.bindEvents)(this,this.div,["dragstart","pointerdown"]),this.div}pointerdown(e){const t=n.KeyboardManager.platform.isMac;0!==e.button||e.ctrlKey&&t?e.preventDefault():(e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this),o(this,d,!0))}getRect(e,t){const[r,n]=this.parent.viewportBaseDimensions,[a,i]=this.parent.pageDimensions,s=a*e/r,o=i*t/n,c=this.x*a,l=this.y*i,h=this.width*a,u=this.height*i;switch(this.rotation){case 0:return[c+s,i-l-o-u,c+s+h,i-l-o];case 90:return[c+o,i-l+s,c+o+u,i-l+s+h];case 180:return[c-s-h,i-l+o,c-s,i-l+o+u];case 270:return[c-o-u,i-l-s-h,c-o,i-l-s];default:throw Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[r,n,a,i]=e,s=a-r,o=i-n;switch(this.rotation){case 0:return[r,t-i,s,o];case 90:return[r,t-n,o,s];case 180:return[a,t-n,s,o];case 270:return[a,t-i,o,s];default:throw Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){o(this,p,!0)}disableEditMode(){o(this,p,!1)}isInEditMode(){return c(this,p)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var e;null===(e=this.div)||void 0===e||e.addEventListener("focusin",c(this,h))}serialize(){(0,a.unreachable)("An editor must be serializable")}static deserialize(e,t){const r=new this.prototype.constructor({parent:t,id:t.getNextId()});r.rotation=e.rotation;const[n,a]=t.pageDimensions,[i,s,o,c]=r.getRectInCurrentCoords(e.rect,a);return r.x=i/n,r.y=s/a,r.width=o/n,r.height=c/a,r}remove(){this.div.removeEventListener("focusin",c(this,h)),this.div.removeEventListener("focusout",c(this,u)),this.isEmpty()||this.commit(),this.parent.remove(this)}select(){var e;null===(e=this.div)||void 0===e||e.classList.add("selectedEditor")}unselect(){var e;null===(e=this.div)||void 0===e||e.classList.remove("selectedEditor")}updateParams(e,t){}disableEditing(){}enableEditing(){}get propertiesToUpdate(){return{}}get contentDiv(){return this.div}get isEditing(){return c(this,f)}set isEditing(e){o(this,f,e),e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null)}}t.AnnotationEditor=m,i(m,"_colorManager",new n.ColorManager),i(m,"_zIndex",1)},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardManager=t.CommandManager=t.ColorManager=t.AnnotationEditorUIManager=void 0,t.bindEvents=function(e,t,r){for(const n of r)t.addEventListener(n,e[n].bind(e))},t.opacityToHex=function(e){return Math.round(Math.min(255,Math.max(1,255*e))).toString(16).padStart(2,"0")};var n=r(1),a=r(133);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){l(e,t),t.add(e)}function o(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function c(e,t,r){l(e,t),t.set(e,r)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,d(e,t,"set"),r),r}function u(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,d(e,t,"get"))}function d(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var f=new WeakMap;class p{constructor(){c(this,f,{writable:!0,value:0})}getId(){var e,t;return`${n.AnnotationEditorPrefix}${h(this,f,(e=u(this,f),t=e++,e)),t}`}}var g=new WeakMap,m=new WeakMap,b=new WeakMap,y=new WeakMap;class w{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;c(this,g,{writable:!0,value:[]}),c(this,m,{writable:!0,value:!1}),c(this,b,{writable:!0,value:void 0}),c(this,y,{writable:!0,value:-1}),h(this,b,e)}add(e){let{cmd:t,undo:r,mustExec:n,type:a=NaN,overwriteIfSameType:i=!1,keepUndo:s=!1}=e;if(n&&t(),u(this,m))return;const o={cmd:t,undo:r,type:a};if(-1===u(this,y))return u(this,g).length>0&&(u(this,g).length=0),h(this,y,0),void u(this,g).push(o);if(i&&u(this,g)[u(this,y)].type===a)return s&&(o.undo=u(this,g)[u(this,y)].undo),void(u(this,g)[u(this,y)]=o);const c=u(this,y)+1;c===u(this,b)?u(this,g).splice(0,1):(h(this,y,c),c<u(this,g).length&&u(this,g).splice(c)),u(this,g).push(o)}undo(){-1!==u(this,y)&&(h(this,m,!0),u(this,g)[u(this,y)].undo(),h(this,m,!1),h(this,y,u(this,y)-1))}redo(){u(this,y)<u(this,g).length-1&&(h(this,y,u(this,y)+1),h(this,m,!0),u(this,g)[u(this,y)].cmd(),h(this,m,!1))}hasSomethingToUndo(){return-1!==u(this,y)}hasSomethingToRedo(){return u(this,y)<u(this,g).length-1}destroy(){h(this,g,null)}}t.CommandManager=w;var v=new WeakSet;class S{constructor(e){s(this,v),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const t=S.platform.isMac;for(const[r,n]of e)for(const e of r){const r=e.startsWith("mac+");t&&r?(this.callbacks.set(e.slice(4),n),this.allKeys.add(e.split("+").at(-1))):t||r||(this.callbacks.set(e,n),this.allKeys.add(e.split("+").at(-1)))}}static get platform(){const e="undefined"!=typeof navigator?navigator.platform:"";return(0,n.shadow)(this,"platform",{isWin:e.includes("Win"),isMac:e.includes("Mac")})}exec(e,t){if(!this.allKeys.has(t.key))return;const r=this.callbacks.get(o(this,v,x).call(this,t));r&&(r.bind(e)(),t.stopPropagation(),t.preventDefault())}}function x(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t}t.KeyboardManager=S;var A=new WeakMap;class k{constructor(){c(this,A,{writable:!0,value:null})}copy(e){e&&(h(this,A,Array.isArray(e)?e.map((e=>e.serialize())):[e.serialize()]),h(this,A,u(this,A).filter((e=>!!e))),0===u(this,A).length&&h(this,A,null))}paste(){return u(this,A)}isEmpty(){return null===u(this,A)}destroy(){h(this,A,null)}}class C{get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return(0,a.getColorValues)(e),(0,n.shadow)(this,"_colors",e)}convert(e){const t=(0,a.getRGB)(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(const[e,r]of this._colors)if(r.every(((e,r)=>e===t[r])))return C._colorsMapping.get(e);return t}getHexCode(e){const t=this._colors.get(e);return t?n.Util.makeHexColor(...t):e}}t.ColorManager=C,i(C,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));var _=new WeakMap,F=new WeakMap,T=new WeakMap,O=new WeakMap,P=new WeakMap,I=new WeakMap,E=new WeakMap,M=new WeakMap,R=new WeakMap,D=new WeakMap,N=new WeakMap,L=new WeakMap,j=new WeakMap,B=new WeakMap,U=new WeakMap,$=new WeakMap,q=new WeakMap,X=new WeakSet,H=new WeakSet,W=new WeakSet,z=new WeakSet,G=new WeakSet,V=new WeakSet,Y=new WeakSet,K=new WeakSet,J=new WeakSet;class Z{constructor(e,t){s(this,J),s(this,K),s(this,Y),s(this,V),s(this,G),s(this,z),s(this,W),s(this,H),s(this,X),c(this,_,{writable:!0,value:null}),c(this,F,{writable:!0,value:new Map}),c(this,T,{writable:!0,value:new Map}),c(this,O,{writable:!0,value:new k}),c(this,P,{writable:!0,value:new w}),c(this,I,{writable:!0,value:0}),c(this,E,{writable:!0,value:null}),c(this,M,{writable:!0,value:null}),c(this,R,{writable:!0,value:new p}),c(this,D,{writable:!0,value:!1}),c(this,N,{writable:!0,value:n.AnnotationEditorType.NONE}),c(this,L,{writable:!0,value:new Set}),c(this,j,{writable:!0,value:this.keydown.bind(this)}),c(this,B,{writable:!0,value:this.onEditingAction.bind(this)}),c(this,U,{writable:!0,value:this.onPageChanging.bind(this)}),c(this,$,{writable:!0,value:{isEditing:!1,isEmpty:!0,hasEmptyClipboard:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}}),c(this,q,{writable:!0,value:null}),h(this,q,e),h(this,M,t),u(this,M)._on("editingaction",u(this,B)),u(this,M)._on("pagechanging",u(this,U))}destroy(){o(this,H,ee).call(this),u(this,M)._off("editingaction",u(this,B)),u(this,M)._off("pagechanging",u(this,U));for(const e of u(this,T).values())e.destroy();u(this,T).clear(),u(this,F).clear(),h(this,_,null),u(this,L).clear(),u(this,O).destroy(),u(this,P).destroy()}onPageChanging(e){let{pageNumber:t}=e;h(this,I,t-1)}focusMainContainer(){u(this,q).focus()}keydown(e){var t;null!==(t=this.getActive())&&void 0!==t&&t.shouldGetKeyboardEvents()||Z._keyboardManager.exec(this,e)}onEditingAction(e){["undo","redo","cut","copy","paste","delete","selectAll"].includes(e.name)&&this[e.name]()}setEditingState(e){e?(o(this,X,Q).call(this),o(this,W,te).call(this,{isEditing:u(this,N)!==n.AnnotationEditorType.NONE,isEmpty:o(this,K,se).call(this),hasSomethingToUndo:u(this,P).hasSomethingToUndo(),hasSomethingToRedo:u(this,P).hasSomethingToRedo(),hasSelectedEditor:!1,hasEmptyClipboard:u(this,O).isEmpty()})):(o(this,H,ee).call(this),o(this,W,te).call(this,{isEditing:!1}))}registerEditorTypes(e){h(this,E,e);for(const e of u(this,E))o(this,z,re).call(this,e.defaultPropertiesToUpdate)}getId(){return u(this,R).getId()}addLayer(e){u(this,T).set(e.pageIndex,e),u(this,D)?e.enable():e.disable()}removeLayer(e){u(this,T).delete(e.pageIndex)}updateMode(e){if(h(this,N,e),e===n.AnnotationEditorType.NONE)this.setEditingState(!1),o(this,V,ae).call(this);else{this.setEditingState(!0),o(this,G,ne).call(this);for(const t of u(this,T).values())t.updateMode(e)}}updateToolbar(e){e!==u(this,N)&&u(this,M).dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){for(const r of u(this,L))r.updateParams(e,t);for(const r of u(this,E))r.updateDefaultParams(e,t)}getEditors(e){const t=[];for(const r of u(this,F).values())r.pageIndex===e&&t.push(r);return t}getEditor(e){return u(this,F).get(e)}addEditor(e){u(this,F).set(e.id,e)}removeEditor(e){u(this,F).delete(e.id),this.unselect(e)}setActiveEditor(e){u(this,_)!==e&&(h(this,_,e),e&&o(this,z,re).call(this,e.propertiesToUpdate))}toggleSelected(e){if(u(this,L).has(e))return u(this,L).delete(e),e.unselect(),void o(this,W,te).call(this,{hasSelectedEditor:this.hasSelection});u(this,L).add(e),e.select(),o(this,z,re).call(this,e.propertiesToUpdate),o(this,W,te).call(this,{hasSelectedEditor:!0})}setSelected(e){for(const t of u(this,L))t!==e&&t.unselect();u(this,L).clear(),u(this,L).add(e),e.select(),o(this,z,re).call(this,e.propertiesToUpdate),o(this,W,te).call(this,{hasSelectedEditor:!0})}isSelected(e){return u(this,L).has(e)}unselect(e){e.unselect(),u(this,L).delete(e),o(this,W,te).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==u(this,L).size}undo(){u(this,P).undo(),o(this,W,te).call(this,{hasSomethingToUndo:u(this,P).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:o(this,K,se).call(this)})}redo(){u(this,P).redo(),o(this,W,te).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:u(this,P).hasSomethingToRedo(),isEmpty:o(this,K,se).call(this)})}addCommands(e){u(this,P).add(e),o(this,W,te).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:o(this,K,se).call(this)})}delete(){if(u(this,_)&&u(this,_).commitOrRemove(),!this.hasSelection)return;const e=[...u(this,L)];this.addCommands({cmd:()=>{for(const t of e)t.remove()},undo:()=>{for(const t of e)o(this,Y,ie).call(this,t)},mustExec:!0})}copy(){if(u(this,_)&&u(this,_).commitOrRemove(),this.hasSelection){const e=[];for(const t of u(this,L))t.isEmpty()||e.push(t);if(0===e.length)return;u(this,O).copy(e),o(this,W,te).call(this,{hasEmptyClipboard:!1})}}cut(){this.copy(),this.delete()}paste(){if(u(this,O).isEmpty())return;this.unselectAll();const e=u(this,T).get(u(this,I)),t=u(this,O).paste().map((t=>e.deserialize(t)));this.addCommands({cmd:()=>{for(const e of t)o(this,Y,ie).call(this,e);o(this,J,oe).call(this,t)},undo:()=>{for(const e of t)e.remove()},mustExec:!0})}selectAll(){for(const e of u(this,L))e.commit();o(this,J,oe).call(this,u(this,F).values())}unselectAll(){if(u(this,_))u(this,_).commitOrRemove();else if(0!==o(this,J,oe).size){for(const e of u(this,L))e.unselect();u(this,L).clear(),o(this,W,te).call(this,{hasSelectedEditor:!1})}}isActive(e){return u(this,_)===e}getActive(){return u(this,_)}getMode(){return u(this,N)}}function Q(){u(this,q).addEventListener("keydown",u(this,j))}function ee(){u(this,q).removeEventListener("keydown",u(this,j))}function te(e){Object.entries(e).some((e=>{let[t,r]=e;return u(this,$)[t]!==r}))&&u(this,M).dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(u(this,$),e)})}function re(e){u(this,M).dispatch("annotationeditorparamschanged",{source:this,details:e})}function ne(){if(!u(this,D)){h(this,D,!0);for(const e of u(this,T).values())e.enable()}}function ae(){if(this.unselectAll(),u(this,D)){h(this,D,!1);for(const e of u(this,T).values())e.disable()}}function ie(e){const t=u(this,T).get(e.pageIndex);t?t.addOrRebuild(e):this.addEditor(e)}function se(){if(0===u(this,F).size)return!0;if(1===u(this,F).size)for(const e of u(this,F).values())return e.isEmpty();return!1}function oe(e){u(this,L).clear();for(const t of e)t.isEmpty()||(u(this,L).add(t),t.select());o(this,W,te).call(this,{hasSelectedEditor:!0})}t.AnnotationEditorUIManager=Z,i(Z,"_keyboardManager",new S([[["ctrl+a","mac+meta+a"],Z.prototype.selectAll],[["ctrl+c","mac+meta+c"],Z.prototype.copy],[["ctrl+v","mac+meta+v"],Z.prototype.paste],[["ctrl+x","mac+meta+x"],Z.prototype.cut],[["ctrl+z","mac+meta+z"],Z.prototype.undo],[["ctrl+y","ctrl+shift+Z","mac+meta+shift+Z"],Z.prototype.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete"],Z.prototype.delete],[["Escape","mac+Escape"],Z.prototype.unselectAll]]))},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PageViewport=t.PDFDateString=t.DOMStandardFontDataFactory=t.DOMSVGFactory=t.DOMCanvasFactory=t.DOMCMapReaderFactory=t.AnnotationPrefix=void 0,t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getColorValues=function(e){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const r of e.keys()){t.style.color=r;const n=window.getComputedStyle(t).color;e.set(r,d(n))}t.remove()},t.getCurrentTransform=function(e){const{a:t,b:r,c:n,d:a,e:i,f:s}=e.getTransform();return[t,r,n,a,i,s]},t.getCurrentTransformInverse=function(e){const{a:t,b:r,c:n,d:a,e:i,f:s}=e.getTransform().invertSelf();return[t,r,n,a,i,s]},t.getFilenameFromUrl=function(e){const t=e.indexOf("#"),r=e.indexOf("?"),n=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",n)+1,n)},t.getPdfFilenameFromUrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof e)return t;if(l(e))return(0,a.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let i=r.exec(n[1])||r.exec(n[2])||r.exec(n[3]);if(i&&(i=i[0],i.includes("%")))try{i=r.exec(decodeURIComponent(i))[0]}catch(e){}return i||t},t.getRGB=d,t.getXfaPageViewport=function(e,t){let{scale:r=1,rotation:n=0}=t;const{width:a,height:i}=e.attributes.style;return new c({viewBox:[0,0,parseInt(a),parseInt(i)],scale:r,rotation:n})},t.isDataScheme=l,t.isPdfFile=function(e){return"string"==typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=h,t.loadScript=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(((r,n)=>{const 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: "+a.src))},(document.head||document.documentElement).append(a)}))};var n=r(134),a=r(1);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.AnnotationPrefix="pdfjs_internal_id_";class s{}async function o(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(h(e,document.baseURI)){const r=await fetch(e);if(!r.ok)throw Error(r.statusText);return t?new Uint8Array(await r.arrayBuffer()):(0,a.stringToBytes)(await r.text())}return new Promise(((r,n)=>{const i=new XMLHttpRequest;i.open("GET",e,!0),t&&(i.responseType="arraybuffer"),i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(200===i.status||0===i.status){let e;if(t&&i.response?e=new Uint8Array(i.response):!t&&i.responseText&&(e=(0,a.stringToBytes)(i.responseText)),e)return void r(e)}n(Error(i.statusText))}},i.send(null)}))}t.PixelsPerInch=s,i(s,"CSS",96),i(s,"PDF",72),i(s,"PDF_TO_CSS_UNITS",s.CSS/s.PDF),t.DOMCanvasFactory=class extends n.BaseCanvasFactory{constructor(){let{ownerDocument:e=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._document=e}_createCanvas(e,t){const r=this._document.createElement("canvas");return r.width=e,r.height=t,r}},t.DOMCMapReaderFactory=class extends n.BaseCMapReaderFactory{_fetchData(e,t){return o(e,this.isCompressed).then((e=>({cMapData:e,compressionType:t})))}},t.DOMStandardFontDataFactory=class extends n.BaseStandardFontDataFactory{_fetchData(e){return o(e,!0)}},t.DOMSVGFactory=class extends n.BaseSVGFactory{_createSVG(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}};class c{constructor(e){let{viewBox:t,scale:r,rotation:n,offsetX:a=0,offsetY:i=0,dontFlip:s=!1}=e;this.viewBox=t,this.scale=r,this.rotation=n,this.offsetX=a,this.offsetY=i;const o=(t[2]+t[0])/2,c=(t[3]+t[1])/2;let l,h,u,d,f,p,g,m;switch(n%=360,0>n&&(n+=360),n){case 180:l=-1,h=0,u=0,d=1;break;case 90:l=0,h=1,u=1,d=0;break;case 270:l=0,h=-1,u=-1,d=0;break;case 0:l=1,h=0,u=0,d=-1;break;default:throw Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}s&&(u=-u,d=-d),0===l?(f=Math.abs(c-t[1])*r+a,p=Math.abs(o-t[0])*r+i,g=Math.abs(t[3]-t[1])*r,m=Math.abs(t[2]-t[0])*r):(f=Math.abs(o-t[0])*r+a,p=Math.abs(c-t[1])*r+i,g=Math.abs(t[2]-t[0])*r,m=Math.abs(t[3]-t[1])*r),this.transform=[l*r,h*r,u*r,d*r,f-l*r*o-u*r*c,p-h*r*o-d*r*c],this.width=g,this.height=m}clone(){let{scale:e=this.scale,rotation:t=this.rotation,offsetX:r=this.offsetX,offsetY:n=this.offsetY,dontFlip:a=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new c({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:r,offsetY:n,dontFlip:a})}convertToViewportPoint(e,t){return a.Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=a.Util.applyTransform([e[0],e[1]],this.transform),r=a.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}convertToPdfPoint(e,t){return a.Util.applyInverseTransform([e,t],this.transform)}}function l(e){const t=e.length;let r=0;for(;t>r&&""===e[r].trim();)r++;return"data:"===e.substring(r,r+5).toLowerCase()}function h(e,t){try{const{protocol:r}=t?new URL(e,t):new URL(e);return"http:"===r||"https:"===r}catch(e){return!1}}let u;function d(e){if(e.startsWith("#")){const t=parseInt(e.slice(1),16);return[(16711680&t)>>16,(65280&t)>>8,255&t]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map((e=>parseInt(e))):e.startsWith("rgba(")?e.slice(5,-1).split(",").map((e=>parseInt(e))).slice(0,3):((0,a.warn)(`Not a valid color format: "${e}"`),[0,0,0])}t.PageViewport=c,t.RenderingCancelledException=class extends a.BaseException{constructor(e,t){super(e,"RenderingCancelledException"),this.type=t}},t.StatTimer=class{constructor(){this.started=Object.create(null),this.times=[]}time(e){e in this.started&&(0,a.warn)("Timer is already running for "+e),this.started[e]=Date.now()}timeEnd(e){e in this.started||(0,a.warn)("Timer has not been started for "+e),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const e of this.times){const r=e.name;r.length>t&&(t=r.length)}for(const r of this.times){const n=r.end-r.start;e.push(`${r.name.padEnd(t)} ${n}ms\n`)}return e.join("")}},t.PDFDateString=class{static toDateObject(e){if(!e||"string"!=typeof e)return null;u||(u=RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=u.exec(e);if(!t)return null;const r=parseInt(t[1],10);let n=parseInt(t[2],10);n=1>n||n>12?0:n-1;let a=parseInt(t[3],10);a=1>a||a>31?1:a;let i=parseInt(t[4],10);i=0>i||i>23?0:i;let s=parseInt(t[5],10);s=0>s||s>59?0:s;let o=parseInt(t[6],10);o=0>o||o>59?0:o;const c=t[7]||"Z";let l=parseInt(t[8],10);l=0>l||l>23?0:l;let h=parseInt(t[9],10)||0;return h=0>h||h>59?0:h,"-"===c?(i+=l,s+=h):"+"===c&&(i-=l,s-=h),new Date(Date.UTC(r,n,a,i,s,o))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0;var n=r(1);class a{constructor(){this.constructor===a&&(0,n.unreachable)("Cannot initialize BaseCanvasFactory.")}create(e,t){if(0>=e||0>=t)throw Error("Invalid canvas size");const r=this._createCanvas(e,t);return{canvas:r,context:r.getContext("2d")}}reset(e,t,r){if(!e.canvas)throw Error("Canvas is not specified");if(0>=t||0>=r)throw Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}destroy(e){if(!e.canvas)throw Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){(0,n.unreachable)("Abstract method `_createCanvas` called.")}}t.BaseCanvasFactory=a;class i{constructor(e){let{baseUrl:t=null,isCompressed:r=!1}=e;this.constructor===i&&(0,n.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=t,this.isCompressed=r}async fetch(e){let{name:t}=e;if(!this.baseUrl)throw Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!t)throw Error("CMap name must be specified.");const r=this.baseUrl+t+(this.isCompressed?".bcmap":"");return this._fetchData(r,this.isCompressed?n.CMapCompressionType.BINARY:n.CMapCompressionType.NONE).catch((e=>{throw Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${r}`)}))}_fetchData(e,t){(0,n.unreachable)("Abstract method `_fetchData` called.")}}t.BaseCMapReaderFactory=i;class s{constructor(e){let{baseUrl:t=null}=e;this.constructor===s&&(0,n.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=t}async fetch(e){let{filename:t}=e;if(!this.baseUrl)throw Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!t)throw Error("Font filename must be specified.");const r=`${this.baseUrl}${t}`;return this._fetchData(r).catch((e=>{throw Error("Unable to load font data at: "+r)}))}_fetchData(e){(0,n.unreachable)("Abstract method `_fetchData` called.")}}t.BaseStandardFontDataFactory=s;class o{constructor(){this.constructor===o&&(0,n.unreachable)("Cannot initialize BaseSVGFactory.")}create(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(0>=e||0>=t)throw Error("Invalid SVG dimensions");const n=this._createSVG("svg:svg");return n.setAttribute("version","1.1"),r||(n.setAttribute("width",e+"px"),n.setAttribute("height",t+"px")),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox",`0 0 ${e} ${t}`),n}createElement(e){if("string"!=typeof e)throw Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){(0,n.unreachable)("Abstract method `_createSVG` called.")}}t.BaseSVGFactory=o},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var n=r(1);const a=3285377520,i=4294901760,s=65535;t.MurmurHash3_64=class{constructor(e){this.h1=e?4294967295&e:a,this.h2=e?4294967295&e:a}update(e){let t,r;if("string"==typeof e){t=new Uint8Array(2*e.length),r=0;for(let n=0,a=e.length;a>n;n++){const a=e.charCodeAt(n);a>255?(t[r++]=a>>>8,t[r++]=255&a):t[r++]=a}}else{if(!(0,n.isArrayBuffer)(e))throw Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");t=e.slice(),r=t.byteLength}const a=r>>2,o=r-4*a,c=new Uint32Array(t.buffer,0,a);let l=0,h=0,u=this.h1,d=this.h2;const f=3432918353,p=461845907,g=11601,m=13715;for(let e=0;a>e;e++)1&e?(l=c[e],l=l*f&i|l*g&s,l=l<<15|l>>>17,l=l*p&i|l*m&s,u^=l,u=u<<13|u>>>19,u=5*u+3864292196):(h=c[e],h=h*f&i|h*g&s,h=h<<15|h>>>17,h=h*p&i|h*m&s,d^=h,d=d<<13|d>>>19,d=5*d+3864292196);switch(l=0,o){case 3:l^=t[4*a+2]<<16;case 2:l^=t[4*a+1]<<8;case 1:l^=t[4*a],l=l*f&i|l*g&s,l=l<<15|l>>>17,l=l*p&i|l*m&s,1&a?u^=l:d^=l}this.h1=u,this.h2=d}hexdigest(){let e=this.h1,t=this.h2;e^=t>>>1,e=3981806797*e&i|36045*e&s,t=4283543511*t&i|(2950163797*(t<<16|e>>>16)&i)>>>16,e^=t>>>1,e=444984403*e&i|60499*e&s,t=3301882366*t&i|(3120437893*(t<<16|e>>>16)&i)>>>16,e^=t>>>1;const r=(e>>>0).toString(16),n=(t>>>0).toString(16);return r.padStart(8,"0")+n.padStart(8,"0")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var n=r(1);class a{constructor(e){let{docId:t,onUnsupportedFeature:r,ownerDocument:i=globalThis.document,styleElement:s=null}=e;this.constructor===a&&(0,n.unreachable)("Cannot initialize BaseFontLoader."),this.docId=t,this._onUnsupportedFeature=r,this._document=i,this.nativeFontFaces=[],this.styleElement=null}addNativeFontFace(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}insertRule(e){let t=this.styleElement;t||(t=this.styleElement=this._document.createElement("style"),t.id="PDFJS_FONT_STYLE_TAG_"+this.docId,this._document.documentElement.getElementsByTagName("head")[0].append(t));const r=t.sheet;r.insertRule(e,r.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async bind(e){if(e.attached||e.missingFile)return;if(e.attached=!0,this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(r){throw this._onUnsupportedFeature({featureId:n.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,n.warn)(`Failed to load font '${t.family}': '${r}'.`),e.disableFontFace=!0,r}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise((r=>{const n=this._queueLoadingCallback(r);this._prepareFontLoadEvent([t],[e],n)}))}}_queueLoadingCallback(e){(0,n.unreachable)("Abstract method `_queueLoadingCallback`.")}get isFontLoadingAPISupported(){var e;const t=!(null===(e=this._document)||void 0===e||!e.fonts);return(0,n.shadow)(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){(0,n.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}get _loadTestFont(){(0,n.unreachable)("Abstract method `_loadTestFont`.")}_prepareFontLoadEvent(e,t,r){(0,n.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}let i;t.FontLoader=i,t.FontLoader=i=class extends a{constructor(e){super(e),this.loadingContext={requests:[],nextRequestId:0},this.loadTestFontId=0}get isSyncFontLoadingSupported(){let e=!1;if("undefined"==typeof navigator)e=!0;else{const t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);14>(null==t?void 0:t[1])||(e=!0)}return(0,n.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const t=this.loadingContext,r={id:"pdfjs-font-loading-"+t.nextRequestId++,done:!1,complete:function(){for((0,n.assert)(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.requests.length>0&&t.requests[0].done;){const e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(r),r}get _loadTestFont(){return(0,n.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t,r){function a(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function i(e,t,r,n){return e.substring(0,t)+n+e.substring(t+r)}let s,o;const c=this._document.createElement("canvas");c.width=1,c.height=1;const l=c.getContext("2d");let h=0;const u=`lt${Date.now()}${this.loadTestFontId++}`;let d=this._loadTestFont;d=i(d,976,u.length,u);const f=1482184792;let p=a(d,16);for(s=0,o=u.length-3;o>s;s+=4)p=p-f+a(u,s)|0;u.length>s&&(p=p-f+a(u+"XXX",s)|0),d=i(d,16,4,(0,n.string32)(p));const g=`url(data:font/opentype;base64,${btoa(d)});`;this.insertRule(`@font-face {font-family:"${u}";src:${g}}`);const m=[];for(const e of t)m.push(e.loadedName);m.push(u);const b=this._document.createElement("div");b.style.visibility="hidden",b.style.width=b.style.height="10px",b.style.position="absolute",b.style.top=b.style.left="0px";for(const e of m){const t=this._document.createElement("span");t.textContent="Hi",t.style.fontFamily=e,b.append(t)}this._document.body.append(b),function e(t,r){if(h++,h>30)return(0,n.warn)("Load test font never loaded."),void r();l.font="30px "+t,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?r():setTimeout(e.bind(null,t,r))}(u,(()=>{b.remove(),r.complete()}))}},t.FontFaceObject=class{constructor(e,t){let{isEvalSupported:r=!0,disableFontFace:n=!1,ignoreErrors:a=!1,onUnsupportedFeature:i,fontRegistry:s=null}=t;this.compiledGlyphs=Object.create(null);for(const t in e)this[t]=e[t];this.isEvalSupported=!1!==r,this.disableFontFace=!0===n,this.ignoreErrors=!0===a,this._onUnsupportedFeature=i,this.fontRegistry=s}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e;if(this.cssFontInfo){const t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style=`oblique ${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}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const e=(0,n.bytesToString)(this.data),t=`url(data:${this.mimetype};base64,${btoa(e)});`;let r;if(this.cssFontInfo){let e=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(e+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),r=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${e}src:${t}}`}else r=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return this.fontRegistry&&this.fontRegistry.registerFont(this,t),r}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let r;try{r=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e;return this._onUnsupportedFeature({featureId:n.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,n.warn)(`getPathGenerator - ignoring character: "${e}".`),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&n.FeatureTest.isEvalSupported){const e=[];for(const t of r){const r=void 0!==t.args?t.args.join(","):"";e.push("c.",t.cmd,"(",r,");\n")}return this.compiledGlyphs[t]=Function("c","size",e.join(""))}return this.compiledGlyphs[t]=function(e,t){for(const n of r)"scale"===n.cmd&&(n.args=[t,-t]),e[n.cmd].apply(e,n.args)}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var n=r(133),a=r(1),i=r(138),s=r(139),o=r(3);function c(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function l(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const h=4096,u=o.isNodeJS&&"undefined"==typeof Path2D?-1:1e3,d=16;class f{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,r){let n;return void 0!==this.cache[e]?(n=this.cache[e],this.canvasFactory.reset(n,t,r)):(n=this.canvasFactory.create(t,r),this.cache[e]=n),n}delete(e){delete this.cache[e]}clear(){for(const e in this.cache)this.canvasFactory.destroy(this.cache[e]),delete this.cache[e]}}function p(e,t,r,a,i,s,o,c,l,h){const[u,d,f,p,g,m]=(0,n.getCurrentTransform)(e);if(0===d&&0===f){const n=Math.round(o*u+g),b=Math.round(c*p+m),y=Math.abs(Math.round((o+l)*u+g)-n)||1,w=Math.abs(Math.round((c+h)*p+m)-b)||1;return e.setTransform(Math.sign(u),0,0,Math.sign(p),n,b),e.drawImage(t,r,a,i,s,0,0,y,w),e.setTransform(u,d,f,p,g,m),[y,w]}if(0===u&&0===p){const n=Math.round(c*f+g),b=Math.round(o*d+m),y=Math.abs(Math.round((c+h)*f+g)-n)||1,w=Math.abs(Math.round((o+l)*d+m)-b)||1;return e.setTransform(0,Math.sign(d),Math.sign(f),0,n,b),e.drawImage(t,r,a,i,s,0,0,w,y),e.setTransform(u,d,f,p,g,m),[w,y]}return e.drawImage(t,r,a,i,s,o,c,l,h),[Math.hypot(u,d)*l,Math.hypot(f,p)*h]}class g{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=a.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=a.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=a.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,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,r){[t,r]=a.Util.applyTransform([t,r],e),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)}updateRectMinMax(e,t){const r=a.Util.applyTransform(t,e),n=a.Util.applyTransform(t.slice(2),e);this.minX=Math.min(this.minX,r[0],n[0]),this.minY=Math.min(this.minY,r[1],n[1]),this.maxX=Math.max(this.maxX,r[0],n[0]),this.maxY=Math.max(this.maxY,r[1],n[1])}updateScalingPathMinMax(e,t){a.Util.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.maxX=Math.max(this.maxX,t[1]),this.minY=Math.min(this.minY,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,r,n,i,s,o,c,l,h){const u=a.Util.bezierBoundingBox(t,r,n,i,s,o,c,l);if(h)return h[0]=Math.min(h[0],u[0],u[2]),h[1]=Math.max(h[1],u[0],u[2]),h[2]=Math.min(h[2],u[1],u[3]),void(h[3]=Math.max(h[3],u[1],u[3]));this.updateRectMinMax(e,u)}getPathBoundingBox(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const t=[this.minX,this.minY,this.maxX,this.maxY];if((arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.PathType.FILL)===i.PathType.STROKE){e||(0,a.unreachable)("Stroke bounding box must include transform.");const r=a.Util.singularValueDecompose2dScale(e),n=r[0]*this.lineWidth/2,i=r[1]*this.lineWidth/2;t[0]-=n,t[1]-=i,t[2]+=n,t[3]+=i}return t}updateClipFromPath(){const e=a.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(){return a.Util.intersect(this.clipBox,this.getPathBoundingBox(arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.PathType.FILL,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null))}}function m(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("undefined"!=typeof ImageData&&t instanceof ImageData)return void e.putImageData(t,0,0);const n=t.height,i=t.width,s=n%d,o=(n-s)/d,c=0===s?o:o+1,l=e.createImageData(i,d);let h,u=0;const f=t.data,p=l.data;let g,m,b,y,w,v,S,x;if(r)switch(r.length){case 1:w=r[0],v=r[0],S=r[0],x=r[0];break;case 4:w=r[0],v=r[1],S=r[2],x=r[3]}if(t.kind===a.ImageKind.GRAYSCALE_1BPP){const t=f.byteLength,r=new Uint32Array(p.buffer,0,p.byteLength>>2),n=r.length,y=i+7>>3;let w=4294967295,v=a.FeatureTest.isLittleEndian?4278190080:255;for(x&&255===x[0]&&0===x[255]&&([w,v]=[v,w]),g=0;c>g;g++){for(b=o>g?d:s,h=0,m=0;b>m;m++){const e=t-u;let n=0;const a=e>y?i:8*e-7,s=-8&a;let o=0,c=0;for(;s>n;n+=8)c=f[u++],r[h++]=128&c?w:v,r[h++]=64&c?w:v,r[h++]=32&c?w:v,r[h++]=16&c?w:v,r[h++]=8&c?w:v,r[h++]=4&c?w:v,r[h++]=2&c?w:v,r[h++]=1&c?w:v;for(;a>n;n++)0===o&&(c=f[u++],o=128),r[h++]=c&o?w:v,o>>=1}for(;n>h;)r[h++]=0;e.putImageData(l,0,g*d)}}else if(t.kind===a.ImageKind.RGBA_32BPP){const t=!!(w||v||S);for(m=0,y=i*d*4,g=0;o>g;g++){if(p.set(f.subarray(u,u+y)),u+=y,t)for(let e=0;y>e;e+=4)w&&(p[e+0]=w[p[e+0]]),v&&(p[e+1]=v[p[e+1]]),S&&(p[e+2]=S[p[e+2]]);e.putImageData(l,0,m),m+=d}if(c>g){if(y=i*s*4,p.set(f.subarray(u,u+y)),t)for(let e=0;y>e;e+=4)w&&(p[e+0]=w[p[e+0]]),v&&(p[e+1]=v[p[e+1]]),S&&(p[e+2]=S[p[e+2]]);e.putImageData(l,0,m)}}else{if(t.kind!==a.ImageKind.RGB_24BPP)throw Error("bad image kind: "+t.kind);{const t=!!(w||v||S);for(b=d,y=i*b,g=0;c>g;g++){for(o>g||(b=s,y=i*b),h=0,m=y;m--;)p[h++]=f[u++],p[h++]=f[u++],p[h++]=f[u++],p[h++]=255;if(t)for(let e=0;h>e;e+=4)w&&(p[e+0]=w[p[e+0]]),v&&(p[e+1]=v[p[e+1]]),S&&(p[e+2]=S[p[e+2]]);e.putImageData(l,0,g*d)}}}}function b(e,t){if(t.bitmap)return void e.drawImage(t.bitmap,0,0);const r=t.height,n=t.width,a=r%d,i=(r-a)/d,o=0===a?i:i+1,c=e.createImageData(n,d);let l=0;const h=t.data,u=c.data;for(let t=0;o>t;t++){const r=i>t?d:a;({srcPos:l}=(0,s.applyMaskImageData)({src:h,srcPos:l,dest:u,width:n,height:r})),e.putImageData(c,0,t*d)}}function y(e,t){const r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"];for(let n=0,a=r.length;a>n;n++){const a=r[n];void 0!==e[a]&&(t[a]=e[a])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function w(e,t){e.strokeStyle=e.fillStyle=t||"#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 v(e,t,r,n){const a=e.length;for(let i=3;a>i;i+=4){const a=e[i];if(0===a)e[i-3]=t,e[i-2]=r,e[i-1]=n;else if(255>a){const s=255-a;e[i-3]=e[i-3]*a+t*s>>8,e[i-2]=e[i-2]*a+r*s>>8,e[i-1]=e[i-1]*a+n*s>>8}}}function S(e,t,r){const n=e.length,a=1/255;for(let i=3;n>i;i+=4)t[i]=t[i]*(r?r[e[i]]:e[i])*a|0}function x(e,t,r){const n=e.length;for(let a=3;n>a;a+=4){const n=77*e[a-3]+152*e[a-2]+28*e[a-1];t[a]=r?t[a]*r[n>>8]>>8:t[a]*n>>16}}function A(e,t,r,n){const a=n[0],i=n[1],s=n[2]-a,o=n[3]-i;0!==s&&0!==o&&(function(e,t,r,n,a,i,s,o,c,l,h){const u=!!i,d=u?i[0]:0,f=u?i[1]:0,p=u?i[2]:0;let g;g="Luminosity"===a?x:S;const m=Math.min(n,Math.ceil(1048576/r));for(let a=0;n>a;a+=m){const i=Math.min(m,n-a),b=e.getImageData(o-l,a+(c-h),r,i),y=t.getImageData(o,a+c,r,i);u&&v(b.data,d,f,p),g(b.data,y.data,s),t.putImageData(y,o,a+c)}}(t.context,r,s,o,t.subtype,t.backdrop,t.transferMap,a,i,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 k(e,t){const r=a.Util.singularValueDecompose2dScale(e);r[0]=Math.fround(r[0]),r[1]=Math.fround(r[1]);const i=Math.fround((globalThis.devicePixelRatio||1)*n.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==t?t:i>=r[0]||i>=r[1]}const C=["butt","round","square"],_=["miter","round","bevel"],F={},T={};var O=new WeakSet;class P{constructor(e,t,r,n,a,i,s,o){c(this,O),this.ctx=e,this.current=new g(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=n,this.imageLayer=a,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 f(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=s,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.backgroundColor=(null==o?void 0:o.background)||null,this.foregroundColor=(null==o?void 0:o.foreground)||null,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing(e){let{transform:t,viewport:r,transparency:a=!1,background:i=null}=e;const s=this.ctx.canvas.width,o=this.ctx.canvas.height,c=i||"#ffffff";if(this.ctx.save(),this.foregroundColor&&this.backgroundColor){this.ctx.fillStyle=this.foregroundColor;const e=this.foregroundColor=this.ctx.fillStyle;this.ctx.fillStyle=this.backgroundColor;const t=this.backgroundColor=this.ctx.fillStyle;let r=!0,a=c;if(this.ctx.fillStyle=c,a=this.ctx.fillStyle,r="string"==typeof a&&/^#[0-9A-Fa-f]{6}$/.test(a),"#000000"===e&&"#ffffff"===t||e===t||!r)this.foregroundColor=this.backgroundColor=null;else{const[r,i,s]=(0,n.getRGB)(a),o=e=>(e/=255)>.03928?((e+.055)/1.055)**2.4:e/12.92,c=Math.round(.2126*o(r)+.7152*o(i)+.0722*o(s));this.selectColor=(r,n,a)=>{const i=.2126*o(r)+.7152*o(n)+.0722*o(a);return Math.round(i)===c?t:e}}}if(this.ctx.fillStyle=this.backgroundColor||c,this.ctx.fillRect(0,0,s,o),this.ctx.restore(),a){const e=this.cachedCanvases.getCanvas("transparent",s,o);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...(0,n.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),w(this.ctx,this.foregroundColor),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform(...r.transform),this.viewportScale=r.scale,this.baseTransform=(0,n.getCurrentTransform)(this.ctx),this.imageLayer&&((0,n.deprecated)("The `imageLayer` functionality will be removed in the future."),this.imageLayer.beginLayout())}executeOperatorList(e,t,r,n){const i=e.argsArray,s=e.fnArray;let o=t||0;const c=i.length;if(c===o)return o;const l=c-o>10&&"function"==typeof r,h=l?Date.now()+15:0;let u=0;const d=this.commonObjs,f=this.objs;let p;for(;;){if(void 0!==n&&o===n.nextBreakPoint)return n.breakIt(o,r),o;if(p=s[o],p!==a.OPS.dependency)this[p].apply(this,i[o]);else for(const e of i[o]){const t=e.startsWith("g_")?d:f;if(!t.has(e))return t.get(e,r),o}if(o++,o===c)return o;if(l&&++u>10){if(Date.now()>h)return r(),o;u=0}}}endDrawing(){l(this,O,I).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),this.imageLayer&&this.imageLayer.endLayout()}_scaleImage(e,t){const r=e.width,n=e.height;let a,i,s=Math.max(Math.hypot(t[0],t[1]),1),o=Math.max(Math.hypot(t[2],t[3]),1),c=r,l=n,h="prescale1";for(;s>2&&c>1||o>2&&l>1;){let t=c,r=l;s>2&&c>1&&(t=Math.ceil(c/2),s/=c/t),o>2&&l>1&&(r=Math.ceil(l/2),o/=l/r),a=this.cachedCanvases.getCanvas(h,t,r),i=a.context,i.clearRect(0,0,t,r),i.drawImage(e,0,0,c,l,0,0,t,r),e=a.canvas,c=t,l=r,h="prescale1"===h?"prescale2":"prescale1"}return{img:e,paintWidth:c,paintHeight:l}}_createMaskCanvas(e){const t=this.ctx,{width:r,height:s}=e,o=this.current.fillColor,c=this.current.patternFill,l=(0,n.getCurrentTransform)(t);let h,u,d,f;if((e.bitmap||e.data)&&e.count>1){const t=e.bitmap||e.data.buffer,r=l.slice(0,4);u=JSON.stringify(c?r:[r,o]),h=this._cachedBitmapsMap.get(t),h||(h=new Map,this._cachedBitmapsMap.set(t,h));const n=h.get(u);if(n&&!c)return{canvas:n,offsetX:Math.round(Math.min(l[0],l[2])+l[4]),offsetY:Math.round(Math.min(l[1],l[3])+l[5])};d=n}d||(f=this.cachedCanvases.getCanvas("maskCanvas",r,s),b(f.context,e));let g=a.Util.transform(l,[1/r,0,0,-1/s,0,0]);g=a.Util.transform(g,[1,0,0,1,0,-s]);const m=a.Util.applyTransform([0,0],g),y=a.Util.applyTransform([r,s],g),w=a.Util.normalizeRect([m[0],m[1],y[0],y[1]]),v=this.cachedCanvases.getCanvas("fillCanvas",Math.round(w[2]-w[0])||1,Math.round(w[3]-w[1])||1),S=v.context,x=Math.min(m[0],y[0]),A=Math.min(m[1],y[1]);S.translate(-x,-A),S.transform(...g),d||(d=this._scaleImage(f.canvas,(0,n.getCurrentTransformInverse)(S)),d=d.img,h&&c&&h.set(u,d)),S.imageSmoothingEnabled=k((0,n.getCurrentTransform)(S),e.interpolate),p(S,d,0,0,d.width,d.height,0,0,r,s),S.globalCompositeOperation="source-in";const C=a.Util.transform((0,n.getCurrentTransformInverse)(S),[1,0,0,1,-x,-A]);return S.fillStyle=c?o.getPattern(t,this,C,i.PathType.FILL):o,S.fillRect(0,0,r,s),h&&!c&&(this.cachedCanvases.delete("fillCanvas"),h.set(u,v.canvas)),{canvas:v.canvas,offsetX:Math.round(x),offsetY:Math.round(A)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking=null),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=C[e]}setLineJoin(e){this.ctx.lineJoin=_[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(let t=0,r=e.length;r>t;t++){const r=e[t],n=r[1];switch(r[0]){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n[0],n[1]);break;case"CA":this.current.strokeAlpha=r[1];break;case"ca":this.current.fillAlpha=r[1],this.ctx.globalAlpha=r[1];break;case"BM":this.ctx.globalCompositeOperation=n;break;case"SMask":this.current.activeSMask=n?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.current.transferMaps=n}}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw Error("beginSMaskMode called while already in smask mode");const e=this.cachedCanvases.getCanvas("smaskGroupAt"+this.groupLevel,this.ctx.canvas.width,this.ctx.canvas.height);this.suspendedCtx=this.ctx,this.ctx=e.context;const t=this.ctx;t.setTransform(...(0,n.getCurrentTransform)(this.suspendedCtx)),y(this.suspendedCtx,t),function(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=()=>{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,i,s){t.transform(e,r,n,a,i,s),this.__originalTransform(e,r,n,a,i,s)},e.setTransform=function(e,r,n,a,i,s){t.setTransform(e,r,n,a,i,s),this.__originalSetTransform(e,r,n,a,i,s)},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,i,s){t.bezierCurveTo(e,r,n,a,i,s),this.__originalBezierCurveTo(e,r,n,a,i,s)},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()}}(t,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),y(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){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],A(this.suspendedCtx,this.current.activeSMask,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())}save(){this.inSMaskMode?(y(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),y(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null)}transform(e,t,r,n,a,i){this.ctx.transform(e,t,r,n,a,i),this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null}constructPath(e,t,r){const i=this.ctx,s=this.current;let o,c,l=s.x,h=s.y;const u=(0,n.getCurrentTransform)(i),d=0===u[0]&&0===u[3]||0===u[1]&&0===u[2],f=d?r.slice(0):null;for(let r=0,n=0,p=e.length;p>r;r++)switch(0|e[r]){case a.OPS.rectangle:l=t[n++],h=t[n++];const e=t[n++],r=t[n++],p=l+e,g=h+r;i.moveTo(l,h),0===e||0===r?i.lineTo(p,g):(i.lineTo(p,h),i.lineTo(p,g),i.lineTo(l,g)),d||s.updateRectMinMax(u,[l,h,p,g]),i.closePath();break;case a.OPS.moveTo:l=t[n++],h=t[n++],i.moveTo(l,h),d||s.updatePathMinMax(u,l,h);break;case a.OPS.lineTo:l=t[n++],h=t[n++],i.lineTo(l,h),d||s.updatePathMinMax(u,l,h);break;case a.OPS.curveTo:o=l,c=h,l=t[n+4],h=t[n+5],i.bezierCurveTo(t[n],t[n+1],t[n+2],t[n+3],l,h),s.updateCurvePathMinMax(u,o,c,t[n],t[n+1],t[n+2],t[n+3],l,h,f),n+=6;break;case a.OPS.curveTo2:o=l,c=h,i.bezierCurveTo(l,h,t[n],t[n+1],t[n+2],t[n+3]),s.updateCurvePathMinMax(u,o,c,l,h,t[n],t[n+1],t[n+2],t[n+3],f),l=t[n+2],h=t[n+3],n+=4;break;case a.OPS.curveTo3:o=l,c=h,l=t[n+2],h=t[n+3],i.bezierCurveTo(t[n],t[n+1],l,h,l,h),s.updateCurvePathMinMax(u,o,c,t[n],t[n+1],l,h,l,h,f),n+=4;break;case a.OPS.closePath:i.closePath()}d&&s.updateScalingPathMinMax(u,f),s.setCurrentPoint(l,h)}closePath(){this.ctx.closePath()}stroke(e){e=void 0===e||e;const t=this.ctx,r=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof r&&null!=r&&r.getPattern?(t.save(),t.strokeStyle=r.getPattern(t,this,(0,n.getCurrentTransformInverse)(t),i.PathType.STROKE),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e){e=void 0===e||e;const t=this.ctx,r=this.current.fillColor;let a=!1;this.current.patternFill&&(t.save(),t.fillStyle=r.getPattern(t,this,(0,n.getCurrentTransformInverse)(t),i.PathType.FILL),a=!0);const s=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==s&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),a&&t.restore(),e&&this.consumePath(s)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=F}eoClip(){this.pendingClip=T}beginText(){this.current.textMatrix=a.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(const r of e)t.setTransform(...r.transform),t.translate(r.x,r.y),r.addToPath(t,r.fontSize);t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){const r=this.commonObjs.get(e),n=this.current;if(!r)throw Error("Can't find font for "+e);if(n.fontMatrix=r.fontMatrix||a.FONT_IDENTITY_MATRIX,0!==n.fontMatrix[0]&&0!==n.fontMatrix[3]||(0,a.warn)("Invalid font matrix for font "+e),0>t?(t=-t,n.fontDirection=-1):n.fontDirection=1,this.current.font=r,this.current.fontSize=t,r.isType3Font)return;let i="normal";r.black?i="900":r.bold&&(i="bold");const s=r.italic?"italic":"normal",o=`"${r.loadedName||"sans-serif"}", ${r.fallbackName}`;let c=t;16>t?c=16:t>100&&(c=100),this.current.fontSizeScale=t/c,this.ctx.font=`${s} ${i} ${c}px ${o}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,r,n,a,i){this.current.textMatrix=[e,t,r,n,a,i],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,r,i){const s=this.ctx,o=this.current,c=o.font,l=o.textRenderingMode,h=o.fontSize/o.fontSizeScale,u=l&a.TextRenderingMode.FILL_STROKE_MASK,d=!!(l&a.TextRenderingMode.ADD_TO_PATH_FLAG),f=o.patternFill&&!c.missingFile;let p;(c.disableFontFace||d||f)&&(p=c.getPathGenerator(this.commonObjs,e)),c.disableFontFace||f?(s.save(),s.translate(t,r),s.beginPath(),p(s,h),i&&s.setTransform(...i),u!==a.TextRenderingMode.FILL&&u!==a.TextRenderingMode.FILL_STROKE||s.fill(),u!==a.TextRenderingMode.STROKE&&u!==a.TextRenderingMode.FILL_STROKE||s.stroke(),s.restore()):(u!==a.TextRenderingMode.FILL&&u!==a.TextRenderingMode.FILL_STROKE||s.fillText(e,t,r),u!==a.TextRenderingMode.STROKE&&u!==a.TextRenderingMode.FILL_STROKE||s.strokeText(e,t,r)),d&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,n.getCurrentTransform)(s),x:t,y:r,fontSize:h,addToPath:p})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let r=!1;for(let e=3;t.length>e;e+=4)if(t[e]>0&&255>t[e]){r=!0;break}return(0,a.shadow)(this,"isFontSubpixelAAEnabled",r)}showText(e){const t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);const s=t.fontSize;if(0===s)return;const o=this.ctx,c=t.fontSizeScale,l=t.charSpacing,h=t.wordSpacing,u=t.fontDirection,d=t.textHScale*u,f=e.length,p=r.vertical,g=p?1:-1,m=r.defaultVMetrics,b=s*t.fontMatrix[0],y=t.textRenderingMode===a.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;let w;if(o.save(),o.transform(...t.textMatrix),o.translate(t.x,t.y+t.textRise),o.scale(d,u>0?-1:1),t.patternFill){o.save();const e=t.fillColor.getPattern(o,this,(0,n.getCurrentTransformInverse)(o),i.PathType.FILL);w=(0,n.getCurrentTransform)(o),o.restore(),o.fillStyle=e}let v=t.lineWidth;const S=t.textMatrixScale;if(0===S||0===v){const e=t.textRenderingMode&a.TextRenderingMode.FILL_STROKE_MASK;e!==a.TextRenderingMode.STROKE&&e!==a.TextRenderingMode.FILL_STROKE||(v=this.getSinglePixelWidth())}else v/=S;1!==c&&(o.scale(c,c),v/=c),o.lineWidth=v;let x,A=0;for(x=0;f>x;++x){const t=e[x];if("number"==typeof t){A+=g*t*s/1e3;continue}let n=!1;const a=(t.isSpace?h:0)+l,i=t.fontChar,d=t.accent;let f,v,S,k=t.width;if(p){const e=t.vmetric||m,r=-(t.vmetric?e[1]:.5*k)*b;k=e?-e[0]:k,f=r/c,v=(A+e[2]*b)/c}else f=A/c,v=0;if(r.remeasure&&k>0){const e=1e3*o.measureText(i).width/s*c;if(e>k&&this.isFontSubpixelAAEnabled){const t=k/e;n=!0,o.save(),o.scale(t,1),f/=t}else k!==e&&(f+=(k-e)/2e3*s/c)}this.contentVisible&&(t.isInFont||r.missingFile)&&(y&&!d?o.fillText(i,f,v):(this.paintChar(i,f,v,w),d&&this.paintChar(d.fontChar,f+s*d.offset.x/c,v-s*d.offset.y/c,w))),S=p?k*b-a*u:k*b+a*u,A+=S,n&&o.restore()}p?t.y-=A:t.x+=A*d,o.restore(),this.compose()}showType3Text(e){const t=this.ctx,r=this.current,n=r.font,i=r.fontSize,s=r.fontDirection,o=n.vertical?1:-1,c=r.charSpacing,l=r.wordSpacing,h=r.textHScale*s,u=r.fontMatrix||a.FONT_IDENTITY_MATRIX,d=e.length;let f,p,g,m;if(r.textRenderingMode!==a.TextRenderingMode.INVISIBLE&&0!==i){for(this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...r.textMatrix),t.translate(r.x,r.y),t.scale(h,s),f=0;d>f;++f){if(p=e[f],"number"==typeof p){m=o*p*i/1e3,this.ctx.translate(m,0),r.x+=m*h;continue}const s=(p.isSpace?l:0)+c,d=n.charProcOperatorList[p.operatorListId];d?(this.contentVisible&&(this.processingType3=p,this.save(),t.scale(i,i),t.transform(...u),this.executeOperatorList(d),this.restore()),g=a.Util.applyTransform([p.width,0],u)[0]*i+s,t.translate(g,0),r.x+=g*h):(0,a.warn)(`Type3 character "${p.operatorListId}" is not available.`)}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,r,n,a,i){this.ctx.rect(r,n,a-r,i-n),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t;if("TilingPattern"===e[0]){const r=e[1],a=this.baseTransform||(0,n.getCurrentTransform)(this.ctx);t=new i.TilingPattern(e,r,this.ctx,{createCanvasGraphics:e=>new P(e,this.commonObjs,this.objs,this.canvasFactory)},a)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,r){var n;const i=(null===(n=this.selectColor)||void 0===n?void 0:n.call(this,e,t,r))||a.Util.makeHexColor(e,t,r);this.ctx.strokeStyle=i,this.current.strokeColor=i}setFillRGBColor(e,t,r){var n;const i=(null===(n=this.selectColor)||void 0===n?void 0:n.call(this,e,t,r))||a.Util.makeHexColor(e,t,r);this.ctx.fillStyle=i,this.current.fillColor=i,this.current.patternFill=!1}_getPattern(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(e)?t=this.cachedPatterns.get(e):(t=(0,i.getShadingPattern)(this.objs.get(e)),this.cachedPatterns.set(e,t)),r&&(t.matrix=r),t}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const r=this._getPattern(e);t.fillStyle=r.getPattern(t,this,(0,n.getCurrentTransformInverse)(t),i.PathType.SHADING);const s=(0,n.getCurrentTransformInverse)(t);if(s){const e=t.canvas,r=e.width,n=e.height,i=a.Util.applyTransform([0,0],s),o=a.Util.applyTransform([0,n],s),c=a.Util.applyTransform([r,0],s),l=a.Util.applyTransform([r,n],s),h=Math.min(i[0],o[0],c[0],l[0]),u=Math.min(i[1],o[1],c[1],l[1]);this.ctx.fillRect(h,u,Math.max(i[0],o[0],c[0],l[0])-h,Math.max(i[1],o[1],c[1],l[1])-u)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,a.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,a.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(e,t){this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform(...e),this.baseTransform=(0,n.getCurrentTransform)(this.ctx),t)&&(this.ctx.rect(t[0],t[1],t[2]-t[0],t[3]-t[1]),this.current.updateRectMinMax((0,n.getCurrentTransform)(this.ctx),t),this.clip(),this.endPath())}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||(0,a.info)("TODO: Support non-isolated groups."),e.knockout&&(0,a.warn)("Knockout groups not supported.");const r=(0,n.getCurrentTransform)(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw Error("Bounding box is required.");let i=a.Util.getAxialAlignedBoundingBox(e.bbox,(0,n.getCurrentTransform)(t));i=a.Util.intersect(i,[0,0,t.canvas.width,t.canvas.height])||[0,0,0,0];const s=Math.floor(i[0]),o=Math.floor(i[1]);let c=Math.max(Math.ceil(i[2])-s,1),l=Math.max(Math.ceil(i[3])-o,1),u=1,d=1;c>h&&(u=c/h,c=h),l>h&&(d=l/h,l=h),this.current.startNewPathAndClipBox([0,0,c,l]);let f="groupAt"+this.groupLevel;e.smask&&(f+="_smask_"+this.smaskCounter++%2);const p=this.cachedCanvases.getCanvas(f,c,l),g=p.context;g.scale(1/u,1/d),g.translate(-s,-o),g.transform(...r),e.smask?this.smaskStack.push({canvas:p.canvas,context:g,offsetX:s,offsetY:o,scaleX:u,scaleY:d,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(s,o),t.scale(u,d),t.save()),y(t,g),this.ctx=g,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const e=(0,n.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...e);const r=a.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(r)}}beginAnnotation(e,t,r,i,s){if(l(this,O,I).call(this),w(this.ctx,this.foregroundColor),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(t)&&4===t.length){const i=t[2]-t[0],o=t[3]-t[1];if(s&&this.annotationCanvasMap){(r=r.slice())[4]-=t[0],r[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=i,t[3]=o;const[s,c]=a.Util.singularValueDecompose2dScale((0,n.getCurrentTransform)(this.ctx)),{viewportScale:l}=this;this.annotationCanvas=this.canvasFactory.create(Math.ceil(i*this.outputScaleX*l),Math.ceil(o*this.outputScaleY*l));const{canvas:h,context:u}=this.annotationCanvas;this.annotationCanvasMap.set(e,h),this.annotationCanvas.savedCtx=this.ctx,this.ctx=u,this.ctx.setTransform(s,0,0,-c,0,o*c),w(this.ctx,this.foregroundColor)}else w(this.ctx,this.foregroundColor),this.ctx.rect(t[0],t[1],i,o),this.ctx.clip(),this.endPath()}this.current=new g(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...r),this.transform(...i)}endAnnotation(){this.annotationCanvas&&(this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const r=this.ctx,n=this.processingType3;if(n&&(void 0===n.compiled&&(n.compiled=function(e){const{width:t,height:r}=e;if(t>u||r>u)return null;const n=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),a=t+1;let i,s,o,c=new Uint8Array(a*(r+1));const l=t+7&-8;let h=new Uint8Array(l*r),d=0;for(const t of e.data){let e=128;for(;e>0;)h[d++]=t&e?0:255,e>>=1}let f=0;for(d=0,0!==h[d]&&(c[0]=1,++f),s=1;t>s;s++)h[d]!==h[d+1]&&(c[s]=h[d]?2:1,++f),d++;for(0!==h[d]&&(c[s]=2,++f),i=1;r>i;i++){d=i*l,o=i*a,h[d-l]!==h[d]&&(c[o]=h[d]?1:8,++f);let e=(h[d]?4:0)+(h[d-l]?8:0);for(s=1;t>s;s++)e=(e>>2)+(h[d+1]?4:0)+(h[d-l+1]?8:0),n[e]&&(c[o+s]=n[e],++f),d++;if(h[d-l]!==h[d]&&(c[o+s]=h[d]?2:4,++f),f>1e3)return null}for(d=l*(r-1),o=i*a,0!==h[d]&&(c[o]=8,++f),s=1;t>s;s++)h[d]!==h[d+1]&&(c[o+s]=h[d]?4:8,++f),d++;if(0!==h[d]&&(c[o+s]=4,++f),f>1e3)return null;const p=new Int32Array([0,a,-1,0,-a,0,0,0,1]),g=new Path2D;for(i=0;f&&r>=i;i++){let e=i*a;const r=e+t;for(;r>e&&!c[e];)e++;if(e===r)continue;g.moveTo(e%a,i);const n=e;let s=c[e];do{const t=p[s];do{e+=t}while(!c[e]);const r=c[e];5!==r&&10!==r?(s=r,c[e]=0):(s=r&51*s>>4,c[e]&=s>>2|s<<2),g.lineTo(e%a,e/a|0),c[e]||--f}while(n!==e);--i}return h=null,c=null,function(e){e.save(),e.scale(1/t,-1/r),e.translate(0,-r),e.fill(g),e.beginPath(),e.restore()}}(e)),n.compiled))return void n.compiled(r);const a=this._createMaskCanvas(e),i=a.canvas;r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(i,a.offsetX,a.offsetY),r.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0;if(!this.contentVisible)return;e=this.getObject(e.data,e);const c=this.ctx;c.save();const l=(0,n.getCurrentTransform)(c);c.transform(t,r,i,s,0,0);const h=this._createMaskCanvas(e);c.setTransform(1,0,0,1,0,0);for(let e=0,n=o.length;n>e;e+=2){const n=a.Util.transform(l,[t,r,i,s,o[e],o[e+1]]),[u,d]=a.Util.applyTransform([0,0],n);c.drawImage(h.canvas,u,d)}c.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const t=this.ctx,r=this.current.fillColor,a=this.current.patternFill;for(const s of e){const{data:e,width:o,height:c,transform:l}=s,h=this.cachedCanvases.getCanvas("maskCanvas",o,c),u=h.context;u.save(),b(u,this.getObject(e,s)),u.globalCompositeOperation="source-in",u.fillStyle=a?r.getPattern(u,this,(0,n.getCurrentTransformInverse)(t),i.PathType.FILL):r,u.fillRect(0,0,o,c),u.restore(),t.save(),t.transform(...l),t.scale(1,-1),p(t,h.canvas,0,0,o,c,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const t=this.getObject(e);t?this.paintInlineImageXObject(t):(0,a.warn)("Dependent image isn't ready yet")}paintImageXObjectRepeat(e,t,r,n){if(!this.contentVisible)return;const i=this.getObject(e);if(!i)return void(0,a.warn)("Dependent image isn't ready yet");const s=i.width,o=i.height,c=[];for(let e=0,a=n.length;a>e;e+=2)c.push({transform:[t,0,0,r,n[e],n[e+1]],x:0,y:0,w:s,h:o});this.paintInlineImageXObjectGroup(i,c)}paintInlineImageXObject(e){if(!this.contentVisible)return;const t=e.width,r=e.height,i=this.ctx;let s;if(this.save(),i.scale(1/t,-1/r),"function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)s=e;else{const n=this.cachedCanvases.getCanvas("inlineImage",t,r);m(n.context,e,this.current.transferMaps),s=n.canvas}const o=this._scaleImage(s,(0,n.getCurrentTransformInverse)(i));i.imageSmoothingEnabled=k((0,n.getCurrentTransform)(i),e.interpolate);const[c,l]=p(i,o.img,0,0,o.paintWidth,o.paintHeight,0,-r,t,r);if(this.imageLayer){const[t,i]=a.Util.applyTransform([0,-r],(0,n.getCurrentTransform)(this.ctx));this.imageLayer.appendImage({imgData:e,left:t,top:i,width:c,height:l})}this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;const r=this.ctx,i=e.width,s=e.height,o=this.cachedCanvases.getCanvas("inlineImage",i,s);m(o.context,e,this.current.transferMaps);for(const c of t){if(r.save(),r.transform(...c.transform),r.scale(1,-1),p(r,o.canvas,c.x,c.y,c.w,c.h,0,-1,1,1),this.imageLayer){const[t,r]=a.Util.applyTransform([c.x,c.y],(0,n.getCurrentTransform)(this.ctx));this.imageLayer.appendImage({imgData:e,left:t,top:r,width:i,height:s})}r.restore()}this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){this.markedContentStack.push("OC"===e?{visible:this.optionalContentConfig.isVisible(t)}:{visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const r=this.ctx;this.pendingClip&&(t||(this.pendingClip===T?r.clip("evenodd"):r.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),r.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=(0,n.getCurrentTransform)(this.ctx);if(0===e[1]&&0===e[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.hypot(e[0],e[2]),n=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(r,n)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(!this._cachedScaleForStroking){const{lineWidth:e}=this.current,t=(0,n.getCurrentTransform)(this.ctx);let r,a;if(0===t[1]&&0===t[2]){const n=Math.abs(t[0]),i=Math.abs(t[3]);if(0===e)r=1/n,a=1/i;else{const t=n*e,s=i*e;r=1>t?1/t:1,a=1>s?1/s:1}}else{const n=Math.abs(t[0]*t[3]-t[2]*t[1]),i=Math.hypot(t[0],t[1]),s=Math.hypot(t[2],t[3]);if(0===e)r=s/n,a=i/n;else{const t=e*n;r=s>t?s/t:1,a=i>t?i/t:1}}this._cachedScaleForStroking=[r,a]}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:r}=this.current,[a,i]=this.getScaleForStroking();if(t.lineWidth=r||1,1===a&&1===i)return void t.stroke();let s,o,c;e&&(s=(0,n.getCurrentTransform)(t),o=t.getLineDash().slice(),c=t.lineDashOffset),t.scale(a,i);const l=Math.max(a,i);t.setLineDash(t.getLineDash().map((e=>e/l))),t.lineDashOffset/=l,t.stroke(),e&&(t.setTransform(...s),t.setLineDash(o),t.lineDashOffset=c)}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}function I(){for(;this.stateStack.length||this.inSMaskMode;)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)}t.CanvasGraphics=P;for(const e in a.OPS)void 0!==P.prototype[e]&&(P.prototype[a.OPS[e]]=P.prototype[e])},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=function(e){switch(e[0]){case"RadialAxial":return new l(e);case"Mesh":return new d(e);case"Dummy":return new f}throw Error("Unknown IR type: "+e[0])};var n=r(1),a=r(133),i=r(3);const s={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function o(e,t){if(!t||i.isNodeJS)return;const 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=s;class c{constructor(){this.constructor===c&&(0,n.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,n.unreachable)("Abstract method `getPattern` called.")}}class l extends c{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;"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));for(const e of this._colorStops)t.addColorStop(e[0],e[1]);return t}getPattern(e,t,r,i){let c;if(i===s.STROKE||i===s.FILL){const s=t.current.getClippedPathBoundingBox(i,(0,a.getCurrentTransform)(e))||[0,0,0,0],l=t.cachedCanvases.getCanvas("pattern",Math.ceil(s[2]-s[0])||1,Math.ceil(s[3]-s[1])||1,!0),h=l.context;h.clearRect(0,0,h.canvas.width,h.canvas.height),h.beginPath(),h.rect(0,0,h.canvas.width,h.canvas.height),h.translate(-s[0],-s[1]),r=n.Util.transform(r,[1,0,0,1,s[0],s[1]]),h.transform(...t.baseTransform),this.matrix&&h.transform(...this.matrix),o(h,this._bbox),h.fillStyle=this._createGradient(h),h.fill(),c=e.createPattern(l.canvas,"no-repeat");const u=new DOMMatrix(r);try{c.setTransform(u)}catch(e){(0,n.warn)(`RadialAxialShadingPattern.getPattern: "${null==e?void 0:e.message}".`)}}else o(e,this._bbox),c=this._createGradient(e);return c}}function h(e,t,r,n,a,i,s,o){const c=t.coords,l=t.colors,h=e.data,u=4*e.width;let d;c[r+1]>c[n+1]&&(d=r,r=n,n=d,d=i,i=s,s=d),c[n+1]>c[a+1]&&(d=n,n=a,a=d,d=s,s=o,o=d),c[r+1]>c[n+1]&&(d=r,r=n,n=d,d=i,i=s,s=d);const f=(c[r]+t.offsetX)*t.scaleX,p=(c[r+1]+t.offsetY)*t.scaleY,g=(c[n]+t.offsetX)*t.scaleX,m=(c[n+1]+t.offsetY)*t.scaleY,b=(c[a]+t.offsetX)*t.scaleX,y=(c[a+1]+t.offsetY)*t.scaleY;if(p>=y)return;const w=l[i],v=l[i+1],S=l[i+2],x=l[s],A=l[s+1],k=l[s+2],C=l[o],_=l[o+1],F=l[o+2],T=Math.round(p),O=Math.round(y);let P,I,E,M,R,D,N,L;for(let e=T;O>=e;e++){if(m>e){let t;t=p>e?0:(p-e)/(p-m),P=f-(f-g)*t,I=w-(w-x)*t,E=v-(v-A)*t,M=S-(S-k)*t}else{let t;t=e>y?1:m===y?0:(m-e)/(m-y),P=g-(g-b)*t,I=x-(x-C)*t,E=A-(A-_)*t,M=k-(k-F)*t}let t;t=p>e?0:e>y?1:(p-e)/(p-y),R=f-(f-b)*t,D=w-(w-C)*t,N=v-(v-_)*t,L=S-(S-F)*t;const r=Math.round(Math.min(P,R)),n=Math.round(Math.max(P,R));let a=u*e+4*r;for(let e=r;n>=e;e++)t=(P-e)/(P-R),0>t?t=0:t>1&&(t=1),h[a++]=I-(I-D)*t|0,h[a++]=E-(E-N)*t|0,h[a++]=M-(M-L)*t|0,h[a++]=255}}function u(e,t,r){const n=t.coords,a=t.colors;let i,s;switch(t.type){case"lattice":const o=t.verticesPerRow,c=Math.floor(n.length/o)-1,l=o-1;for(i=0;c>i;i++){let t=i*o;for(let i=0;l>i;i++,t++)h(e,r,n[t],n[t+1],n[t+o],a[t],a[t+1],a[t+o]),h(e,r,n[t+o+1],n[t+1],n[t+o],a[t+o+1],a[t+1],a[t+o])}break;case"triangles":for(i=0,s=n.length;s>i;i+=3)h(e,r,n[i],n[i+1],n[i+2],a[i],a[i+1],a[i+2]);break;default:throw Error("illegal figure")}}class d extends c{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,r){const n=Math.floor(this._bounds[0]),a=Math.floor(this._bounds[1]),i=Math.ceil(this._bounds[2])-n,s=Math.ceil(this._bounds[3])-a,o=Math.min(Math.ceil(Math.abs(i*e[0]*1.1)),3e3),c=Math.min(Math.ceil(Math.abs(s*e[1]*1.1)),3e3),l=i/o,h=s/c,d={coords:this._coords,colors:this._colors,offsetX:-n,offsetY:-a,scaleX:1/l,scaleY:1/h},f=r.getCanvas("mesh",o+4,c+4,!1),p=f.context,g=p.createImageData(o,c);if(t){const e=g.data;for(let r=0,n=e.length;n>r;r+=4)e[r]=t[0],e[r+1]=t[1],e[r+2]=t[2],e[r+3]=255}for(const e of this._figures)u(g,e,d);return p.putImageData(g,2,2),{canvas:f.canvas,offsetX:n-2*l,offsetY:a-2*h,scaleX:l,scaleY:h}}getPattern(e,t,r,i){let c;if(o(e,this._bbox),i===s.SHADING)c=n.Util.singularValueDecompose2dScale((0,a.getCurrentTransform)(e));else if(c=n.Util.singularValueDecompose2dScale(t.baseTransform),this.matrix){const e=n.Util.singularValueDecompose2dScale(this.matrix);c=[c[0]*e[0],c[1]*e[1]]}const l=this._createMeshCanvas(c,i===s.SHADING?null:this._background,t.cachedCanvases);return i!==s.SHADING&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(l.offsetX,l.offsetY),e.scale(l.scaleX,l.scaleY),e.createPattern(l.canvas,"no-repeat")}}class f extends c{getPattern(){return"hotpink"}}const p=1,g=2;class m{static get MAX_PATTERN_SIZE(){return(0,n.shadow)(this,"MAX_PATTERN_SIZE",3e3)}constructor(e,t,r,n,a){this.operatorList=e[2],this.matrix=e[3]||[1,0,0,1,0,0],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=r,this.canvasGraphicsFactory=n,this.baseTransform=a}createPatternCanvas(e){const t=this.operatorList,r=this.bbox,i=this.xstep,s=this.ystep,o=this.paintType,c=this.color,l=this.canvasGraphicsFactory;(0,n.info)("TilingType: "+this.tilingType);const h=r[0],u=r[1],d=r[2],f=r[3],p=n.Util.singularValueDecompose2dScale(this.matrix),g=n.Util.singularValueDecompose2dScale(this.baseTransform),m=[p[0]*g[0],p[1]*g[1]],b=this.getSizeAndScale(i,this.ctx.canvas.width,m[0]),y=this.getSizeAndScale(s,this.ctx.canvas.height,m[1]),w=e.cachedCanvases.getCanvas("pattern",b.size,y.size,!0),v=w.context,S=l.createCanvasGraphics(v);S.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(S,o,c);let x=h,A=u,k=d,C=f;return 0>h&&(x=0,k+=Math.abs(h)),0>u&&(A=0,C+=Math.abs(u)),v.translate(-b.scale*x,-y.scale*A),S.transform(b.scale,0,0,y.scale,0,0),v.save(),this.clipBbox(S,x,A,k,C),S.baseTransform=(0,a.getCurrentTransform)(S.ctx),S.executeOperatorList(t),S.endDrawing(),{canvas:w.canvas,scaleX:b.scale,scaleY:y.scale,offsetX:x,offsetY:A}}getSizeAndScale(e,t,r){e=Math.abs(e);const n=Math.max(m.MAX_PATTERN_SIZE,t);let a=Math.ceil(e*r);return n>a?r=a/e:a=n,{scale:r,size:a}}clipBbox(e,t,r,n,i){e.ctx.rect(t,r,n-t,i-r),e.current.updateRectMinMax((0,a.getCurrentTransform)(e.ctx),[t,r,n,i]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,r){const a=e.ctx,i=e.current;switch(t){case p:const e=this.ctx;a.fillStyle=e.fillStyle,a.strokeStyle=e.strokeStyle,i.fillColor=e.fillStyle,i.strokeColor=e.strokeStyle;break;case g:const s=n.Util.makeHexColor(r[0],r[1],r[2]);a.fillStyle=s,a.strokeStyle=s,i.fillColor=s,i.strokeColor=s;break;default:throw new n.FormatError("Unsupported paint type: "+t)}}getPattern(e,t,r,a){let i=r;a!==s.SHADING&&(i=n.Util.transform(i,t.baseTransform),this.matrix&&(i=n.Util.transform(i,this.matrix)));const o=this.createPatternCanvas(t);let c=new DOMMatrix(i);c=c.translate(o.offsetX,o.offsetY),c=c.scale(1/o.scaleX,1/o.scaleY);const l=e.createPattern(o.canvas,"repeat");try{l.setTransform(c)}catch(e){(0,n.warn)(`TilingPattern.getPattern: "${null==e?void 0:e.message}".`)}return l}}t.TilingPattern=m},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.applyMaskImageData=function(e){let{src:t,srcPos:r=0,dest:a,destPos:i=0,width:s,height:o,inverseDecode:c=!1}=e;const l=n.FeatureTest.isLittleEndian?4278190080:255,[h,u]=c?[0,l]:[l,0],d=s>>3,f=7&s,p=t.length;a=new Uint32Array(a.buffer);for(let e=0;o>e;e++){for(const e=r+d;e>r;r++){const e=p>r?t[r]:255;a[i++]=128&e?u:h,a[i++]=64&e?u:h,a[i++]=32&e?u:h,a[i++]=16&e?u:h,a[i++]=8&e?u:h,a[i++]=4&e?u:h,a[i++]=2&e?u:h,a[i++]=1&e?u:h}if(0===f)continue;const e=p>r?t[r++]:255;for(let t=0;f>t;t++)a[i++]=e&1<<7-t?u:h}return{srcPos:r,destPos:i}};var n=r(1)},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;const 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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n=r(1);const a=1,i=2,s=1,o=2,c=3,l=4,h=5,u=6,d=7,f=8;function p(e){switch(e instanceof Error||"object"==typeof e&&null!==e||(0,n.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new n.AbortException(e.message);case"MissingPDFException":return new n.MissingPDFException(e.message);case"PasswordException":return new n.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new n.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new n.UnknownErrorException(e.message,e.details);default:return new n.UnknownErrorException(e.message,""+e)}}t.MessageHandler=class{constructor(e,t,r){this.sourceName=e,this.targetName=t,this.comObj=r,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=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void this._processStreamMessage(t);if(t.callback){const e=t.callbackId,r=this.callbackCapabilities[e];if(!r)throw Error("Cannot resolve callback "+e);if(delete this.callbackCapabilities[e],t.callback===a)r.resolve(t.data);else{if(t.callback!==i)throw Error("Unexpected callback case");r.reject(p(t.reason))}return}const n=this.actionHandler[t.action];if(!n)throw Error("Unknown action from worker: "+t.action);if(t.callbackId){const e=this.sourceName,s=t.sourceName;new Promise((function(e){e(n(t.data))})).then((function(n){r.postMessage({sourceName:e,targetName:s,callback:a,callbackId:t.callbackId,data:n})}),(function(n){r.postMessage({sourceName:e,targetName:s,callback:i,callbackId:t.callbackId,reason:p(n)})}))}else t.streamId?this._createStreamSink(t):n(t.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,t){const r=this.actionHandler;if(r[e])throw Error(`There is already an actionName called "${e}"`);r[e]=t}send(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}sendWithPromise(e,t,r){const a=this.callbackId++,i=(0,n.createPromiseCapability)();this.callbackCapabilities[a]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:a,data:t},r)}catch(e){i.reject(e)}return i.promise}sendWithStream(e,t,r,a){const i=this.streamId++,o=this.sourceName,c=this.targetName,l=this.comObj;return new ReadableStream({start:r=>{const s=(0,n.createPromiseCapability)();return this.streamControllers[i]={controller:r,startCall:s,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:o,targetName:c,action:e,streamId:i,data:t,desiredSize:r.desiredSize},a),s.promise},pull:e=>{const t=(0,n.createPromiseCapability)();return this.streamControllers[i].pullCall=t,l.postMessage({sourceName:o,targetName:c,stream:u,streamId:i,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,n.assert)(e instanceof Error,"cancel must have a valid reason");const t=(0,n.createPromiseCapability)();return this.streamControllers[i].cancelCall=t,this.streamControllers[i].isClosed=!0,l.postMessage({sourceName:o,targetName:c,stream:s,streamId:i,reason:p(e)}),t.promise}},r)}_createStreamSink(e){const t=e.streamId,r=this.sourceName,a=e.sourceName,i=this.comObj,s=this,o=this.actionHandler[e.action],u={enqueue(e){let s=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o>0&&0>=this.desiredSize&&(this.sinkCapability=(0,n.createPromiseCapability)(),this.ready=this.sinkCapability.promise),i.postMessage({sourceName:r,targetName:a,stream:l,streamId:t,chunk:e},s)},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:a,stream:c,streamId:t}),delete s.streamSinks[t])},error(e){(0,n.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:a,stream:h,streamId:t,reason:p(e)}))},sinkCapability:(0,n.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(o(e.data,u))})).then((function(){i.postMessage({sourceName:r,targetName:a,stream:f,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:r,targetName:a,stream:f,streamId:t,reason:p(e)})}))}_processStreamMessage(e){const t=e.streamId,r=this.sourceName,a=e.sourceName,i=this.comObj,g=this.streamControllers[t],m=this.streamSinks[t];switch(e.stream){case f:e.success?g.startCall.resolve():g.startCall.reject(p(e.reason));break;case d:e.success?g.pullCall.resolve():g.pullCall.reject(p(e.reason));break;case u:if(!m){i.postMessage({sourceName:r,targetName:a,stream:d,streamId:t,success:!0});break}0>=m.desiredSize&&e.desiredSize>0&&m.sinkCapability.resolve(),m.desiredSize=e.desiredSize,new Promise((function(e){e(m.onPull&&m.onPull())})).then((function(){i.postMessage({sourceName:r,targetName:a,stream:d,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:r,targetName:a,stream:d,streamId:t,reason:p(e)})}));break;case l:if((0,n.assert)(g,"enqueue should have stream controller"),g.isClosed)break;g.controller.enqueue(e.chunk);break;case c:if((0,n.assert)(g,"close should have stream controller"),g.isClosed)break;g.isClosed=!0,g.controller.close(),this._deleteStreamController(g,t);break;case h:(0,n.assert)(g,"error should have stream controller"),g.controller.error(p(e.reason)),this._deleteStreamController(g,t);break;case o:e.success?g.cancelCall.resolve():g.cancelCall.reject(p(e.reason)),this._deleteStreamController(g,t);break;case s:if(!m)break;new Promise((function(t){t(m.onCancel&&m.onCancel(p(e.reason)))})).then((function(){i.postMessage({sourceName:r,targetName:a,stream:o,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:r,targetName:a,stream:o,streamId:t,reason:p(e)})})),m.sinkCapability.reject(p(e.reason)),m.isCancelled=!0,delete this.streamSinks[t];break;default:throw Error("Unexpected stream case")}}async _deleteStreamController(e,t){await Promise.allSettled([e.startCall&&e.startCall.promise,e.pullCall&&e.pullCall.promise,e.cancelCall&&e.cancelCall.promise]),delete this.streamControllers[t]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(1);function a(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function i(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,o(e,t,"get"))}function s(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,o(e,t,"set"),r),r}function o(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var c=new WeakMap,l=new WeakMap;t.Metadata=class{constructor(e){let{parsedData:t,rawData:r}=e;a(this,c,{writable:!0,value:void 0}),a(this,l,{writable:!0,value:void 0}),s(this,c,t),s(this,l,r)}getRaw(){return i(this,l)}get(e){var t;return null!==(t=i(this,c).get(e))&&void 0!==t?t:null}getAll(){return(0,n.objectFromMap)(i(this,c))}has(e){return i(this,c).has(e)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var n=r(1);function a(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function i(e,t,r){s(e,t),t.set(e,r)}function s(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,l(e,t,"set"),r),r}function c(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,l(e,t,"get"))}function l(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}const h=Symbol("INTERNAL");var u=new WeakMap;class d{constructor(e,t){i(this,u,{writable:!0,value:!0}),this.name=e,this.intent=t}get visible(){return c(this,u)}_setVisible(e,t){e!==h&&(0,n.unreachable)("Internal method `_setVisible` called."),o(this,u,t)}}var f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakSet;function y(e){const t=e.length;if(2>t)return!0;const r=e[0];for(let i=1;t>i;i++){const t=e[i];let s;if(Array.isArray(t))s=a(this,b,y).call(this,t);else{if(!c(this,p).has(t))return(0,n.warn)("Optional content group not found: "+t),!0;s=c(this,p).get(t).visible}switch(r){case"And":if(!s)return!1;break;case"Or":if(s)return!0;break;case"Not":return!s;default:return!0}}return"And"===r}t.OptionalContentConfig=class{constructor(e){var t,r;if(s(t=this,r=b),r.add(t),i(this,f,{writable:!0,value:!0}),i(this,p,{writable:!0,value:new Map}),i(this,g,{writable:!0,value:null}),i(this,m,{writable:!0,value:null}),this.name=null,this.creator=null,null!==e){this.name=e.name,this.creator=e.creator,o(this,m,e.order);for(const t of e.groups)c(this,p).set(t.id,new d(t.name,t.intent));if("OFF"===e.baseState)for(const e of c(this,p).values())e._setVisible(h,!1);for(const t of e.on)c(this,p).get(t)._setVisible(h,!0);for(const t of e.off)c(this,p).get(t)._setVisible(h,!1);o(this,g,new Map);for(const[e,t]of c(this,p))c(this,g).set(e,t.visible)}}isVisible(e){if(0===c(this,p).size)return!0;if(!e)return(0,n.warn)("Optional content group not defined."),!0;if("OCG"===e.type)return c(this,p).has(e.id)?c(this,p).get(e.id).visible:((0,n.warn)("Optional content group not found: "+e.id),!0);if("OCMD"===e.type){if(e.expression)return a(this,b,y).call(this,e.expression);if(!e.policy||"AnyOn"===e.policy){for(const t of e.ids){if(!c(this,p).has(t))return(0,n.warn)("Optional content group not found: "+t),!0;if(c(this,p).get(t).visible)return!0}return!1}if("AllOn"===e.policy){for(const t of e.ids){if(!c(this,p).has(t))return(0,n.warn)("Optional content group not found: "+t),!0;if(!c(this,p).get(t).visible)return!1}return!0}if("AnyOff"===e.policy){for(const t of e.ids){if(!c(this,p).has(t))return(0,n.warn)("Optional content group not found: "+t),!0;if(!c(this,p).get(t).visible)return!0}return!1}if("AllOff"===e.policy){for(const t of e.ids){if(!c(this,p).has(t))return(0,n.warn)("Optional content group not found: "+t),!0;if(c(this,p).get(t).visible)return!1}return!0}return(0,n.warn)(`Unknown optional content policy ${e.policy}.`),!0}return(0,n.warn)(`Unknown group type ${e.type}.`),!0}setVisibility(e){let t=1>=arguments.length||void 0===arguments[1]||arguments[1];c(this,p).has(e)?(c(this,p).get(e)._setVisible(h,!!t),o(this,f,null)):(0,n.warn)("Optional content group not found: "+e)}get hasInitialVisibility(){if(null!==c(this,f))return c(this,f);for(const[e,t]of c(this,p)){const r=c(this,g).get(e);if(t.visible!==r)return o(this,f,!1)}return o(this,f,!0)}getOrder(){return c(this,p).size?c(this,m)?c(this,m).slice():[...c(this,p).keys()]:null}getGroups(){return c(this,p).size>0?(0,n.objectFromMap)(c(this,p)):null}getGroup(e){return c(this,p).get(e)||null}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var n=r(1),a=r(133);t.PDFDataTransportStream=class{constructor(e,t){(0,n.assert)(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=e.progressiveDone||!1,this._contentDispositionFilename=e.contentDispositionFilename||null;const r=e.initialData;if((null==r?void 0:r.length)>0){const e=new Uint8Array(r).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._contentLength=e.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(((e,t)=>{this._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener(((e,t)=>{this._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((e=>{this._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}_onReceiveData(e){const t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{const r=this._rangeReaders.some((function(r){return r._begin===e.begin&&(r._enqueue(t),!0)}));(0,n.assert)(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}_onProgress(e){if(void 0===e.total){const t=this._rangeReaders[0];null!=t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{const t=this._fullRequestReader;null!=t&&t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}}_onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);0>t||this._rangeReaders.splice(t,1)}getFullReader(){(0,n.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new i(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(this._progressiveDataLength>=t)return null;const r=new s(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);for(const t of this._rangeReaders.slice(0))t.cancel(e);this._pdfDataRangeTransport.abort()}};class i{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this._stream=e,this._done=r||!1,this._filename=(0,a.isPdfFile)(n)?n:null,this._queuedChunks=t||[],this._loaded=0;for(const e of this._queuedChunks)this._loaded+=e.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=(0,n.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class s{constructor(e,t,r){this._stream=e,this._begin=t,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,n.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;class r{static textContent(e){const t=[],n={items:t,styles:Object.create(null)};return function e(n){var a;if(!n)return;let i=null;const s=n.name;if("#text"===s)i=n.value;else{if(!r.shouldBuildText(s))return;null!=n&&null!==(a=n.attributes)&&void 0!==a&&a.textContent?i=n.attributes.textContent:n.value&&(i=n.value)}if(null!==i&&t.push({str:i}),n.children)for(const t of n.children)e(t)}(e),n}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}t.XfaText=r},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var n=r(134);const a=function(e){return new Promise(((t,r)=>{require$$7.readFile(e,((e,n)=>{!e&&n?t(new Uint8Array(n)):r(Error(e))}))}))};t.NodeCanvasFactory=class extends n.BaseCanvasFactory{_createCanvas(e,t){return require$$7.createCanvas(e,t)}},t.NodeCMapReaderFactory=class extends n.BaseCMapReaderFactory{_fetchData(e,t){return a(e).then((e=>({cMapData:e,compressionType:t})))}},t.NodeStandardFontDataFactory=class extends n.BaseStandardFontDataFactory{_fetchData(e){return a(e)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayer=void 0;var n=r(132),a=r(1),i=r(148),s=r(149);function o(e,t){l(e,t),t.add(e)}function c(e,t,r){l(e,t),t.set(e,r)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function u(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,f(e,t,"get"))}function d(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,f(e,t,"set"),r),r}function f(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var p,g,m,b=new WeakMap,y=new WeakMap,w=new WeakMap,v=new WeakMap,S=new WeakMap,x=new WeakMap,A=new WeakMap,k=new WeakMap,C=new WeakSet,_=new WeakSet,F=new WeakSet,T=new WeakSet;class O{constructor(e){o(this,T),o(this,F),o(this,_),o(this,C),c(this,b,{writable:!0,value:void 0}),c(this,y,{writable:!0,value:!1}),c(this,w,{writable:!0,value:this.pointerup.bind(this)}),c(this,v,{writable:!0,value:this.pointerdown.bind(this)}),c(this,S,{writable:!0,value:new Map}),c(this,x,{writable:!0,value:!1}),c(this,A,{writable:!0,value:!1}),c(this,k,{writable:!0,value:void 0}),O._initialized||(O._initialized=!0,i.FreeTextEditor.initialize(e.l10n),s.InkEditor.initialize(e.l10n),e.uiManager.registerEditorTypes([i.FreeTextEditor,s.InkEditor])),d(this,k,e.uiManager),this.annotationStorage=e.annotationStorage,this.pageIndex=e.pageIndex,this.div=e.div,d(this,b,e.accessibilityManager),u(this,k).addLayer(this)}updateToolbar(e){u(this,k).updateToolbar(e)}updateMode(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u(this,k).getMode();h(this,T,M).call(this),e===a.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),u(this,k).unselectAll()}addInkEditorIfNeeded(e){if(e||u(this,k).getMode()===a.AnnotationEditorType.INK){if(!e)for(const e of u(this,S).values())if(e.isEmpty())return void e.setInBackground();h(this,F,E).call(this,{offsetX:0,offsetY:0}).setInBackground()}}setEditingState(e){u(this,k).setEditingState(e)}addCommands(e){u(this,k).addCommands(e)}enable(){this.div.style.pointerEvents="auto";for(const e of u(this,S).values())e.enableEditing()}disable(){this.div.style.pointerEvents="none";for(const e of u(this,S).values())e.disableEditing()}setActiveEditor(e){u(this,k).getActive()!==e&&u(this,k).setActiveEditor(e)}enableClick(){this.div.addEventListener("pointerdown",u(this,v)),this.div.addEventListener("pointerup",u(this,w))}disableClick(){this.div.removeEventListener("pointerdown",u(this,v)),this.div.removeEventListener("pointerup",u(this,w))}attach(e){u(this,S).set(e.id,e)}detach(e){var t;u(this,S).delete(e.id),null===(t=u(this,b))||void 0===t||t.removePointerInTextLayer(e.contentDiv)}remove(e){u(this,k).removeEditor(e),this.detach(e),this.annotationStorage.remove(e.id),e.div.style.display="none",setTimeout((()=>{e.div.style.display="",e.div.remove(),e.isAttachedToDOM=!1,document.activeElement===document.body&&u(this,k).focusMainContainer()}),0),u(this,A)||this.addInkEditorIfNeeded(!1)}add(e){if(h(this,C,P).call(this,e),u(this,k).addEditor(e),this.attach(e),!e.isAttachedToDOM){const t=e.render();this.div.append(t),e.isAttachedToDOM=!0}this.moveEditorInDOM(e),e.onceAdded(),this.addToAnnotationStorage(e)}moveEditorInDOM(e){var t;null===(t=u(this,b))||void 0===t||t.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addToAnnotationStorage(e){e.isEmpty()||this.annotationStorage.has(e.id)||this.annotationStorage.setValue(e.id,e)}addOrRebuild(e){e.needsToBeRebuilt()?e.rebuild():this.add(e)}addANewEditor(e){this.addCommands({cmd:()=>{this.addOrRebuild(e)},undo:()=>{e.remove()},mustExec:!0})}addUndoableEditor(e){this.addCommands({cmd:()=>{this.addOrRebuild(e)},undo:()=>{e.remove()},mustExec:!1})}getNextId(){return u(this,k).getId()}deserialize(e){switch(e.annotationType){case a.AnnotationEditorType.FREETEXT:return i.FreeTextEditor.deserialize(e,this);case a.AnnotationEditorType.INK:return s.InkEditor.deserialize(e,this)}return null}setSelected(e){u(this,k).setSelected(e)}toggleSelected(e){u(this,k).toggleSelected(e)}isSelected(e){return u(this,k).isSelected(e)}unselect(e){u(this,k).unselect(e)}pointerup(e){0!==e.button||e.ctrlKey&&n.KeyboardManager.platform.isMac||e.target===this.div&&u(this,x)&&(d(this,x,!1),u(this,y)?h(this,F,E).call(this,e):d(this,y,!0))}pointerdown(e){if(0!==e.button||e.ctrlKey&&n.KeyboardManager.platform.isMac)return;if(e.target!==this.div)return;d(this,x,!0);const t=u(this,k).getActive();d(this,y,!t||t.isEmpty())}drop(e){const t=e.dataTransfer.getData("text/plain"),r=u(this,k).getEditor(t);if(!r)return;e.preventDefault(),e.dataTransfer.dropEffect="move",h(this,C,P).call(this,r);const n=this.div.getBoundingClientRect();r.translate(e.clientX-n.x-r.startX,e.clientY-n.y-r.startY),this.moveEditorInDOM(r),r.div.focus()}dragover(e){e.preventDefault()}destroy(){var e;(null===(e=u(this,k).getActive())||void 0===e?void 0:e.parent)===this&&u(this,k).setActiveEditor(null);for(const e of u(this,S).values()){var t;null===(t=u(this,b))||void 0===t||t.removePointerInTextLayer(e.contentDiv),e.isAttachedToDOM=!1,e.div.remove(),e.parent=null}this.div=null,u(this,S).clear(),u(this,k).removeLayer(this)}render(e){this.viewport=e.viewport,(0,n.bindEvents)(this,this.div,["dragover","drop"]),this.setDimensions();for(const e of u(this,k).getEditors(this.pageIndex))this.add(e);this.updateMode()}update(e){this.viewport=e.viewport,this.setDimensions(),this.updateMode()}get scaleFactor(){return this.viewport.scale}get pageDimensions(){const[e,t,r,n]=this.viewport.viewBox;return[r-e,n-t]}get viewportBaseDimensions(){const{width:e,height:t,rotation:r}=this.viewport;return r%180==0?[e,t]:[t,e]}setDimensions(){const{width:e,height:t,rotation:r}=this.viewport,n=r%180!=0,a=Math.floor(e)+"px",i=Math.floor(t)+"px";this.div.style.width=n?i:a,this.div.style.height=n?a:i,this.div.setAttribute("data-main-rotation",r)}}function P(e){var t;e.parent!==this&&(this.attach(e),e.pageIndex=this.pageIndex,null===(t=e.parent)||void 0===t||t.detach(e),e.parent=this,e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}function I(e){switch(u(this,k).getMode()){case a.AnnotationEditorType.FREETEXT:return new i.FreeTextEditor(e);case a.AnnotationEditorType.INK:return new s.InkEditor(e)}return null}function E(e){const t=this.getNextId(),r=h(this,_,I).call(this,{parent:this,id:t,x:e.offsetX,y:e.offsetY});return r&&this.add(r),r}function M(){d(this,A,!0);for(const e of u(this,S).values())e.isEmpty()&&e.remove();d(this,A,!1)}t.AnnotationEditorLayer=O,m=!1,(g="_initialized")in(p=O)?Object.defineProperty(p,g,{value:m,enumerable:!0,configurable:!0,writable:!0}):p[g]=m},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FreeTextEditor=void 0;var n=r(1),a=r(132),i=r(131);function s(e,t){l(e,t),t.add(e)}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t,r){l(e,t),t.set(e,r)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,f(e,t,"get"))}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function d(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,f(e,t,"set"),r),r}function f(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var p=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,y=new WeakMap,w=new WeakMap,v=new WeakMap,S=new WeakSet,x=new WeakSet,A=new WeakSet,k=new WeakSet;class C extends i.AnnotationEditor{constructor(e){super({...e,name:"freeTextEditor"}),s(this,k),s(this,A),s(this,x),s(this,S),c(this,p,{writable:!0,value:this.editorDivBlur.bind(this)}),c(this,g,{writable:!0,value:this.editorDivFocus.bind(this)}),c(this,m,{writable:!0,value:this.editorDivKeydown.bind(this)}),c(this,b,{writable:!0,value:void 0}),c(this,y,{writable:!0,value:""}),c(this,w,{writable:!0,value:!1}),c(this,v,{writable:!0,value:void 0}),d(this,b,e.color||C._defaultColor||i.AnnotationEditor._defaultLineColor),d(this,v,e.fontSize||C._defaultFontSize)}static initialize(e){this._l10nPromise=new Map(["free_text_default_content","editor_free_text_aria_label"].map((t=>[t,e.get(t)])));const t=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(t.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,t){switch(e){case n.AnnotationEditorParamsType.FREETEXT_SIZE:C._defaultFontSize=t;break;case n.AnnotationEditorParamsType.FREETEXT_COLOR:C._defaultColor=t}}updateParams(e,t){switch(e){case n.AnnotationEditorParamsType.FREETEXT_SIZE:u(this,S,_).call(this,t);break;case n.AnnotationEditorParamsType.FREETEXT_COLOR:u(this,x,F).call(this,t)}}static get defaultPropertiesToUpdate(){return[[n.AnnotationEditorParamsType.FREETEXT_SIZE,C._defaultFontSize],[n.AnnotationEditorParamsType.FREETEXT_COLOR,C._defaultColor||i.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[n.AnnotationEditorParamsType.FREETEXT_SIZE,h(this,v)],[n.AnnotationEditorParamsType.FREETEXT_COLOR,h(this,b)]]}getInitialTranslation(){return[-C._internalPadding*this.parent.scaleFactor,-(C._internalPadding+h(this,v))*this.parent.scaleFactor]}rebuild(){super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(n.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.enableEditing(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this.div.draggable=!1,this.editorDiv.addEventListener("keydown",h(this,m)),this.editorDiv.addEventListener("focus",h(this,g)),this.editorDiv.addEventListener("blur",h(this,p)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.disableEditing(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.draggable=!0,this.editorDiv.removeEventListener("keydown",h(this,m)),this.editorDiv.removeEventListener("focus",h(this,g)),this.editorDiv.removeEventListener("blur",h(this,p)),this.div.focus(),this.isEditing=!1)}focusin(e){super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus()}onceAdded(){this.width||(this.enableEditMode(),this.editorDiv.focus())}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent.setEditingState(!0),super.remove()}commit(){super.commit(),h(this,w)||(d(this,w,!0),this.parent.addUndoableEditor(this)),this.disableEditMode(),d(this,y,u(this,A,T).call(this).trimEnd()),u(this,k,O).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}dblclick(e){this.enableEditMode(),this.editorDiv.focus()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enableEditMode(),this.editorDiv.focus())}editorDivKeydown(e){C._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.id+"-editor"),this.enableEditing(),C._l10nPromise.get("editor_free_text_aria_label").then((e=>{var t;return null===(t=this.editorDiv)||void 0===t?void 0:t.setAttribute("aria-label",e)})),C._l10nPromise.get("free_text_default_content").then((e=>{var t;return null===(t=this.editorDiv)||void 0===t?void 0:t.setAttribute("default-content",e)})),this.editorDiv.contentEditable=!0;const{style:r}=this.editorDiv;if(r.fontSize=`calc(${h(this,v)}px * var(--scale-factor))`,r.color=h(this,b),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,a.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[r,n]=this.parent.viewportBaseDimensions;this.setAt(e*r,t*n,this.width*r,this.height*n);for(const e of h(this,y).split("\n")){const t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(t)}this.div.draggable=!0,this.editorDiv.contentEditable=!1}else this.div.draggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(e,t){const r=super.deserialize(e,t);return d(r,v,e.fontSize),d(r,b,n.Util.makeHexColor(...e.color)),d(r,y,e.value),r}serialize(){if(this.isEmpty())return null;const e=C._internalPadding*this.parent.scaleFactor,t=this.getRect(e,e),r=i.AnnotationEditor._colorManager.convert(getComputedStyle(this.editorDiv).color);return{annotationType:n.AnnotationEditorType.FREETEXT,color:r,fontSize:h(this,v),value:h(this,y),pageIndex:this.parent.pageIndex,rect:t,rotation:this.rotation}}}function _(e){const t=e=>{this.editorDiv.style.fontSize=`calc(${e}px * var(--scale-factor))`,this.translate(0,-(e-h(this,v))*this.parent.scaleFactor),d(this,v,e),u(this,k,O).call(this)},r=h(this,v);this.parent.addCommands({cmd:()=>{t(e)},undo:()=>{t(r)},mustExec:!0,type:n.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}function F(e){const t=h(this,b);this.parent.addCommands({cmd:()=>{d(this,b,e),this.editorDiv.style.color=e},undo:()=>{d(this,b,t),this.editorDiv.style.color=t},mustExec:!0,type:n.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function T(){const e=this.editorDiv.getElementsByTagName("div");if(0===e.length)return this.editorDiv.innerText;const t=[];for(let r=0,n=e.length;n>r;r++){const n=e[r].firstChild;t.push("#text"===(null==n?void 0:n.nodeName)?n.data:"")}return t.join("\n")}function O(){const[e,t]=this.parent.viewportBaseDimensions,r=this.div.getBoundingClientRect();this.width=r.width/e,this.height=r.height/t}t.FreeTextEditor=C,o(C,"_freeTextDefaultContent",""),o(C,"_l10nPromise",void 0),o(C,"_internalPadding",0),o(C,"_defaultColor",null),o(C,"_defaultFontSize",10),o(C,"_keyboardManager",new a.KeyboardManager([[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],C.prototype.commitOrRemove]])),o(C,"_type","freetext")},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0,Object.defineProperty(t,"fitCurve",{enumerable:!0,get:function(){return i.fitCurve}});var n=r(1),a=r(131),i=r(150),s=r(132);function o(e,t){h(e,t),t.add(e)}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t,r){return function(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}(e,t),r}function d(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,p(e,t,"set"),r),r}function f(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,p(e,t,"get"))}function p(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function g(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const m=16;var b=new WeakMap,y=new WeakMap,w=new WeakMap,v=new WeakMap,S=new WeakMap,x=new WeakMap,A=new WeakMap,k=new WeakMap,C=new WeakMap,_=new WeakMap,F=new WeakMap,T=new WeakMap,O=new WeakMap,P=new WeakMap,I=new WeakSet,E=new WeakSet,M=new WeakSet,R=new WeakSet,D=new WeakSet,N=new WeakSet,L=new WeakSet,j=new WeakSet,B=new WeakSet,U=new WeakSet,$=new WeakSet,q=new WeakSet,X=new WeakSet,H=new WeakSet,W=new WeakSet,z=new WeakSet,G=new WeakSet,V=new WeakSet,Y=new WeakSet,K=new WeakSet,J=new WeakSet,Z=new WeakSet;class Q extends a.AnnotationEditor{constructor(e){super({...e,name:"inkEditor"}),o(this,Z),o(this,J),o(this,K),o(this,Y),o(this,V),o(this,G),o(this,z),o(this,W),o(this,H),o(this,X),o(this,q),o(this,$),o(this,U),o(this,B),o(this,j),o(this,L),o(this,N),o(this,D),o(this,R),o(this,M),o(this,E),o(this,I),l(this,b,{writable:!0,value:0}),l(this,y,{writable:!0,value:0}),l(this,w,{writable:!0,value:0}),l(this,v,{writable:!0,value:this.canvasPointermove.bind(this)}),l(this,S,{writable:!0,value:this.canvasPointerleave.bind(this)}),l(this,x,{writable:!0,value:this.canvasPointerup.bind(this)}),l(this,A,{writable:!0,value:this.canvasPointerdown.bind(this)}),l(this,k,{writable:!0,value:!1}),l(this,C,{writable:!0,value:!1}),l(this,_,{writable:!0,value:null}),l(this,F,{writable:!0,value:null}),l(this,T,{writable:!0,value:0}),l(this,O,{writable:!0,value:0}),l(this,P,{writable:!0,value:null}),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0}static initialize(e){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink_aria_label"].map((t=>[t,e.get(t)])))}static updateDefaultParams(e,t){switch(e){case n.AnnotationEditorParamsType.INK_THICKNESS:Q._defaultThickness=t;break;case n.AnnotationEditorParamsType.INK_COLOR:Q._defaultColor=t;break;case n.AnnotationEditorParamsType.INK_OPACITY:Q._defaultOpacity=t/100}}updateParams(e,t){switch(e){case n.AnnotationEditorParamsType.INK_THICKNESS:g(this,I,ee).call(this,t);break;case n.AnnotationEditorParamsType.INK_COLOR:g(this,E,te).call(this,t);break;case n.AnnotationEditorParamsType.INK_OPACITY:g(this,M,re).call(this,t)}}static get defaultPropertiesToUpdate(){return[[n.AnnotationEditorParamsType.INK_THICKNESS,Q._defaultThickness],[n.AnnotationEditorParamsType.INK_COLOR,Q._defaultColor||a.AnnotationEditor._defaultLineColor],[n.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*Q._defaultOpacity)]]}get propertiesToUpdate(){var e;return[[n.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||Q._defaultThickness],[n.AnnotationEditorParamsType.INK_COLOR,this.color||Q._defaultColor||a.AnnotationEditor._defaultLineColor],[n.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(null!==(e=this.opacity)&&void 0!==e?e:Q._defaultOpacity))]]}rebuild(){super.rebuild(),null!==this.div&&(this.canvas||(g(this,$,he).call(this),g(this,q,ue).call(this)),this.isAttachedToDOM||(this.parent.add(this),g(this,X,de).call(this)),g(this,J,Se).call(this))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,f(this,F).disconnect(),d(this,F,null),super.remove())}enableEditMode(){f(this,k)||null===this.canvas||(super.enableEditMode(),this.div.draggable=!1,this.canvas.addEventListener("pointerdown",f(this,A)),this.canvas.addEventListener("pointerup",f(this,x)))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this.div.draggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",f(this,A)),this.canvas.removeEventListener("pointerup",f(this,x)))}onceAdded(){this.div.draggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}commit(){f(this,k)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),d(this,k,!0),this.div.classList.add("disabled"),g(this,J,Se).call(this,!0),this.parent.addInkEditorIfNeeded(!0),this.parent.moveEditorInDOM(this),this.div.focus())}focusin(e){super.focusin(e),this.enableEditMode()}canvasPointerdown(e){0===e.button&&this.isInEditMode()&&!f(this,k)&&(this.setInForeground(),"mouse"!==e.type&&this.div.focus(),e.stopPropagation(),this.canvas.addEventListener("pointerleave",f(this,S)),this.canvas.addEventListener("pointermove",f(this,v)),g(this,N,ie).call(this,e.offsetX,e.offsetY))}canvasPointermove(e){e.stopPropagation(),g(this,L,se).call(this,e.offsetX,e.offsetY)}canvasPointerup(e){0===e.button&&this.isInEditMode()&&0!==this.currentPath.length&&(e.stopPropagation(),g(this,U,le).call(this,e),this.setInBackground())}canvasPointerleave(e){g(this,U,le).call(this,e),this.setInBackground()}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),Q._l10nPromise.get("editor_ink_aria_label").then((e=>{var t;return null===(t=this.div)||void 0===t?void 0:t.setAttribute("aria-label",e)}));const[r,n,a,i]=g(this,R,ne).call(this);if(this.setAt(r,n,0,0),this.setDims(a,i),g(this,$,he).call(this),this.width){const[r,n]=this.parent.viewportBaseDimensions;this.setAt(e*r,t*n,this.width*r,this.height*n),d(this,C,!0),g(this,X,de).call(this),this.setDims(this.width*r,this.height*n),g(this,B,ce).call(this),g(this,Z,xe).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return g(this,q,ue).call(this),this.div}setDimensions(e,t){const r=Math.round(e),n=Math.round(t);if(f(this,T)===r&&f(this,O)===n)return;d(this,T,r),d(this,O,n),this.canvas.style.visibility="hidden",f(this,b)&&Math.abs(f(this,b)-e/t)>.01&&(t=Math.ceil(e/f(this,b)),this.setDims(e,t));const[a,i]=this.parent.viewportBaseDimensions;this.width=e/a,this.height=t/i,f(this,k)&&g(this,H,fe).call(this,e,t),g(this,X,de).call(this),g(this,B,ce).call(this),this.canvas.style.visibility="visible"}static deserialize(e,t){const r=super.deserialize(e,t);r.thickness=e.thickness,r.color=n.Util.makeHexColor(...e.color),r.opacity=e.opacity;const[a,i]=t.pageDimensions,s=r.width*a,o=r.height*i,c=t.scaleFactor,l=e.thickness/2;d(r,b,s/o),d(r,k,!0),d(r,T,Math.round(s)),d(r,O,Math.round(o));for(const{bezier:t}of e.paths){const e=[];r.paths.push(e);let n=c*(t[0]-l),a=c*(o-t[1]-l);for(let r=2,i=t.length;i>r;r+=6){const i=c*(t[r+4]-l),s=c*(o-t[r+5]-l);e.push([[n,a],[c*(t[r]-l),c*(o-t[r+1]-l)],[c*(t[r+2]-l),c*(o-t[r+3]-l)],[i,s]]),n=i,a=s}const i=u(this,Q,ge).call(this,e);r.bezierPath2D.push(i)}const h=g(r,Y,we).call(r);return d(r,w,Math.max(m,h[2]-h[0])),d(r,y,Math.max(m,h[3]-h[1])),g(r,H,fe).call(r,s,o),r}serialize(){if(this.isEmpty())return null;const e=this.getRect(0,0),t=this.rotation%180==0?e[3]-e[1]:e[2]-e[0],r=a.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:n.AnnotationEditorType.INK,color:r,thickness:this.thickness,opacity:this.opacity,paths:g(this,z,me).call(this,this.scaleFactor/this.parent.scaleFactor,this.translationX,this.translationY,t),pageIndex:this.parent.pageIndex,rect:e,rotation:this.rotation}}}function ee(e){const t=this.thickness;this.parent.addCommands({cmd:()=>{this.thickness=e,g(this,J,Se).call(this)},undo:()=>{this.thickness=t,g(this,J,Se).call(this)},mustExec:!0,type:n.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}function te(e){const t=this.color;this.parent.addCommands({cmd:()=>{this.color=e,g(this,B,ce).call(this)},undo:()=>{this.color=t,g(this,B,ce).call(this)},mustExec:!0,type:n.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function re(e){e/=100;const t=this.opacity;this.parent.addCommands({cmd:()=>{this.opacity=e,g(this,B,ce).call(this)},undo:()=>{this.opacity=t,g(this,B,ce).call(this)},mustExec:!0,type:n.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}function ne(){const{width:e,height:t,rotation:r}=this.parent.viewport;switch(r){case 90:return[0,e,e,t];case 180:return[e,t,e,t];case 270:return[t,0,e,t];default:return[0,0,e,t]}}function ae(){this.ctx.lineWidth=this.thickness*this.parent.scaleFactor/this.scaleFactor,this.ctx.lineCap="round",this.ctx.lineJoin="round",this.ctx.miterLimit=10,this.ctx.strokeStyle=`${this.color}${(0,s.opacityToHex)(this.opacity)}`}function ie(e,t){var r;this.isEditing=!0,f(this,C)||(d(this,C,!0),g(this,X,de).call(this),this.thickness||(this.thickness=Q._defaultThickness),this.color||(this.color=Q._defaultColor||a.AnnotationEditor._defaultLineColor),null!==(r=this.opacity)&&void 0!==r||(this.opacity=Q._defaultOpacity)),this.currentPath.push([e,t]),d(this,_,null),g(this,D,ae).call(this),this.ctx.beginPath(),this.ctx.moveTo(e,t),d(this,P,(()=>{f(this,P)&&(f(this,_)&&(this.isEmpty()?(this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height)):g(this,B,ce).call(this),this.ctx.lineTo(...f(this,_)),d(this,_,null),this.ctx.stroke()),window.requestAnimationFrame(f(this,P)))})),window.requestAnimationFrame(f(this,P))}function se(e,t){const[r,n]=this.currentPath.at(-1);e===r&&t===n||(this.currentPath.push([e,t]),d(this,_,[e,t]))}function oe(e,t){this.ctx.closePath(),d(this,P,null),e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height);const[r,n]=this.currentPath.at(-1);let a;if(e===r&&t===n||this.currentPath.push([e,t]),1!==this.currentPath.length)a=(0,i.fitCurve)(this.currentPath,30,null);else{const r=[e,t];a=[[r,r.slice(),r.slice(),r]]}const s=u(Q,Q,ge).call(Q,a);this.currentPath.length=0,this.parent.addCommands({cmd:()=>{this.paths.push(a),this.bezierPath2D.push(s),this.rebuild()},undo:()=>{this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(g(this,$,he).call(this),g(this,q,ue).call(this)),g(this,J,Se).call(this))},mustExec:!0})}function ce(){if(this.isEmpty())return void g(this,W,pe).call(this);g(this,D,ae).call(this);const{canvas:e,ctx:t}=this;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),g(this,W,pe).call(this);for(const e of this.bezierPath2D)t.stroke(e)}function le(e){g(this,j,oe).call(this,e.offsetX,e.offsetY),this.canvas.removeEventListener("pointerleave",f(this,S)),this.canvas.removeEventListener("pointermove",f(this,v)),this.parent.addToAnnotationStorage(this)}function he(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",Q._l10nPromise.get("editor_ink_canvas_aria_label").then((e=>{var t;return null===(t=this.canvas)||void 0===t?void 0:t.setAttribute("aria-label",e)})),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}function ue(){d(this,F,new ResizeObserver((e=>{const t=e[0].contentRect;t.width&&t.height&&this.setDimensions(t.width,t.height)}))),f(this,F).observe(this.div)}function de(){if(!f(this,C))return;const[e,t]=this.parent.viewportBaseDimensions;this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),g(this,W,pe).call(this)}function fe(e,t){const r=g(this,K,ve).call(this),n=(e-r)/f(this,w),a=(t-r)/f(this,y);this.scaleFactor=Math.min(n,a)}function pe(){const e=g(this,K,ve).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)}function ge(e){const t=new Path2D;for(let r=0,n=e.length;n>r;r++){const[n,a,i,s]=e[r];0===r&&t.moveTo(...n),t.bezierCurveTo(a[0],a[1],i[0],i[1],s[0],s[1])}return t}function me(e,t,r,n){const a=[],i=this.thickness/2;let s,o;for(const c of this.paths){s=[],o=[];for(let a=0,l=c.length;l>a;a++){const[l,h,u,d]=c[a],f=e*(l[0]+t)+i,p=n-e*(l[1]+r)-i,m=e*(h[0]+t)+i,b=n-e*(h[1]+r)-i,y=e*(u[0]+t)+i,w=n-e*(u[1]+r)-i,v=e*(d[0]+t)+i,S=n-e*(d[1]+r)-i;0===a&&(s.push(f,p),o.push(f,p)),s.push(m,b,y,w,v,S),g(this,G,be).call(this,f,p,m,b,y,w,v,S,4,o)}a.push({bezier:s,points:o})}return a}function be(e,t,r,n,a,i,s,o,c,l){if(g(this,V,ye).call(this,e,t,r,n,a,i,s,o))l.push(s,o);else{for(let h=1;c-1>h;h++){const u=h/c,d=1-u;let f=u*e+d*r,p=u*t+d*n,g=u*r+d*a,m=u*n+d*i;f=u*f+d*g,p=u*p+d*m,g=u*g+d*(u*a+d*s),m=u*m+d*(u*i+d*o),f=u*f+d*g,p=u*p+d*m,l.push(f,p)}l.push(s,o)}}function ye(e,t,r,n,a,i,s,o){const c=(3*n-2*t-o)**2,l=(3*i-t-2*o)**2;return 10>=Math.max((3*r-2*e-s)**2,(3*a-e-2*s)**2)+Math.max(c,l)}function we(){let e=1/0,t=-1/0,r=1/0,a=-1/0;for(const i of this.paths)for(const[s,o,c,l]of i){const i=n.Util.bezierBoundingBox(...s,...o,...c,...l);e=Math.min(e,i[0]),r=Math.min(r,i[1]),t=Math.max(t,i[2]),a=Math.max(a,i[3])}return[e,r,t,a]}function ve(){return f(this,k)?Math.ceil(this.thickness*this.parent.scaleFactor):0}function Se(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return;if(!f(this,k))return void g(this,B,ce).call(this);const t=g(this,Y,we).call(this),r=g(this,K,ve).call(this);d(this,w,Math.max(m,t[2]-t[0])),d(this,y,Math.max(m,t[3]-t[1]));const n=Math.ceil(r+f(this,w)*this.scaleFactor),a=Math.ceil(r+f(this,y)*this.scaleFactor),[i,s]=this.parent.viewportBaseDimensions;this.width=n/i,this.height=a/s,d(this,b,n/a),g(this,Z,xe).call(this);const o=this.translationX,c=this.translationY;this.translationX=-t[0],this.translationY=-t[1],g(this,X,de).call(this),g(this,B,ce).call(this),d(this,T,n),d(this,O,a),this.setDims(n,a);const l=e?r/this.scaleFactor/2:0;this.translate(o-this.translationX-l,c-this.translationY-l)}function xe(){const{style:e}=this.div;1>f(this,b)?(e.minWidth="16px",e.minHeight=Math.round(m/f(this,b))+"px"):(e.minHeight="16px",e.minWidth=Math.round(f(this,b)*m)+"px")}t.InkEditor=Q,c(Q,"_defaultColor",null),c(Q,"_defaultOpacity",1),c(Q,"_defaultThickness",1),c(Q,"_l10nPromise",void 0),c(Q,"_type","ink")},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fitCurve=void 0;const n=r(151);t.fitCurve=n},e=>{function t(e,a,i,s,o){var l,h,u,d,f,p,g,m,b,y,w,v,S;if(2===e.length)return v=c.vectorLen(c.subtract(e[0],e[1]))/3,[l=[e[0],c.addArrays(e[0],c.mulItems(a,v)),c.addArrays(e[1],c.mulItems(i,v)),e[1]]];if(h=function(e){var t,r,n,a=[];return e.forEach(((e,i)=>{t=i?r+c.vectorLen(c.subtract(e,n)):0,a.push(t),r=t,n=e})),a=a.map((e=>e/r))}(e),[l,d,p]=r(e,h,h,a,i,o),0===d||s>d)return[l];if(s*s>d)for(u=h,f=d,g=p,S=0;20>S;S++){if(u=n(l,e,u),[l,d,p]=r(e,h,u,a,i,o),s>d)return[l];if(p===g){let e=d/f;if(e>.9999&&1.0001>e)break}f=d,g=p}return w=[],(m=c.subtract(e[p-1],e[p+1])).every((e=>0===e))&&(m=c.subtract(e[p-1],e[p]),[m[0],m[1]]=[-m[1],m[0]]),b=c.normalize(m),y=c.mulItems(b,-1),w=(w=w.concat(t(e.slice(0,p+1),a,b,s,o))).concat(t(e.slice(p),y,i,s,o))}function r(e,t,r,n,a,o){var h,u,d;return h=function(e,t,r,n){var a,i,s,o,h,u,d,f,p,g,m,b,y,w,v,S,x,A=e[0],k=e[e.length-1];for(a=[A,null,null,k],i=c.zeros_Xx2x2(t.length),y=0,w=t.length;w>y;y++)(s=i[y])[0]=c.mulItems(r,3*(S=t[y])*((x=1-S)*x)),s[1]=c.mulItems(n,3*x*(S*S));for(o=[[0,0],[0,0]],h=[0,0],y=0,w=e.length;w>y;y++)S=t[y],o[0][0]+=c.dot((s=i[y])[0],s[0]),o[0][1]+=c.dot(s[0],s[1]),o[1][0]+=c.dot(s[0],s[1]),o[1][1]+=c.dot(s[1],s[1]),v=c.subtract(e[y],l.q([A,A,k,k],S)),h[0]+=c.dot(s[0],v),h[1]+=c.dot(s[1],v);return d=o[0][0]*h[1]-o[1][0]*h[0],f=h[0]*o[1][1]-h[1]*o[0][1],p=0==(u=o[0][0]*o[1][1]-o[1][0]*o[0][1])?0:f/u,g=0===u?0:d/u,b=c.vectorLen(c.subtract(A,k)),(m=1e-6*b)>p||m>g?(a[1]=c.addArrays(A,c.mulItems(r,b/3)),a[2]=c.addArrays(k,c.mulItems(n,b/3))):(a[1]=c.addArrays(A,c.mulItems(r,p)),a[2]=c.addArrays(k,c.mulItems(n,g))),a}(e,r,n,a),[u,d]=function(e,t,r){var n,a,o,h,u,d,f,p;a=0,o=Math.floor(e.length/2);const g=i(t,10);for(u=0,d=e.length;d>u;u++)f=e[u],p=s(0,r[u],g,10),(n=(h=c.subtract(l.q(t,p),f))[0]*h[0]+h[1]*h[1])>a&&(a=n,o=u);return[a,o]}(e,h,t),o&&o({bez:h,points:e,params:t,maxErr:u,maxPoint:d}),[h,u,d]}function n(e,t,r){return r.map(((r,n)=>a(e,t[n],r)))}function a(e,t,r){var n=c.subtract(l.q(e,r),t),a=l.qprime(e,r),i=c.mulMatrix(n,a),s=c.sum(c.squareItems(a))+2*c.mulMatrix(n,l.qprimeprime(e,r));return 0===s?r:r-i/s}var i=function(e,t){for(var r,n=[0],a=e[0],i=0,s=1;t>=s;s++)r=l.q(e,s/t),i+=c.vectorLen(c.subtract(r,a)),n.push(i),a=r;return n=n.map((e=>e/i))};function s(e,t,r,n){if(0>t)return 0;if(t>1)return 1;for(var a,i,s,o=1;n>=o;o++)if(r[o]>=t){s=(t-(a=r[o-1]))/(r[o]-a)*(o/n-(i=(o-1)/n))+i;break}return s}function o(e,t){return c.normalize(c.subtract(e,t))}class c{static zeros_Xx2x2(e){for(var t=[];e--;)t.push([0,0]);return t}static mulItems(e,t){return e.map((e=>e*t))}static mulMatrix(e,t){return e.reduce(((e,r,n)=>e+r*t[n]),0)}static subtract(e,t){return e.map(((e,r)=>e-t[r]))}static addArrays(e,t){return e.map(((e,r)=>e+t[r]))}static addItems(e,t){return e.map((e=>e+t))}static sum(e){return e.reduce(((e,t)=>e+t))}static dot(e,t){return c.mulMatrix(e,t)}static vectorLen(e){return Math.hypot(...e)}static divItems(e,t){return e.map((e=>e/t))}static squareItems(e){return e.map((e=>e*e))}static normalize(e){return this.divItems(e,this.vectorLen(e))}}class l{static q(e,t){var r=1-t,n=c.mulItems(e[0],r*r*r),a=c.mulItems(e[1],3*r*r*t),i=c.mulItems(e[2],3*r*t*t),s=c.mulItems(e[3],t*t*t);return c.addArrays(c.addArrays(n,a),c.addArrays(i,s))}static qprime(e,t){var r=1-t,n=c.mulItems(c.subtract(e[1],e[0]),3*r*r),a=c.mulItems(c.subtract(e[2],e[1]),6*r*t),i=c.mulItems(c.subtract(e[3],e[2]),3*t*t);return c.addArrays(c.addArrays(n,a),i)}static qprimeprime(e,t){return c.addArrays(c.mulItems(c.addArrays(c.subtract(e[2],c.mulItems(e[1],2)),e[0]),6*(1-t)),c.mulItems(c.addArrays(c.subtract(e[3],c.mulItems(e[2],2)),e[1]),6*t))}}e.exports=function(e,r,n){if(!Array.isArray(e))throw new TypeError("First argument should be an array");if(e.forEach((t=>{if(!Array.isArray(t)||t.some((e=>"number"!=typeof e))||t.length!==e[0].length)throw Error("Each point should be an array of numbers. Each point should have the same amount of numbers.")})),2>(e=e.filter(((t,r)=>0===r||!t.every(((t,n)=>t===e[r-1][n]))))).length)return[];const a=e.length,i=o(e[1],e[0]),s=o(e[a-2],e[a-1]);return t(e,i,s,r,n)},e.exports.fitCubic=t,e.exports.createTangent=o},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var n=r(1),a=r(133),i=r(130),s=r(153),o=r(154);function c(e,t,r){return function(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}(e,t),r}const l=1e3,h=new WeakSet;function u(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class d{static create(e){switch(e.data.annotationType){case n.AnnotationType.LINK:return new p(e);case n.AnnotationType.TEXT:return new g(e);case n.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new b(e);case"Btn":return e.data.radioButton?new w(e):e.data.checkBox?new y(e):new v(e);case"Ch":return new S(e)}return new m(e);case n.AnnotationType.POPUP:return new x(e);case n.AnnotationType.FREETEXT:return new k(e);case n.AnnotationType.LINE:return new C(e);case n.AnnotationType.SQUARE:return new _(e);case n.AnnotationType.CIRCLE:return new F(e);case n.AnnotationType.POLYLINE:return new T(e);case n.AnnotationType.CARET:return new P(e);case n.AnnotationType.INK:return new I(e);case n.AnnotationType.POLYGON:return new O(e);case n.AnnotationType.HIGHLIGHT:return new E(e);case n.AnnotationType.UNDERLINE:return new M(e);case n.AnnotationType.SQUIGGLY:return new R(e);case n.AnnotationType.STRIKEOUT:return new D(e);case n.AnnotationType.STAMP:return new N(e);case n.AnnotationType.FILEATTACHMENT:return new L(e);default:return new f(e)}}}class f{constructor(e){let{isRenderable:t=!1,ignoreBorder:r=!1,createQuadrilaterals:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.page=e.page,this.viewport=e.viewport,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this._mouseState=e.mouseState,t&&(this.container=this._createContainer(r)),n&&(this.quadrilaterals=this._createQuadrilaterals(r))}_createContainer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.data,r=this.page,a=this.viewport,i=document.createElement("section"),{width:s,height:o}=u(t.rect),[c,l,h,d]=a.viewBox,f=h-c,p=d-l;i.setAttribute("data-annotation-id",t.id);const g=n.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(!e&&t.borderStyle.width>0){i.style.borderWidth=t.borderStyle.width+"px";const e=t.borderStyle.horizontalCornerRadius,r=t.borderStyle.verticalCornerRadius;switch(e>0||r>0?i.style.borderRadius=`calc(${e}px * var(--scale-factor)) / calc(${r}px * var(--scale-factor))`:this instanceof w&&(i.style.borderRadius=`calc(${s}px * var(--scale-factor)) / calc(${o}px * var(--scale-factor))`),t.borderStyle.style){case n.AnnotationBorderStyleType.SOLID:i.style.borderStyle="solid";break;case n.AnnotationBorderStyleType.DASHED:i.style.borderStyle="dashed";break;case n.AnnotationBorderStyleType.BEVELED:(0,n.warn)("Unimplemented border style: beveled");break;case n.AnnotationBorderStyleType.INSET:(0,n.warn)("Unimplemented border style: inset");break;case n.AnnotationBorderStyleType.UNDERLINE:i.style.borderBottomStyle="solid"}const a=t.borderColor||null;a?i.style.borderColor=n.Util.makeHexColor(0|a[0],0|a[1],0|a[2]):i.style.borderWidth=0}i.style.left=100*(g[0]-c)/f+"%",i.style.top=100*(g[1]-l)/p+"%";const{rotation:m}=t;return t.hasOwnCanvas||0===m?(i.style.width=100*s/f+"%",i.style.height=100*o/p+"%"):this.setRotation(m,i),i}setRotation(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;const[r,n,a,i]=this.viewport.viewBox,s=a-r,o=i-n,{width:c,height:l}=u(this.data.rect);let h,d;e%180==0?(h=100*c/s,d=100*l/o):(h=100*l/s,d=100*c/o),t.style.width=h+"%",t.style.height=d+"%",t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(e,t,r)=>{const n=r.detail[e];r.target.style[t]=s.ColorConverters[n[0]+"_HTML"](n.slice(1))};return(0,n.shadow)(this,"_commonActions",{display:e=>{const t=e.detail.display%2==1;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:t,print:0===e.detail.display||3===e.detail.display})},print:e=>{this.annotationStorage.setValue(this.data.id,{print:e.detail.print})},hidden:e=>{this.container.style.visibility=e.detail.hidden?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:e.detail.hidden})},focus:e=>{setTimeout((()=>e.target.focus({preventScroll:!1})),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.detail.readonly?e.target.setAttribute("readonly",""):e.target.removeAttribute("readonly")},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:e=>{const t=e.detail.rotation;this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(e,t){const r=this._commonActions;for(const n of Object.keys(t.detail)){const a=e[n]||r[n];a&&a(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const r=this._commonActions;for(const[n,a]of Object.entries(t)){const i=r[n];i&&(i({detail:{[n]:a},target:e}),delete t[n])}}_createQuadrilaterals(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.data.quadPoints)return null;const t=[],r=this.data.rect;for(const r of this.data.quadPoints)this.data.rect=[r[2].x,r[2].y,r[1].x,r[1].y],t.push(this._createContainer(e));return this.data.rect=r,t}_createPopup(e,t){let r=this.container;this.quadrilaterals&&(e=e||this.quadrilaterals,r=this.quadrilaterals[0]),e||((e=document.createElement("div")).className="popupTriggerArea",r.append(e));const n=new A({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="100%",r.append(n)}_renderQuadrilaterals(e){for(const t of this.quadrilaterals)t.className=e;return this.quadrilaterals}render(){(0,n.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=[];if(this._fieldObjects){const a=this._fieldObjects[e];if(a)for(const{page:e,id:i,exportValues:s}of a){if(-1===e)continue;if(i===t)continue;const a="string"==typeof s?s:null,o=document.querySelector(`[data-element-id="${i}"]`);!o||h.has(o)?r.push({id:i,exportValue:a,domElement:o}):(0,n.warn)("_getElementsByName - element not allowed: "+i)}return r}for(const n of document.getElementsByName(e)){const{id:e,exportValue:a}=n;e!==t&&h.has(n)&&r.push({id:e,exportValue:a,domElement:n})}return r}static get platform(){const e="undefined"!=typeof navigator?navigator.platform:"";return(0,n.shadow)(this,"platform",{isWin:e.includes("Win"),isMac:e.includes("Mac")})}}class p extends f{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(e,{isRenderable:!0,ignoreBorder:!(null==t||!t.ignoreBorder),createQuadrilaterals:!0}),this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:t}=this,r=document.createElement("a");r.setAttribute("data-element-id",e.id);let n=!1;return e.url?(t.addLinkAttributes(r,e.url,e.newWindow),n=!0):e.action?(this._bindNamedAction(r,e.action),n=!0):e.dest?(this._bindLink(r,e.dest),n=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(r,e),n=!0),e.resetForm?(this._bindResetFormAction(r,e.resetForm),n=!0):this.isTooltipOnly&&!n&&(this._bindLink(r,""),n=!0)),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map(((e,t)=>{const n=0===t?r:r.cloneNode();return e.append(n),e})):(this.container.className="linkAnnotation",n&&this.container.append(r),this.container)}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&(e.className="internalLink")}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),e.className="internalLink"}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");const r=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const n of Object.keys(t.actions)){const a=r.get(n);a&&(e[a]=()=>{var e;return null===(e=this.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:n}}),!1})}e.onclick||(e.onclick=()=>!1),e.className="internalLink"}_bindResetFormAction(e,t){const r=e.onclick;if(r||(e.href=this.linkService.getAnchorUrl("")),e.className="internalLink",!this._fieldObjects)return(0,n.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(r||(e.onclick=()=>!1));e.onclick=()=>{r&&r();const{fields:e,refs:a,include:i}=t,s=[];if(0!==e.length||0!==a.length){const t=new Set(a);for(const r of e){const e=this._fieldObjects[r]||[];for(const{id:r}of e)t.add(r)}for(const e of Object.values(this._fieldObjects))for(const r of e)t.has(r.id)===i&&s.push(r)}else for(const e of Object.values(this._fieldObjects))s.push(...e);const o=this.annotationStorage,c=[];for(const e of s){const{id:t}=e;switch(c.push(t),e.type){case"text":case"combobox":case"listbox":o.setValue(t,{value:e.defaultValue||""});break;case"checkbox":case"radiobutton":o.setValue(t,{value:e.defaultValue===e.exportValues});break;default:continue}const r=document.querySelector(`[data-element-id="${t}"]`);r&&(h.has(r)?r.dispatchEvent(new Event("resetform")):(0,n.warn)("_bindResetFormAction - element not allowed: "+t))}var l;return this.enableScripting&&(null===(l=this.linkService.eventBus)||void 0===l||l.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:c,name:"ResetForm"}})),!1}}}class g extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str)})}render(){this.container.className="textAnnotation";const e=document.createElement("img");return 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.append(e),this.container}}class m extends f{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}_getKeyModifier(e){const{isWin:t,isMac:r}=f.platform;return t&&e.ctrlKey||r&&e.metaKey}_setEventListener(e,t,r,n){t.includes("mouse")?e.addEventListener(t,(e=>{var t;null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:n(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})})):e.addEventListener(t,(e=>{var t;null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:n(e)}})}))}_setEventListeners(e,t,r){for(const[a,i]of t){var n;("Action"===i||null!==(n=this.data.actions)&&void 0!==n&&n[i])&&this._setEventListener(e,a,i,r)}}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":n.Util.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],{fontColor:r}=this.data.defaultAppearanceData,a=this.data.defaultAppearanceData.fontSize||9,i=e.style;let s;if(this.data.multiLine){const e=Math.abs(this.data.rect[3]-this.data.rect[1]);s=Math.min(a,Math.round(e/(Math.round(e/(n.LINE_FACTOR*a))||1)/n.LINE_FACTOR))}else s=Math.min(a,Math.round(Math.abs(this.data.rect[3]-this.data.rect[1])/n.LINE_FACTOR));i.fontSize=`calc(${s}px * var(--scale-factor))`,i.color=n.Util.makeHexColor(r[0],r[1],r[2]),null!==this.data.textAlignment&&(i.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class b extends m{constructor(e){super(e,{isRenderable:e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,r,n){const a=this.annotationStorage;for(const i of this._getElementsByName(e.name,e.id))i.domElement&&(i.domElement[t]=r),a.setValue(i.id,{[n]:r})}render(){const e=this.annotationStorage,t=this.data.id;this.container.className="textWidgetAnnotation";let r=null;if(this.renderForms){const a=e.getValue(t,{value:this.data.fieldValue});let i=a.formattedValue||a.value||"";const s=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;s&&i.length>s&&(i=i.slice(0,s));const o={userValue:i,formattedValue:null,valueOnFocus:""};this.data.multiLine?(r=document.createElement("textarea"),r.textContent=i,this.data.doNotScroll&&(r.style.overflowY="hidden")):(r=document.createElement("input"),r.type="text",r.setAttribute("value",i),this.data.doNotScroll&&(r.style.overflowX="hidden")),h.add(r),r.setAttribute("data-element-id",t),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=l,this._setRequired(r,this.data.required),s&&(r.maxLength=s),r.addEventListener("input",(n=>{e.setValue(t,{value:n.target.value}),this.setPropertyOnSiblings(r,"value",n.target.value,"value")})),r.addEventListener("resetform",(e=>{var t;const n=null!==(t=this.data.defaultFieldValue)&&void 0!==t?t:"";r.value=o.userValue=n,o.formattedValue=null}));let c=e=>{const{formattedValue:t}=o;null!=t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var n;r.addEventListener("focus",(e=>{o.userValue&&(e.target.value=o.userValue),o.valueOnFocus=e.target.value})),r.addEventListener("updatefromsandbox",(r=>{this._dispatchEventFromSandbox({value(r){var n;o.userValue=null!==(n=r.detail.value)&&void 0!==n?n:"",e.setValue(t,{value:""+o.userValue}),r.target.value=o.userValue},formattedValue(r){const{formattedValue:n}=r.detail;o.formattedValue=n,null!=n&&r.target!==document.activeElement&&(r.target.value=n),e.setValue(t,{formattedValue:n})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:r=>{var n;const{charLimit:a}=r.detail,{target:i}=r;if(0===a)return void i.removeAttribute("maxLength");i.setAttribute("maxLength",a);let s=o.userValue;s&&s.length>a&&(s=s.slice(0,a),i.value=o.userValue=s,e.setValue(t,{value:s}),null===(n=this.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:s,willCommit:!0,commitKey:1,selStart:i.selectionStart,selEnd:i.selectionEnd}}))}},r)})),r.addEventListener("keydown",(e=>{var r;let n=-1;if("Escape"===e.key?n=0:"Enter"===e.key?n=2:"Tab"===e.key&&(n=3),-1===n)return;const{value:a}=e.target;o.valueOnFocus!==a&&(o.userValue=a,null===(r=this.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:a,willCommit:!0,commitKey:n,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))}));const a=c;c=null,r.addEventListener("blur",(e=>{const{value:r}=e.target;var n;o.userValue=r,this._mouseState.isDown&&o.valueOnFocus!==r&&(null===(n=this.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:r,willCommit:!0,commitKey:1,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}})),a(e)})),null!==(n=this.data.actions)&&void 0!==n&&n.Keystroke&&r.addEventListener("beforeinput",(e=>{var r;const{data:n,target:a}=e,{value:i,selectionStart:s,selectionEnd:o}=a;let c=s,l=o;switch(e.inputType){case"deleteWordBackward":{const e=i.substring(0,s).match(/\w*[^\w]*$/);e&&(c-=e[0].length);break}case"deleteWordForward":{const e=i.substring(s).match(/^[^\w]*\w*/);e&&(l+=e[0].length);break}case"deleteContentBackward":s===o&&(c-=1);break;case"deleteContentForward":s===o&&(l+=1)}e.preventDefault(),null===(r=this.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:i,change:n||"",willCommit:!1,selStart:c,selEnd:l}})})),this._setEventListeners(r,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.value))}if(c&&r.addEventListener("blur",c),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/s;r.classList.add("comb"),r.style.letterSpacing=`calc(${e}px * var(--scale-factor) - 1ch)`}}else r=document.createElement("div"),r.textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell";return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class y extends m{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,r=t.id;let n=e.getValue(r,{value:t.exportValue===t.fieldValue}).value;"string"==typeof n&&(n="Off"!==n,e.setValue(r,{value:n})),this.container.className="buttonWidgetAnnotation checkBox";const a=document.createElement("input");return h.add(a),a.setAttribute("data-element-id",r),a.disabled=t.readOnly,this._setRequired(a,this.data.required),a.type="checkbox",a.name=t.fieldName,n&&a.setAttribute("checked",!0),a.setAttribute("exportValue",t.exportValue),a.tabIndex=l,a.addEventListener("change",(n=>{const{name:a,checked:i}=n.target;for(const n of this._getElementsByName(a,r)){const r=i&&n.exportValue===t.exportValue;n.domElement&&(n.domElement.checked=r),e.setValue(n.id,{value:r})}e.setValue(r,{value:i})})),a.addEventListener("resetform",(e=>{e.target.checked=(t.defaultFieldValue||"Off")===t.exportValue})),this.enableScripting&&this.hasJSActions&&(a.addEventListener("updatefromsandbox",(t=>{this._dispatchEventFromSandbox({value(t){t.target.checked="Off"!==t.detail.value,e.setValue(r,{value:t.target.checked})}},t)})),this._setEventListeners(a,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class w extends m{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.className="buttonWidgetAnnotation radioButton";const e=this.annotationStorage,t=this.data,r=t.id;let n=e.getValue(r,{value:t.fieldValue===t.buttonValue}).value;"string"==typeof n&&(n=n!==t.buttonValue,e.setValue(r,{value:n}));const a=document.createElement("input");if(h.add(a),a.setAttribute("data-element-id",r),a.disabled=t.readOnly,this._setRequired(a,this.data.required),a.type="radio",a.name=t.fieldName,n&&a.setAttribute("checked",!0),a.tabIndex=l,a.addEventListener("change",(t=>{const{name:n,checked:a}=t.target;for(const t of this._getElementsByName(n,r))e.setValue(t.id,{value:!1});e.setValue(r,{value:a})})),a.addEventListener("resetform",(e=>{const r=t.defaultFieldValue;e.target.checked=null!=r&&r===t.buttonValue})),this.enableScripting&&this.hasJSActions){const n=t.buttonValue;a.addEventListener("updatefromsandbox",(t=>{this._dispatchEventFromSandbox({value:t=>{const a=n===t.detail.value;for(const n of this._getElementsByName(t.target.name)){const t=a&&n.id===r;n.domElement&&(n.domElement.checked=t),e.setValue(n.id,{value:t})}}},t)})),this._setEventListeners(a,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))}return this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class v extends p{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(e.title=this.data.alternativeText);const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",(e=>{this._dispatchEventFromSandbox({},e)}))),e}}class S extends m{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.className="choiceWidgetAnnotation";const e=this.annotationStorage,t=this.data.id,r=e.getValue(t,{value:this.data.fieldValue}),n=document.createElement("select");h.add(n),n.setAttribute("data-element-id",t),n.disabled=this.data.readOnly,this._setRequired(n,this.data.required),n.name=this.data.fieldName,n.tabIndex=l;let a=this.data.combo&&this.data.options.length>0;this.data.combo||(n.size=this.data.options.length,this.data.multiSelect&&(n.multiple=!0)),n.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue;for(const e of n.options)e.selected=e.value===t}));for(const e of this.data.options){const t=document.createElement("option");t.textContent=e.displayValue,t.value=e.exportValue,r.value.includes(e.exportValue)&&(t.setAttribute("selected",!0),a=!1),n.append(t)}let i=null;if(a){const e=document.createElement("option");e.value=" ",e.setAttribute("hidden",!0),e.setAttribute("selected",!0),n.prepend(e),i=()=>{e.remove(),n.removeEventListener("input",i),i=null},n.addEventListener("input",i)}const s=(e,t)=>{const r=t?"value":"textContent",n=e.target.options;return e.target.multiple?Array.prototype.filter.call(n,(e=>e.selected)).map((e=>e[r])):-1===n.selectedIndex?null:n[n.selectedIndex][r]},o=e=>Array.prototype.map.call(e.target.options,(e=>({displayValue:e.textContent,exportValue:e.value})));return this.enableScripting&&this.hasJSActions?(n.addEventListener("updatefromsandbox",(r=>{this._dispatchEventFromSandbox({value(r){var a;null===(a=i)||void 0===a||a();const o=r.detail.value,c=new Set(Array.isArray(o)?o:[o]);for(const e of n.options)e.selected=c.has(e.value);e.setValue(t,{value:s(r,!0)})},multipleSelection(e){n.multiple=!0},remove(r){const a=n.options,i=r.detail.remove;a[i].selected=!1,n.remove(i),a.length>0&&-1===Array.prototype.findIndex.call(a,(e=>e.selected))&&(a[0].selected=!0),e.setValue(t,{value:s(r,!0),items:o(r)})},clear(r){for(;0!==n.length;)n.remove(0);e.setValue(t,{value:null,items:[]})},insert(r){const{index:a,displayValue:i,exportValue:c}=r.detail.insert,l=n.children[a],h=document.createElement("option");h.textContent=i,h.value=c,l?l.before(h):n.append(h),e.setValue(t,{value:s(r,!0),items:o(r)})},items(r){const{items:a}=r.detail;for(;0!==n.length;)n.remove(0);for(const e of a){const{displayValue:t,exportValue:r}=e,a=document.createElement("option");a.textContent=t,a.value=r,n.append(a)}n.options.length>0&&(n.options[0].selected=!0),e.setValue(t,{value:s(r,!0),items:o(r)})},indices(r){const n=new Set(r.detail.indices);for(const e of r.target.options)e.selected=n.has(e.index);e.setValue(t,{value:s(r,!0)})},editable(e){e.target.disabled=!e.detail.editable}},r)})),n.addEventListener("input",(r=>{var n;const a=s(r,!0),i=s(r,!1);e.setValue(t,{value:a}),null===(n=this.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:i,changeEx:a,willCommit:!0,commitKey:1,keyDown:!1}})})),this._setEventListeners(n,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],(e=>e.target.checked))):n.addEventListener("input",(function(r){e.setValue(t,{value:s(r,!0)})})),this.data.combo&&this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class x extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str)})}render(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;const e=this.layer.querySelectorAll(`[data-annotation-id="${this.data.parentId}"]`);if(0===e.length)return this.container;const t=new A({container:this.container,trigger:Array.from(e),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),r=this.page,a=n.Util.normalizeRect([this.data.parentRect[0],r.view[3]-this.data.parentRect[1]+r.view[1],this.data.parentRect[2],r.view[3]-this.data.parentRect[3]+r.view[1]]),i=a[0]+this.data.parentRect[2]-this.data.parentRect[0],s=a[1],[o,c,l,h]=this.viewport.viewBox,u=h-c;return this.container.style.left=100*(i-o)/(l-o)+"%",this.container.style.top=100*(s-c)/u+"%",this.container.append(t.render()),this.container}}class A{constructor(e){this.container=e.container,this.trigger=e.trigger,this.color=e.color,this.titleObj=e.titleObj,this.modificationDate=e.modificationDate,this.contentsObj=e.contentsObj,this.richText=e.richText,this.hideWrapper=e.hideWrapper||!1,this.pinned=!1}render(){var e,t;const r=document.createElement("div");r.className="popupWrapper",this.hideElement=this.hideWrapper?r:this.container,this.hideElement.hidden=!0;const i=document.createElement("div");i.className="popup";const s=this.color;s&&(i.style.backgroundColor=n.Util.makeHexColor(0|.7*(255-s[0])+s[0],0|.7*(255-s[1])+s[1],0|.7*(255-s[2])+s[2]));const c=document.createElement("h1");c.dir=this.titleObj.dir,c.textContent=this.titleObj.str,i.append(c);const l=a.PDFDateString.toDateObject(this.modificationDate);if(l){const e=document.createElement("span");e.className="popupDate",e.textContent="{{date}}, {{time}}",e.dataset.l10nId="annotation_date_string",e.dataset.l10nArgs=JSON.stringify({date:l.toLocaleDateString(),time:l.toLocaleTimeString()}),i.append(e)}if(null===(e=this.richText)||void 0===e||!e.str||null!==(t=this.contentsObj)&&void 0!==t&&t.str&&this.contentsObj.str!==this.richText.str){const e=this._formatContents(this.contentsObj);i.append(e)}else o.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:i}),i.lastChild.className="richText popupContent";Array.isArray(this.trigger)||(this.trigger=[this.trigger]);for(const e of this.trigger)e.addEventListener("click",this._toggle.bind(this)),e.addEventListener("mouseover",this._show.bind(this,!1)),e.addEventListener("mouseout",this._hide.bind(this,!1));return i.addEventListener("click",this._hide.bind(this,!0)),r.append(i),r}_formatContents(e){let{str:t,dir:r}=e;const n=document.createElement("p");n.className="popupContent",n.dir=r;const a=t.split(/(?:\r\n?|\n)/);for(let e=0,t=a.length;t>e;++e)n.append(document.createTextNode(a[e])),t-1>e&&n.append(document.createElement("br"));return n}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex=parseInt(this.container.style.zIndex)+1e3)}_hide(){(0>=arguments.length||void 0===arguments[0]||arguments[0])&&(this.pinned=!1),this.hideElement.hidden||this.pinned||(this.hideElement.hidden=!0,this.container.style.zIndex=parseInt(this.container.style.zIndex)-1e3)}}class k extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0}),this.textContent=e.data.textContent}render(){if(this.container.className="freeTextAnnotation",this.textContent){const e=document.createElement("div");e.className="annotationTextContent",e.setAttribute("role","comment");for(const t of this.textContent){const r=document.createElement("span");r.textContent=t,e.append(r)}this.container.append(e)}return this.data.hasPopup||this._createPopup(null,this.data),this.container}}class C extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0})}render(){this.container.className="lineAnnotation";const e=this.data,{width:t,height:r}=u(e.rect),n=this.svgFactory.create(t,r,!0),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.append(a),this.container.append(n),this._createPopup(a,e),this.container}}class _ extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0})}render(){this.container.className="squareAnnotation";const e=this.data,{width:t,height:r}=u(e.rect),n=this.svgFactory.create(t,r,!0),a=e.borderStyle.width,i=this.svgFactory.createElement("svg:rect");return i.setAttribute("x",a/2),i.setAttribute("y",a/2),i.setAttribute("width",t-a),i.setAttribute("height",r-a),i.setAttribute("stroke-width",a||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),n.append(i),this.container.append(n),this._createPopup(i,e),this.container}}class F extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0})}render(){this.container.className="circleAnnotation";const e=this.data,{width:t,height:r}=u(e.rect),n=this.svgFactory.create(t,r,!0),a=e.borderStyle.width,i=this.svgFactory.createElement("svg:ellipse");return i.setAttribute("cx",t/2),i.setAttribute("cy",r/2),i.setAttribute("rx",t/2-a/2),i.setAttribute("ry",r/2-a/2),i.setAttribute("stroke-width",a||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),n.append(i),this.container.append(n),this._createPopup(i,e),this.container}}class T extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const e=this.data,{width:t,height:r}=u(e.rect),n=this.svgFactory.create(t,r,!0);let a=[];for(const t of e.vertices)a.push(t.x-e.rect[0]+","+(e.rect[3]-t.y));a=a.join(" ");const i=this.svgFactory.createElement(this.svgElementName);return i.setAttribute("points",a),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),n.append(i),this.container.append(n),this._createPopup(i,e),this.container}}class O extends T{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class P extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0})}render(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class I extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const e=this.data,{width:t,height:r}=u(e.rect),n=this.svgFactory.create(t,r,!0);for(const t of e.inkLists){let r=[];for(const n of t)r.push(`${n.x-e.rect[0]},${e.rect[3]-n.y}`);r=r.join(" ");const a=this.svgFactory.createElement(this.svgElementName);a.setAttribute("points",r),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),this._createPopup(a,e),n.append(a)}return this.container.append(n),this.container}}class E extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}class M extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}class R extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}class D extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}class N extends f{constructor(e){var t,r,n;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0})}render(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class L extends f{constructor(e){var t;super(e,{isRenderable:!0});const{filename:r,content:n}=this.data.file;this.filename=(0,a.getFilenameFromUrl)(r),this.content=n,null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("fileattachmentannotation",{source:this,filename:r,content:n})}render(){var e,t;this.container.className="fileAttachmentAnnotation";const r=document.createElement("div");return r.className="popupTriggerArea",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.append(r),this.container}_download(){var e;null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,this.content,this.filename)}}class j{static render(e){const{annotations:t,div:r,viewport:s,accessibilityManager:o}=e;c(this,j,U).call(this,r,s);let l=0;for(const h of t){if(h.annotationType!==n.AnnotationType.POPUP){const{width:e,height:t}=u(h.rect);if(0>=e||0>=t)continue}const t=d.create({data:h,layer:r,page:e.page,viewport:s,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new a.DOMSVGFactory,annotationStorage:e.annotationStorage||new i.AnnotationStorage,enableScripting:e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,mouseState:e.mouseState||{isDown:!1}});if(t.isRenderable){const e=t.render();if(h.hidden&&(e.style.visibility="hidden"),Array.isArray(e))for(const t of e)t.style.zIndex=l++,c(j,j,B).call(j,t,h.id,r,o);else e.style.zIndex=l++,t instanceof x?r.prepend(e):c(j,j,B).call(j,e,h.id,r,o)}}c(this,j,$).call(this,r,e.annotationCanvasMap)}static update(e){const{annotationCanvasMap:t,div:r,viewport:n}=e;c(this,j,U).call(this,r,n),c(this,j,$).call(this,r,t),r.hidden=!1}}function B(e,t,r,n){const i=e.firstChild||e;i.id=`${a.AnnotationPrefix}${t}`,r.append(e),null==n||n.moveElementInDOM(r,e,i,!1)}function U(e,t){let{width:r,height:n,rotation:a}=t;const{style:i}=e,s=a%180!=0,o=Math.floor(r)+"px",c=Math.floor(n)+"px";i.width=s?c:o,i.height=s?o:c,e.setAttribute("data-main-rotation",a)}function $(e,t){if(t){for(const[r,n]of t){const t=e.querySelector(`[data-annotation-id="${r}"]`);if(!t)continue;const{firstChild:a}=t;a?"CANVAS"===a.nodeName?a.replaceWith(n):a.before(n):t.append(n)}t.clear()}}t.AnnotationLayer=j},(e,t)=>{function r(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,t.ColorConverters=class{static CMYK_G(e){let[t,r,n,a]=e;return["G",1-Math.min(1,.3*t+.59*n+.11*r+a)]}static G_CMYK(e){let[t]=e;return["CMYK",0,0,0,1-t]}static G_RGB(e){let[t]=e;return["RGB",t,t,t]}static G_HTML(e){let[t]=e;const n=r(t);return`#${n}${n}${n}`}static RGB_G(e){let[t,r,n]=e;return["G",.3*t+.59*r+.11*n]}static RGB_HTML(e){let[t,n,a]=e;return`#${r(t)}${r(n)}${r(a)}`}static T_HTML(){return"#00000000"}static CMYK_RGB(e){let[t,r,n,a]=e;return["RGB",1-Math.min(1,t+a),1-Math.min(1,n+a),1-Math.min(1,r+a)]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK(e){let[t,r,n]=e;const a=1-t,i=1-r,s=1-n;return["CMYK",a,i,s,Math.min(a,i,s)]}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var n=r(145);t.XfaLayer=class{static setupStorage(e,t,r,n,a){const i=n.getValue(t,{value:null});switch(r.name){case"textarea":if(null!==i.value&&(e.textContent=i.value),"print"===a)break;e.addEventListener("input",(e=>{n.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===r.attributes.type||"checkbox"===r.attributes.type){if(i.value===r.attributes.xfaOn?e.setAttribute("checked",!0):i.value===r.attributes.xfaOff&&e.removeAttribute("checked"),"print"===a)break;e.addEventListener("change",(e=>{n.setValue(t,{value:e.target.getAttribute(e.target.checked?"xfaOn":"xfaOff")})}))}else{if(null!==i.value&&e.setAttribute("value",i.value),"print"===a)break;e.addEventListener("input",(e=>{n.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==i.value)for(const e of r.children)e.attributes.value===i.value&&(e.attributes.selected=!0);e.addEventListener("input",(e=>{const r=e.target.options;n.setValue(t,{value:-1===r.selectedIndex?"":r[r.selectedIndex].value})}))}}static setAttributes(e){let{html:t,element:r,storage:n=null,intent:a,linkService:i}=e;const{attributes:s}=r,o=t instanceof HTMLAnchorElement;"radio"===s.type&&(s.name=`${s.name}-${a}`);for(const[e,r]of Object.entries(s))if(null!=r)switch(e){case"class":r.length&&t.setAttribute(e,r.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",r);break;case"style":Object.assign(t.style,r);break;case"textContent":t.textContent=r;break;default:(!o||"href"!==e&&"newWindow"!==e)&&t.setAttribute(e,r)}o&&i.addLinkAttributes(t,s.href,s.newWindow),n&&s.dataId&&this.setupStorage(t,s.dataId,r,n)}static render(e){const t=e.annotationStorage,r=e.linkService,a=e.xfaHtml,i=e.intent||"display",s=document.createElement(a.name);a.attributes&&this.setAttributes({html:s,element:a,intent:i,linkService:r});const o=[[a,-1,s]],c=e.div;if(c.append(s),e.viewport){const t=`matrix(${e.viewport.transform.join(",")})`;c.style.transform=t}"richText"!==i&&c.setAttribute("class","xfaLayer xfaFont");const l=[];for(;o.length>0;){var h;const[e,a,s]=o.at(-1);if(a+1===e.children.length){o.pop();continue}const c=e.children[++o.at(-1)[1]];if(null===c)continue;const{name:u}=c;if("#text"===u){const e=document.createTextNode(c.value);l.push(e),s.append(e);continue}let d;if(d=null!=c&&null!==(h=c.attributes)&&void 0!==h&&h.xmlns?document.createElementNS(c.attributes.xmlns,u):document.createElement(u),s.append(d),c.attributes&&this.setAttributes({html:d,element:c,storage:t,intent:i,linkService:r}),c.children&&c.children.length>0)o.push([c,-1,d]);else if(c.value){const e=document.createTextNode(c.value);n.XfaText.shouldBuildText(u)&&l.push(e),d.append(e)}}for(const e of c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))e.setAttribute("readOnly",!0);return{textDivs:l}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=function(e){const t=new f({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};var n=r(1),a=r(133);const i=30,s=new Map,o=/^\s+$/g;function c(e,t,r,a){const c=document.createElement("span"),l=e._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1,fontSize:0}:{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0};e._textDivs.push(c);const h=n.Util.transform(e._viewport.transform,t.transform);let u=Math.atan2(h[1],h[0]);const d=r[t.fontName];d.vertical&&(u+=Math.PI/2);const f=Math.hypot(h[2],h[3]),p=f*function(e,t){const r=s.get(e);if(r)return r;t.save(),t.font="30px "+e;const n=t.measureText("");let a=n.fontBoundingBoxAscent,o=Math.abs(n.fontBoundingBoxDescent);if(a){t.restore();const r=a/(a+o);return s.set(e,r),r}t.strokeStyle="red",t.clearRect(0,0,i,i),t.strokeText("g",0,0);let c=t.getImageData(0,0,i,i).data;o=0;for(let e=c.length-1-3;e>=0;e-=4)if(c[e]>0){o=Math.ceil(e/4/i);break}t.clearRect(0,0,i,i),t.strokeText("A",0,i),c=t.getImageData(0,0,i,i).data,a=0;for(let e=0,t=c.length;t>e;e+=4)if(c[e]>0){a=i-Math.floor(e/4/i);break}if(t.restore(),a){const t=a/(a+o);return s.set(e,t),t}return s.set(e,.8),.8}(d.fontFamily,a);let g,m;0===u?(g=h[4],m=h[5]-p):(g=h[4]+p*Math.sin(u),m=h[5]-p*Math.cos(u)),c.style.left=g+"px",c.style.top=m+"px",c.style.fontSize=f+"px",c.style.fontFamily=d.fontFamily,l.fontSize=f,c.setAttribute("role","presentation"),c.textContent=t.str,c.dir=t.dir,e._fontInspectorEnabled&&(c.dataset.fontName=t.fontName),0!==u&&(l.angle=u*(180/Math.PI));let b=!1;if(t.str.length>1||e._enhanceTextSelection&&o.test(t.str))b=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){const e=Math.abs(t.transform[0]),r=Math.abs(t.transform[3]);e!==r&&Math.max(e,r)/Math.min(e,r)>1.5&&(b=!0)}if(b&&(l.canvasWidth=d.vertical?t.height*e._viewport.scale:t.width*e._viewport.scale),e._textDivProperties.set(c,l),e._textContentStream&&e._layoutText(c),e._enhanceTextSelection&&l.hasText){let r=1,a=0;0!==u&&(r=Math.cos(u),a=Math.sin(u));const i=(d.vertical?t.height:t.width)*e._viewport.scale,s=f;let o,l;0!==u?(o=[r,a,-a,r,g,m],l=n.Util.getAxialAlignedBoundingBox([0,0,i,s],o)):l=[g,m,g+i,m+s],e._bounds.push({left:l[0],top:l[1],right:l[2],bottom:l[3],div:c,size:[i,s],m:o})}}function l(e){if(e._canceled)return;const t=e._textDivs,r=e._capability,n=t.length;if(n>1e5)return e._renderingDone=!0,void r.resolve();if(!e._textContentStream)for(let r=0;n>r;r++)e._layoutText(t[r]);e._renderingDone=!0,r.resolve()}function h(e,t,r){let n=0;for(let a=0;r>a;a++){const r=e[t++];r>0&&(n=n?Math.min(r,n):r)}return n}function u(e){const t=e._bounds,r=e._viewport,a=function(e,t,r){const 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}}));d(e,n);const a=Array(r.length);for(const e of n)a[e.index]={left:e.x1New,top:0,right:e.x2New,bottom:0};r.map((function(t,r){const i=a[r],s=n[r];s.x1=t.top,s.y1=e-i.right,s.x2=t.bottom,s.y2=e-i.left,s.index=r,s.x1New=void 0,s.x2New=void 0})),d(t,n);for(const e of n){const t=e.index;a[t].top=e.x1New,a[t].bottom=e.x2New}return a}(r.width,r.height,t);for(let r=0;a.length>r;r++){const i=t[r].div,s=e._textDivProperties.get(i);if(0===s.angle){s.paddingLeft=t[r].left-a[r].left,s.paddingTop=t[r].top-a[r].top,s.paddingRight=a[r].right-t[r].right,s.paddingBottom=a[r].bottom-t[r].bottom,e._textDivProperties.set(i,s);continue}const o=a[r],c=t[r],l=c.m,u=l[0],d=l[1],f=[[0,0],[0,c.size[1]],[c.size[0],0],c.size],p=new Float64Array(64);for(let e=0,t=f.length;t>e;e++){const t=n.Util.applyTransform(f[e],l);p[e+0]=u&&(o.left-t[0])/u,p[e+4]=d&&(o.top-t[1])/d,p[e+8]=u&&(o.right-t[0])/u,p[e+12]=d&&(o.bottom-t[1])/d,p[e+16]=d&&(o.left-t[0])/-d,p[e+20]=u&&(o.top-t[1])/u,p[e+24]=d&&(o.right-t[0])/-d,p[e+28]=u&&(o.bottom-t[1])/u,p[e+32]=u&&(o.left-t[0])/-u,p[e+36]=d&&(o.top-t[1])/-d,p[e+40]=u&&(o.right-t[0])/-u,p[e+44]=d&&(o.bottom-t[1])/-d,p[e+48]=d&&(o.left-t[0])/d,p[e+52]=u&&(o.top-t[1])/-u,p[e+56]=d&&(o.right-t[0])/d,p[e+60]=u&&(o.bottom-t[1])/-u}const g=1+Math.min(Math.abs(u),Math.abs(d));s.paddingLeft=h(p,32,16)/g,s.paddingTop=h(p,48,16)/g,s.paddingRight=h(p,0,16)/g,s.paddingBottom=h(p,16,16)/g,e._textDivProperties.set(i,s)}}function d(e,t){t.sort((function(e,t){return e.x1-t.x1||e.index-t.index}));const r=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];for(const e of t){let t=0;for(;r.length>t&&e.y1>=r[t].end;)t++;let n,a,i=r.length-1;for(;i>=0&&r[i].start>=e.y2;)i--;let s,o,c=-1/0;for(s=t;i>=s;s++){let t;n=r[s],a=n.boundary,t=a.x2>e.x1?a.index>e.index?a.x1New:e.x1:void 0===a.x2New?(a.x2+e.x1)/2:a.x2New,t>c&&(c=t)}for(e.x1New=c,s=t;i>=s;s++)n=r[s],a=n.boundary,void 0===a.x2New?a.x2>e.x1?a.index>e.index&&(a.x2New=a.x2):a.x2New=c:a.x2New>c&&(a.x2New=Math.max(c,a.x2));const l=[];let h=null;for(s=t;i>=s;s++){n=r[s],a=n.boundary;const t=a.x2>e.x2?a:e;h===t?l.at(-1).end=n.end:(l.push({start:n.start,end:n.end,boundary:t}),h=t)}for(e.y1>r[t].start&&(l[0].start=e.y1,l.unshift({start:r[t].start,end:e.y1,boundary:r[t].boundary})),r[i].end>e.y2&&(l.at(-1).end=e.y2,l.push({start:e.y2,end:r[i].end,boundary:r[i].boundary})),s=t;i>=s;s++){if(n=r[s],a=n.boundary,void 0!==a.x2New)continue;let e=!1;for(o=t-1;!e&&o>=0&&r[o].start>=a.y1;o--)e=r[o].boundary===a;for(o=i+1;!e&&r.length>o&&a.y2>=r[o].end;o++)e=r[o].boundary===a;for(o=0;!e&&l.length>o;o++)e=l[o].boundary===a;e||(a.x2New=c)}Array.prototype.splice.call(r,t,i-t+1,...l)}for(const t of r){const r=t.boundary;void 0===r.x2New&&(r.x2New=Math.max(e,r.x2))}}class f{constructor(e){var t;let{textContent:r,textContentStream:i,container:s,viewport:o,textDivs:c,textContentItemsStr:l,enhanceTextSelection:h}=e;h&&(0,a.deprecated)("The `enhanceTextSelection` functionality will be removed in the future."),this._textContent=r,this._textContentStream=i,this._container=s,this._document=s.ownerDocument,this._viewport=o,this._textDivs=c||[],this._textContentItemsStr=l||[],this._enhanceTextSelection=!!h,this._fontInspectorEnabled=!(null===(t=globalThis.FontInspector)||void 0===t||!t.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._devicePixelRatio=globalThis.devicePixelRatio||1,this._capability.promise.finally((()=>{this._enhanceTextSelection||(this._textDivProperties=null),this._layoutTextCtx&&(this._layoutTextCtx.canvas.width=0,this._layoutTextCtx.canvas.height=0,this._layoutTextCtx=null)})).catch((()=>{}))}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new n.AbortException("TextLayer task cancelled.")).catch((()=>{})),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(Error("TextLayer task cancelled."))}_processItems(e,t){for(let r=0,n=e.length;n>r;r++)if(void 0!==e[r].str)this._textContentItemsStr.push(e[r].str),c(this,e[r],t,this._layoutTextCtx);else if("beginMarkedContentProps"===e[r].type||"beginMarkedContent"===e[r].type){const t=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==e[r].id&&this._container.setAttribute("id",""+e[r].id),t.append(this._container)}else"endMarkedContent"===e[r].type&&(this._container=this._container.parentNode)}_layoutText(e){const t=this._textDivProperties.get(e);let r="";if(0!==t.canvasWidth&&t.hasText){const{fontFamily:n}=e.style,{fontSize:a}=t;a===this._layoutTextLastFontSize&&n===this._layoutTextLastFontFamily||(this._layoutTextCtx.font=`${a*this._devicePixelRatio}px ${n}`,this._layoutTextLastFontSize=a,this._layoutTextLastFontFamily=n);const{width:i}=this._layoutTextCtx.measureText(e.textContent);if(i>0){const e=this._devicePixelRatio*t.canvasWidth/i;this._enhanceTextSelection&&(t.scale=e),r=`scaleX(${e})`}}if(0!==t.angle&&(r=`rotate(${t.angle}deg) ${r}`),r.length>0&&(this._enhanceTextSelection&&(t.originalTransform=r),e.style.transform=r),t.hasText&&this._container.append(e),t.hasEOL){const e=document.createElement("br");e.setAttribute("role","presentation"),this._container.append(e)}}_render(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=(0,n.createPromiseCapability)();let r=Object.create(null);const a=this._document.createElement("canvas");if(a.height=a.width=i,this._layoutTextCtx=a.getContext("2d",{alpha:!1}),this._textContent)this._processItems(this._textContent.items,this._textContent.styles),t.resolve();else{if(!this._textContentStream)throw Error('Neither "textContent" nor "textContentStream" parameters specified.');{const e=()=>{this._reader.read().then((n=>{let{value:a,done:i}=n;i?t.resolve():(Object.assign(r,a.styles),this._processItems(a.items,r),e())}),t.reject)};this._reader=this._textContentStream.getReader(),e()}}t.promise.then((()=>{r=null,e?this._renderTimer=setTimeout((()=>{l(this),this._renderTimer=null}),e):l(this)}),this._capability.reject)}expandTextDivs(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._enhanceTextSelection||!this._renderingDone)return;null!==this._bounds&&(u(this),this._bounds=null);const t=[],r=[];for(let n=0,a=this._textDivs.length;a>n;n++){const a=this._textDivs[n],i=this._textDivProperties.get(a);i.hasText&&(e?(t.length=0,r.length=0,i.originalTransform&&t.push(i.originalTransform),i.paddingTop>0?(r.push(i.paddingTop+"px"),t.push(`translateY(${-i.paddingTop}px)`)):r.push(0),r.push(i.paddingRight>0?i.paddingRight/i.scale+"px":0),r.push(i.paddingBottom>0?i.paddingBottom+"px":0),i.paddingLeft>0?(r.push(i.paddingLeft/i.scale+"px"),t.push(`translateX(${-i.paddingLeft/i.scale}px)`)):r.push(0),a.style.padding=r.join(" "),t.length&&(a.style.transform=t.join(" "))):(a.style.padding=null,a.style.transform=i.originalTransform))}}}t.TextLayerRenderTask=f},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n=r(133),a=r(1),i=r(3);let s=class{constructor(){(0,a.unreachable)("Not implemented: SVGGraphics")}};t.SVGGraphics=s;{const o={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},c="http://www.w3.org/XML/1998/namespace",l="http://www.w3.org/1999/xlink",h=["butt","round","square"],u=["miter","round","bevel"],d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(URL.createObjectURL&&"undefined"!=typeof Blob&&(2>=arguments.length||void 0===arguments[2]||!arguments[2]))return URL.createObjectURL(new Blob([e],{type:t}));const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n=`data:${t};base64,`;for(let t=0,a=e.length;a>t;t+=3){const i=255&e[t],s=255&e[t+1],o=255&e[t+2];n+=r[i>>2]+r[(3&i)<<4|s>>4]+r[a>t+1?(15&s)<<2|o>>6:64]+r[a>t+2?63&o:64]}return n},f=function(){const e=new Uint8Array([137,80,78,71,13,10,26,10]),t=new Int32Array(256);for(let e=0;256>e;e++){let r=e;for(let e=0;8>e;e++)r=1&r?3988292384^r>>1&2147483647:r>>1&2147483647;t[e]=r}function r(e,r,n,a){let i=a;const s=r.length;n[i]=s>>24&255,n[i+1]=s>>16&255,n[i+2]=s>>8&255,n[i+3]=255&s,i+=4,n[i]=255&e.charCodeAt(0),n[i+1]=255&e.charCodeAt(1),n[i+2]=255&e.charCodeAt(2),n[i+3]=255&e.charCodeAt(3),i+=4,n.set(r,i),i+=r.length;const o=function(e,r,n){let a=-1;for(let i=r;n>i;i++)a=a>>>8^t[255&(a^e[i])];return~a}(n,a+4,i);n[i]=o>>24&255,n[i+1]=o>>16&255,n[i+2]=o>>8&255,n[i+3]=255&o}function n(e){let t=e.length;const r=65535,n=new Uint8Array(2+t+5*Math.ceil(t/r)+4);let a=0;n[a++]=120,n[a++]=156;let i=0;for(;t>r;)n[a++]=0,n[a++]=255,n[a++]=255,n[a++]=0,n[a++]=0,n.set(e.subarray(i,i+r),a),a+=r,i+=r,t-=r;n[a++]=1,n[a++]=255&t,n[a++]=t>>8&255,n[a++]=255&~t,n[a++]=(65535&~t)>>8&255,n.set(e.subarray(i),a),a+=e.length-i;const s=function(e,t,r){let n=1,a=0;for(let i=t;r>i;++i)n=(n+(255&e[i]))%65521,a=(a+n)%65521;return a<<16|n}(e,0,e.length);return n[a++]=s>>24&255,n[a++]=s>>16&255,n[a++]=s>>8&255,n[a++]=255&s,n}function s(t,s,o,c){const l=t.width,h=t.height;let u,f,p;const g=t.data;switch(s){case a.ImageKind.GRAYSCALE_1BPP:f=0,u=1,p=l+7>>3;break;case a.ImageKind.RGB_24BPP:f=2,u=8,p=3*l;break;case a.ImageKind.RGBA_32BPP:f=6,u=8,p=4*l;break;default:throw Error("invalid format")}const m=new Uint8Array((1+p)*h);let b=0,y=0;for(let e=0;h>e;++e)m[b++]=0,m.set(g.subarray(y,y+p),b),y+=p,b+=p;if(s===a.ImageKind.GRAYSCALE_1BPP&&c){b=0;for(let e=0;h>e;e++){b++;for(let e=0;p>e;e++)m[b++]^=255}}const w=new Uint8Array([l>>24&255,l>>16&255,l>>8&255,255&l,h>>24&255,h>>16&255,h>>8&255,255&h,u,f,0,0,0]),v=function(e){if(!i.isNodeJS)return n(e);try{let t;t=8>parseInt(process.versions.node)?Buffer.from(e):e;const r=require$$7.deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,a.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return n(e)}(m),S=new Uint8Array(e.length+36+w.length+v.length);let x=0;return S.set(e,x),x+=e.length,r("IHDR",w,S,x),x+=12+w.length,r("IDATA",v,S,x),x+=12+v.length,r("IEND",new Uint8Array(0),S,x),d(S,"image/png",o)}return function(e,t,r){return s(e,void 0===e.kind?a.ImageKind.GRAYSCALE_1BPP:e.kind,t,r)}}();class p{constructor(){this.fontSizeScale=1,this.fontWeight=o.fontWeight,this.fontSize=0,this.textMatrix=a.IDENTITY_MATRIX,this.fontMatrix=a.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=a.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=o.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=""}clone(){return Object.create(this)}setCurrentPoint(e,t){this.x=e,this.y=t}}function g(e){let t=[];const r=[];for(const n of e)"save"!==n.fn?"restore"===n.fn?t=r.pop():t.push(n):(t.push({fnId:92,fn:"group",items:[]}),r.push(t),t=t.at(-1).items);return t}function m(e){if(Number.isInteger(e))return""+e;const t=e.toFixed(10);let 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)}function b(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":`scale(${m(e[0])} ${m(e[3])})`;if(e[0]===e[3]&&e[1]===-e[2])return`rotate(${m(180*Math.acos(e[0])/Math.PI)})`}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return`translate(${m(e[4])} ${m(e[5])})`;return`matrix(${m(e[0])} ${m(e[1])} ${m(e[2])} ${m(e[3])} ${m(e[4])} `+m(e[5])+")"}let y=0,w=0,v=0;t.SVGGraphics=s=class{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,n.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new n.DOMSVGFactory,this.current=new p,this.transformMatrix=a.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=e,this.objs=t,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!r,this._operatorIdMapping=[];for(const e in a.OPS)this._operatorIdMapping[a.OPS[e]]=e}save(){this.transformStack.push(this.transformMatrix);const e=this.current;this.extraStack.push(e),this.current=e.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(e){this.save(),this.executeOpTree(e),this.restore()}loadDependencies(e){const t=e.fnArray,r=e.argsArray;for(let e=0,n=t.length;n>e;e++)if(t[e]===a.OPS.dependency)for(const t of r[e]){const e=t.startsWith("g_")?this.commonObjs:this.objs,r=new Promise((r=>{e.get(t,r)}));this.current.dependencies.push(r)}return Promise.all(this.current.dependencies)}transform(e,t,r,n,i,s){this.transformMatrix=a.Util.transform(this.transformMatrix,[e,t,r,n,i,s]),this.tgrp=null}getSVG(e,t){this.viewport=t;const r=this._initialize(t);return this.loadDependencies(e).then((()=>(this.transformMatrix=a.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(e)),r)))}convertOpList(e){const t=this._operatorIdMapping,r=e.argsArray,n=e.fnArray,a=[];for(let e=0,i=n.length;i>e;e++){const i=n[e];a.push({fnId:i,fn:t[i],args:r[e]})}return g(a)}executeOpTree(e){for(const t of e){const e=t.fn,r=t.args;switch(0|t.fnId){case a.OPS.beginText:this.beginText();break;case a.OPS.dependency:break;case a.OPS.setLeading:this.setLeading(r);break;case a.OPS.setLeadingMoveText:this.setLeadingMoveText(r[0],r[1]);break;case a.OPS.setFont:this.setFont(r);break;case a.OPS.showText:case a.OPS.showSpacedText:this.showText(r[0]);break;case a.OPS.endText:this.endText();break;case a.OPS.moveText:this.moveText(r[0],r[1]);break;case a.OPS.setCharSpacing:this.setCharSpacing(r[0]);break;case a.OPS.setWordSpacing:this.setWordSpacing(r[0]);break;case a.OPS.setHScale:this.setHScale(r[0]);break;case a.OPS.setTextMatrix:this.setTextMatrix(r[0],r[1],r[2],r[3],r[4],r[5]);break;case a.OPS.setTextRise:this.setTextRise(r[0]);break;case a.OPS.setTextRenderingMode:this.setTextRenderingMode(r[0]);break;case a.OPS.setLineWidth:this.setLineWidth(r[0]);break;case a.OPS.setLineJoin:this.setLineJoin(r[0]);break;case a.OPS.setLineCap:this.setLineCap(r[0]);break;case a.OPS.setMiterLimit:this.setMiterLimit(r[0]);break;case a.OPS.setFillRGBColor:this.setFillRGBColor(r[0],r[1],r[2]);break;case a.OPS.setStrokeRGBColor:this.setStrokeRGBColor(r[0],r[1],r[2]);break;case a.OPS.setStrokeColorN:this.setStrokeColorN(r);break;case a.OPS.setFillColorN:this.setFillColorN(r);break;case a.OPS.shadingFill:this.shadingFill(r[0]);break;case a.OPS.setDash:this.setDash(r[0],r[1]);break;case a.OPS.setRenderingIntent:this.setRenderingIntent(r[0]);break;case a.OPS.setFlatness:this.setFlatness(r[0]);break;case a.OPS.setGState:this.setGState(r[0]);break;case a.OPS.fill:this.fill();break;case a.OPS.eoFill:this.eoFill();break;case a.OPS.stroke:this.stroke();break;case a.OPS.fillStroke:this.fillStroke();break;case a.OPS.eoFillStroke:this.eoFillStroke();break;case a.OPS.clip:this.clip("nonzero");break;case a.OPS.eoClip:this.clip("evenodd");break;case a.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case a.OPS.paintImageXObject:this.paintImageXObject(r[0]);break;case a.OPS.paintInlineImageXObject:this.paintInlineImageXObject(r[0]);break;case a.OPS.paintImageMaskXObject:this.paintImageMaskXObject(r[0]);break;case a.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(r[0],r[1]);break;case a.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case a.OPS.closePath:this.closePath();break;case a.OPS.closeStroke:this.closeStroke();break;case a.OPS.closeFillStroke:this.closeFillStroke();break;case a.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case a.OPS.nextLine:this.nextLine();break;case a.OPS.transform:this.transform(r[0],r[1],r[2],r[3],r[4],r[5]);break;case a.OPS.constructPath:this.constructPath(r[0],r[1]);break;case a.OPS.endPath:this.endPath();break;case 92:this.group(t.items);break;default:(0,a.warn)("Unimplemented operator "+e)}}}setWordSpacing(e){this.current.wordSpacing=e}setCharSpacing(e){this.current.charSpacing=e}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(e,t,r,n,a,i){const s=this.current;s.textMatrix=s.lineMatrix=[e,t,r,n,a,i],s.textMatrixScale=Math.hypot(e,t),s.x=s.lineX=0,s.y=s.lineY=0,s.xcoords=[],s.ycoords=[],s.tspan=this.svgFactory.createElement("svg:tspan"),s.tspan.setAttributeNS(null,"font-family",s.fontFamily),s.tspan.setAttributeNS(null,"font-size",m(s.fontSize)+"px"),s.tspan.setAttributeNS(null,"y",m(-s.y)),s.txtElement=this.svgFactory.createElement("svg:text"),s.txtElement.append(s.tspan)}beginText(){const e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=a.IDENTITY_MATRIX,e.lineMatrix=a.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=[]}moveText(e,t){const 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",m(r.fontSize)+"px"),r.tspan.setAttributeNS(null,"y",m(-r.y))}showText(e){const t=this.current,r=t.font,n=t.fontSize;if(0===n)return;const i=t.fontSizeScale,s=t.charSpacing,l=t.wordSpacing,h=t.fontDirection,u=t.textHScale*h,d=r.vertical,f=d?1:-1,p=r.defaultVMetrics,g=n*t.fontMatrix[0];let y=0;for(const a of e){if(null===a){y+=h*l;continue}if("number"==typeof a){y+=f*a*n/1e3;continue}const e=(a.isSpace?l:0)+s,o=a.fontChar;let c,u,m,b=a.width;if(d){let e;const t=a.vmetric||p;e=a.vmetric?t[1]:.5*b,e=-e*g,b=t?-t[0]:b,c=e/i,u=(y+t[2]*g)/i}else c=y/i,u=0;(a.isInFont||r.missingFile)&&(t.xcoords.push(t.x+c),d&&t.ycoords.push(-t.y+u),t.tspan.textContent+=o),m=d?b*g-e*h:b*g+e*h,y+=m}t.tspan.setAttributeNS(null,"x",t.xcoords.map(m).join(" ")),t.tspan.setAttributeNS(null,"y",d?t.ycoords.map(m).join(" "):m(-t.y)),d?t.y-=y:t.x+=y*u,t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size",m(t.fontSize)+"px"),t.fontStyle!==o.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==o.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);const w=t.textRenderingMode&a.TextRenderingMode.FILL_STROKE_MASK;w===a.TextRenderingMode.FILL||w===a.TextRenderingMode.FILL_STROKE?(t.fillColor!==o.fillColor&&t.tspan.setAttributeNS(null,"fill",t.fillColor),1>t.fillAlpha&&t.tspan.setAttributeNS(null,"fill-opacity",t.fillAlpha)):t.tspan.setAttributeNS(null,"fill",t.textRenderingMode===a.TextRenderingMode.ADD_TO_PATH?"transparent":"none"),(w===a.TextRenderingMode.STROKE||w===a.TextRenderingMode.FILL_STROKE)&&this._setStrokeAttributes(t.tspan,1/(t.textMatrixScale||1));let v=t.textMatrix;0!==t.textRise&&(v=v.slice(),v[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform",`${b(v)} scale(${m(u)}, -1)`),t.txtElement.setAttributeNS(c,"xml:space","preserve"),t.txtElement.append(t.tspan),t.txtgrp.append(t.txtElement),this._ensureTransformGroup().append(t.txtElement)}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}addFontStyle(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.append(this.cssStyle));const t=d(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${e.loadedName}"; src: url(${t}); }\n`}setFont(e){const t=this.current,r=this.commonObjs.get(e[0]);let n=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||a.FONT_IDENTITY_MATRIX;let i="normal";r.black?i="900":r.bold&&(i="bold");const s=r.italic?"italic":"normal";0>n?(n=-n,t.fontDirection=-1):t.fontDirection=1,t.fontSize=n,t.fontFamily=r.loadedName,t.fontWeight=i,t.fontStyle=s,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",m(-t.y)),t.xcoords=[],t.ycoords=[]}endText(){var e;const t=this.current;t.textRenderingMode&a.TextRenderingMode.ADD_TO_PATH_FLAG&&null!==(e=t.txtElement)&&void 0!==e&&e.hasChildNodes()&&(t.element=t.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(e){e>0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=h[e]}setLineJoin(e){this.current.lineJoin=u[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,r){this.current.strokeColor=a.Util.makeHexColor(e,t,r)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,r){this.current.fillColor=a.Util.makeHexColor(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){const t=this.viewport.width,r=this.viewport.height,n=a.Util.inverseTransform(this.transformMatrix),i=a.Util.applyTransform([0,0],n),s=a.Util.applyTransform([0,r],n),o=a.Util.applyTransform([t,0],n),c=a.Util.applyTransform([t,r],n),l=Math.min(i[0],s[0],o[0],c[0]),h=Math.min(i[1],s[1],o[1],c[1]),u=Math.max(i[0],s[0],o[0],c[0]),d=Math.max(i[1],s[1],o[1],c[1]),f=this.svgFactory.createElement("svg:rect");f.setAttributeNS(null,"x",l),f.setAttributeNS(null,"y",h),f.setAttributeNS(null,"width",u-l),f.setAttributeNS(null,"height",d-h),f.setAttributeNS(null,"fill",this._makeShadingPattern(e)),1>this.current.fillAlpha&&f.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(f)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){const t=e[1],r=e[2],n=e[3]||a.IDENTITY_MATRIX,[i,s,o,c]=e[4],l=e[5],h=e[6],u=e[7],d="shading"+v++,[f,p,g,m]=a.Util.normalizeRect([...a.Util.applyTransform([i,s],n),...a.Util.applyTransform([o,c],n)]),[b,y]=a.Util.singularValueDecompose2dScale(n),w=l*b,S=h*y,x=this.svgFactory.createElement("svg:pattern");x.setAttributeNS(null,"id",d),x.setAttributeNS(null,"patternUnits","userSpaceOnUse"),x.setAttributeNS(null,"width",w),x.setAttributeNS(null,"height",S),x.setAttributeNS(null,"x",""+f),x.setAttributeNS(null,"y",""+p);const A=this.svg,k=this.transformMatrix,C=this.current.fillColor,_=this.current.strokeColor,F=this.svgFactory.create(g-f,m-p);if(this.svg=F,this.transformMatrix=n,2===u){const e=a.Util.makeHexColor(...t);this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(r)),this.svg=A,this.transformMatrix=k,this.current.fillColor=C,this.current.strokeColor=_,x.append(F.childNodes[0]),this.defs.append(x),`url(#${d})`}_makeShadingPattern(e){switch("string"==typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":const t="shading"+v++,r=e[3];let n;switch(e[1]){case"axial":const r=e[4],a=e[5];n=this.svgFactory.createElement("svg:linearGradient"),n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),n.setAttributeNS(null,"x1",r[0]),n.setAttributeNS(null,"y1",r[1]),n.setAttributeNS(null,"x2",a[0]),n.setAttributeNS(null,"y2",a[1]);break;case"radial":const i=e[4],s=e[5],o=e[6],c=e[7];n=this.svgFactory.createElement("svg:radialGradient"),n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),n.setAttributeNS(null,"cx",s[0]),n.setAttributeNS(null,"cy",s[1]),n.setAttributeNS(null,"r",c),n.setAttributeNS(null,"fx",i[0]),n.setAttributeNS(null,"fy",i[1]),n.setAttributeNS(null,"fr",o);break;default:throw Error("Unknown RadialAxial type: "+e[1])}for(const e of r){const t=this.svgFactory.createElement("svg:stop");t.setAttributeNS(null,"offset",e[0]),t.setAttributeNS(null,"stop-color",e[1]),n.append(t)}return this.defs.append(n),`url(#${t})`;case"Mesh":return(0,a.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw Error("Unknown IR type: "+e[0])}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){const r=this.current;let n=r.x,i=r.y,s=[],o=0;for(const r of e)switch(0|r){case a.OPS.rectangle:n=t[o++],i=t[o++];const e=n+t[o++],r=i+t[o++];s.push("M",m(n),m(i),"L",m(e),m(i),"L",m(e),m(r),"L",m(n),m(r),"Z");break;case a.OPS.moveTo:n=t[o++],i=t[o++],s.push("M",m(n),m(i));break;case a.OPS.lineTo:n=t[o++],i=t[o++],s.push("L",m(n),m(i));break;case a.OPS.curveTo:n=t[o+4],i=t[o+5],s.push("C",m(t[o]),m(t[o+1]),m(t[o+2]),m(t[o+3]),m(n),m(i)),o+=6;break;case a.OPS.curveTo2:s.push("C",m(n),m(i),m(t[o]),m(t[o+1]),m(t[o+2]),m(t[o+3])),n=t[o+2],i=t[o+3],o+=4;break;case a.OPS.curveTo3:n=t[o+2],i=t[o+3],s.push("C",m(t[o]),m(t[o+1]),m(n),m(i),m(n),m(i)),o+=4;break;case a.OPS.closePath:s.push("Z")}s=s.join(" "),r.path&&e.length>0&&e[0]!==a.OPS.rectangle&&e[0]!==a.OPS.moveTo?s=r.path.getAttributeNS(null,"d")+s:(r.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(r.path)),r.path.setAttributeNS(null,"d",s),r.path.setAttributeNS(null,"fill","none"),r.element=r.path,r.setCurrentPoint(n,i)}endPath(){const e=this.current;if(e.path=null,!this.pendingClip)return;if(!e.element)return void(this.pendingClip=null);const t="clippath"+y++,r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",b(this.transformMatrix));const n=e.element.cloneNode(!0);if(n.setAttributeNS(null,"clip-rule","evenodd"===this.pendingClip?"evenodd":"nonzero"),this.pendingClip=null,r.append(n),this.defs.append(r),e.activeClipUrl){e.clipGroup=null;for(const e of this.extraStack)e.clipGroup=null;r.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl=`url(#${t})`,this.tgrp=null}clip(e){this.pendingClip=e}closePath(){const e=this.current;if(e.path){const t=e.path.getAttributeNS(null,"d")+"Z";e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,r]of e)switch(t){case"LW":this.setLineWidth(r);break;case"LC":this.setLineCap(r);break;case"LJ":this.setLineJoin(r);break;case"ML":this.setMiterLimit(r);break;case"D":this.setDash(r[0],r[1]);break;case"RI":this.setRenderingIntent(r);break;case"FL":this.setFlatness(r);break;case"Font":this.setFont(r);break;case"CA":this.setStrokeAlpha(r);break;case"ca":this.setFillAlpha(r);break;default:(0,a.warn)("Unimplemented graphic state operator "+t)}}fill(){const e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){const e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const r=this.current;let 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",m(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",m(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",n.map(m).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",m(t*r.dashPhase)+"px")}eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const 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().append(e)}paintImageXObject(e){const t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,a.warn)(`Dependent image with object ID ${e} is not ready yet`)}paintInlineImageXObject(e,t){const r=e.width,n=e.height,a=f(e,this.forceDataSchema,!!t),i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",m(r)),i.setAttributeNS(null,"height",m(n)),this.current.element=i,this.clip("nonzero");const s=this.svgFactory.createElement("svg:image");s.setAttributeNS(l,"xlink:href",a),s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y",m(-n)),s.setAttributeNS(null,"width",m(r)+"px"),s.setAttributeNS(null,"height",m(n)+"px"),s.setAttributeNS(null,"transform",`scale(${m(1/r)} ${m(-1/n)})`),t?t.append(s):this._ensureTransformGroup().append(s)}paintImageMaskXObject(e){const t=this.current,r=e.width,n=e.height,a=t.fillColor;t.maskId="mask"+w++;const i=this.svgFactory.createElement("svg:mask");i.setAttributeNS(null,"id",t.maskId);const s=this.svgFactory.createElement("svg:rect");s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y","0"),s.setAttributeNS(null,"width",m(r)),s.setAttributeNS(null,"height",m(n)),s.setAttributeNS(null,"fill",a),s.setAttributeNS(null,"mask",`url(#${t.maskId})`),this.defs.append(i),this._ensureTransformGroup().append(s),this.paintInlineImageXObject(e,i)}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){const e=t[2]-t[0],r=t[3]-t[1],n=this.svgFactory.createElement("svg:rect");n.setAttributeNS(null,"x",t[0]),n.setAttributeNS(null,"y",t[1]),n.setAttributeNS(null,"width",m(e)),n.setAttributeNS(null,"height",m(r)),this.current.element=n,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){const t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.append(r),this.defs=r;const n=this.svgFactory.createElement("svg:g");return n.setAttributeNS(null,"transform",b(e.transform)),t.append(n),this.svg=n,t}_ensureClipGroup(){if(!this.current.clipGroup){const e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(e),this.current.clipGroup=e}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",b(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var n=r(1),a=r(158);const i=require$$7,s=require$$7,o=require$$7,c=require$$7,l=/^file:\/\/\/[a-zA-Z]:\//;t.PDFNodeStream=class{constructor(e){this.source=e,this.url=function(e){const t=c.parse(e);return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?c.parse("file:///"+e):(t.host||(t.protocol="file:"),t)}(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new g(this):new f(this),this._fullRequestReader}getRangeReader(e,t){if(this._progressiveDataLength>=t)return null;const r=this.isFsUrl?new m(this,e,t):new p(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class h{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=(0,n.createPromiseCapability)(),this._headersCapability=(0,n.createPromiseCapability)()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return null===e?(this._readCapability=(0,n.createPromiseCapability)(),this.read()):(this._loaded+=e.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new n.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class u{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,n.createPromiseCapability)(),this._isStreamingSupported=!e.source.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return null===e?(this._readCapability=(0,n.createPromiseCapability)(),this.read()):(this._loaded+=e.length,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}function d(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class f extends h{constructor(e){super(e);const t=t=>{if(404===t.statusCode){const e=new n.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=e,void this._headersCapability.reject(e)}this._headersCapability.resolve(),this._setReadableStream(t);const r=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:i,suggestedLength:s}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=s||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(r)};this._request=null,this._request="http:"===this._url.protocol?s.request(d(this._url,e.httpHeaders),t):o.request(d(this._url,e.httpHeaders),t),this._request.on("error",(e=>{this._storedError=e,this._headersCapability.reject(e)})),this._request.end()}}class p extends u{constructor(e,t,r){super(e),this._httpHeaders={};for(const t in e.httpHeaders){const r=e.httpHeaders[t];void 0!==r&&(this._httpHeaders[t]=r)}this._httpHeaders.Range=`bytes=${t}-${r-1}`;const a=e=>{if(404!==e.statusCode)this._setReadableStream(e);else{const e=new n.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e}};this._request=null,this._request="http:"===this._url.protocol?s.request(d(this._url,this._httpHeaders),a):o.request(d(this._url,this._httpHeaders),a),this._request.on("error",(e=>{this._storedError=e})),this._request.end()}}class g extends h{constructor(e){super(e);let t=decodeURIComponent(this._url.path);l.test(this._url.href)&&(t=t.replace(/^\//,"")),i.lstat(t,((e,r)=>{if(e)return"ENOENT"===e.code&&(e=new n.MissingPDFException(`Missing PDF "${t}".`)),this._storedError=e,void this._headersCapability.reject(e);this._contentLength=r.size,this._setReadableStream(i.createReadStream(t)),this._headersCapability.resolve()}))}}class m extends u{constructor(e,t,r){super(e);let n=decodeURIComponent(this._url.path);l.test(this._url.href)&&(n=n.replace(/^\//,"")),this._setReadableStream(i.createReadStream(n,{start:t,end:r-1}))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new n.MissingPDFException('Missing PDF "'+t+'".'):new n.UnexpectedResponseException(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)},t.extractFilenameFromHeader=function(e){const t=e("Content-Disposition");if(t){let e=(0,a.getFilenameFromContentDispositionHeader)(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch(e){}if((0,i.isPdfFile)(e))return e}return null},t.validateRangeRequestCapabilities=function(e){let{getResponseHeader:t,isHttp:r,rangeChunkSize:n,disableRange:a}=e;const i={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10);return Number.isInteger(s)?(i.suggestedLength=s,s>2*n?(a||!r||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(i.allowRangeRequests=!0),i):i):i},t.validateResponseStatus=function(e){return 200===e||206===e};var n=r(1),a=r(159),i=r(133)},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){let t=!0,r=a("filename\\*","i").exec(e);if(r){r=r[1];let e=o(r);return e=unescape(e),e=c(e),e=l(e),s(e)}if(r=function(e){const t=[];let r;const n=a("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(r=n.exec(e));){let[,e,n,a]=r;if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[n,a]}const i=[];for(let e=0;t.length>e&&e in t;++e){let[r,n]=t[e];n=o(n),r&&(n=unescape(n),0===e&&(n=c(n))),i.push(n)}return i.join("")}(e),r)return s(l(r));if(r=a("filename","i").exec(e),r){r=r[1];let e=o(r);return e=l(e),s(e)}function a(e,t){return RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function i(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r;try{const a=new TextDecoder(e,{fatal:!0}),i=(0,n.stringToBytes)(r);r=a.decode(i),t=!1}catch(e){}}return r}function s(e){return t&&/[\x80-\xff]/.test(e)&&(e=i("utf-8",e),t&&(e=i("iso-8859-1",e))),e}function o(e){if(e.startsWith('"')){const t=e.slice(1).split('\\"');for(let e=0;t.length>e;++e){const r=t[e].indexOf('"');-1!==r&&(t[e]=t[e].slice(0,r),t.length=e+1),t[e]=t[e].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function c(e){const t=e.indexOf("'");return-1===t?e:i(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function l(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 i(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 i(t,n)}))}return""};var n=r(1)},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var n=r(1),a=r(158);class i{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.getXhr=t.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,r){const n={begin:e,end:t};for(const e in r)n[e]=r[e];return this.request(n)}requestFull(e){return this.request(e)}request(e){const t=this.getXhr(),r=this.currXhrId++,n=this.pendingRequests[r]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const e in this.httpHeaders){const r=this.httpHeaders[e];void 0!==r&&t.setRequestHeader(e,r)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),n.expectedStatus=206):n.expectedStatus=200,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}onProgress(e,t){var r;const n=this.pendingRequests[e];n&&(null===(r=n.onProgress)||void 0===r||r.call(n,t))}onStateChange(e,t){const r=this.pendingRequests[e];if(!r)return;const a=r.xhr;if(a.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4!==a.readyState)return;if(!(e in this.pendingRequests))return;var i;if(delete this.pendingRequests[e],0===a.status&&this.isHttp)return void(null===(i=r.onError)||void 0===i||i.call(r,a.status));const s=a.status||200;var o;if((200!==s||206!==r.expectedStatus)&&s!==r.expectedStatus)return void(null===(o=r.onError)||void 0===o||o.call(r,a.status));const c=function(e){const t=e.response;return"string"!=typeof t?t:(0,n.stringToBytes)(t).buffer}(a);if(206===s){const e=a.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);r.onDone({begin:parseInt(t[1],10),chunk:c})}else if(c)r.onDone({begin:0,chunk:c});else{var l;null===(l=r.onError)||void 0===l||l.call(r,a.status)}}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}t.PDFNetworkStream=class{constructor(e){this._source=e,this._manager=new i(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);0>t||this._rangeRequestReaders.splice(t,1)}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new s(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const r=new o(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class s{constructor(e,t){this._manager=e;const r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(r),this._headersReceivedCapability=(0,n.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.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}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=e=>t.getResponseHeader(e),{allowRangeRequests:n,suggestedLength:i}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});n&&(this._isRangeSupported=!0),this._contentLength=i||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,0>=this._cachedChunks.length){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=(0,a.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){var t;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=(0,n.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class o{constructor(e,t,r){this._manager=e;const n={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,r,n),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var e;null===(e=this.onClosed)||void 0===e||e.call(this,this)}_onDone(e){const t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=(0,a.createResponseStatusError)(e,this._url);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){var t;this.isStreamingSupported||null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,n.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var n=r(1),a=r(158);function i(e,t,r){return{method:"GET",headers:e,signal:r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function s(e){const t=new Headers;for(const r in e){const n=e[r];void 0!==n&&t.append(r,n)}return t}t.PDFFetchStream=class{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new o(this),this._fullRequestReader}getRangeReader(e,t){if(this._progressiveDataLength>=t)return null;const r=new c(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class o{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=(0,n.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=s(this._stream.httpHeaders);const r=t.url;fetch(r,i(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,a.validateResponseStatus)(e.status))throw(0,a.createResponseStatusError)(e.status,r);this._reader=e.body.getReader(),this._headersCapability.resolve();const t=t=>e.headers.get(t),{allowRangeRequests:i,suggestedLength:s}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=s||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(t),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new n.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._reader&&this._reader.cancel(e),this._abortController.abort()}}class c{constructor(e,t,r){this._stream=e,this._reader=null,this._loaded=0;const o=e.source;this._withCredentials=o.withCredentials||!1,this._readCapability=(0,n.createPromiseCapability)(),this._isStreamingSupported=!o.disableStream,this._abortController=new AbortController,this._headers=s(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${r-1}`);const c=o.url;fetch(c,i(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,a.validateResponseStatus)(e.status))throw(0,a.createResponseStatusError)(e.status,c);this._readCapability.resolve(),this._reader=e.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._reader&&this._reader.cancel(e),this._abortController.abort()}}}],__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]={exports:{}};return __webpack_modules__[e](r,r.exports,__w_pdfjs_require__),r.exports}var __webpack_exports__={};return(()=>{var e=__webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AnnotationEditorLayer",{enumerable:!0,get:function(){return a.AnnotationEditorLayer}}),Object.defineProperty(e,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return t.AnnotationEditorParamsType}}),Object.defineProperty(e,"AnnotationEditorType",{enumerable:!0,get:function(){return t.AnnotationEditorType}}),Object.defineProperty(e,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return i.AnnotationEditorUIManager}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return s.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return o.GlobalWorkerOptions}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(e,"LoopbackPort",{enumerable:!0,get:function(){return r.LoopbackPort}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return r.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return n.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return r.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return n.PixelsPerInch}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return n.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return h.SVGGraphics}}),Object.defineProperty(e,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return t.UNSUPPORTED_FEATURES}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return u.XfaLayer}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return r.build}}),Object.defineProperty(e,"createPromiseCapability",{enumerable:!0,get:function(){return t.createPromiseCapability}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return r.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return n.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return n.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return n.getXfaPageViewport}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return n.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return l.renderTextLayer}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return r.version}});var t=__w_pdfjs_require__(1),r=__w_pdfjs_require__(129),n=__w_pdfjs_require__(133),a=__w_pdfjs_require__(147),i=__w_pdfjs_require__(132),s=__w_pdfjs_require__(152),o=__w_pdfjs_require__(140),c=__w_pdfjs_require__(3),l=__w_pdfjs_require__(155),h=__w_pdfjs_require__(156),u=__w_pdfjs_require__(154);if(c.isNodeJS){const{PDFNodeStream:e}=__w_pdfjs_require__(157);(0,r.setPDFNetworkStreamFactory)((t=>new e(t)))}else{const{PDFNetworkStream:e}=__w_pdfjs_require__(160),{PDFFetchStream:t}=__w_pdfjs_require__(161);(0,r.setPDFNetworkStreamFactory)((r=>(0,n.isValidFetchUrl)(r.url)?new t(r):new e(r)))}})(),__webpack_exports__})(),module.exports=factory()})(pdf);var pdfExports=pdf.exports,_a,LogLevel;function createSkeleton(){var e=document.createElement("div");return e.className="p-pdf-skeletons",e.appendChild(Skeleton()),e.appendChild(Skeleton()),e}function Skeleton(){var e=document.createElement("div");e.className="p-pdf-skeleton";var t=document.createElement("div");t.className="p-pdf-skeleton__avator";var r=document.createElement("div");return r.className="p-pdf-skeleton__content",e.appendChild(t),e.appendChild(r),e}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);t>r;r++)n[r]=e[r];return n}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(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)?_arrayLikeToArray(e,t):void 0}}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}!function(e){e[e.NoLog=0]="NoLog",e[e.Fatal=1]="Fatal",e[e.Error=2]="Error",e[e.Warning=3]="Warning",e[e.Info=4]="Info",e[e.Debug=5]="Debug"}(LogLevel||(LogLevel={})),window._dingrtc_wb_logs=window._dingrtc_wb_logs||[];var Log=function(){return _createClass((function e(){_classCallCheck(this,e)}),null,[{key:"attach",value:function(e){this.reporter=e}},{key:"setPrintToConsoleEnanled",value:function(e){this.printToConsole=e}}])}();_a=Log,Object.defineProperty(Log,"printToConsole",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(Log,"logLevel",{enumerable:!0,configurable:!0,writable:!0,value:LogLevel.Info}),Object.defineProperty(Log,"isprint",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return e>31&&!(e in[])}}),Object.defineProperty(Log,"dump",{enumerable:!0,configurable:!0,writable:!0,value:function(e){for(var t=new Uint8Array(e),r=0,n="\n",a=0;t.length>a;){var i="",s="";for(r=0;16>r&&t.length>a;a++,r++)i+=("00"+Number(t[a]).toString(16)).slice(-2)+" ",_a.isprint(t[a])?s+=String.fromCharCode(t[a]):s+=".";for(var o="";16>r;r++)o+=" ";n+=i+o+" "+s+"\n"}return n+="\n"}}),Object.defineProperty(Log,"toString",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return"object"===_typeof$1(e)&&(e instanceof ArrayBuffer||e instanceof Uint8Array)?_a.dump(e):"object"===_typeof$1(e)?JSON.stringify(e):e?""+e:"undefined"}}),Object.defineProperty(Log,"print",{enumerable:!0,configurable:!0,writable:!0,value:function(e,t,r,n){var a,i,s=(new Date).toISOString()+" [RtcWhiteboard] "+r;_a.logLevel>t&&(null===(a=_a.reporter)||void 0===a||(i=a.log).info.apply(i,[s].concat(_toConsumableArray(n))));window._dingrtc_wb_logs.push("".concat(s," ").concat(n.map(_a.toString).join(" "))),_a.printToConsole&&e.apply(void 0,[s].concat(_toConsumableArray(n)))}}),Object.defineProperty(Log,"level",{enumerable:!0,configurable:!0,writable:!0,value:function(e){_a.logLevel=e}}),Object.defineProperty(Log,"logDebug",{enumerable:!0,configurable:!0,writable:!0,value:function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];_a.print(console.log,LogLevel.Debug,"DEBUG",t)}}),Object.defineProperty(Log,"logInfo",{enumerable:!0,configurable:!0,writable:!0,value:function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];_a.print(console.info,LogLevel.Info,"INFO",t)}}),Object.defineProperty(Log,"logWarn",{enumerable:!0,configurable:!0,writable:!0,value:function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];_a.print(console.warn,LogLevel.Warning,"WARN",t)}}),Object.defineProperty(Log,"logError",{enumerable:!0,configurable:!0,writable:!0,value:function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];_a.print(console.error,LogLevel.Error,"ERROR",t)}}),Object.defineProperty(Log,"logFatal",{enumerable:!0,configurable:!0,writable:!0,value:function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];_a.print(console.error,LogLevel.Fatal,"FATAL",t)}});var pdf_worker={exports:{}},factory;
44
- /**
45
- * @licstart The following is the entire license notice for the
46
- * JavaScript code in this page
47
- *
48
- * Copyright 2022 Mozilla Foundation
49
- *
50
- * Licensed under the Apache License, Version 2.0 (the "License");
51
- * you may not use this file except in compliance with the License.
52
- * You may obtain a copy of the License at
53
- *
54
- * http://www.apache.org/licenses/LICENSE-2.0
55
- *
56
- * Unless required by applicable law or agreed to in writing, software
57
- * distributed under the License is distributed on an "AS IS" BASIS,
58
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
- * See the License for the specific language governing permissions and
60
- * limitations under the License.
61
- *
62
- * @licend The above is the entire license notice for the
63
- * JavaScript code in this page
64
- */globalThis,factory=()=>(()=>{var e=[,(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerTask=t.WorkerMessageHandler=void 0;var n,a=r(2),i=r(5),s=r(6),o=r(8),c=r(71),l=r(65),h=r(4),u=r(102),d=r(103);class f{constructor(e){this.name=e,this.terminated=!1,this._capability=(0,a.createPromiseCapability)()}get finished(){return this._capability.promise}finish(){this._capability.resolve()}terminate(){this.terminated=!0}ensureNotTerminated(){if(this.terminated)throw Error("Worker task was terminated")}}t.WorkerTask=f;class p{static setup(e,t){let r=!1;e.on("test",(function(t){r||(r=!0,e.send("test",t instanceof Uint8Array))})),e.on("configure",(function(e){(0,a.setVerbosityLevel)(e.verbosity)})),e.on("GetDocRequest",(function(e){return p.createDocumentHandler(e,t)}))}static createDocumentHandler(e,t){let r,n=!1,p=null;const g=[],m=(0,a.getVerbosityLevel)(),b=e.apiVersion,y="2.16.105";if(b!==y)throw Error(`The API version "${b}" does not match the Worker version "${y}".`);const w=[];for(const e in[])w.push(e);if(w.length)throw Error("The `Array.prototype` contains unexpected enumerable properties: "+w.join(", ")+"; thus breaking e.g. `for...in` iteration of `Array`s.");if("undefined"==typeof ReadableStream){const e="The browser/environment lacks native support for critical functionality used by the PDF.js library (e.g. `ReadableStream`); ";if(h.isNodeJS)throw Error(e+"please use a `legacy`-build instead.");throw Error(e+"please update to a supported browser.")}const v=e.docId,S=e.docBaseUrl,x=e.docId+"_worker";let A=new u.MessageHandler(x,v,t);function k(){if(n)throw Error("Worker was terminated")}function C(e){g.push(e)}function _(e){e.finish();const t=g.indexOf(e);g.splice(t,1)}async function F(e){await r.ensureDoc("checkHeader"),await r.ensureDoc("parseStartXRef"),await r.ensureDoc("parse",[e]),await r.ensureDoc("checkFirstPage",[e]),await r.ensureDoc("checkLastPage",[e]);const t=await r.ensureDoc("isPureXfa");if(t){const e=new f("loadXfaFonts");C(e),await Promise.all([r.loadXfaFonts(A,e).catch((e=>{})).then((()=>_(e))),r.loadXfaImages()])}const[n,a]=await Promise.all([r.ensureDoc("numPages"),r.ensureDoc("fingerprints")]);return{numPages:n,fingerprints:a,htmlForXfa:t?await r.ensureDoc("htmlForXfa"):null}}function T(e,t,r){const n=(0,a.createPromiseCapability)();let i;const s=e.source;if(s.data){try{i=new o.LocalPdfManager(v,s.data,s.password,A,t,r,S),n.resolve(i)}catch(e){n.reject(e)}return n.promise}let c,l=[];try{c=new d.PDFWorkerStream(A)}catch(e){return n.reject(e),n.promise}const h=c.getFullReader();h.headersReady.then((function(){if(h.isRangeSupported){i=new o.NetworkPdfManager(v,c,{msgHandler:A,password:s.password,length:h.contentLength,disableAutoFetch:s.disableAutoFetch||h.isStreamingSupported,rangeChunkSize:s.rangeChunkSize},t,r,S);for(const e of l)i.sendProgressiveData(e);l=[],n.resolve(i),p=null}})).catch((function(e){n.reject(e),p=null}));let u=0;return new Promise((function(e,c){const d=function({value:e,done:f}){try{if(k(),f)return i||function(){const e=(0,a.arraysToBytes)(l);s.length&&e.length!==s.length&&(0,a.warn)("reported HTTP length is different from actual");try{i=new o.LocalPdfManager(v,e,s.password,A,t,r,S),n.resolve(i)}catch(e){n.reject(e)}l=[]}(),void(p=null);u+=(0,a.arrayByteLength)(e),h.isStreamingSupported||A.send("DocProgress",{loaded:u,total:Math.max(u,h.contentLength||0)}),i?i.sendProgressiveData(e):l.push(e),h.read().then(d,c)}catch(e){c(e)}};h.read().then(d,c)})).catch((function(e){n.reject(e),p=null})),p=function(e){c.cancelAllRequests(e)},n.promise}return A.on("GetPage",(function(e){return r.getPage(e.pageIndex).then((function(e){return Promise.all([r.ensure(e,"rotate"),r.ensure(e,"ref"),r.ensure(e,"userUnit"),r.ensure(e,"view")]).then((function([e,t,r,n]){return{rotate:e,ref:t,userUnit:r,view:n}}))}))})),A.on("GetPageIndex",(function(e){const t=i.Ref.get(e.num,e.gen);return r.ensureCatalog("getPageIndex",[t])})),A.on("GetDestinations",(function(e){return r.ensureCatalog("destinations")})),A.on("GetDestination",(function(e){return r.ensureCatalog("getDestination",[e.id])})),A.on("GetPageLabels",(function(e){return r.ensureCatalog("pageLabels")})),A.on("GetPageLayout",(function(e){return r.ensureCatalog("pageLayout")})),A.on("GetPageMode",(function(e){return r.ensureCatalog("pageMode")})),A.on("GetViewerPreferences",(function(e){return r.ensureCatalog("viewerPreferences")})),A.on("GetOpenAction",(function(e){return r.ensureCatalog("openAction")})),A.on("GetAttachments",(function(e){return r.ensureCatalog("attachments")})),A.on("GetJavaScript",(function(e){return r.ensureCatalog("javaScript")})),A.on("GetDocJSActions",(function(e){return r.ensureCatalog("jsActions")})),A.on("GetPageJSActions",(function({pageIndex:e}){return r.getPage(e).then((function(e){return r.ensure(e,"jsActions")}))})),A.on("GetOutline",(function(e){return r.ensureCatalog("documentOutline")})),A.on("GetOptionalContentConfig",(function(e){return r.ensureCatalog("optionalContentConfig")})),A.on("GetPermissions",(function(e){return r.ensureCatalog("permissions")})),A.on("GetMetadata",(function(e){return Promise.all([r.ensureDoc("documentInfo"),r.ensureCatalog("metadata")])})),A.on("GetMarkInfo",(function(e){return r.ensureCatalog("markInfo")})),A.on("GetData",(function(e){return r.requestLoadedStream(),r.onLoadedStream().then((function(e){return e.bytes}))})),A.on("GetAnnotations",(function({pageIndex:e,intent:t}){return r.getPage(e).then((function(r){const n=new f("GetAnnotations: page "+e);return C(n),r.getAnnotationsData(A,n,t).then((e=>(_(n),e)),(e=>{_(n)}))}))})),A.on("GetFieldObjects",(function(e){return r.ensureDoc("fieldObjects")})),A.on("HasJSActions",(function(e){return r.ensureDoc("hasJSActions")})),A.on("GetCalculationOrderIds",(function(e){return r.ensureDoc("calculationOrderIds")})),A.on("SaveDocument",(function({isPureXfa:e,numPages:t,annotationStorage:n,filename:o}){r.requestLoadedStream();const c=e?null:(0,s.getNewAnnotationsMap)(n),h=[r.onLoadedStream(),r.ensureCatalog("acroForm"),r.ensureCatalog("acroFormRef"),r.ensureDoc("xref"),r.ensureDoc("startXRef")];if(c)for(const[e,t]of c)h.push(r.getPage(e).then((r=>{const n=new f("Save (editor): page "+e);return r.saveNewAnnotations(A,n,t).finally((function(){_(n)}))})));if(e)h.push(r.serializeXfaData(n));else for(let e=0;t>e;e++)h.push(r.getPage(e).then((function(t){const r=new f("Save: page "+e);return t.save(A,r,n).finally((function(){_(r)}))})));return Promise.all(h).then((function([t,r,n,s,c,...h]){let u=[],d=null;if(e){if(d=h[0],!d)return t.bytes}else if(u=h.flat(2),0===u.length)return t.bytes;const f=r instanceof i.Dict&&r.get("XFA")||null;let p=null,g=!1;if(Array.isArray(f)){for(let e=0,t=f.length;t>e;e+=2)"datasets"===f[e]&&(p=f[e+1],n=null,g=!0);null===p&&(p=s.getNewRef())}else f&&(n=null,(0,a.warn)("Unsupported XFA type."));let m=Object.create(null);if(s.trailer){const e=Object.create(null),t=s.trailer.get("Info")||null;t instanceof i.Dict&&t.forEach(((t,r)=>{"string"==typeof r&&(e[t]=(0,a.stringToPDFString)(r))})),m={rootRef:s.trailer.getRaw("Root")||null,encryptRef:s.trailer.getRaw("Encrypt")||null,newRef:s.getNewRef(),infoRef:s.trailer.getRaw("Info")||null,info:e,fileIds:s.trailer.get("ID")||null,startXRef:c,filename:o}}return s.resetNewRef(),(0,l.incrementalUpdate)({originalData:t.bytes,xrefInfo:m,newRefs:u,xref:s,hasXfa:!!f,xfaDatasetsRef:p,hasXfaDatasetsEntry:g,acroFormRef:n,acroForm:r,xfaData:d})}))})),A.on("GetOperatorList",(function(e,t){const n=e.pageIndex;r.getPage(n).then((function(r){const i=new f("GetOperatorList: page "+n);C(i);const s=a.VerbosityLevel.INFOS>m?0:Date.now();r.getOperatorList({handler:A,sink:t,task:i,intent:e.intent,cacheKey:e.cacheKey,annotationStorage:e.annotationStorage}).then((function(e){_(i),s&&(0,a.info)(`page=${n+1} - getOperatorList: time=${Date.now()-s}ms, len=${e.length}`),t.close()}),(function(e){_(i),i.terminated||(A.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorOperatorList}),t.error(e))}))}))})),A.on("GetTextContent",(function(e,t){const n=e.pageIndex;r.getPage(n).then((function(r){const i=new f("GetTextContent: page "+n);C(i);const s=a.VerbosityLevel.INFOS>m?0:Date.now();r.extractTextContent({handler:A,task:i,sink:t,includeMarkedContent:e.includeMarkedContent,combineTextItems:e.combineTextItems}).then((function(){_(i),s&&(0,a.info)(`page=${n+1} - getTextContent: time=`+(Date.now()-s)+"ms"),t.close()}),(function(e){_(i),i.terminated||t.error(e)}))}))})),A.on("GetStructTree",(function(e){return r.getPage(e.pageIndex).then((function(e){return r.ensure(e,"getStructTree")}))})),A.on("FontFallback",(function(e){return r.fontFallback(e.id,A)})),A.on("Cleanup",(function(e){return r.cleanup(!0)})),A.on("Terminate",(function(e){n=!0;const t=[];if(r){r.terminate(new a.AbortException("Worker was terminated."));const e=r.cleanup();t.push(e),r=null}else(0,c.clearGlobalCaches)();p&&p(new a.AbortException("Worker was terminated."));for(const e of g)t.push(e.finished),e.terminate();return Promise.all(t).then((function(){A.destroy(),A=null}))})),A.on("Ready",(function(t){!function(e){function t(e){k(),A.send("GetDoc",{pdfInfo:e})}function i(e){if(k(),e instanceof a.PasswordException){const t=new f("PasswordException: response "+e.code);C(t),A.sendWithPromise("PasswordRequest",e).then((function({password:e}){_(t),r.updatePassword(e),o()})).catch((function(){_(t),A.send("DocException",e)}))}else A.send("DocException",e instanceof a.InvalidPDFException||e instanceof a.MissingPDFException||e instanceof a.UnexpectedResponseException||e instanceof a.UnknownErrorException?e:new a.UnknownErrorException(e.message,""+e))}function o(){k(),F(!1).then(t,(function(e){k(),e instanceof s.XRefParseException?(r.requestLoadedStream(),r.onLoadedStream().then((function(){k(),F(!0).then(t,i)}))):i(e)}))}k(),T(e,{maxImageSize:e.maxImageSize,disableFontFace:e.disableFontFace,ignoreErrors:e.ignoreErrors,isEvalSupported:e.isEvalSupported,fontExtraProperties:e.fontExtraProperties,useSystemFonts:e.useSystemFonts,cMapUrl:e.cMapUrl,standardFontDataUrl:e.standardFontDataUrl},e.enableXfa).then((function(e){if(n)throw e.terminate(new a.AbortException("Worker was terminated.")),Error("Worker was terminated");r=e,r.onLoadedStream().then((function(e){A.send("DataLoaded",{length:e.bytes.byteLength})}))})).then(o,i)}(e),e=null})),x}static initializeFromPort(e){const t=new u.MessageHandler("worker","main",e);p.setup(t,e),t.send("ready",null)}}t.WorkerMessageHandler=p,"undefined"==typeof window&&!h.isNodeJS&&"undefined"!=typeof self&&"function"==typeof(n=self).postMessage&&"onmessage"in n&&p.initializeFromPort(self)},(e,t,r)=>{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.LINE_FACTOR=t.LINE_DESCENT_FACTOR=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FontType=t.FeatureTest=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.AnnotationEditorType=t.AnnotationEditorPrefix=t.AnnotationEditorParamsType=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.arrayByteLength=h,t.arraysToBytes=function(e){const t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];let r=0;for(let n=0;t>n;n++)r+=h(e[n]);let n=0;const a=new Uint8Array(r);for(let r=0;t>r;r++){let t=e[r];t instanceof Uint8Array||(t="string"==typeof t?l(t):new Uint8Array(t));const i=t.byteLength;a.set(t,n),n+=i}return a},t.assert=function(e,t){e||s(t)},t.bytesToString=function(e){"object"==typeof e&&null!==e&&void 0!==e.length||s("Invalid argument for bytesToString");const t=e.length,r=8192;if(r>t)return String.fromCharCode.apply(null,e);const n=[];for(let a=0;t>a;a+=r){const i=e.subarray(a,Math.min(a+r,t));n.push(String.fromCharCode.apply(null,i))}return n.join("")},t.createPromiseCapability=function(){const e=Object.create(null);let t=!1;return Object.defineProperty(e,"settled",{get:()=>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},t.createValidAbsoluteUrl=function(e,t=null,r=null){if(!e)return null;try{if(r&&"string"==typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);t&&t.length>=2&&(e="http://"+e)}if(r.tryConvertEncoding)try{e=p(e)}catch(e){}}const n=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(n))return n}catch(e){}return null},t.escapeString=function(e){return e.replace(/([()\\\n\r])/g,(e=>"\n"===e?"\\n":"\r"===e?"\\r":"\\"+e))},t.getModificationDate=function(e=new Date){return""+e.getUTCFullYear()+(""+(e.getUTCMonth()+1)).padStart(2,"0")+(""+e.getUTCDate()).padStart(2,"0")+(""+e.getUTCHours()).padStart(2,"0")+(""+e.getUTCMinutes()).padStart(2,"0")+(""+e.getUTCSeconds()).padStart(2,"0")},t.getVerbosityLevel=function(){return a},t.info=function(e){n.INFOS>a||console.log("Info: "+e)},t.isArrayBuffer=function(e){return"object"==typeof e&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(let r=0,n=e.length;n>r;r++)if(e[r]!==t[r])return!1;return!0},t.isAscii=function(e){return/^[\x00-\x7F]*$/.test(e)},t.objectFromMap=function(e){const t=Object.create(null);for(const[r,n]of e)t[r]=n;return t},t.objectSize=function(e){return Object.keys(e).length},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(a=e)},t.shadow=o,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=l,t.stringToPDFString=function(e){if(e[0]>="ï"){let t;if("þ"===e[0]&&"ÿ"===e[1]?t="utf-16be":"ÿ"===e[0]&&"þ"===e[1]?t="utf-16le":"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t)try{const r=new TextDecoder(t,{fatal:!0}),n=l(e);return r.decode(n)}catch(e){i(`stringToPDFString: "${e}".`)}}const t=[];for(let r=0,n=e.length;n>r;r++){const n=f[e.charCodeAt(r)];t.push(n?String.fromCharCode(n):e.charAt(r))}return t.join("")},t.stringToUTF16BEString=function(e){const t=["þÿ"];for(let r=0,n=e.length;n>r;r++){const n=e.charCodeAt(r);t.push(String.fromCharCode(n>>8&255),String.fromCharCode(255&n))}return t.join("")},t.stringToUTF8String=p,t.unreachable=s,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=i,r(3),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.LINE_FACTOR=1.35,t.LINE_DESCENT_FACTOR=.35,t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},t.AnnotationEditorPrefix="pdfjs_internal_editor_",t.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,INK:15},t.AnnotationEditorParamsType={FREETEXT_SIZE:1,FREETEXT_COLOR:2,FREETEXT_OPACITY:3,INK_COLOR:11,INK_THICKNESS:12,INK_OPACITY:13},t.PermissionFlag={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.TextRenderingMode={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.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={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.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={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.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationActionEventType={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.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"},t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};const n={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=n,t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},t.OPS={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.UNSUPPORTED_FEATURES={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.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let a=n.WARNINGS;function i(e){n.WARNINGS>a||console.log("Warning: "+e)}function s(e){throw Error(e)}function o(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}const c=function(){function e(t,r){this.constructor===e&&s("Cannot initialize BaseException."),this.message=t,this.name=r}return e.prototype=Error(),e.constructor=e,e}();function l(e){"string"!=typeof e&&s("Invalid argument for stringToBytes");const t=e.length,r=new Uint8Array(t);for(let n=0;t>n;++n)r[n]=255&e.charCodeAt(n);return r}function h(e){return void 0!==e.length?e.length:void 0!==e.byteLength?e.byteLength:void s("Invalid argument for arrayByteLength")}t.BaseException=c,t.PasswordException=class extends c{constructor(e,t){super(e,"PasswordException"),this.code=t}},t.UnknownErrorException=class extends c{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}},t.InvalidPDFException=class extends c{constructor(e){super(e,"InvalidPDFException")}},t.MissingPDFException=class extends c{constructor(e){super(e,"MissingPDFException")}},t.UnexpectedResponseException=class extends c{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}},t.FormatError=class extends c{constructor(e){super(e,"FormatError")}},t.AbortException=class extends c{constructor(e){super(e,"AbortException")}},t.FeatureTest=class{static get isLittleEndian(){return o(this,"isLittleEndian",function(){const e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return o(this,"isEvalSupported",function(){try{return Function(""),!0}catch(e){return!1}}())}static get isOffscreenCanvasSupported(){return o(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}};const u=[...Array(256).keys()].map((e=>e.toString(16).padStart(2,"0")));class d{static makeHexColor(e,t,r){return`#${u[e]}${u[t]}${u[r]}`}static scaleMinMax(e,t){let r;e[0]?(0>e[0]&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[0],t[1]*=e[0],0>e[3]&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[3],t[3]*=e[3]):(r=t[0],t[0]=t[2],t[2]=r,r=t[1],t[1]=t[3],t[3]=r,0>e[1]&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[1],t[3]*=e[1],0>e[2]&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[2],t[1]*=e[2]),t[0]+=e[4],t[1]+=e[4],t[2]+=e[5],t[3]+=e[5]}static transform(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]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const 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]}static getAxialAlignedBoundingBox(e,t){const r=d.applyTransform(e,t),n=d.applyTransform(e.slice(2,4),t),a=d.applyTransform([e[0],e[3]],t),i=d.applyTransform([e[2],e[1]],t);return[Math.min(r[0],n[0],a[0],i[0]),Math.min(r[1],n[1],a[1],i[1]),Math.max(r[0],n[0],a[0],i[0]),Math.max(r[1],n[1],a[1],i[1])]}static inverseTransform(e){const 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]}static apply3dTransform(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]]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[2]*t[1]+e[3]*t[3],a=(r+n)/2,i=Math.sqrt((r+n)**2-4*(r*n-(e[2]*t[0]+e[3]*t[2])*(e[0]*t[1]+e[1]*t[3])))/2,s=a-i||1;return[Math.sqrt(a+i||1),Math.sqrt(s)]}static normalizeRect(e){const 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}static intersect(e,t){const r=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),n=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(r>n)return null;const a=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),i=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return a>i?null:[r,a,n,i]}static bezierBoundingBox(e,t,r,n,a,i,s,o){const c=[],l=[[],[]];let h,u,d,f,p,g,m,b;for(let l=0;2>l;++l)if(0===l?(u=6*e-12*r+6*a,h=-3*e+9*r-9*a+3*s,d=3*r-3*e):(u=6*t-12*n+6*i,h=-3*t+9*n-9*i+3*o,d=3*n-3*t),1e-12>Math.abs(h)){if(1e-12>Math.abs(u))continue;f=-d/u,f>0&&1>f&&c.push(f)}else m=u*u-4*d*h,b=Math.sqrt(m),0>m||(p=(-u+b)/(2*h),p>0&&1>p&&c.push(p),g=(-u-b)/(2*h),g>0&&1>g&&c.push(g));let y,w=c.length;const v=w;for(;w--;)f=c[w],y=1-f,l[0][w]=y*y*y*e+3*y*y*f*r+3*y*f*f*a+f*f*f*s,l[1][w]=y*y*y*t+3*y*y*f*n+3*y*f*f*i+f*f*f*o;return l[0][v]=e,l[1][v]=t,l[0][v+1]=s,l[1][v+1]=o,l[0].length=l[1].length=v+2,[Math.min(...l[0]),Math.min(...l[1]),Math.max(...l[0]),Math.max(...l[1])]}}t.Util=d;const f=[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 p(e){return decodeURIComponent(escape(e))}},(e,t,r)=>{r(4)},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;const r=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=r},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RefSetCache=t.RefSet=t.Ref=t.Name=t.EOF=t.Dict=t.Cmd=t.CIRCULAR_REF=void 0,t.clearPrimitiveCaches=function(){o._clearCache(),s._clearCache(),h._clearCache()},t.isCmd=function(e,t){return e instanceof o&&(void 0===t||e.cmd===t)},t.isDict=function(e,t){return e instanceof l&&(void 0===t||f(e.get("Type"),t))},t.isName=f,t.isRefsEqual=function(e,t){return e.num===t.num&&e.gen===t.gen};var n=r(2);const a=Symbol("CIRCULAR_REF");t.CIRCULAR_REF=a;const i=Symbol("EOF");t.EOF=i;const s=function(){let e=Object.create(null);class t{constructor(e){this.name=e}static get(r){return e[r]||(e[r]=new t(r))}static _clearCache(){e=Object.create(null)}}return t}();t.Name=s;const o=function(){let e=Object.create(null);class t{constructor(e){this.cmd=e}static get(r){return e[r]||(e[r]=new t(r))}static _clearCache(){e=Object.create(null)}}return t}();t.Cmd=o;const c=function(){return c};class l{constructor(e=null){this._map=Object.create(null),this.xref=e,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=c}assignXref(e){this.xref=e}get size(){return Object.keys(this._map).length}get(e,t,r){let n=this._map[e];return void 0===n&&void 0!==t&&(n=this._map[t],void 0===n&&void 0!==r&&(n=this._map[r])),n instanceof h&&this.xref?this.xref.fetch(n,this.suppressEncryption):n}async getAsync(e,t,r){let n=this._map[e];return void 0===n&&void 0!==t&&(n=this._map[t],void 0===n&&void 0!==r&&(n=this._map[r])),n instanceof h&&this.xref?this.xref.fetchAsync(n,this.suppressEncryption):n}getArray(e,t,r){let n=this._map[e];if(void 0===n&&void 0!==t&&(n=this._map[t],void 0===n&&void 0!==r&&(n=this._map[r])),n instanceof h&&this.xref&&(n=this.xref.fetch(n,this.suppressEncryption)),Array.isArray(n)){n=n.slice();for(let e=0,t=n.length;t>e;e++)n[e]instanceof h&&this.xref&&(n[e]=this.xref.fetch(n[e],this.suppressEncryption))}return n}getRaw(e){return this._map[e]}getKeys(){return Object.keys(this._map)}getRawValues(){return Object.values(this._map)}set(e,t){this._map[e]=t}has(e){return void 0!==this._map[e]}forEach(e){for(const t in this._map)e(t,this.get(t))}static get empty(){const e=new l(null);return e.set=(e,t)=>{(0,n.unreachable)("Should not call `set` on the empty dictionary.")},(0,n.shadow)(this,"empty",e)}static merge({xref:e,dictArray:t,mergeSubDicts:r=!1}){const n=new l(e),a=new Map;for(const e of t)if(e instanceof l)for(const[t,n]of Object.entries(e._map)){let e=a.get(t);if(void 0===e)e=[],a.set(t,e);else if(!(r&&n instanceof l))continue;e.push(n)}for(const[t,r]of a){if(1===r.length||!(r[0]instanceof l)){n._map[t]=r[0];continue}const a=new l(e);for(const e of r)for(const[t,r]of Object.entries(e._map))void 0===a._map[t]&&(a._map[t]=r);a.size>0&&(n._map[t]=a)}return a.clear(),n.size>0?n:l.empty}}t.Dict=l;const h=function(){let e=Object.create(null);class t{constructor(e,t){this.num=e,this.gen=t}toString(){return 0===this.gen?this.num+"R":`${this.num}R${this.gen}`}static get(r,n){const a=0===n?r+"R":`${r}R${n}`;return e[a]||(e[a]=new t(r,n))}static _clearCache(){e=Object.create(null)}}return t}();t.Ref=h;class u{constructor(e=null){this._set=new Set(e&&e._set)}has(e){return this._set.has(""+e)}put(e){this._set.add(""+e)}remove(e){this._set.delete(""+e)}[Symbol.iterator](){return this._set.values()}clear(){this._set.clear()}}t.RefSet=u;class d{constructor(){this._map=new Map}get size(){return this._map.size}get(e){return this._map.get(""+e)}has(e){return this._map.has(""+e)}put(e,t){this._map.set(""+e,t)}putAlias(e,t){this._map.set(""+e,this.get(t))}[Symbol.iterator](){return this._map.values()}clear(){this._map.clear()}}function f(e,t){return e instanceof s&&(void 0===t||e.name===t)}t.RefSetCache=d},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XRefParseException=t.XRefEntryException=t.ParserEOFException=t.MissingDataException=t.DocStats=void 0,t.collectActions=function(e,t,r){const i=Object.create(null),o=s({dict:t,key:"AA",stopWhenFound:!1});if(o)for(let t=o.length-1;t>=0;t--){const n=o[t];if(n instanceof a.Dict)for(const t of n.getKeys()){const s=r[t];if(!s)continue;const o=[];c(n.getRaw(t),e,o,new a.RefSet),o.length>0&&(i[s]=o)}}if(t.has("A")){const r=[];c(t.get("A"),e,r,new a.RefSet),r.length>0&&(i.Action=r)}return(0,n.objectSize)(i)>0?i:null},t.encodeToXmlString=function(e){const t=[];let r=0;for(let n=0,a=e.length;a>n;n++){const a=e.codePointAt(n);if(32>a||a>126)n>r&&t.push(e.substring(r,n)),t.push(`&#x${a.toString(16).toUpperCase()};`),a>55295&&(57344>a||a>65533)&&n++,r=n+1;else{const i=l[a];i&&(n>r&&t.push(e.substring(r,n)),t.push(i),r=n+1)}}return 0===t.length?e:(e.length>r&&t.push(e.substring(r,e.length)),t.join(""))},t.escapePDFName=function(e){const t=[];let r=0;for(let n=0,a=e.length;a>n;n++){const a=e.charCodeAt(n);(33>a||a>126||35===a||40===a||41===a||60===a||62===a||91===a||93===a||123===a||125===a||47===a||37===a)&&(n>r&&t.push(e.substring(r,n)),t.push("#"+a.toString(16)),r=n+1)}return 0===t.length?e:(e.length>r&&t.push(e.substring(r,e.length)),t.join(""))},t.getArrayLookupTableFactory=function(e){let t;return function(){if(e){let r=e();e=null,t=Object.create(null);for(let e=0,n=r.length;n>e;e+=2)t[r[e]]=r[e+1];r=null}return t}},t.getInheritableProperty=s,t.getLookupTableFactory=function(e){let t;return function(){return e&&(t=Object.create(null),e(t),e=null),t}},t.getNewAnnotationsMap=function(e){if(!e)return null;const t=new Map;for(const[r,a]of e){if(!r.startsWith(n.AnnotationEditorPrefix))continue;let e=t.get(a.pageIndex);e||(e=[],t.set(a.pageIndex,e)),e.push(a)}return t.size>0?t:null},t.isWhiteSpace=function(e){return 32===e||9===e||13===e||10===e},t.log2=function(e){return e>0?Math.ceil(Math.log2(e)):0},t.numberToString=function(e){if(Number.isInteger(e))return""+e;const t=Math.round(100*e);return t%100==0?""+t/100:e.toFixed(t%10==0?1:2)},t.parseXFAPath=function(e){const t=/(.+)\[(\d+)\]$/;return e.split(".").map((e=>{const r=e.match(t);return r?{name:r[1],pos:parseInt(r[2],10)}:{name:e,pos:0}}))},t.readInt8=function(e,t){return e[t]<<24>>24},t.readUint16=function(e,t){return e[t]<<8|e[t+1]},t.readUint32=function(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0},t.recoverJsURL=function(e){const t=RegExp("^\\s*(app\\.launchURL|window\\.open|xfa\\.host\\.gotoURL)\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))","i").exec(e);if(t&&t[2]){let e=!1;return"true"===t[3]&&"app.launchURL"===t[1]&&(e=!0),{url:t[2],newWindow:e}}return null},t.toRomanNumerals=function(e,t=!1){(0,n.assert)(Number.isInteger(e)&&e>0,"The number should be a positive integer.");const r=[];let a;for(;e>=1e3;)e-=1e3,r.push("M");a=e/100|0,e%=100,r.push(o[a]),a=e/10|0,e%=10,r.push(o[10+a]),r.push(o[20+e]);const i=r.join("");return t?i.toLowerCase():i},t.validateCSSFont=function(e){const t=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily:r,fontWeight:a,italicAngle:i}=e;if(/^".*"$/.test(r)){if(/[^\\]"/.test(r.slice(1,r.length-1)))return(0,n.warn)(`XFA - FontFamily contains some unescaped ": ${r}.`),!1}else if(/^'.*'$/.test(r)){if(/[^\\]'/.test(r.slice(1,r.length-1)))return(0,n.warn)(`XFA - FontFamily contains some unescaped ': ${r}.`),!1}else for(const e of r.split(/[ \t]+/))if(/^(\d|(-(\d|-)))/.test(e)||!/^[\w-\\]+$/.test(e))return(0,n.warn)(`XFA - FontFamily contains some invalid <custom-ident>: ${r}.`),!1;const s=a?""+a:"";e.fontWeight=t.has(s)?s:"400";const o=parseFloat(i);return e.italicAngle=isNaN(o)||-90>o||o>90?"14":""+i,!0};var n=r(2),a=r(5),i=r(7);function s({dict:e,key:t,getArray:r=!1,stopWhenFound:n=!0}){let i;const s=new a.RefSet;for(;e instanceof a.Dict&&(!e.objId||!s.has(e.objId));){e.objId&&s.put(e.objId);const a=r?e.getArray(t):e.get(t);if(void 0!==a){if(n)return a;i||(i=[]),i.push(a)}e=e.get("Parent")}return i}t.MissingDataException=class extends n.BaseException{constructor(e,t){super(`Missing data [${e}, ${t})`,"MissingDataException"),this.begin=e,this.end=t}},t.ParserEOFException=class extends n.BaseException{constructor(e){super(e,"ParserEOFException")}},t.XRefEntryException=class extends n.BaseException{constructor(e){super(e,"XRefEntryException")}},t.XRefParseException=class extends n.BaseException{constructor(e){super(e,"XRefParseException")}},t.DocStats=class{constructor(e){this._handler=e,this._streamTypes=new Set,this._fontTypes=new Set}_send(){const e=Object.create(null),t=Object.create(null);for(const t of this._streamTypes)e[t]=!0;for(const e of this._fontTypes)t[e]=!0;this._handler.send("DocStats",{streamTypes:e,fontTypes:t})}addStreamType(e){this._streamTypes.has(e)||(this._streamTypes.add(e),this._send())}addFontType(e){this._fontTypes.has(e)||(this._fontTypes.add(e),this._send())}};const o=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];function c(e,t,r,s){if(!e)return;let o=null;if(e instanceof a.Ref){if(s.has(e))return;o=e,s.put(o),e=t.fetch(e)}if(Array.isArray(e))for(const n of e)c(n,t,r,s);else if(e instanceof a.Dict){if((0,a.isName)(e.get("S"),"JavaScript")){const t=e.get("JS");let a;t instanceof i.BaseStream?a=t.getString():"string"==typeof t&&(a=t),a=a&&(0,n.stringToPDFString)(a).replace(/\u0000/g,""),a&&r.push(a)}c(e.getRaw("Next"),t,r,s)}o&&s.remove(o)}const l={60:"&lt;",62:"&gt;",38:"&amp;",34:"&quot;",39:"&apos;"}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStream=void 0;var n=r(2);class a{constructor(){this.constructor===a&&(0,n.unreachable)("Cannot initialize BaseStream.")}get length(){(0,n.unreachable)("Abstract getter `length` accessed")}get isEmpty(){(0,n.unreachable)("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return(0,n.shadow)(this,"isDataLoaded",!0)}getByte(){(0,n.unreachable)("Abstract method `getByte` called")}getBytes(e){(0,n.unreachable)("Abstract method `getBytes` called")}peekByte(){const e=this.getByte();return-1!==e&&this.pos--,e}peekBytes(e){const t=this.getBytes(e);return this.pos-=t.length,t}getUint16(){const e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(e,t){(0,n.unreachable)("Abstract method `getByteRange` called")}getString(e){return(0,n.bytesToString)(this.getBytes(e))}skip(e){this.pos+=e||1}reset(){(0,n.unreachable)("Abstract method `reset` called")}moveStart(){(0,n.unreachable)("Abstract method `moveStart` called")}makeSubStream(e,t,r=null){(0,n.unreachable)("Abstract method `makeSubStream` called")}getBaseStreams(){return null}}t.BaseStream=a},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkPdfManager=t.LocalPdfManager=void 0;var n=r(2),a=r(9),i=r(6),s=r(11),o=r(10);function c(e){if(e){const t=(0,n.createValidAbsoluteUrl)(e);if(t)return t.href;(0,n.warn)(`Invalid absolute docBaseUrl: "${e}".`)}return null}class l{constructor(){this.constructor===l&&(0,n.unreachable)("Cannot initialize BasePdfManager.")}get docId(){return this._docId}get password(){return this._password}get docBaseUrl(){return(0,n.shadow)(this,"docBaseUrl",this.pdfDocument.catalog.baseUrl||this._docBaseUrl)}onLoadedStream(){(0,n.unreachable)("Abstract method `onLoadedStream` called")}ensureDoc(e,t){return this.ensure(this.pdfDocument,e,t)}ensureXRef(e,t){return this.ensure(this.pdfDocument.xref,e,t)}ensureCatalog(e,t){return this.ensure(this.pdfDocument.catalog,e,t)}getPage(e){return this.pdfDocument.getPage(e)}fontFallback(e,t){return this.pdfDocument.fontFallback(e,t)}loadXfaFonts(e,t){return this.pdfDocument.loadXfaFonts(e,t)}loadXfaImages(){return this.pdfDocument.loadXfaImages()}serializeXfaData(e){return this.pdfDocument.serializeXfaData(e)}cleanup(e=!1){return this.pdfDocument.cleanup(e)}async ensure(e,t,r){(0,n.unreachable)("Abstract method `ensure` called")}requestRange(e,t){(0,n.unreachable)("Abstract method `requestRange` called")}requestLoadedStream(){(0,n.unreachable)("Abstract method `requestLoadedStream` called")}sendProgressiveData(e){(0,n.unreachable)("Abstract method `sendProgressiveData` called")}updatePassword(e){this._password=e}terminate(e){(0,n.unreachable)("Abstract method `terminate` called")}}t.LocalPdfManager=class extends l{constructor(e,t,r,n,a,i,l){super(),this._docId=e,this._password=r,this._docBaseUrl=c(l),this.msgHandler=n,this.evaluatorOptions=a,this.enableXfa=i;const h=new o.Stream(t);this.pdfDocument=new s.PDFDocument(this,h),this._loadedStreamPromise=Promise.resolve(h)}async ensure(e,t,r){const n=e[t];return"function"==typeof n?n.apply(e,r):n}requestRange(e,t){return Promise.resolve()}requestLoadedStream(){}onLoadedStream(){return this._loadedStreamPromise}terminate(e){}},t.NetworkPdfManager=class extends l{constructor(e,t,r,n,i,o){super(),this._docId=e,this._password=r.password,this._docBaseUrl=c(o),this.msgHandler=r.msgHandler,this.evaluatorOptions=n,this.enableXfa=i,this.streamManager=new a.ChunkedStreamManager(t,{msgHandler:r.msgHandler,length:r.length,disableAutoFetch:r.disableAutoFetch,rangeChunkSize:r.rangeChunkSize}),this.pdfDocument=new s.PDFDocument(this,this.streamManager.getStream())}async ensure(e,t,r){try{const n=e[t];return"function"==typeof n?n.apply(e,r):n}catch(n){if(!(n instanceof i.MissingDataException))throw n;return await this.requestRange(n.begin,n.end),this.ensure(e,t,r)}}requestRange(e,t){return this.streamManager.requestRange(e,t)}requestLoadedStream(){this.streamManager.requestAllChunks()}sendProgressiveData(e){this.streamManager.onReceiveData({chunk:e})}onLoadedStream(){return this.streamManager.onLoadedStream()}terminate(e){this.streamManager.abort(e)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkedStreamManager=t.ChunkedStream=void 0;var n=r(2),a=r(6),i=r(10);class s extends i.Stream{constructor(e,t,r){super(new Uint8Array(e),0,e,null),this.chunkSize=t,this._loadedChunks=new Set,this.numChunks=Math.ceil(e/t),this.manager=r,this.progressiveDataLength=0,this.lastSuccessfulEnsureByteChunk=-1}getMissingChunks(){const e=[];for(let t=0,r=this.numChunks;r>t;++t)this._loadedChunks.has(t)||e.push(t);return e}get numChunksLoaded(){return this._loadedChunks.size}get isDataLoaded(){return this.numChunksLoaded===this.numChunks}onReceiveData(e,t){const r=this.chunkSize;if(e%r!=0)throw Error("Bad begin offset: "+e);const n=e+t.byteLength;if(n%r!=0&&n!==this.bytes.length)throw Error("Bad end offset: "+n);this.bytes.set(new Uint8Array(t),e);const a=Math.floor(e/r),i=Math.floor((n-1)/r)+1;for(let e=a;i>e;++e)this._loadedChunks.add(e)}onReceiveProgressiveData(e){let t=this.progressiveDataLength;const r=Math.floor(t/this.chunkSize);this.bytes.set(new Uint8Array(e),t),t+=e.byteLength,this.progressiveDataLength=t;const n=this.end>t?Math.floor(t/this.chunkSize):this.numChunks;for(let e=r;n>e;++e)this._loadedChunks.add(e)}ensureByte(e){if(this.progressiveDataLength>e)return;const t=Math.floor(e/this.chunkSize);if(this.numChunks>=t&&t!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(t))throw new a.MissingDataException(e,e+1);this.lastSuccessfulEnsureByteChunk=t}}ensureRange(e,t){if(e>=t)return;if(this.progressiveDataLength>=t)return;const r=Math.floor(e/this.chunkSize);if(r>this.numChunks)return;const n=Math.min(Math.floor((t-1)/this.chunkSize)+1,this.numChunks);for(let i=r;n>i;++i)if(!this._loadedChunks.has(i))throw new a.MissingDataException(e,t)}nextEmptyChunk(e){const t=this.numChunks;for(let r=0;t>r;++r){const n=(e+r)%t;if(!this._loadedChunks.has(n))return n}return null}hasChunk(e){return this._loadedChunks.has(e)}getByte(){const e=this.pos;return this.end>e?(this.progressiveDataLength>e||this.ensureByte(e),this.bytes[this.pos++]):-1}getBytes(e){const t=this.bytes,r=this.pos,n=this.end;if(!e)return n>this.progressiveDataLength&&this.ensureRange(r,n),t.subarray(r,n);let a=r+e;return a>n&&(a=n),a>this.progressiveDataLength&&this.ensureRange(r,a),this.pos=a,t.subarray(r,a)}getByteRange(e,t){return 0>e&&(e=0),t>this.end&&(t=this.end),t>this.progressiveDataLength&&this.ensureRange(e,t),this.bytes.subarray(e,t)}makeSubStream(e,t,r=null){function n(){}t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):this.progressiveDataLength>e||this.ensureByte(e),(n.prototype=Object.create(this)).getMissingChunks=function(){const e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,n=[];for(let e=t;r>e;++e)this._loadedChunks.has(e)||n.push(e);return n},Object.defineProperty(n.prototype,"isDataLoaded",{get(){return this.numChunksLoaded===this.numChunks||0===this.getMissingChunks().length},configurable:!0});const a=new n;return a.pos=a.start=e,a.end=e+t||this.end,a.dict=r,a}getBaseStreams(){return[this]}}t.ChunkedStream=s,t.ChunkedStreamManager=class{constructor(e,t){this.length=t.length,this.chunkSize=t.rangeChunkSize,this.stream=new s(this.length,this.chunkSize,this),this.pdfNetworkStream=e,this.disableAutoFetch=t.disableAutoFetch,this.msgHandler=t.msgHandler,this.currRequestId=0,this._chunksNeededByRequest=new Map,this._requestsByChunk=new Map,this._promisesByRequest=new Map,this.progressiveDataLength=0,this.aborted=!1,this._loadedStreamCapability=(0,n.createPromiseCapability)()}onLoadedStream(){return this._loadedStreamCapability.promise}sendRequest(e,t){const r=this.pdfNetworkStream.getRangeReader(e,t);r.isStreamingSupported||(r.onProgress=this.onProgress.bind(this));let a=[],i=0;return new Promise(((e,t)=>{const s=o=>{try{if(!o.done){const e=o.value;return a.push(e),i+=(0,n.arrayByteLength)(e),r.isStreamingSupported&&this.onProgress({loaded:i}),void r.read().then(s,t)}const c=(0,n.arraysToBytes)(a);a=null,e(c)}catch(e){t(e)}};r.read().then(s,t)})).then((t=>{this.aborted||this.onReceiveData({chunk:t,begin:e})}))}requestAllChunks(){const e=this.stream.getMissingChunks();return this._requestChunks(e),this._loadedStreamCapability.promise}_requestChunks(e){const t=this.currRequestId++,r=new Set;this._chunksNeededByRequest.set(t,r);for(const t of e)this.stream.hasChunk(t)||r.add(t);if(0===r.size)return Promise.resolve();const a=(0,n.createPromiseCapability)();this._promisesByRequest.set(t,a);const i=[];for(const e of r){let r=this._requestsByChunk.get(e);r||(r=[],this._requestsByChunk.set(e,r),i.push(e)),r.push(t)}if(i.length>0){const e=this.groupChunks(i);for(const t of e)this.sendRequest(t.beginChunk*this.chunkSize,Math.min(t.endChunk*this.chunkSize,this.length)).catch(a.reject)}return a.promise.catch((e=>{if(!this.aborted)throw e}))}getStream(){return this.stream}requestRange(e,t){t=Math.min(t,this.length);const r=this.getBeginChunk(e),n=this.getEndChunk(t),a=[];for(let e=r;n>e;++e)a.push(e);return this._requestChunks(a)}requestRanges(e=[]){const t=[];for(const r of e){const e=this.getBeginChunk(r.begin),n=this.getEndChunk(r.end);for(let r=e;n>r;++r)t.includes(r)||t.push(r)}return t.sort((function(e,t){return e-t})),this._requestChunks(t)}groupChunks(e){const t=[];let r=-1,n=-1;for(let a=0,i=e.length;i>a;++a){const i=e[a];0>r&&(r=i),0>n||n+1===i||(t.push({beginChunk:r,endChunk:n+1}),r=i),a+1===e.length&&t.push({beginChunk:r,endChunk:i+1}),n=i}return t}onProgress(e){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+e.loaded,total:this.length})}onReceiveData(e){const t=e.chunk,r=void 0===e.begin,n=r?this.progressiveDataLength:e.begin,a=n+t.byteLength,i=Math.floor(n/this.chunkSize),s=this.length>a?Math.floor(a/this.chunkSize):Math.ceil(a/this.chunkSize);r?(this.stream.onReceiveProgressiveData(t),this.progressiveDataLength=a):this.stream.onReceiveData(n,t),this.stream.isDataLoaded&&this._loadedStreamCapability.resolve(this.stream);const o=[];for(let e=i;s>e;++e){const t=this._requestsByChunk.get(e);if(t){this._requestsByChunk.delete(e);for(const r of t){const t=this._chunksNeededByRequest.get(r);t.has(e)&&t.delete(e),t.size>0||o.push(r)}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){let e;if(1===this.stream.numChunksLoaded){const t=this.stream.numChunks-1;this.stream.hasChunk(t)||(e=t)}else e=this.stream.nextEmptyChunk(s);Number.isInteger(e)&&this._requestChunks([e])}for(const e of o){const t=this._promisesByRequest.get(e);this._promisesByRequest.delete(e),t.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}onError(e){this._loadedStreamCapability.reject(e)}getBeginChunk(e){return Math.floor(e/this.chunkSize)}getEndChunk(e){return Math.floor((e-1)/this.chunkSize)+1}abort(e){this.aborted=!0,this.pdfNetworkStream&&this.pdfNetworkStream.cancelAllRequests(e);for(const t of this._promisesByRequest.values())t.reject(e)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringStream=t.Stream=t.NullStream=void 0;var n=r(7),a=r(2);class i extends n.BaseStream{constructor(e,t,r,n){super(),this.bytes=e instanceof Uint8Array?e:new Uint8Array(e),this.start=t||0,this.pos=this.start,this.end=t+r||this.bytes.length,this.dict=n}get length(){return this.end-this.start}get isEmpty(){return 0===this.length}getByte(){return this.end>this.pos?this.bytes[this.pos++]:-1}getBytes(e){const t=this.bytes,r=this.pos,n=this.end;if(!e)return t.subarray(r,n);let a=r+e;return a>n&&(a=n),this.pos=a,t.subarray(r,a)}getByteRange(e,t){return 0>e&&(e=0),t>this.end&&(t=this.end),this.bytes.subarray(e,t)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(e,t,r=null){return new i(this.bytes.buffer,e,t,r)}}t.Stream=i,t.StringStream=class extends i{constructor(e){super((0,a.stringToBytes)(e))}},t.NullStream=class extends i{constructor(){super(new Uint8Array(0))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Page=t.PDFDocument=void 0;var n=r(12),a=r(2),i=r(6),s=r(5),o=r(51),c=r(7),l=r(67),h=r(69),u=r(71),d=r(100),f=r(17),p=r(10),g=r(75),m=r(62),b=r(15),y=r(19),w=r(74),v=r(65),S=r(76),x=r(101);const A=[0,0,612,792];class k{constructor({pdfManager:e,xref:t,pageIndex:r,pageDict:n,ref:a,globalIdFactory:i,fontCache:s,builtInCMapCache:o,standardFontDataCache:c,globalImageCache:l,nonBlendModesSet:h,xfaFactory:u}){this.pdfManager=e,this.pageIndex=r,this.pageDict=n,this.xref=t,this.ref=a,this.fontCache=s,this.builtInCMapCache=o,this.standardFontDataCache=c,this.globalImageCache=l,this.nonBlendModesSet=h,this.evaluatorOptions=e.evaluatorOptions,this.resourcesPromise=null,this.xfaFactory=u;const d={obj:0};this._localIdFactory=class extends i{static createObjId(){return`p${r}_${++d.obj}`}static getPageObjId(){return"page"+a}}}_getInheritableProperty(e,t=!1){const r=(0,i.getInheritableProperty)({dict:this.pageDict,key:e,getArray:t,stopWhenFound:!1});return Array.isArray(r)?1!==r.length&&r[0]instanceof s.Dict?s.Dict.merge({xref:this.xref,dictArray:r}):r[0]:r}get content(){return this.pageDict.getArray("Contents")}get resources(){const e=this._getInheritableProperty("Resources");return(0,a.shadow)(this,"resources",e instanceof s.Dict?e:s.Dict.empty)}_getBoundingBox(e){if(this.xfaData)return this.xfaData.bbox;const t=this._getInheritableProperty(e,!0);if(Array.isArray(t)&&4===t.length){if(t[2]-t[0]!=0&&t[3]-t[1]!=0)return t;(0,a.warn)(`Empty /${e} entry.`)}return null}get mediaBox(){return(0,a.shadow)(this,"mediaBox",this._getBoundingBox("MediaBox")||A)}get cropBox(){return(0,a.shadow)(this,"cropBox",this._getBoundingBox("CropBox")||this.mediaBox)}get userUnit(){let e=this.pageDict.get("UserUnit");return"number"==typeof e&&e>0||(e=1),(0,a.shadow)(this,"userUnit",e)}get view(){const{cropBox:e,mediaBox:t}=this;let r;if(e===t||(0,a.isArrayEqual)(e,t))r=t;else{const n=a.Util.intersect(e,t);n&&n[2]-n[0]!=0&&n[3]-n[1]!=0?r=n:(0,a.warn)("Empty /CropBox and /MediaBox intersection.")}return(0,a.shadow)(this,"view",r||t)}get rotate(){let e=this._getInheritableProperty("Rotate")||0;return e%90!=0?e=0:360>e?0>e&&(e=(e%360+360)%360):e%=360,(0,a.shadow)(this,"rotate",e)}_onSubStreamError(e,t,r){if(this.evaluatorOptions.ignoreErrors)return e.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorContentSubStream}),void(0,a.warn)(`getContentStream - ignoring sub-stream (${r}): "${t}".`);throw t}getContentStream(e){return this.pdfManager.ensure(this,"content").then((t=>t instanceof c.BaseStream?t:Array.isArray(t)?new y.StreamsSequenceStream(t,this._onSubStreamError.bind(this,e)):new p.NullStream))}get xfaData(){return(0,a.shadow)(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}async saveNewAnnotations(e,t,r){if(this.xfaFactory)throw Error("XFA: Cannot save new annotations.");const a=new b.PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,options:this.evaluatorOptions}),i=this.pageDict,s=this.annotations.slice(),o=await n.AnnotationFactory.saveNewAnnotations(a,t,r);for(const{ref:e}of o.annotations)s.push(e);const c=i.get("Annots");i.set("Annots",s);const l=[];let h=null;this.xref.encrypt&&(h=this.xref.encrypt.createCipherTransform(this.ref.num,this.ref.gen)),(0,v.writeObject)(this.ref,i,l,h),c&&i.set("Annots",c);const u=o.dependencies;return u.push({ref:this.ref,data:l.join("")},...o.annotations),u}save(e,t,r){const n=new b.PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,options:this.evaluatorOptions});return this._parsedAnnotations.then((function(e){const i=[];for(const s of e)s.mustBePrinted(r)&&i.push(s.save(n,t,r).catch((function(e){return(0,a.warn)(`save - ignoring annotation data during "${t.name}" task: "${e}".`),null})));return Promise.all(i).then((function(e){return e.filter((e=>!!e))}))}))}loadResources(e){return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then((()=>new g.ObjectLoader(this.resources,e,this.xref).load()))}getOperatorList({handler:e,sink:t,task:r,intent:s,cacheKey:o,annotationStorage:c=null}){const l=this.getContentStream(e),h=this.loadResources(["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"]),u=new b.PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,options:this.evaluatorOptions}),d=this.xfaFactory?null:(0,i.getNewAnnotationsMap)(c);let f=Promise.resolve(null);if(d){const e=d.get(this.pageIndex);e&&(f=n.AnnotationFactory.printNewAnnotations(u,r,e))}const p=Promise.all([l,h]).then((([n])=>{const a=new m.OperatorList(s,t);return e.send("StartRenderPage",{transparency:u.hasBlendModes(this.resources,this.nonBlendModesSet),pageIndex:this.pageIndex,cacheKey:o}),u.getOperatorList({stream:n,task:r,resources:this.resources,operatorList:a}).then((function(){return a}))}));return Promise.all([p,this._parsedAnnotations,f]).then((function([e,t,n]){if(n&&(t=t.concat(n)),0===t.length||s&a.RenderingIntentFlag.ANNOTATIONS_DISABLE)return e.flush(!0),{length:e.totalLength};const i=!!(s&a.RenderingIntentFlag.ANNOTATIONS_FORMS),o=!!(s&a.RenderingIntentFlag.ANY),l=!!(s&a.RenderingIntentFlag.DISPLAY),h=!!(s&a.RenderingIntentFlag.PRINT),d=[];for(const e of t)(o||l&&e.mustBeViewed(c)||h&&e.mustBePrinted(c))&&d.push(e.getOperatorList(u,r,s,i,c).catch((function(e){return(0,a.warn)(`getOperatorList - ignoring annotation data during "${r.name}" task: "${e}".`),null})));return Promise.all(d).then((function(t){let r=!1,n=!1;for(const{opList:a,separateForm:i,separateCanvas:s}of t)e.addOpList(a),i&&(r=i),s&&(n=s);return e.flush(!0,{form:r,canvas:n}),{length:e.totalLength}}))}))}extractTextContent({handler:e,task:t,includeMarkedContent:r,sink:n,combineTextItems:a}){const i=this.getContentStream(e),s=this.loadResources(["ExtGState","Font","Properties","XObject"]);return Promise.all([i,s]).then((([i])=>new b.PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,options:this.evaluatorOptions}).getTextContent({stream:i,task:t,resources:this.resources,includeMarkedContent:r,combineTextItems:a,sink:n,viewBox:this.view})))}async getStructTree(){const e=await this.pdfManager.ensureCatalog("structTreeRoot");return e?(await this.pdfManager.ensure(this,"_parseStructTree",[e])).serializable:null}_parseStructTree(e){const t=new w.StructTreePage(e,this.pageDict);return t.parse(),t}async getAnnotationsData(e,t,r){const n=await this._parsedAnnotations;if(0===n.length)return[];const i=[],s=[];let o;const c=!!(r&a.RenderingIntentFlag.ANY),l=!!(r&a.RenderingIntentFlag.DISPLAY),h=!!(r&a.RenderingIntentFlag.PRINT);for(const r of n){const n=c||l&&r.viewable;(n||h&&r.printable)&&s.push(r.data),r.hasTextContent&&n&&(o||(o=new b.PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,options:this.evaluatorOptions})),i.push(r.extractTextContent(o,t,this.view).catch((function(e){(0,a.warn)(`getAnnotationsData - ignoring textContent during "${t.name}" task: "${e}".`)}))))}return await Promise.all(i),s}get annotations(){const e=this._getInheritableProperty("Annots");return(0,a.shadow)(this,"annotations",Array.isArray(e)?e:[])}get _parsedAnnotations(){const e=this.pdfManager.ensure(this,"annotations").then((()=>{const e=[];for(const t of this.annotations)e.push(n.AnnotationFactory.create(this.xref,t,this.pdfManager,this._localIdFactory,!1).catch((function(e){return(0,a.warn)(`_parsedAnnotations: "${e}".`),null})));return Promise.all(e).then((function(e){if(0===e.length)return e;const t=[];let r;for(const a of e)a&&(a instanceof n.PopupAnnotation?(r||(r=[]),r.push(a)):t.push(a));return r&&t.push(...r),t}))}));return(0,a.shadow)(this,"_parsedAnnotations",e)}get jsActions(){const e=(0,i.collectActions)(this.xref,this.pageDict,a.PageActionEventType);return(0,a.shadow)(this,"jsActions",e)}}t.Page=k;const C=new Uint8Array([37,80,68,70,45]),_=new Uint8Array([115,116,97,114,116,120,114,101,102]),F=new Uint8Array([101,110,100,111,98,106]),T=/^[1-9]\.\d$/;function O(e,t,r=1024,n=!1){const a=t.length,i=e.peekBytes(r),s=i.length-a;if(0>=s)return!1;if(n){const r=a-1;let n=i.length-1;for(;n>=r;){let s=0;for(;a>s&&i[n-s]===t[r-s];)s++;if(s>=a)return e.pos+=n-r,!0;n--}}else{let r=0;for(;s>=r;){let n=0;for(;a>n&&i[r+n]===t[n];)n++;if(n>=a)return e.pos+=r,!0;r++}}return!1}t.PDFDocument=class{constructor(e,t){if(0>=t.length)throw new a.InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=e,this.stream=t,this.xref=new x.XRef(t,e),this._pagePromises=new Map,this._version=null;const r={font:0};this._globalIdFactory=class{static getDocId(){return"g_"+e.docId}static createFontId(){return"f"+ ++r.font}static createObjId(){(0,a.unreachable)("Abstract method `createObjId` called.")}static getPageObjId(){(0,a.unreachable)("Abstract method `getPageObjId` called.")}}}parse(e){this.xref.parse(e),this.catalog=new h.Catalog(this.pdfManager,this.xref),this.catalog.version&&(this._version=this.catalog.version)}get linearization(){let e=null;try{e=f.Linearization.create(this.stream)}catch(e){if(e instanceof i.MissingDataException)throw e;(0,a.info)(e)}return(0,a.shadow)(this,"linearization",e)}get startXRef(){const e=this.stream;let t=0;if(this.linearization)e.reset(),O(e,F)&&(t=e.pos+6-e.start);else{const r=1024,n=_.length;let a=!1,s=e.end;for(;!a&&s>0;)s-=r-n,0>s&&(s=0),e.pos=s,a=O(e,_,r,!0);if(a){let r;e.skip(9);do{r=e.getByte()}while((0,i.isWhiteSpace)(r));let n="";for(;r>=32&&57>=r;)n+=String.fromCharCode(r),r=e.getByte();t=parseInt(n,10),isNaN(t)&&(t=0)}}return(0,a.shadow)(this,"startXRef",t)}checkHeader(){const e=this.stream;if(e.reset(),!O(e,C))return;e.moveStart();let t,r="";for(;(t=e.getByte())>32&&12>r.length;)r+=String.fromCharCode(t);this._version||(this._version=r.substring(5))}parseStartXRef(){this.xref.setStartXRef(this.startXRef)}get numPages(){let e=0;return e=this.catalog.hasActualNumPages?this.catalog.numPages:this.xfaFactory?this.xfaFactory.getNumPages():this.linearization?this.linearization.numPages:this.catalog.numPages,(0,a.shadow)(this,"numPages",e)}_hasOnlyDocumentSignatures(e,t=0){return!!Array.isArray(e)&&e.every((e=>{if(!((e=this.xref.fetchIfRef(e))instanceof s.Dict))return!1;if(e.has("Kids"))return++t>10?((0,a.warn)("_hasOnlyDocumentSignatures: maximum recursion depth reached"),!1):this._hasOnlyDocumentSignatures(e.get("Kids"),t);const r=(0,s.isName)(e.get("FT"),"Sig"),n=e.get("Rect"),i=Array.isArray(n)&&n.every((e=>0===e));return r&&i}))}get _xfaStreams(){const e=this.catalog.acroForm;if(!e)return null;const t=e.get("XFA"),r={"xdp:xdp":"",template:"",datasets:"",config:"",connectionSet:"",localeSet:"",stylesheet:"","/xdp:xdp":""};if(t instanceof c.BaseStream&&!t.isEmpty)return r["xdp:xdp"]=t,r;if(!Array.isArray(t)||0===t.length)return null;for(let e=0,n=t.length;n>e;e+=2){let a;if(a=0===e?"xdp:xdp":e===n-2?"/xdp:xdp":t[e],!r.hasOwnProperty(a))continue;const i=this.xref.fetchIfRef(t[e+1]);i instanceof c.BaseStream&&!i.isEmpty&&(r[a]=i)}return r}get xfaDatasets(){const e=this._xfaStreams;if(!e)return(0,a.shadow)(this,"xfaDatasets",null);for(const t of["datasets","xdp:xdp"]){const r=e[t];if(r)try{const e=(0,a.stringToUTF8String)(r.getString());return(0,a.shadow)(this,"xfaDatasets",new d.DatasetReader({[t]:e}))}catch(e){(0,a.warn)("XFA - Invalid utf-8 string.");break}}return(0,a.shadow)(this,"xfaDatasets",null)}get xfaData(){const e=this._xfaStreams;if(!e)return null;const t=Object.create(null);for(const[r,n]of Object.entries(e))if(n)try{t[r]=(0,a.stringToUTF8String)(n.getString())}catch(e){return(0,a.warn)("XFA - Invalid utf-8 string."),null}return t}get xfaFactory(){let e;return this.pdfManager.enableXfa&&this.catalog.needsRendering&&this.formInfo.hasXfa&&!this.formInfo.hasAcroForm&&(e=this.xfaData),(0,a.shadow)(this,"xfaFactory",e?new S.XFAFactory(e):null)}get isPureXfa(){return!!this.xfaFactory&&this.xfaFactory.isValid()}get htmlForXfa(){return this.xfaFactory?this.xfaFactory.getPages():null}async loadXfaImages(){const e=await this.pdfManager.ensureCatalog("xfaImages");if(!e)return;const t=e.getKeys(),r=new g.ObjectLoader(e,t,this.xref);await r.load();const n=new Map;for(const r of t){const t=e.get(r);t instanceof c.BaseStream&&n.set(r,t.getBytes())}this.xfaFactory.setImages(n)}async loadXfaFonts(e,t){const r=await this.pdfManager.ensureCatalog("acroForm");if(!r)return;const n=await r.getAsync("DR");if(!(n instanceof s.Dict))return;const c=new g.ObjectLoader(n,["Font"],this.xref);await c.load();const l=n.get("Font");if(!(l instanceof s.Dict))return;const h=Object.assign(Object.create(null),this.pdfManager.evaluatorOptions);h.useSystemFonts=!1;const u=new b.PartialEvaluator({xref:this.xref,handler:e,pageIndex:-1,idFactory:this._globalIdFactory,fontCache:this.catalog.fontCache,builtInCMapCache:this.catalog.builtInCMapCache,standardFontDataCache:this.catalog.standardFontDataCache,options:h}),d=new m.OperatorList,f=[],p={get font(){return f.at(-1)},set font(e){f.push(e)},clone(){return this}},y=new Map;l.forEach(((e,t)=>{y.set(e,t)}));const w=[];for(const[e,r]of y){const o=r.get("FontDescriptor");if(!(o instanceof s.Dict))continue;let c=o.get("FontFamily");c=c.replace(/[ ]+(\d)/g,"$1");const l={fontFamily:c,fontWeight:o.get("FontWeight"),italicAngle:-o.get("ItalicAngle")};(0,i.validateCSSFont)(l)&&w.push(u.handleSetFont(n,[s.Name.get(e),1],null,d,t,p,null,l).catch((function(e){return(0,a.warn)(`loadXfaFonts: "${e}".`),null})))}await Promise.all(w);const v=this.xfaFactory.setFonts(f);if(!v)return;h.ignoreErrors=!0,w.length=0,f.length=0;const S=new Set;for(const e of v)(0,o.getXfaFontName)(e+"-Regular")||S.add(e);S.size&&v.push("PdfJS-Fallback");for(const e of v)if(!S.has(e))for(const r of[{name:"Regular",fontWeight:400,italicAngle:0},{name:"Bold",fontWeight:700,italicAngle:0},{name:"Italic",fontWeight:400,italicAngle:12},{name:"BoldItalic",fontWeight:700,italicAngle:12}]){const i=`${e}-${r.name}`,c=(0,o.getXfaFontDict)(i);w.push(u.handleSetFont(n,[s.Name.get(i),1],null,d,t,p,c,{fontFamily:e,fontWeight:r.fontWeight,italicAngle:r.italicAngle}).catch((function(e){return(0,a.warn)(`loadXfaFonts: "${e}".`),null})))}await Promise.all(w),this.xfaFactory.appendFonts(f,S)}async serializeXfaData(e){return this.xfaFactory?this.xfaFactory.serializeData(e):null}get formInfo(){const e={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},t=this.catalog.acroForm;if(!t)return(0,a.shadow)(this,"formInfo",e);try{const r=t.get("Fields"),n=Array.isArray(r)&&r.length>0;e.hasFields=n;const a=t.get("XFA");e.hasXfa=Array.isArray(a)&&a.length>0||a instanceof c.BaseStream&&!a.isEmpty;const i=!!(1&t.get("SigFlags")),s=i&&this._hasOnlyDocumentSignatures(r);e.hasAcroForm=n&&!s,e.hasSignatures=i}catch(e){if(e instanceof i.MissingDataException)throw e;(0,a.warn)(`Cannot fetch form information: "${e}".`)}return(0,a.shadow)(this,"formInfo",e)}get documentInfo(){let e=this._version;"string"==typeof e&&T.test(e)||((0,a.warn)("Invalid PDF header version number: "+e),e=null);const t={PDFFormatVersion:e,Language:this.catalog.lang,EncryptFilterName:this.xref.encrypt?this.xref.encrypt.filterName:null,IsLinearized:!!this.linearization,IsAcroFormPresent:this.formInfo.hasAcroForm,IsXFAPresent:this.formInfo.hasXfa,IsCollectionPresent:!!this.catalog.collection,IsSignaturesPresent:this.formInfo.hasSignatures};let r;try{r=this.xref.trailer.get("Info")}catch(e){if(e instanceof i.MissingDataException)throw e;(0,a.info)("The document information dictionary is invalid.")}if(!(r instanceof s.Dict))return(0,a.shadow)(this,"documentInfo",t);for(const e of r.getKeys()){const n=r.get(e);switch(e){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDate":if("string"==typeof n){t[e]=(0,a.stringToPDFString)(n);continue}break;case"Trapped":if(n instanceof s.Name){t[e]=n;continue}break;default:let r;switch(typeof n){case"string":r=(0,a.stringToPDFString)(n);break;case"number":case"boolean":r=n;break;default:n instanceof s.Name&&(r=n)}if(void 0===r){(0,a.warn)(`Bad value, for custom key "${e}", in Info: ${n}.`);continue}t.Custom||(t.Custom=Object.create(null)),t.Custom[e]=r;continue}(0,a.warn)(`Bad value, for key "${e}", in Info: ${n}.`)}return(0,a.shadow)(this,"documentInfo",t)}get fingerprints(){function e(e){return"string"==typeof e&&e.length>0&&"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"!==e}function t(e){const t=[];for(let r=0,n=e.length;n>r;r++)t.push(e[r].toString(16).padStart(2,"0"));return t.join("")}const r=this.xref.trailer.get("ID");let n,i;return Array.isArray(r)&&e(r[0])?(n=(0,a.stringToBytes)(r[0]),r[1]!==r[0]&&e(r[1])&&(i=(0,a.stringToBytes)(r[1]))):n=(0,l.calculateMD5)(this.stream.getByteRange(0,1024),0,1024),(0,a.shadow)(this,"fingerprints",[t(n),i?t(i):null])}async _getLinearizationPage(e){const{catalog:t,linearization:r,xref:n}=this,i=s.Ref.get(r.objectNumberFirst,0);try{const e=await n.fetchAsync(i);if(e instanceof s.Dict){let r=e.getRaw("Type");if(r instanceof s.Ref&&(r=await n.fetchAsync(r)),(0,s.isName)(r,"Page")||!e.has("Type")&&!e.has("Kids"))return t.pageKidsCountCache.has(i)||t.pageKidsCountCache.put(i,1),t.pageIndexCache.has(i)||t.pageIndexCache.put(i,0),[e,i]}throw new a.FormatError("The Linearization dictionary doesn't point to a valid Page dictionary.")}catch(r){return(0,a.warn)(`_getLinearizationPage: "${r.message}".`),t.getPageDict(e)}}getPage(e){const t=this._pagePromises.get(e);if(t)return t;const{catalog:r,linearization:n,xfaFactory:a}=this;let i;return i=a?Promise.resolve([s.Dict.empty,null]):n&&n.pageFirst===e?this._getLinearizationPage(e):r.getPageDict(e),i=i.then((([t,n])=>new k({pdfManager:this.pdfManager,xref:this.xref,pageIndex:e,pageDict:t,ref:n,globalIdFactory:this._globalIdFactory,fontCache:r.fontCache,builtInCMapCache:r.builtInCMapCache,standardFontDataCache:r.standardFontDataCache,globalImageCache:r.globalImageCache,nonBlendModesSet:r.nonBlendModesSet,xfaFactory:a}))),this._pagePromises.set(e,i),i}async checkFirstPage(e=!1){if(!e)try{await this.getPage(0)}catch(e){if(e instanceof i.XRefEntryException)throw this._pagePromises.delete(0),await this.cleanup(),new i.XRefParseException}}async checkLastPage(e=!1){const{catalog:t,pdfManager:r}=this;let n;t.setActualNumPages();try{if(await Promise.all([r.ensureDoc("xfaFactory"),r.ensureDoc("linearization"),r.ensureCatalog("numPages")]),this.xfaFactory)return;if(n=this.linearization?this.linearization.numPages:t.numPages,!Number.isInteger(n))throw new a.FormatError("Page count is not an integer.");if(1>=n)return;await this.getPage(n-1)}catch(s){if(this._pagePromises.delete(n-1),await this.cleanup(),s instanceof i.XRefEntryException&&!e)throw new i.XRefParseException;let o;(0,a.warn)(`checkLastPage - invalid /Pages tree /Count: ${n}.`);try{o=await t.getAllPageDicts(e)}catch(r){if(r instanceof i.XRefEntryException&&!e)throw new i.XRefParseException;return void t.setActualNumPages(1)}for(const[e,[n,a]]of o){let i;n instanceof Error?(i=Promise.reject(n),i.catch((()=>{}))):i=Promise.resolve(new k({pdfManager:r,xref:this.xref,pageIndex:e,pageDict:n,ref:a,globalIdFactory:this._globalIdFactory,fontCache:t.fontCache,builtInCMapCache:t.builtInCMapCache,standardFontDataCache:t.standardFontDataCache,globalImageCache:t.globalImageCache,nonBlendModesSet:t.nonBlendModesSet,xfaFactory:null})),this._pagePromises.set(e,i)}t.setActualNumPages(o.size)}}fontFallback(e,t){return this.catalog.fontFallback(e,t)}async cleanup(e=!1){return this.catalog?this.catalog.cleanup(e):(0,u.clearGlobalCaches)()}_collectFieldObjects(e,t,r){const i=this.xref.fetchIfRef(t);if(i.has("T")){const t=(0,a.stringToPDFString)(i.get("T"));e=""===e?t:`${e}.${t}`}if(r.has(e)||r.set(e,[]),r.get(e).push(n.AnnotationFactory.create(this.xref,t,this.pdfManager,this._localIdFactory,!0).then((e=>e&&e.getFieldObject())).catch((function(e){return(0,a.warn)(`_collectFieldObjects: "${e}".`),null}))),i.has("Kids")){const t=i.get("Kids");for(const n of t)this._collectFieldObjects(e,n,r)}}get fieldObjects(){if(!this.formInfo.hasFields)return(0,a.shadow)(this,"fieldObjects",Promise.resolve(null));const e=Object.create(null),t=new Map;for(const e of this.catalog.acroForm.get("Fields"))this._collectFieldObjects("",e,t);const r=[];for(const[n,a]of t)r.push(Promise.all(a).then((t=>{(t=t.filter((e=>!!e))).length>0&&(e[n]=t)})));return(0,a.shadow)(this,"fieldObjects",Promise.all(r).then((()=>e)))}get hasJSActions(){const e=this.pdfManager.ensureDoc("_parseHasJSActions");return(0,a.shadow)(this,"hasJSActions",e)}async _parseHasJSActions(){const[e,t]=await Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);return!!e||!!t&&Object.values(t).some((e=>e.some((e=>null!==e.actions))))}get calculationOrderIds(){const e=this.catalog.acroForm;if(!e||!e.has("CO"))return(0,a.shadow)(this,"calculationOrderIds",null);const t=e.get("CO");if(!Array.isArray(t)||0===t.length)return(0,a.shadow)(this,"calculationOrderIds",null);const r=[];for(const e of t)e instanceof s.Ref&&r.push(""+e);return(0,a.shadow)(this,"calculationOrderIds",0===r.length?null:r)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PopupAnnotation=t.MarkupAnnotation=t.AnnotationFactory=t.AnnotationBorderStyle=t.Annotation=void 0,t.getQuadPoints=y;var n=r(2),a=r(6),i=r(13),s=r(5),o=r(65),c=r(7),l=r(60),h=r(69),u=r(14),d=r(72),f=r(75),p=r(62),g=r(10),m=r(76);function b(e,t=new Uint8ClampedArray(3)){if(!Array.isArray(e))return t;const r=t||new Uint8ClampedArray(3);switch(e.length){case 0:return null;case 1:return u.ColorSpace.singletons.gray.getRgbItem(e,0,r,0),r;case 3:return u.ColorSpace.singletons.rgb.getRgbItem(e,0,r,0),r;case 4:return u.ColorSpace.singletons.cmyk.getRgbItem(e,0,r,0),r;default:return t}}function y(e,t){if(!e.has("QuadPoints"))return null;const r=e.getArray("QuadPoints");if(!Array.isArray(r)||0===r.length||r.length%8>0)return null;const n=[];for(let e=0,a=r.length/8;a>e;e++){n.push([]);for(let a=8*e,i=8*e+8;i>a;a+=2){const i=r[a],s=r[a+1];if(null!==t&&(t[0]>i||i>t[2]||t[1]>s||s>t[3]))return null;n[e].push({x:i,y:s})}}return n.map((e=>{const[t,r,n,a]=e.reduce((([e,t,r,n],a)=>[Math.min(e,a.x),Math.max(t,a.x),Math.min(r,a.y),Math.max(n,a.y)]),[Number.MAX_VALUE,5e-324,Number.MAX_VALUE,5e-324]);return[{x:t,y:a},{x:r,y:a},{x:t,y:n},{x:r,y:n}]}))}function w(e,t,r){const[a,i,s,o]=n.Util.getAxialAlignedBoundingBox(t,r);if(a===s||i===o)return[1,0,0,1,e[0],e[1]];const c=(e[2]-e[0])/(s-a),l=(e[3]-e[1])/(o-i);return[c,0,0,l,e[0]-a*c,e[1]-i*l]}t.AnnotationFactory=class{static create(e,t,r,n,a){return Promise.all([r.ensureCatalog("acroForm"),r.ensureCatalog("baseUrl"),r.ensureDoc("xfaDatasets"),a?this._getPageIndex(e,t,r):-1]).then((([i,s,o,c])=>r.ensure(this,"_create",[e,t,r,n,i,o,a,c])))}static _create(e,t,r,i,o,c,l,h=-1){const u=e.fetchIfRef(t);if(!(u instanceof s.Dict))return;const d=t instanceof s.Ref?""+t:"annot_"+i.createObjId();let f=u.get("Subtype");f=f instanceof s.Name?f.name:null;const p={xref:e,ref:t,dict:u,subtype:f,id:d,pdfManager:r,acroForm:o instanceof s.Dict?o:s.Dict.empty,xfaDatasets:c,collectFields:l,pageIndex:h};switch(f){case"Link":return new O(p);case"Text":return new T(p);case"Widget":let e=(0,a.getInheritableProperty)({dict:u,key:"FT"});switch(e=e instanceof s.Name?e.name:null,e){case"Tx":return new k(p);case"Btn":return new C(p);case"Ch":return new _(p);case"Sig":return new F(p)}return(0,n.warn)(`Unimplemented widget field type "${e}", falling back to base field type.`),new A(p);case"Popup":return new P(p);case"FreeText":return new I(p);case"Line":return new E(p);case"Square":return new M(p);case"Circle":return new R(p);case"PolyLine":return new D(p);case"Polygon":return new N(p);case"Caret":return new L(p);case"Ink":return new j(p);case"Highlight":return new B(p);case"Underline":return new U(p);case"Squiggly":return new $(p);case"StrikeOut":return new q(p);case"Stamp":return new X(p);case"FileAttachment":return new H(p);default:return l||(0,n.warn)(f?`Unimplemented annotation type "${f}", falling back to base annotation.`:"Annotation is missing the required /Subtype."),new v(p)}}static async _getPageIndex(e,t,r){try{const n=await e.fetchIfRefAsync(t);if(!(n instanceof s.Dict))return-1;const a=n.getRaw("P");return a instanceof s.Ref?await r.ensureCatalog("getPageIndex",[a]):-1}catch(e){return(0,n.warn)(`_getPageIndex: "${e}".`),-1}}static async saveNewAnnotations(e,t,r){const a=e.xref;let i;const c=[],l=[];for(const h of r)switch(h.annotationType){case n.AnnotationEditorType.FREETEXT:if(!i){const e=new s.Dict(a);e.set("BaseFont",s.Name.get("Helvetica")),e.set("Type",s.Name.get("Font")),e.set("Subtype",s.Name.get("Type1")),e.set("Encoding",s.Name.get("WinAnsiEncoding"));const t=[];i=a.getNewRef(),(0,o.writeObject)(i,e,t,null),c.push({ref:i,data:t.join("")})}l.push(I.createNewAnnotation(a,h,c,{evaluator:e,task:t,baseFontRef:i}));break;case n.AnnotationEditorType.INK:l.push(j.createNewAnnotation(a,h,c))}return{annotations:await Promise.all(l),dependencies:c}}static async printNewAnnotations(e,t,r){if(!r)return null;const a=e.xref,i=[];for(const s of r)switch(s.annotationType){case n.AnnotationEditorType.FREETEXT:i.push(I.createNewPrintAnnotation(a,s,{evaluator:e,task:t}));break;case n.AnnotationEditorType.INK:i.push(j.createNewPrintAnnotation(a,s))}return Promise.all(i)}};class v{constructor(e){const t=e.dict;this.setTitle(t.get("T")),this.setContents(t.get("Contents")),this.setModificationDate(t.get("M")),this.setFlags(t.get("F")),this.setRectangle(t.getArray("Rect")),this.setColor(t.getArray("C")),this.setBorderStyle(t),this.setAppearance(t),this.setOptionalContent(t);const r=t.get("MK");if(this.setBorderAndBackgroundColors(r),this.setRotation(r),this._streams=[],this.appearance&&this._streams.push(this.appearance),this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,backgroundColor:this.backgroundColor,borderColor:this.borderColor,rotation:this.rotation,contentsObj:this._contents,hasAppearance:!!this.appearance,id:e.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:e.subtype,hasOwnCanvas:!1},e.collectFields){const r=t.get("Kids");if(Array.isArray(r)){const e=[];for(const t of r)t instanceof s.Ref&&e.push(""+t);0!==e.length&&(this.data.kidIds=e)}this.data.actions=(0,a.collectActions)(e.xref,t,n.AnnotationActionEventType),this.data.fieldName=this._constructFieldName(t),this.data.pageIndex=e.pageIndex}this._fallbackFontDict=null}_hasFlag(e,t){return!!(e&t)}_isViewable(e){return!this._hasFlag(e,n.AnnotationFlag.INVISIBLE)&&!this._hasFlag(e,n.AnnotationFlag.NOVIEW)}_isPrintable(e){return this._hasFlag(e,n.AnnotationFlag.PRINT)&&!this._hasFlag(e,n.AnnotationFlag.INVISIBLE)}mustBeViewed(e){const t=e&&e.get(this.data.id);return t&&void 0!==t.hidden?!t.hidden:this.viewable&&!this._hasFlag(this.flags,n.AnnotationFlag.HIDDEN)}mustBePrinted(e){const t=e&&e.get(this.data.id);return t&&void 0!==t.print?t.print:this.printable}get viewable(){return null!==this.data.quadPoints&&(0===this.flags||this._isViewable(this.flags))}get printable(){return null!==this.data.quadPoints&&0!==this.flags&&this._isPrintable(this.flags)}_parseStringHelper(e){const t="string"==typeof e?(0,n.stringToPDFString)(e):"";return{str:t,dir:t&&"rtl"===(0,l.bidi)(t).dir?"rtl":"ltr"}}setTitle(e){this._title=this._parseStringHelper(e)}setContents(e){this._contents=this._parseStringHelper(e)}setModificationDate(e){this.modificationDate="string"==typeof e?e:null}setFlags(e){this.flags=Number.isInteger(e)&&e>0?e:0}hasFlag(e){return this._hasFlag(this.flags,e)}setRectangle(e){this.rectangle=Array.isArray(e)&&4===e.length?n.Util.normalizeRect(e):[0,0,0,0]}setColor(e){this.color=b(e)}setLineEndings(e){if(this.lineEndings=["None","None"],Array.isArray(e)&&2===e.length)for(let t=0;2>t;t++){const r=e[t];if(r instanceof s.Name)switch(r.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[t]=r.name;continue}(0,n.warn)("Ignoring invalid lineEnding: "+r)}}setRotation(e){if(this.rotation=0,e instanceof s.Dict){let t=e.get("R")||0;Number.isInteger(t)&&0!==t&&(t%=360,0>t&&(t+=360),t%90==0&&(this.rotation=t))}}setBorderAndBackgroundColors(e){e instanceof s.Dict?(this.borderColor=b(e.getArray("BC"),null),this.backgroundColor=b(e.getArray("BG"),null)):this.borderColor=this.backgroundColor=null}setBorderStyle(e){if(this.borderStyle=new S,e instanceof s.Dict)if(e.has("BS")){const t=e.get("BS"),r=t.get("Type");r&&!(0,s.isName)(r,"Border")||(this.borderStyle.setWidth(t.get("W"),this.rectangle),this.borderStyle.setStyle(t.get("S")),this.borderStyle.setDashArray(t.getArray("D")))}else if(e.has("Border")){const t=e.getArray("Border");Array.isArray(t)&&t.length>=3&&(this.borderStyle.setHorizontalCornerRadius(t[0]),this.borderStyle.setVerticalCornerRadius(t[1]),this.borderStyle.setWidth(t[2],this.rectangle),4===t.length&&this.borderStyle.setDashArray(t[3],!0))}else this.borderStyle.setWidth(0)}setAppearance(e){this.appearance=null;const t=e.get("AP");if(!(t instanceof s.Dict))return;const r=t.get("N");if(r instanceof c.BaseStream)return void(this.appearance=r);if(!(r instanceof s.Dict))return;const n=e.get("AS");n instanceof s.Name&&r.has(n.name)&&(this.appearance=r.get(n.name))}setOptionalContent(e){this.oc=null;const t=e.get("OC");t instanceof s.Name?(0,n.warn)("setOptionalContent: Support for /Name-entry is not implemented."):t instanceof s.Dict&&(this.oc=t)}loadResources(e,t){return t.dict.getAsync("Resources").then((t=>{if(t)return new f.ObjectLoader(t,e,t.xref).load().then((function(){return t}))}))}async getOperatorList(e,t,r,a,i){const o=this.data;let c=this.appearance;const l=!!(this.data.hasOwnCanvas&&r&n.RenderingIntentFlag.DISPLAY);if(!c){if(!l)return{opList:new p.OperatorList,separateForm:!1,separateCanvas:!1};c=new g.StringStream(""),c.dict=new s.Dict}const h=c.dict,u=await this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"],c),d=h.getArray("BBox")||[0,0,1,1],f=h.getArray("Matrix")||[1,0,0,1,0,0],m=w(o.rect,d,f),b=new p.OperatorList;let y;return this.oc&&(y=await e.parseMarkedContentProps(this.oc,null)),void 0!==y&&b.addOp(n.OPS.beginMarkedContentProps,["OC",y]),b.addOp(n.OPS.beginAnnotation,[o.id,o.rect,m,f,l]),await e.getOperatorList({stream:c,task:t,resources:u,operatorList:b,fallbackFontDict:this._fallbackFontDict}),b.addOp(n.OPS.endAnnotation,[]),void 0!==y&&b.addOp(n.OPS.endMarkedContent,[]),this.reset(),{opList:b,separateForm:!1,separateCanvas:l}}async save(e,t,r){return null}get hasTextContent(){return!1}async extractTextContent(e,t,r){if(!this.appearance)return;const n=await this.loadResources(["ExtGState","Font","Properties","XObject"],this.appearance),a=[],i=[],s={desiredSize:Math.Infinity,ready:!0,enqueue(e,t){for(const t of e.items)i.push(t.str),t.hasEOL&&(a.push(i.join("")),i.length=0)}};await e.getTextContent({stream:this.appearance,task:t,resources:n,includeMarkedContent:!0,combineTextItems:!0,sink:s,viewBox:r}),this.reset(),i.length&&a.push(i.join("")),a.length>0&&(this.data.textContent=a)}getFieldObject(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex,rotation:this.rotation}:null}reset(){for(const e of this._streams)e.reset()}_constructFieldName(e){if(!e.has("T")&&!e.has("Parent"))return(0,n.warn)("Unknown field name, falling back to empty field name."),"";if(!e.has("Parent"))return(0,n.stringToPDFString)(e.get("T"));const t=[];e.has("T")&&t.unshift((0,n.stringToPDFString)(e.get("T")));let r=e;const a=new s.RefSet;for(e.objId&&a.put(e.objId);r.has("Parent")&&(r=r.get("Parent"),r instanceof s.Dict&&(!r.objId||!a.has(r.objId)));)r.objId&&a.put(r.objId),r.has("T")&&t.unshift((0,n.stringToPDFString)(r.get("T")));return t.join(".")}}t.Annotation=v;class S{constructor(){this.width=1,this.style=n.AnnotationBorderStyleType.SOLID,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}setWidth(e,t=[0,0,0,0]){if(e instanceof s.Name)this.width=0;else if("number"==typeof e){if(e>0){const r=(t[2]-t[0])/2,a=(t[3]-t[1])/2;r>0&&a>0&&(e>r||e>a)&&((0,n.warn)("AnnotationBorderStyle.setWidth - ignoring width: "+e),e=1)}this.width=e}}setStyle(e){if(e instanceof s.Name)switch(e.name){case"S":this.style=n.AnnotationBorderStyleType.SOLID;break;case"D":this.style=n.AnnotationBorderStyleType.DASHED;break;case"B":this.style=n.AnnotationBorderStyleType.BEVELED;break;case"I":this.style=n.AnnotationBorderStyleType.INSET;break;case"U":this.style=n.AnnotationBorderStyleType.UNDERLINE}}setDashArray(e,t=!1){if(Array.isArray(e)&&e.length>0){let r=!0,n=!0;for(const t of e){if(0>+t){r=!1;break}t>0&&(n=!1)}r&&!n?(this.dashArray=e,t&&this.setStyle(s.Name.get("D"))):this.width=0}else e&&(this.width=0)}setHorizontalCornerRadius(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}setVerticalCornerRadius(e){Number.isInteger(e)&&(this.verticalCornerRadius=e)}}t.AnnotationBorderStyle=S;class x extends v{constructor(e){super(e);const t=e.dict;if(t.has("IRT")){const e=t.getRaw("IRT");this.data.inReplyTo=e instanceof s.Ref?""+e:null;const r=t.get("RT");this.data.replyType=r instanceof s.Name?r.name:n.AnnotationReplyType.REPLY}if(this.data.replyType===n.AnnotationReplyType.GROUP){const e=t.get("IRT");this.setTitle(e.get("T")),this.data.titleObj=this._title,this.setContents(e.get("Contents")),this.data.contentsObj=this._contents,e.has("CreationDate")?(this.setCreationDate(e.get("CreationDate")),this.data.creationDate=this.creationDate):this.data.creationDate=null,e.has("M")?(this.setModificationDate(e.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,this.data.hasPopup=e.has("Popup"),e.has("C")?(this.setColor(e.getArray("C")),this.data.color=this.color):this.data.color=null}else this.data.titleObj=this._title,this.setCreationDate(t.get("CreationDate")),this.data.creationDate=this.creationDate,this.data.hasPopup=t.has("Popup"),t.has("C")||(this.data.color=null);t.has("RC")&&(this.data.richText=m.XFAFactory.getRichTextAsHtml(t.get("RC")))}setCreationDate(e){this.creationDate="string"==typeof e?e:null}_setDefaultAppearance({xref:e,extra:t,strokeColor:r,fillColor:n,blendMode:a,strokeAlpha:i,fillAlpha:o,pointsCallback:c}){let l=Number.MAX_VALUE,h=Number.MAX_VALUE,u=5e-324,d=5e-324;const f=["q"];t&&f.push(t),r&&f.push(`${r[0]} ${r[1]} ${r[2]} RG`),n&&f.push(`${n[0]} ${n[1]} ${n[2]} rg`);let p=this.data.quadPoints;p||(p=[[{x:this.rectangle[0],y:this.rectangle[3]},{x:this.rectangle[2],y:this.rectangle[3]},{x:this.rectangle[0],y:this.rectangle[1]},{x:this.rectangle[2],y:this.rectangle[1]}]]);for(const e of p){const[t,r,n,a]=c(f,e);l=Math.min(l,t),u=Math.max(u,r),h=Math.min(h,n),d=Math.max(d,a)}f.push("Q");const m=new s.Dict(e),b=new s.Dict(e);b.set("Subtype",s.Name.get("Form"));const y=new g.StringStream(f.join(" "));y.dict=b,m.set("Fm0",y);const w=new s.Dict(e);a&&w.set("BM",s.Name.get(a)),"number"==typeof i&&w.set("CA",i),"number"==typeof o&&w.set("ca",o);const v=new s.Dict(e);v.set("GS0",w);const S=new s.Dict(e);S.set("ExtGState",v),S.set("XObject",m);const x=new s.Dict(e);x.set("Resources",S);const A=this.data.rect=[l,h,u,d];x.set("BBox",A),this.appearance=new g.StringStream("/GS0 gs /Fm0 Do"),this.appearance.dict=x,this._streams.push(this.appearance,y)}static async createNewAnnotation(e,t,r,n){const a=e.getNewRef(),i=e.getNewRef(),s=this.createNewDict(t,e,{apRef:i}),c=await this.createNewAppearanceStream(t,e,n),l=[];let h=e.encrypt?e.encrypt.createCipherTransform(i.num,i.gen):null;return(0,o.writeObject)(i,c,l,h),r.push({ref:i,data:l.join("")}),l.length=0,h=e.encrypt?e.encrypt.createCipherTransform(a.num,a.gen):null,(0,o.writeObject)(a,s,l,h),{ref:a,data:l.join("")}}static async createNewPrintAnnotation(e,t,r){const n=await this.createNewAppearanceStream(t,e,r),a=this.createNewDict(t,e,{ap:n});return new this.prototype.constructor({dict:a,xref:e})}}t.MarkupAnnotation=x;class A extends v{constructor(e){super(e);const t=e.dict,r=this.data;this.ref=e.ref,r.annotationType=n.AnnotationType.WIDGET,void 0===r.fieldName&&(r.fieldName=this._constructFieldName(t)),void 0===r.actions&&(r.actions=(0,a.collectActions)(e.xref,t,n.AnnotationActionEventType));let o=(0,a.getInheritableProperty)({dict:t,key:"V",getArray:!0});r.fieldValue=this._decodeFormValue(o);const c=(0,a.getInheritableProperty)({dict:t,key:"DV",getArray:!0});if(r.defaultFieldValue=this._decodeFormValue(c),void 0===o&&e.xfaDatasets){const t=this._title.str;t&&(this._hasValueFromXFA=!0,r.fieldValue=o=e.xfaDatasets.getValue(t))}void 0===o&&null!==r.defaultFieldValue&&(r.fieldValue=r.defaultFieldValue),r.alternativeText=(0,n.stringToPDFString)(t.get("TU")||"");const l=(0,a.getInheritableProperty)({dict:t,key:"DA"})||e.acroForm.get("DA");this._defaultAppearance="string"==typeof l?l:"",r.defaultAppearanceData=(0,i.parseDefaultAppearance)(this._defaultAppearance);const h=(0,a.getInheritableProperty)({dict:t,key:"FT"});r.fieldType=h instanceof s.Name?h.name:null;const u=(0,a.getInheritableProperty)({dict:t,key:"DR"}),d=e.acroForm.get("DR"),f=this.appearance&&this.appearance.dict.get("Resources");this._fieldResources={localResources:u,acroFormResources:d,appearanceResources:f,mergedResources:s.Dict.merge({xref:e.xref,dictArray:[u,f,d],mergeSubDicts:!0})},r.fieldFlags=(0,a.getInheritableProperty)({dict:t,key:"Ff"}),Number.isInteger(r.fieldFlags)&&r.fieldFlags>=0||(r.fieldFlags=0),r.readOnly=this.hasFieldFlag(n.AnnotationFieldFlag.READONLY),r.required=this.hasFieldFlag(n.AnnotationFieldFlag.REQUIRED),r.hidden=this._hasFlag(r.annotationFlags,n.AnnotationFlag.HIDDEN)}_decodeFormValue(e){return Array.isArray(e)?e.filter((e=>"string"==typeof e)).map((e=>(0,n.stringToPDFString)(e))):e instanceof s.Name?(0,n.stringToPDFString)(e.name):"string"==typeof e?(0,n.stringToPDFString)(e):null}hasFieldFlag(e){return!!(this.data.fieldFlags&e)}static _getRotationMatrix(e,t,r){switch(e){case 90:return[0,1,-1,0,t,0];case 180:return[-1,0,0,-1,t,r];case 270:return[0,-1,1,0,0,r];default:throw Error("Invalid rotation")}}getRotationMatrix(e){const t=e?e.get(this.data.id):void 0;let r=t&&t.rotation;return void 0===r&&(r=this.rotation),0===r?n.IDENTITY_MATRIX:A._getRotationMatrix(r,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1])}getBorderAndBackgroundAppearances(e){const t=e?e.get(this.data.id):void 0;let r=t&&t.rotation;if(void 0===r&&(r=this.rotation),!this.backgroundColor&&!this.borderColor)return"";const n=this.data.rect[2]-this.data.rect[0],a=this.data.rect[3]-this.data.rect[1],s=0===r||180===r?`0 0 ${n} ${a} re`:`0 0 ${a} ${n} re`;let o="";return this.backgroundColor&&(o=`${(0,i.getPdfColor)(this.backgroundColor,!0)} ${s} f `),this.borderColor&&(o+=`${this.borderStyle.width||1} w ${(0,i.getPdfColor)(this.borderColor,!1)} ${s} S `),o}async getOperatorList(e,t,r,a,i){if(a&&!(this instanceof F))return{opList:new p.OperatorList,separateForm:!0,separateCanvas:!1};if(!this._hasText)return super.getOperatorList(e,t,r,a,i);const s=await this._getAppearance(e,t,i);if(this.appearance&&null===s)return super.getOperatorList(e,t,r,a,i);const o=new p.OperatorList;if(!this._defaultAppearance||null===s)return{opList:o,separateForm:!1,separateCanvas:!1};const c=w(this.data.rect,[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]],[1,0,0,1,0,0]);let l;this.oc&&(l=await e.parseMarkedContentProps(this.oc,null)),void 0!==l&&o.addOp(n.OPS.beginMarkedContentProps,["OC",l]),o.addOp(n.OPS.beginAnnotation,[this.data.id,this.data.rect,c,this.getRotationMatrix(i),!1]);const h=new g.StringStream(s);return await e.getOperatorList({stream:h,task:t,resources:this._fieldResources.mergedResources,operatorList:o}),o.addOp(n.OPS.endAnnotation,[]),void 0!==l&&o.addOp(n.OPS.endMarkedContent,[]),{opList:o,separateForm:!1,separateCanvas:!1}}_getMKDict(e){const t=new s.Dict(null);return e&&t.set("R",e),this.borderColor&&t.set("BC",Array.from(this.borderColor).map((e=>e/255))),this.backgroundColor&&t.set("BG",Array.from(this.backgroundColor).map((e=>e/255))),t.size>0?t:null}async save(e,t,r){const a=r?r.get(this.data.id):void 0;let i=a&&a.value,c=a&&a.rotation;if(i===this.data.fieldValue||void 0===i){if(!this._hasValueFromXFA&&void 0===c)return null;i=i||this.data.fieldValue}if(void 0===c&&!this._hasValueFromXFA&&Array.isArray(i)&&Array.isArray(this.data.fieldValue)&&i.length===this.data.fieldValue.length&&i.every(((e,t)=>e===this.data.fieldValue[t])))return null;void 0===c&&(c=this.rotation);let l=await this._getAppearance(e,t,r);if(null===l)return null;const{xref:h}=e,u=h.fetchIfRef(this.ref);if(!(u instanceof s.Dict))return null;const d=[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]],f={path:(0,n.stringToPDFString)(u.get("T")||""),value:i},p=h.getNewRef(),g=new s.Dict(h);g.set("N",p);const m=h.encrypt;let b=null,y=null;m&&(b=m.createCipherTransform(this.ref.num,this.ref.gen),y=m.createCipherTransform(p.num,p.gen),l=y.encryptString(l));const w=e=>(0,n.isAscii)(e)?e:(0,n.stringToUTF16BEString)(e);u.set("V",Array.isArray(i)?i.map(w):w(i)),u.set("AP",g),u.set("M","D:"+(0,n.getModificationDate)());const v=this._getMKDict(c);v&&u.set("MK",v);const S=new s.Dict(h);S.set("Length",l.length),S.set("Subtype",s.Name.get("Form")),S.set("Resources",this._getSaveFieldResources(h)),S.set("BBox",d);const x=this.getRotationMatrix(r);x!==n.IDENTITY_MATRIX&&S.set("Matrix",x);const A=[`${this.ref.num} ${this.ref.gen} obj\n`];(0,o.writeDict)(u,A,b),A.push("\nendobj\n");const k=[`${p.num} ${p.gen} obj\n`];return(0,o.writeDict)(S,k,y),k.push(" stream\n",l,"\nendstream\nendobj\n"),[{ref:this.ref,data:A.join(""),xfa:f},{ref:p,data:k.join(""),xfa:null}]}async _getAppearance(e,t,r){if(this.hasFieldFlag(n.AnnotationFieldFlag.PASSWORD))return null;const a=r?r.get(this.data.id):void 0;let s,o;if(a&&(s=a.formattedValue||a.value,o=a.rotation),void 0===o&&void 0===s&&(!this._hasValueFromXFA||this.appearance))return null;if(void 0===s&&(s=this.data.fieldValue,!s))return"";if(Array.isArray(s)&&1===s.length&&(s=s[0]),(0,n.assert)("string"==typeof s,"Expected `value` to be a string."),s=s.trim(),""===s)return"";void 0===o&&(o=this.rotation);let c=-1;this.data.multiLine&&(c=s.split(/\r\n|\r|\n/).length);let l=this.data.rect[3]-this.data.rect[1],h=this.data.rect[2]-this.data.rect[0];90!==o&&270!==o||([h,l]=[l,h]),this._defaultAppearance||(this.data.defaultAppearanceData=(0,i.parseDefaultAppearance)(this._defaultAppearance="/Helvetica 0 Tf 0 g"));const u=await A._getFontData(e,t,this.data.defaultAppearanceData,this._fieldResources.mergedResources),[d,f]=this._computeFontSize(l-2,h-4,s,u,c);let p=u.descent;isNaN(p)&&(p=0);const g=Math.min(Math.floor((l-f)/2),2)+Math.abs(p)*f,m=this.data.textAlignment;if(this.data.multiLine)return this._getMultilineAppearance(d,s,u,f,h,l,m,2,g,r);const b=u.encodeString(s).join("");if(this.data.comb)return this._getCombAppearance(d,u,b,h,2,g,r);const y=this.getBorderAndBackgroundAppearances(r);return 0===m||m>2?`/Tx BMC q ${y}BT `+d+` 1 0 0 1 2 ${g} Tm (${(0,n.escapeString)(b)}) Tj ET Q EMC`:`/Tx BMC q ${y}BT `+d+" 1 0 0 1 0 0 Tm "+this._renderText(b,u,f,h,m,2,g)+" ET Q EMC"}static async _getFontData(e,t,r,n){const a=new p.OperatorList,i={font:null,clone(){return this}},{fontName:o,fontSize:c}=r;return await e.handleSetFont(n,[o&&s.Name.get(o),c],null,a,t,i,null),i.font}_getTextWidth(e,t){return t.charsToGlyphs(e).reduce(((e,t)=>e+t.width),0)/1e3}_computeFontSize(e,t,r,a,s){let{fontSize:o}=this.data.defaultAppearanceData;if(!o){const c=e=>Math.floor(100*e)/100;if(-1===s){const i=this._getTextWidth(r,a);o=c(Math.min(e/n.LINE_FACTOR,t/i))}else{const i=r.split(/\r\n?|\n/),l=[];for(const e of i){const t=a.encodeString(e).join(""),r=a.charsToGlyphs(t),n=a.getCharPositions(t);l.push({line:t,glyphs:r,positions:n})}const h=r=>{let n=0;for(const i of l)if(n+=this._splitLine(null,a,r,t,i).length*r,n>e)return!0;return!1};o=12;let u=o*n.LINE_FACTOR,d=Math.round(e/u);for(d=Math.max(d,s);u=e/d,o=c(u/n.LINE_FACTOR),h(o);)d++}const{fontName:l,fontColor:h}=this.data.defaultAppearanceData;this._defaultAppearance=(0,i.createDefaultAppearance)({fontSize:o,fontName:l,fontColor:h})}return[this._defaultAppearance,o]}_renderText(e,t,r,i,s,o,c){let l;return l=1===s?(i-this._getTextWidth(e,t)*r)/2:2===s?i-this._getTextWidth(e,t)*r-o:o,l=(0,a.numberToString)(l),`${l} ${c=(0,a.numberToString)(c)} Td (${(0,n.escapeString)(e)}) Tj`}_getSaveFieldResources(e){const{localResources:t,appearanceResources:r,acroFormResources:n}=this._fieldResources,a=this.data.defaultAppearanceData&&this.data.defaultAppearanceData.fontName;if(!a)return t||s.Dict.empty;for(const e of[t,r])if(e instanceof s.Dict){const t=e.get("Font");if(t instanceof s.Dict&&t.has(a))return e}if(n instanceof s.Dict){const r=n.get("Font");if(r instanceof s.Dict&&r.has(a)){const n=new s.Dict(e);n.set(a,r.getRaw(a));const i=new s.Dict(e);return i.set("Font",n),s.Dict.merge({xref:e,dictArray:[i,t],mergeSubDicts:!0})}}return t||s.Dict.empty}getFieldObject(){return null}}class k extends A{constructor(e){super(e),this._hasText=!0;const t=e.dict;"string"!=typeof this.data.fieldValue&&(this.data.fieldValue="");let r=(0,a.getInheritableProperty)({dict:t,key:"Q"});(!Number.isInteger(r)||0>r||r>2)&&(r=null),this.data.textAlignment=r;let i=(0,a.getInheritableProperty)({dict:t,key:"MaxLen"});Number.isInteger(i)&&i>=0||(i=0),this.data.maxLen=i,this.data.multiLine=this.hasFieldFlag(n.AnnotationFieldFlag.MULTILINE),this.data.comb=this.hasFieldFlag(n.AnnotationFieldFlag.COMB)&&!this.hasFieldFlag(n.AnnotationFieldFlag.MULTILINE)&&!this.hasFieldFlag(n.AnnotationFieldFlag.PASSWORD)&&!this.hasFieldFlag(n.AnnotationFieldFlag.FILESELECT)&&0!==this.data.maxLen,this.data.doNotScroll=this.hasFieldFlag(n.AnnotationFieldFlag.DONOTSCROLL)}_getCombAppearance(e,t,r,i,s,o,c){const l=(0,a.numberToString)(i/this.data.maxLen),h=[],u=t.getCharPositions(r);for(const[e,t]of u)h.push(`(${(0,n.escapeString)(r.substring(e,t))}) Tj`);return`/Tx BMC q ${this.getBorderAndBackgroundAppearances(c)}BT `+e+` 1 0 0 1 ${s} ${o} Tm ${h.join(` ${l} 0 Td `)} ET Q EMC`}_getMultilineAppearance(e,t,r,n,a,i,s,o,c,l){const h=t.split(/\r\n?|\n/),u=[],d=a-2*o;for(const e of h){const t=this._splitLine(e,r,n,d);for(const e of t)u.push(this._renderText(e,r,n,a,s,0===u.length?o:0,-n))}const f=u.join("\n");return`/Tx BMC q ${this.getBorderAndBackgroundAppearances(l)}BT `+e+` 1 0 0 1 0 ${i} Tm ${f} ET Q EMC`}_splitLine(e,t,r,n,a={}){e=a.line||t.encodeString(e).join("");const i=a.glyphs||t.charsToGlyphs(e);if(1>=i.length)return[e];const s=a.positions||t.getCharPositions(e),o=r/1e3,c=[];let l=-1,h=-1,u=-1,d=0,f=0;for(let t=0,r=i.length;r>t;t++){const[r,a]=s[t],p=i[t],g=p.width*o;" "===p.unicode?f+g>n?(c.push(e.substring(d,r)),d=r,f=g,l=-1,u=-1):(f+=g,l=r,h=a,u=t):f+g>n?-1!==l?(c.push(e.substring(d,h)),d=h,t=u+1,l=-1,f=0):(c.push(e.substring(d,r)),d=r,f=g):f+=g}return e.length>d&&c.push(e.substring(d,e.length)),c}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue,defaultValue:this.data.defaultFieldValue||"",multiline:this.data.multiLine,password:this.hasFieldFlag(n.AnnotationFieldFlag.PASSWORD),charLimit:this.data.maxLen,comb:this.data.comb,editable:!this.data.readOnly,hidden:this.data.hidden,name:this.data.fieldName,rect:this.data.rect,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:"text"}}}class C extends A{constructor(e){super(e),this.checkedAppearance=null,this.uncheckedAppearance=null,this.data.checkBox=!this.hasFieldFlag(n.AnnotationFieldFlag.RADIO)&&!this.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),this.data.radioButton=this.hasFieldFlag(n.AnnotationFieldFlag.RADIO)&&!this.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),this.data.pushButton=this.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),this.data.isTooltipOnly=!1,this.data.checkBox?this._processCheckBox(e):this.data.radioButton?this._processRadioButton(e):this.data.pushButton?(this.data.hasOwnCanvas=!0,this._processPushButton(e)):(0,n.warn)("Invalid field flags for button widget annotation")}async getOperatorList(e,t,r,a,i){if(this.data.pushButton)return super.getOperatorList(e,t,r,!1,i);let s=null,o=null;if(i){const e=i.get(this.data.id);s=e?e.value:null,o=e?e.rotation:null}if(null===s&&this.appearance)return super.getOperatorList(e,t,r,a,i);null==s&&(s=this.data.checkBox?this.data.fieldValue===this.data.exportValue:this.data.fieldValue===this.data.buttonValue);const c=s?this.checkedAppearance:this.uncheckedAppearance;if(c){const s=this.appearance,l=c.dict.getArray("Matrix")||n.IDENTITY_MATRIX;o&&c.dict.set("Matrix",this.getRotationMatrix(i)),this.appearance=c;const h=super.getOperatorList(e,t,r,a,i);return this.appearance=s,c.dict.set("Matrix",l),h}return{opList:new p.OperatorList,separateForm:!1,separateCanvas:!1}}async save(e,t,r){return this.data.checkBox?this._saveCheckbox(e,t,r):this.data.radioButton?this._saveRadioButton(e,t,r):null}async _saveCheckbox(e,t,r){if(!r)return null;const a=r.get(this.data.id);let i=a&&a.rotation,c=a&&a.value;if(void 0===i){if(void 0===c)return null;if(this.data.fieldValue===this.data.exportValue===c)return null}const l=e.xref.fetchIfRef(this.ref);if(!(l instanceof s.Dict))return null;void 0===i&&(i=this.rotation),void 0===c&&(c=this.data.fieldValue===this.data.exportValue);const h={path:(0,n.stringToPDFString)(l.get("T")||""),value:c?this.data.exportValue:""},u=s.Name.get(c?this.data.exportValue:"Off");l.set("V",u),l.set("AS",u),l.set("M","D:"+(0,n.getModificationDate)());const d=this._getMKDict(i);d&&l.set("MK",d);const f=e.xref.encrypt;let p=null;f&&(p=f.createCipherTransform(this.ref.num,this.ref.gen));const g=[`${this.ref.num} ${this.ref.gen} obj\n`];return(0,o.writeDict)(l,g,p),g.push("\nendobj\n"),[{ref:this.ref,data:g.join(""),xfa:h}]}async _saveRadioButton(e,t,r){if(!r)return null;const a=r.get(this.data.id);let i=a&&a.rotation,c=a&&a.value;if(void 0===i){if(void 0===c)return null;if(this.data.fieldValue===this.data.buttonValue===c)return null}const l=e.xref.fetchIfRef(this.ref);if(!(l instanceof s.Dict))return null;void 0===c&&(c=this.data.fieldValue===this.data.buttonValue),void 0===i&&(i=this.rotation);const h={path:(0,n.stringToPDFString)(l.get("T")||""),value:c?this.data.buttonValue:""},u=s.Name.get(c?this.data.buttonValue:"Off");let d=null;const f=e.xref.encrypt;if(c)if(this.parent instanceof s.Ref){const t=e.xref.fetch(this.parent);let r=null;f&&(r=f.createCipherTransform(this.parent.num,this.parent.gen)),t.set("V",u),d=[`${this.parent.num} ${this.parent.gen} obj\n`],(0,o.writeDict)(t,d,r),d.push("\nendobj\n")}else this.parent instanceof s.Dict&&this.parent.set("V",u);l.set("AS",u),l.set("M","D:"+(0,n.getModificationDate)());const p=this._getMKDict(i);p&&l.set("MK",p);let g=null;f&&(g=f.createCipherTransform(this.ref.num,this.ref.gen));const m=[`${this.ref.num} ${this.ref.gen} obj\n`];(0,o.writeDict)(l,m,g),m.push("\nendobj\n");const b=[{ref:this.ref,data:m.join(""),xfa:h}];return null!==d&&b.push({ref:this.parent,data:d.join(""),xfa:null}),b}_getDefaultCheckedAppearance(e,t){const r=this.data.rect[2]-this.data.rect[0],i=this.data.rect[3]-this.data.rect[1],o=[0,0,r,i],c=.8*Math.min(r,i);let l,h;"check"===t?(l={width:.755*c,height:.705*c},h="3"):"disc"===t?(l={width:.791*c,height:.705*c},h="l"):(0,n.unreachable)("_getDefaultCheckedAppearance - unsupported type: "+t);const u=`q BT /PdfJsZaDb ${c} Tf 0 g ${(0,a.numberToString)((r-l.width)/2)} ${(0,a.numberToString)((i-l.height)/2)} Td (${h}) Tj ET Q`,d=new s.Dict(e.xref);d.set("FormType",1),d.set("Subtype",s.Name.get("Form")),d.set("Type",s.Name.get("XObject")),d.set("BBox",o),d.set("Matrix",[1,0,0,1,0,0]),d.set("Length",u.length);const f=new s.Dict(e.xref),p=new s.Dict(e.xref);p.set("PdfJsZaDb",this.fallbackFontDict),f.set("Font",p),d.set("Resources",f),this.checkedAppearance=new g.StringStream(u),this.checkedAppearance.dict=d,this._streams.push(this.checkedAppearance)}_processCheckBox(e){const t=e.dict.get("AP");if(!(t instanceof s.Dict))return;const r=t.get("N");if(!(r instanceof s.Dict))return;const n=this._decodeFormValue(e.dict.get("AS"));"string"==typeof n&&(this.data.fieldValue=n);const a=null!==this.data.fieldValue&&"Off"!==this.data.fieldValue?this.data.fieldValue:"Yes",i=r.getKeys();if(0===i.length)i.push("Off",a);else if(1===i.length)"Off"===i[0]?i.push(a):i.unshift("Off");else if(i.includes(a))i.length=0,i.push("Off",a);else{const e=i.find((e=>"Off"!==e));i.length=0,i.push("Off",e)}i.includes(this.data.fieldValue)||(this.data.fieldValue="Off"),this.data.exportValue=i[1],this.checkedAppearance=r.get(this.data.exportValue)||null,this.uncheckedAppearance=r.get("Off")||null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"check"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict}_processRadioButton(e){this.data.fieldValue=this.data.buttonValue=null;const t=e.dict.get("Parent");if(t instanceof s.Dict){this.parent=e.dict.getRaw("Parent");const r=t.get("V");r instanceof s.Name&&(this.data.fieldValue=this._decodeFormValue(r))}const r=e.dict.get("AP");if(!(r instanceof s.Dict))return;const n=r.get("N");if(n instanceof s.Dict){for(const e of n.getKeys())if("Off"!==e){this.data.buttonValue=this._decodeFormValue(e);break}this.checkedAppearance=n.get(this.data.buttonValue)||null,this.uncheckedAppearance=n.get("Off")||null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"disc"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict}}_processPushButton(e){e.dict.has("A")||e.dict.has("AA")||this.data.alternativeText?(this.data.isTooltipOnly=!e.dict.has("A")&&!e.dict.has("AA"),h.Catalog.parseDestDictionary({destDict:e.dict,resultObj:this.data,docBaseUrl:e.pdfManager.docBaseUrl})):(0,n.warn)("Push buttons without action dictionaries are not supported")}getFieldObject(){let e,t="button";return this.data.checkBox?(t="checkbox",e=this.data.exportValue):this.data.radioButton&&(t="radiobutton",e=this.data.buttonValue),{id:this.data.id,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:e,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,hidden:this.data.hidden,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:t}}get fallbackFontDict(){const e=new s.Dict;return e.set("BaseFont",s.Name.get("ZapfDingbats")),e.set("Type",s.Name.get("FallbackType")),e.set("Subtype",s.Name.get("FallbackType")),e.set("Encoding",s.Name.get("ZapfDingbatsEncoding")),(0,n.shadow)(this,"fallbackFontDict",e)}}class _ extends A{constructor(e){super(e),this.data.options=[];const t=(0,a.getInheritableProperty)({dict:e.dict,key:"Opt"});if(Array.isArray(t)){const r=e.xref;for(let e=0,n=t.length;n>e;e++){const n=r.fetchIfRef(t[e]),a=Array.isArray(n);this.data.options[e]={exportValue:this._decodeFormValue(a?r.fetchIfRef(n[0]):n),displayValue:this._decodeFormValue(a?r.fetchIfRef(n[1]):n)}}}"string"==typeof this.data.fieldValue?this.data.fieldValue=[this.data.fieldValue]:this.data.fieldValue||(this.data.fieldValue=[]),this.data.combo=this.hasFieldFlag(n.AnnotationFieldFlag.COMBO),this.data.multiSelect=this.hasFieldFlag(n.AnnotationFieldFlag.MULTISELECT),this._hasText=!0}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue.length>0?this.data.fieldValue[0]:null,defaultValue:this.data.defaultFieldValue,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,numItems:this.data.fieldValue.length,multipleSelection:this.data.multiSelect,hidden:this.data.hidden,actions:this.data.actions,items:this.data.options,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:this.data.combo?"combobox":"listbox"}}async _getAppearance(e,t,r){if(this.data.combo)return super._getAppearance(e,t,r);if(!r)return null;const a=r.get(this.data.id);if(!a)return null;const s=a.rotation;let o=a.value;if(void 0===s&&void 0===o)return null;void 0===o?o=this.data.fieldValue:Array.isArray(o)||(o=[o]);let c=this.data.rect[3]-this.data.rect[1],l=this.data.rect[2]-this.data.rect[0];90!==s&&270!==s||([l,c]=[c,l]);const h=this.data.options.length,u=[];for(let e=0;h>e;e++){const{exportValue:t}=this.data.options[e];o.includes(t)&&u.push(e)}this._defaultAppearance||(this.data.defaultAppearanceData=(0,i.parseDefaultAppearance)(this._defaultAppearance="/Helvetica 0 Tf 0 g"));const d=await A._getFontData(e,t,this.data.defaultAppearanceData,this._fieldResources.mergedResources);let f,{fontSize:p}=this.data.defaultAppearanceData;if(p)f=this._defaultAppearance;else{const e=(c-2)/h;let t,r=-1;for(const{displayValue:e}of this.data.options){const n=this._getTextWidth(e,d);n>r&&(r=n,t=e)}[f,p]=this._computeFontSize(e,l-4,t,d,-1)}const g=p*n.LINE_FACTOR,m=(g-p)/2,b=Math.floor(c/g);let y;if(1===u.length){const e=u[0];y=e-e%b}else y=u.length?u[0]:0;const w=Math.min(y+b+1,h),v=["/Tx BMC q",`1 1 ${l} ${c} re W n`];if(u.length){v.push("0.600006 0.756866 0.854904 rg");for(const e of u)e>=y&&w>e&&v.push(`1 ${c-(e-y+1)*g} ${l} ${g} re f`)}v.push("BT",f,`1 0 0 1 0 ${c} Tm`);for(let e=y;w>e;e++){const{displayValue:t}=this.data.options[e];v.push(this._renderText(t,d,p,l,0,e===y?2:0,-g+(e===y?m:0)))}return v.push("ET Q EMC"),v.join("\n")}}class F extends A{constructor(e){super(e),this.data.fieldValue=null}getFieldObject(){return{id:this.data.id,value:null,page:this.data.pageIndex,type:"signature"}}}class T extends x{constructor(e){super(e);const t=e.dict;this.data.annotationType=n.AnnotationType.TEXT,this.data.hasAppearance?this.data.name="NoIcon":(this.data.rect[1]=this.data.rect[3]-22,this.data.rect[2]=this.data.rect[0]+22,this.data.name=t.has("Name")?t.get("Name").name:"Note"),t.has("State")?(this.data.state=t.get("State")||null,this.data.stateModel=t.get("StateModel")||null):(this.data.state=null,this.data.stateModel=null)}}class O extends v{constructor(e){super(e),this.data.annotationType=n.AnnotationType.LINK;const t=y(e.dict,this.rectangle);t&&(this.data.quadPoints=t),this.data.borderColor=this.data.borderColor||this.data.color,h.Catalog.parseDestDictionary({destDict:e.dict,resultObj:this.data,docBaseUrl:e.pdfManager.docBaseUrl})}}class P extends v{constructor(e){super(e),this.data.annotationType=n.AnnotationType.POPUP;let t=e.dict.get("Parent");if(!t)return void(0,n.warn)("Popup annotation has a missing or invalid parent annotation.");const r=t.get("Subtype");this.data.parentType=r instanceof s.Name?r.name:null;const a=e.dict.getRaw("Parent");this.data.parentId=a instanceof s.Ref?""+a:null;const i=t.getArray("Rect");this.data.parentRect=Array.isArray(i)&&4===i.length?n.Util.normalizeRect(i):[0,0,0,0];const o=t.get("RT");if((0,s.isName)(o,n.AnnotationReplyType.GROUP)&&(t=t.get("IRT")),t.has("M")?(this.setModificationDate(t.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,t.has("C")?(this.setColor(t.getArray("C")),this.data.color=this.color):this.data.color=null,!this.viewable){const e=t.get("F");this._isViewable(e)&&this.setFlags(e)}this.setTitle(t.get("T")),this.data.titleObj=this._title,this.setContents(t.get("Contents")),this.data.contentsObj=this._contents,t.has("RC")&&(this.data.richText=m.XFAFactory.getRichTextAsHtml(t.get("RC")))}}t.PopupAnnotation=P;class I extends x{constructor(e){super(e),this.data.annotationType=n.AnnotationType.FREETEXT}get hasTextContent(){return!!this.appearance}static createNewDict(e,t,{apRef:r,ap:a}){const{color:o,fontSize:c,rect:l,rotation:h,user:u,value:d}=e,f=new s.Dict(t);f.set("Type",s.Name.get("Annot")),f.set("Subtype",s.Name.get("FreeText")),f.set("CreationDate","D:"+(0,n.getModificationDate)()),f.set("Rect",l);const p=`/Helv ${c} Tf ${(0,i.getPdfColor)(o,!0)}`;f.set("DA",p),f.set("Contents",d),f.set("F",4),f.set("Border",[0,0,0]),f.set("Rotate",h),u&&f.set("T",(0,n.stringToUTF8String)(u));const g=new s.Dict(t);return f.set("AP",g),g.set("N",r||a),f}static async createNewAppearanceStream(e,t,r){const{baseFontRef:o,evaluator:c,task:l}=r,{color:h,fontSize:u,rect:d,rotation:f,value:p}=e,m=new s.Dict(t),b=new s.Dict(t);if(o)b.set("Helv",o);else{const e=new s.Dict(t);e.set("BaseFont",s.Name.get("Helvetica")),e.set("Type",s.Name.get("Font")),e.set("Subtype",s.Name.get("Type1")),e.set("Encoding",s.Name.get("WinAnsiEncoding")),b.set("Helv",e)}m.set("Font",b);const y=await A._getFontData(c,l,{fontName:"Helvetica",fontSize:u},m),[w,v,S,x]=d;let k=S-w,C=x-v;f%180!=0&&([k,C]=[C,k]);const _=p.split("\n"),F=u/1e3;let T=-1/0;const O=[];for(let e of _){e=y.encodeString(e).join(""),O.push(e);let t=0;const r=y.charsToGlyphs(e);for(const e of r)t+=e.width*F;T=Math.max(T,t)}let P=1;T>k&&(P=k/T);let I=1;const E=n.LINE_FACTOR*u,M=n.LINE_DESCENT_FACTOR*u,R=E*_.length;R>C&&(I=C/R);const D=u*Math.min(P,I),N=["q",`0 0 ${(0,a.numberToString)(k)} ${(0,a.numberToString)(C)} re W n`,"BT",`1 0 0 1 0 ${(0,a.numberToString)(C+M)} Tm 0 Tc ${(0,i.getPdfColor)(h,!0)}`,`/Helv ${(0,a.numberToString)(D)} Tf`],L=(0,a.numberToString)(E);for(const e of O)N.push(`0 -${L} Td (${(0,n.escapeString)(e)}) Tj`);N.push("ET","Q");const j=N.join("\n"),B=new s.Dict(t);if(B.set("FormType",1),B.set("Subtype",s.Name.get("Form")),B.set("Type",s.Name.get("XObject")),B.set("BBox",[0,0,k,C]),B.set("Length",j.length),B.set("Resources",m),f){const e=A._getRotationMatrix(f,k,C);B.set("Matrix",e)}const U=new g.StringStream(j);return U.dict=B,U}}class E extends x{constructor(e){super(e);const{dict:t}=e;this.data.annotationType=n.AnnotationType.LINE;const r=t.getArray("L");if(this.data.lineCoordinates=n.Util.normalizeRect(r),this.setLineEndings(t.getArray("LE")),this.data.lineEndings=this.lineEndings,!this.appearance){const a=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],i=t.get("CA");let s=null,o=t.getArray("IC");o&&(o=b(o,null),s=o?Array.from(o).map((e=>e/255)):null);const c=s?i:null,l=this.borderStyle.width||1,h=2*l,u=[this.data.lineCoordinates[0]-h,this.data.lineCoordinates[1]-h,this.data.lineCoordinates[2]+h,this.data.lineCoordinates[3]+h];n.Util.intersect(this.rectangle,u)||(this.rectangle=u),this._setDefaultAppearance({xref:e.xref,extra:l+" w",strokeColor:a,fillColor:s,strokeAlpha:i,fillAlpha:c,pointsCallback:(e,t)=>(e.push(`${r[0]} ${r[1]} m`,`${r[2]} ${r[3]} l`,"S"),[t[0].x-l,t[1].x+l,t[3].y-l,t[1].y+l])})}}}class M extends x{constructor(e){if(super(e),this.data.annotationType=n.AnnotationType.SQUARE,!this.appearance){const t=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],r=e.dict.get("CA");let n=null,a=e.dict.getArray("IC");if(a&&(a=b(a,null),n=a?Array.from(a).map((e=>e/255)):null),0===this.borderStyle.width&&!n)return;this._setDefaultAppearance({xref:e.xref,extra:this.borderStyle.width+" w",strokeColor:t,fillColor:n,strokeAlpha:r,fillAlpha:n?r:null,pointsCallback:(e,t)=>(e.push(`${t[2].x+this.borderStyle.width/2} ${t[2].y+this.borderStyle.width/2} ${t[3].x-t[2].x-this.borderStyle.width} ${t[1].y-t[3].y-this.borderStyle.width} re`),e.push(n?"B":"S"),[t[0].x,t[1].x,t[3].y,t[1].y])})}}}class R extends x{constructor(e){if(super(e),this.data.annotationType=n.AnnotationType.CIRCLE,!this.appearance){const t=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],r=e.dict.get("CA");let n=null,a=e.dict.getArray("IC");if(a&&(a=b(a,null),n=a?Array.from(a).map((e=>e/255)):null),0===this.borderStyle.width&&!n)return;const i=.5522847498307933;this._setDefaultAppearance({xref:e.xref,extra:this.borderStyle.width+" w",strokeColor:t,fillColor:n,strokeAlpha:r,fillAlpha:n?r:null,pointsCallback:(e,t)=>{const r=t[0].x+this.borderStyle.width/2,a=t[0].y-this.borderStyle.width/2,s=t[3].x-this.borderStyle.width/2,o=t[3].y+this.borderStyle.width/2,c=r+(s-r)/2,l=a+(o-a)/2,h=(s-r)/2*i,u=(o-a)/2*i;return e.push(`${c} ${o} m`,`${c+h} ${o} ${s} ${l+u} ${s} ${l} c`,`${s} ${l-u} ${c+h} ${a} ${c} ${a} c`,`${c-h} ${a} ${r} ${l-u} ${r} ${l} c`,`${r} ${l+u} ${c-h} ${o} ${c} ${o} c`,"h"),e.push(n?"B":"S"),[t[0].x,t[1].x,t[3].y,t[1].y]}})}}}class D extends x{constructor(e){super(e);const{dict:t}=e;this.data.annotationType=n.AnnotationType.POLYLINE,this.data.vertices=[],this instanceof N||(this.setLineEndings(t.getArray("LE")),this.data.lineEndings=this.lineEndings);const r=t.getArray("Vertices");if(Array.isArray(r)){for(let e=0,t=r.length;t>e;e+=2)this.data.vertices.push({x:r[e],y:r[e+1]});if(!this.appearance){const r=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],a=t.get("CA"),i=this.borderStyle.width||1,s=2*i,o=[1/0,1/0,-1/0,-1/0];for(const e of this.data.vertices)o[0]=Math.min(o[0],e.x-s),o[1]=Math.min(o[1],e.y-s),o[2]=Math.max(o[2],e.x+s),o[3]=Math.max(o[3],e.y+s);n.Util.intersect(this.rectangle,o)||(this.rectangle=o),this._setDefaultAppearance({xref:e.xref,extra:i+" w",strokeColor:r,strokeAlpha:a,pointsCallback:(e,t)=>{const r=this.data.vertices;for(let t=0,n=r.length;n>t;t++)e.push(`${r[t].x} ${r[t].y} ${0===t?"m":"l"}`);return e.push("S"),[t[0].x,t[1].x,t[3].y,t[1].y]}})}}}}class N extends D{constructor(e){super(e),this.data.annotationType=n.AnnotationType.POLYGON}}class L extends x{constructor(e){super(e),this.data.annotationType=n.AnnotationType.CARET}}class j extends x{constructor(e){super(e),this.data.annotationType=n.AnnotationType.INK,this.data.inkLists=[];const t=e.dict.getArray("InkList");if(!Array.isArray(t))return;const r=e.xref;for(let e=0,n=t.length;n>e;++e){this.data.inkLists.push([]);for(let n=0,a=t[e].length;a>n;n+=2)this.data.inkLists[e].push({x:r.fetchIfRef(t[e][n]),y:r.fetchIfRef(t[e][n+1])})}if(!this.appearance){const t=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],r=e.dict.get("CA"),a=this.borderStyle.width||1,i=2*a,s=[1/0,1/0,-1/0,-1/0];for(const e of this.data.inkLists)for(const t of e)s[0]=Math.min(s[0],t.x-i),s[1]=Math.min(s[1],t.y-i),s[2]=Math.max(s[2],t.x+i),s[3]=Math.max(s[3],t.y+i);n.Util.intersect(this.rectangle,s)||(this.rectangle=s),this._setDefaultAppearance({xref:e.xref,extra:a+" w",strokeColor:t,strokeAlpha:r,pointsCallback:(e,t)=>{for(const t of this.data.inkLists){for(let r=0,n=t.length;n>r;r++)e.push(`${t[r].x} ${t[r].y} ${0===r?"m":"l"}`);e.push("S")}return[t[0].x,t[1].x,t[3].y,t[1].y]}})}}static createNewDict(e,t,{apRef:r,ap:a}){const{paths:i,rect:o,rotation:c}=e,l=new s.Dict(t);l.set("Type",s.Name.get("Annot")),l.set("Subtype",s.Name.get("Ink")),l.set("CreationDate","D:"+(0,n.getModificationDate)()),l.set("Rect",o),l.set("InkList",i.map((e=>e.points))),l.set("F",4),l.set("Border",[0,0,0]),l.set("Rotate",c);const h=new s.Dict(t);return l.set("AP",h),h.set("N",r||a),l}static async createNewAppearanceStream(e,t,r){const{color:n,rect:o,rotation:c,paths:l,thickness:h,opacity:u}=e,[d,f,p,m]=o;let b=p-d,y=m-f;c%180!=0&&([b,y]=[y,b]);const w=[h+" w 1 J 1 j",""+(0,i.getPdfColor)(n,!1)];1!==u&&w.push("/R0 gs");const v=[];for(const{bezier:e}of l){v.length=0,v.push(`${(0,a.numberToString)(e[0])} ${(0,a.numberToString)(e[1])} m`);for(let t=2,r=e.length;r>t;t+=6){const r=e.slice(t,t+6).map(a.numberToString).join(" ");v.push(r+" c")}v.push("S"),w.push(v.join("\n"))}const S=w.join("\n"),x=new s.Dict(t);if(x.set("FormType",1),x.set("Subtype",s.Name.get("Form")),x.set("Type",s.Name.get("XObject")),x.set("BBox",[0,0,b,y]),x.set("Length",S.length),c){const e=A._getRotationMatrix(c,b,y);x.set("Matrix",e)}if(1!==u){const e=new s.Dict(t),r=new s.Dict(t),n=new s.Dict(t);n.set("CA",u),n.set("Type",s.Name.get("ExtGState")),r.set("R0",n),e.set("ExtGState",r),x.set("Resources",e)}const k=new g.StringStream(S);return k.dict=x,k}}class B extends x{constructor(e){if(super(e),this.data.annotationType=n.AnnotationType.HIGHLIGHT,this.data.quadPoints=y(e.dict,null)){const t=this.appearance&&this.appearance.dict.get("Resources");if(!this.appearance||!t||!t.has("ExtGState")){this.appearance&&(0,n.warn)("HighlightAnnotation - ignoring built-in appearance stream.");const t=this.color?Array.from(this.color).map((e=>e/255)):[1,1,0],r=e.dict.get("CA");this._setDefaultAppearance({xref:e.xref,fillColor:t,blendMode:"Multiply",fillAlpha:r,pointsCallback:(e,t)=>(e.push(`${t[0].x} ${t[0].y} m`,`${t[1].x} ${t[1].y} l`,`${t[3].x} ${t[3].y} l`,`${t[2].x} ${t[2].y} l`,"f"),[t[0].x,t[1].x,t[3].y,t[1].y])})}}else this.data.hasPopup=!1}}class U extends x{constructor(e){if(super(e),this.data.annotationType=n.AnnotationType.UNDERLINE,this.data.quadPoints=y(e.dict,null)){if(!this.appearance){const t=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],r=e.dict.get("CA");this._setDefaultAppearance({xref:e.xref,extra:"[] 0 d 1 w",strokeColor:t,strokeAlpha:r,pointsCallback:(e,t)=>(e.push(`${t[2].x} ${t[2].y} m`,`${t[3].x} ${t[3].y} l`,"S"),[t[0].x,t[1].x,t[3].y,t[1].y])})}}else this.data.hasPopup=!1}}class $ extends x{constructor(e){if(super(e),this.data.annotationType=n.AnnotationType.SQUIGGLY,this.data.quadPoints=y(e.dict,null)){if(!this.appearance){const t=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],r=e.dict.get("CA");this._setDefaultAppearance({xref:e.xref,extra:"[] 0 d 1 w",strokeColor:t,strokeAlpha:r,pointsCallback:(e,t)=>{const r=(t[0].y-t[2].y)/6;let n=r,a=t[2].x;const i=t[2].y,s=t[3].x;e.push(`${a} ${i+n} m`);do{a+=2,n=0===n?r:0,e.push(`${a} ${i+n} l`)}while(s>a);return e.push("S"),[t[2].x,s,i-2*r,i+2*r]}})}}else this.data.hasPopup=!1}}class q extends x{constructor(e){if(super(e),this.data.annotationType=n.AnnotationType.STRIKEOUT,this.data.quadPoints=y(e.dict,null)){if(!this.appearance){const t=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],r=e.dict.get("CA");this._setDefaultAppearance({xref:e.xref,extra:"[] 0 d 1 w",strokeColor:t,strokeAlpha:r,pointsCallback:(e,t)=>(e.push((t[0].x+t[2].x)/2+" "+(t[0].y+t[2].y)/2+" m",(t[1].x+t[3].x)/2+" "+(t[1].y+t[3].y)/2+" l","S"),[t[0].x,t[1].x,t[3].y,t[1].y])})}}else this.data.hasPopup=!1}}class X extends x{constructor(e){super(e),this.data.annotationType=n.AnnotationType.STAMP}}class H extends x{constructor(e){super(e);const t=new d.FileSpec(e.dict.get("FS"),e.xref);this.data.annotationType=n.AnnotationType.FILEATTACHMENT,this.data.file=t.serializable}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createDefaultAppearance=function({fontSize:e,fontName:t,fontColor:r}){return`/${(0,n.escapePDFName)(t)} ${e} Tf ${h(r,!0)}`},t.getPdfColor=h,t.parseDefaultAppearance=function(e){return new l(e).parse()};var n=r(6),a=r(2),i=r(14),s=r(15),o=r(5),c=r(10);class l extends s.EvaluatorPreprocessor{constructor(e){super(new c.StringStream(e))}parse(){const e={fn:0,args:[]},t={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;e.args.length=0,this.read(e);){if(0!==this.savedStatesDepth)continue;const{fn:r,args:n}=e;switch(0|r){case a.OPS.setFont:const[e,r]=n;e instanceof o.Name&&(t.fontName=e.name),"number"==typeof r&&r>0&&(t.fontSize=r);break;case a.OPS.setFillRGBColor:i.ColorSpace.singletons.rgb.getRgbItem(n,0,t.fontColor,0);break;case a.OPS.setFillGray:i.ColorSpace.singletons.gray.getRgbItem(n,0,t.fontColor,0);break;case a.OPS.setFillColorSpace:i.ColorSpace.singletons.cmyk.getRgbItem(n,0,t.fontColor,0)}}}catch(e){(0,a.warn)(`parseDefaultAppearance - ignoring errors: "${e}".`)}return t}}function h(e,t){return e[0]===e[1]&&e[1]===e[2]?`${(0,n.numberToString)(e[0]/255)} ${t?"g":"G"}`:Array.from(e).map((e=>(0,n.numberToString)(e/255))).join(" ")+" "+(t?"rg":"RG")}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorSpace=void 0;var n=r(2),a=r(5),i=r(7),s=r(6);class o{constructor(e,t){this.constructor===o&&(0,n.unreachable)("Cannot initialize ColorSpace."),this.name=e,this.numComps=t}getRgb(e,t){const r=new Uint8ClampedArray(3);return this.getRgbItem(e,t,r,0),r}getRgbItem(e,t,r,a){(0,n.unreachable)("Should not call ColorSpace.getRgbItem")}getRgbBuffer(e,t,r,a,i,s,o){(0,n.unreachable)("Should not call ColorSpace.getRgbBuffer")}getOutputLength(e,t){(0,n.unreachable)("Should not call ColorSpace.getOutputLength")}isPassthrough(e){return!1}isDefaultDecode(e,t){return o.isDefaultDecode(e,this.numComps)}fillRgb(e,t,r,n,a,i,s,o,c){const l=t*r;let h=null;const u=1<<s,d=r!==a||t!==n;if(this.isPassthrough(s))h=o;else if(1===this.numComps&&l>u&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){const t=s>8?new Uint16Array(u):new Uint8Array(u);for(let e=0;u>e;e++)t[e]=e;const r=new Uint8ClampedArray(3*u);if(this.getRgbBuffer(t,0,u,r,0,s,0),d){h=new Uint8Array(3*l);let e=0;for(let t=0;l>t;++t){const n=3*o[t];h[e++]=r[n],h[e++]=r[n+1],h[e++]=r[n+2]}}else{let t=0;for(let n=0;l>n;++n){const a=3*o[n];e[t++]=r[a],e[t++]=r[a+1],e[t++]=r[a+2],t+=c}}}else d?(h=new Uint8ClampedArray(3*l),this.getRgbBuffer(o,0,l,h,0,s,0)):this.getRgbBuffer(o,0,n*i,e,0,s,c);if(h)if(d)!function(e,t,r,n,a,i,s){s=1!==s?0:s;const o=r/a,c=n/i;let l,h=0;const u=new Uint16Array(a),d=3*r;for(let e=0;a>e;e++)u[e]=3*Math.floor(e*o);for(let r=0;i>r;r++){const n=Math.floor(r*c)*d;for(let r=0;a>r;r++)l=n+u[r],t[h++]=e[l++],t[h++]=e[l++],t[h++]=e[l++],h+=s}}(h,e,t,r,n,a,c);else{let t=0,r=0;for(let a=0,s=n*i;s>a;a++)e[t++]=h[r++],e[t++]=h[r++],e[t++]=h[r++],t+=c}}get usesZeroToOneRange(){return(0,n.shadow)(this,"usesZeroToOneRange",!0)}static _cache(e,t,r,n){if(!r)throw Error('ColorSpace._cache - expected "localColorSpaceCache" argument.');if(!n)throw Error('ColorSpace._cache - expected "parsedColorSpace" argument.');let i,s;e instanceof a.Ref&&(s=e,e=t.fetch(e)),e instanceof a.Name&&(i=e.name),(i||s)&&r.set(i,s,n)}static getCached(e,t,r){if(!r)throw Error('ColorSpace.getCached - expected "localColorSpaceCache" argument.');if(e instanceof a.Ref){const n=r.getByRef(e);if(n)return n;try{e=t.fetch(e)}catch(e){if(e instanceof s.MissingDataException)throw e}}if(e instanceof a.Name){const t=r.getByName(e.name);if(t)return t}return null}static async parseAsync({cs:e,xref:t,resources:r=null,pdfFunctionFactory:n,localColorSpaceCache:a}){const i=this._parse(e,t,r,n);return this._cache(e,t,a,i),i}static parse({cs:e,xref:t,resources:r=null,pdfFunctionFactory:n,localColorSpaceCache:a}){const i=this.getCached(e,t,a);if(i)return i;const s=this._parse(e,t,r,n);return this._cache(e,t,a,s),s}static _parse(e,t,r=null,i){if((e=t.fetchIfRef(e))instanceof a.Name)switch(e.name){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"Pattern":return new l(null);default:if(r instanceof a.Dict){const n=r.get("ColorSpace");if(n instanceof a.Dict){const s=n.get(e.name);if(s){if(s instanceof a.Name)return this._parse(s,t,r,i);e=s;break}}}throw new n.FormatError("Unrecognized ColorSpace: "+e.name)}if(Array.isArray(e)){const a=t.fetchIfRef(e[0]).name;let s,o,u,d,f,b;switch(a){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"CalGray":return s=t.fetchIfRef(e[1]),d=s.getArray("WhitePoint"),f=s.getArray("BlackPoint"),b=s.get("Gamma"),new p(d,f,b);case"CalRGB":s=t.fetchIfRef(e[1]),d=s.getArray("WhitePoint"),f=s.getArray("BlackPoint"),b=s.getArray("Gamma");const y=s.getArray("Matrix");return new g(d,f,b,y);case"ICCBased":const w=t.fetchIfRef(e[1]).dict;o=w.get("N");const v=w.get("Alternate");if(v){const e=this._parse(v,t,r,i);if(e.numComps===o)return e;(0,n.warn)("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===o)return this.singletons.gray;if(3===o)return this.singletons.rgb;if(4===o)return this.singletons.cmyk;break;case"Pattern":return u=e[1]||null,u&&(u=this._parse(u,t,r,i)),new l(u);case"I":case"Indexed":u=this._parse(e[1],t,r,i);const S=t.fetchIfRef(e[2])+1,x=t.fetchIfRef(e[3]);return new h(u,S,x);case"Separation":case"DeviceN":const A=t.fetchIfRef(e[1]);o=Array.isArray(A)?A.length:1,u=this._parse(e[2],t,r,i);const k=i.create(e[3]);return new c(o,u,k);case"Lab":s=t.fetchIfRef(e[1]),d=s.getArray("WhitePoint"),f=s.getArray("BlackPoint");const C=s.getArray("Range");return new m(d,f,C);default:throw new n.FormatError("Unimplemented ColorSpace object: "+a)}}throw new n.FormatError("Unrecognized ColorSpace object: "+e)}static isDefaultDecode(e,t){if(!Array.isArray(e))return!0;if(2*t!==e.length)return(0,n.warn)("The decode map is not the correct length"),!0;for(let t=0,r=e.length;r>t;t+=2)if(0!==e[t]||1!==e[t+1])return!1;return!0}static get singletons(){return(0,n.shadow)(this,"singletons",{get gray(){return(0,n.shadow)(this,"gray",new u)},get rgb(){return(0,n.shadow)(this,"rgb",new d)},get cmyk(){return(0,n.shadow)(this,"cmyk",new f)}})}}t.ColorSpace=o;class c extends o{constructor(e,t,r){super("Alternate",e),this.base=t,this.tintFn=r,this.tmpBuf=new Float32Array(t.numComps)}getRgbItem(e,t,r,n){const a=this.tmpBuf;this.tintFn(e,t,a,0),this.base.getRgbItem(a,0,r,n)}getRgbBuffer(e,t,r,n,a,i,s){const o=this.tintFn,c=this.base,l=1/((1<<i)-1),h=c.numComps,u=c.usesZeroToOneRange,d=(c.isPassthrough(8)||!u)&&0===s;let f=d?a:0;const p=d?n:new Uint8ClampedArray(h*r),g=this.numComps,m=new Float32Array(g),b=new Float32Array(h);let y,w;for(y=0;r>y;y++){for(w=0;g>w;w++)m[w]=e[t++]*l;if(o(m,0,b,0),u)for(w=0;h>w;w++)p[f++]=255*b[w];else c.getRgbItem(b,0,p,f),f+=h}d||c.getRgbBuffer(p,0,r,n,a,8,s)}getOutputLength(e,t){return this.base.getOutputLength(e*this.base.numComps/this.numComps,t)}}class l extends o{constructor(e){super("Pattern",null),this.base=e}isDefaultDecode(e,t){(0,n.unreachable)("Should not call PatternCS.isDefaultDecode")}}class h extends o{constructor(e,t,r){super("Indexed",1),this.base=e,this.highVal=t;const a=e.numComps*t;if(this.lookup=new Uint8Array(a),r instanceof i.BaseStream){const e=r.getBytes(a);this.lookup.set(e)}else{if("string"!=typeof r)throw new n.FormatError("IndexedCS - unrecognized lookup table: "+r);for(let e=0;a>e;++e)this.lookup[e]=255&r.charCodeAt(e)}}getRgbItem(e,t,r,n){this.base.getRgbBuffer(this.lookup,e[t]*this.base.numComps,1,r,n,8,0)}getRgbBuffer(e,t,r,n,a,i,s){const o=this.base,c=o.numComps,l=o.getOutputLength(c,s),h=this.lookup;for(let i=0;r>i;++i){const r=e[t++]*c;o.getRgbBuffer(h,r,1,n,a,8,s),a+=l}}getOutputLength(e,t){return this.base.getOutputLength(e*this.base.numComps,t)}isDefaultDecode(e,t){return!Array.isArray(e)||(2!==e.length?((0,n.warn)("Decode map length is not correct"),!0):!Number.isInteger(t)||1>t?((0,n.warn)("Bits per component is not correct"),!0):0===e[0]&&e[1]===(1<<t)-1)}}class u extends o{constructor(){super("DeviceGray",1)}getRgbItem(e,t,r,n){r[n]=r[n+1]=r[n+2]=255*e[t]}getRgbBuffer(e,t,r,n,a,i,s){const o=255/((1<<i)-1);let c=t,l=a;for(let t=0;r>t;++t){const t=o*e[c++];n[l++]=t,n[l++]=t,n[l++]=t,l+=s}}getOutputLength(e,t){return e*(3+t)}}class d extends o{constructor(){super("DeviceRGB",3)}getRgbItem(e,t,r,n){r[n]=255*e[t],r[n+1]=255*e[t+1],r[n+2]=255*e[t+2]}getRgbBuffer(e,t,r,n,a,i,s){if(8===i&&0===s)return void n.set(e.subarray(t,t+3*r),a);const o=255/((1<<i)-1);let c=t,l=a;for(let t=0;r>t;++t)n[l++]=o*e[c++],n[l++]=o*e[c++],n[l++]=o*e[c++],l+=s}getOutputLength(e,t){return e*(3+t)/3|0}isPassthrough(e){return 8===e}}const f=function(){function e(e,t,r,n,a){const i=e[t]*r,s=e[t+1]*r,o=e[t+2]*r,c=e[t+3]*r;n[a]=255+i*(-4.387332384609988*i+54.48615194189176*s+18.82290502165302*o+212.25662451639585*c-285.2331026137004)+s*(1.7149763477362134*s-5.6096736904047315*o+-17.873870861415444*c-5.497006427196366)+o*(-2.5217340131683033*o-21.248923337353073*c+17.5119270841813)+c*(-21.86122147463605*c-189.48180835922747),n[a+1]=255+i*(8.841041422036149*i+60.118027045597366*s+6.871425592049007*o+31.159100130055922*c-79.2970844816548)+s*(-15.310361306967817*s+17.575251261109482*o+131.35250912493976*c-190.9453302588951)+o*(4.444339102852739*o+9.8632861493405*c-24.86741582555878)+c*(-20.737325471181034*c-187.80453709719578),n[a+2]=255+i*(.8842522430003296*i+8.078677503112928*s+30.89978309703729*o-.23883238689178934*c-14.183576799673286)+s*(10.49593273432072*s+63.02378494754052*o+50.606957656360734*c-112.23884253719248)+o*(.03296041114873217*o+115.60384449646641*c-193.58209356861505)+c*(-22.33816807309886*c-180.12613974708367)}return class extends o{constructor(){super("DeviceCMYK",4)}getRgbItem(t,r,n,a){e(t,r,1,n,a)}getRgbBuffer(t,r,n,a,i,s,o){const c=1/((1<<s)-1);for(let s=0;n>s;s++)e(t,r,c,a,i),r+=4,i+=3+o}getOutputLength(e,t){return e/4*(3+t)|0}}}(),p=function(){function e(e,t,r,n,a,i){const s=Math.max(295.8*(e.YW*(t[r]*i)**e.G)**.3333333333333333-40.8,0);n[a]=s,n[a+1]=s,n[a+2]=s}return class extends o{constructor(e,t,r){if(super("CalGray",1),!e)throw new n.FormatError("WhitePoint missing - required for color space CalGray");if(t=t||[0,0,0],r=r||1,this.XW=e[0],this.YW=e[1],this.ZW=e[2],this.XB=t[0],this.YB=t[1],this.ZB=t[2],this.G=r,0>this.XW||0>this.ZW||1!==this.YW)throw new n.FormatError("Invalid WhitePoint components for "+this.name+", no fallback available");(0>this.XB||0>this.YB||0>this.ZB)&&((0,n.info)(`Invalid BlackPoint for ${this.name}, falling back to default.`),this.XB=this.YB=this.ZB=0),0===this.XB&&0===this.YB&&0===this.ZB||(0,n.warn)(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`),1>this.G&&((0,n.info)(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`),this.G=1)}getRgbItem(t,r,n,a){e(this,t,r,n,a,1)}getRgbBuffer(t,r,n,a,i,s,o){const c=1/((1<<s)-1);for(let s=0;n>s;++s)e(this,t,r,a,i,c),r+=1,i+=3+o}getOutputLength(e,t){return e*(3+t)}}}(),g=function(){const e=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]),t=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]),r=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]),a=new Float32Array([1,1,1]),i=new Float32Array(3),s=new Float32Array(3),c=new Float32Array(3),l=(24/116)**3/8;function h(e,t,r){r[0]=e[0]*t[0]+e[1]*t[1]+e[2]*t[2],r[1]=e[3]*t[0]+e[4]*t[1]+e[5]*t[2],r[2]=e[6]*t[0]+e[7]*t[1]+e[8]*t[2]}function u(e){return e>.0031308?.99554525>e?d(0,1,1.055*e**(1/2.4)-.055):1:d(0,1,12.92*e)}function d(e,t,r){return Math.max(e,Math.min(t,r))}function f(e){return 0>e?-f(-e):e>8?((e+16)/116)**3:e*l}function p(n,o,l,p,g,m){const b=d(0,1,o[l]*m),y=d(0,1,o[l+1]*m),w=d(0,1,o[l+2]*m),v=1===b?1:b**n.GR,S=1===y?1:y**n.GG,x=1===w?1:w**n.GB,A=n.MYA*v+n.MYB*S+n.MYC*x,k=n.MZA*v+n.MZB*S+n.MZC*x,C=s;C[0]=n.MXA*v+n.MXB*S+n.MXC*x,C[1]=A,C[2]=k;const _=c;!function(r,n,a){if(1===r[0]&&1===r[2])return a[0]=n[0],a[1]=n[1],void(a[2]=n[2]);const s=a;h(e,n,s);const o=i;!function(e,t,r){r[0]=1*t[0]/e[0],r[1]=1*t[1]/e[1],r[2]=1*t[2]/e[2]}(r,s,o),h(t,o,a)}(n.whitePoint,C,_);const F=s;!function(e,t,r){if(0===e[0]&&0===e[1]&&0===e[2])return r[0]=t[0],r[1]=t[1],void(r[2]=t[2]);const n=f(0),a=(1-n)/(1-f(e[0])),i=(1-n)/(1-f(e[1])),s=1-i,o=(1-n)/(1-f(e[2])),c=1-o;r[0]=t[0]*a+(1-a),r[1]=t[1]*i+s,r[2]=t[2]*o+c}(n.blackPoint,_,F);const T=c;!function(r,n,a){const s=a;h(e,n,s);const o=i;!function(e,t,r){r[0]=.95047*t[0]/e[0],r[1]=1*t[1]/e[1],r[2]=1.08883*t[2]/e[2]}(r,s,o),h(t,o,a)}(a,F,T);const O=s;h(r,T,O),p[g]=255*u(O[0]),p[g+1]=255*u(O[1]),p[g+2]=255*u(O[2])}return class extends o{constructor(e,t,r,a){if(super("CalRGB",3),!e)throw new n.FormatError("WhitePoint missing - required for color space CalRGB");t=t||new Float32Array(3),r=r||new Float32Array([1,1,1]),a=a||new Float32Array([1,0,0,0,1,0,0,0,1]);const i=e[0],s=e[1],o=e[2];this.whitePoint=e;const c=t[0],l=t[1],h=t[2];if(this.blackPoint=t,this.GR=r[0],this.GG=r[1],this.GB=r[2],this.MXA=a[0],this.MYA=a[1],this.MZA=a[2],this.MXB=a[3],this.MYB=a[4],this.MZB=a[5],this.MXC=a[6],this.MYC=a[7],this.MZC=a[8],0>i||0>o||1!==s)throw new n.FormatError("Invalid WhitePoint components for "+this.name+", no fallback available");(0>c||0>l||0>h)&&((0,n.info)(`Invalid BlackPoint for ${this.name} [${c}, ${l}, ${h}], falling back to default.`),this.blackPoint=new Float32Array(3)),(0>this.GR||0>this.GG||0>this.GB)&&((0,n.info)(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for `+this.name+", falling back to default."),this.GR=this.GG=this.GB=1)}getRgbItem(e,t,r,n){p(this,e,t,r,n,1)}getRgbBuffer(e,t,r,n,a,i,s){const o=1/((1<<i)-1);for(let i=0;r>i;++i)p(this,e,t,n,a,o),t+=3,a+=3+s}getOutputLength(e,t){return e*(3+t)/3|0}}}(),m=function(){function e(e){let t;return t=6/29>e?108/841*(e-4/29):e**3,t}function t(e,t,r,n){return r+e*(n-r)/t}function r(r,n,a,i,s,o){let c=n[a],l=n[a+1],h=n[a+2];!1!==i&&(c=t(c,i,0,100),l=t(l,i,r.amin,r.amax),h=t(h,i,r.bmin,r.bmax)),l>r.amax?l=r.amax:r.amin>l&&(l=r.amin),h>r.bmax?h=r.bmax:r.bmin>h&&(h=r.bmin);const u=(c+16)/116,d=u-h/200,f=r.XW*e(u+l/500),p=r.YW*e(u),g=r.ZW*e(d);let m,b,y;1>r.ZW?(m=3.1339*f+-1.617*p+-.4906*g,b=-.9785*f+1.916*p+.0333*g,y=.072*f+-.229*p+1.4057*g):(m=3.2406*f+-1.5372*p+-.4986*g,b=-.9689*f+1.8758*p+.0415*g,y=.0557*f+-.204*p+1.057*g),s[o]=255*Math.sqrt(m),s[o+1]=255*Math.sqrt(b),s[o+2]=255*Math.sqrt(y)}return class extends o{constructor(e,t,r){if(super("Lab",3),!e)throw new n.FormatError("WhitePoint missing - required for color space Lab");if(t=t||[0,0,0],r=r||[-100,100,-100,100],this.XW=e[0],this.YW=e[1],this.ZW=e[2],this.amin=r[0],this.amax=r[1],this.bmin=r[2],this.bmax=r[3],this.XB=t[0],this.YB=t[1],this.ZB=t[2],0>this.XW||0>this.ZW||1!==this.YW)throw new n.FormatError("Invalid WhitePoint components, no fallback available");(0>this.XB||0>this.YB||0>this.ZB)&&((0,n.info)("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&((0,n.info)("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}getRgbItem(e,t,n,a){r(this,e,t,!1,n,a)}getRgbBuffer(e,t,n,a,i,s,o){const c=(1<<s)-1;for(let s=0;n>s;s++)r(this,e,t,c,a,i),t+=3,i+=3+o}getOutputLength(e,t){return e*(3+t)/3|0}isDefaultDecode(e,t){return!0}get usesZeroToOneRange(){return(0,n.shadow)(this,"usesZeroToOneRange",!1)}}}()},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PartialEvaluator=t.EvaluatorPreprocessor=void 0;var n=r(2),a=r(16),i=r(5),s=r(34),o=r(38),c=r(37),l=r(41),h=r(40),u=r(50),d=r(51),f=r(42),p=r(57),g=r(17),m=r(59),b=r(10),y=r(7),w=r(60),v=r(14),S=r(19),x=r(39),A=r(6),k=r(45),C=r(61),_=r(62),F=r(63);const T=Object.freeze({maxImageSize:-1,disableFontFace:!1,ignoreErrors:!1,isEvalSupported:!0,fontExtraProperties:!1,useSystemFonts:!0,cMapUrl:null,standardFontDataUrl:null}),O=1,P=2,I=Promise.resolve();function E(e,t=!1){if(Array.isArray(e)){for(let t=0,r=e.length;r>t;t++){const r=E(e[t],!0);if(r)return r}return(0,n.warn)("Unsupported blend mode Array: "+e),"source-over"}if(!(e instanceof i.Name))return t?null:"source-over";switch(e.name){case"Normal":case"Compatible":return"source-over";case"Multiply":return"multiply";case"Screen":return"screen";case"Overlay":return"overlay";case"Darken":return"darken";case"Lighten":return"lighten";case"ColorDodge":return"color-dodge";case"ColorBurn":return"color-burn";case"HardLight":return"hard-light";case"SoftLight":return"soft-light";case"Difference":return"difference";case"Exclusion":return"exclusion";case"Hue":return"hue";case"Saturation":return"saturation";case"Color":return"color";case"Luminosity":return"luminosity"}return t?null:((0,n.warn)("Unsupported blend mode: "+e.name),"source-over")}function M(e){e.fn===n.OPS.paintImageMaskXObject&&e.args[0]&&e.args[0].count>0&&e.args[0].count++}class R{static get TIME_SLOT_DURATION_MS(){return(0,n.shadow)(this,"TIME_SLOT_DURATION_MS",20)}static get CHECK_TIME_EVERY(){return(0,n.shadow)(this,"CHECK_TIME_EVERY",100)}constructor(){this.reset()}check(){return++this.checked>=R.CHECK_TIME_EVERY&&(this.checked=0,this.endTime<=Date.now())}reset(){this.endTime=Date.now()+R.TIME_SLOT_DURATION_MS,this.checked=0}}class D{constructor({xref:e,handler:t,pageIndex:r,idFactory:n,fontCache:a,builtInCMapCache:i,standardFontDataCache:s,globalImageCache:o,options:c=null}){this.xref=e,this.handler=t,this.pageIndex=r,this.idFactory=n,this.fontCache=a,this.builtInCMapCache=i,this.standardFontDataCache=s,this.globalImageCache=o,this.options=c||T,this.parsingType3Font=!1,this._fetchBuiltInCMapBound=this.fetchBuiltInCMap.bind(this)}get _pdfFunctionFactory(){const e=new p.PDFFunctionFactory({xref:this.xref,isEvalSupported:this.options.isEvalSupported});return(0,n.shadow)(this,"_pdfFunctionFactory",e)}clone(e=null){const t=Object.create(this);return t.options=Object.assign(Object.create(null),this.options,e),t}hasBlendModes(e,t){if(!(e instanceof i.Dict))return!1;if(e.objId&&t.has(e.objId))return!1;const r=new i.RefSet(t);e.objId&&r.put(e.objId);const a=[e],s=this.xref;for(;a.length;){const e=a.shift(),t=e.get("ExtGState");if(t instanceof i.Dict)for(let e of t.getRawValues()){if(e instanceof i.Ref){if(r.has(e))continue;try{e=s.fetch(e)}catch(t){r.put(e),(0,n.info)(`hasBlendModes - ignoring ExtGState: "${t}".`);continue}}if(!(e instanceof i.Dict))continue;e.objId&&r.put(e.objId);const t=e.get("BM");if(t instanceof i.Name){if("Normal"!==t.name)return!0}else if(void 0!==t&&Array.isArray(t))for(const e of t)if(e instanceof i.Name&&"Normal"!==e.name)return!0}const o=e.get("XObject");if(o instanceof i.Dict)for(let e of o.getRawValues()){if(e instanceof i.Ref){if(r.has(e))continue;try{e=s.fetch(e)}catch(t){r.put(e),(0,n.info)(`hasBlendModes - ignoring XObject: "${t}".`);continue}}if(!(e instanceof y.BaseStream))continue;e.dict.objId&&r.put(e.dict.objId);const t=e.dict.get("Resources");t instanceof i.Dict&&(t.objId&&r.has(t.objId)||(a.push(t),t.objId&&r.put(t.objId)))}}for(const e of r)t.put(e);return!1}async fetchBuiltInCMap(e){const t=this.builtInCMapCache.get(e);if(t)return t;let r;if(null!==this.options.cMapUrl){const t=`${this.options.cMapUrl}${e}.bcmap`,a=await fetch(t);if(!a.ok)throw Error(`fetchBuiltInCMap: failed to fetch file "${t}" with "${a.statusText}".`);r={cMapData:new Uint8Array(await a.arrayBuffer()),compressionType:n.CMapCompressionType.BINARY}}else r=await this.handler.sendWithPromise("FetchBuiltInCMap",{name:e});return r.compressionType!==n.CMapCompressionType.NONE&&this.builtInCMapCache.set(e,r),r}async fetchStandardFontData(e){const t=this.standardFontDataCache.get(e);if(t)return new b.Stream(t);if(this.options.useSystemFonts&&"Symbol"!==e&&"ZapfDingbats"!==e)return null;const r=(0,l.getFontNameToFileMap)()[e];let a;if(null!==this.options.standardFontDataUrl){const e=`${this.options.standardFontDataUrl}${r}`,t=await fetch(e);t.ok?a=await t.arrayBuffer():(0,n.warn)(`fetchStandardFontData: failed to fetch file "${e}" with "${t.statusText}".`)}else try{a=await this.handler.sendWithPromise("FetchStandardFontData",{filename:r})}catch(e){(0,n.warn)(`fetchStandardFontData: failed to fetch file "${r}" with "${e}".`)}return a?(this.standardFontDataCache.set(e,a),new b.Stream(a)):null}async buildFormXObject(e,t,r,a,s,o,c){const l=t.dict,h=l.getArray("Matrix");let u,d,f=l.getArray("BBox");f=Array.isArray(f)&&4===f.length?n.Util.normalizeRect(f):null,l.has("OC")&&(u=await this.parseMarkedContentProps(l.get("OC"),e)),void 0!==u&&a.addOp(n.OPS.beginMarkedContentProps,["OC",u]);const p=l.get("Group");if(p){d={matrix:h,bbox:f,smask:r,isolated:!1,knockout:!1};const t=p.get("S");let s=null;if((0,i.isName)(t,"Transparency")&&(d.isolated=p.get("I")||!1,d.knockout=p.get("K")||!1,p.has("CS"))){const t=p.getRaw("CS"),r=v.ColorSpace.getCached(t,this.xref,c);s=r||await this.parseColorSpace({cs:t,resources:e,localColorSpaceCache:c})}r&&r.backdrop&&(s=s||v.ColorSpace.singletons.rgb,r.backdrop=s.getRgb(r.backdrop,0)),a.addOp(n.OPS.beginGroup,[d])}return a.addOp(n.OPS.paintFormXObjectBegin,p?[h,null]:[h,f]),this.getOperatorList({stream:t,task:s,resources:l.get("Resources")||e,operatorList:a,initialState:o}).then((function(){a.addOp(n.OPS.paintFormXObjectEnd,[]),p&&a.addOp(n.OPS.endGroup,[d]),void 0!==u&&a.addOp(n.OPS.endMarkedContent,[])}))}_sendImgData(e,t,r=!1){const n=t?[t.bitmap||t.data.buffer]:null;return this.parsingType3Font||r?this.handler.send("commonobj",[e,"Image",t],n):this.handler.send("obj",[e,this.pageIndex,"Image",t],n)}async buildPaintImageXObject({resources:e,image:t,isInline:r=!1,operatorList:a,cacheKey:i,localImageCache:s,localColorSpaceCache:o}){const c=t.dict,l=c.objId,h=c.get("W","Width"),u=c.get("H","Height");if(!h||"number"!=typeof h||!u||"number"!=typeof u)return void(0,n.warn)("Image dimensions are missing, or not numbers.");const d=this.options.maxImageSize;if(-1!==d&&h*u>d){const e="Image exceeded maximum allowed size and was removed.";if(this.options.ignoreErrors)return void(0,n.warn)(e);throw Error(e)}let f,p,g;if(c.has("OC")&&(f=await this.parseMarkedContentProps(c.get("OC"),e)),c.get("IM","ImageMask")){const e=c.get("I","Interpolate"),r=t.getBytes((h+7>>3)*u),o=c.getArray("D","Decode");if(this.parsingType3Font)return p=F.PDFImage.createRawMask({imgArray:r,width:h,height:u,imageIsFromDecodeStream:t instanceof S.DecodeStream,inverseDecode:!!o&&o[0]>0,interpolate:e}),p.cached=!!i,g=[p],a.addImageOps(n.OPS.paintImageMaskXObject,g,f),void(i&&s.set(i,l,{fn:n.OPS.paintImageMaskXObject,args:g,optionalContent:f}));if(p=F.PDFImage.createMask({imgArray:r,width:h,height:u,imageIsFromDecodeStream:t instanceof S.DecodeStream,inverseDecode:!!o&&o[0]>0,interpolate:e}),p.isSingleOpaquePixel)return a.addImageOps(n.OPS.paintSolidColorImageMask,[],f),void(i&&s.set(i,l,{fn:n.OPS.paintSolidColorImageMask,args:[],optionalContent:f}));const d="mask_"+this.idFactory.createObjId();return a.addDependency(d),this._sendImgData(d,p),g=[{data:d,width:p.width,height:p.height,interpolate:p.interpolate,count:1}],a.addImageOps(n.OPS.paintImageMaskXObject,g,f),void(i&&s.set(i,l,{fn:n.OPS.paintImageMaskXObject,args:g,optionalContent:f}))}const m=c.get("SM","SMask")||!1,b=c.get("Mask")||!1;if(r&&!m&&!b&&200>h+u){const i=new F.PDFImage({xref:this.xref,res:e,image:t,isInline:r,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:o});return p=i.createImageData(!0),void a.addImageOps(n.OPS.paintInlineImageXObject,[p],f)}let y="img_"+this.idFactory.createObjId(),w=!1;this.parsingType3Font?y=`${this.idFactory.getDocId()}_type3_${y}`:l&&(w=this.globalImageCache.shouldCache(l,this.pageIndex),w&&(y=`${this.idFactory.getDocId()}_${y}`)),a.addDependency(y),g=[y,h,u],F.PDFImage.buildImage({xref:this.xref,res:e,image:t,isInline:r,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:o}).then((e=>(p=e.createImageData(!1),i&&l&&w&&this.globalImageCache.addByteSize(l,p.data.length),this._sendImgData(y,p,w)))).catch((e=>((0,n.warn)(`Unable to decode image "${y}": "${e}".`),this._sendImgData(y,null,w)))),a.addImageOps(n.OPS.paintImageXObject,g,f),i&&(s.set(i,l,{fn:n.OPS.paintImageXObject,args:g,optionalContent:f}),l&&((0,n.assert)(!r,"Cannot cache an inline image globally."),this.globalImageCache.addPageIndex(l,this.pageIndex),w&&this.globalImageCache.setData(l,{objId:y,fn:n.OPS.paintImageXObject,args:g,optionalContent:f,byteSize:0})))}handleSMask(e,t,r,n,a,i){const s=e.get("G"),o={subtype:e.get("S").name,backdrop:e.get("BC")},c=e.get("TR");if((0,p.isPDFFunction)(c)){const e=this._pdfFunctionFactory.create(c),t=new Uint8Array(256),r=new Float32Array(1);for(let n=0;256>n;n++)r[0]=n/255,e(r,0,r,0),t[n]=255*r[0]|0;o.transferMap=t}return this.buildFormXObject(t,s,o,r,n,a.state.clone(),i)}handleTransferFunction(e){let t;if(Array.isArray(e))t=e;else{if(!(0,p.isPDFFunction)(e))return null;t=[e]}const r=[];let n=0,a=0;for(const e of t){const t=this.xref.fetchIfRef(e);if(n++,(0,i.isName)(t,"Identity")){r.push(null);continue}if(!(0,p.isPDFFunction)(t))return null;const s=this._pdfFunctionFactory.create(t),o=new Uint8Array(256),c=new Float32Array(1);for(let e=0;256>e;e++)c[0]=e/255,s(c,0,c,0),o[e]=255*c[0]|0;r.push(o),a++}return 1!==n&&4!==n||0===a?null:r}handleTilingType(e,t,r,a,s,o,c,l){const h=new _.OperatorList,d=i.Dict.merge({xref:this.xref,dictArray:[s.get("Resources"),r]});return this.getOperatorList({stream:a,task:c,resources:d,operatorList:h}).then((function(){const r=h.getIR(),n=(0,u.getTilingPatternIR)(r,s,t);o.addDependencies(h.dependencies),o.addOp(e,n),s.objId&&l.set(null,s.objId,{operatorListIR:r,dict:s})})).catch((e=>{if(!(e instanceof n.AbortException)){if(this.options.ignoreErrors)return this.handler.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.errorTilingPattern}),void(0,n.warn)(`handleTilingType - ignoring pattern: "${e}".`);throw e}}))}handleSetFont(e,t,r,a,o,c,l=null,h=null){return this.loadFont(t&&t[0]instanceof i.Name?t[0].name:null,r,e,l,h).then((t=>t.font.isType3Font?t.loadType3Data(this,e,o).then((function(){return a.addDependencies(t.type3Dependencies),t})).catch((e=>(this.handler.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.errorFontLoadType3}),new N({loadedName:"g_font_error",font:new s.ErrorFont("Type3 font load error: "+e),dict:t.font,evaluatorOptions:this.options})))):t)).then((e=>(c.font=e.font,e.send(this.handler),e.loadedName)))}handleText(e,t){const r=t.font,a=r.charsToGlyphs(e);return r.data&&(t.textRenderingMode&n.TextRenderingMode.ADD_TO_PATH_FLAG||"Pattern"===t.fillColorSpace.name||r.disableFontFace||this.options.disableFontFace)&&D.buildFontPaths(r,a,this.handler,this.options),a}ensureStateFont(e){if(e.font)return;const t=new n.FormatError("Missing setFont (Tf) operator before text rendering operator.");if(this.options.ignoreErrors)return this.handler.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.errorFontState}),void(0,n.warn)(`ensureStateFont: "${t}".`);throw t}async setGState({resources:e,gState:t,operatorList:r,cacheKey:a,task:s,stateManager:o,localGStateCache:c,localColorSpaceCache:l}){const h=t.objId;let u=!0;const d=[],f=t.getKeys();let p=Promise.resolve();for(let a=0,c=f.length;c>a;a++){const c=f[a],h=t.get(c);switch(c){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":d.push([c,h]);break;case"Font":u=!1,p=p.then((()=>this.handleSetFont(e,null,h[0],r,s,o.state).then((function(e){r.addDependency(e),d.push([c,[e,h[1]]])}))));break;case"BM":d.push([c,E(h)]);break;case"SMask":if((0,i.isName)(h,"None")){d.push([c,!1]);break}h instanceof i.Dict?(u=!1,p=p.then((()=>this.handleSMask(h,e,r,s,o,l))),d.push([c,!0])):(0,n.warn)("Unsupported SMask type");break;case"TR":const t=this.handleTransferFunction(h);d.push([c,t]);break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":(0,n.info)("graphic state operator "+c);break;default:(0,n.info)("Unknown graphic state operator "+c)}}return p.then((function(){d.length>0&&r.addOp(n.OPS.setGState,[d]),u&&c.set(a,h,d)}))}loadFont(e,t,r,a=null,c=null){const l=async()=>new N({loadedName:"g_font_error",font:new s.ErrorFont(`Font "${e}" is not available.`),dict:t,evaluatorOptions:this.options}),h=this.xref;let u;if(t)t instanceof i.Ref&&(u=t);else{const t=r.get("Font");t&&(u=t.getRaw(e))}if(!u){const r=`Font "${e||t&&""+t}" is not available`;if(!this.options.ignoreErrors&&!this.parsingType3Font)return(0,n.warn)(r+"."),l();this.handler.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.errorFontMissing}),(0,n.warn)(r+" -- attempting to fallback to a default font."),u=a||D.fallbackFontDict}if(this.parsingType3Font&&this.type3FontRefs.has(u))return l();if(this.fontCache.has(u))return this.fontCache.get(u);if(!((t=h.fetchIfRef(u))instanceof i.Dict))return l();if(t.cacheKey&&this.fontCache.has(t.cacheKey))return this.fontCache.get(t.cacheKey);const d=(0,n.createPromiseCapability)();let f;try{f=this.preEvaluateFont(t),f.cssFontInfo=c}catch(e){return(0,n.warn)(`loadFont - preEvaluateFont failed: "${e}".`),l()}const{descriptor:p,hash:g}=f,m=u instanceof i.Ref;let b;if(m&&(b="f"+u),g&&p instanceof i.Dict){p.fontAliases||(p.fontAliases=Object.create(null));const e=p.fontAliases;if(e[g]){const t=e[g].aliasRef;if(m&&t&&this.fontCache.has(t))return this.fontCache.putAlias(u,t),this.fontCache.get(u)}else e[g]={fontID:this.idFactory.createFontId()};m&&(e[g].aliasRef=u),b=e[g].fontID}return m?this.fontCache.put(u,d.promise):(b||(b=this.idFactory.createFontId()),t.cacheKey="cacheKey_"+b,this.fontCache.put(t.cacheKey,d.promise)),(0,n.assert)(b&&b.startsWith("f"),'The "fontID" must be (correctly) defined.'),t.loadedName=`${this.idFactory.getDocId()}_${b}`,this.translateFont(f).then((e=>{void 0!==e.fontType&&h.stats.addFontType(e.fontType),d.resolve(new N({loadedName:t.loadedName,font:e,dict:t,evaluatorOptions:this.options}))})).catch((e=>{this.handler.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.errorFontTranslate}),(0,n.warn)(`loadFont - translateFont failed: "${e}".`);try{const e=p&&p.get("FontFile3"),t=e&&e.get("Subtype"),r=(0,o.getFontType)(f.type,t&&t.name);void 0!==r&&h.stats.addFontType(r)}catch(e){}d.resolve(new N({loadedName:t.loadedName,font:new s.ErrorFont(e instanceof Error?e.message:e),dict:t,evaluatorOptions:this.options}))})),d.promise}buildPath(e,t,r,a=!1){const i=e.length-1;let s;if(r||(r=[]),0>i||e.fnArray[i]!==n.OPS.constructPath)a&&((0,n.warn)(`Encountered path operator "${t}" inside of a text object.`),e.addOp(n.OPS.save,null)),s=[1/0,-1/0,1/0,-1/0],e.addOp(n.OPS.constructPath,[[t],r,s]),a&&e.addOp(n.OPS.restore,null);else{const n=e.argsArray[i];n[0].push(t),Array.prototype.push.apply(n[1],r),s=n[2]}switch(t){case n.OPS.rectangle:s[0]=Math.min(s[0],r[0],r[0]+r[2]),s[1]=Math.max(s[1],r[0],r[0]+r[2]),s[2]=Math.min(s[2],r[1],r[1]+r[3]),s[3]=Math.max(s[3],r[1],r[1]+r[3]);break;case n.OPS.moveTo:case n.OPS.lineTo:s[0]=Math.min(s[0],r[0]),s[1]=Math.max(s[1],r[0]),s[2]=Math.min(s[2],r[1]),s[3]=Math.max(s[3],r[1])}}parseColorSpace({cs:e,resources:t,localColorSpaceCache:r}){return v.ColorSpace.parseAsync({cs:e,xref:this.xref,resources:t,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:r}).catch((e=>{if(e instanceof n.AbortException)return null;if(this.options.ignoreErrors)return this.handler.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.errorColorSpace}),(0,n.warn)(`parseColorSpace - ignoring ColorSpace: "${e}".`),null;throw e}))}parseShading({shading:e,resources:t,localColorSpaceCache:r,localShadingPatternCache:n}){let a=n.get(e);if(!a){const i=u.Pattern.parseShading(e,this.xref,t,this.handler,this._pdfFunctionFactory,r).getIR();a="pattern_"+this.idFactory.createObjId(),n.set(e,a),this.handler.send("obj",[a,this.pageIndex,"Pattern",i])}return a}handleColorN(e,t,r,a,s,o,c,l,h,d){const f=r.pop();if(f instanceof i.Name){const p=s.getRaw(f.name),g=p instanceof i.Ref&&h.getByRef(p);if(g)try{const n=a.base?a.base.getRgb(r,0):null,i=(0,u.getTilingPatternIR)(g.operatorListIR,g.dict,n);return void e.addOp(t,i)}catch(e){}const m=this.xref.fetchIfRef(p);if(m){const i=m instanceof y.BaseStream?m.dict:m,s=i.get("PatternType");if(s===O){const n=a.base?a.base.getRgb(r,0):null;return this.handleTilingType(t,n,o,m,i,e,c,h)}if(s===P){const r=i.get("Shading"),n=i.getArray("Matrix"),a=this.parseShading({shading:r,resources:o,localColorSpaceCache:l,localShadingPatternCache:d});return void e.addOp(t,["Shading",a,n])}throw new n.FormatError("Unknown PatternType: "+s)}}throw new n.FormatError("Unknown PatternName: "+f)}_parseVisibilityExpression(e,t,r){if(++t>10)return void(0,n.warn)("Visibility expression is too deeply nested");const a=e.length,s=this.xref.fetchIfRef(e[0]);if(a>=2&&s instanceof i.Name){switch(s.name){case"And":case"Or":case"Not":r.push(s.name);break;default:return void(0,n.warn)(`Invalid operator ${s.name} in visibility expression`)}for(let n=1;a>n;n++){const a=e[n],s=this.xref.fetchIfRef(a);if(Array.isArray(s)){const e=[];r.push(e),this._parseVisibilityExpression(s,t,e)}else a instanceof i.Ref&&r.push(""+a)}}else(0,n.warn)("Invalid visibility expression")}async parseMarkedContentProps(e,t){let r;if(e instanceof i.Name)r=t.get("Properties").get(e.name);else{if(!(e instanceof i.Dict))throw new n.FormatError("Optional content properties malformed.");r=e}const a=r.get("Type").name;if("OCG"===a)return{type:a,id:r.objId};if("OCMD"===a){const e=r.get("VE");if(Array.isArray(e)){const t=[];if(this._parseVisibilityExpression(e,0,t),t.length>0)return{type:"OCMD",expression:t}}const t=r.get("OCGs");if(Array.isArray(t)||t instanceof i.Dict){const e=[];if(Array.isArray(t))for(const r of t)e.push(""+r);else e.push(t.objId);return{type:a,ids:e,policy:r.get("P")instanceof i.Name?r.get("P").name:null,expression:null}}if(t instanceof i.Ref)return{type:a,id:""+t}}return null}getOperatorList({stream:e,task:t,resources:r,operatorList:a,initialState:s=null,fallbackFontDict:o=null}){if(r=r||i.Dict.empty,s=s||new B,!a)throw Error('getOperatorList: missing "operatorList" parameter');const c=this,l=this.xref;let h=!1;const u=new m.LocalImageCache,d=new m.LocalColorSpaceCache,f=new m.LocalGStateCache,p=new m.LocalTilingPatternCache,g=new Map,b=r.get("XObject")||i.Dict.empty,w=r.get("Pattern")||i.Dict.empty,S=new L(s),x=new U(e,l,S),A=new R;function k(e){for(let e=0,t=x.savedStatesDepth;t>e;e++)a.addOp(n.OPS.restore,[])}return new Promise((function e(s,m){const C=function(t){Promise.all([t,a.ready]).then((function(){try{e(s,m)}catch(e){m(e)}}),m)};t.ensureNotTerminated(),A.reset();const _={};let F,T,O,P,E,R;for(;!(F=A.check())&&(_.args=null,x.read(_));){let e=_.args,s=_.fn;switch(0|s){case n.OPS.paintXObject:if(R=e[0]instanceof i.Name,E=e[0].name,R){const t=u.getByName(E);if(t){a.addImageOps(t.fn,t.args,t.optionalContent),M(t),e=null;continue}}return void C(new Promise((function(e,s){if(!R)throw new n.FormatError("XObject must be referred to by name.");let o=b.getRaw(E);if(o instanceof i.Ref){const t=u.getByRef(o);if(t)return a.addImageOps(t.fn,t.args,t.optionalContent),M(t),void e();const r=c.globalImageCache.getData(o,c.pageIndex);if(r)return a.addDependency(r.objId),a.addImageOps(r.fn,r.args,r.optionalContent),void e();o=l.fetch(o)}if(!(o instanceof y.BaseStream))throw new n.FormatError("XObject should be a stream");const h=o.dict.get("Subtype");if(!(h instanceof i.Name))throw new n.FormatError("XObject should have a Name subtype");if("Form"===h.name)return S.save(),void c.buildFormXObject(r,o,null,a,t,S.state.clone(),d).then((function(){S.restore(),e()}),s);if("Image"!==h.name){if("PS"!==h.name)throw new n.FormatError("Unhandled XObject subtype "+h.name);(0,n.info)("Ignored XObject subtype PS"),e()}else c.buildPaintImageXObject({resources:r,image:o,operatorList:a,cacheKey:E,localImageCache:u,localColorSpaceCache:d}).then(e,s)})).catch((function(e){if(!(e instanceof n.AbortException)){if(c.options.ignoreErrors)return c.handler.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.errorXObject}),void(0,n.warn)(`getOperatorList - ignoring XObject: "${e}".`);throw e}})));case n.OPS.setFont:var D=e[1];return void C(c.handleSetFont(r,e,null,a,t,S.state,o).then((function(e){a.addDependency(e),a.addOp(n.OPS.setFont,[e,D])})));case n.OPS.beginText:h=!0;break;case n.OPS.endText:h=!1;break;case n.OPS.endInlineImage:var N=e[0].cacheKey;if(N){const t=u.getByName(N);if(t){a.addImageOps(t.fn,t.args,t.optionalContent),M(t),e=null;continue}}return void C(c.buildPaintImageXObject({resources:r,image:e[0],isInline:!0,operatorList:a,cacheKey:N,localImageCache:u,localColorSpaceCache:d}));case n.OPS.showText:if(!S.state.font){c.ensureStateFont(S.state);continue}e[0]=c.handleText(e[0],S.state);break;case n.OPS.showSpacedText:if(!S.state.font){c.ensureStateFont(S.state);continue}var L=e[0],j=[],B=L.length,U=S.state;for(T=0;B>T;++T){const e=L[T];"string"==typeof e?Array.prototype.push.apply(j,c.handleText(e,U)):"number"==typeof e&&j.push(e)}e[0]=j,s=n.OPS.showText;break;case n.OPS.nextLineShowText:if(!S.state.font){c.ensureStateFont(S.state);continue}a.addOp(n.OPS.nextLine),e[0]=c.handleText(e[0],S.state),s=n.OPS.showText;break;case n.OPS.nextLineSetSpacingShowText:if(!S.state.font){c.ensureStateFont(S.state);continue}a.addOp(n.OPS.nextLine),a.addOp(n.OPS.setWordSpacing,[e.shift()]),a.addOp(n.OPS.setCharSpacing,[e.shift()]),e[0]=c.handleText(e[0],S.state),s=n.OPS.showText;break;case n.OPS.setTextRenderingMode:S.state.textRenderingMode=e[0];break;case n.OPS.setFillColorSpace:{const t=v.ColorSpace.getCached(e[0],l,d);if(t){S.state.fillColorSpace=t;continue}return void C(c.parseColorSpace({cs:e[0],resources:r,localColorSpaceCache:d}).then((function(e){e&&(S.state.fillColorSpace=e)})))}case n.OPS.setStrokeColorSpace:{const t=v.ColorSpace.getCached(e[0],l,d);if(t){S.state.strokeColorSpace=t;continue}return void C(c.parseColorSpace({cs:e[0],resources:r,localColorSpaceCache:d}).then((function(e){e&&(S.state.strokeColorSpace=e)})))}case n.OPS.setFillColor:P=S.state.fillColorSpace,e=P.getRgb(e,0),s=n.OPS.setFillRGBColor;break;case n.OPS.setStrokeColor:P=S.state.strokeColorSpace,e=P.getRgb(e,0),s=n.OPS.setStrokeRGBColor;break;case n.OPS.setFillGray:S.state.fillColorSpace=v.ColorSpace.singletons.gray,e=v.ColorSpace.singletons.gray.getRgb(e,0),s=n.OPS.setFillRGBColor;break;case n.OPS.setStrokeGray:S.state.strokeColorSpace=v.ColorSpace.singletons.gray,e=v.ColorSpace.singletons.gray.getRgb(e,0),s=n.OPS.setStrokeRGBColor;break;case n.OPS.setFillCMYKColor:S.state.fillColorSpace=v.ColorSpace.singletons.cmyk,e=v.ColorSpace.singletons.cmyk.getRgb(e,0),s=n.OPS.setFillRGBColor;break;case n.OPS.setStrokeCMYKColor:S.state.strokeColorSpace=v.ColorSpace.singletons.cmyk,e=v.ColorSpace.singletons.cmyk.getRgb(e,0),s=n.OPS.setStrokeRGBColor;break;case n.OPS.setFillRGBColor:S.state.fillColorSpace=v.ColorSpace.singletons.rgb,e=v.ColorSpace.singletons.rgb.getRgb(e,0);break;case n.OPS.setStrokeRGBColor:S.state.strokeColorSpace=v.ColorSpace.singletons.rgb,e=v.ColorSpace.singletons.rgb.getRgb(e,0);break;case n.OPS.setFillColorN:if(P=S.state.fillColorSpace,"Pattern"===P.name)return void C(c.handleColorN(a,n.OPS.setFillColorN,e,P,w,r,t,d,p,g));e=P.getRgb(e,0),s=n.OPS.setFillRGBColor;break;case n.OPS.setStrokeColorN:if(P=S.state.strokeColorSpace,"Pattern"===P.name)return void C(c.handleColorN(a,n.OPS.setStrokeColorN,e,P,w,r,t,d,p,g));e=P.getRgb(e,0),s=n.OPS.setStrokeRGBColor;break;case n.OPS.shadingFill:var $=r.get("Shading");if(!$)throw new n.FormatError("No shading resource found");var q=$.get(e[0].name);if(!q)throw new n.FormatError("No shading object found");e=[c.parseShading({shading:q,resources:r,localColorSpaceCache:d,localShadingPatternCache:g})],s=n.OPS.shadingFill;break;case n.OPS.setGState:if(R=e[0]instanceof i.Name,E=e[0].name,R){const t=f.getByName(E);if(t){t.length>0&&a.addOp(n.OPS.setGState,[t]),e=null;continue}}return void C(new Promise((function(e,s){if(!R)throw new n.FormatError("GState must be referred to by name.");const o=r.get("ExtGState");if(!(o instanceof i.Dict))throw new n.FormatError("ExtGState should be a dictionary.");const l=o.get(E);if(!(l instanceof i.Dict))throw new n.FormatError("GState should be a dictionary.");c.setGState({resources:r,gState:l,operatorList:a,cacheKey:E,task:t,stateManager:S,localGStateCache:f,localColorSpaceCache:d}).then(e,s)})).catch((function(e){if(!(e instanceof n.AbortException)){if(c.options.ignoreErrors)return c.handler.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.errorExtGState}),void(0,n.warn)(`getOperatorList - ignoring ExtGState: "${e}".`);throw e}})));case n.OPS.moveTo:case n.OPS.lineTo:case n.OPS.curveTo:case n.OPS.curveTo2:case n.OPS.curveTo3:case n.OPS.closePath:case n.OPS.rectangle:c.buildPath(a,s,e,h);continue;case n.OPS.markPoint:case n.OPS.markPointProps:case n.OPS.beginCompat:case n.OPS.endCompat:continue;case n.OPS.beginMarkedContentProps:if(!(e[0]instanceof i.Name)){(0,n.warn)("Expected name for beginMarkedContentProps arg0="+e[0]);continue}if("OC"===e[0].name)return void C(c.parseMarkedContentProps(e[1],r).then((e=>{a.addOp(n.OPS.beginMarkedContentProps,["OC",e])})).catch((e=>{if(!(e instanceof n.AbortException)){if(c.options.ignoreErrors)return c.handler.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.errorMarkedContent}),void(0,n.warn)(`getOperatorList - ignoring beginMarkedContentProps: "${e}".`);throw e}})));e=[e[0].name,e[1]instanceof i.Dict?e[1].get("MCID"):null];break;default:if(null!==e){for(T=0,O=e.length;O>T&&!(e[T]instanceof i.Dict);T++);if(O>T){(0,n.warn)("getOperatorList - ignoring operator: "+s);continue}}}a.addOp(s,e)}F?C(I):(k(),s())})).catch((e=>{if(!(e instanceof n.AbortException)){if(this.options.ignoreErrors)return this.handler.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.errorOperatorList}),(0,n.warn)(`getOperatorList - ignoring errors during "${t.name}" task: "${e}".`),void k();throw e}}))}getTextContent({stream:e,task:t,resources:r,stateManager:a=null,combineTextItems:s=!1,includeMarkedContent:o=!1,sink:c,seenStyles:l=new Set,viewBox:u}){r=r||i.Dict.empty,a=a||new L(new j);const d=(0,h.getNormalizedUnicodes)(),f={items:[],styles:Object.create(null)},p={initialized:!1,str:[],totalWidth:0,totalHeight:0,width:0,height:0,vertical:!1,prevTransform:null,textAdvanceScale:0,spaceInFlowMin:0,spaceInFlowMax:0,trackingSpaceMin:1/0,negativeSpaceMax:-1/0,notASpace:-1/0,transform:null,fontName:null,hasEOL:!1},g=[" "," "];let b=0;function v(e){const t=(b+1)%2,r=" "!==g[b]&&" "===g[t];return g[b]=e,b=t,r}function S(){g[0]=g[1]=" ",b=0}const x=this,A=this.xref,k=[];let C=null;const _=new m.LocalImageCache,F=new m.LocalGStateCache,T=new U(e,A,a);let O;function P(){const e=O.font,t=[O.fontSize*O.textHScale,0,0,O.fontSize,0,O.textRise];if(e.isType3Font&&(1>=O.fontSize||e.isCharBBox)&&!(0,n.isArrayEqual)(O.fontMatrix,n.FONT_IDENTITY_MATRIX)){const r=e.bbox[3]-e.bbox[1];r>0&&(t[3]*=r*O.fontMatrix[3])}return n.Util.transform(O.ctm,n.Util.transform(O.textMatrix,t))}function E(){if(p.initialized)return p;const e=O.font,t=e.loadedName;l.has(t)||(l.add(t),f.styles[t]={fontFamily:e.fallbackName,ascent:e.ascent,descent:e.descent,vertical:e.vertical}),p.fontName=t;const r=p.transform=P();e.vertical?(p.width=p.totalWidth=Math.hypot(r[0],r[1]),p.height=p.totalHeight=0,p.vertical=!0):(p.width=p.totalWidth=0,p.height=p.totalHeight=Math.hypot(r[2],r[3]),p.vertical=!1);const n=Math.hypot(O.textLineMatrix[0],O.textLineMatrix[1]),a=Math.hypot(O.ctm[0],O.ctm[1]);return p.textAdvanceScale=a*n,p.trackingSpaceMin=.1*O.fontSize,p.notASpace=.03*O.fontSize,p.negativeSpaceMax=-.2*O.fontSize,p.spaceInFlowMin=.1*O.fontSize,p.spaceInFlowMax=.6*O.fontSize,p.hasEOL=!1,p.initialized=!0,p}function M(){if(!p.initialized)return;const e=Math.hypot(O.textLineMatrix[0],O.textLineMatrix[1]),t=Math.hypot(O.ctm[0],O.ctm[1])*e;t!==p.textAdvanceScale&&(p.vertical?(p.totalHeight+=p.height*p.textAdvanceScale,p.height=0):(p.totalWidth+=p.width*p.textAdvanceScale,p.width=0),p.textAdvanceScale=t)}function D(e,a){return x.loadFont(e,a,r).then((function(e){return e.font.isType3Font?e.loadType3Data(x,r,t).catch((function(){})).then((function(){return e})):e})).then((function(e){O.font=e.font,O.fontMatrix=e.font.fontMatrix||n.FONT_IDENTITY_MATRIX}))}function N(e,t,r){const n=Math.hypot(r[0],r[1]);return[(r[0]*e+r[1]*t)/n,(r[2]*e+r[3]*t)/n]}function B(){const e=P();let t=e[4],r=e[5];const n=t-u[0],a=r-u[1];if(0>n||n>u[2]||0>a||a>u[3])return!1;if(!s||!O.font||!p.prevTransform)return!0;let i=p.prevTransform[4],o=p.prevTransform[5];if(i===t&&o===r)return!0;let c=-1;switch(e[0]&&0===e[1]&&0===e[2]?c=e[0]>0?0:180:e[1]&&0===e[0]&&0===e[3]&&(c=e[1]>0?90:270),c){case 0:break;case 90:[t,r]=[r,t],[i,o]=[o,i];break;case 180:[t,r,i,o]=[-t,-r,-i,-o];break;case 270:[t,r]=[-r,-t],[i,o]=[-o,-i];break;default:[t,r]=N(t,r,e),[i,o]=N(i,o,p.prevTransform)}if(O.font.vertical){const e=(o-r)/p.textAdvanceScale,n=t-i,a=Math.sign(p.height);return a*p.negativeSpaceMax>e?Math.abs(n)>.5*p.width?(q(),!0):(S(),H(),!0):Math.abs(n)>p.width?(q(),!0):(e>a*p.notASpace||S(),e>a*p.trackingSpaceMin?X(e,p.prevTransform,a)||(0===p.str.length?(S(),f.items.push({str:" ",dir:"ltr",width:0,height:Math.abs(e),transform:p.prevTransform,fontName:p.fontName,hasEOL:!1})):p.height+=e):p.height+=e,!0)}const l=(t-i)/p.textAdvanceScale,h=r-o,d=Math.sign(p.width);return d*p.negativeSpaceMax>l?Math.abs(h)>.5*p.height?(q(),!0):(S(),H(),!0):Math.abs(h)>p.height?(q(),!0):(l>d*p.notASpace||S(),l>d*p.trackingSpaceMin?X(l,p.prevTransform,d)||(0===p.str.length?(S(),f.items.push({str:" ",dir:"ltr",width:Math.abs(l),height:0,transform:p.prevTransform,fontName:p.fontName,hasEOL:!1})):p.width+=l):p.width+=l,!0)}function $({chars:e,extraSpacing:t}){const r=O.font;if(!e){const e=O.charSpacing+t;return void(e&&(r.vertical?O.translateTextMatrix(0,-e):O.translateTextMatrix(e*O.textHScale,0)))}const n=r.charsToGlyphs(e),a=O.fontMatrix[0]*O.fontSize;for(let e=0,i=n.length;i>e;e++){const s=n[e];if(s.isInvisibleFormatMark)continue;let o=O.charSpacing+(e+1===i?t:0),c=s.width;r.vertical&&(c=s.vmetric?s.vmetric[0]:-c);let l=c*a;if(s.isWhitespace){r.vertical?(o+=-l+O.wordSpacing,O.translateTextMatrix(0,-o)):(o+=l+O.wordSpacing,O.translateTextMatrix(o*O.textHScale,0)),v(" ");continue}if(!B())continue;const u=E();s.isZeroWidthDiacritic&&(l=0),r.vertical?(O.translateTextMatrix(0,l),l=Math.abs(l),u.height+=l):(l*=O.textHScale,O.translateTextMatrix(l,0),u.width+=l),l&&(u.prevTransform=P());let f=s.unicode;f=d[f]||f,f=(0,h.reverseIfRtl)(f),v(f)&&u.str.push(" "),u.str.push(f),o&&(r.vertical?O.translateTextMatrix(0,-o):O.translateTextMatrix(o*O.textHScale,0))}}function q(){S(),p.initialized?(p.hasEOL=!0,H()):f.items.push({str:"",dir:"ltr",width:0,height:0,transform:P(),fontName:O.font.loadedName,hasEOL:!0})}function X(e,t,r){if(e>=r*p.spaceInFlowMin&&r*p.spaceInFlowMax>=e)return p.initialized&&(S(),p.str.push(" ")),!1;const n=p.fontName;let a=0;return p.vertical&&(a=e,e=0),H(),S(),f.items.push({str:" ",dir:"ltr",width:Math.abs(e),height:Math.abs(a),transform:t||P(),fontName:n,hasEOL:!1}),!0}function H(){p.initialized&&p.str&&(p.vertical?p.totalHeight+=p.height*p.textAdvanceScale:p.totalWidth+=p.width*p.textAdvanceScale,f.items.push(function(e){const t=e.str.join(""),r=(0,w.bidi)(t,-1,e.vertical);return{str:r.str,dir:r.dir,width:Math.abs(e.totalWidth),height:Math.abs(e.totalHeight),transform:e.transform,fontName:e.fontName,hasEOL:e.hasEOL}}(p)),p.initialized=!1,p.str.length=0)}function W(e=!1){const t=f.items.length;0!==t&&(e&&10>t||(c.enqueue(f,t),f.items=[],f.styles=Object.create(null)))}const z=new R;return new Promise((function e(h,d){const p=function(t){W(!0),Promise.all([t,c.ready]).then((function(){try{e(h,d)}catch(e){d(e)}}),d)};t.ensureNotTerminated(),z.reset();const g={};let m,b=[];for(;!(m=z.check())&&(b.length=0,g.args=b,T.read(g));){switch(O=a.state,b=g.args,0|g.fn){case n.OPS.setFont:var w=b[0].name,v=b[1];if(O.font&&w===O.fontName&&v===O.fontSize)break;return H(),O.fontName=w,O.fontSize=v,void p(D(w,null));case n.OPS.setTextRise:O.textRise=b[0];break;case n.OPS.setHScale:O.textHScale=b[0]/100;break;case n.OPS.setLeading:O.leading=b[0];break;case n.OPS.moveText:O.translateTextLineMatrix(b[0],b[1]),O.textMatrix=O.textLineMatrix.slice();break;case n.OPS.setLeadingMoveText:O.leading=-b[1],O.translateTextLineMatrix(b[0],b[1]),O.textMatrix=O.textLineMatrix.slice();break;case n.OPS.nextLine:O.carriageReturn();break;case n.OPS.setTextMatrix:O.setTextMatrix(b[0],b[1],b[2],b[3],b[4],b[5]),O.setTextLineMatrix(b[0],b[1],b[2],b[3],b[4],b[5]),M();break;case n.OPS.setCharSpacing:O.charSpacing=b[0];break;case n.OPS.setWordSpacing:O.wordSpacing=b[0];break;case n.OPS.beginText:O.textMatrix=n.IDENTITY_MATRIX.slice(),O.textLineMatrix=n.IDENTITY_MATRIX.slice();break;case n.OPS.showSpacedText:if(!a.state.font){x.ensureStateFont(a.state);continue}const e=(O.font.vertical?1:-1)*O.fontSize/1e3,h=b[0];for(let t=0,r=h.length;r-1>t;t++){const r=h[t];if("string"==typeof r)k.push(r);else if("number"==typeof r&&0!==r){const t=k.join("");k.length=0,$({chars:t,extraSpacing:r*e})}}const d=h.at(-1);if("string"==typeof d&&k.push(d),k.length>0){const e=k.join("");k.length=0,$({chars:e,extraSpacing:0})}break;case n.OPS.showText:if(!a.state.font){x.ensureStateFont(a.state);continue}$({chars:b[0],extraSpacing:0});break;case n.OPS.nextLineShowText:if(!a.state.font){x.ensureStateFont(a.state);continue}O.carriageReturn(),$({chars:b[0],extraSpacing:0});break;case n.OPS.nextLineSetSpacingShowText:if(!a.state.font){x.ensureStateFont(a.state);continue}O.wordSpacing=b[0],O.charSpacing=b[1],O.carriageReturn(),$({chars:b[2],extraSpacing:0});break;case n.OPS.paintXObject:H(),C||(C=r.get("XObject")||i.Dict.empty);var S=b[0]instanceof i.Name,P=b[0].name;if(S&&_.getByName(P))break;return void p(new Promise((function(e,h){if(!S)throw new n.FormatError("XObject must be referred to by name.");let d=C.getRaw(P);if(d instanceof i.Ref){if(_.getByRef(d))return void e();if(x.globalImageCache.getData(d,x.pageIndex))return void e();d=A.fetch(d)}if(!(d instanceof y.BaseStream))throw new n.FormatError("XObject should be a stream");const f=d.dict.get("Subtype");if(!(f instanceof i.Name))throw new n.FormatError("XObject should have a Name subtype");if("Form"!==f.name)return _.set(P,d.dict.objId,!0),void e();const p=a.state.clone(),g=new L(p),m=d.dict.getArray("Matrix");Array.isArray(m)&&6===m.length&&g.transform(m),W();const b={enqueueInvoked:!1,enqueue(e,t){this.enqueueInvoked=!0,c.enqueue(e,t)},get desiredSize(){return c.desiredSize},get ready(){return c.ready}};x.getTextContent({stream:d,task:t,resources:d.dict.get("Resources")||r,stateManager:g,combineTextItems:s,includeMarkedContent:o,sink:b,seenStyles:l,viewBox:u}).then((function(){b.enqueueInvoked||_.set(P,d.dict.objId,!0),e()}),h)})).catch((function(e){if(!(e instanceof n.AbortException)){if(!x.options.ignoreErrors)throw e;(0,n.warn)(`getTextContent - ignoring XObject: "${e}".`)}})));case n.OPS.setGState:if(P=b[0].name,(S=b[0]instanceof i.Name)&&F.getByName(P))break;return void p(new Promise((function(e,t){if(!S)throw new n.FormatError("GState must be referred to by name.");const a=r.get("ExtGState");if(!(a instanceof i.Dict))throw new n.FormatError("ExtGState should be a dictionary.");const s=a.get(P);if(!(s instanceof i.Dict))throw new n.FormatError("GState should be a dictionary.");const o=s.get("Font");if(!o)return F.set(P,s.objId,!0),void e();H(),O.fontName=null,O.fontSize=o[1],D(null,o[0]).then(e,t)})).catch((function(e){if(!(e instanceof n.AbortException)){if(!x.options.ignoreErrors)throw e;(0,n.warn)(`getTextContent - ignoring ExtGState: "${e}".`)}})));case n.OPS.beginMarkedContent:H(),o&&f.items.push({type:"beginMarkedContent",tag:b[0]instanceof i.Name?b[0].name:null});break;case n.OPS.beginMarkedContentProps:if(H(),o){let e=null;b[1]instanceof i.Dict&&(e=b[1].get("MCID")),f.items.push({type:"beginMarkedContentProps",id:Number.isInteger(e)?`${x.idFactory.getPageObjId()}_mcid${e}`:null,tag:b[0]instanceof i.Name?b[0].name:null})}break;case n.OPS.endMarkedContent:H(),o&&f.items.push({type:"endMarkedContent"})}if(f.items.length>=c.desiredSize){m=!0;break}}m?p(I):(H(),W(),h())})).catch((e=>{if(!(e instanceof n.AbortException)){if(this.options.ignoreErrors)return(0,n.warn)(`getTextContent - ignoring errors during "${t.name}" task: "${e}".`),H(),void W();throw e}}))}extractDataStructures(e,t,r){const a=this.xref;let s;const l=this.readToUnicode(r.toUnicode||e.get("ToUnicode")||t.get("ToUnicode"));if(r.composite){const t=e.get("CIDSystemInfo");t instanceof i.Dict&&(r.cidSystemInfo={registry:(0,n.stringToPDFString)(t.get("Registry")),ordering:(0,n.stringToPDFString)(t.get("Ordering")),supplement:t.get("Supplement")});try{const t=e.get("CIDToGIDMap");t instanceof y.BaseStream&&(s=t.getBytes())}catch(e){if(!this.options.ignoreErrors)throw e;(0,n.warn)(`extractDataStructures - ignoring CIDToGIDMap data: "${e}".`)}}const h=[];let u,d=null;if(e.has("Encoding")){if(u=e.get("Encoding"),u instanceof i.Dict){if(d=u.get("BaseEncoding"),d=d instanceof i.Name?d.name:null,u.has("Differences")){const e=u.get("Differences");let t=0;for(let r=0,s=e.length;s>r;r++){const s=a.fetchIfRef(e[r]);if("number"==typeof s)t=s;else{if(!(s instanceof i.Name))throw new n.FormatError("Invalid entry in 'Differences' array: "+s);h[t++]=s.name}}}}else if(u instanceof i.Name)d=u.name;else{const e="Encoding is not a Name nor a Dict";if(!this.options.ignoreErrors)throw new n.FormatError(e);(0,n.warn)(e)}"MacRomanEncoding"!==d&&"MacExpertEncoding"!==d&&"WinAnsiEncoding"!==d&&(d=null)}return d?r.defaultEncoding=(0,c.getEncoding)(d):(u=c.StandardEncoding,"TrueType"!==r.type||!!(r.flags&o.FontFlags.Nonsymbolic)||(u=c.WinAnsiEncoding),!!(r.flags&o.FontFlags.Symbolic)&&(u=c.MacRomanEncoding,r.file&&!r.isInternalFont||(/Symbol/i.test(r.name)?u=c.SymbolSetEncoding:/Dingbats|Wingdings/i.test(r.name)&&(u=c.ZapfDingbatsEncoding))),r.defaultEncoding=u),r.differences=h,r.baseEncodingName=d,r.hasEncoding=!!d||h.length>0,r.dict=e,l.then((e=>(r.toUnicode=e,this.buildToUnicode(r)))).then((e=>(r.toUnicode=e,s&&(r.cidToGidMap=this.readCidToGidMap(s,e)),r)))}_simpleFontToUnicode(e,t=!1){(0,n.assert)(!e.composite,"Must be a simple font.");const r=[],a=e.defaultEncoding.slice(),i=e.baseEncodingName,s=e.differences;for(const e in s){const t=s[e];".notdef"!==t&&(a[e]=t)}const o=(0,x.getGlyphsUnicode)();for(const n in a){let s=a[n];if(""!==s)if(void 0!==o[s])r[n]=String.fromCharCode(o[s]);else{let a=0;switch(s[0]){case"G":3===s.length&&(a=parseInt(s.substring(1),16));break;case"g":5===s.length&&(a=parseInt(s.substring(1),16));break;case"C":case"c":if(s.length>=3&&4>=s.length){const r=s.substring(1);if(t){a=parseInt(r,16);break}if(a=+r,Number.isNaN(a)&&Number.isInteger(parseInt(r,16)))return this._simpleFontToUnicode(e,!0)}break;default:const r=(0,h.getUnicodeForGlyph)(s,o);-1!==r&&(a=r)}if(a>0&&1114111>=a&&Number.isInteger(a)){if(i&&a===+n){const e=(0,c.getEncoding)(i);if(e&&(s=e[n])){r[n]=String.fromCharCode(o[s]);continue}}r[n]=String.fromCodePoint(a)}}}return r}async buildToUnicode(e){if(e.hasIncludedToUnicodeMap=!!e.toUnicode&&e.toUnicode.length>0,e.hasIncludedToUnicodeMap)return!e.composite&&e.hasEncoding&&(e.fallbackToUnicode=this._simpleFontToUnicode(e)),e.toUnicode;if(!e.composite)return new f.ToUnicodeMap(this._simpleFontToUnicode(e));if(e.composite&&(e.cMap.builtInCMap&&!(e.cMap instanceof a.IdentityCMap)||"Adobe"===e.cidSystemInfo.registry&&("GB1"===e.cidSystemInfo.ordering||"CNS1"===e.cidSystemInfo.ordering||"Japan1"===e.cidSystemInfo.ordering||"Korea1"===e.cidSystemInfo.ordering))){const{registry:t,ordering:r}=e.cidSystemInfo,s=i.Name.get(`${t}-${r}-UCS2`),o=await a.CMapFactory.create({encoding:s,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}),c=[];return e.cMap.forEach((function(e,t){if(t>65535)throw new n.FormatError("Max size of CID is 65,535");const r=o.lookup(t);r&&(c[e]=String.fromCharCode((r.charCodeAt(0)<<8)+r.charCodeAt(1)))})),new f.ToUnicodeMap(c)}return new f.IdentityToUnicodeMap(e.firstChar,e.lastChar)}readToUnicode(e){return e?e instanceof i.Name?a.CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then((function(e){return e instanceof a.IdentityCMap?new f.IdentityToUnicodeMap(0,65535):new f.ToUnicodeMap(e.getMap())})):e instanceof y.BaseStream?a.CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then((function(e){if(e instanceof a.IdentityCMap)return new f.IdentityToUnicodeMap(0,65535);const t=Array(e.length);return e.forEach((function(e,r){if("number"==typeof r)return void(t[e]=String.fromCodePoint(r));const n=[];for(let e=0;r.length>e;e+=2){const t=r.charCodeAt(e)<<8|r.charCodeAt(e+1);if(55296!=(63488&t)){n.push(t);continue}e+=2;const a=r.charCodeAt(e)<<8|r.charCodeAt(e+1);n.push(((1023&t)<<10)+(1023&a)+65536)}t[e]=String.fromCodePoint(...n)})),new f.ToUnicodeMap(t)}),(e=>{if(e instanceof n.AbortException)return null;if(this.options.ignoreErrors)return this.handler.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.errorFontToUnicode}),(0,n.warn)(`readToUnicode - ignoring ToUnicode data: "${e}".`),null;throw e})):Promise.resolve(null):Promise.resolve(null)}readCidToGidMap(e,t){const r=[];for(let n=0,a=e.length;a>n;n++){const a=e[n++]<<8|e[n],i=n>>1;(0!==a||t.has(i))&&(r[i]=a)}return r}extractWidths(e,t,r){const n=this.xref;let a=[],s=0;const c=[];let l,h,u,d,f,p,g,m;if(r.composite){if(s=e.has("DW")?e.get("DW"):1e3,m=e.get("W"),m)for(h=0,u=m.length;u>h;h++)if(p=n.fetchIfRef(m[h++]),g=n.fetchIfRef(m[h]),Array.isArray(g))for(d=0,f=g.length;f>d;d++)a[p++]=n.fetchIfRef(g[d]);else{const e=n.fetchIfRef(m[++h]);for(d=p;g>=d;d++)a[d]=e}if(r.vertical){let t=e.getArray("DW2")||[880,-1e3];if(l=[t[1],.5*s,t[0]],t=e.get("W2"),t)for(h=0,u=t.length;u>h;h++)if(p=n.fetchIfRef(t[h++]),g=n.fetchIfRef(t[h]),Array.isArray(g))for(d=0,f=g.length;f>d;d++)c[p++]=[n.fetchIfRef(g[d++]),n.fetchIfRef(g[d++]),n.fetchIfRef(g[d])];else{const e=[n.fetchIfRef(t[++h]),n.fetchIfRef(t[++h]),n.fetchIfRef(t[++h])];for(d=p;g>=d;d++)c[d]=e}}}else{const o=r.firstChar;if(m=e.get("Widths"),m){for(d=o,h=0,u=m.length;u>h;h++)a[d++]=n.fetchIfRef(m[h]);s=parseFloat(t.get("MissingWidth"))||0}else{const t=e.get("BaseFont");if(t instanceof i.Name){const e=this.getBaseFontMetrics(t.name);a=this.buildCharCodeToWidth(e.widths,r),s=e.defaultWidth}}}let b=!0,y=s;for(const e in a){const t=a[e];if(t)if(y){if(y!==t){b=!1;break}}else y=t}b&&(r.flags|=o.FontFlags.FixedPitch),r.defaultWidth=s,r.widths=a,r.defaultVMetrics=l,r.vmetrics=c}isSerifFont(e){const t=e.split("-")[0];return t in(0,l.getSerifFonts)()||-1!==t.search(/serif/gi)}getBaseFontMetrics(e){let t=0,r=Object.create(null),n=!1,a=(0,l.getStdFontMap)()[e]||e;const i=(0,k.getMetrics)();a in i||(a=this.isSerifFont(e)?"Times-Roman":"Helvetica");const s=i[a];return"number"==typeof s?(t=s,n=!0):r=s(),{defaultWidth:t,monospace:n,widths:r}}buildCharCodeToWidth(e,t){const r=Object.create(null),n=t.differences,a=t.defaultEncoding;for(let t=0;256>t;t++)t in n&&e[n[t]]?r[t]=e[n[t]]:t in a&&e[a[t]]&&(r[t]=e[a[t]]);return r}preEvaluateFont(e){const t=e;let r=e.get("Subtype");if(!(r instanceof i.Name))throw new n.FormatError("invalid font Subtype");let a,s,o=!1;if("Type0"===r.name){const t=e.get("DescendantFonts");if(!t)throw new n.FormatError("Descendant fonts are not specified");if(!((e=Array.isArray(t)?this.xref.fetchIfRef(t[0]):t)instanceof i.Dict))throw new n.FormatError("Descendant font is not a dictionary.");if(r=e.get("Subtype"),!(r instanceof i.Name))throw new n.FormatError("invalid font Subtype");o=!0}const c=e.get("FirstChar")||0,l=e.get("LastChar")||(o?65535:255),h=e.get("FontDescriptor");if(h){a=new C.MurmurHash3_64;const r=t.getRaw("Encoding");if(r instanceof i.Name)a.update(r.name);else if(r instanceof i.Ref)a.update(""+r);else if(r instanceof i.Dict)for(const e of r.getRawValues())if(e instanceof i.Name)a.update(e.name);else if(e instanceof i.Ref)a.update(""+e);else if(Array.isArray(e)){const t=e.length,r=Array(t);for(let n=0;t>n;n++){const t=e[n];t instanceof i.Name?r[n]=t.name:("number"==typeof t||t instanceof i.Ref)&&(r[n]=""+t)}a.update(r.join())}if(a.update(`${c}-${l}`),s=e.get("ToUnicode")||t.get("ToUnicode"),s instanceof y.BaseStream){const e=s.str||s,t=e.buffer?new Uint8Array(e.buffer.buffer,0,e.bufferLength):new Uint8Array(e.bytes.buffer,e.start,e.end-e.start);a.update(t)}else s instanceof i.Name&&a.update(s.name);const n=e.get("Widths")||t.get("Widths");if(Array.isArray(n)){const e=[];for(const t of n)("number"==typeof t||t instanceof i.Ref)&&e.push(""+t);a.update(e.join())}if(o){a.update("compositeFont");const r=e.get("W")||t.get("W");if(Array.isArray(r)){const e=[];for(const t of r)if("number"==typeof t||t instanceof i.Ref)e.push(""+t);else if(Array.isArray(t)){const r=[];for(const e of t)("number"==typeof e||e instanceof i.Ref)&&r.push(""+e);e.push(`[${r.join()}]`)}a.update(e.join())}const n=e.getRaw("CIDToGIDMap")||t.getRaw("CIDToGIDMap");n instanceof i.Name?a.update(n.name):n instanceof i.Ref?a.update(""+n):n instanceof y.BaseStream&&a.update(n.peekBytes())}}return{descriptor:h,dict:e,baseDict:t,composite:o,type:r.name,firstChar:c,lastChar:l,toUnicode:s,hash:a?a.hexdigest():""}}async translateFont({descriptor:e,dict:t,baseDict:r,composite:c,type:h,firstChar:u,lastChar:f,toUnicode:p,cssFontInfo:g}){const m="Type3"===h;let y;if(!e){if(!m){let e=t.get("BaseFont");if(!(e instanceof i.Name))throw new n.FormatError("Base font is not specified");e=e.name.replace(/[,_]/g,"-");const a=this.getBaseFontMetrics(e),c=e.split("-")[0],d=(this.isSerifFont(c)?o.FontFlags.Serif:0)|(a.monospace?o.FontFlags.FixedPitch:0)|((0,l.getSymbolsFonts)()[c]?o.FontFlags.Symbolic:o.FontFlags.Nonsymbolic);y={type:h,name:e,loadedName:r.loadedName,widths:a.widths,defaultWidth:a.defaultWidth,isSimulatedFlags:!0,flags:d,firstChar:u,lastChar:f,toUnicode:p,xHeight:0,capHeight:0,italicAngle:0,isType3Font:m};const g=t.get("Widths"),b=(0,l.getStandardFontName)(e);let w=null;return b&&(y.isStandardFont=!0,w=await this.fetchStandardFontData(b),y.isInternalFont=!!w),this.extractDataStructures(t,t,y).then((t=>{if(g){const e=[];let r=u;for(let t=0,n=g.length;n>t;t++)e[r++]=this.xref.fetchIfRef(g[t]);t.widths=e}else t.widths=this.buildCharCodeToWidth(a.widths,t);return new s.Font(e,w,t)}))}(e=new i.Dict(null)).set("FontName",i.Name.get(h)),e.set("FontBBox",t.getArray("FontBBox")||[0,0,0,0])}let w,v,S,x,A,k=e.get("FontName"),C=t.get("BaseFont");if("string"==typeof k&&(k=i.Name.get(k)),"string"==typeof C&&(C=i.Name.get(C)),!m){const e=k&&k.name,t=C&&C.name;e!==t&&((0,n.info)(`The FontDescriptor's FontName is "${e}" but should be the same as the Font's BaseFont "${t}".`),e&&t&&t.startsWith(e)&&(k=C))}if(k=k||C,!(k instanceof i.Name))throw new n.FormatError("invalid font name");try{w=e.get("FontFile","FontFile2","FontFile3")}catch(e){if(!this.options.ignoreErrors)throw e;(0,n.warn)(`translateFont - fetching "${k.name}" font file: "${e}".`),w=new b.NullStream}let _=!1,F=!1,T=null;if(w){if(w.dict){const e=w.dict.get("Subtype");e instanceof i.Name&&(v=e.name),S=w.dict.get("Length1"),x=w.dict.get("Length2"),A=w.dict.get("Length3")}}else if(g){const e=(0,d.getXfaFontName)(k.name);e&&(g.fontFamily=g.fontFamily+"-PdfJS-XFA",g.metrics=e.metrics||null,T=e.factors||null,w=await this.fetchStandardFontData(e.name),F=!!w,r=t=(0,d.getXfaFontDict)(k.name),c=!0)}else if(!m){const e=(0,l.getStandardFontName)(k.name);e&&(_=!0,w=await this.fetchStandardFontData(e),F=!!w)}if(y={type:h,name:k.name,subtype:v,file:w,length1:S,length2:x,length3:A,isStandardFont:_,isInternalFont:F,loadedName:r.loadedName,composite:c,fixedPitch:!1,fontMatrix:t.getArray("FontMatrix")||n.FONT_IDENTITY_MATRIX,firstChar:u,lastChar:f,toUnicode:p,bbox:e.getArray("FontBBox")||t.getArray("FontBBox"),ascent:e.get("Ascent"),descent:e.get("Descent"),xHeight:e.get("XHeight")||0,capHeight:e.get("CapHeight")||0,flags:e.get("Flags"),italicAngle:e.get("ItalicAngle")||0,isType3Font:m,cssFontInfo:g,scaleFactors:T},c){const e=r.get("Encoding");e instanceof i.Name&&(y.cidEncoding=e.name);const t=await a.CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});y.cMap=t,y.vertical=y.cMap.vertical}return this.extractDataStructures(t,r,y).then((r=>(this.extractWidths(t,e,r),new s.Font(k.name,w,r))))}static buildFontPaths(e,t,r,a){function i(t){const i=`${e.loadedName}_path_${t}`;try{if(e.renderer.hasBuiltPath(t))return;r.send("commonobj",[i,"FontPath",e.renderer.getPathJs(t)])}catch(e){if(a.ignoreErrors)return r.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.errorFontBuildPath}),void(0,n.warn)(`buildFontPaths - ignoring ${i} glyph: "${e}".`);throw e}}for(const e of t){i(e.fontChar);const t=e.accent;t&&t.fontChar&&i(t.fontChar)}}static get fallbackFontDict(){const e=new i.Dict;return e.set("BaseFont",i.Name.get("PDFJS-FallbackFont")),e.set("Type",i.Name.get("FallbackType")),e.set("Subtype",i.Name.get("FallbackType")),e.set("Encoding",i.Name.get("WinAnsiEncoding")),(0,n.shadow)(this,"fallbackFontDict",e)}}t.PartialEvaluator=D;class N{constructor({loadedName:e,font:t,dict:r,evaluatorOptions:n}){this.loadedName=e,this.font=t,this.dict=r,this._evaluatorOptions=n||T,this.type3Loaded=null,this.type3Dependencies=t.isType3Font?new Set:null,this.sent=!1}send(e){this.sent||(this.sent=!0,e.send("commonobj",[this.loadedName,"Font",this.font.exportData(this._evaluatorOptions.fontExtraProperties)]))}fallback(e){this.font.data&&(this.font.disableFontFace=!0,D.buildFontPaths(this.font,this.font.glyphCacheValues,e,this._evaluatorOptions))}loadType3Data(e,t,r){if(this.type3Loaded)return this.type3Loaded;if(!this.font.isType3Font)throw Error("Must be a Type3 font.");const a=e.clone({ignoreErrors:!1});a.parsingType3Font=!0;const s=new i.RefSet(e.type3FontRefs);this.dict.objId&&!s.has(this.dict.objId)&&s.put(this.dict.objId),a.type3FontRefs=s;const o=this.font,c=this.type3Dependencies;let l=Promise.resolve();const h=this.dict.get("CharProcs"),u=this.dict.get("Resources")||t,d=Object.create(null),f=n.Util.normalizeRect(o.bbox||[0,0,0,0]),p=Math.hypot(f[2]-f[0],f[3]-f[1]);for(const e of h.getKeys())l=l.then((()=>{const t=h.get(e),i=new _.OperatorList;return a.getOperatorList({stream:t,task:r,resources:u,operatorList:i}).then((()=>{i.fnArray[0]===n.OPS.setCharWidthAndBounds&&this._removeType3ColorOperators(i,p),d[e]=i.getIR();for(const e of i.dependencies)c.add(e)})).catch((function(t){(0,n.warn)(`Type3 font resource "${e}" is not available.`);const r=new _.OperatorList;d[e]=r.getIR()}))}));return this.type3Loaded=l.then((()=>{o.charProcOperatorList=d,this._bbox&&(o.isCharBBox=!0,o.bbox=this._bbox)})),this.type3Loaded}_removeType3ColorOperators(e,t=NaN){const r=n.Util.normalizeRect(e.argsArray[0].slice(2)),a=r[2]-r[0],i=r[3]-r[1],s=Math.hypot(a,i);0===a||0===i?(e.fnArray.splice(0,1),e.argsArray.splice(0,1)):0!==t&&10>Math.round(s/t)||(this._bbox||(this._bbox=[1/0,1/0,-1/0,-1/0]),this._bbox[0]=Math.min(this._bbox[0],r[0]),this._bbox[1]=Math.min(this._bbox[1],r[1]),this._bbox[2]=Math.max(this._bbox[2],r[2]),this._bbox[3]=Math.max(this._bbox[3],r[3]));let o=0,c=e.length;for(;c>o;){switch(e.fnArray[o]){case n.OPS.setCharWidthAndBounds:break;case n.OPS.setStrokeColorSpace:case n.OPS.setFillColorSpace:case n.OPS.setStrokeColor:case n.OPS.setStrokeColorN:case n.OPS.setFillColor:case n.OPS.setFillColorN:case n.OPS.setStrokeGray:case n.OPS.setFillGray:case n.OPS.setStrokeRGBColor:case n.OPS.setFillRGBColor:case n.OPS.setStrokeCMYKColor:case n.OPS.setFillCMYKColor:case n.OPS.shadingFill:case n.OPS.setRenderingIntent:e.fnArray.splice(o,1),e.argsArray.splice(o,1),c--;continue;case n.OPS.setGState:const[t]=e.argsArray[o];let r=0,a=t.length;for(;a>r;){const[e]=t[r];switch(e){case"TR":case"TR2":case"HT":case"BG":case"BG2":case"UCR":case"UCR2":t.splice(r,1),a--;continue}r++}}o++}}}class L{constructor(e=new B){this.state=e,this.stateStack=[]}save(){const e=this.state;this.stateStack.push(this.state),this.state=e.clone()}restore(){const e=this.stateStack.pop();e&&(this.state=e)}transform(e){this.state.ctm=n.Util.transform(this.state.ctm,e)}}class j{constructor(){this.ctm=new Float32Array(n.IDENTITY_MATRIX),this.fontName=null,this.fontSize=0,this.font=null,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.textMatrix=n.IDENTITY_MATRIX.slice(),this.textLineMatrix=n.IDENTITY_MATRIX.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}setTextMatrix(e,t,r,n,a,i){const s=this.textMatrix;s[0]=e,s[1]=t,s[2]=r,s[3]=n,s[4]=a,s[5]=i}setTextLineMatrix(e,t,r,n,a,i){const s=this.textLineMatrix;s[0]=e,s[1]=t,s[2]=r,s[3]=n,s[4]=a,s[5]=i}translateTextMatrix(e,t){const r=this.textMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5]}translateTextLineMatrix(e,t){const r=this.textLineMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5]}carriageReturn(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()}clone(){const e=Object.create(this);return e.textMatrix=this.textMatrix.slice(),e.textLineMatrix=this.textLineMatrix.slice(),e.fontMatrix=this.fontMatrix.slice(),e}}class B{constructor(){this.ctm=new Float32Array(n.IDENTITY_MATRIX),this.font=null,this.textRenderingMode=n.TextRenderingMode.FILL,this.fillColorSpace=v.ColorSpace.singletons.gray,this.strokeColorSpace=v.ColorSpace.singletons.gray}clone(){return Object.create(this)}}class U{static get opMap(){const e=(0,A.getLookupTableFactory)((function(e){e.w={id:n.OPS.setLineWidth,numArgs:1,variableArgs:!1},e.J={id:n.OPS.setLineCap,numArgs:1,variableArgs:!1},e.j={id:n.OPS.setLineJoin,numArgs:1,variableArgs:!1},e.M={id:n.OPS.setMiterLimit,numArgs:1,variableArgs:!1},e.d={id:n.OPS.setDash,numArgs:2,variableArgs:!1},e.ri={id:n.OPS.setRenderingIntent,numArgs:1,variableArgs:!1},e.i={id:n.OPS.setFlatness,numArgs:1,variableArgs:!1},e.gs={id:n.OPS.setGState,numArgs:1,variableArgs:!1},e.q={id:n.OPS.save,numArgs:0,variableArgs:!1},e.Q={id:n.OPS.restore,numArgs:0,variableArgs:!1},e.cm={id:n.OPS.transform,numArgs:6,variableArgs:!1},e.m={id:n.OPS.moveTo,numArgs:2,variableArgs:!1},e.l={id:n.OPS.lineTo,numArgs:2,variableArgs:!1},e.c={id:n.OPS.curveTo,numArgs:6,variableArgs:!1},e.v={id:n.OPS.curveTo2,numArgs:4,variableArgs:!1},e.y={id:n.OPS.curveTo3,numArgs:4,variableArgs:!1},e.h={id:n.OPS.closePath,numArgs:0,variableArgs:!1},e.re={id:n.OPS.rectangle,numArgs:4,variableArgs:!1},e.S={id:n.OPS.stroke,numArgs:0,variableArgs:!1},e.s={id:n.OPS.closeStroke,numArgs:0,variableArgs:!1},e.f={id:n.OPS.fill,numArgs:0,variableArgs:!1},e.F={id:n.OPS.fill,numArgs:0,variableArgs:!1},e["f*"]={id:n.OPS.eoFill,numArgs:0,variableArgs:!1},e.B={id:n.OPS.fillStroke,numArgs:0,variableArgs:!1},e["B*"]={id:n.OPS.eoFillStroke,numArgs:0,variableArgs:!1},e.b={id:n.OPS.closeFillStroke,numArgs:0,variableArgs:!1},e["b*"]={id:n.OPS.closeEOFillStroke,numArgs:0,variableArgs:!1},e.n={id:n.OPS.endPath,numArgs:0,variableArgs:!1},e.W={id:n.OPS.clip,numArgs:0,variableArgs:!1},e["W*"]={id:n.OPS.eoClip,numArgs:0,variableArgs:!1},e.BT={id:n.OPS.beginText,numArgs:0,variableArgs:!1},e.ET={id:n.OPS.endText,numArgs:0,variableArgs:!1},e.Tc={id:n.OPS.setCharSpacing,numArgs:1,variableArgs:!1},e.Tw={id:n.OPS.setWordSpacing,numArgs:1,variableArgs:!1},e.Tz={id:n.OPS.setHScale,numArgs:1,variableArgs:!1},e.TL={id:n.OPS.setLeading,numArgs:1,variableArgs:!1},e.Tf={id:n.OPS.setFont,numArgs:2,variableArgs:!1},e.Tr={id:n.OPS.setTextRenderingMode,numArgs:1,variableArgs:!1},e.Ts={id:n.OPS.setTextRise,numArgs:1,variableArgs:!1},e.Td={id:n.OPS.moveText,numArgs:2,variableArgs:!1},e.TD={id:n.OPS.setLeadingMoveText,numArgs:2,variableArgs:!1},e.Tm={id:n.OPS.setTextMatrix,numArgs:6,variableArgs:!1},e["T*"]={id:n.OPS.nextLine,numArgs:0,variableArgs:!1},e.Tj={id:n.OPS.showText,numArgs:1,variableArgs:!1},e.TJ={id:n.OPS.showSpacedText,numArgs:1,variableArgs:!1},e["'"]={id:n.OPS.nextLineShowText,numArgs:1,variableArgs:!1},e['"']={id:n.OPS.nextLineSetSpacingShowText,numArgs:3,variableArgs:!1},e.d0={id:n.OPS.setCharWidth,numArgs:2,variableArgs:!1},e.d1={id:n.OPS.setCharWidthAndBounds,numArgs:6,variableArgs:!1},e.CS={id:n.OPS.setStrokeColorSpace,numArgs:1,variableArgs:!1},e.cs={id:n.OPS.setFillColorSpace,numArgs:1,variableArgs:!1},e.SC={id:n.OPS.setStrokeColor,numArgs:4,variableArgs:!0},e.SCN={id:n.OPS.setStrokeColorN,numArgs:33,variableArgs:!0},e.sc={id:n.OPS.setFillColor,numArgs:4,variableArgs:!0},e.scn={id:n.OPS.setFillColorN,numArgs:33,variableArgs:!0},e.G={id:n.OPS.setStrokeGray,numArgs:1,variableArgs:!1},e.g={id:n.OPS.setFillGray,numArgs:1,variableArgs:!1},e.RG={id:n.OPS.setStrokeRGBColor,numArgs:3,variableArgs:!1},e.rg={id:n.OPS.setFillRGBColor,numArgs:3,variableArgs:!1},e.K={id:n.OPS.setStrokeCMYKColor,numArgs:4,variableArgs:!1},e.k={id:n.OPS.setFillCMYKColor,numArgs:4,variableArgs:!1},e.sh={id:n.OPS.shadingFill,numArgs:1,variableArgs:!1},e.BI={id:n.OPS.beginInlineImage,numArgs:0,variableArgs:!1},e.ID={id:n.OPS.beginImageData,numArgs:0,variableArgs:!1},e.EI={id:n.OPS.endInlineImage,numArgs:1,variableArgs:!1},e.Do={id:n.OPS.paintXObject,numArgs:1,variableArgs:!1},e.MP={id:n.OPS.markPoint,numArgs:1,variableArgs:!1},e.DP={id:n.OPS.markPointProps,numArgs:2,variableArgs:!1},e.BMC={id:n.OPS.beginMarkedContent,numArgs:1,variableArgs:!1},e.BDC={id:n.OPS.beginMarkedContentProps,numArgs:2,variableArgs:!1},e.EMC={id:n.OPS.endMarkedContent,numArgs:0,variableArgs:!1},e.BX={id:n.OPS.beginCompat,numArgs:0,variableArgs:!1},e.EX={id:n.OPS.endCompat,numArgs:0,variableArgs:!1},e.BM=null,e.BD=null,e.true=null,e.fa=null,e.fal=null,e.fals=null,e.false=null,e.nu=null,e.nul=null,e.null=null}));return(0,n.shadow)(this,"opMap",e())}static get MAX_INVALID_PATH_OPS(){return(0,n.shadow)(this,"MAX_INVALID_PATH_OPS",10)}constructor(e,t,r=new L){this.parser=new g.Parser({lexer:new g.Lexer(e,U.opMap),xref:t}),this.stateManager=r,this.nonProcessedArgs=[],this._isPathOp=!1,this._numInvalidPathOPS=0}get savedStatesDepth(){return this.stateManager.stateStack.length}read(e){let t=e.args;for(;;){const r=this.parser.getObj();if(r instanceof i.Cmd){const a=r.cmd,i=U.opMap[a];if(!i){(0,n.warn)(`Unknown command "${a}".`);continue}const s=i.id,o=i.numArgs;let c=null!==t?t.length:0;if(this._isPathOp||(this._numInvalidPathOPS=0),this._isPathOp=s>=n.OPS.moveTo&&n.OPS.endPath>=s,i.variableArgs)c>o&&(0,n.info)(`Command ${a}: expected [0, ${o}] args, but received ${c} args.`);else{if(c!==o){const e=this.nonProcessedArgs;for(;c>o;)e.push(t.shift()),c--;for(;o>c&&0!==e.length;)null===t&&(t=[]),t.unshift(e.pop()),c++}if(o>c){const e=`command ${a}: expected ${o} args, but received ${c} args.`;if(this._isPathOp&&++this._numInvalidPathOPS>U.MAX_INVALID_PATH_OPS)throw new n.FormatError("Invalid "+e);(0,n.warn)("Skipping "+e),null!==t&&(t.length=0);continue}}return this.preprocessCommand(s,t),e.fn=s,e.args=t,!0}if(r===i.EOF)return!1;if(null!==r&&(null===t&&(t=[]),t.push(r),t.length>33))throw new n.FormatError("Too many arguments")}}preprocessCommand(e,t){switch(0|e){case n.OPS.save:this.stateManager.save();break;case n.OPS.restore:this.stateManager.restore();break;case n.OPS.transform:this.stateManager.transform(t)}}}t.EvaluatorPreprocessor=U},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityCMap=t.CMapFactory=t.CMap=void 0;var n=r(2),a=r(5),i=r(7),s=r(17),o=r(6),c=r(10);const l=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],h=2**24-1;class u{constructor(e=!1){this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=e}addCodespaceRange(e,t,r){this.codespaceRanges[e-1].push(t,r),this.numCodespaceRanges++}mapCidRange(e,t,r){if(t-e>h)throw Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;t>=e;)this._map[e++]=r++}mapBfRange(e,t,r){if(t-e>h)throw Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");const n=r.length-1;for(;t>=e;){this._map[e++]=r;const t=r.charCodeAt(n)+1;r=t>255?r.substring(0,n-1)+String.fromCharCode(r.charCodeAt(n-1)+1)+"\0":r.substring(0,n)+String.fromCharCode(t)}}mapBfRangeToArray(e,t,r){if(t-e>h)throw Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");const n=r.length;let a=0;for(;t>=e&&n>a;)this._map[e]=r[a++],++e}mapOne(e,t){this._map[e]=t}lookup(e){return this._map[e]}contains(e){return void 0!==this._map[e]}forEach(e){const t=this._map,r=t.length;if(r>65536)for(const r in t)e(r,t[r]);else for(let n=0;r>n;n++)void 0!==t[n]&&e(n,t[n])}charCodeOf(e){const t=this._map;if(65536>=t.length)return t.indexOf(e);for(const r in t)if(t[r]===e)return 0|r;return-1}getMap(){return this._map}readCharCode(e,t,r){let n=0;const a=this.codespaceRanges;for(let i=0,s=a.length;s>i;i++){n=(n<<8|e.charCodeAt(t+i))>>>0;const s=a[i];for(let e=0,t=s.length;t>e;){const t=s[e++],a=s[e++];if(n>=t&&a>=n)return r.charcode=n,void(r.length=i+1)}}r.charcode=0,r.length=1}getCharCodeLength(e){const t=this.codespaceRanges;for(let r=0,n=t.length;n>r;r++){const n=t[r];for(let t=0,a=n.length;a>t;){const a=n[t++],i=n[t++];if(e>=a&&i>=e)return r+1}}return 1}get length(){return this._map.length}get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(let e=0;65536>e;e++)if(this._map[e]!==e)return!1;return!0}}t.CMap=u;class d extends u{constructor(e,t){super(),this.vertical=e,this.addCodespaceRange(t,0,65535)}mapCidRange(e,t,r){(0,n.unreachable)("should not call mapCidRange")}mapBfRange(e,t,r){(0,n.unreachable)("should not call mapBfRange")}mapBfRangeToArray(e,t,r){(0,n.unreachable)("should not call mapBfRangeToArray")}mapOne(e,t){(0,n.unreachable)("should not call mapCidOne")}lookup(e){return Number.isInteger(e)&&65535>=e?e:void 0}contains(e){return Number.isInteger(e)&&65535>=e}forEach(e){for(let t=0;65535>=t;t++)e(t,t)}charCodeOf(e){return Number.isInteger(e)&&65535>=e?e:-1}getMap(){const e=Array(65536);for(let t=0;65535>=t;t++)e[t]=t;return e}get length(){return 65536}get isIdentityCMap(){(0,n.unreachable)("should not access .isIdentityCMap")}}t.IdentityCMap=d;const f=function(){function e(e,t){let r=0;for(let n=0;t>=n;n++)r=r<<8|e[n];return r>>>0}function t(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode.apply(null,e.subarray(0,t+1))}function r(e,t,r){let n=0;for(let a=r;a>=0;a--)n+=e[a]+t[a],e[a]=255&n,n>>=8}function a(e,t){let r=1;for(let n=t;n>=0&&r>0;n--)r+=e[n],e[n]=255&r,r>>=8}const i=16;class s{constructor(e){this.buffer=e,this.pos=0,this.end=e.length,this.tmpBuf=new Uint8Array(19)}readByte(){return this.end>this.pos?this.buffer[this.pos++]:-1}readNumber(){let e,t=0;do{const r=this.readByte();if(0>r)throw new n.FormatError("unexpected EOF in bcmap");e=!(128&r),t=t<<7|127&r}while(!e);return t}readSigned(){const e=this.readNumber();return 1&e?~(e>>>1):e>>>1}readHex(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1)),this.pos+=t+1}readHexNumber(e,t){let r;const a=this.tmpBuf;let i=0;do{const e=this.readByte();if(0>e)throw new n.FormatError("unexpected EOF in bcmap");r=!(128&e),a[i++]=127&e}while(!r);let s=t,o=0,c=0;for(;s>=0;){for(;8>c&&a.length>0;)o|=a[--i]<<c,c+=7;e[s]=255&o,s--,o>>=8,c-=8}}readHexSigned(e,t){this.readHexNumber(e,t);const r=1&e[t]?255:0;let n=0;for(let a=0;t>=a;a++)n=(1&n)<<8|e[a],e[a]=n>>1^r}readString(){const e=this.readNumber();let t="";for(let r=0;e>r;r++)t+=String.fromCharCode(this.readNumber());return t}}return class{async process(n,o,c){const l=new s(n),h=l.readByte();o.vertical=!!(1&h);let u=null;const d=new Uint8Array(i),f=new Uint8Array(i),p=new Uint8Array(i),g=new Uint8Array(i),m=new Uint8Array(i);let b,y;for(;(y=l.readByte())>=0;){const n=y>>5;if(7===n){switch(31&y){case 0:l.readString();break;case 1:u=l.readString()}continue}const s=!!(16&y),c=15&y;if(c+1>i)throw Error("BinaryCMapReader.process: Invalid dataSize.");const h=1,w=l.readNumber();switch(n){case 0:l.readHex(d,c),l.readHexNumber(f,c),r(f,d,c),o.addCodespaceRange(c+1,e(d,c),e(f,c));for(let t=1;w>t;t++)a(f,c),l.readHexNumber(d,c),r(d,f,c),l.readHexNumber(f,c),r(f,d,c),o.addCodespaceRange(c+1,e(d,c),e(f,c));break;case 1:l.readHex(d,c),l.readHexNumber(f,c),r(f,d,c),l.readNumber();for(let e=1;w>e;e++)a(f,c),l.readHexNumber(d,c),r(d,f,c),l.readHexNumber(f,c),r(f,d,c),l.readNumber();break;case 2:l.readHex(p,c),b=l.readNumber(),o.mapOne(e(p,c),b);for(let t=1;w>t;t++)a(p,c),s||(l.readHexNumber(m,c),r(p,m,c)),b=l.readSigned()+(b+1),o.mapOne(e(p,c),b);break;case 3:l.readHex(d,c),l.readHexNumber(f,c),r(f,d,c),b=l.readNumber(),o.mapCidRange(e(d,c),e(f,c),b);for(let t=1;w>t;t++)a(f,c),s?d.set(f):(l.readHexNumber(d,c),r(d,f,c)),l.readHexNumber(f,c),r(f,d,c),b=l.readNumber(),o.mapCidRange(e(d,c),e(f,c),b);break;case 4:l.readHex(p,h),l.readHex(g,c),o.mapOne(e(p,h),t(g,c));for(let n=1;w>n;n++)a(p,h),s||(l.readHexNumber(m,h),r(p,m,h)),a(g,c),l.readHexSigned(m,c),r(g,m,c),o.mapOne(e(p,h),t(g,c));break;case 5:l.readHex(d,h),l.readHexNumber(f,h),r(f,d,h),l.readHex(g,c),o.mapBfRange(e(d,h),e(f,h),t(g,c));for(let n=1;w>n;n++)a(f,h),s?d.set(f):(l.readHexNumber(d,h),r(d,f,h)),l.readHexNumber(f,h),r(f,d,h),l.readHex(g,c),o.mapBfRange(e(d,h),e(f,h),t(g,c));break;default:throw Error("BinaryCMapReader.process - unknown type: "+n)}}return u?c(u):o}}}(),p=function(){function e(e){let t=0;for(let r=0;e.length>r;r++)t=t<<8|e.charCodeAt(r);return t>>>0}function t(e){if("string"!=typeof e)throw new n.FormatError("Malformed CMap: expected string.")}function r(e){if(!Number.isInteger(e))throw new n.FormatError("Malformed CMap: expected int.")}function h(r,n){for(;;){let i=n.getObj();if(i===a.EOF)break;if((0,a.isCmd)(i,"endbfchar"))return;t(i);const s=e(i);i=n.getObj(),t(i),r.mapOne(s,i)}}function p(r,i){for(;;){let n=i.getObj();if(n===a.EOF)break;if((0,a.isCmd)(n,"endbfrange"))return;t(n);const s=e(n);n=i.getObj(),t(n);const o=e(n);if(n=i.getObj(),Number.isInteger(n)||"string"==typeof n){const e=Number.isInteger(n)?String.fromCharCode(n):n;r.mapBfRange(s,o,e)}else{if(!(0,a.isCmd)(n,"["))break;{n=i.getObj();const e=[];for(;!(0,a.isCmd)(n,"]")&&n!==a.EOF;)e.push(n),n=i.getObj();r.mapBfRangeToArray(s,o,e)}}}throw new n.FormatError("Invalid bf range.")}function g(n,i){for(;;){let s=i.getObj();if(s===a.EOF)break;if((0,a.isCmd)(s,"endcidchar"))return;t(s);const o=e(s);s=i.getObj(),r(s),n.mapOne(o,s)}}function m(n,i){for(;;){let s=i.getObj();if(s===a.EOF)break;if((0,a.isCmd)(s,"endcidrange"))return;t(s);const o=e(s);s=i.getObj(),t(s);const c=e(s);s=i.getObj(),r(s),n.mapCidRange(o,c,s)}}function b(t,r){for(;;){let n=r.getObj();if(n===a.EOF)break;if((0,a.isCmd)(n,"endcodespacerange"))return;if("string"!=typeof n)break;const i=e(n);if(n=r.getObj(),"string"!=typeof n)break;const s=e(n);t.addCodespaceRange(n.length,i,s)}throw new n.FormatError("Invalid codespace range.")}function y(e,t){const r=t.getObj();Number.isInteger(r)&&(e.vertical=!!r)}function w(e,t){const r=t.getObj();r instanceof a.Name&&(e.name=r.name)}async function v(e,t,r,i){let s,c;e:for(;;)try{const r=t.getObj();if(r===a.EOF)break;if(r instanceof a.Name)"WMode"===r.name?y(e,t):"CMapName"===r.name&&w(e,t),s=r;else if(r instanceof a.Cmd)switch(r.cmd){case"endcmap":break e;case"usecmap":s instanceof a.Name&&(c=s.name);break;case"begincodespacerange":b(e,t);break;case"beginbfchar":h(e,t);break;case"begincidchar":g(e,t);break;case"beginbfrange":p(e,t);break;case"begincidrange":m(e,t)}}catch(e){if(e instanceof o.MissingDataException)throw e;(0,n.warn)("Invalid cMap data: "+e);continue}return!i&&c&&(i=c),i?S(e,r,i):e}async function S(e,t,r){if(e.useCMap=await x(r,t),0===e.numCodespaceRanges){const t=e.useCMap.codespaceRanges;for(let r=0;t.length>r;r++)e.codespaceRanges[r]=t[r].slice();e.numCodespaceRanges=e.useCMap.numCodespaceRanges}return e.useCMap.forEach((function(t,r){e.contains(t)||e.mapOne(t,e.useCMap.lookup(t))})),e}async function x(e,t){if("Identity-H"===e)return new d(!1,2);if("Identity-V"===e)return new d(!0,2);if(!l.includes(e))throw Error("Unknown CMap name: "+e);if(!t)throw Error("Built-in CMap parameters are not provided.");const{cMapData:r,compressionType:a}=await t(e),i=new u(!0);if(a===n.CMapCompressionType.BINARY)return(new f).process(r,i,(e=>S(i,t,e)));if(a===n.CMapCompressionType.NONE){const e=new s.Lexer(new c.Stream(r));return v(i,e,t,null)}throw Error("TODO: Only BINARY/NONE CMap compression is currently supported.")}return{async create(e){const t=e.encoding,r=e.fetchBuiltInCMap,n=e.useCMap;if(t instanceof a.Name)return x(t.name,r);if(t instanceof i.BaseStream){const e=await v(new u,new s.Lexer(t),r,n);return e.isIdentityCMap?x(e.name,r):e}throw Error("Encoding required.")}}}();t.CMapFactory=p},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=t.Linearization=t.Lexer=void 0;var n=r(2),a=r(5),i=r(6),s=r(18),o=r(20),c=r(21),l=r(23),h=r(24),u=r(27),d=r(29),f=r(31),p=r(10),g=r(32),m=r(33);function b(e){const t=e.length;let r=1,n=0;for(let a=0;t>a;++a)r+=255&e[a],n+=r;return n%65521<<16|r%65521}class y{constructor({lexer:e,xref:t,allowStreams:r=!1,recoveryMode:n=!1}){this.lexer=e,this.xref=t,this.allowStreams=r,this.recoveryMode=n,this.imageCache=Object.create(null),this.refill()}refill(){this.buf1=this.lexer.getObj(),this.buf2=this.lexer.getObj()}shift(){this.buf2 instanceof a.Cmd&&"ID"===this.buf2.cmd?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())}tryShift(){try{return this.shift(),!0}catch(e){if(e instanceof i.MissingDataException)throw e;return!1}}getObj(e=null){const t=this.buf1;if(this.shift(),t instanceof a.Cmd)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":const r=[];for(;!(0,a.isCmd)(this.buf1,"]")&&this.buf1!==a.EOF;)r.push(this.getObj(e));if(this.buf1===a.EOF){if(this.recoveryMode)return r;throw new i.ParserEOFException("End of file inside array.")}return this.shift(),r;case"<<":const s=new a.Dict(this.xref);for(;!(0,a.isCmd)(this.buf1,">>")&&this.buf1!==a.EOF;){if(!(this.buf1 instanceof a.Name)){(0,n.info)("Malformed dictionary: key must be a name object"),this.shift();continue}const t=this.buf1.name;if(this.shift(),this.buf1===a.EOF)break;s.set(t,this.getObj(e))}if(this.buf1===a.EOF){if(this.recoveryMode)return s;throw new i.ParserEOFException("End of file inside dictionary.")}return(0,a.isCmd)(this.buf2,"stream")?this.allowStreams?this.makeStream(s,e):s:(this.shift(),s);default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&(0,a.isCmd)(this.buf2,"R")){const e=a.Ref.get(t,this.buf1);return this.shift(),this.shift(),e}return t}return"string"==typeof t&&e?e.decryptString(t):t}findDefaultInlineStreamEnd(e){const t=this.lexer,r=e.pos;let s,o,c=0;for(;-1!==(s=e.getByte());)if(0===c)c=69===s?1:0;else if(1===c)c=73===s?2:0;else if((0,n.assert)(2===c,"findDefaultInlineStreamEnd - invalid state."),32===s||10===s||13===s){o=e.pos;const r=e.peekBytes(10);for(let e=0,t=r.length;t>e;e++)if(s=r[e],(0!==s||0===r[e+1])&&10!==s&&13!==s&&(32>s||s>127)){c=0;break}if(2!==c)continue;if(t.knownCommands){const e=t.peekObj();e instanceof a.Cmd&&!t.knownCommands[e.cmd]&&(c=0)}else(0,n.warn)("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");if(2===c)break}else c=0;-1===s&&((0,n.warn)("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),o&&((0,n.warn)('... trying to recover by using the last "EI" occurrence.'),e.skip(-(e.pos-o))));let l=4;return e.skip(-l),s=e.peekByte(),e.skip(l),(0,i.isWhiteSpace)(s)||l--,e.pos-l-r}findDCTDecodeInlineStreamEnd(e){const t=e.pos;let r,a,i=!1;for(;-1!==(r=e.getByte());)if(255===r){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:i=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:a=e.getUint16(),e.skip(a>2?a-2:-2)}if(i)break}const s=e.pos-t;return-1===r?((0,n.warn)("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),e.skip(-s),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),s)}findASCII85DecodeInlineStreamEnd(e){const t=e.pos;let r;for(;-1!==(r=e.getByte());)if(126===r){const t=e.pos;for(r=e.peekByte();(0,i.isWhiteSpace)(r);)e.skip(),r=e.peekByte();if(62===r){e.skip();break}if(e.pos>t){const t=e.peekBytes(2);if(69===t[0]&&73===t[1])break}}const a=e.pos-t;return-1===r?((0,n.warn)("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-a),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),a)}findASCIIHexDecodeInlineStreamEnd(e){const t=e.pos;let r;for(;-1!==(r=e.getByte())&&62!==r;);const a=e.pos-t;return-1===r?((0,n.warn)("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-a),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),a)}inlineStreamSkipEI(e){let t,r=0;for(;-1!==(t=e.getByte());)if(0===r)r=69===t?1:0;else if(1===r)r=73===t?2:0;else if(2===r)break}makeInlineImage(e){const t=this.lexer,r=t.stream,i=new a.Dict(this.xref);let s;for(;!(0,a.isCmd)(this.buf1,"ID")&&this.buf1!==a.EOF;){if(!(this.buf1 instanceof a.Name))throw new n.FormatError("Dictionary key must be a name object");const t=this.buf1.name;if(this.shift(),this.buf1===a.EOF)break;i.set(t,this.getObj(e))}-1!==t.beginInlineImagePos&&(s=r.pos-t.beginInlineImagePos);const o=i.get("F","Filter");let c;if(o instanceof a.Name)c=o.name;else if(Array.isArray(o)){const e=this.xref.fetchIfRef(o[0]);e instanceof a.Name&&(c=e.name)}const l=r.pos;let h;switch(c){case"DCT":case"DCTDecode":h=this.findDCTDecodeInlineStreamEnd(r);break;case"A85":case"ASCII85Decode":h=this.findASCII85DecodeInlineStreamEnd(r);break;case"AHx":case"ASCIIHexDecode":h=this.findASCIIHexDecodeInlineStreamEnd(r);break;default:h=this.findDefaultInlineStreamEnd(r)}let u,d=r.makeSubStream(l,h,i);if(1e3>h&&5552>s){const e=d.getBytes();d.reset();const n=r.pos;r.pos=t.beginInlineImagePos;const i=r.getBytes(s);r.pos=n,u=b(e)+"_"+b(i);const o=this.imageCache[u];if(void 0!==o)return this.buf2=a.Cmd.get("EI"),this.shift(),o.reset(),o}return e&&(d=e.createStream(d,h)),d=this.filter(d,i,h),d.dict=i,void 0!==u&&(d.cacheKey=`inline_${h}_${u}`,this.imageCache[u]=d),this.buf2=a.Cmd.get("EI"),this.shift(),d}_findStreamLength(e,t){const{stream:r}=this.lexer;r.pos=e;const n=t.length;for(;r.end>r.pos;){const a=r.peekBytes(2048),i=a.length-n;if(0>=i)break;let s=0;for(;i>s;){let i=0;for(;n>i&&a[s+i]===t[i];)i++;if(i>=n)return r.pos+=s,r.pos-e;s++}r.pos+=i}return-1}makeStream(e,t){const r=this.lexer;let s=r.stream;r.skipToNextLine();const o=s.pos-1;let c=e.get("Length");if(Number.isInteger(c)||((0,n.info)(`Bad length "${c&&""+c}" in stream.`),c=0),s.pos=o+c,r.nextChar(),this.tryShift()&&(0,a.isCmd)(this.buf2,"endstream"))this.shift();else{const e=new Uint8Array([101,110,100,115,116,114,101,97,109]);let t=this._findStreamLength(o,e);if(0>t){const r=1;for(let a=1;r>=a;a++){const r=e.length-a,c=e.slice(0,r),l=this._findStreamLength(o,c);if(l>=0){const e=s.peekBytes(r+1)[r];if(!(0,i.isWhiteSpace)(e))break;(0,n.info)(`Found "${(0,n.bytesToString)(c)}" when searching for endstream command.`),t=l;break}}if(0>t)throw new n.FormatError("Missing endstream command.")}c=t,r.nextChar(),this.shift(),this.shift()}return this.shift(),s=s.makeSubStream(o,c,e),t&&(s=t.createStream(s,c)),s=this.filter(s,e,c),s.dict=e,s}filter(e,t,r){let i=t.get("F","Filter"),s=t.get("DP","DecodeParms");if(i instanceof a.Name)return Array.isArray(s)&&(0,n.warn)("/DecodeParms should not be an Array, when /Filter is a Name."),this.makeFilter(e,i.name,r,s);let o=r;if(Array.isArray(i)){const t=i,r=s;for(let c=0,l=t.length;l>c;++c){if(i=this.xref.fetchIfRef(t[c]),!(i instanceof a.Name))throw new n.FormatError(`Bad filter name "${i}"`);s=null,Array.isArray(r)&&c in r&&(s=this.xref.fetchIfRef(r[c])),e=this.makeFilter(e,i.name,o,s),o=null}}return e}makeFilter(e,t,r,a){if(0===r)return(0,n.warn)(`Empty "${t}" stream.`),new p.NullStream;const b=this.xref.stats;try{switch(t){case"Fl":case"FlateDecode":return b.addStreamType(n.StreamType.FLATE),a?new g.PredictorStream(new l.FlateStream(e,r),r,a):new l.FlateStream(e,r);case"LZW":case"LZWDecode":b.addStreamType(n.StreamType.LZW);let t=1;return a?(a.has("EarlyChange")&&(t=a.get("EarlyChange")),new g.PredictorStream(new f.LZWStream(e,r,t),r,a)):new f.LZWStream(e,r,t);case"DCT":case"DCTDecode":return b.addStreamType(n.StreamType.DCT),new u.JpegStream(e,r,a);case"JPX":case"JPXDecode":return b.addStreamType(n.StreamType.JPX),new d.JpxStream(e,r,a);case"A85":case"ASCII85Decode":return b.addStreamType(n.StreamType.A85),new s.Ascii85Stream(e,r);case"AHx":case"ASCIIHexDecode":return b.addStreamType(n.StreamType.AHX),new o.AsciiHexStream(e,r);case"CCF":case"CCITTFaxDecode":return b.addStreamType(n.StreamType.CCF),new c.CCITTFaxStream(e,r,a);case"RL":case"RunLengthDecode":return b.addStreamType(n.StreamType.RLX),new m.RunLengthStream(e,r);case"JBIG2Decode":return b.addStreamType(n.StreamType.JBIG),new h.Jbig2Stream(e,r,a)}return(0,n.warn)(`Filter "${t}" is not supported.`),e}catch(e){if(e instanceof i.MissingDataException)throw e;return(0,n.warn)(`Invalid stream: "${e}"`),new p.NullStream}}}t.Parser=y;const w=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,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,2,0,2,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,2,0,2,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,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];function v(e){return 48>e||e>57?e>=65&&70>=e||e>=97&&102>=e?9+(15&e):-1:15&e}class S{constructor(e,t=null){this.stream=e,this.nextChar(),this.strBuf=[],this.knownCommands=t,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}nextChar(){return this.currentChar=this.stream.getByte()}peekChar(){return this.stream.peekByte()}getNumber(){let e=this.currentChar,t=!1,r=0,a=0;if(45===e?(a=-1,e=this.nextChar(),45===e&&(e=this.nextChar())):43===e&&(a=1,e=this.nextChar()),10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e&&(r=10,e=this.nextChar()),48>e||e>57){if((0,i.isWhiteSpace)(e)||-1===e){if(10===r&&0===a)return(0,n.warn)("Lexer.getNumber - treating a single decimal point as zero."),0;if(0===r&&-1===a)return(0,n.warn)("Lexer.getNumber - treating a single minus sign as zero."),0}throw new n.FormatError(`Invalid number: ${String.fromCharCode(e)} (charCode ${e})`)}a=a||1;let s=e-48,o=0,c=1;for(;(e=this.nextChar())>=0;)if(48>e||e>57)if(46===e){if(0!==r)break;r=1}else if(45===e)(0,n.warn)("Badly formatted number: minus sign in the middle");else{if(69!==e&&101!==e)break;if(e=this.peekChar(),43===e||45===e)c=45===e?-1:1,this.nextChar();else if(48>e||e>57)break;t=!0}else{const n=e-48;t?o=10*o+n:(0!==r&&(r*=10),s=10*s+n)}return 0!==r&&(s/=r),t&&(s*=10**(c*o)),a*s}getString(){let e=1,t=!1;const r=this.strBuf;r.length=0;let a=this.nextChar();for(;;){let i=!1;switch(0|a){case-1:(0,n.warn)("Unterminated string"),t=!0;break;case 40:++e,r.push("(");break;case 41:0==--e?(this.nextChar(),t=!0):r.push(")");break;case 92:switch(a=this.nextChar(),a){case-1:(0,n.warn)("Unterminated string"),t=!0;break;case 110:r.push("\n");break;case 114:r.push("\r");break;case 116:r.push("\t");break;case 98:r.push("\b");break;case 102:r.push("\f");break;case 92:case 40:case 41:r.push(String.fromCharCode(a));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:let e=15&a;a=this.nextChar(),i=!0,48>a||a>55||(e=(e<<3)+(15&a),a=this.nextChar(),48>a||a>55||(i=!1,e=(e<<3)+(15&a))),r.push(String.fromCharCode(e));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:r.push(String.fromCharCode(a))}break;default:r.push(String.fromCharCode(a))}if(t)break;i||(a=this.nextChar())}return r.join("")}getName(){let e,t;const r=this.strBuf;for(r.length=0;(e=this.nextChar())>=0&&!w[e];)if(35===e){if(e=this.nextChar(),w[e]){(0,n.warn)("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),r.push("#");break}const a=v(e);if(-1!==a){t=e,e=this.nextChar();const i=v(e);if(-1===i){if((0,n.warn)(`Lexer_getName: Illegal digit (${String.fromCharCode(e)}) in hexadecimal number.`),r.push("#",String.fromCharCode(t)),w[e])break;r.push(String.fromCharCode(e));continue}r.push(String.fromCharCode(a<<4|i))}else r.push("#",String.fromCharCode(e))}else r.push(String.fromCharCode(e));return r.length>127&&(0,n.warn)("Name token is longer than allowed by the spec: "+r.length),a.Name.get(r.join(""))}_hexStringWarn(e){5!=this._hexStringNumWarn++?this._hexStringNumWarn>5||(0,n.warn)("getHexString - ignoring invalid character: "+e):(0,n.warn)("getHexString - ignoring additional invalid characters.")}getHexString(){const e=this.strBuf;e.length=0;let t,r,a=this.currentChar,i=!0;for(this._hexStringNumWarn=0;;){if(0>a){(0,n.warn)("Unterminated hex string");break}if(62===a){this.nextChar();break}if(1!==w[a]){if(i){if(t=v(a),-1===t){this._hexStringWarn(a),a=this.nextChar();continue}}else{if(r=v(a),-1===r){this._hexStringWarn(a),a=this.nextChar();continue}e.push(String.fromCharCode(t<<4|r))}i=!i,a=this.nextChar()}else a=this.nextChar()}return e.join("")}getObj(){let e=!1,t=this.currentChar;for(;;){if(0>t)return a.EOF;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==w[t])break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),a.Cmd.get("[");case 93:return this.nextChar(),a.Cmd.get("]");case 60:return t=this.nextChar(),60===t?(this.nextChar(),a.Cmd.get("<<")):this.getHexString();case 62:return t=this.nextChar(),62===t?(this.nextChar(),a.Cmd.get(">>")):a.Cmd.get(">");case 123:return this.nextChar(),a.Cmd.get("{");case 125:return this.nextChar(),a.Cmd.get("}");case 41:throw this.nextChar(),new n.FormatError("Illegal character: "+t)}let r=String.fromCharCode(t);if(32>t||t>127){const e=this.peekChar();if(e>=32&&127>=e)return this.nextChar(),a.Cmd.get(r)}const i=this.knownCommands;let s=i&&void 0!==i[r];for(;(t=this.nextChar())>=0&&!w[t];){const e=r+String.fromCharCode(t);if(s&&void 0===i[e])break;if(128===r.length)throw new n.FormatError("Command token too long: "+r.length);r=e,s=i&&void 0!==i[r]}return"true"===r||"false"!==r&&("null"===r?null:("BI"===r&&(this.beginInlineImagePos=this.stream.pos),a.Cmd.get(r)))}peekObj(){const e=this.stream.pos,t=this.currentChar,r=this.beginInlineImagePos;let a;try{a=this.getObj()}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.warn)("peekObj: "+e)}return this.stream.pos=e,this.currentChar=t,this.beginInlineImagePos=r,a}skipToNextLine(){let e=this.currentChar;for(;e>=0;){if(13===e){e=this.nextChar(),10===e&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}t.Lexer=S,t.Linearization=class{static create(e){function t(e,t,r=!1){const n=e.get(t);if(Number.isInteger(n)&&(r?n>=0:n>0))return n;throw Error(`The "${t}" parameter in the linearization dictionary is invalid.`)}const r=new y({lexer:new S(e),xref:null}),n=r.getObj(),i=r.getObj(),s=r.getObj(),o=r.getObj();let c,l;if(!(Number.isInteger(n)&&Number.isInteger(i)&&(0,a.isCmd)(s,"obj")&&o instanceof a.Dict&&"number"==typeof(c=o.get("Linearized"))&&c>0))return null;if((l=t(o,"L"))!==e.length)throw Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:l,hints:function(e){const t=e.get("H");let r;if(Array.isArray(t)&&(2===(r=t.length)||4===r)){for(let e=0;r>e;e++){const r=t[e];if(!Number.isInteger(r)||0>=r)throw Error(`Hint (${e}) in the linearization dictionary is invalid.`)}return t}throw Error("Hint array in the linearization dictionary is invalid.")}(o),objectNumberFirst:t(o,"O"),endFirst:t(o,"E"),numPages:t(o,"N"),mainXRefEntriesOffset:t(o,"T"),pageFirst:o.has("P")?t(o,"P",!0):0}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ascii85Stream=void 0;var n=r(19),a=r(6);t.Ascii85Stream=class extends n.DecodeStream{constructor(e,t){t&&(t*=.8),super(t),this.str=e,this.dict=e.dict,this.input=new Uint8Array(5)}readBlock(){const e=this.str;let t=e.getByte();for(;(0,a.isWhiteSpace)(t);)t=e.getByte();if(-1===t||126===t)return void(this.eof=!0);const r=this.bufferLength;let n,i;if(122===t){for(n=this.ensureBuffer(r+4),i=0;4>i;++i)n[r+i]=0;this.bufferLength+=4}else{const s=this.input;for(s[0]=t,i=1;5>i;++i){for(t=e.getByte();(0,a.isWhiteSpace)(t);)t=e.getByte();if(s[i]=t,-1===t||126===t)break}if(n=this.ensureBuffer(r+i-1),this.bufferLength+=i-1,5>i){for(;5>i;++i)s[i]=117;this.eof=!0}let o=0;for(i=0;5>i;++i)o=85*o+(s[i]-33);for(i=3;i>=0;--i)n[r+i]=255&o,o>>=8}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StreamsSequenceStream=t.DecodeStream=void 0;var n=r(7),a=r(10);const i=new Uint8Array(0);class s extends n.BaseStream{constructor(e){if(super(),this._rawMinBufferLength=e||0,this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=i,this.minBufferLength=512,e)for(;e>this.minBufferLength;)this.minBufferLength*=2}get isEmpty(){for(;!this.eof&&0===this.bufferLength;)this.readBlock();return 0===this.bufferLength}ensureBuffer(e){const t=this.buffer;if(t.byteLength>=e)return t;let r=this.minBufferLength;for(;e>r;)r*=2;const n=new Uint8Array(r);return n.set(t),this.buffer=n}getByte(){const e=this.pos;for(;e>=this.bufferLength;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]}getBytes(e){const t=this.pos;let r;if(e){for(this.ensureBuffer(t+e),r=t+e;!this.eof&&r>this.bufferLength;)this.readBlock();const n=this.bufferLength;r>n&&(r=n)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(t,r)}reset(){this.pos=0}makeSubStream(e,t,r=null){if(void 0===t)for(;!this.eof;)this.readBlock();else{const r=e+t;for(;r>=this.bufferLength&&!this.eof;)this.readBlock()}return new a.Stream(this.buffer,e,t,r)}getBaseStreams(){return this.str?this.str.getBaseStreams():null}}t.DecodeStream=s,t.StreamsSequenceStream=class extends s{constructor(e,t=null){let r=0;for(const t of e)r+=t instanceof s?t._rawMinBufferLength:t.length;super(r),this.streams=e,this._onError=t}readBlock(){const e=this.streams;if(0===e.length)return void(this.eof=!0);const t=e.shift();let r;try{r=t.getBytes()}catch(e){if(this._onError)return void this._onError(e,t.dict&&t.dict.objId);throw e}const n=this.bufferLength,a=n+r.length;this.ensureBuffer(a).set(r,n),this.bufferLength=a}getBaseStreams(){const e=[];for(const t of this.streams){const r=t.getBaseStreams();r&&e.push(...r)}return e.length>0?e:null}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AsciiHexStream=void 0;var n=r(19);t.AsciiHexStream=class extends n.DecodeStream{constructor(e,t){t&&(t*=.5),super(t),this.str=e,this.dict=e.dict,this.firstDigit=-1}readBlock(){const e=this.str.getBytes(8e3);if(!e.length)return void(this.eof=!0);const t=this.ensureBuffer(this.bufferLength+(e.length+1>>1));let r=this.bufferLength,n=this.firstDigit;for(const a of e){let e;if(48>a||a>57){if((65>a||a>70)&&(97>a||a>102)){if(62===a){this.eof=!0;break}continue}e=9+(15&a)}else e=15&a;0>n?n=e:(t[r++]=n<<4|e,n=-1)}n>=0&&this.eof&&(t[r++]=n<<4,n=-1),this.firstDigit=n,this.bufferLength=r}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CCITTFaxStream=void 0;var n=r(22),a=r(19),i=r(5);t.CCITTFaxStream=class extends a.DecodeStream{constructor(e,t,r){super(t),this.str=e,this.dict=e.dict,r instanceof i.Dict||(r=i.Dict.empty),this.ccittFaxDecoder=new n.CCITTFaxDecoder({next:()=>e.getByte()},{K:r.get("K"),EndOfLine:r.get("EndOfLine"),EncodedByteAlign:r.get("EncodedByteAlign"),Columns:r.get("Columns"),Rows:r.get("Rows"),EndOfBlock:r.get("EndOfBlock"),BlackIs1:r.get("BlackIs1")})}readBlock(){for(;!this.eof;){const e=this.ccittFaxDecoder.readNextChar();if(-1===e)return void(this.eof=!0);this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=e}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CCITTFaxDecoder=void 0;var n=r(2);const a=-1,i=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],s=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],o=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],c=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],l=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],h=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];t.CCITTFaxDecoder=class{constructor(e,t={}){if(!e||"function"!=typeof e.next)throw Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=e,this.eof=!1,this.encoding=t.K||0,this.eoline=t.EndOfLine||!1,this.byteAlign=t.EncodedByteAlign||!1,this.columns=t.Columns||1728,this.rows=t.Rows||0;let r,n=t.EndOfBlock;for(null==n&&(n=!0),this.eoblock=n,this.black=t.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=0>this.encoding,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;0===(r=this._lookBits(12));)this._eatBits(1);1===r&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}readNextChar(){if(this.eof)return-1;const e=this.refLine,t=this.codingLine,r=this.columns;let i,s,o,c,l;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;let o,l,h;if(this.err=!1,this.nextLine2D){for(c=0;r>t[c];++c)e[c]=t[c];for(e[c++]=r,e[c]=r,t[0]=0,this.codingPos=0,i=0,s=0;r>t[this.codingPos];)switch(o=this._getTwoDimCode(),o){case 0:this._addPixels(e[i+1],s),r>e[i+1]&&(i+=2);break;case 1:if(o=l=0,s){do{o+=h=this._getBlackCode()}while(h>=64);do{l+=h=this._getWhiteCode()}while(h>=64)}else{do{o+=h=this._getWhiteCode()}while(h>=64);do{l+=h=this._getBlackCode()}while(h>=64)}for(this._addPixels(t[this.codingPos]+o,s),r>t[this.codingPos]&&this._addPixels(t[this.codingPos]+l,1^s);t[this.codingPos]>=e[i]&&r>e[i];)i+=2;break;case 7:if(this._addPixels(e[i]+3,s),s^=1,r>t[this.codingPos])for(++i;t[this.codingPos]>=e[i]&&r>e[i];)i+=2;break;case 5:if(this._addPixels(e[i]+2,s),s^=1,r>t[this.codingPos])for(++i;t[this.codingPos]>=e[i]&&r>e[i];)i+=2;break;case 3:if(this._addPixels(e[i]+1,s),s^=1,r>t[this.codingPos])for(++i;t[this.codingPos]>=e[i]&&r>e[i];)i+=2;break;case 2:if(this._addPixels(e[i],s),s^=1,r>t[this.codingPos])for(++i;t[this.codingPos]>=e[i]&&r>e[i];)i+=2;break;case 8:if(this._addPixelsNeg(e[i]-3,s),s^=1,r>t[this.codingPos])for(i>0?--i:++i;t[this.codingPos]>=e[i]&&r>e[i];)i+=2;break;case 6:if(this._addPixelsNeg(e[i]-2,s),s^=1,r>t[this.codingPos])for(i>0?--i:++i;t[this.codingPos]>=e[i]&&r>e[i];)i+=2;break;case 4:if(this._addPixelsNeg(e[i]-1,s),s^=1,r>t[this.codingPos])for(i>0?--i:++i;t[this.codingPos]>=e[i]&&r>e[i];)i+=2;break;case a:this._addPixels(r,0),this.eof=!0;break;default:(0,n.info)("bad 2d code"),this._addPixels(r,0),this.err=!0}}else for(t[0]=0,this.codingPos=0,s=0;r>t[this.codingPos];){if(o=0,s)do{o+=h=this._getBlackCode()}while(h>=64);else do{o+=h=this._getWhiteCode()}while(h>=64);this._addPixels(t[this.codingPos]+o,s),s^=1}let u=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(o=this._lookBits(12),this.eoline)for(;o!==a&&1!==o;)this._eatBits(1),o=this._lookBits(12);else for(;0===o;)this._eatBits(1),o=this._lookBits(12);1===o?(this._eatBits(12),u=!0):o===a&&(this.eof=!0)}else this.rowsDone=!0;if(this.eof||0>=this.encoding||this.rowsDone||(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&u&&this.byteAlign){if(o=this._lookBits(12),1===o){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(c=0;4>c;++c)o=this._lookBits(12),1!==o&&(0,n.info)("bad rtc code: "+o),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(o=this._lookBits(13),o===a)return this.eof=!0,-1;if(o>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&o))}this.outputBits=t[0]>0?t[this.codingPos=0]:t[this.codingPos=1],this.row++}if(8>this.outputBits){o=8,l=0;do{if("number"!=typeof this.outputBits)throw new n.FormatError('Invalid /CCITTFaxDecode data, "outputBits" must be a number.');this.outputBits>o?(l<<=o,1&this.codingPos||(l|=255>>8-o),this.outputBits-=o,o=0):(l<<=this.outputBits,1&this.codingPos||(l|=255>>8-this.outputBits),o-=this.outputBits,this.outputBits=0,r>t[this.codingPos]?(this.codingPos++,this.outputBits=t[this.codingPos]-t[this.codingPos-1]):o>0&&(l<<=o,o=0))}while(o)}else l=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&r>t[this.codingPos]&&(this.codingPos++,this.outputBits=t[this.codingPos]-t[this.codingPos-1]);return this.black&&(l^=255),l}_addPixels(e,t){const r=this.codingLine;let a=this.codingPos;e>r[a]&&(e>this.columns&&((0,n.info)("row is wrong length"),this.err=!0,e=this.columns),1&a^t&&++a,r[a]=e),this.codingPos=a}_addPixelsNeg(e,t){const r=this.codingLine;let a=this.codingPos;if(e>r[a])e>this.columns&&((0,n.info)("row is wrong length"),this.err=!0,e=this.columns),1&a^t&&++a,r[a]=e;else if(r[a]>e){for(0>e&&((0,n.info)("invalid code"),this.err=!0,e=0);a>0&&r[a-1]>e;)--a;r[a]=e}this.codingPos=a}_findTableCode(e,t,r,n){const i=n||0;for(let n=e;t>=n;++n){let e=this._lookBits(n);if(e===a)return[!0,1,!1];if(t>n&&(e<<=t-n),!i||e>=i){const t=r[e-i];if(t[0]===n)return this._eatBits(n),[!0,t[1],!0]}}return[!1,0,!1]}_getTwoDimCode(){let e,t=0;if(this.eoblock){if(t=this._lookBits(7),e=i[t],e&&e[0]>0)return this._eatBits(e[0]),e[1]}else{const e=this._findTableCode(1,7,i);if(e[0]&&e[2])return e[1]}return(0,n.info)("Bad two dim code"),a}_getWhiteCode(){let e,t=0;if(this.eoblock){if(t=this._lookBits(12),t===a)return 1;if(e=t>>5?o[t>>3]:s[t],e[0]>0)return this._eatBits(e[0]),e[1]}else{let e=this._findTableCode(1,9,o);if(e[0])return e[1];if(e=this._findTableCode(11,12,s),e[0])return e[1]}return(0,n.info)("bad white code"),this._eatBits(1),1}_getBlackCode(){let e,t;if(this.eoblock){if(e=this._lookBits(13),e===a)return 1;if(t=e>>7?!(e>>9)&&e>>7?l[(e>>1)-64]:h[e>>7]:c[e],t[0]>0)return this._eatBits(t[0]),t[1]}else{let e=this._findTableCode(2,6,h);if(e[0])return e[1];if(e=this._findTableCode(7,12,l,64),e[0])return e[1];if(e=this._findTableCode(10,13,c),e[0])return e[1]}return(0,n.info)("bad black code"),this._eatBits(1),1}_lookBits(e){let t;for(;e>this.inputBits;){if(-1===(t=this.source.next()))return 0===this.inputBits?a:this.inputBuf<<e-this.inputBits&65535>>16-e;this.inputBuf=this.inputBuf<<8|t,this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e}_eatBits(e){0>(this.inputBits-=e)&&(this.inputBits=0)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FlateStream=void 0;var n=r(19),a=r(2);const i=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),o=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),c=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],l=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];t.FlateStream=class extends n.DecodeStream{constructor(e,t){super(t),this.str=e,this.dict=e.dict;const r=e.getByte(),n=e.getByte();if(-1===r||-1===n)throw new a.FormatError(`Invalid header in flate stream: ${r}, ${n}`);if(8!=(15&r))throw new a.FormatError(`Unknown compression method in flate stream: ${r}, ${n}`);if(((r<<8)+n)%31!=0)throw new a.FormatError(`Bad FCHECK in flate stream: ${r}, ${n}`);if(32&n)throw new a.FormatError(`FDICT bit set in flate stream: ${r}, ${n}`);this.codeSize=0,this.codeBuf=0}getBits(e){const t=this.str;let r,n=this.codeSize,i=this.codeBuf;for(;e>n;){if(-1===(r=t.getByte()))throw new a.FormatError("Bad encoding in flate stream");i|=r<<n,n+=8}return r=i&(1<<e)-1,this.codeBuf=i>>e,this.codeSize=n-=e,r}getCode(e){const t=this.str,r=e[0],n=e[1];let i,s=this.codeSize,o=this.codeBuf;for(;n>s&&-1!==(i=t.getByte());)o|=i<<s,s+=8;const c=r[o&(1<<n)-1],l=c>>16,h=65535&c;if(1>l||l>s)throw new a.FormatError("Bad encoding in flate stream");return this.codeBuf=o>>l,this.codeSize=s-l,h}generateHuffmanTable(e){const t=e.length;let r,n=0;for(r=0;t>r;++r)e[r]>n&&(n=e[r]);const a=1<<n,i=new Int32Array(a);for(let s=1,o=0,c=2;n>=s;++s,o<<=1,c<<=1)for(let n=0;t>n;++n)if(e[n]===s){let e=0,t=o;for(r=0;s>r;++r)e=e<<1|1&t,t>>=1;for(r=e;a>r;r+=c)i[r]=s<<16|n;++o}return[i,n]}readBlock(){let e,t;const r=this.str;let n,h,u=this.getBits(3);if(1&u&&(this.eof=!0),u>>=1,0===u){let t;if(-1===(t=r.getByte()))throw new a.FormatError("Bad block header in flate stream");let n=t;if(-1===(t=r.getByte()))throw new a.FormatError("Bad block header in flate stream");if(n|=t<<8,-1===(t=r.getByte()))throw new a.FormatError("Bad block header in flate stream");let i=t;if(-1===(t=r.getByte()))throw new a.FormatError("Bad block header in flate stream");if(i|=t<<8,i!==(65535&~n)&&(0!==n||0!==i))throw new a.FormatError("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;const s=this.bufferLength,o=s+n;if(e=this.ensureBuffer(o),this.bufferLength=o,0===n)-1===r.peekByte()&&(this.eof=!0);else{const t=r.getBytes(n);e.set(t,s),n>t.length&&(this.eof=!0)}return}if(1===u)n=c,h=l;else{if(2!==u)throw new a.FormatError("Unknown block type in flate stream");{const e=this.getBits(5)+257,r=this.getBits(5)+1,a=this.getBits(4)+4,s=new Uint8Array(i.length);let o;for(o=0;a>o;++o)s[i[o]]=this.getBits(3);const c=this.generateHuffmanTable(s);t=0,o=0;const l=e+r,u=new Uint8Array(l);let d,f,p;for(;l>o;){const e=this.getCode(c);if(16===e)d=2,f=3,p=t;else if(17===e)d=3,f=3,p=t=0;else{if(18!==e){u[o++]=t=e;continue}d=7,f=11,p=t=0}let r=this.getBits(d)+f;for(;r-- >0;)u[o++]=p}n=this.generateHuffmanTable(u.subarray(0,e)),h=this.generateHuffmanTable(u.subarray(e,l))}}e=this.buffer;let d=e?e.length:0,f=this.bufferLength;for(;;){let r=this.getCode(n);if(256>r){d>f+1||(e=this.ensureBuffer(f+1),d=e.length),e[f++]=r;continue}if(256===r)return void(this.bufferLength=f);r-=257,r=s[r];let a=r>>16;a>0&&(a=this.getBits(a)),t=(65535&r)+a,r=this.getCode(h),r=o[r],a=r>>16,a>0&&(a=this.getBits(a));const i=(65535&r)+a;d>f+t||(e=this.ensureBuffer(f+t),d=e.length);for(let r=0;t>r;++r,++f)e[f]=e[f-i]}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Jbig2Stream=void 0;var n=r(7),a=r(19),i=r(5),s=r(25),o=r(2);t.Jbig2Stream=class extends a.DecodeStream{constructor(e,t,r){super(t),this.stream=e,this.dict=e.dict,this.maybeLength=t,this.params=r}get bytes(){return(0,o.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){if(this.eof)return;const e=new s.Jbig2Image,t=[];if(this.params instanceof i.Dict){const e=this.params.get("JBIG2Globals");if(e instanceof n.BaseStream){const r=e.getBytes();t.push({data:r,start:0,end:r.length})}}t.push({data:this.bytes,start:0,end:this.bytes.length});const r=e.parseChunks(t),a=r.length;for(let e=0;a>e;e++)r[e]^=255;this.buffer=r,this.bufferLength=a,this.eof=!0}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Jbig2Image=void 0;var n=r(2),a=r(6),i=r(26),s=r(22);class o extends n.BaseException{constructor(e){super("JBIG2 error: "+e,"Jbig2Error")}}class c{getContexts(e){return e in this?this[e]:this[e]=new Int8Array(65536)}}class l{constructor(e,t,r){this.data=e,this.start=t,this.end=r}get decoder(){const e=new i.ArithmeticDecoder(this.data,this.start,this.end);return(0,n.shadow)(this,"decoder",e)}get contextCache(){const e=new c;return(0,n.shadow)(this,"contextCache",e)}}function h(e,t,r){const n=e.getContexts(t);let a=1;function i(e){let t=0;for(let i=0;e>i;i++){const e=r.readBit(n,a);a=256>a?a<<1|e:511&(a<<1|e)|256,t=t<<1|e}return t>>>0}const s=i(1),o=i(1)?i(1)?i(1)?i(1)?i(1)?i(32)+4436:i(12)+340:i(8)+84:i(6)+20:i(4)+4:i(2);return 0===s?o:o>0?-o:null}function u(e,t,r){const n=e.getContexts("IAID");let a=1;for(let e=0;r>e;e++)a=a<<1|t.readBit(n,a);return 31>r?a&(1<<r)-1:2147483647&a}const d=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],f=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],p=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],g=[39717,1941,229,405];function m(e,t,r,n,a,i,s,o){if(e)return R(new I(o.data,o.start,o.end),t,r,!1);if(0===n&&!a&&4===s.length&&3===s[0].x&&-1===s[0].y&&-3===s[1].x&&-1===s[1].y&&2===s[2].x&&-2===s[2].y&&-2===s[3].x&&-2===s[3].y)return function(e,t,r){const n=r.decoder,a=r.contextCache.getContexts("GB"),i=[];let s,o,c,l,h,u,d;for(o=0;t>o;o++)for(h=i[o]=new Uint8Array(e),u=1>o?h:i[o-1],d=2>o?h:i[o-2],s=d[0]<<13|d[1]<<12|d[2]<<11|u[0]<<7|u[1]<<6|u[2]<<5|u[3]<<4,c=0;e>c;c++)h[c]=l=n.readBit(a,s),s=(31735&s)<<1|(e>c+3?d[c+3]<<11:0)|(e>c+4?u[c+4]<<4:0)|l;return i}(t,r,o);const c=f[n].concat(s);c.sort((function(e,t){return e.y-t.y||e.x-t.x}));const l=c.length,h=new Int8Array(l),u=new Int8Array(l),d=[];let p,m,b=0,y=0,w=0,v=0;for(m=0;l>m;m++)h[m]=c[m].x,u[m]=c[m].y,y=Math.min(y,c[m].x),w=Math.max(w,c[m].x),v=Math.min(v,c[m].y),l-1>m&&c[m].y===c[m+1].y&&c[m].x===c[m+1].x-1?b|=1<<l-1-m:d.push(m);const S=d.length,x=new Int8Array(S),A=new Int8Array(S),k=new Uint16Array(S);for(p=0;S>p;p++)m=d[p],x[p]=c[m].x,A[p]=c[m].y,k[p]=1<<l-1-m;const C=-y,_=-v,F=t-w,T=g[n];let O=new Uint8Array(t);const P=[],E=o.decoder,M=o.contextCache.getContexts("GB");let D,N,L,j,B,U=0,$=0;for(let e=0;r>e;e++)if(a&&(U^=E.readBit(M,T),U))P.push(O);else for(O=new Uint8Array(O),P.push(O),D=0;t>D;D++){if(C>D||D>=F||_>e)for($=0,B=l-1,m=0;l>m;m++,B--)L=D+h[m],L>=0&&t>L&&(N=e+u[m],0>N||(j=P[N][L],j&&($|=j<<B)));else for($=$<<1&b,m=0;S>m;m++)N=e+A[m],L=D+x[m],j=P[N][L],j&&(j=k[m],$|=j);const r=E.readBit(M,$);O[D]=r}return P}function b(e,t,r,n,a,i,s,o,c){let l=p[r].coding;0===r&&(l=l.concat([o[0]]));const h=l.length,u=new Int32Array(h),d=new Int32Array(h);let f;for(f=0;h>f;f++)u[f]=l[f].x,d[f]=l[f].y;let g=p[r].reference;0===r&&(g=g.concat([o[1]]));const m=g.length,b=new Int32Array(m),y=new Int32Array(m);for(f=0;m>f;f++)b[f]=g[f].x,y[f]=g[f].y;const w=n[0].length,v=n.length,S=[],x=c.decoder,A=c.contextCache.getContexts("GR");for(let r=0;t>r;r++){const t=new Uint8Array(e);S.push(t);for(let s=0;e>s;s++){let o,c,l=0;for(f=0;h>f;f++)o=r+d[f],c=s+u[f],0>o||0>c||c>=e?l<<=1:l=l<<1|S[o][c];for(f=0;m>f;f++)o=r+y[f]-i,c=s+b[f]-a,0>o||o>=v||0>c||c>=w?l<<=1:l=l<<1|n[o][c];const p=x.readBit(A,l);t[s]=p}}return S}function y(e,t,r,n,a,i,s,c,l,d,f,p,g,m,y,w,v,S,x){if(e&&t)throw new o("refinement with Huffman is not supported");const A=[];let k,C;for(k=0;n>k;k++){if(C=new Uint8Array(r),a)for(let e=0;r>e;e++)C[e]=a;A.push(C)}const _=v.decoder,F=v.contextCache;let T=e?-m.tableDeltaT.decode(x):-h(F,"IADT",_),O=0;for(k=0;i>k;){T+=e?m.tableDeltaT.decode(x):h(F,"IADT",_),O+=e?m.tableFirstS.decode(x):h(F,"IAFS",_);let n=O;for(;;){let a=0;s>1&&(a=e?x.readBits(S):h(F,"IAIT",_));const i=s*T+a,O=e?m.symbolIDTable.decode(x):u(F,_,l),P=t&&(e?x.readBit():h(F,"IARI",_));let I=c[O],E=I[0].length,M=I.length;if(P){const e=h(F,"IARDW",_),t=h(F,"IARDH",_);E+=e,M+=t,I=b(E,M,y,I,(e>>1)+h(F,"IARDX",_),(t>>1)+h(F,"IARDY",_),0,w,v)}const R=i-(1&p?0:M-1),D=n-(2&p?E-1:0);let N,L,j;if(d){for(N=0;M>N;N++){if(C=A[D+N],!C)continue;j=I[N];const e=Math.min(r-R,E);switch(g){case 0:for(L=0;e>L;L++)C[R+L]|=j[L];break;case 2:for(L=0;e>L;L++)C[R+L]^=j[L];break;default:throw new o(`operator ${g} is not supported`)}}n+=M-1}else{for(L=0;M>L;L++)if(C=A[R+L],C)switch(j=I[L],g){case 0:for(N=0;E>N;N++)C[D+N]|=j[N];break;case 2:for(N=0;E>N;N++)C[D+N]^=j[N];break;default:throw new o(`operator ${g} is not supported`)}n+=E-1}k++;const B=e?m.tableDeltaS.decode(x):h(F,"IADS",_);if(null===B)break;n+=B+f}}return A}function w(e,t){const r={};r.number=(0,a.readUint32)(e,t);const n=e[t+4],i=63&n;if(!d[i])throw new o("invalid segment type: "+i);r.type=i,r.typeName=d[i],r.deferredNonRetain=!!(128&n);const s=!!(64&n),c=e[t+5];let l=c>>5&7;const h=[31&c];let u=t+6;if(7===c){l=536870911&(0,a.readUint32)(e,u-1),u+=3;let t=l+7>>3;for(h[0]=e[u++];--t>0;)h.push(e[u++])}else if(5===c||6===c)throw new o("invalid referred-to flags");r.retainBits=h;let f=4;r.number>256?r.number>65536||(f=2):f=1;const p=[];let g,m;for(g=0;l>g;g++){let t;t=1===f?e[u]:2===f?(0,a.readUint16)(e,u):(0,a.readUint32)(e,u),p.push(t),u+=f}if(r.referredTo=p,s?(r.pageAssociation=(0,a.readUint32)(e,u),u+=4):r.pageAssociation=e[u++],r.length=(0,a.readUint32)(e,u),u+=4,4294967295===r.length){if(38!==i)throw new o("invalid unknown segment length");{const t=S(e,u),n=!!(1&e[u+x]),a=6,i=new Uint8Array(a);for(n||(i[0]=255,i[1]=172),i[2]=t.height>>>24&255,i[3]=t.height>>16&255,i[4]=t.height>>8&255,i[5]=255&t.height,g=u,m=e.length;m>g;g++){let t=0;for(;a>t&&i[t]===e[g+t];)t++;if(t===a){r.length=g+a;break}}if(4294967295===r.length)throw new o("segment end was not found")}}return r.headerEnd=u,r}function v(e,t,r,n){const a=[];let i=r;for(;n>i;){const r=w(t,i);i=r.headerEnd;const n={header:r,data:t};if(e.randomAccess||(n.start=i,i+=r.length,n.end=i),a.push(n),51===r.type)break}if(e.randomAccess)for(let e=0,t=a.length;t>e;e++)a[e].start=i,i+=a[e].header.length,a[e].end=i;return a}function S(e,t){return{width:(0,a.readUint32)(e,t),height:(0,a.readUint32)(e,t+4),x:(0,a.readUint32)(e,t+8),y:(0,a.readUint32)(e,t+12),combinationOperator:7&e[t+16]}}const x=17;function A(e,t){const r=e.header,n=e.data,i=e.end;let s,c,l,h,u=e.start;switch(r.type){case 0:const e={},t=(0,a.readUint16)(n,u);if(e.huffman=!!(1&t),e.refinement=!!(2&t),e.huffmanDHSelector=t>>2&3,e.huffmanDWSelector=t>>4&3,e.bitmapSizeSelector=t>>6&1,e.aggregationInstancesSelector=t>>7&1,e.bitmapCodingContextUsed=!!(256&t),e.bitmapCodingContextRetained=!!(512&t),e.template=t>>10&3,e.refinementTemplate=t>>12&1,u+=2,!e.huffman){for(h=0===e.template?4:1,c=[],l=0;h>l;l++)c.push({x:(0,a.readInt8)(n,u),y:(0,a.readInt8)(n,u+1)}),u+=2;e.at=c}if(e.refinement&&!e.refinementTemplate){for(c=[],l=0;2>l;l++)c.push({x:(0,a.readInt8)(n,u),y:(0,a.readInt8)(n,u+1)}),u+=2;e.refinementAt=c}e.numberOfExportedSymbols=(0,a.readUint32)(n,u),u+=4,e.numberOfNewSymbols=(0,a.readUint32)(n,u),u+=4,s=[e,r.number,r.referredTo,n,u,i];break;case 6:case 7:const d={};d.info=S(n,u),u+=x;const f=(0,a.readUint16)(n,u);if(u+=2,d.huffman=!!(1&f),d.refinement=!!(2&f),d.logStripSize=f>>2&3,d.stripSize=1<<d.logStripSize,d.referenceCorner=f>>4&3,d.transposed=!!(64&f),d.combinationOperator=f>>7&3,d.defaultPixelValue=f>>9&1,d.dsOffset=f<<17>>27,d.refinementTemplate=f>>15&1,d.huffman){const e=(0,a.readUint16)(n,u);u+=2,d.huffmanFS=3&e,d.huffmanDS=e>>2&3,d.huffmanDT=e>>4&3,d.huffmanRefinementDW=e>>6&3,d.huffmanRefinementDH=e>>8&3,d.huffmanRefinementDX=e>>10&3,d.huffmanRefinementDY=e>>12&3,d.huffmanRefinementSizeSelector=!!(16384&e)}if(d.refinement&&!d.refinementTemplate){for(c=[],l=0;2>l;l++)c.push({x:(0,a.readInt8)(n,u),y:(0,a.readInt8)(n,u+1)}),u+=2;d.refinementAt=c}d.numberOfSymbolInstances=(0,a.readUint32)(n,u),u+=4,s=[d,r.referredTo,n,u,i];break;case 16:const p={},g=n[u++];p.mmr=!!(1&g),p.template=g>>1&3,p.patternWidth=n[u++],p.patternHeight=n[u++],p.maxPatternIndex=(0,a.readUint32)(n,u),u+=4,s=[p,r.number,n,u,i];break;case 22:case 23:const m={};m.info=S(n,u),u+=x;const b=n[u++];m.mmr=!!(1&b),m.template=b>>1&3,m.enableSkip=!!(8&b),m.combinationOperator=b>>4&7,m.defaultPixelValue=b>>7&1,m.gridWidth=(0,a.readUint32)(n,u),u+=4,m.gridHeight=(0,a.readUint32)(n,u),u+=4,m.gridOffsetX=4294967295&(0,a.readUint32)(n,u),u+=4,m.gridOffsetY=4294967295&(0,a.readUint32)(n,u),u+=4,m.gridVectorX=(0,a.readUint16)(n,u),u+=2,m.gridVectorY=(0,a.readUint16)(n,u),u+=2,s=[m,r.referredTo,n,u,i];break;case 38:case 39:const y={};y.info=S(n,u),u+=x;const w=n[u++];if(y.mmr=!!(1&w),y.template=w>>1&3,y.prediction=!!(8&w),!y.mmr){for(h=0===y.template?4:1,c=[],l=0;h>l;l++)c.push({x:(0,a.readInt8)(n,u),y:(0,a.readInt8)(n,u+1)}),u+=2;y.at=c}s=[y,n,u,i];break;case 48:const v={width:(0,a.readUint32)(n,u),height:(0,a.readUint32)(n,u+4),resolutionX:(0,a.readUint32)(n,u+8),resolutionY:(0,a.readUint32)(n,u+12)};4294967295===v.height&&delete v.height;const A=n[u+16];(0,a.readUint16)(n,u+17),v.lossless=!!(1&A),v.refinement=!!(2&A),v.defaultPixelValue=A>>2&1,v.combinationOperator=A>>3&3,v.requiresBuffer=!!(32&A),v.combinationOperatorOverride=!!(64&A),s=[v];break;case 49:case 50:case 51:case 62:break;case 53:s=[r.number,n,u,i];break;default:throw new o(`segment type ${r.typeName}(${r.type}) is not implemented`)}const d="on"+r.typeName;d in t&&t[d].apply(t,s)}function k(e,t){for(let r=0,n=e.length;n>r;r++)A(e[r],t)}class C{onPageInformation(e){this.currentPageInfo=e;const t=new Uint8ClampedArray((e.width+7>>3)*e.height);e.defaultPixelValue&&t.fill(255),this.buffer=t}drawBitmap(e,t){const r=this.currentPageInfo,n=e.width,a=e.height,i=r.width+7>>3,s=r.combinationOperatorOverride?e.combinationOperator:r.combinationOperator,c=this.buffer,l=128>>(7&e.x);let h,u,d,f,p=e.y*i+(e.x>>3);switch(s){case 0:for(h=0;a>h;h++){for(d=l,f=p,u=0;n>u;u++)t[h][u]&&(c[f]|=d),d>>=1,d||(d=128,f++);p+=i}break;case 2:for(h=0;a>h;h++){for(d=l,f=p,u=0;n>u;u++)t[h][u]&&(c[f]^=d),d>>=1,d||(d=128,f++);p+=i}break;default:throw new o(`operator ${s} is not supported`)}}onImmediateGenericRegion(e,t,r,n){const a=e.info,i=new l(t,r,n),s=m(e.mmr,a.width,a.height,e.template,e.prediction,0,e.at,i);this.drawBitmap(a,s)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(e,t,r,n,i,s){let c,d;e.huffman&&(c=function(e,t,r){let n,a,i,s,c=0;switch(e.huffmanDHSelector){case 0:case 1:n=P(e.huffmanDHSelector+4);break;case 3:n=E(c,t,r),c++;break;default:throw new o("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:a=P(e.huffmanDWSelector+2);break;case 3:a=E(c,t,r),c++;break;default:throw new o("invalid Huffman DW selector")}return e.bitmapSizeSelector?(i=E(c,t,r),c++):i=P(1),s=e.aggregationInstancesSelector?E(c,t,r):P(1),{tableDeltaHeight:n,tableDeltaWidth:a,tableBitmapSize:i,tableAggregateInstances:s}}(e,r,this.customTables),d=new I(n,i,s));let f=this.symbols;f||(this.symbols=f={});const p=[];for(const e of r){const t=f[e];t&&p.push(...t)}const g=new l(n,i,s);f[t]=function(e,t,r,n,i,s,c,l,d,f,p,g){if(e&&t)throw new o("symbol refinement with Huffman is not supported");const w=[];let v=0,S=(0,a.log2)(r.length+n);const x=p.decoder,A=p.contextCache;let k,C;for(e&&(k=P(1),C=[],S=Math.max(S,1));n>w.length;){v+=e?s.tableDeltaHeight.decode(g):h(A,"IADH",x);let n=0,a=0;const i=e?C.length:0;for(;;){const i=e?s.tableDeltaWidth.decode(g):h(A,"IADW",x);if(null===i)break;let o;if(n+=i,a+=n,t){const a=h(A,"IAAI",x);if(a>1)o=y(e,t,n,v,0,a,1,r.concat(w),S,0,0,1,0,s,d,f,p,0,g);else{const e=u(A,x,S),t=h(A,"IARDX",x),a=h(A,"IARDY",x);o=b(n,v,d,r.length>e?r[e]:w[e-r.length],t,a,0,f,p)}w.push(o)}else e?C.push(n):(o=m(!1,n,v,c,!1,0,l,p),w.push(o))}if(e&&!t){const e=s.tableBitmapSize.decode(g);let t;if(g.byteAlign(),0===e)t=M(g,a,v);else{const r=g.end,n=g.position+e;g.end=n,t=R(g,a,v,!1),g.end=r,g.position=n}const r=C.length;if(i===r-1)w.push(t);else{let e,n,a,s,o,c=0;for(e=i;r>e;e++){for(s=C[e],a=c+s,o=[],n=0;v>n;n++)o.push(t[n].subarray(c,a));w.push(o),c=a}}}}const _=[],F=[];let T,O,I=!1;const E=r.length+n;for(;E>F.length;){let t=e?k.decode(g):h(A,"IAEX",x);for(;t--;)F.push(I);I=!I}for(T=0,O=r.length;O>T;T++)F[T]&&_.push(r[T]);for(let e=0;n>e;T++,e++)F[T]&&_.push(w[e]);return _}(e.huffman,e.refinement,p,e.numberOfNewSymbols,0,c,e.template,e.at,e.refinementTemplate,e.refinementAt,g,d)}onImmediateTextRegion(e,t,r,n,i){const s=e.info;let c,h;const u=this.symbols,d=[];for(const e of t){const t=u[e];t&&d.push(...t)}const f=(0,a.log2)(d.length);e.huffman&&(h=new I(r,n,i),c=function(e,t,r,n,a){const i=[];for(let e=0;34>=e;e++){const t=a.readBits(4);i.push(new _([e,t,0,0]))}const s=new T(i,!1);i.length=0;for(let e=0;n>e;){const t=s.decode(a);if(32>t)i.push(new _([e,t,0,0])),e++;else{let r,n,s;switch(t){case 32:if(0===e)throw new o("no previous value in symbol ID table");n=a.readBits(2)+3,r=i[e-1].prefixLength;break;case 33:n=a.readBits(3)+3,r=0;break;case 34:n=a.readBits(7)+11,r=0;break;default:throw new o("invalid code length in symbol ID table")}for(s=0;n>s;s++)i.push(new _([e,r,0,0])),e++}}a.byteAlign();const c=new T(i,!1);let l,h,u,d=0;switch(e.huffmanFS){case 0:case 1:l=P(e.huffmanFS+6);break;case 3:l=E(d,t,r),d++;break;default:throw new o("invalid Huffman FS selector")}switch(e.huffmanDS){case 0:case 1:case 2:h=P(e.huffmanDS+8);break;case 3:h=E(d,t,r),d++;break;default:throw new o("invalid Huffman DS selector")}switch(e.huffmanDT){case 0:case 1:case 2:u=P(e.huffmanDT+11);break;case 3:u=E(d,t,r),d++;break;default:throw new o("invalid Huffman DT selector")}if(e.refinement)throw new o("refinement with Huffman is not supported");return{symbolIDTable:c,tableFirstS:l,tableDeltaS:h,tableDeltaT:u}}(e,t,this.customTables,d.length,h));const p=new l(r,n,i),g=y(e.huffman,e.refinement,s.width,s.height,e.defaultPixelValue,e.numberOfSymbolInstances,e.stripSize,d,f,e.transposed,e.dsOffset,e.referenceCorner,e.combinationOperator,c,e.refinementTemplate,e.refinementAt,p,e.logStripSize,h);this.drawBitmap(s,g)}onImmediateLosslessTextRegion(){this.onImmediateTextRegion(...arguments)}onPatternDictionary(e,t,r,n,a){let i=this.patterns;i||(this.patterns=i={});const s=new l(r,n,a);i[t]=function(e,t,r,n,a,i){const s=[];e||(s.push({x:-t,y:0}),0===a&&s.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));const o=m(e,(n+1)*t,r,a,!1,0,s,i),c=[];for(let e=0;n>=e;e++){const n=[],a=t*e,i=a+t;for(let e=0;r>e;e++)n.push(o[e].subarray(a,i));c.push(n)}return c}(e.mmr,e.patternWidth,e.patternHeight,e.maxPatternIndex,e.template,s)}onImmediateHalftoneRegion(e,t,r,n,i){const s=this.patterns[t[0]],c=e.info,h=new l(r,n,i),u=function(e,t,r,n,i,s,c,l,h,u,d,f,p,g,b){if(c)throw new o("skip is not supported");if(0!==l)throw new o(`operator "${l}" is not supported in halftone region`);const y=[];let w,v,S;for(w=0;i>w;w++){if(S=new Uint8Array(n),s)for(v=0;n>v;v++)S[v]=s;y.push(S)}const x=t[0],A=x[0].length,k=x.length,C=(0,a.log2)(t.length),_=[];e||(_.push({x:r>1?2:3,y:-1}),0===r&&_.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));const F=[];let T,O,P,E,M,D,N,L,j,B,U;for(e&&(T=new I(b.data,b.start,b.end)),w=C-1;w>=0;w--)O=e?R(T,h,u,!0):m(!1,h,u,r,!1,0,_,b),F[w]=O;for(P=0;u>P;P++)for(E=0;h>E;E++){for(M=0,D=0,v=C-1;v>=0;v--)M^=F[v][P][E],D|=M<<v;if(N=t[D],L=d+P*g+E*p>>8,j=f+P*p-E*g>>8,0>L||L+A>n||0>j||j+k>i){let e,t;for(w=0;k>w;w++)if(t=j+w,t>=0&&i>t)for(U=y[t],B=N[w],v=0;A>v;v++)e=L+v,e>=0&&n>e&&(U[e]|=B[v])}else for(w=0;k>w;w++)for(U=y[j+w],B=N[w],v=0;A>v;v++)U[L+v]|=B[v]}return y}(e.mmr,s,e.template,c.width,c.height,e.defaultPixelValue,e.enableSkip,e.combinationOperator,e.gridWidth,e.gridHeight,e.gridOffsetX,e.gridOffsetY,e.gridVectorX,e.gridVectorY,h);this.drawBitmap(c,u)}onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion(...arguments)}onTables(e,t,r,n){let i=this.customTables;i||(this.customTables=i={}),i[e]=function(e,t,r){const n=e[t],i=4294967295&(0,a.readUint32)(e,t+1),s=4294967295&(0,a.readUint32)(e,t+5),o=new I(e,t+9,r),c=1+(n>>1&7),l=1+(n>>4&7),h=[];let u,d,f=i;do{u=o.readBits(c),d=o.readBits(l),h.push(new _([f,u,d,0])),f+=1<<d}while(s>f);return u=o.readBits(c),h.push(new _([i-1,u,32,0,"lower"])),u=o.readBits(c),h.push(new _([s,u,32,0])),1&n&&(u=o.readBits(c),h.push(new _([u,0]))),new T(h,!1)}(t,r,n)}}class _{constructor(e){2===e.length?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=e[0],this.rangeLength=0,this.prefixCode=e[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=e[0],this.prefixLength=e[1],this.rangeLength=e[2],this.prefixCode=e[3],this.isLowerRange="lower"===e[4])}}class F{constructor(e){this.children=[],e?(this.isLeaf=!0,this.rangeLength=e.rangeLength,this.rangeLow=e.rangeLow,this.isLowerRange=e.isLowerRange,this.isOOB=e.isOOB):this.isLeaf=!1}buildTree(e,t){const r=e.prefixCode>>t&1;if(t>0){let n=this.children[r];n||(this.children[r]=n=new F(null)),n.buildTree(e,t-1)}else this.children[r]=new F(e)}decodeNode(e){if(this.isLeaf){if(this.isOOB)return null;const t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}const t=this.children[e.readBit()];if(!t)throw new o("invalid Huffman data");return t.decodeNode(e)}}class T{constructor(e,t){t||this.assignPrefixCodes(e),this.rootNode=new F(null);for(let t=0,r=e.length;r>t;t++){const r=e[t];r.prefixLength>0&&this.rootNode.buildTree(r,r.prefixLength-1)}}decode(e){return this.rootNode.decodeNode(e)}assignPrefixCodes(e){const t=e.length;let r=0;for(let n=0;t>n;n++)r=Math.max(r,e[n].prefixLength);const n=new Uint32Array(r+1);for(let r=0;t>r;r++)n[e[r].prefixLength]++;let a,i,s,o=1,c=0;for(n[0]=0;r>=o;){for(c=c+n[o-1]<<1,a=c,i=0;t>i;)s=e[i],s.prefixLength===o&&(s.prefixCode=a,a++),i++;o++}}}const O={};function P(e){let t,r=O[e];if(r)return r;switch(e){case 1:t=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:t=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:t=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:t=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:t=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:t=[[-2048,5,10,28],[-1024,4,9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:t=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:t=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:t=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:t=[[-21,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:t=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:t=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28],[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:t=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:t=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:t=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new o(`standard table B.${e} does not exist`)}for(let e=0,r=t.length;r>e;e++)t[e]=new _(t[e]);return r=new T(t,!0),O[e]=r,r}class I{constructor(e,t,r){this.data=e,this.start=t,this.end=r,this.position=t,this.shift=-1,this.currentByte=0}readBit(){if(0>this.shift){if(this.position>=this.end)throw new o("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}const e=this.currentByte>>this.shift&1;return this.shift--,e}readBits(e){let t,r=0;for(t=e-1;t>=0;t--)r|=this.readBit()<<t;return r}byteAlign(){this.shift=-1}next(){return this.end>this.position?this.data[this.position++]:-1}}function E(e,t,r){let n=0;for(let a=0,i=t.length;i>a;a++){const i=r[t[a]];if(i){if(e===n)return i;n++}}throw new o("can't find custom Huffman table")}function M(e,t,r){const n=[];for(let a=0;r>a;a++){const r=new Uint8Array(t);n.push(r);for(let n=0;t>n;n++)r[n]=e.readBit();e.byteAlign()}return n}function R(e,t,r,n){const a=new s.CCITTFaxDecoder(e,{K:-1,Columns:t,Rows:r,BlackIs1:!0,EndOfBlock:n}),i=[];let o,c=!1;for(let e=0;r>e;e++){const e=new Uint8Array(t);i.push(e);let r=-1;for(let n=0;t>n;n++)0>r&&(o=a.readNextChar(),-1===o&&(o=0,c=!0),r=7),e[n]=o>>r&1,r--}if(n&&!c){const e=5;for(let t=0;e>t&&-1!==a.readNextChar();t++);}return i}t.Jbig2Image=class{parseChunks(e){return function(e){const t=new C;for(let r=0,n=e.length;n>r;r++){const n=e[r];k(v({},n.data,n.start,n.end),t)}return t.buffer}(e)}parse(e){throw Error("Not implemented: Jbig2Image.parse")}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArithmeticDecoder=void 0;const r=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];t.ArithmeticDecoder=class{constructor(e,t,r){this.data=e,this.bp=t,this.dataEnd=r,this.chigh=e[t],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}byteIn(){const e=this.data;let t=this.bp;255===e[t]?e[t+1]>143?(this.clow+=65280,this.ct=8):(t++,this.clow+=e[t]<<9,this.ct=7,this.bp=t):(t++,this.clow+=this.dataEnd>t?e[t]<<8:65280,this.ct=8,this.bp=t),this.clow>65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}readBit(e,t){let n=e[t]>>1,a=1&e[t];const i=r[n],s=i.qe;let o,c=this.a-s;if(s>this.chigh)s>c?(c=s,o=a,n=i.nmps):(c=s,o=1^a,1===i.switchFlag&&(a=o),n=i.nlps);else{if(this.chigh-=s,32768&c)return this.a=c,a;s>c?(o=1^a,1===i.switchFlag&&(a=o),n=i.nlps):(o=a,n=i.nmps)}do{0===this.ct&&this.byteIn(),c<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--}while(!(32768&c));return this.a=c,e[t]=n<<1|a,o}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JpegStream=void 0;var n=r(19),a=r(5),i=r(28),s=r(2);t.JpegStream=class extends n.DecodeStream{constructor(e,t,r){let n;for(;-1!==(n=e.getByte());)if(255===n){e.skip(-1);break}super(t),this.stream=e,this.dict=e.dict,this.maybeLength=t,this.params=r}get bytes(){return(0,s.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){if(this.eof)return;const e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray("D","Decode");if(this.forceRGB&&Array.isArray(t)){const r=this.dict.get("BPC","BitsPerComponent")||8,n=t.length,a=new Int32Array(n);let i=!1;const s=(1<<r)-1;for(let e=0;n>e;e+=2)a[e]=256*(t[e+1]-t[e])|0,a[e+1]=t[e]*s|0,256===a[e]&&0===a[e+1]||(i=!0);i&&(e.decodeTransform=a)}if(this.params instanceof a.Dict){const t=this.params.get("ColorTransform");Number.isInteger(t)&&(e.colorTransform=t)}const r=new i.JpegImage(e);r.parse(this.bytes);const n=r.getData({width:this.drawWidth,height:this.drawHeight,forceRGB:this.forceRGB,isSourcePDF:!0});this.buffer=n,this.bufferLength=n.length,this.eof=!0}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JpegImage=void 0;var n=r(2),a=r(6);class i extends n.BaseException{constructor(e){super("JPEG error: "+e,"JpegError")}}class s extends n.BaseException{constructor(e,t){super(e,"DNLMarkerError"),this.scanLines=t}}class o extends n.BaseException{constructor(e){super(e,"EOIMarkerError")}}const c=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),l=4017,h=799,u=3406,d=2276,f=1567,p=3784,g=5793,m=2896;function b(e,t){let r,n,a=0,i=16;for(;i>0&&!e[i-1];)i--;const s=[{children:[],index:0}];let o,c=s[0];for(r=0;i>r;r++){for(n=0;e[r]>n;n++){for(c=s.pop(),c.children[c.index]=t[a];c.index>0;)c=s.pop();for(c.index++,s.push(c);r>=s.length;)s.push(o={children:[],index:0}),c.children[c.index]=o.children,c=o;a++}i>r+1&&(s.push(o={children:[],index:0}),c.children[c.index]=o.children,c=o)}return s[0].children}function y(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function w(e,t,r,l,h,u,d,f,p,g=!1){const m=r.mcusPerLine,b=t;let w=0,v=0;function S(){if(v>0)return v--,w>>v&1;if(w=e[t++],255===w){const n=e[t++];if(n){if(220===n&&g){const n=(0,a.readUint16)(e,t+=2);if(t+=2,n>0&&n!==r.scanLines)throw new s("Found DNL marker (0xFFDC) while parsing scan data",n)}else if(217===n){if(g){const e=O*(8===r.precision?8:0);if(e>0&&Math.round(r.scanLines/e)>=10)throw new s("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",e)}throw new o("Found EOI marker (0xFFD9) while parsing scan data")}throw new i("unexpected marker "+(w<<8|n).toString(16))}}return v=7,w>>>7}function A(e){let t=e;for(;;){switch(t=t[S()],typeof t){case"number":return t;case"object":continue}throw new i("invalid huffman sequence")}}function k(e){let t=0;for(;e>0;)t=t<<1|S(),e--;return t}function C(e){if(1===e)return 1===S()?1:-1;const t=k(e);return 1<<e-1>t?t+(-1<<e)+1:t}let _,F=0,T=0,O=0;function P(e,t,r,n,a){O=(r/m|0)*e.v+n,t(e,y(e,O,r%m*e.h+a))}function I(e,t,r){O=r/e.blocksPerLine|0,t(e,y(e,O,r%e.blocksPerLine))}const E=l.length;let M,R,D,N,L,j;j=r.progressive?0===u?0===f?function(e,t){const r=A(e.huffmanTableDC),n=0===r?0:C(r)<<p;e.blockData[t]=e.pred+=n}:function(e,t){e.blockData[t]|=S()<<p}:0===f?function(e,t){if(F>0)return void F--;let r=u;const n=d;for(;n>=r;){const n=A(e.huffmanTableAC),a=15&n,i=n>>4;if(0!==a)r+=i,e.blockData[t+c[r]]=C(a)*(1<<p),r++;else{if(15>i){F=k(i)+(1<<i)-1;break}r+=16}}}:function(e,t){let r=u;const n=d;let a,s,o=0;for(;n>=r;){const n=t+c[r],l=0>e.blockData[n]?-1:1;switch(T){case 0:if(s=A(e.huffmanTableAC),a=15&s,o=s>>4,0===a)15>o?(F=k(o)+(1<<o),T=4):(o=16,T=1);else{if(1!==a)throw new i("invalid ACn encoding");_=C(a),T=o?2:3}continue;case 1:case 2:e.blockData[n]?e.blockData[n]+=l*(S()<<p):(o--,0===o&&(T=2===T?3:0));break;case 3:e.blockData[n]?e.blockData[n]+=l*(S()<<p):(e.blockData[n]=_<<p,T=0);break;case 4:e.blockData[n]&&(e.blockData[n]+=l*(S()<<p))}r++}4===T&&(F--,0===F&&(T=0))}:function(e,t){const r=A(e.huffmanTableDC),n=0===r?0:C(r);e.blockData[t]=e.pred+=n;let a=1;for(;64>a;){const r=A(e.huffmanTableAC),n=15&r,i=r>>4;if(0!==n)a+=i,e.blockData[t+c[a]]=C(n),a++;else{if(15>i)break;a+=16}}};let B,U,$,q,X=0;for(U=1===E?l[0].blocksPerLine*l[0].blocksPerColumn:m*r.mcusPerColumn;U>=X;){const r=h?Math.min(U-X,h):U;if(r>0){for(R=0;E>R;R++)l[R].pred=0;if(F=0,1===E)for(M=l[0],L=0;r>L;L++)I(M,j,X),X++;else for(L=0;r>L;L++){for(R=0;E>R;R++)for(M=l[R],$=M.h,q=M.v,D=0;q>D;D++)for(N=0;$>N;N++)P(M,j,X,D,N);X++}}if(v=0,B=x(e,t),!B)break;if(B.invalid&&((0,n.warn)(`decodeScan - ${r>0?"unexpected":"excessive"} MCU data, current marker is: ${B.invalid}`),t=B.offset),65488>B.marker||B.marker>65495)break;t+=2}return t-b}function v(e,t,r){const n=e.quantizationTable,a=e.blockData;let s,o,c,b,y,w,v,S,x,A,k,C,_,F,T,O,P;if(!n)throw new i("missing required Quantization Table.");for(let e=0;64>e;e+=8)x=a[t+e],A=a[t+e+1],k=a[t+e+2],C=a[t+e+3],_=a[t+e+4],F=a[t+e+5],T=a[t+e+6],O=a[t+e+7],x*=n[e],A|k|C|_|F|T|O?(A*=n[e+1],k*=n[e+2],C*=n[e+3],_*=n[e+4],F*=n[e+5],T*=n[e+6],O*=n[e+7],s=g*x+128>>8,o=g*_+128>>8,c=k,b=T,y=m*(A-O)+128>>8,S=m*(A+O)+128>>8,w=C<<4,v=F<<4,s=s+o+1>>1,o=s-o,P=c*p+b*f+128>>8,c=c*f-b*p+128>>8,b=P,y=y+v+1>>1,v=y-v,S=S+w+1>>1,w=S-w,s=s+b+1>>1,b=s-b,o=o+c+1>>1,c=o-c,P=y*d+S*u+2048>>12,y=y*u-S*d+2048>>12,S=P,P=w*h+v*l+2048>>12,w=w*l-v*h+2048>>12,v=P,r[e]=s+S,r[e+7]=s-S,r[e+1]=o+v,r[e+6]=o-v,r[e+2]=c+w,r[e+5]=c-w,r[e+3]=b+y,r[e+4]=b-y):(P=g*x+512>>10,r[e]=P,r[e+1]=P,r[e+2]=P,r[e+3]=P,r[e+4]=P,r[e+5]=P,r[e+6]=P,r[e+7]=P);for(let e=0;8>e;++e)x=r[e],A=r[e+8],k=r[e+16],C=r[e+24],_=r[e+32],F=r[e+40],T=r[e+48],O=r[e+56],A|k|C|_|F|T|O?(s=g*x+2048>>12,o=g*_+2048>>12,c=k,b=T,y=m*(A-O)+2048>>12,S=m*(A+O)+2048>>12,w=C,v=F,s=4112+(s+o+1>>1),o=s-o,P=c*p+b*f+2048>>12,c=c*f-b*p+2048>>12,b=P,y=y+v+1>>1,v=y-v,S=S+w+1>>1,w=S-w,s=s+b+1>>1,b=s-b,o=o+c+1>>1,c=o-c,P=y*d+S*u+2048>>12,y=y*u-S*d+2048>>12,S=P,P=w*h+v*l+2048>>12,w=w*l-v*h+2048>>12,v=P,x=s+S,O=s-S,A=o+v,T=o-v,k=c+w,F=c-w,C=b+y,_=b-y,16>x?x=0:4080>x?x>>=4:x=255,16>A?A=0:4080>A?A>>=4:A=255,16>k?k=0:4080>k?k>>=4:k=255,16>C?C=0:4080>C?C>>=4:C=255,16>_?_=0:4080>_?_>>=4:_=255,16>F?F=0:4080>F?F>>=4:F=255,16>T?T=0:4080>T?T>>=4:T=255,16>O?O=0:4080>O?O>>=4:O=255,a[t+e]=x,a[t+e+8]=A,a[t+e+16]=k,a[t+e+24]=C,a[t+e+32]=_,a[t+e+40]=F,a[t+e+48]=T,a[t+e+56]=O):(P=g*x+8192>>14,P=-2040>P?0:2024>P?P+2056>>4:255,a[t+e]=P,a[t+e+8]=P,a[t+e+16]=P,a[t+e+24]=P,a[t+e+32]=P,a[t+e+40]=P,a[t+e+48]=P,a[t+e+56]=P)}function S(e,t){const r=t.blocksPerLine,n=t.blocksPerColumn,a=new Int16Array(64);for(let e=0;n>e;e++)for(let n=0;r>n;n++)v(t,y(t,e,n),a);return t.blockData}function x(e,t,r=t){const n=e.length-1;let i=t>r?r:t;if(t>=n)return null;const s=(0,a.readUint16)(e,t);if(s>=65472&&65534>=s)return{invalid:null,marker:s,offset:t};let o=(0,a.readUint16)(e,i);for(;65472>o||o>65534;){if(++i>=n)return null;o=(0,a.readUint16)(e,i)}return{invalid:s.toString(16),marker:o,offset:i}}t.JpegImage=class{constructor({decodeTransform:e=null,colorTransform:t=-1}={}){this._decodeTransform=e,this._colorTransform=t}parse(e,{dnlScanLines:t=null}={}){function r(){const t=(0,a.readUint16)(e,d);d+=2;let r=d+t-2;const i=x(e,r,d);i&&i.invalid&&((0,n.warn)("readDataBlock - incorrect length, current marker is: "+i.invalid),r=i.offset);const s=e.subarray(d,r);return d+=s.length,s}function l(e){const t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV);for(let n=0,a=e.components.length;a>n;n++){const a=e.components[n],i=Math.ceil(Math.ceil(e.samplesPerLine/8)*a.h/e.maxH),s=Math.ceil(Math.ceil(e.scanLines/8)*a.v/e.maxV);a.blockData=new Int16Array(r*a.v*64*(t*a.h+1)),a.blocksPerLine=i,a.blocksPerColumn=s}e.mcusPerLine=t,e.mcusPerColumn=r}let h,u,d=0,f=null,p=null,g=0;const m=[],y=[],v=[];let A=(0,a.readUint16)(e,d);if(d+=2,65496!==A)throw new i("SOI not found");A=(0,a.readUint16)(e,d),d+=2;e:for(;65497!==A;){let S,k,C;switch(A){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:const _=r();65504===A&&74===_[0]&&70===_[1]&&73===_[2]&&70===_[3]&&0===_[4]&&(f={version:{major:_[5],minor:_[6]},densityUnits:_[7],xDensity:_[8]<<8|_[9],yDensity:_[10]<<8|_[11],thumbWidth:_[12],thumbHeight:_[13],thumbData:_.subarray(14,14+3*_[12]*_[13])}),65518===A&&65===_[0]&&100===_[1]&&111===_[2]&&98===_[3]&&101===_[4]&&(p={version:_[5]<<8|_[6],flags0:_[7]<<8|_[8],flags1:_[9]<<8|_[10],transformCode:_[11]});break;case 65499:const F=(0,a.readUint16)(e,d);d+=2;const T=F+d-2;let O;for(;T>d;){const t=e[d++],r=new Uint16Array(64);if(t>>4){if(t>>4!=1)throw new i("DQT - invalid table spec");for(k=0;64>k;k++)O=c[k],r[O]=(0,a.readUint16)(e,d),d+=2}else for(k=0;64>k;k++)O=c[k],r[O]=e[d++];m[15&t]=r}break;case 65472:case 65473:case 65474:if(h)throw new i("Only single frame JPEGs supported");d+=2,h={},h.extended=65473===A,h.progressive=65474===A,h.precision=e[d++];const P=(0,a.readUint16)(e,d);d+=2,h.scanLines=t||P,h.samplesPerLine=(0,a.readUint16)(e,d),d+=2,h.components=[],h.componentIds={};const I=e[d++];let E=0,M=0;for(S=0;I>S;S++){const t=e[d],r=e[d+1]>>4,n=15&e[d+1];r>E&&(E=r),n>M&&(M=n),C=h.components.push({h:r,v:n,quantizationId:e[d+2],quantizationTable:null}),h.componentIds[t]=C-1,d+=3}h.maxH=E,h.maxV=M,l(h);break;case 65476:const R=(0,a.readUint16)(e,d);for(d+=2,S=2;R>S;){const t=e[d++],r=new Uint8Array(16);let n=0;for(k=0;16>k;k++,d++)n+=r[k]=e[d];const a=new Uint8Array(n);for(k=0;n>k;k++,d++)a[k]=e[d];S+=17+n,(t>>4?y:v)[15&t]=b(r,a)}break;case 65501:d+=2,u=(0,a.readUint16)(e,d),d+=2;break;case 65498:const D=1==++g&&!t;d+=2;const N=e[d++],L=[];for(S=0;N>S;S++){const t=e[d++],r=h.components[h.componentIds[t]];r.index=t;const n=e[d++];r.huffmanTableDC=v[n>>4],r.huffmanTableAC=y[15&n],L.push(r)}const j=e[d++],B=e[d++],U=e[d++];try{const t=w(e,d,h,L,u,j,B,U>>4,15&U,D);d+=t}catch(t){if(t instanceof s)return(0,n.warn)(t.message+" -- attempting to re-parse the JPEG image."),this.parse(e,{dnlScanLines:t.scanLines});if(t instanceof o){(0,n.warn)(t.message+" -- ignoring the rest of the image data.");break e}throw t}break;case 65500:d+=4;break;case 65535:255!==e[d]&&d--;break;default:const $=x(e,d-2,d-3);if($&&$.invalid){(0,n.warn)("JpegImage.parse - unexpected data, current marker is: "+$.invalid),d=$.offset;break}if(!$||d>=e.length-1){(0,n.warn)("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new i("JpegImage.parse - unknown marker: "+A.toString(16))}A=(0,a.readUint16)(e,d),d+=2}this.width=h.samplesPerLine,this.height=h.scanLines,this.jfif=f,this.adobe=p,this.components=[];for(let e=0,t=h.components.length;t>e;e++){const t=h.components[e],r=m[t.quantizationId];r&&(t.quantizationTable=r),this.components.push({index:t.index,output:S(0,t),scaleX:t.h/h.maxH,scaleY:t.v/h.maxV,blocksPerLine:t.blocksPerLine,blocksPerColumn:t.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(e,t,r=!1){const n=this.width/e,a=this.height/t;let i,s,o,c,l,h,u,d,f,p,g,m=0;const b=this.components.length,y=e*t*b,w=new Uint8ClampedArray(y),v=new Uint32Array(e),S=4294967288;let x;for(u=0;b>u;u++){if(i=this.components[u],s=i.scaleX*n,o=i.scaleY*a,m=u,g=i.output,c=i.blocksPerLine+1<<3,s!==x){for(l=0;e>l;l++)d=0|l*s,v[l]=(d&S)<<3|7&d;x=s}for(h=0;t>h;h++)for(d=0|h*o,p=c*(d&S)|(7&d)<<3,l=0;e>l;l++)w[m]=g[p+v[l]],m+=b}let A=this._decodeTransform;if(r||4!==b||A||(A=new Int32Array([-256,255,-256,255,-256,255,-256,255])),A)for(u=0;y>u;)for(d=0,f=0;b>d;d++,u++,f+=2)w[u]=(w[u]*A[f]>>8)+A[f+1];return w}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}_convertYccToRgb(e){let t,r,n;for(let a=0,i=e.length;i>a;a+=3)t=e[a],r=e[a+1],n=e[a+2],e[a]=t-179.456+1.402*n,e[a+1]=t+135.459-.344*r-.714*n,e[a+2]=t-226.816+1.772*r;return e}_convertYcckToRgb(e){let t,r,n,a,i=0;for(let s=0,o=e.length;o>s;s+=4)t=e[s],r=e[s+1],n=e[s+2],a=e[s+3],e[i++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*a-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*a+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*a+.48357088451265)+a*(-.000336197177618394*a+.484791561490776),e[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*a-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*a-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*a+.25802910206845)+a*(-.000318913117588328*a-.213742400323665),e[i++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*a+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*a-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*a+.116935020465145)+a*(-.000343531996510555*a+.24165260232407);return e.subarray(0,i)}_convertYcckToCmyk(e){let t,r,n;for(let a=0,i=e.length;i>a;a+=4)t=e[a],r=e[a+1],n=e[a+2],e[a]=434.456-t-1.402*n,e[a+1]=119.541-t+.344*r+.714*n,e[a+2]=481.816-t-1.772*r;return e}_convertCmykToRgb(e){let t,r,n,a,i=0;for(let s=0,o=e.length;o>s;s+=4)t=e[s],r=e[s+1],n=e[s+2],a=e[s+3],e[i++]=255+t*(-6747147073602441e-20*t+.0008379262121013727*r+.0002894718188643294*n+.003264231057537806*a-1.1185611867203937)+r*(26374107616089405e-21*r-8626949158638572e-20*n-.0002748769067499491*a-.02155688794978967)+n*(-3878099212869363e-20*n-.0003267808279485286*a+.0686742238595345)-a*(.0003361971776183937*a+.7430659151342254),e[i++]=255+t*(.00013596372813588848*t+.000924537132573585*r+.00010567359618683593*n+.0004791864687436512*a-.3109689587515875)+r*(-.00023545346108370344*r+.0002702845253534714*n+.0020200308977307156*a-.7488052167015494)+n*(6834815998235662e-20*n+.00015168452363460973*a-.09751927774728933)-a*(.0003189131175883281*a+.7364883807733168),e[i++]=255+t*(13598650411385307e-21*t+.00012423956175490851*r+.0004751985097583589*n-36729317476630422e-22*a-.05562186980264034)+r*(.00016141380598724676*r+.0009692239130725186*n+.0007782692450036253*a-.44015232367526463)+n*(5.068882914068769e-7*n+.0017778369011375071*a-.7591454649749609)-a*(.0003435319965105553*a+.7063770186160144);return e.subarray(0,i)}getData({width:e,height:t,forceRGB:r=!1,isSourcePDF:n=!1}){if(this.numComponents>4)throw new i("Unsupported color mode");const a=this._getLinearizedBlockData(e,t,n);if(1===this.numComponents&&r){const e=a.length,t=new Uint8ClampedArray(3*e);let r=0;for(let n=0;e>n;n++){const e=a[n];t[r++]=e,t[r++]=e,t[r++]=e}return t}if(3===this.numComponents&&this._isColorConversionNeeded)return this._convertYccToRgb(a);if(4===this.numComponents){if(this._isColorConversionNeeded)return r?this._convertYcckToRgb(a):this._convertYcckToCmyk(a);if(r)return this._convertCmykToRgb(a)}return a}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JpxStream=void 0;var n=r(19),a=r(30),i=r(2);t.JpxStream=class extends n.DecodeStream{constructor(e,t,r){super(t),this.stream=e,this.dict=e.dict,this.maybeLength=t,this.params=r}get bytes(){return(0,i.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){if(this.eof)return;const e=new a.JpxImage;e.parse(this.bytes);const t=e.width,r=e.height,n=e.componentsCount,i=e.tiles.length;if(1===i)this.buffer=e.tiles[0].items;else{const a=new Uint8ClampedArray(t*r*n);for(let r=0;i>r;r++){const i=e.tiles[r],s=i.height,o=i.items;let c=0,l=(t*i.top+i.left)*n;const h=t*n,u=i.width*n;for(let e=0;s>e;e++){const e=o.subarray(c,c+u);a.set(e,l),c+=u,l+=h}}this.buffer=a}this.bufferLength=this.buffer.length,this.eof=!0}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JpxImage=void 0;var n=r(2),a=r(6),i=r(26);class s extends n.BaseException{constructor(e){super("JPX error: "+e,"JpxError")}}const o={LL:0,LH:1,HL:1,HH:2};function c(e,t){e.x0=Math.ceil(t.XOsiz/e.XRsiz),e.x1=Math.ceil(t.Xsiz/e.XRsiz),e.y0=Math.ceil(t.YOsiz/e.YRsiz),e.y1=Math.ceil(t.Ysiz/e.YRsiz),e.width=e.x1-e.x0,e.height=e.y1-e.y0}function l(e,t){const r=e.SIZ,n=[];let a;const i=Math.ceil((r.Xsiz-r.XTOsiz)/r.XTsiz),s=Math.ceil((r.Ysiz-r.YTOsiz)/r.YTsiz);for(let e=0;s>e;e++)for(let t=0;i>t;t++)a={},a.tx0=Math.max(r.XTOsiz+t*r.XTsiz,r.XOsiz),a.ty0=Math.max(r.YTOsiz+e*r.YTsiz,r.YOsiz),a.tx1=Math.min(r.XTOsiz+(t+1)*r.XTsiz,r.Xsiz),a.ty1=Math.min(r.YTOsiz+(e+1)*r.YTsiz,r.Ysiz),a.width=a.tx1-a.tx0,a.height=a.ty1-a.ty0,a.components=[],n.push(a);e.tiles=n;for(let e=0,i=r.Csiz;i>e;e++){const r=t[e];for(let t=0,i=n.length;i>t;t++){const i={};a=n[t],i.tcx0=Math.ceil(a.tx0/r.XRsiz),i.tcy0=Math.ceil(a.ty0/r.YRsiz),i.tcx1=Math.ceil(a.tx1/r.XRsiz),i.tcy1=Math.ceil(a.ty1/r.YRsiz),i.width=i.tcx1-i.tcx0,i.height=i.tcy1-i.tcy0,a.components[e]=i}}}function h(e,t,r){const n=t.codingStyleParameters,a={};return n.entropyCoderWithCustomPrecincts?(a.PPx=n.precinctsSizes[r].PPx,a.PPy=n.precinctsSizes[r].PPy):(a.PPx=15,a.PPy=15),a.xcb_=Math.min(n.xcb,r>0?a.PPx-1:a.PPx),a.ycb_=Math.min(n.ycb,r>0?a.PPy-1:a.PPy),a}function u(e,t,r){const n=1<<r.PPx,a=1<<r.PPy,i=0===t.resLevel,s=1<<r.PPx+(i?0:-1),o=1<<r.PPy+(i?0:-1),c=t.trx1>t.trx0?Math.ceil(t.trx1/n)-Math.floor(t.trx0/n):0,l=t.try1>t.try0?Math.ceil(t.try1/a)-Math.floor(t.try0/a):0;t.precinctParameters={precinctWidth:n,precinctHeight:a,numprecinctswide:c,numprecinctshigh:l,numprecincts:c*l,precinctWidthInSubband:s,precinctHeightInSubband:o}}function d(e,t,r){const n=r.xcb_,a=r.ycb_,i=1<<n,s=1<<a,o=t.tbx0>>n,c=t.tby0>>a,l=t.tbx1+i-1>>n,h=t.tby1+s-1>>a,u=t.resolution.precinctParameters,d=[],f=[];let p,g,m,b;for(g=c;h>g;g++)for(p=o;l>p;p++){if(m={cbx:p,cby:g,tbx0:i*p,tby0:s*g,tbx1:i*(p+1),tby1:s*(g+1)},m.tbx0_=Math.max(t.tbx0,m.tbx0),m.tby0_=Math.max(t.tby0,m.tby0),m.tbx1_=Math.min(t.tbx1,m.tbx1),m.tby1_=Math.min(t.tby1,m.tby1),b=Math.floor((m.tbx0_-t.tbx0)/u.precinctWidthInSubband)+Math.floor((m.tby0_-t.tby0)/u.precinctHeightInSubband)*u.numprecinctswide,m.precinctNumber=b,m.subbandType=t.type,m.Lblock=3,m.tbx0_>=m.tbx1_||m.tby0_>=m.tby1_)continue;d.push(m);let e=f[b];void 0!==e?(e.cbxMin>p?e.cbxMin=p:p>e.cbxMax&&(e.cbxMax=p),e.cbyMin>g?e.cbxMin=g:g>e.cbyMax&&(e.cbyMax=g)):f[b]=e={cbxMin:p,cbyMin:g,cbxMax:p,cbyMax:g},m.precinct=e}t.codeblockParameters={codeblockWidth:n,codeblockHeight:a,numcodeblockwide:l-o+1,numcodeblockhigh:h-c+1},t.codeblocks=d,t.precincts=f}function f(e,t,r){const n=[],a=e.subbands;for(let e=0,r=a.length;r>e;e++){const r=a[e].codeblocks;for(let e=0,a=r.length;a>e;e++){const a=r[e];a.precinctNumber===t&&n.push(a)}}return{layerNumber:r,codeblocks:n}}function p(e){const t=e.tiles[e.currentTile.index],r=t.codingStyleDefaultParameters.layersCount,n=e.SIZ.Csiz;let a=0;for(let e=0;n>e;e++)a=Math.max(a,t.components[e].codingStyleParameters.decompositionLevelsCount);let i=0,o=0,c=0,l=0;this.nextPacket=function(){for(;r>i;i++){for(;a>=o;o++){for(;n>c;c++){const e=t.components[c];if(o>e.codingStyleParameters.decompositionLevelsCount)continue;const r=e.resolutions[o],n=r.precinctParameters.numprecincts;for(;n>l;){const e=f(r,l,i);return l++,e}l=0}c=0}o=0}throw new s("Out of packets")}}function g(e){const t=e.tiles[e.currentTile.index],r=t.codingStyleDefaultParameters.layersCount,n=e.SIZ.Csiz;let a=0;for(let e=0;n>e;e++)a=Math.max(a,t.components[e].codingStyleParameters.decompositionLevelsCount);let i=0,o=0,c=0,l=0;this.nextPacket=function(){for(;a>=i;i++){for(;r>o;o++){for(;n>c;c++){const e=t.components[c];if(i>e.codingStyleParameters.decompositionLevelsCount)continue;const r=e.resolutions[i],n=r.precinctParameters.numprecincts;for(;n>l;){const e=f(r,l,o);return l++,e}l=0}c=0}o=0}throw new s("Out of packets")}}function m(e){const t=e.tiles[e.currentTile.index],r=t.codingStyleDefaultParameters.layersCount,n=e.SIZ.Csiz;let a,i,o,c,l=0;for(o=0;n>o;o++)l=Math.max(l,t.components[o].codingStyleParameters.decompositionLevelsCount);const h=new Int32Array(l+1);for(i=0;l>=i;++i){let e=0;for(o=0;n>o;++o){const r=t.components[o].resolutions;r.length>i&&(e=Math.max(e,r[i].precinctParameters.numprecincts))}h[i]=e}a=0,i=0,o=0,c=0,this.nextPacket=function(){for(;l>=i;i++){for(;h[i]>c;c++){for(;n>o;o++){const e=t.components[o];if(i>e.codingStyleParameters.decompositionLevelsCount)continue;const n=e.resolutions[i];if(n.precinctParameters.numprecincts>c){for(;r>a;){const e=f(n,c,a);return a++,e}a=0}}o=0}c=0}throw new s("Out of packets")}}function b(e){const t=e.tiles[e.currentTile.index],r=t.codingStyleDefaultParameters.layersCount,n=e.SIZ.Csiz,a=v(t),i=a;let o=0,c=0,l=0,h=0,u=0;this.nextPacket=function(){for(;i.maxNumHigh>u;u++){for(;i.maxNumWide>h;h++){for(;n>l;l++){const e=t.components[l],n=e.codingStyleParameters.decompositionLevelsCount;for(;n>=c;c++){const t=e.resolutions[c],n=w(h,u,a.components[l].resolutions[c],i,t);if(null!==n){for(;r>o;){const e=f(t,n,o);return o++,e}o=0}}c=0}l=0}h=0}throw new s("Out of packets")}}function y(e){const t=e.tiles[e.currentTile.index],r=t.codingStyleDefaultParameters.layersCount,n=e.SIZ.Csiz,a=v(t);let i=0,o=0,c=0,l=0,h=0;this.nextPacket=function(){for(;n>c;++c){const e=t.components[c],n=a.components[c],s=e.codingStyleParameters.decompositionLevelsCount;for(;n.maxNumHigh>h;h++){for(;n.maxNumWide>l;l++){for(;s>=o;o++){const t=e.resolutions[o],a=w(l,h,n.resolutions[o],n,t);if(null!==a){for(;r>i;){const e=f(t,a,i);return i++,e}i=0}}o=0}l=0}h=0}throw new s("Out of packets")}}function w(e,t,r,n,a){const i=e*n.minWidth,s=t*n.minHeight;return i%r.width!=0||s%r.height!=0?null:i/r.height+s/r.width*a.precinctParameters.numprecinctswide}function v(e){const t=e.components.length;let r=Number.MAX_VALUE,n=Number.MAX_VALUE,a=0,i=0;const s=Array(t);for(let o=0;t>o;o++){const t=e.components[o],c=t.codingStyleParameters.decompositionLevelsCount,l=Array(c+1);let h=Number.MAX_VALUE,u=Number.MAX_VALUE,d=0,f=0,p=1;for(let e=c;e>=0;--e){const r=t.resolutions[e],n=p*r.precinctParameters.precinctWidth,a=p*r.precinctParameters.precinctHeight;h=Math.min(h,n),u=Math.min(u,a),d=Math.max(d,r.precinctParameters.numprecinctswide),f=Math.max(f,r.precinctParameters.numprecinctshigh),l[e]={width:n,height:a},p<<=1}r=Math.min(r,h),n=Math.min(n,u),a=Math.max(a,d),i=Math.max(i,f),s[o]={resolutions:l,minWidth:h,minHeight:u,maxNumWide:d,maxNumHigh:f}}return{components:s,minWidth:r,minHeight:n,maxNumWide:a,maxNumHigh:i}}function S(e){const t=e.tiles[e.currentTile.index],r=e.SIZ.Csiz;for(let e=0;r>e;e++){const r=t.components[e],n=r.codingStyleParameters.decompositionLevelsCount,a=[],i=[];for(let e=0;n>=e;e++){const t=h(0,r,e),s={},o=1<<n-e;let c;if(s.trx0=Math.ceil(r.tcx0/o),s.try0=Math.ceil(r.tcy0/o),s.trx1=Math.ceil(r.tcx1/o),s.try1=Math.ceil(r.tcy1/o),s.resLevel=e,u(0,s,t),a.push(s),0===e)c={},c.type="LL",c.tbx0=Math.ceil(r.tcx0/o),c.tby0=Math.ceil(r.tcy0/o),c.tbx1=Math.ceil(r.tcx1/o),c.tby1=Math.ceil(r.tcy1/o),c.resolution=s,d(0,c,t),i.push(c),s.subbands=[c];else{const a=1<<n-e+1,o=[];c={},c.type="HL",c.tbx0=Math.ceil(r.tcx0/a-.5),c.tby0=Math.ceil(r.tcy0/a),c.tbx1=Math.ceil(r.tcx1/a-.5),c.tby1=Math.ceil(r.tcy1/a),c.resolution=s,d(0,c,t),i.push(c),o.push(c),c={},c.type="LH",c.tbx0=Math.ceil(r.tcx0/a),c.tby0=Math.ceil(r.tcy0/a-.5),c.tbx1=Math.ceil(r.tcx1/a),c.tby1=Math.ceil(r.tcy1/a-.5),c.resolution=s,d(0,c,t),i.push(c),o.push(c),c={},c.type="HH",c.tbx0=Math.ceil(r.tcx0/a-.5),c.tby0=Math.ceil(r.tcy0/a-.5),c.tbx1=Math.ceil(r.tcx1/a-.5),c.tby1=Math.ceil(r.tcy1/a-.5),c.resolution=s,d(0,c,t),i.push(c),o.push(c),s.subbands=o}}r.resolutions=a,r.subbands=i}const n=t.codingStyleDefaultParameters.progressionOrder;switch(n){case 0:t.packetsIterator=new p(e);break;case 1:t.packetsIterator=new g(e);break;case 2:t.packetsIterator=new m(e);break;case 3:t.packetsIterator=new b(e);break;case 4:t.packetsIterator=new y(e);break;default:throw new s("Unsupported progression order "+n)}}function x(e,t,r,n){let i,o=0,c=0,l=!1;function h(e){for(;e>c;){const e=t[r+o];o++,l?(i=i<<7|e,c+=7,l=!1):(i=i<<8|e,c+=8),255===e&&(l=!0)}return c-=e,i>>>c&(1<<e)-1}function u(e){return 255===t[r+o-1]&&t[r+o]===e?(d(1),!0):255===t[r+o]&&t[r+o+1]===e&&(d(2),!0)}function d(e){o+=e}function f(){c=0,l&&(o++,l=!1)}function p(){if(0===h(1))return 1;if(0===h(1))return 2;let e=h(2);return 3>e?e+3:(e=h(5),31>e?e+6:(e=h(7),e+37))}const g=e.COD.sopMarkerUsed,m=e.COD.ephMarkerUsed,b=e.tiles[e.currentTile.index].packetsIterator;for(;n>o;){f(),g&&u(145)&&d(4);const e=b.nextPacket();if(!h(1))continue;const n=e.layerNumber,i=[];let c;for(let t=0,r=e.codeblocks.length;r>t;t++){c=e.codeblocks[t];let r=c.precinct;const o=c.cbx-r.cbxMin,l=c.cby-r.cbyMin;let u,d,f=!1,g=!1;if(void 0!==c.included)f=!!h(1);else{let e;if(r=c.precinct,void 0!==r.inclusionTree)e=r.inclusionTree;else{const t=r.cbxMax-r.cbxMin+1,a=r.cbyMax-r.cbyMin+1;e=new F(t,a,n),d=new _(t,a),r.inclusionTree=e,r.zeroBitPlanesTree=d;for(let e=0;n>e;e++)if(0!==h(1))throw new s("Invalid tag tree")}if(e.reset(o,l,n))for(;;){if(!h(1)){e.incrementValue(n);break}if(u=!e.nextLevel(),u){c.included=!0,f=g=!0;break}}}if(!f)continue;if(g){for(d=r.zeroBitPlanesTree,d.reset(o,l);;)if(h(1)){if(u=!d.nextLevel(),u)break}else d.incrementValue();c.zeroBitPlanes=d.value}const m=p();for(;h(1);)c.Lblock++;const b=(0,a.log2)(m),y=h((1<<b>m?b-1:b)+c.Lblock);i.push({codeblock:c,codingpasses:m,dataLength:y})}for(f(),m&&u(146);i.length>0;){const e=i.shift();c=e.codeblock,void 0===c.data&&(c.data=[]),c.data.push({data:t,start:r+o,end:r+o+e.dataLength,codingpasses:e.codingpasses}),o+=e.dataLength}}return o}function A(e,t,r,n,a,s,o,c,l){const h=n.tbx0,u=n.tby0,d=n.tbx1-n.tbx0,f=n.codeblocks,p="H"===n.type.charAt(0)?1:0,g="H"===n.type.charAt(1)?t:0;for(let r=0,m=f.length;m>r;++r){const m=f[r],b=m.tbx1_-m.tbx0_,y=m.tby1_-m.tby0_;if(0===b||0===y)continue;if(void 0===m.data)continue;const w=new T(b,y,m.subbandType,m.zeroBitPlanes,s);let v=2;const S=m.data;let x,A,k,C=0,_=0;for(x=0,A=S.length;A>x;x++)k=S[x],C+=k.end-k.start,_+=k.codingpasses;const F=new Uint8Array(C);let O=0;for(x=0,A=S.length;A>x;x++){k=S[x];const e=k.data.subarray(k.start,k.end);F.set(e,O),O+=e.length}const P=new i.ArithmeticDecoder(F,0,C);for(w.setDecoder(P),x=0;_>x;x++){switch(v){case 0:w.runSignificancePropagationPass();break;case 1:w.runMagnitudeRefinementPass();break;case 2:w.runCleanupPass(),c&&w.checkSegmentationSymbol()}l&&w.reset(),v=(v+1)%3}let I=m.tbx0_-h+(m.tby0_-u)*d;const E=w.coefficentsSign,M=w.coefficentsMagnitude,R=w.bitsDecoded,D=o?0:.5;let N,L,j;O=0;const B="LL"!==n.type;for(x=0;y>x;x++){const r=2*(I/d|0)*(t-d)+p+g;for(N=0;b>N;N++){if(L=M[O],0!==L){L=(L+D)*a,0!==E[O]&&(L=-L),j=R[O];const t=B?r+(I<<1):I;e[t]=o&&j>=s?L:L*(1<<s-j)}I++,O++}I+=d-b}}}function k(e,t,r){const n=t.components[r],a=n.codingStyleParameters,i=n.quantizationParameters,s=a.decompositionLevelsCount,c=i.SPqcds,l=i.scalarExpounded,h=i.guardBits,u=a.segmentationSymbolUsed,d=a.resetContextProbabilities,f=e.components[r].precision,p=a.reversibleTransformation,g=p?new I:new P,m=[];let b=0;for(let e=0;s>=e;e++){const t=n.resolutions[e],r=t.trx1-t.trx0,a=t.try1-t.try0,i=new Float32Array(r*a);for(let n=0,a=t.subbands.length;a>n;n++){let a,s;l?(a=c[b].mu,s=c[b].epsilon,b++):(a=c[0].mu,s=c[0].epsilon+(e>0?1-e:0));const g=t.subbands[n];A(i,r,0,g,p?1:2**(f+o[g.type]-s)*(1+a/2048),h+s-1,p,u,d)}m.push({width:r,height:a,items:i})}const y=g.calculate(m,n.tcx0,n.tcy0);return{left:n.tcx0,top:n.tcy0,width:y.width,height:y.height,items:y.items}}function C(e,t){const r=e.SIZ.Csiz,n=e.tiles[t];for(let t=0;r>t;t++){const r=n.components[t];r.quantizationParameters=void 0!==e.currentTile.QCC[t]?e.currentTile.QCC[t]:e.currentTile.QCD,r.codingStyleParameters=void 0!==e.currentTile.COC[t]?e.currentTile.COC[t]:e.currentTile.COD}n.codingStyleDefaultParameters=e.currentTile.COD}t.JpxImage=class{constructor(){this.failOnCorruptedImage=!1}parse(e){if(65359===(0,a.readUint16)(e,0))return void this.parseCodestream(e,0,e.length);const t=e.length;let r=0;for(;t>r;){let i=8,o=(0,a.readUint32)(e,r);const c=(0,a.readUint32)(e,r+4);if(r+=i,1===o&&(o=4294967296*(0,a.readUint32)(e,r)+(0,a.readUint32)(e,r+4),r+=8,i+=8),0===o&&(o=t-r+i),i>o)throw new s("Invalid box field size");const l=o-i;let h=!0;switch(c){case 1785737832:h=!1;break;case 1668246642:const t=e[r];if(1===t){const t=(0,a.readUint32)(e,r+3);switch(t){case 16:case 17:case 18:break;default:(0,n.warn)("Unknown colorspace "+t)}}else 2===t&&(0,n.info)("ICC profile not supported");break;case 1785737827:this.parseCodestream(e,r,r+l);break;case 1783636e3:218793738!==(0,a.readUint32)(e,r)&&(0,n.warn)("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:(0,n.warn)(`Unsupported header type ${c} (${String.fromCharCode(c>>24&255,c>>16&255,c>>8&255,255&c)}).`)}h&&(r+=l)}}parseImageProperties(e){let t=e.getByte();for(;t>=0;){const r=t;if(t=e.getByte(),65361==(r<<8|t)){e.skip(4);const t=e.getInt32()>>>0,r=e.getInt32()>>>0,n=e.getInt32()>>>0,a=e.getInt32()>>>0;e.skip(16);const i=e.getUint16();return this.width=t-n,this.height=r-a,this.componentsCount=i,void(this.bitsPerComponent=8)}}throw new s("No size marker found in JPX stream")}parseCodestream(e,t,r){const i={};let o=!1;try{let s=t;for(;r>s+1;){const t=(0,a.readUint16)(e,s);s+=2;let r,h,u,d,f,p,g=0;switch(t){case 65359:i.mainHeader=!0;break;case 65497:break;case 65361:g=(0,a.readUint16)(e,s);const m={};m.Xsiz=(0,a.readUint32)(e,s+4),m.Ysiz=(0,a.readUint32)(e,s+8),m.XOsiz=(0,a.readUint32)(e,s+12),m.YOsiz=(0,a.readUint32)(e,s+16),m.XTsiz=(0,a.readUint32)(e,s+20),m.YTsiz=(0,a.readUint32)(e,s+24),m.XTOsiz=(0,a.readUint32)(e,s+28),m.YTOsiz=(0,a.readUint32)(e,s+32);const b=(0,a.readUint16)(e,s+36);m.Csiz=b;const y=[];r=s+38;for(let t=0;b>t;t++){const t={precision:1+(127&e[r]),isSigned:!!(128&e[r]),XRsiz:e[r+1],YRsiz:e[r+2]};r+=3,c(t,m),y.push(t)}i.SIZ=m,i.components=y,l(i,y),i.QCC=[],i.COC=[];break;case 65372:g=(0,a.readUint16)(e,s);const w={};switch(r=s+2,h=e[r++],31&h){case 0:d=8,f=!0;break;case 1:d=16,f=!1;break;case 2:d=16,f=!0;break;default:throw Error("Invalid SQcd value "+h)}for(w.noQuantization=8===d,w.scalarExpounded=f,w.guardBits=h>>5,u=[];g+s>r;){const t={};8===d?(t.epsilon=e[r++]>>3,t.mu=0):(t.epsilon=e[r]>>3,t.mu=(7&e[r])<<8|e[r+1],r+=2),u.push(t)}w.SPqcds=u,i.mainHeader?i.QCD=w:(i.currentTile.QCD=w,i.currentTile.QCC=[]);break;case 65373:g=(0,a.readUint16)(e,s);const v={};let A;switch(r=s+2,257>i.SIZ.Csiz?A=e[r++]:(A=(0,a.readUint16)(e,r),r+=2),h=e[r++],31&h){case 0:d=8,f=!0;break;case 1:d=16,f=!1;break;case 2:d=16,f=!0;break;default:throw Error("Invalid SQcd value "+h)}for(v.noQuantization=8===d,v.scalarExpounded=f,v.guardBits=h>>5,u=[];g+s>r;){const t={};8===d?(t.epsilon=e[r++]>>3,t.mu=0):(t.epsilon=e[r]>>3,t.mu=(7&e[r])<<8|e[r+1],r+=2),u.push(t)}v.SPqcds=u,i.mainHeader?i.QCC[A]=v:i.currentTile.QCC[A]=v;break;case 65362:g=(0,a.readUint16)(e,s);const k={};r=s+2;const _=e[r++];k.entropyCoderWithCustomPrecincts=!!(1&_),k.sopMarkerUsed=!!(2&_),k.ephMarkerUsed=!!(4&_),k.progressionOrder=e[r++],k.layersCount=(0,a.readUint16)(e,r),r+=2,k.multipleComponentTransform=e[r++],k.decompositionLevelsCount=e[r++],k.xcb=2+(15&e[r++]),k.ycb=2+(15&e[r++]);const F=e[r++];if(k.selectiveArithmeticCodingBypass=!!(1&F),k.resetContextProbabilities=!!(2&F),k.terminationOnEachCodingPass=!!(4&F),k.verticallyStripe=!!(8&F),k.predictableTermination=!!(16&F),k.segmentationSymbolUsed=!!(32&F),k.reversibleTransformation=e[r++],k.entropyCoderWithCustomPrecincts){const t=[];for(;g+s>r;){const n=e[r++];t.push({PPx:15&n,PPy:n>>4})}k.precinctsSizes=t}const T=[];k.selectiveArithmeticCodingBypass&&T.push("selectiveArithmeticCodingBypass"),k.terminationOnEachCodingPass&&T.push("terminationOnEachCodingPass"),k.verticallyStripe&&T.push("verticallyStripe"),k.predictableTermination&&T.push("predictableTermination"),T.length>0&&(o=!0,(0,n.warn)(`JPX: Unsupported COD options (${T.join(", ")}).`)),i.mainHeader?i.COD=k:(i.currentTile.COD=k,i.currentTile.COC=[]);break;case 65424:g=(0,a.readUint16)(e,s),p={},p.index=(0,a.readUint16)(e,s+2),p.length=(0,a.readUint32)(e,s+4),p.dataEnd=p.length+s-2,p.partIndex=e[s+8],p.partsCount=e[s+9],i.mainHeader=!1,0===p.partIndex&&(p.COD=i.COD,p.COC=i.COC.slice(0),p.QCD=i.QCD,p.QCC=i.QCC.slice(0)),i.currentTile=p;break;case 65427:p=i.currentTile,0===p.partIndex&&(C(i,p.index),S(i)),g=p.dataEnd-s,x(i,e,s,g);break;case 65363:(0,n.warn)("JPX: Codestream code 0xFF53 (COC) is not implemented.");case 65365:case 65367:case 65368:case 65380:g=(0,a.readUint16)(e,s);break;default:throw Error("Unknown codestream code: "+t.toString(16))}s+=g}}catch(e){if(o||this.failOnCorruptedImage)throw new s(e.message);(0,n.warn)(`JPX: Trying to recover from: "${e.message}".`)}this.tiles=function(e){const t=e.SIZ,r=e.components,n=t.Csiz,a=[];for(let t=0,i=e.tiles.length;i>t;t++){const i=e.tiles[t],s=[];for(let t=0;n>t;t++)s[t]=k(e,i,t);const o=s[0],c=new Uint8ClampedArray(o.items.length*n),l={left:o.left,top:o.top,width:o.width,height:o.height,items:c};let h,u,d,f,p,g,m,b=0;if(i.codingStyleDefaultParameters.multipleComponentTransform){const e=4===n,t=s[0].items,a=s[1].items,o=s[2].items,l=e?s[3].items:null;h=r[0].precision-8,u=.5+(128<<h);const y=n-3;if(f=t.length,i.components[0].codingStyleParameters.reversibleTransformation)for(d=0;f>d;d++,b+=y){p=t[d]+u,g=a[d],m=o[d];const e=p-(m+g>>2);c[b++]=e+m>>h,c[b++]=e>>h,c[b++]=e+g>>h}else for(d=0;f>d;d++,b+=y)p=t[d]+u,g=a[d],m=o[d],c[b++]=p+1.402*m>>h,c[b++]=p-.34413*g-.71414*m>>h,c[b++]=p+1.772*g>>h;if(e)for(d=0,b=3;f>d;d++,b+=4)c[b]=l[d]+u>>h}else for(let e=0;n>e;e++){const t=s[e].items;for(h=r[e].precision-8,u=.5+(128<<h),b=e,d=0,f=t.length;f>d;d++)c[b]=t[d]+u>>h,b+=n}a.push(l)}return a}(i),this.width=i.SIZ.Xsiz-i.SIZ.XOsiz,this.height=i.SIZ.Ysiz-i.SIZ.YOsiz,this.componentsCount=i.SIZ.Csiz}};class _{constructor(e,t){const r=(0,a.log2)(Math.max(e,t))+1;this.levels=[];for(let n=0;r>n;n++)this.levels.push({width:e,height:t,items:[]}),e=Math.ceil(e/2),t=Math.ceil(t/2)}reset(e,t){let r,n=0,a=0;for(;this.levels.length>n;){r=this.levels[n];const i=e+t*r.width;if(void 0!==r.items[i]){a=r.items[i];break}r.index=i,e>>=1,t>>=1,n++}n--,r=this.levels[n],r.items[r.index]=a,this.currentLevel=n,delete this.value}incrementValue(){const e=this.levels[this.currentLevel];e.items[e.index]++}nextLevel(){let e=this.currentLevel,t=this.levels[e];const r=t.items[t.index];return e--,0>e?(this.value=r,!1):(this.currentLevel=e,t=this.levels[e],t.items[t.index]=r,!0)}}class F{constructor(e,t,r){const n=(0,a.log2)(Math.max(e,t))+1;this.levels=[];for(let a=0;n>a;a++){const n=new Uint8Array(e*t);for(let e=0,t=n.length;t>e;e++)n[e]=r;this.levels.push({width:e,height:t,items:n}),e=Math.ceil(e/2),t=Math.ceil(t/2)}}reset(e,t,r){let n=0;for(;this.levels.length>n;){const a=this.levels[n],i=e+t*a.width;a.index=i;const s=a.items[i];if(255===s)break;if(s>r)return this.currentLevel=n,this.propagateValues(),!1;e>>=1,t>>=1,n++}return this.currentLevel=n-1,!0}incrementValue(e){const t=this.levels[this.currentLevel];t.items[t.index]=e+1,this.propagateValues()}propagateValues(){let e=this.currentLevel,t=this.levels[e];const r=t.items[t.index];for(;--e>=0;)t=this.levels[e],t.items[t.index]=r}nextLevel(){let e=this.currentLevel,t=this.levels[e];const r=t.items[t.index];return t.items[t.index]=255,e--,e>=0&&(this.currentLevel=e,t=this.levels[e],t.items[t.index]=r,!0)}}const T=function(){const e=17,t=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),r=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),n=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);return class{constructor(e,a,i,s,o){let c;this.width=e,this.height=a,c="HH"===i?n:"HL"===i?r:t,this.contextLabelTable=c;const l=e*a;let h;this.neighborsSignificance=new Uint8Array(l),this.coefficentsSign=new Uint8Array(l),h=o>14?new Uint32Array(l):o>6?new Uint16Array(l):new Uint8Array(l),this.coefficentsMagnitude=h,this.processingFlags=new Uint8Array(l);const u=new Uint8Array(l);if(0!==s)for(let e=0;l>e;e++)u[e]=s;this.bitsDecoded=u,this.reset()}setDecoder(e){this.decoder=e}reset(){this.contexts=new Int8Array(19),this.contexts[0]=8,this.contexts[17]=92,this.contexts[18]=6}setNeighborsSignificance(e,t,r){const n=this.neighborsSignificance,a=this.width,i=this.height,s=t>0,o=a>t+1;let c;e>0&&(c=r-a,s&&(n[c-1]+=16),o&&(n[c+1]+=16),n[c]+=4),i>e+1&&(c=r+a,s&&(n[c-1]+=16),o&&(n[c+1]+=16),n[c]+=4),s&&(n[r-1]+=1),o&&(n[r+1]+=1),n[r]|=128}runSignificancePropagationPass(){const e=this.decoder,t=this.width,r=this.height,n=this.coefficentsMagnitude,a=this.coefficentsSign,i=this.neighborsSignificance,s=this.processingFlags,o=this.contexts,c=this.contextLabelTable,l=this.bitsDecoded;for(let h=0;r>h;h+=4)for(let u=0;t>u;u++){let d=h*t+u;for(let f=0;4>f;f++,d+=t){const t=h+f;if(t>=r)break;if(s[d]&=-2,!n[d]&&i[d]){if(e.readBit(o,c[i[d]])){const e=this.decodeSignBit(t,u,d);a[d]=e,n[d]=1,this.setNeighborsSignificance(t,u,d),s[d]|=2}l[d]++,s[d]|=1}}}}decodeSignBit(e,t,r){const n=this.width,a=this.coefficentsMagnitude,i=this.coefficentsSign;let s,o,c,l,h,u;l=t>0&&0!==a[r-1],n>t+1&&0!==a[r+1]?(c=i[r+1],l?(o=i[r-1],s=1-c-o):s=1-c-c):l?(o=i[r-1],s=1-o-o):s=0;const d=3*s;return l=e>0&&0!==a[r-n],this.height>e+1&&0!==a[r+n]?(c=i[r+n],l?(o=i[r-n],s=1-c-o+d):s=1-c-c+d):l?(o=i[r-n],s=1-o-o+d):s=d,0>s?(h=9-s,u=1^this.decoder.readBit(this.contexts,h)):(h=9+s,u=this.decoder.readBit(this.contexts,h)),u}runMagnitudeRefinementPass(){const e=this.decoder,t=this.width,r=this.coefficentsMagnitude,n=this.neighborsSignificance,a=this.contexts,i=this.bitsDecoded,s=this.processingFlags,o=t*this.height,c=4*t;for(let l,h=0;o>h;h=l){l=Math.min(o,h+c);for(let o=0;t>o;o++)for(let c=h+o;l>c;c+=t){if(!r[c]||1&s[c])continue;let t=16;2&s[c]&&(s[c]^=2,t=127&n[c]?14:15);const o=e.readBit(a,t);r[c]=r[c]<<1|o,i[c]++,s[c]|=1}}}runCleanupPass(){const t=this.decoder,r=this.width,n=this.height,a=this.neighborsSignificance,i=this.coefficentsMagnitude,s=this.coefficentsSign,o=this.contexts,c=this.contextLabelTable,l=this.bitsDecoded,h=this.processingFlags,u=r,d=2*r,f=3*r;let p;for(let g=0;n>g;g=p){p=Math.min(g+4,n);const m=g*r,b=n>g+3;for(let n=0;r>n;n++){const y=m+n;let w,v=0,S=y,x=g;if(b&&0===h[y]&&0===h[y+u]&&0===h[y+d]&&0===h[y+f]&&0===a[y]&&0===a[y+u]&&0===a[y+d]&&0===a[y+f]){if(!t.readBit(o,18)){l[y]++,l[y+u]++,l[y+d]++,l[y+f]++;continue}v=t.readBit(o,e)<<1|t.readBit(o,e),0!==v&&(x=g+v,S+=v*r),w=this.decodeSignBit(x,n,S),s[S]=w,i[S]=1,this.setNeighborsSignificance(x,n,S),h[S]|=2,S=y;for(let e=g;x>=e;e++,S+=r)l[S]++;v++}for(x=g+v;p>x;x++,S+=r)i[S]||1&h[S]||(1===t.readBit(o,c[a[S]])&&(w=this.decodeSignBit(x,n,S),s[S]=w,i[S]=1,this.setNeighborsSignificance(x,n,S),h[S]|=2),l[S]++)}}}checkSegmentationSymbol(){const t=this.decoder,r=this.contexts;if(10!=(t.readBit(r,e)<<3|t.readBit(r,e)<<2|t.readBit(r,e)<<1|t.readBit(r,e)))throw new s("Invalid segmentation symbol")}}}();class O{constructor(){this.constructor===O&&(0,n.unreachable)("Cannot initialize Transform.")}calculate(e,t,r){let n=e[0];for(let a=1,i=e.length;i>a;a++)n=this.iterate(n,e[a],t,r);return n}extend(e,t,r){let n=t-1,a=t+1,i=t+r-2,s=t+r;e[n--]=e[a++],e[s++]=e[i--],e[n--]=e[a++],e[s++]=e[i--],e[n--]=e[a++],e[s++]=e[i--],e[n]=e[a],e[s]=e[i]}filter(e,t,r){(0,n.unreachable)("Abstract method `filter` called")}iterate(e,t,r,n){const a=e.width,i=e.height;let s=e.items;const o=t.width,c=t.height,l=t.items;let h,u,d,f,p,g;for(d=0,h=0;i>h;h++)for(f=2*h*o,u=0;a>u;u++,d++,f+=2)l[f]=s[d];s=e.items=null;const m=new Float32Array(o+8);if(1===o){if(1&r)for(g=0,d=0;c>g;g++,d+=o)l[d]*=.5}else for(g=0,d=0;c>g;g++,d+=o)m.set(l.subarray(d,d+o),4),this.extend(m,4,o),this.filter(m,4,o),l.set(m.subarray(4,4+o),d);let b=16;const y=[];for(h=0;b>h;h++)y.push(new Float32Array(c+8));let w,v=0;if(e=4+c,1===c){if(1&n)for(p=0;o>p;p++)l[p]*=.5}else for(p=0;o>p;p++){if(0===v){for(b=Math.min(o-p,b),d=p,f=4;e>f;d+=o,f++)for(w=0;b>w;w++)y[w][f]=l[d+w];v=b}v--;const t=y[v];if(this.extend(t,4,c),this.filter(t,4,c),0===v)for(d=p-b+1,f=4;e>f;d+=o,f++)for(w=0;b>w;w++)l[d+w]=y[w][f]}return{width:o,height:c,items:l}}}class P extends O{filter(e,t,r){const n=r>>1;let a,i,s,o;const c=-1.586134342059924,l=-.052980118572961,h=.882911075530934,u=.443506852043971,d=1.230174104914001,f=1/d;for(a=(t|=0)-3,i=n+4;i--;a+=2)e[a]*=f;for(a=t-2,s=u*e[a-1],i=n+3;i--&&(o=u*e[a+1],e[a]=d*e[a]-s-o,i--);a+=2)a+=2,s=u*e[a+1],e[a]=d*e[a]-s-o;for(a=t-1,s=h*e[a-1],i=n+2;i--&&(o=h*e[a+1],e[a]-=s+o,i--);a+=2)a+=2,s=h*e[a+1],e[a]-=s+o;for(a=t,s=l*e[a-1],i=n+1;i--&&(o=l*e[a+1],e[a]-=s+o,i--);a+=2)a+=2,s=l*e[a+1],e[a]-=s+o;if(0!==n)for(a=t+1,s=c*e[a-1],i=n;i--&&(o=c*e[a+1],e[a]-=s+o,i--);a+=2)a+=2,s=c*e[a+1],e[a]-=s+o}}class I extends O{filter(e,t,r){const n=r>>1;let a,i;for(a=t|=0,i=n+1;i--;a+=2)e[a]-=e[a-1]+e[a+1]+2>>2;for(a=t+1,i=n;i--;a+=2)e[a]+=e[a-1]+e[a+1]>>1}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LZWStream=void 0;var n=r(19);t.LZWStream=class extends n.DecodeStream{constructor(e,t,r){super(t),this.str=e,this.dict=e.dict,this.cachedData=0,this.bitsCached=0;const n=4096,a={earlyChange:r,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(n),dictionaryLengths:new Uint16Array(n),dictionaryPrevCodes:new Uint16Array(n),currentSequence:new Uint8Array(n),currentSequenceLength:0};for(let e=0;256>e;++e)a.dictionaryValues[e]=e,a.dictionaryLengths[e]=1;this.lzwState=a}readBits(e){let t=this.bitsCached,r=this.cachedData;for(;e>t;){const e=this.str.getByte();if(-1===e)return this.eof=!0,null;r=r<<8|e,t+=8}return this.bitsCached=t-=e,this.cachedData=r,this.lastCode=null,r>>>t&(1<<e)-1}readBlock(){let e,t,r,n=1024;const a=this.lzwState;if(!a)return;const i=a.earlyChange;let s=a.nextCode;const o=a.dictionaryValues,c=a.dictionaryLengths,l=a.dictionaryPrevCodes;let h=a.codeLength,u=a.prevCode;const d=a.currentSequence;let f=a.currentSequenceLength,p=0,g=this.bufferLength,m=this.ensureBuffer(this.bufferLength+n);for(e=0;512>e;e++){const e=this.readBits(h),a=f>0;if(256>e)d[0]=e,f=1;else{if(258>e){if(256===e){h=9,s=258,f=0;continue}this.eof=!0,delete this.lzwState;break}if(s>e)for(f=c[e],t=f-1,r=e;t>=0;t--)d[t]=o[r],r=l[r];else d[f++]=d[0]}if(a&&(l[s]=u,c[s]=c[u]+1,o[s]=d[0],s++,h=s+i&s+i-1?h:0|Math.min(Math.log(s+i)/.6931471805599453+1,12)),u=e,p+=f,p>n){do{n+=512}while(p>n);m=this.ensureBuffer(this.bufferLength+n)}for(t=0;f>t;t++)m[g++]=d[t]}a.nextCode=s,a.codeLength=h,a.prevCode=u,a.currentSequenceLength=f,this.bufferLength=g}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PredictorStream=void 0;var n=r(19),a=r(5),i=r(2);t.PredictorStream=class extends n.DecodeStream{constructor(e,t,r){if(super(t),!(r instanceof a.Dict))return e;const n=this.predictor=r.get("Predictor")||1;if(1>=n)return e;if(2!==n&&(10>n||n>15))throw new i.FormatError("Unsupported predictor: "+n);this.readBlock=2===n?this.readBlockTiff:this.readBlockPng,this.str=e,this.dict=e.dict;const s=this.colors=r.get("Colors")||1,o=this.bits=r.get("BPC","BitsPerComponent")||8,c=this.columns=r.get("Columns")||1;return this.pixBytes=s*o+7>>3,this.rowBytes=c*s*o+7>>3,this}readBlockTiff(){const e=this.rowBytes,t=this.bufferLength,r=this.ensureBuffer(t+e),n=this.bits,a=this.colors,i=this.str.getBytes(e);if(this.eof=!i.length,this.eof)return;let s,o=0,c=0,l=0,h=0,u=t;if(1===n&&1===a)for(s=0;e>s;++s){let e=i[s]^o;e^=e>>1,e^=e>>2,e^=e>>4,o=(1&e)<<7,r[u++]=e}else if(8===n){for(s=0;a>s;++s)r[u++]=i[s];for(;e>s;++s)r[u]=r[u-a]+i[s],u++}else if(16===n){const t=2*a;for(s=0;t>s;++s)r[u++]=i[s];for(;e>s;s+=2){const e=((255&i[s])<<8)+(255&i[s+1])+((255&r[u-t])<<8)+(255&r[u-t+1]);r[u++]=e>>8&255,r[u++]=255&e}}else{const e=new Uint8Array(a+1),u=(1<<n)-1;let d=0,f=t;const p=this.columns;for(s=0;p>s;++s)for(let t=0;a>t;++t)n>l&&(o=o<<8|255&i[d++],l+=8),e[t]=e[t]+(o>>l-n)&u,l-=n,c=c<<n|e[t],h+=n,8>h||(r[f++]=c>>h-8&255,h-=8);h>0&&(r[f++]=(c<<8-h)+(o&(1<<8-h)-1))}this.bufferLength+=e}readBlockPng(){const e=this.rowBytes,t=this.pixBytes,r=this.str.getByte(),n=this.str.getBytes(e);if(this.eof=!n.length,this.eof)return;const a=this.bufferLength,s=this.ensureBuffer(a+e);let o=s.subarray(a-e,a);0===o.length&&(o=new Uint8Array(e));let c,l,h,u=a;switch(r){case 0:for(c=0;e>c;++c)s[u++]=n[c];break;case 1:for(c=0;t>c;++c)s[u++]=n[c];for(;e>c;++c)s[u]=s[u-t]+n[c]&255,u++;break;case 2:for(c=0;e>c;++c)s[u++]=o[c]+n[c]&255;break;case 3:for(c=0;t>c;++c)s[u++]=(o[c]>>1)+n[c];for(;e>c;++c)s[u]=(o[c]+s[u-t]>>1)+n[c]&255,u++;break;case 4:for(c=0;t>c;++c)l=o[c],h=n[c],s[u++]=l+h;for(;e>c;++c){l=o[c];const e=o[c-t],r=s[u-t],a=r+l-e;let i=a-r;0>i&&(i=-i);let d=a-l;0>d&&(d=-d);let f=a-e;0>f&&(f=-f),h=n[c],s[u++]=i>d||i>f?d>f?e+h:l+h:r+h}break;default:throw new i.FormatError("Unsupported predictor: "+r)}this.bufferLength+=e}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RunLengthStream=void 0;var n=r(19);t.RunLengthStream=class extends n.DecodeStream{constructor(e,t){super(t),this.str=e,this.dict=e.dict}readBlock(){const e=this.str.getBytes(2);if(!e||2>e.length||128===e[0])return void(this.eof=!0);let t,r=this.bufferLength,n=e[0];if(128>n){if(t=this.ensureBuffer(r+n+1),t[r++]=e[1],n>0){const e=this.str.getBytes(n);t.set(e,r),r+=n}}else{n=257-n;const a=e[1];t=this.ensureBuffer(r+n+1);for(let e=0;n>e;e++)t[r++]=a}this.bufferLength=r}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Font=t.ErrorFont=void 0;var n=r(2),a=r(35),i=r(38),s=r(40),o=r(39),c=r(37),l=r(41),h=r(42),u=r(43),d=r(44),f=r(45),p=r(46),g=r(16),m=r(47),b=r(6),y=r(10),w=r(48);const v=[[57344,63743],[1048576,1114109]],S=1e3,x=["ascent","bbox","black","bold","charProcOperatorList","composite","cssFontInfo","data","defaultVMetrics","defaultWidth","descent","fallbackName","fontMatrix","fontType","isType3Font","italic","loadedName","mimetype","missingFile","name","remeasure","subtype","type","vertical"],A=["cMap","defaultEncoding","differences","isMonospace","isSerifFont","isSymbolicFont","seacMap","toFontChar","toUnicode","vmetrics","widths"];function k(e){if(!e.fontMatrix)return;if(e.fontMatrix[0]===n.FONT_IDENTITY_MATRIX[0])return;const t=.001/e.fontMatrix[0],r=e.widths;for(const e in r)r[e]*=t;e.defaultWidth*=t}function C(e){if(!e.fallbackToUnicode)return;if(e.toUnicode instanceof h.IdentityToUnicodeMap)return;const t=[];for(const r in e.fallbackToUnicode)e.toUnicode.has(r)||(t[r]=e.fallbackToUnicode[r]);t.length>0&&e.toUnicode.amend(t)}class _{constructor(e,t,r,n,a,i,o,c,l){this.originalCharCode=e,this.fontChar=t,this.unicode=r,this.accent=n,this.width=a,this.vmetric=i,this.operatorListId=o,this.isSpace=c,this.isInFont=l;const h=(0,s.getCharUnicodeCategory)(r);this.isWhitespace=h.isWhitespace,this.isZeroWidthDiacritic=h.isZeroWidthDiacritic,this.isInvisibleFormatMark=h.isInvisibleFormatMark}matchesForCache(e,t,r,n,a,i,s,o,c){return this.originalCharCode===e&&this.fontChar===t&&this.unicode===r&&this.accent===n&&this.width===a&&this.vmetric===i&&this.operatorListId===s&&this.isSpace===o&&this.isInFont===c}}function F(e,t){return(e<<8)+t}function T(e,t,r){e[t+1]=r,e[t]=r>>>8}function O(e,t){const r=(e<<8)+t;return 32768&r?r-65536:r}function P(e){return String.fromCharCode(e>>8&255,255&e)}function I(e){return e>32767?e=32767:-32768>e&&(e=-32768),String.fromCharCode(e>>8&255,255&e)}function E(e){const t=e.peekBytes(4);return"ttcf"===(0,n.bytesToString)(t)}function M(e,{type:t,subtype:r,composite:a}){let i,s;return function(e){const t=e.peekBytes(4);return 65536===(0,b.readUint32)(t,0)||"true"===(0,n.bytesToString)(t)}(e)||E(e)?i=a?"CIDFontType2":"TrueType":function(e){const t=e.peekBytes(4);return"OTTO"===(0,n.bytesToString)(t)}(e)?i=a?"CIDFontType2":"OpenType":function(e){const t=e.peekBytes(2);return 37===t[0]&&33===t[1]||128===t[0]&&1===t[1]}(e)?i=a?"CIDFontType0":"MMType1"===t?"MMType1":"Type1":function(e){const t=e.peekBytes(4);return!(1>t[0]||1>t[3]||t[3]>4)}(e)?a?(i="CIDFontType0",s="CIDFontType0C"):(i="MMType1"===t?"MMType1":"Type1",s="Type1C"):((0,n.warn)("getFontFileType: Unable to detect correct font file Type/Subtype."),i=t,s=r),[i,s]}function R(e,t){for(const r in t)e[+r]=t[r]}function D(e,t,r){const n=[];let a;for(let r=0,i=e.length;i>r;r++)a=(0,s.getUnicodeForGlyph)(e[r],t),-1!==a&&(n[r]=a);for(const e in r)a=(0,s.getUnicodeForGlyph)(r[e],t),-1!==a&&(n[+e]=a);return n}function N(e,t,r=!1){switch(t.length){case 1:return t.charCodeAt(0);case 2:return t.charCodeAt(0)<<8|t.charCodeAt(1)}const a=`Unsupported CID string (charCode ${e}): "${t}".`;if(r)throw new n.FormatError(a);return(0,n.warn)(a),t}function L(e,t,r,a){const i=Object.create(null),s=new Map,o=[],c=new Set;let l=0;const h=v[l][0];let u=h,d=v[l][1];for(let f in e){f|=0;let p=e[f];if(!t(p))continue;if(u>d){if(l++,l>=v.length){(0,n.warn)("Ran out of space in font private use area.");break}u=v[l][0],d=v[l][1]}const g=u++;0===p&&(p=r);let m=a.get(f);"string"==typeof m&&(m=m.codePointAt(0)),m&&h>m&&!c.has(p)&&(s.set(m,p),c.add(p)),i[g]=p,o[f]=g}return{toFontChar:o,charCodeToGlyphId:i,toUnicodeExtraMap:s,nextAvailableFontCharCode:u}}function j(e,t,r){const a=function(e,t,r){const n=[];for(const t in e)r>e[t]&&n.push({fontCharCode:0|t,glyphId:e[t]});if(t)for(const[e,a]of t)r>a&&n.push({fontCharCode:e,glyphId:a});0===n.length&&n.push({fontCharCode:0,glyphId:0}),n.sort((function(e,t){return e.fontCharCode-t.fontCharCode}));const a=[],i=n.length;for(let e=0;i>e;){const t=n[e].fontCharCode,r=[n[e].glyphId];++e;let s=t;for(;i>e&&s+1===n[e].fontCharCode&&(r.push(n[e].glyphId),++s,++e,65535!==s););a.push([t,s,r])}return a}(e,t,r),i=a.at(-1)[1]>65535?2:1;let s,o,c,l,h="\0\0"+P(i)+"\0\0"+(0,n.string32)(4+8*i);for(s=a.length-1;s>=0&&a[s][0]>65535;--s);const u=s+1;65535>a[s][0]&&65535===a[s][1]&&(a[s][1]=65534);const d=65535>a[s][1]?1:0,f=u+d,p=m.OpenTypeFileBuilder.getSearchParams(f,2);let g,b,y,w,v="",S="",x="",A="",k="",C=0;for(s=0,o=u;o>s;s++){g=a[s],b=g[0],y=g[1],v+=P(b),S+=P(y),w=g[2];let e=!0;for(c=1,l=w.length;l>c;++c)if(w[c]!==w[c-1]+1){e=!1;break}if(e)x+=P(w[0]-b&65535),A+=P(0);else{const e=2*(f-s)+2*C;for(C+=y-b+1,x+=P(0),A+=P(e),c=0,l=w.length;l>c;++c)k+=P(w[c])}}d>0&&(S+="ÿÿ",v+="ÿÿ",x+="\0",A+="\0\0");const _="\0\0"+P(2*f)+P(p.range)+P(p.entry)+P(p.rangeShift)+S+"\0\0"+v+x+A+k;let F="",T="";if(i>1){for(h+="\0\0\n"+(0,n.string32)(4+8*i+4+_.length),F="",s=0,o=a.length;o>s;s++){g=a[s],b=g[0],w=g[2];let e=w[0];for(c=1,l=w.length;l>c;++c)w[c]!==w[c-1]+1&&(y=g[0]+c-1,F+=(0,n.string32)(b)+(0,n.string32)(y)+(0,n.string32)(e),b=y+1,e=w[c]);F+=(0,n.string32)(b)+(0,n.string32)(g[1])+(0,n.string32)(e)}T="\0\f\0\0"+(0,n.string32)(F.length+16)+"\0\0\0\0"+(0,n.string32)(F.length/12)}return h+"\0"+P(_.length+4)+_+T+F}function B(e,t,r){r=r||{unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};let a=0,i=0,o=0,c=0,l=null,h=0;if(t){for(let e in t){e|=0,e>=l&&l||(l=e),e>h&&(h=e);const t=(0,s.getUnicodeRangeFor)(e);if(32>t)a|=1<<t;else if(64>t)i|=1<<t-32;else if(96>t)o|=1<<t-64;else{if(t>=123)throw new n.FormatError("Unicode ranges Bits > 123 are reserved for internal usage");c|=1<<t-96}}h>65535&&(h=65535)}else l=0,h=255;const u=e.bbox||[0,0,0,0],d=e.ascentScaled?1:(r.unitsPerEm||1/(e.fontMatrix||n.FONT_IDENTITY_MATRIX)[0])/S,f=r.ascent||Math.round(d*(e.ascent||u[3]));let p=r.descent||Math.round(d*(e.descent||u[1]));p>0&&e.descent>0&&0>u[1]&&(p=-p);const g=r.yMax||f,m=-r.yMin||-p;return"\0$ô\0\0\0Š»\0\0\0ŒŠ»\0\0ß\x001\0\0\0\0"+String.fromCharCode(e.fixedPitch?9:0)+"\0\0\0\0\0\0"+(0,n.string32)(a)+(0,n.string32)(i)+(0,n.string32)(o)+(0,n.string32)(c)+"*21*"+P(e.italicAngle?1:0)+P(l||e.firstChar)+P(h||e.lastChar)+P(f)+P(p)+"\0d"+P(g)+P(m)+"\0\0\0\0\0\0\0\0"+P(e.xHeight)+P(e.capHeight)+P(0)+P(l||e.firstChar)+"\0"}function U(e){return"\0\0\0"+(0,n.string32)(Math.floor(65536*e.italicAngle))+"\0\0\0\0"+(0,n.string32)(e.fixedPitch?1:0)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function $(e){return e.replace(/[^\x21-\x7E]|[[\](){}<>/%]/g,"").slice(0,63)}function q(e,t){t||(t=[[],[]]);const r=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||$(e),t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],n=[];let a,i,s,o,c;for(a=0,i=r.length;i>a;a++){c=t[1][a]||r[a];const e=[];for(s=0,o=c.length;o>s;s++)e.push(P(c.charCodeAt(s)));n.push(e.join(""))}const l=[r,n],h=["\0","\0"],u=["\0\0","\0"],d=["\0\0","\t"],f=2*r.length;let p="\0\0"+P(f)+P(12*f+6),g=0;for(a=0,i=2;i>a;a++){const e=l[a];for(s=0,o=e.length;o>s;s++)c=e[s],p+=h[a]+u[a]+d[a]+P(s)+P(c.length)+P(g),g+=c.length}return p+=r.join("")+n.join(""),p}t.Font=class{constructor(e,t,r){this.name=e,this.psName=null,this.mimetype=null,this.disableFontFace=!1,this.loadedName=r.loadedName,this.isType3Font=r.isType3Font,this.missingFile=!1,this.cssFontInfo=r.cssFontInfo,this._charsCache=Object.create(null),this._glyphCache=Object.create(null);let a=!!(r.flags&i.FontFlags.Serif);if(!a&&!r.isSimulatedFlags){const t=e.replace(/[,_]/g,"-").split("-")[0],r=(0,l.getSerifFonts)();for(const e of t.split("+"))if(r[e]){a=!0;break}}this.isSerifFont=a,this.isSymbolicFont=!!(r.flags&i.FontFlags.Symbolic),this.isMonospace=!!(r.flags&i.FontFlags.FixedPitch);let s=r.type,o=r.subtype;this.type=s,this.subtype=o;let c,h="sans-serif";if(this.isMonospace?h="monospace":this.isSerifFont&&(h="serif"),this.fallbackName=h,this.differences=r.differences,this.widths=r.widths,this.defaultWidth=r.defaultWidth,this.composite=r.composite,this.cMap=r.cMap,this.capHeight=r.capHeight/S,this.ascent=r.ascent/S,this.descent=r.descent/S,this.lineHeight=this.ascent-this.descent,this.fontMatrix=r.fontMatrix,this.bbox=r.bbox,this.defaultEncoding=r.defaultEncoding,this.toUnicode=r.toUnicode,this.toFontChar=[],"Type3"!==r.type){if(this.cidEncoding=r.cidEncoding||"",this.vertical=!!r.vertical,this.vertical&&(this.vmetrics=r.vmetrics,this.defaultVMetrics=r.defaultVMetrics),!t||t.isEmpty)return t&&(0,n.warn)('Font file is empty in "'+e+'" ('+this.loadedName+")"),void this.fallbackToSystemFont(r);[s,o]=M(t,r),s===this.type&&o===this.subtype||(0,n.info)(`Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${s}/${o}.`);try{switch(s){case"MMType1":(0,n.info)("MMType1 font ("+e+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";const a="Type1C"===o||"CIDFontType0C"===o?new u.CFFFont(t,r):new w.Type1Font(e,t,r);k(r),c=this.convert(e,a,r);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",c=this.checkAndRepair(e,t,r),this.isOpenType&&(k(r),s="OpenType");break;default:throw new n.FormatError(`Font ${s} is not supported`)}}catch(e){return(0,n.warn)(e),void this.fallbackToSystemFont(r)}C(r),this.data=c,this.fontType=(0,i.getFontType)(s,o,r.isStandardFont),this.fontMatrix=r.fontMatrix,this.widths=r.widths,this.defaultWidth=r.defaultWidth,this.toUnicode=r.toUnicode,this.seacMap=r.seacMap}else{for(let e=0;256>e;e++)this.toFontChar[e]=this.differences[e]||r.defaultEncoding[e];this.fontType=n.FontType.TYPE3}}get renderer(){const e=d.FontRendererFactory.create(this,i.SEAC_ANALYSIS_ENABLED);return(0,n.shadow)(this,"renderer",e)}exportData(e=!1){const t=e?[...x,...A]:x,r=Object.create(null);let n,a;for(n of t)a=this[n],void 0!==a&&(r[n]=a);return r}fallbackToSystemFont(e){this.missingFile=!0;const t=this.name,r=this.type,a=this.subtype;let u=(0,i.normalizeFontName)(t);const d=(0,l.getStdFontMap)(),p=(0,l.getNonStdFontMap)(),g=!!d[u],m=!(!p[u]||!d[p[u]]);u=d[u]||p[u]||u;const b=(0,f.getFontBasicMetrics)()[u];b&&(isNaN(this.ascent)&&(this.ascent=b.ascent/S),isNaN(this.descent)&&(this.descent=b.descent/S),isNaN(this.capHeight)&&(this.capHeight=b.capHeight/S)),this.bold=-1!==u.search(/bold/gi),this.italic=-1!==u.search(/oblique/gi)||-1!==u.search(/italic/gi),this.black=-1!==t.search(/Black/g);const y=-1!==t.search(/Narrow/g);if(this.remeasure=(!g||y)&&Object.keys(this.widths).length>0,(g||m)&&"CIDFontType2"===r&&this.cidEncoding.startsWith("Identity-")){const r=e.cidToGidMap,n=[];if(R(n,(0,l.getGlyphMapForStandardFonts)()),/Arial-?Black/i.test(t)?R(n,(0,l.getSupplementalGlyphMapForArialBlack)()):/Calibri/i.test(t)&&R(n,(0,l.getSupplementalGlyphMapForCalibri)()),r){for(const e in n){const t=n[e];void 0!==r[t]&&(n[+e]=r[t])}r.length!==this.toUnicode.length&&e.hasIncludedToUnicodeMap&&this.toUnicode instanceof h.IdentityToUnicodeMap&&this.toUnicode.forEach((function(e,t){void 0===r[n[e]]&&(n[+e]=t)}))}this.toUnicode instanceof h.IdentityToUnicodeMap||this.toUnicode.forEach((function(e,t){n[+e]=t})),this.toFontChar=n,this.toUnicode=new h.ToUnicodeMap(n)}else if(/Symbol/i.test(u))this.toFontChar=D(c.SymbolSetEncoding,(0,o.getGlyphsUnicode)(),this.differences);else if(/Dingbats/i.test(u))/Wingdings/i.test(t)&&(0,n.warn)("Non-embedded Wingdings font, falling back to ZapfDingbats."),this.toFontChar=D(c.ZapfDingbatsEncoding,(0,o.getDingbatsGlyphsUnicode)(),this.differences);else if(g){const e=D(this.defaultEncoding,(0,o.getGlyphsUnicode)(),this.differences);"CIDFontType2"!==r||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof h.IdentityToUnicodeMap||this.toUnicode.forEach((function(t,r){e[+t]=r})),this.toFontChar=e}else{const e=(0,o.getGlyphsUnicode)(),r=[];this.toUnicode.forEach(((t,n)=>{if(!this.composite){const r=(0,s.getUnicodeForGlyph)(this.differences[t]||this.defaultEncoding[t],e);-1!==r&&(n=r)}r[+t]=n})),this.composite&&this.toUnicode instanceof h.IdentityToUnicodeMap&&/Verdana/i.test(t)&&R(r,(0,l.getGlyphMapForStandardFonts)()),this.toFontChar=r}C(e),this.loadedName=u.split("-")[0],this.fontType=(0,i.getFontType)(r,a,e.isStandardFont)}checkAndRepair(e,t,r){const s=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function l(e,t){const r=Object.create(null);r["OS/2"]=null,r.cmap=null,r.head=null,r.hhea=null,r.hmtx=null,r.maxp=null,r.name=null,r.post=null;for(let n=0;t>n;n++){const t=d(e);s.includes(t.tag)&&0!==t.length&&(r[t.tag]=t)}return r}function d(e){const t=e.getString(4),r=e.getInt32()>>>0,n=e.getInt32()>>>0,a=e.getInt32()>>>0,i=e.pos;e.pos=e.start||0,e.skip(n);const s=e.getBytes(a);return e.pos=i,"head"===t&&(s[8]=s[9]=s[10]=s[11]=0,s[17]|=32),{tag:t,checksum:r,length:a,offset:n,data:s}}function f(e){return{version:e.getString(4),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function b(e,t,r,n,a,i){const s={length:0,sizeOfInstructions:0};if(12>=r-t)return s;const o=e.subarray(t,r);let c=O(o[0],o[1]);if(0>c)return c=-1,T(o,0,c),n.set(o,a),s.length=o.length,s;let l,h=10,u=0;for(l=0;c>l;l++)u=1+(o[h]<<8|o[h+1]),h+=2;const d=h,f=o[h]<<8|o[h+1];s.sizeOfInstructions=f,h+=2+f;const p=h;let g=0;for(l=0;u>l;l++){const e=o[h++];192&e&&(o[h-1]=63&e);let t=2;2&e?t=1:16&e&&(t=0);let r=2;4&e?r=1:32&e&&(r=0);const n=t+r;if(g+=n,8&e){const e=o[h++];l+=e,g+=e*n}}if(0===g)return s;let m=h+g;return m>o.length?s:!i&&f>0?(n.set(o.subarray(0,d),a),n.set([0,0],a+d),n.set(o.subarray(p,m),a+d+2),m-=f,o.length-m>3&&(m=m+3&-4),s.length=m,s):o.length-m>3?(m=m+3&-4,n.set(o.subarray(0,m),a),s.length=m,s):(n.set(o,a),s.length=o.length,s)}function w(e){const r=(t.start||0)+e.offset;t.pos=r;const n=[[],[]],a=e.length,i=r+a;if(0!==t.getUint16()||6>a)return n;const s=t.getUint16(),o=t.getUint16(),c=[];let l,h;for(l=0;s>l&&i>=t.pos+12;l++){const e={platform:t.getUint16(),encoding:t.getUint16(),language:t.getUint16(),name:t.getUint16(),length:t.getUint16(),offset:t.getUint16()};(1===e.platform&&0===e.encoding&&0===e.language||3===e.platform&&1===e.encoding&&1033===e.language)&&c.push(e)}for(l=0,h=c.length;h>l;l++){const e=c[l];if(0>=e.length)continue;const a=r+o+e.offset;if(a+e.length>i)continue;t.pos=a;const s=e.name;if(e.encoding){let r="";for(let n=0,a=e.length;a>n;n+=2)r+=String.fromCharCode(t.getUint16());n[1][s]=r}else n[0][s]=t.getString(e.length)}return n}const v=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];function S(e,t){let r,a,i,s,o,c=e.data,l=0,h=0,u=0;const d=[],f=[],p=[];let g=t.tooComplexToFollowFunctions,m=!1,b=0,y=0;for(let e=c.length;e>l;){const e=c[l++];if(64===e)if(a=c[l++],m||y)l+=a;else for(r=0;a>r;r++)d.push(c[l++]);else if(65===e)if(a=c[l++],m||y)l+=2*a;else for(r=0;a>r;r++)i=c[l++],d.push(i<<8|c[l++]);else if(176==(248&e))if(a=e-176+1,m||y)l+=a;else for(r=0;a>r;r++)d.push(c[l++]);else if(184==(248&e))if(a=e-184+1,m||y)l+=2*a;else for(r=0;a>r;r++)i=c[l++],d.push(i<<8|c[l++]);else if(43!==e||g)if(44!==e||g){if(45===e)if(m)m=!1,h=l;else{if(o=f.pop(),!o)return(0,n.warn)("TT: ENDF bad stack"),void(t.hintsValid=!1);s=p.pop(),c=o.data,l=o.i,t.functionsStackDeltas[s]=d.length-o.stackTop}else if(137===e)(m||y)&&((0,n.warn)("TT: nested IDEFs not allowed"),g=!0),m=!0,u=l;else if(88===e)++b;else if(27===e)y=b;else if(89===e)y===b&&(y=0),--b;else if(28===e&&!m&&!y){const e=d.at(-1);e>0&&(l+=e-1)}}else(m||y)&&((0,n.warn)("TT: nested FDEFs not allowed"),g=!0),m=!0,u=l,s=d.pop(),t.functionsDefined[s]={data:c,i:l};else if(!m&&!y)if(s=d.at(-1),isNaN(s))(0,n.info)("TT: CALL empty stack (or invalid entry).");else if(t.functionsUsed[s]=!0,s in t.functionsStackDeltas){const e=d.length+t.functionsStackDeltas[s];if(0>e)return(0,n.warn)("TT: CALL invalid functions stack delta."),void(t.hintsValid=!1);d.length=e}else if(s in t.functionsDefined&&!p.includes(s)){if(f.push({data:c,i:l,stackTop:d.length-1}),p.push(s),o=t.functionsDefined[s],!o)return(0,n.warn)("TT: CALL non-existent function"),void(t.hintsValid=!1);c=o.data,l=o.i}if(!m&&!y){let t=0;for(e>142?192>e||e>223?224>e||(t=-2):t=-1:t=v[e],113>e||e>117||(a=d.pop(),isNaN(a)||(t=2*-a));0>t&&d.length>0;)d.pop(),t++;for(;t>0;)d.push(NaN),t--}}t.tooComplexToFollowFunctions=g;const w=[c];l>c.length&&w.push(new Uint8Array(l-c.length)),u>h&&((0,n.warn)("TT: complementing a missing function tail"),w.push(new Uint8Array([34,45]))),function(e,t){if(t.length>1){let r,n,a=0;for(r=0,n=t.length;n>r;r++)a+=t[r].length;a=a+3&-4;const i=new Uint8Array(a);let s=0;for(r=0,n=t.length;n>r;r++)i.set(t[r],s),s+=t[r].length;e.data=i,e.length=a}}(e,w)}let x,A,C,_;if(E(t=new y.Stream(new Uint8Array(t.getBytes())))){const e=function(e,t){const{numFonts:r,offsetTable:a}=function(e){const t=e.getString(4);(0,n.assert)("ttcf"===t,"Must be a TrueType Collection font.");const r=e.getUint16(),a=e.getUint16(),i=e.getInt32()>>>0,s=[];for(let t=0;i>t;t++)s.push(e.getInt32()>>>0);const o={ttcTag:t,majorVersion:r,minorVersion:a,numFonts:i,offsetTable:s};switch(r){case 1:return o;case 2:return o.dsigTag=e.getInt32()>>>0,o.dsigLength=e.getInt32()>>>0,o.dsigOffset=e.getInt32()>>>0,o}throw new n.FormatError(`Invalid TrueType Collection majorVersion: ${r}.`)}(e),i=t.split("+");let s;for(let o=0;r>o;o++){e.pos=(e.start||0)+a[o];const r=f(e),c=l(e,r.numTables);if(!c.name)throw new n.FormatError('TrueType Collection font must contain a "name" table.');const h=w(c.name);for(let e=0,n=h.length;n>e;e++)for(let n=0,a=h[e].length;a>n;n++){const a=h[e][n]&&h[e][n].replace(/\s/g,"");if(a){if(a===t)return{header:r,tables:c};if(i.length>=2)for(const e of i)a===e&&(s={name:e,header:r,tables:c})}}}if(s)return(0,n.warn)(`TrueType Collection does not contain "${t}" font, falling back to "${s.name}" font instead.`),{header:s.header,tables:s.tables};throw new n.FormatError(`TrueType Collection does not contain "${t}" font.`)}(t,this.name);x=e.header,A=e.tables}else x=f(t),A=l(t,x.numTables);const P=!A["CFF "];if(P){if(!A.loca)throw new n.FormatError('Required "loca" table is not found');A.glyf||((0,n.warn)('Required "glyf" table is not found -- trying to recover.'),A.glyf={tag:"glyf",data:new Uint8Array(0)}),this.isOpenType=!1}else{if("OTTO"===x.version&&(!r.composite||0>=(r.cidToGidMap||[]).length&&r.cMap instanceof g.IdentityCMap)||!A.head||!A.hhea||!A.maxp||!A.post)return _=new y.Stream(A["CFF "].data),C=new u.CFFFont(_,r),k(r),this.convert(e,C,r);delete A.glyf,delete A.loca,delete A.fpgm,delete A.prep,delete A["cvt "],this.isOpenType=!0}if(!A.maxp)throw new n.FormatError('Required "maxp" table is not found');t.pos=(t.start||0)+A.maxp.offset;const I=t.getInt32(),M=t.getUint16();if(r.scaleFactors&&r.scaleFactors.length===M&&P){const{scaleFactors:e}=r,t=F(A.head.data[50],A.head.data[51]),n=new p.GlyfTable({glyfTable:A.glyf.data,isGlyphLocationsLong:t,locaTable:A.loca.data,numGlyphs:M});n.scale(e);const{glyf:a,loca:i,isLocationLong:s}=n.write();A.glyf.data=a,A.loca.data=i,s!==!!t&&(A.head.data[50]=0,A.head.data[51]=s?1:0);const o=A.hmtx.data;for(let t=0;M>t;t++){const r=4*t,n=Math.round(e[t]*F(o[r],o[r+1]));o[r]=n>>8&255,o[r+1]=255&n,T(o,r+2,Math.round(e[t]*O(o[r+2],o[r+3])))}}let R=M+1,D=!0;R>65535&&(D=!1,R=M,(0,n.warn)("Not enough space in glyfs to duplicate first glyph."));let $=0,X=0;65536>I||22>A.maxp.length||(t.pos+=8,t.getUint16()>2&&(A.maxp.data[14]=0,A.maxp.data[15]=2),t.pos+=4,$=t.getUint16(),t.pos+=4,X=t.getUint16()),A.maxp.data[4]=R>>8,A.maxp.data[5]=255&R;const H=function(e,t,r,a){const i={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(e&&S(e,i),t&&S(t,i),e&&function(e,t){if(!e.tooComplexToFollowFunctions){if(e.functionsDefined.length>t)return(0,n.warn)("TT: more functions defined than expected"),void(e.hintsValid=!1);for(let r=0,a=e.functionsUsed.length;a>r;r++){if(r>t)return(0,n.warn)("TT: invalid function id: "+r),void(e.hintsValid=!1);if(e.functionsUsed[r]&&!e.functionsDefined[r])return(0,n.warn)("TT: undefined function: "+r),void(e.hintsValid=!1)}}}(i,a),r&&1&r.length){const e=new Uint8Array(r.length+1);e.set(r.data),r.data=e}return i.hintsValid}(A.fpgm,A.prep,A["cvt "],$);if(H||(delete A.fpgm,delete A.prep,delete A["cvt "]),function(e,t,r,a,i,s){if(!t)return void(r&&(r.data=null));e.pos=(e.start||0)+t.offset,e.pos+=4,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2;const o=e.getUint16();e.pos+=8,e.pos+=2;let c=e.getUint16();0!==o&&(2&F(a.data[44],a.data[45])||(t.data[22]=0,t.data[23]=0)),c>i&&((0,n.info)(`The numOfMetrics (${c}) should not be greater than the numGlyphs (${i}).`),c=i,t.data[34]=(65280&c)>>8,t.data[35]=255&c);const l=i-c-(r.length-4*c>>1);if(l>0){const e=new Uint8Array(r.length+2*l);e.set(r.data),s&&(e[r.length]=r.data[2],e[r.length+1]=r.data[3]),r.data=e}}(t,A.hhea,A.hmtx,A.head,R,D),!A.head)throw new n.FormatError('Required "head" table is not found');!function(e,t,r){const a=e.data,i=(a[0]<<24)+(a[1]<<16)+(a[2]<<8)+a[3];i>>16!=1&&((0,n.info)("Attempting to fix invalid version in head table: "+i),a[0]=0,a[1]=1,a[2]=0,a[3]=0);const s=F(a[50],a[51]);if(0>s||s>1){(0,n.info)("Attempting to fix invalid indexToLocFormat in head table: "+s);const e=t+1;if(r===e<<1)a[50]=0,a[51]=0;else{if(r!==e<<2)throw new n.FormatError("Could not fix indexToLocFormat: "+s);a[50]=0,a[51]=1}}}(A.head,M,P?A.loca.length:0);let W=Object.create(null);if(P){const e=F(A.head.data[50],A.head.data[51]),t=function(e,t,r,n,a,i,s){let o,c,l;n?(o=4,c=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]},l=function(e,t,r){e[t]=r>>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}):(o=2,c=function(e,t){return e[t]<<9|e[t+1]<<1},l=function(e,t,r){e[t]=r>>9&255,e[t+1]=r>>1&255});const h=i?r+1:r,u=o*(1+h),d=new Uint8Array(u);d.set(e.data.subarray(0,u)),e.data=d;const f=t.data,p=f.length,g=new Uint8Array(p);let m,y;const w=[];for(m=0,y=0;r+1>m;m++,y+=o){let e=c(d,y);e>p&&(e=p),w.push({index:m,offset:e,endOffset:0})}for(w.sort(((e,t)=>e.offset-t.offset)),m=0;r>m;m++)w[m].endOffset=w[m+1].offset;for(w.sort(((e,t)=>e.index-t.index)),m=0;r>m;m++){const{offset:e,endOffset:t}=w[m];if(0!==e||0!==t)break;const r=w[m+1].offset;if(0!==r){w[m].endOffset=r;break}}const v=Object.create(null);let S=0;for(l(d,0,S),m=0,y=o;r>m;m++,y+=o){const e=b(f,w[m].offset,w[m].endOffset,g,S,a),t=e.length;0===t&&(v[m]=!0),e.sizeOfInstructions>s&&(s=e.sizeOfInstructions),S+=t,l(d,y,S)}if(0===S){const e=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(m=0,y=o;h>m;m++,y+=o)l(d,y,e.length);t.data=e}else if(i){const r=c(d,o);g.length>r+S?t.data=g.subarray(0,r+S):(t.data=new Uint8Array(r+S),t.data.set(g.subarray(0,S))),t.data.set(g.subarray(0,r),S),l(e.data,d.length-o,S+r)}else t.data=g.subarray(0,S);return{missingGlyphs:v,maxSizeOfInstructions:s}}(A.loca,A.glyf,M,e,H,D,X);W=t.missingGlyphs,65536>I||22>A.maxp.length||(A.maxp.data[26]=t.maxSizeOfInstructions>>8,A.maxp.data[27]=255&t.maxSizeOfInstructions)}if(!A.hhea)throw new n.FormatError('Required "hhea" table is not found');0===A.hhea.data[10]&&0===A.hhea.data[11]&&(A.hhea.data[10]=255,A.hhea.data[11]=255);const z={unitsPerEm:F(A.head.data[18],A.head.data[19]),yMax:F(A.head.data[42],A.head.data[43]),yMin:O(A.head.data[38],A.head.data[39]),ascent:O(A.hhea.data[4],A.hhea.data[5]),descent:O(A.hhea.data[6],A.hhea.data[7]),lineGap:O(A.hhea.data[8],A.hhea.data[9])};this.ascent=z.ascent/z.unitsPerEm,this.descent=z.descent/z.unitsPerEm,this.lineGap=z.lineGap/z.unitsPerEm,this.cssFontInfo&&this.cssFontInfo.lineHeight?(this.lineHeight=this.cssFontInfo.metrics.lineHeight,this.lineGap=this.cssFontInfo.metrics.lineGap):this.lineHeight=this.ascent-this.descent+this.lineGap,A.post&&function(e,r,a){const s=(t.start||0)+e.offset;t.pos=s;const o=s+e.length,c=t.getInt32();let l;t.skip(28);let h,u=!0;switch(c){case 65536:l=i.MacStandardGlyphOrdering;break;case 131072:const e=t.getUint16();if(e!==a){u=!1;break}const s=[];for(h=0;e>h;++h){const e=t.getUint16();if(e>=32768){u=!1;break}s.push(e)}if(!u)break;const d=[],f=[];for(;o>t.pos;){const e=t.getByte();for(f.length=e,h=0;e>h;++h)f[h]=String.fromCharCode(t.getByte());d.push(f.join(""))}for(l=[],h=0;e>h;++h){const e=s[h];l.push(258>e?i.MacStandardGlyphOrdering[e]:d[e-258])}break;case 196608:break;default:(0,n.warn)("Unknown/unsupported post table version "+c),u=!1,r.defaultEncoding&&(l=r.defaultEncoding)}r.glyphNames=l}(A.post,r,M),A.post={tag:"post",data:U(r)};const G=[];function V(e){return!W[e]}if(r.composite){const e=r.cidToGidMap||[],t=0===e.length;r.cMap.forEach((function(r,a){if("string"==typeof a&&(a=N(r,a,!0)),a>65535)throw new n.FormatError("Max size of CID is 65,535");let i=-1;t?i=a:void 0!==e[a]&&(i=e[a]),i>=0&&M>i&&V(i)&&(G[r]=i)}))}else{const e=function(e,t,r,a){if(!e)return(0,n.warn)("No cmap table available."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};let i,s=(t.start||0)+e.offset;t.pos=s,t.skip(2);const o=t.getUint16();let c,l=!1;for(let e=0;o>e;e++){const n=t.getUint16(),i=t.getUint16(),s=t.getInt32()>>>0;let h=!1;if(!c||c.platformId!==n||c.encodingId!==i){if(0!==n||0!==i&&1!==i&&3!==i)if(1===n&&0===i)h=!0;else if(3!==n||1!==i||!a&&c){if(r&&3===n&&0===i){h=!0;let r=!0;if(o-1>e){const e=t.peekBytes(2);n>F(e[0],e[1])&&(r=!1)}r&&(l=!0)}}else h=!0,r||(l=!0);else h=!0;if(h&&(c={platformId:n,encodingId:i,offset:s}),l)break}}if(c&&(t.pos=s+c.offset),!c||-1===t.peekByte())return(0,n.warn)("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};const h=t.getUint16();let u=!1;const d=[];let f,p;if(0===h){for(t.skip(4),f=0;256>f;f++){const e=t.getByte();e&&d.push({charCode:f,glyphId:e})}u=!0}else if(2===h){t.skip(4);const e=[];let r=0;for(let n=0;256>n;n++){const n=t.getUint16()>>3;e.push(n),r=Math.max(n,r)}const n=[];for(let e=0;r>=e;e++)n.push({firstCode:t.getUint16(),entryCount:t.getUint16(),idDelta:O(t.getByte(),t.getByte()),idRangePos:t.pos+t.getUint16()});for(let r=0;256>r;r++)if(0===e[r])t.pos=n[0].idRangePos+2*r,p=t.getUint16(),d.push({charCode:r,glyphId:p});else{const a=n[e[r]];for(f=0;a.entryCount>f;f++){const e=(r<<8)+f+a.firstCode;t.pos=a.idRangePos+2*f,p=t.getUint16(),0!==p&&(p=(p+a.idDelta)%65536),d.push({charCode:e,glyphId:p})}}}else if(4===h){t.skip(4);const e=t.getUint16()>>1;t.skip(6);const r=[];let n;for(n=0;e>n;n++)r.push({end:t.getUint16()});for(t.skip(2),n=0;e>n;n++)r[n].start=t.getUint16();for(n=0;e>n;n++)r[n].delta=t.getUint16();let a,o=0;for(n=0;e>n;n++){i=r[n];const s=t.getUint16();s?(a=(s>>1)-(e-n),i.offsetIndex=a,o=Math.max(o,a+i.end-i.start+1)):i.offsetIndex=-1}const c=[];for(f=0;o>f;f++)c.push(t.getUint16());for(n=0;e>n;n++){i=r[n],s=i.start;const e=i.end,t=i.delta;for(a=i.offsetIndex,f=s;e>=f;f++)65535!==f&&(p=0>a?f:c[a+f-s],p=p+t&65535,d.push({charCode:f,glyphId:p}))}}else if(6===h){t.skip(4);const e=t.getUint16(),r=t.getUint16();for(f=0;r>f;f++)p=t.getUint16(),d.push({charCode:e+f,glyphId:p})}else{if(12!==h)return(0,n.warn)("cmap table has unsupported format: "+h),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};{t.skip(10);const e=t.getInt32()>>>0;for(f=0;e>f;f++){const e=t.getInt32()>>>0,r=t.getInt32()>>>0;let n=t.getInt32()>>>0;for(let t=e;r>=t;t++)d.push({charCode:t,glyphId:n++})}}}d.sort((function(e,t){return e.charCode-t.charCode}));for(let e=1;d.length>e;e++)d[e-1].charCode===d[e].charCode&&(d.splice(e,1),e--);return{platformId:c.platformId,encodingId:c.encodingId,mappings:d,hasShortCmap:u}}(A.cmap,t,this.isSymbolicFont,r.hasEncoding),a=e.platformId,s=e.encodingId,l=e.mappings,u=l.length;let d=[],f=!1;if(!r.hasEncoding||"MacRomanEncoding"!==r.baseEncodingName&&"WinAnsiEncoding"!==r.baseEncodingName||(d=(0,c.getEncoding)(r.baseEncodingName)),r.hasEncoding&&!this.isSymbolicFont&&(3===a&&1===s||1===a&&0===s)){const e=(0,o.getGlyphsUnicode)();for(let t=0;256>t;t++){let n;if(n=void 0!==this.differences[t]?this.differences[t]:d.length&&""!==d[t]?d[t]:c.StandardEncoding[t],!n)continue;const o=(0,i.recoverGlyphName)(n,e);let f;if(3===a&&1===s?f=e[o]:1===a&&0===s&&(f=c.MacRomanEncoding.indexOf(o)),void 0===f){if(!r.glyphNames&&r.hasIncludedToUnicodeMap&&!(this.toUnicode instanceof h.IdentityToUnicodeMap)){const e=this.toUnicode.get(t);e&&(f=e.codePointAt(0))}if(void 0===f)continue}for(let e=0;u>e;++e)if(l[e].charCode===f){G[t]=l[e].glyphId;break}}}else if(0===a){for(let e=0;u>e;++e)G[l[e].charCode]=l[e].glyphId;f=!0}else for(let e=0;u>e;++e){let t=l[e].charCode;3!==a||61440>t||t>61695||(t&=255),G[t]=l[e].glyphId}if(r.glyphNames&&(d.length||this.differences.length))for(let e=0;256>e;++e){if(!f&&void 0!==G[e])continue;const t=this.differences[e]||d[e];if(!t)continue;const n=r.glyphNames.indexOf(t);n>0&&V(n)&&(G[e]=n)}}0===G.length&&(G[0]=0);let Y=R-1;if(D||(Y=0),!r.cssFontInfo){const e=L(G,V,Y,this.toUnicode);this.toFontChar=e.toFontChar,A.cmap={tag:"cmap",data:j(e.charCodeToGlyphId,e.toUnicodeExtraMap,R)},A["OS/2"]&&function(e,t){t.pos=(t.start||0)+e.offset;const r=t.getUint16();t.skip(60);const n=t.getUint16();return!(4>r&&768&n||t.getUint16()>t.getUint16()||(t.skip(6),0===t.getUint16()||(e.data[8]=e.data[9]=0,0)))}(A["OS/2"],t)||(A["OS/2"]={tag:"OS/2",data:B(r,e.charCodeToGlyphId,z)})}if(!P)try{_=new y.Stream(A["CFF "].data),C=new a.CFFParser(_,r,i.SEAC_ANALYSIS_ENABLED).parse(),C.duplicateFirstGlyph();const e=new a.CFFCompiler(C);A["CFF "].data=e.compile()}catch(e){(0,n.warn)("Failed to compile font "+r.loadedName)}if(A.name){const t=w(A.name);A.name.data=q(e,t),this.psName=t[0][6]||null}else A.name={tag:"name",data:q(this.name)};const K=new m.OpenTypeFileBuilder(x.version);for(const e in A)K.addTable(e,A[e].data);return K.toArray()}convert(e,t,r){r.fixedPitch=!1,r.builtInEncoding&&function(e,t){if(e.isInternalFont)return;if(t===e.defaultEncoding)return;if(e.toUnicode instanceof h.IdentityToUnicodeMap)return;const r=[],n=(0,o.getGlyphsUnicode)();for(const a in t){if(e.hasIncludedToUnicodeMap){if(e.toUnicode.has(a))continue}else if(e.hasEncoding&&(0===e.differences.length||void 0!==e.differences[a]))continue;const i=(0,s.getUnicodeForGlyph)(t[a],n);-1!==i&&(r[a]=String.fromCharCode(i))}r.length>0&&e.toUnicode.amend(r)}(r,r.builtInEncoding);let a=1;t instanceof u.CFFFont&&(a=t.numGlyphs-1);const l=t.getGlyphMapping(r);let d=null,f=l,p=null;r.cssFontInfo||(d=L(l,t.hasGlyphId.bind(t),a,this.toUnicode),this.toFontChar=d.toFontChar,f=d.charCodeToGlyphId,p=d.toUnicodeExtraMap);const g=t.numGlyphs;function b(e,t){let r=null;for(const n in e)t===e[n]&&(r||(r=[]),r.push(0|n));return r}function y(e,t){for(const r in e)if(t===e[r])return 0|r;return d.charCodeToGlyphId[d.nextAvailableFontCharCode]=t,d.nextAvailableFontCharCode++}const w=t.seacs;if(d&&i.SEAC_ANALYSIS_ENABLED&&w&&w.length){const e=r.fontMatrix||n.FONT_IDENTITY_MATRIX,a=t.getCharset(),i=Object.create(null);for(let t in w){t|=0;const r=w[t],n=c.StandardEncoding[r[3]],s=a.indexOf(c.StandardEncoding[r[2]]),o=a.indexOf(n);if(0>s||0>o)continue;const h={x:r[0]*e[0]+r[1]*e[2]+e[4],y:r[0]*e[1]+r[1]*e[3]+e[5]},u=b(l,t);if(u)for(let e=0,t=u.length;t>e;e++){const t=u[e],r=d.charCodeToGlyphId,n=y(r,s),a=y(r,o);i[t]={baseFontCharCode:n,accentFontCharCode:a,accentOffset:h}}}r.seacMap=i}const v=1/(r.fontMatrix||n.FONT_IDENTITY_MATRIX)[0],S=new m.OpenTypeFileBuilder("OTTO");return S.addTable("CFF ",t.data),S.addTable("OS/2",B(r,f)),S.addTable("cmap",j(f,p,g)),S.addTable("head","\0\0\0\0\0\0\0\0\0\0_<õ\0\0"+I(v)+"\0\0\0\0ž\v~'\0\0\0\0ž\v~'\0\0"+I(r.descent)+"ÿ"+I(r.ascent)+P(r.italicAngle?2:0)+"\0\0\0\0\0\0\0"),S.addTable("hhea","\0\0\0"+I(r.ascent)+I(r.descent)+"\0\0ÿÿ\0\0\0\0\0\0"+I(r.capHeight)+I(Math.tan(r.italicAngle)*r.xHeight)+"\0\0\0\0\0\0\0\0\0\0\0\0"+P(g)),S.addTable("hmtx",function(){const e=t.charstrings,r=t.cff?t.cff.widths:null;let n="\0\0\0\0";for(let t=1,a=g;a>t;t++){let a=0;if(e){const r=e[t-1];a="width"in r?r.width:0}else r&&(a=Math.ceil(r[t]||0));n+=P(a)+P(0)}return n}()),S.addTable("maxp","\0\0P\0"+P(g)),S.addTable("name",q(e)),S.addTable("post",U(r)),S.toArray()}get spaceWidth(){const e=["space","minus","one","i","I"];let t;for(let r=0,n=e.length;n>r;r++){const n=e[r];if(n in this.widths){t=this.widths[n];break}const a=(0,o.getGlyphsUnicode)()[n];let i=0;if(this.composite&&this.cMap.contains(a)&&(i=this.cMap.lookup(a),"string"==typeof i&&(i=N(a,i))),!i&&this.toUnicode&&(i=this.toUnicode.charCodeOf(a)),i>0||(i=a),t=this.widths[i],t)break}return t=t||this.defaultWidth,(0,n.shadow)(this,"spaceWidth",t)}_charToGlyph(e,t=!1){let r,a,i,o=e;this.cMap&&this.cMap.contains(e)&&(o=this.cMap.lookup(e),"string"==typeof o&&(o=N(e,o))),a=this.widths[o],"number"!=typeof a&&(a=this.defaultWidth);const c=this.vmetrics&&this.vmetrics[o];let l=this.toUnicode.get(e)||e;"number"==typeof l&&(l=String.fromCharCode(l));let h=void 0!==this.toFontChar[e];if(r=this.toFontChar[e]||e,this.missingFile){const t=this.differences[e]||this.defaultEncoding[e];".notdef"!==t&&""!==t||"Type1"!==this.type||(r=32),r=(0,s.mapSpecialUnicodeValues)(r)}this.isType3Font&&(i=r);let u=null;if(this.seacMap&&this.seacMap[e]){h=!0;const t=this.seacMap[e];r=t.baseFontCharCode,u={fontChar:String.fromCodePoint(t.accentFontCharCode),offset:t.accentOffset}}let d="";"number"==typeof r&&(r>1114111?(0,n.warn)("charToGlyph - invalid fontCharCode: "+r):d=String.fromCodePoint(r));let f=this._glyphCache[e];return f&&f.matchesForCache(e,d,l,u,a,c,i,t,h)||(f=new _(e,d,l,u,a,c,i,t,h),this._glyphCache[e]=f),f}charsToGlyphs(e){let t=this._charsCache[e];if(t)return t;if(t=[],this.cMap){const r=Object.create(null),n=e.length;let a=0;for(;n>a;){this.cMap.readCharCode(e,a,r);const{charcode:n,length:i}=r;a+=i;const s=this._charToGlyph(n,1===i&&32===e.charCodeAt(a-1));t.push(s)}}else for(let r=0,n=e.length;n>r;++r){const n=e.charCodeAt(r),a=this._charToGlyph(n,32===n);t.push(a)}return this._charsCache[e]=t}getCharPositions(e){const t=[];if(this.cMap){const r=Object.create(null);let n=0;for(;e.length>n;){this.cMap.readCharCode(e,n,r);const a=r.length;t.push([n,n+a]),n+=a}}else for(let r=0,n=e.length;n>r;++r)t.push([r,r+1]);return t}get glyphCacheValues(){return Object.values(this._glyphCache)}encodeString(e){const t=[],r=[],n=()=>t.length%2==1,a=this.toUnicode instanceof h.IdentityToUnicodeMap?e=>this.toUnicode.charCodeOf(e):e=>this.toUnicode.charCodeOf(String.fromCodePoint(e));for(let i=0,s=e.length;s>i;i++){const s=e.codePointAt(i);if(s>55295&&(57344>s||s>65533)&&i++,this.toUnicode){const e=a(s);if(-1!==e){n()&&(t.push(r.join("")),r.length=0);for(let t=(this.cMap?this.cMap.getCharCodeLength(e):1)-1;t>=0;t--)r.push(String.fromCharCode(e>>8*t&255));continue}}n()||(t.push(r.join("")),r.length=0),r.push(String.fromCodePoint(s))}return t.push(r.join("")),t}},t.ErrorFont=class{constructor(e){this.error=e,this.loadedName="g_font_error",this.missingFile=!0}charsToGlyphs(){return[]}encodeString(e){return[e]}exportData(e=!1){return{error:this.error}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CFFTopDict=t.CFFStrings=t.CFFStandardStrings=t.CFFPrivateDict=t.CFFParser=t.CFFIndex=t.CFFHeader=t.CFFFDSelect=t.CFFCompiler=t.CFFCharset=t.CFF=void 0;var n=r(2),a=r(36),i=r(37);const s=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"];t.CFFStandardStrings=s;const o=391,c=[null,{id:"hstem",min:2,stackClearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1,undefStack:!0},{id:"return",min:0,undefStack:!0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackClearing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"vvcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1,undefStack:!0},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],l=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,stackDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]+e[t-1]}},{id:"sub",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]-e[t-1]}},{id:"div",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]/e[t-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn(e,t){e[t-1]=-e[t-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"random",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]*e[t-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];t.CFFParser=class{constructor(e,t,r){this.bytes=e.getBytes(),this.properties=t,this.seacAnalysisEnabled=!!r}parse(){const e=this.properties,t=new h;this.cff=t;const r=this.parseHeader(),n=this.parseIndex(r.endPos),a=this.parseIndex(n.endPos),i=this.parseIndex(a.endPos),s=this.parseIndex(i.endPos),o=this.parseDict(a.obj.get(0)),c=this.createDict(m,o,t.strings);t.header=r.obj,t.names=this.parseNameIndex(n.obj),t.strings=this.parseStringIndex(i.obj),t.topDict=c,t.globalSubrIndex=s.obj,this.parsePrivateDict(t.topDict),t.isCIDFont=c.hasName("ROS");const l=c.getByName("CharStrings"),u=this.parseIndex(l).obj,d=c.getByName("FontMatrix");d&&(e.fontMatrix=d);const f=c.getByName("FontBBox");let p,g;if(f&&(e.ascent=Math.max(f[3],f[1]),e.descent=Math.min(f[1],f[3]),e.ascentScaled=!0),t.isCIDFont){const e=this.parseIndex(c.getByName("FDArray")).obj;for(let r=0,n=e.count;n>r;++r){const n=e.get(r),a=this.createDict(m,this.parseDict(n),t.strings);this.parsePrivateDict(a),t.fdArray.push(a)}g=null,p=this.parseCharsets(c.getByName("charset"),u.count,t.strings,!0),t.fdSelect=this.parseFDSelect(c.getByName("FDSelect"),u.count)}else p=this.parseCharsets(c.getByName("charset"),u.count,t.strings,!1),g=this.parseEncoding(c.getByName("Encoding"),e,t.strings,p.charset);t.charset=p,t.encoding=g;const b=this.parseCharStrings({charStrings:u,localSubrIndex:c.privateDict.subrsIndex,globalSubrIndex:s.obj,fdSelect:t.fdSelect,fdArray:t.fdArray,privateDict:c.privateDict});return t.charStrings=b.charStrings,t.seacs=b.seacs,t.widths=b.widths,t}parseHeader(){let e=this.bytes;const t=e.length;let r=0;for(;t>r&&1!==e[r];)++r;if(r>=t)throw new n.FormatError("Invalid CFF header");0!==r&&((0,n.info)("cff data is shifted"),e=e.subarray(r),this.bytes=e);const a=e[2];return{obj:new u(e[0],e[1],a,e[3]),endPos:a}}parseDict(e){let t=0;function r(){let r=e[t++];return 30===r?function(){let r="";const n=15,a=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],i=e.length;for(;i>t;){const i=e[t++],s=i>>4,o=15&i;if(s===n)break;if(r+=a[s],o===n)break;r+=a[o]}return parseFloat(r)}():28===r?(r=e[t++],r=(r<<24|e[t++]<<16)>>16,r):29===r?(r=e[t++],r=r<<8|e[t++],r=r<<8|e[t++],r=r<<8|e[t++],r):32>r||r>246?247>r||r>250?251>r||r>254?((0,n.warn)('CFFParser_parseDict: "'+r+'" is a reserved command.'),NaN):-256*(r-251)-e[t++]-108:256*(r-247)+e[t++]+108:r-139}let a=[];const i=[];t=0;const s=e.length;for(;s>t;){let n=e[t];n>21?a.push(r()):(12===n&&(n=n<<8|e[++t]),i.push([n,a]),a=[],++t)}return i}parseIndex(e){const t=new f,r=this.bytes,n=r[e++]<<8|r[e++],a=[];let i,s,o=e;if(0!==n){const t=r[e++],c=e+(n+1)*t-1;for(i=0,s=n+1;s>i;++i){let n=0;for(let a=0;t>a;++a)n<<=8,n+=r[e++];a.push(c+n)}o=a[n]}for(i=0,s=a.length-1;s>i;++i)t.add(r.subarray(a[i],a[i+1]));return{obj:t,endPos:o}}parseNameIndex(e){const t=[];for(let r=0,a=e.count;a>r;++r){const a=e.get(r);t.push((0,n.bytesToString)(a))}return t}parseStringIndex(e){const t=new d;for(let r=0,a=e.count;a>r;++r){const a=e.get(r);t.add((0,n.bytesToString)(a))}return t}createDict(e,t,r){const n=new e(r);for(let e=0,r=t.length;r>e;++e){const r=t[e];n.setByKey(r[0],r[1])}return n}parseCharString(e,t,r,a){if(!t||e.callDepth>10)return!1;let i=e.stackSize;const s=e.stack,o=t.length;for(let h=0;o>h;){const o=t[h++];let u=null;if(12===o){const e=t[h++];0===e?(t[h-2]=139,t[h-1]=22,i=0):u=l[e]}else if(28===o)s[i]=(t[h]<<24|t[h+1]<<16)>>16,h+=2,i++;else if(14===o){if(i>=4&&(i-=4,this.seacAnalysisEnabled))return e.seac=s.slice(i,i+4),!1;u=c[o]}else if(32>o||o>246)if(247>o||o>254)if(255===o)s[i]=(t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3])/65536,h+=4,i++;else if(19===o||20===o)e.hints+=i>>1,h+=e.hints+7>>3,i%=2,u=c[o];else{if(10===o||29===o){let t;if(t=10===o?r:a,!t)return u=c[o],(0,n.warn)("Missing subrsIndex for "+u.id),!1;let l=32768;1240>t.count?l=107:33900>t.count&&(l=1131);const h=s[--i]+l;if(0>h||h>=t.count||isNaN(h))return u=c[o],(0,n.warn)("Out of bounds subrIndex for "+u.id),!1;if(e.stackSize=i,e.callDepth++,!this.parseCharString(e,t.get(h),r,a))return!1;e.callDepth--,i=e.stackSize;continue}if(11===o)return e.stackSize=i,!0;0===o&&h===t.length?(t[h-1]=14,u=c[14]):u=c[o]}else s[i]=251>o?(o-247<<8)+t[h]+108:-(o-251<<8)-t[h]-108,h++,i++;else s[i]=o-139,i++;if(u){if(u.stem&&(e.hints+=i>>1,3===o||23===o?e.hasVStems=!0:!e.hasVStems||1!==o&&18!==o||((0,n.warn)("CFF stem hints are in wrong order"),t[h-1]=1===o?3:23)),"min"in u&&!e.undefStack&&u.min>i)return(0,n.warn)("Not enough parameters for "+u.id+"; actual: "+i+", expected: "+u.min),0===i&&(t[h-1]=14,!0);e.firstStackClearing&&u.stackClearing&&(e.firstStackClearing=!1,i-=u.min,i>=2&&u.stem?i%=2:i>1&&(0,n.warn)("Found too many parameters for stack-clearing command"),i>0&&(e.width=s[i-1])),"stackDelta"in u?("stackFn"in u&&u.stackFn(s,i),i+=u.stackDelta):u.stackClearing?i=0:u.resetStack?(i=0,e.undefStack=!1):u.undefStack&&(i=0,e.undefStack=!0,e.firstStackClearing=!1)}}return e.stackSize=i,!0}parseCharStrings({charStrings:e,localSubrIndex:t,globalSubrIndex:r,fdSelect:a,fdArray:i,privateDict:s}){const o=[],c=[],l=e.count;for(let h=0;l>h;h++){const l=e.get(h),u={callDepth:0,stackSize:0,stack:[],undefStack:!0,hints:0,firstStackClearing:!0,seac:null,width:null,hasVStems:!1};let d=!0,f=null,p=s;if(a&&i.length){const e=a.getFDIndex(h);-1===e&&((0,n.warn)("Glyph index is not in fd select."),d=!1),i.length>e||((0,n.warn)("Invalid fd index for glyph index."),d=!1),d&&(p=i[e].privateDict,f=p.subrsIndex)}else t&&(f=t);if(d&&(d=this.parseCharString(u,l,f,r)),null!==u.width){const e=p.getByName("nominalWidthX");c[h]=e+u.width}else{const e=p.getByName("defaultWidthX");c[h]=e}null!==u.seac&&(o[h]=u.seac),d||e.set(h,new Uint8Array([14]))}return{charStrings:e,seacs:o,widths:c}}emptyPrivateDictionary(e){const t=this.createDict(y,[],e.strings);e.setByKey(18,[0,0]),e.privateDict=t}parsePrivateDict(e){if(!e.hasName("Private"))return void this.emptyPrivateDictionary(e);const t=e.getByName("Private");if(!Array.isArray(t)||2!==t.length)return void e.removeByName("Private");const r=t[0],n=t[1];if(0===r||n>=this.bytes.length)return void this.emptyPrivateDictionary(e);const a=this.bytes.subarray(n,n+r),i=this.parseDict(a),s=this.createDict(y,i,e.strings);if(e.privateDict=s,!s.getByName("Subrs"))return;const o=s.getByName("Subrs"),c=n+o;if(0===o||c>=this.bytes.length)return void this.emptyPrivateDictionary(e);const l=this.parseIndex(c);s.subrsIndex=l.obj}parseCharsets(e,t,r,i){if(0===e)return new v(!0,w.ISO_ADOBE,a.ISOAdobeCharset);if(1===e)return new v(!0,w.EXPERT,a.ExpertCharset);if(2===e)return new v(!0,w.EXPERT_SUBSET,a.ExpertSubsetCharset);const s=this.bytes,o=e,c=s[e++],l=[i?0:".notdef"];let h,u,d;switch(t-=1,c){case 0:for(d=0;t>d;d++)h=s[e++]<<8|s[e++],l.push(i?h:r.get(h));break;case 1:for(;t>=l.length;)for(h=s[e++]<<8|s[e++],u=s[e++],d=0;u>=d;d++)l.push(i?h++:r.get(h++));break;case 2:for(;t>=l.length;)for(h=s[e++]<<8|s[e++],u=s[e++]<<8|s[e++],d=0;u>=d;d++)l.push(i?h++:r.get(h++));break;default:throw new n.FormatError("Unknown charset format")}const f=s.subarray(o,e);return new v(!1,c,l,f)}parseEncoding(e,t,r,a){const s=Object.create(null),o=this.bytes;let c,l,h,u=!1,d=null;if(0===e||1===e){u=!0,c=e;const t=e?i.ExpertEncoding:i.StandardEncoding;for(l=0,h=a.length;h>l;l++){const e=t.indexOf(a[l]);-1!==e&&(s[e]=l)}}else{const t=e;switch(c=o[e++],127&c){case 0:const t=o[e++];for(l=1;t>=l;l++)s[o[e++]]=l;break;case 1:const r=o[e++];let a=1;for(l=0;r>l;l++){const t=o[e++],r=o[e++];for(let e=t;t+r>=e;e++)s[e]=a++}break;default:throw new n.FormatError(`Unknown encoding format: ${c} in CFF`)}const i=e;128&c&&(o[t]&=127,function(){const t=o[e++];for(l=0;t>l;l++){const t=o[e++],n=(o[e++]<<8)+(255&o[e++]);s[t]=a.indexOf(r.get(n))}}()),d=o.subarray(t,i)}return c&=127,new S(u,c,s,d)}parseFDSelect(e,t){const r=this.bytes,a=r[e++],i=[];let s;switch(a){case 0:for(s=0;t>s;++s){const t=r[e++];i.push(t)}break;case 3:const o=r[e++]<<8|r[e++];for(s=0;o>s;++s){let t=r[e++]<<8|r[e++];0===s&&0!==t&&((0,n.warn)("parseFDSelect: The first range must have a first GID of 0 -- trying to recover."),t=0);const a=r[e++],o=r[e]<<8|r[e+1];for(let e=t;o>e;++e)i.push(a)}e+=2;break;default:throw new n.FormatError(`parseFDSelect: Unknown format "${a}".`)}if(i.length!==t)throw new n.FormatError("parseFDSelect: Invalid font data.");return new x(a,i)}};class h{constructor(){this.header=null,this.names=[],this.topDict=null,this.strings=new d,this.globalSubrIndex=null,this.encoding=null,this.charset=null,this.charStrings=null,this.fdArray=[],this.fdSelect=null,this.isCIDFont=!1}duplicateFirstGlyph(){if(this.charStrings.count>=65535)return void(0,n.warn)("Not enough space in charstrings to duplicate first glyph.");const e=this.charStrings.get(0);this.charStrings.add(e),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}hasGlyphId(e){return e>=0&&this.charStrings.count>e&&this.charStrings.get(e).length>0}}t.CFF=h;class u{constructor(e,t,r,n){this.major=e,this.minor=t,this.hdrSize=r,this.offSize=n}}t.CFFHeader=u;class d{constructor(){this.strings=[]}get(e){return 0>e||e>390?e-o>this.strings.length?s[0]:this.strings[e-o]:s[e]}getSID(e){let t=s.indexOf(e);return-1!==t?t:(t=this.strings.indexOf(e),-1!==t?t+o:-1)}add(e){this.strings.push(e)}get count(){return this.strings.length}}t.CFFStrings=d;class f{constructor(){this.objects=[],this.length=0}add(e){this.length+=e.length,this.objects.push(e)}set(e,t){this.length+=t.length-this.objects[e].length,this.objects[e]=t}get(e){return this.objects[e]}get count(){return this.objects.length}}t.CFFIndex=f;class p{constructor(e,t){this.keyToNameMap=e.keyToNameMap,this.nameToKeyMap=e.nameToKeyMap,this.defaults=e.defaults,this.types=e.types,this.opcodes=e.opcodes,this.order=e.order,this.strings=t,this.values=Object.create(null)}setByKey(e,t){if(!(e in this.keyToNameMap))return!1;const r=t.length;if(0===r)return!0;for(let a=0;r>a;a++)if(isNaN(t[a]))return(0,n.warn)('Invalid CFFDict value: "'+t+'" for key "'+e+'".'),!0;const a=this.types[e];return"num"!==a&&"sid"!==a&&"offset"!==a||(t=t[0]),this.values[e]=t,!0}setByName(e,t){if(!(e in this.nameToKeyMap))throw new n.FormatError(`Invalid dictionary name "${e}"`);this.values[this.nameToKeyMap[e]]=t}hasName(e){return this.nameToKeyMap[e]in this.values}getByName(e){if(!(e in this.nameToKeyMap))throw new n.FormatError(`Invalid dictionary name ${e}"`);const t=this.nameToKeyMap[e];return t in this.values?this.values[t]:this.defaults[t]}removeByName(e){delete this.values[this.nameToKeyMap[e]]}static createTables(e){const t={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]};for(let r=0,n=e.length;n>r;++r){const n=e[r],a=Array.isArray(n[0])?(n[0][0]<<8)+n[0][1]:n[0];t.keyToNameMap[a]=n[1],t.nameToKeyMap[n[1]]=a,t.types[a]=n[2],t.defaults[a]=n[3],t.opcodes[a]=Array.isArray(n[0])?n[0]:[n[0]],t.order.push(a)}return t}}const g=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]];class m extends p{static get tables(){return(0,n.shadow)(this,"tables",this.createTables(g))}constructor(e){super(m.tables,e),this.privateDict=null}}t.CFFTopDict=m;const b=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]];class y extends p{static get tables(){return(0,n.shadow)(this,"tables",this.createTables(b))}constructor(e){super(y.tables,e),this.subrsIndex=null}}t.CFFPrivateDict=y;const w={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2};class v{constructor(e,t,r,n){this.predefined=e,this.format=t,this.charset=r,this.raw=n}}t.CFFCharset=v;class S{constructor(e,t,r,n){this.predefined=e,this.format=t,this.encoding=r,this.raw=n}}class x{constructor(e,t){this.format=e,this.fdSelect=t}getFDIndex(e){return 0>e||e>=this.fdSelect.length?-1:this.fdSelect[e]}}t.CFFFDSelect=x;class A{constructor(){this.offsets=Object.create(null)}isTracking(e){return e in this.offsets}track(e,t){if(e in this.offsets)throw new n.FormatError("Already tracking location of "+e);this.offsets[e]=t}offset(e){for(const t in this.offsets)this.offsets[t]+=e}setEntryLocation(e,t,r){if(!(e in this.offsets))throw new n.FormatError("Not tracking location of "+e);const a=r.data,i=this.offsets[e];for(let e=0,r=t.length;r>e;++e){const r=5*e+i,s=r+1,o=r+2,c=r+3,l=r+4;if(29!==a[r]||0!==a[s]||0!==a[o]||0!==a[c]||0!==a[l])throw new n.FormatError("writing to an offset that is not empty");const h=t[e];a[r]=29,a[s]=h>>24&255,a[o]=h>>16&255,a[c]=h>>8&255,a[l]=255&h}}}class k{constructor(e){this.cff=e}compile(){const e=this.cff,t={data:[],length:0,add(e){this.data=this.data.concat(e),this.length=this.data.length}},r=this.compileHeader(e.header);t.add(r);const a=this.compileNameIndex(e.names);if(t.add(a),e.isCIDFont&&e.topDict.hasName("FontMatrix")){const t=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");for(let r=0,a=e.fdArray.length;a>r;r++){const a=e.fdArray[r];let i=t.slice(0);a.hasName("FontMatrix")&&(i=n.Util.transform(i,a.getByName("FontMatrix"))),a.setByName("FontMatrix",i)}}const i=e.topDict.getByName("XUID");i&&i.length>16&&e.topDict.removeByName("XUID"),e.topDict.setByName("charset",0);let s=this.compileTopDicts([e.topDict],t.length,e.isCIDFont);t.add(s.output);const o=s.trackers[0],c=this.compileStringIndex(e.strings.strings);t.add(c);const l=this.compileIndex(e.globalSubrIndex);if(t.add(l),e.encoding&&e.topDict.hasName("Encoding"))if(e.encoding.predefined)o.setEntryLocation("Encoding",[e.encoding.format],t);else{const r=this.compileEncoding(e.encoding);o.setEntryLocation("Encoding",[t.length],t),t.add(r)}const h=this.compileCharset(e.charset,e.charStrings.count,e.strings,e.isCIDFont);o.setEntryLocation("charset",[t.length],t),t.add(h);const u=this.compileCharStrings(e.charStrings);if(o.setEntryLocation("CharStrings",[t.length],t),t.add(u),e.isCIDFont){o.setEntryLocation("FDSelect",[t.length],t);const r=this.compileFDSelect(e.fdSelect);t.add(r),s=this.compileTopDicts(e.fdArray,t.length,!0),o.setEntryLocation("FDArray",[t.length],t),t.add(s.output),this.compilePrivateDicts(e.fdArray,s.trackers,t)}return this.compilePrivateDicts([e.topDict],[o],t),t.add([0]),t.data}encodeNumber(e){return Number.isInteger(e)?this.encodeInteger(e):this.encodeFloat(e)}static get EncodeFloatRegExp(){return(0,n.shadow)(this,"EncodeFloatRegExp",/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/)}encodeFloat(e){let t=""+e;const r=k.EncodeFloatRegExp.exec(t);if(r){const n=parseFloat("1e"+((r[2]?+r[2]:0)+r[1].length));t=""+Math.round(e*n)/n}let n,a,i="";for(n=0,a=t.length;a>n;++n){const e=t[n];i+="e"===e?"-"===t[++n]?"c":"b":"."===e?"a":"-"===e?"e":e}i+=1&i.length?"f":"ff";const s=[30];for(n=0,a=i.length;a>n;n+=2)s.push(parseInt(i.substring(n,n+2),16));return s}encodeInteger(e){let t;return t=-107>e||e>107?108>e||e>1131?-1131>e||e>-108?-32768>e||e>32767?[29,e>>24&255,e>>16&255,e>>8&255,255&e]:[28,e>>8&255,255&e]:[251+((e=-e-108)>>8),255&e]:[247+((e-=108)>>8),255&e]:[e+139],t}compileHeader(e){return[e.major,e.minor,4,e.offSize]}compileNameIndex(e){const t=new f;for(let r=0,a=e.length;a>r;++r){const a=e[r],i=Math.min(a.length,127);let s=Array(i);for(let e=0;i>e;e++){let t=a[e];("!">t||t>"~"||"["===t||"]"===t||"("===t||")"===t||"{"===t||"}"===t||"<"===t||">"===t||"/"===t||"%"===t)&&(t="_"),s[e]=t}s=s.join(""),""===s&&(s="Bad_Font_Name"),t.add((0,n.stringToBytes)(s))}return this.compileIndex(t)}compileTopDicts(e,t,r){const n=[];let a=new f;for(let i=0,s=e.length;s>i;++i){const s=e[i];r&&(s.removeByName("CIDFontVersion"),s.removeByName("CIDFontRevision"),s.removeByName("CIDFontType"),s.removeByName("CIDCount"),s.removeByName("UIDBase"));const o=new A,c=this.compileDict(s,o);n.push(o),a.add(c),o.offset(t)}return a=this.compileIndex(a,n),{trackers:n,output:a}}compilePrivateDicts(e,t,r){for(let a=0,i=e.length;i>a;++a){const i=e[a],s=i.privateDict;if(!s||!i.hasName("Private"))throw new n.FormatError("There must be a private dictionary.");const o=new A,c=this.compileDict(s,o);let l=r.length;if(o.offset(l),c.length||(l=0),t[a].setEntryLocation("Private",[c.length,l],r),r.add(c),s.subrsIndex&&s.hasName("Subrs")){const e=this.compileIndex(s.subrsIndex);o.setEntryLocation("Subrs",[c.length],r),r.add(e)}}}compileDict(e,t){const r=[];for(const a of e.order){if(!(a in e.values))continue;let i=e.values[a],s=e.types[a];if(Array.isArray(s)||(s=[s]),Array.isArray(i)||(i=[i]),0!==i.length){for(let o=0,c=s.length;c>o;++o){const c=s[o],l=i[o];switch(c){case"num":case"sid":r.push(...this.encodeNumber(l));break;case"offset":const s=e.keyToNameMap[a];t.isTracking(s)||t.track(s,r.length),r.push(29,0,0,0,0);break;case"array":case"delta":r.push(...this.encodeNumber(l));for(let e=1,t=i.length;t>e;++e)r.push(...this.encodeNumber(i[e]));break;default:throw new n.FormatError("Unknown data type of "+c)}}r.push(...e.opcodes[a])}}return r}compileStringIndex(e){const t=new f;for(let r=0,a=e.length;a>r;++r)t.add((0,n.stringToBytes)(e[r]));return this.compileIndex(t)}compileGlobalSubrIndex(){this.out.writeByteArray(this.compileIndex(this.cff.globalSubrIndex))}compileCharStrings(e){const t=new f;for(let r=0;e.count>r;r++){const n=e.get(r);t.add(0!==n.length?n:new Uint8Array([139,14]))}return this.compileIndex(t)}compileCharset(e,t,r,a){let i;const s=t-1;if(a)i=new Uint8Array([2,0,0,s>>8&255,255&s]);else{i=new Uint8Array(1+2*s),i[0]=0;let t=0;const a=e.charset.length;let o=!1;for(let s=1;i.length>s;s+=2){let c=0;if(a>t){const a=e.charset[t++];c=r.getSID(a),-1===c&&(c=0,o||(o=!0,(0,n.warn)(`Couldn't find ${a} in CFF strings`)))}i[s]=c>>8&255,i[s+1]=255&c}}return this.compileTypedArray(i)}compileEncoding(e){return this.compileTypedArray(e.raw)}compileFDSelect(e){const t=e.format;let r,n;switch(t){case 0:for(r=new Uint8Array(1+e.fdSelect.length),r[0]=t,n=0;e.fdSelect.length>n;n++)r[n+1]=e.fdSelect[n];break;case 3:const a=0;let i=e.fdSelect[0];const s=[t,0,0,a>>8&255,255&a,i];for(n=1;e.fdSelect.length>n;n++){const t=e.fdSelect[n];t!==i&&(s.push(n>>8&255,255&n,t),i=t)}const o=(s.length-3)/3;s[1]=o>>8&255,s[2]=255&o,s.push(n>>8&255,255&n),r=new Uint8Array(s)}return this.compileTypedArray(r)}compileTypedArray(e){const t=[];for(let r=0,n=e.length;n>r;++r)t[r]=e[r];return t}compileIndex(e,t=[]){const r=e.objects,n=r.length;if(0===n)return[0,0];const a=[n>>8&255,255&n];let i,s,o=1;for(i=0;n>i;++i)o+=r[i].length;s=256>o?1:65536>o?2:16777216>o?3:4,a.push(s);let c=1;for(i=0;n+1>i;i++)1===s?a.push(255&c):2===s?a.push(c>>8&255,255&c):3===s?a.push(c>>16&255,c>>8&255,255&c):a.push(c>>>24&255,c>>16&255,c>>8&255,255&c),r[i]&&(c+=r[i].length);for(i=0;n>i;i++){t[i]&&t[i].offset(a.length);for(let e=0,t=r[i].length;t>e;e++)a.push(r[i][e])}return a}}t.CFFCompiler=k},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ISOAdobeCharset=t.ExpertSubsetCharset=t.ExpertCharset=void 0,t.ISOAdobeCharset=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],t.ExpertCharset=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],t.ExpertSubsetCharset=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"]},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ZapfDingbatsEncoding=t.WinAnsiEncoding=t.SymbolSetEncoding=t.StandardEncoding=t.MacRomanEncoding=t.ExpertEncoding=void 0,t.getEncoding=function(e){switch(e){case"WinAnsiEncoding":return s;case"StandardEncoding":return i;case"MacRomanEncoding":return a;case"SymbolSetEncoding":return o;case"ZapfDingbatsEncoding":return c;case"ExpertEncoding":return r;case"MacExpertEncoding":return n;default:return null}};const r=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"];t.ExpertEncoding=r;const n=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","centoldstyle","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","","threequartersemdash","","questionsmall","","","","","Ethsmall","","","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","","","","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hypheninferior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","asuperior","centsuperior","","","","","Aacutesmall","Agravesmall","Acircumflexsmall","Adieresissmall","Atildesmall","Aringsmall","Ccedillasmall","Eacutesmall","Egravesmall","Ecircumflexsmall","Edieresissmall","Iacutesmall","Igravesmall","Icircumflexsmall","Idieresissmall","Ntildesmall","Oacutesmall","Ogravesmall","Ocircumflexsmall","Odieresissmall","Otildesmall","Uacutesmall","Ugravesmall","Ucircumflexsmall","Udieresissmall","","eightsuperior","fourinferior","threeinferior","sixinferior","eightinferior","seveninferior","Scaronsmall","","centinferior","twoinferior","","Dieresissmall","","Caronsmall","osuperior","fiveinferior","","commainferior","periodinferior","Yacutesmall","","dollarinferior","","","Thornsmall","","nineinferior","zeroinferior","Zcaronsmall","AEsmall","Oslashsmall","questiondownsmall","oneinferior","Lslashsmall","","","","","","","Cedillasmall","","","","","","OEsmall","figuredash","hyphensuperior","","","","","exclamdownsmall","","Ydieresissmall","","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","ninesuperior","zerosuperior","","esuperior","rsuperior","tsuperior","","","isuperior","ssuperior","dsuperior","","","","","","lsuperior","Ogoneksmall","Brevesmall","Macronsmall","bsuperior","nsuperior","msuperior","commasuperior","periodsuperior","Dotaccentsmall","Ringsmall","","","",""],a=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","space","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron"];t.MacRomanEncoding=a;const i=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls","","","",""];t.StandardEncoding=i;const s=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","bullet","Euro","bullet","quotesinglbase","florin","quotedblbase","ellipsis","dagger","daggerdbl","circumflex","perthousand","Scaron","guilsinglleft","OE","bullet","Zcaron","bullet","bullet","quoteleft","quoteright","quotedblleft","quotedblright","bullet","endash","emdash","tilde","trademark","scaron","guilsinglright","oe","bullet","zcaron","Ydieresis","space","exclamdown","cent","sterling","currency","yen","brokenbar","section","dieresis","copyright","ordfeminine","guillemotleft","logicalnot","hyphen","registered","macron","degree","plusminus","twosuperior","threesuperior","acute","mu","paragraph","periodcentered","cedilla","onesuperior","ordmasculine","guillemotright","onequarter","onehalf","threequarters","questiondown","Agrave","Aacute","Acircumflex","Atilde","Adieresis","Aring","AE","Ccedilla","Egrave","Eacute","Ecircumflex","Edieresis","Igrave","Iacute","Icircumflex","Idieresis","Eth","Ntilde","Ograve","Oacute","Ocircumflex","Otilde","Odieresis","multiply","Oslash","Ugrave","Uacute","Ucircumflex","Udieresis","Yacute","Thorn","germandbls","agrave","aacute","acircumflex","atilde","adieresis","aring","ae","ccedilla","egrave","eacute","ecircumflex","edieresis","igrave","iacute","icircumflex","idieresis","eth","ntilde","ograve","oacute","ocircumflex","otilde","odieresis","divide","oslash","ugrave","uacute","ucircumflex","udieresis","yacute","thorn","ydieresis"];t.WinAnsiEncoding=s;const o=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","universal","numbersign","existential","percent","ampersand","suchthat","parenleft","parenright","asteriskmath","plus","comma","minus","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","congruent","Alpha","Beta","Chi","Delta","Epsilon","Phi","Gamma","Eta","Iota","theta1","Kappa","Lambda","Mu","Nu","Omicron","Pi","Theta","Rho","Sigma","Tau","Upsilon","sigma1","Omega","Xi","Psi","Zeta","bracketleft","therefore","bracketright","perpendicular","underscore","radicalex","alpha","beta","chi","delta","epsilon","phi","gamma","eta","iota","phi1","kappa","lambda","mu","nu","omicron","pi","theta","rho","sigma","tau","upsilon","omega1","omega","xi","psi","zeta","braceleft","bar","braceright","similar","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Euro","Upsilon1","minute","lessequal","fraction","infinity","florin","club","diamond","heart","spade","arrowboth","arrowleft","arrowup","arrowright","arrowdown","degree","plusminus","second","greaterequal","multiply","proportional","partialdiff","bullet","divide","notequal","equivalence","approxequal","ellipsis","arrowvertex","arrowhorizex","carriagereturn","aleph","Ifraktur","Rfraktur","weierstrass","circlemultiply","circleplus","emptyset","intersection","union","propersuperset","reflexsuperset","notsubset","propersubset","reflexsubset","element","notelement","angle","gradient","registerserif","copyrightserif","trademarkserif","product","radical","dotmath","logicalnot","logicaland","logicalor","arrowdblboth","arrowdblleft","arrowdblup","arrowdblright","arrowdbldown","lozenge","angleleft","registersans","copyrightsans","trademarksans","summation","parenlefttp","parenleftex","parenleftbt","bracketlefttp","bracketleftex","bracketleftbt","bracelefttp","braceleftmid","braceleftbt","braceex","","angleright","integral","integraltp","integralex","integralbt","parenrighttp","parenrightex","parenrightbt","bracketrighttp","bracketrightex","bracketrightbt","bracerighttp","bracerightmid","bracerightbt",""];t.SymbolSetEncoding=o;const c=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","a1","a2","a202","a3","a4","a5","a119","a118","a117","a11","a12","a13","a14","a15","a16","a105","a17","a18","a19","a20","a21","a22","a23","a24","a25","a26","a27","a28","a6","a7","a8","a9","a10","a29","a30","a31","a32","a33","a34","a35","a36","a37","a38","a39","a40","a41","a42","a43","a44","a45","a46","a47","a48","a49","a50","a51","a52","a53","a54","a55","a56","a57","a58","a59","a60","a61","a62","a63","a64","a65","a66","a67","a68","a69","a70","a71","a72","a73","a74","a203","a75","a204","a76","a77","a78","a79","a81","a82","a83","a84","a97","a98","a99","a100","","a89","a90","a93","a94","a91","a92","a205","a85","a206","a86","a87","a88","a95","a96","","","","","","","","","","","","","","","","","","","","a101","a102","a103","a104","a106","a107","a108","a112","a111","a110","a109","a120","a121","a122","a123","a124","a125","a126","a127","a128","a129","a130","a131","a132","a133","a134","a135","a136","a137","a138","a139","a140","a141","a142","a143","a144","a145","a146","a147","a148","a149","a150","a151","a152","a153","a154","a155","a156","a157","a158","a159","a160","a161","a163","a164","a196","a165","a192","a166","a167","a168","a169","a170","a171","a172","a173","a162","a174","a175","a176","a177","a178","a179","a193","a180","a199","a181","a200","a182","","a201","a183","a184","a197","a185","a194","a198","a186","a195","a187","a188","a189","a190","a191",""];t.ZapfDingbatsEncoding=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SEAC_ANALYSIS_ENABLED=t.MacStandardGlyphOrdering=t.FontFlags=void 0,t.getFontType=function(e,t,r=!1){switch(e){case"Type1":return r?n.FontType.TYPE1STANDARD:"Type1C"===t?n.FontType.TYPE1C:n.FontType.TYPE1;case"CIDFontType0":return"CIDFontType0C"===t?n.FontType.CIDFONTTYPE0C:n.FontType.CIDFONTTYPE0;case"OpenType":return n.FontType.OPENTYPE;case"TrueType":return n.FontType.TRUETYPE;case"CIDFontType2":return n.FontType.CIDFONTTYPE2;case"MMType1":return n.FontType.MMTYPE1;case"Type0":return n.FontType.TYPE0;default:return n.FontType.UNKNOWN}},t.normalizeFontName=function(e){return e.replace(/[,_]/g,"-").replace(/\s/g,"")},t.recoverGlyphName=c,t.type1FontGlyphMapping=function(e,t,r){const n=Object.create(null);let s,l,h;const u=!!(e.flags&o.Symbolic);if(e.isInternalFont)for(h=t,l=0;h.length>l;l++)s=r.indexOf(h[l]),n[l]=0>s?0:s;else if(e.baseEncodingName)for(h=(0,a.getEncoding)(e.baseEncodingName),l=0;h.length>l;l++)s=r.indexOf(h[l]),n[l]=0>s?0:s;else if(u)for(l in t)n[l]=t[l];else for(h=a.StandardEncoding,l=0;h.length>l;l++)s=r.indexOf(h[l]),n[l]=0>s?0:s;const d=e.differences;let f;if(d)for(l in d){const e=d[l];if(s=r.indexOf(e),-1===s){f||(f=(0,i.getGlyphsUnicode)());const t=c(e,f);t!==e&&(s=r.indexOf(t))}n[l]=0>s?0:s}return n};var n=r(2),a=r(37),i=r(39),s=r(40);t.SEAC_ANALYSIS_ENABLED=!0;const o={FixedPitch:1,Serif:2,Symbolic:4,Script:8,Nonsymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,ForceBold:262144};function c(e,t){if(void 0!==t[e])return e;const r=(0,s.getUnicodeForGlyph)(e,t);if(-1!==r)for(const e in t)if(t[e]===r)return e;return(0,n.info)("Unable to recover a standard glyph name for: "+e),e}t.FontFlags=o,t.MacStandardGlyphOrdering=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"]},(e,t,r)=>{r.r(t),r.d(t,{getDingbatsGlyphsUnicode:()=>i,getGlyphsUnicode:()=>a});var n=r(6);const a=(0,n.getArrayLookupTableFactory)((function(){return["A",65,"AE",198,"AEacute",508,"AEmacron",482,"AEsmall",63462,"Aacute",193,"Aacutesmall",63457,"Abreve",258,"Abreveacute",7854,"Abrevecyrillic",1232,"Abrevedotbelow",7862,"Abrevegrave",7856,"Abrevehookabove",7858,"Abrevetilde",7860,"Acaron",461,"Acircle",9398,"Acircumflex",194,"Acircumflexacute",7844,"Acircumflexdotbelow",7852,"Acircumflexgrave",7846,"Acircumflexhookabove",7848,"Acircumflexsmall",63458,"Acircumflextilde",7850,"Acute",63177,"Acutesmall",63412,"Acyrillic",1040,"Adblgrave",512,"Adieresis",196,"Adieresiscyrillic",1234,"Adieresismacron",478,"Adieresissmall",63460,"Adotbelow",7840,"Adotmacron",480,"Agrave",192,"Agravesmall",63456,"Ahookabove",7842,"Aiecyrillic",1236,"Ainvertedbreve",514,"Alpha",913,"Alphatonos",902,"Amacron",256,"Amonospace",65313,"Aogonek",260,"Aring",197,"Aringacute",506,"Aringbelow",7680,"Aringsmall",63461,"Asmall",63329,"Atilde",195,"Atildesmall",63459,"Aybarmenian",1329,"B",66,"Bcircle",9399,"Bdotaccent",7682,"Bdotbelow",7684,"Becyrillic",1041,"Benarmenian",1330,"Beta",914,"Bhook",385,"Blinebelow",7686,"Bmonospace",65314,"Brevesmall",63220,"Bsmall",63330,"Btopbar",386,"C",67,"Caarmenian",1342,"Cacute",262,"Caron",63178,"Caronsmall",63221,"Ccaron",268,"Ccedilla",199,"Ccedillaacute",7688,"Ccedillasmall",63463,"Ccircle",9400,"Ccircumflex",264,"Cdot",266,"Cdotaccent",266,"Cedillasmall",63416,"Chaarmenian",1353,"Cheabkhasiancyrillic",1212,"Checyrillic",1063,"Chedescenderabkhasiancyrillic",1214,"Chedescendercyrillic",1206,"Chedieresiscyrillic",1268,"Cheharmenian",1347,"Chekhakassiancyrillic",1227,"Cheverticalstrokecyrillic",1208,"Chi",935,"Chook",391,"Circumflexsmall",63222,"Cmonospace",65315,"Coarmenian",1361,"Csmall",63331,"D",68,"DZ",497,"DZcaron",452,"Daarmenian",1332,"Dafrican",393,"Dcaron",270,"Dcedilla",7696,"Dcircle",9401,"Dcircumflexbelow",7698,"Dcroat",272,"Ddotaccent",7690,"Ddotbelow",7692,"Decyrillic",1044,"Deicoptic",1006,"Delta",8710,"Deltagreek",916,"Dhook",394,"Dieresis",63179,"DieresisAcute",63180,"DieresisGrave",63181,"Dieresissmall",63400,"Digammagreek",988,"Djecyrillic",1026,"Dlinebelow",7694,"Dmonospace",65316,"Dotaccentsmall",63223,"Dslash",272,"Dsmall",63332,"Dtopbar",395,"Dz",498,"Dzcaron",453,"Dzeabkhasiancyrillic",1248,"Dzecyrillic",1029,"Dzhecyrillic",1039,"E",69,"Eacute",201,"Eacutesmall",63465,"Ebreve",276,"Ecaron",282,"Ecedillabreve",7708,"Echarmenian",1333,"Ecircle",9402,"Ecircumflex",202,"Ecircumflexacute",7870,"Ecircumflexbelow",7704,"Ecircumflexdotbelow",7878,"Ecircumflexgrave",7872,"Ecircumflexhookabove",7874,"Ecircumflexsmall",63466,"Ecircumflextilde",7876,"Ecyrillic",1028,"Edblgrave",516,"Edieresis",203,"Edieresissmall",63467,"Edot",278,"Edotaccent",278,"Edotbelow",7864,"Efcyrillic",1060,"Egrave",200,"Egravesmall",63464,"Eharmenian",1335,"Ehookabove",7866,"Eightroman",8551,"Einvertedbreve",518,"Eiotifiedcyrillic",1124,"Elcyrillic",1051,"Elevenroman",8554,"Emacron",274,"Emacronacute",7702,"Emacrongrave",7700,"Emcyrillic",1052,"Emonospace",65317,"Encyrillic",1053,"Endescendercyrillic",1186,"Eng",330,"Enghecyrillic",1188,"Enhookcyrillic",1223,"Eogonek",280,"Eopen",400,"Epsilon",917,"Epsilontonos",904,"Ercyrillic",1056,"Ereversed",398,"Ereversedcyrillic",1069,"Escyrillic",1057,"Esdescendercyrillic",1194,"Esh",425,"Esmall",63333,"Eta",919,"Etarmenian",1336,"Etatonos",905,"Eth",208,"Ethsmall",63472,"Etilde",7868,"Etildebelow",7706,"Euro",8364,"Ezh",439,"Ezhcaron",494,"Ezhreversed",440,"F",70,"Fcircle",9403,"Fdotaccent",7710,"Feharmenian",1366,"Feicoptic",996,"Fhook",401,"Fitacyrillic",1138,"Fiveroman",8548,"Fmonospace",65318,"Fourroman",8547,"Fsmall",63334,"G",71,"GBsquare",13191,"Gacute",500,"Gamma",915,"Gammaafrican",404,"Gangiacoptic",1002,"Gbreve",286,"Gcaron",486,"Gcedilla",290,"Gcircle",9404,"Gcircumflex",284,"Gcommaaccent",290,"Gdot",288,"Gdotaccent",288,"Gecyrillic",1043,"Ghadarmenian",1346,"Ghemiddlehookcyrillic",1172,"Ghestrokecyrillic",1170,"Gheupturncyrillic",1168,"Ghook",403,"Gimarmenian",1331,"Gjecyrillic",1027,"Gmacron",7712,"Gmonospace",65319,"Grave",63182,"Gravesmall",63328,"Gsmall",63335,"Gsmallhook",667,"Gstroke",484,"H",72,"H18533",9679,"H18543",9642,"H18551",9643,"H22073",9633,"HPsquare",13259,"Haabkhasiancyrillic",1192,"Hadescendercyrillic",1202,"Hardsigncyrillic",1066,"Hbar",294,"Hbrevebelow",7722,"Hcedilla",7720,"Hcircle",9405,"Hcircumflex",292,"Hdieresis",7718,"Hdotaccent",7714,"Hdotbelow",7716,"Hmonospace",65320,"Hoarmenian",1344,"Horicoptic",1e3,"Hsmall",63336,"Hungarumlaut",63183,"Hungarumlautsmall",63224,"Hzsquare",13200,"I",73,"IAcyrillic",1071,"IJ",306,"IUcyrillic",1070,"Iacute",205,"Iacutesmall",63469,"Ibreve",300,"Icaron",463,"Icircle",9406,"Icircumflex",206,"Icircumflexsmall",63470,"Icyrillic",1030,"Idblgrave",520,"Idieresis",207,"Idieresisacute",7726,"Idieresiscyrillic",1252,"Idieresissmall",63471,"Idot",304,"Idotaccent",304,"Idotbelow",7882,"Iebrevecyrillic",1238,"Iecyrillic",1045,"Ifraktur",8465,"Igrave",204,"Igravesmall",63468,"Ihookabove",7880,"Iicyrillic",1048,"Iinvertedbreve",522,"Iishortcyrillic",1049,"Imacron",298,"Imacroncyrillic",1250,"Imonospace",65321,"Iniarmenian",1339,"Iocyrillic",1025,"Iogonek",302,"Iota",921,"Iotaafrican",406,"Iotadieresis",938,"Iotatonos",906,"Ismall",63337,"Istroke",407,"Itilde",296,"Itildebelow",7724,"Izhitsacyrillic",1140,"Izhitsadblgravecyrillic",1142,"J",74,"Jaarmenian",1345,"Jcircle",9407,"Jcircumflex",308,"Jecyrillic",1032,"Jheharmenian",1355,"Jmonospace",65322,"Jsmall",63338,"K",75,"KBsquare",13189,"KKsquare",13261,"Kabashkircyrillic",1184,"Kacute",7728,"Kacyrillic",1050,"Kadescendercyrillic",1178,"Kahookcyrillic",1219,"Kappa",922,"Kastrokecyrillic",1182,"Kaverticalstrokecyrillic",1180,"Kcaron",488,"Kcedilla",310,"Kcircle",9408,"Kcommaaccent",310,"Kdotbelow",7730,"Keharmenian",1364,"Kenarmenian",1343,"Khacyrillic",1061,"Kheicoptic",998,"Khook",408,"Kjecyrillic",1036,"Klinebelow",7732,"Kmonospace",65323,"Koppacyrillic",1152,"Koppagreek",990,"Ksicyrillic",1134,"Ksmall",63339,"L",76,"LJ",455,"LL",63167,"Lacute",313,"Lambda",923,"Lcaron",317,"Lcedilla",315,"Lcircle",9409,"Lcircumflexbelow",7740,"Lcommaaccent",315,"Ldot",319,"Ldotaccent",319,"Ldotbelow",7734,"Ldotbelowmacron",7736,"Liwnarmenian",1340,"Lj",456,"Ljecyrillic",1033,"Llinebelow",7738,"Lmonospace",65324,"Lslash",321,"Lslashsmall",63225,"Lsmall",63340,"M",77,"MBsquare",13190,"Macron",63184,"Macronsmall",63407,"Macute",7742,"Mcircle",9410,"Mdotaccent",7744,"Mdotbelow",7746,"Menarmenian",1348,"Mmonospace",65325,"Msmall",63341,"Mturned",412,"Mu",924,"N",78,"NJ",458,"Nacute",323,"Ncaron",327,"Ncedilla",325,"Ncircle",9411,"Ncircumflexbelow",7754,"Ncommaaccent",325,"Ndotaccent",7748,"Ndotbelow",7750,"Nhookleft",413,"Nineroman",8552,"Nj",459,"Njecyrillic",1034,"Nlinebelow",7752,"Nmonospace",65326,"Nowarmenian",1350,"Nsmall",63342,"Ntilde",209,"Ntildesmall",63473,"Nu",925,"O",79,"OE",338,"OEsmall",63226,"Oacute",211,"Oacutesmall",63475,"Obarredcyrillic",1256,"Obarreddieresiscyrillic",1258,"Obreve",334,"Ocaron",465,"Ocenteredtilde",415,"Ocircle",9412,"Ocircumflex",212,"Ocircumflexacute",7888,"Ocircumflexdotbelow",7896,"Ocircumflexgrave",7890,"Ocircumflexhookabove",7892,"Ocircumflexsmall",63476,"Ocircumflextilde",7894,"Ocyrillic",1054,"Odblacute",336,"Odblgrave",524,"Odieresis",214,"Odieresiscyrillic",1254,"Odieresissmall",63478,"Odotbelow",7884,"Ogoneksmall",63227,"Ograve",210,"Ogravesmall",63474,"Oharmenian",1365,"Ohm",8486,"Ohookabove",7886,"Ohorn",416,"Ohornacute",7898,"Ohorndotbelow",7906,"Ohorngrave",7900,"Ohornhookabove",7902,"Ohorntilde",7904,"Ohungarumlaut",336,"Oi",418,"Oinvertedbreve",526,"Omacron",332,"Omacronacute",7762,"Omacrongrave",7760,"Omega",8486,"Omegacyrillic",1120,"Omegagreek",937,"Omegaroundcyrillic",1146,"Omegatitlocyrillic",1148,"Omegatonos",911,"Omicron",927,"Omicrontonos",908,"Omonospace",65327,"Oneroman",8544,"Oogonek",490,"Oogonekmacron",492,"Oopen",390,"Oslash",216,"Oslashacute",510,"Oslashsmall",63480,"Osmall",63343,"Ostrokeacute",510,"Otcyrillic",1150,"Otilde",213,"Otildeacute",7756,"Otildedieresis",7758,"Otildesmall",63477,"P",80,"Pacute",7764,"Pcircle",9413,"Pdotaccent",7766,"Pecyrillic",1055,"Peharmenian",1354,"Pemiddlehookcyrillic",1190,"Phi",934,"Phook",420,"Pi",928,"Piwrarmenian",1363,"Pmonospace",65328,"Psi",936,"Psicyrillic",1136,"Psmall",63344,"Q",81,"Qcircle",9414,"Qmonospace",65329,"Qsmall",63345,"R",82,"Raarmenian",1356,"Racute",340,"Rcaron",344,"Rcedilla",342,"Rcircle",9415,"Rcommaaccent",342,"Rdblgrave",528,"Rdotaccent",7768,"Rdotbelow",7770,"Rdotbelowmacron",7772,"Reharmenian",1360,"Rfraktur",8476,"Rho",929,"Ringsmall",63228,"Rinvertedbreve",530,"Rlinebelow",7774,"Rmonospace",65330,"Rsmall",63346,"Rsmallinverted",641,"Rsmallinvertedsuperior",694,"S",83,"SF010000",9484,"SF020000",9492,"SF030000",9488,"SF040000",9496,"SF050000",9532,"SF060000",9516,"SF070000",9524,"SF080000",9500,"SF090000",9508,"SF100000",9472,"SF110000",9474,"SF190000",9569,"SF200000",9570,"SF210000",9558,"SF220000",9557,"SF230000",9571,"SF240000",9553,"SF250000",9559,"SF260000",9565,"SF270000",9564,"SF280000",9563,"SF360000",9566,"SF370000",9567,"SF380000",9562,"SF390000",9556,"SF400000",9577,"SF410000",9574,"SF420000",9568,"SF430000",9552,"SF440000",9580,"SF450000",9575,"SF460000",9576,"SF470000",9572,"SF480000",9573,"SF490000",9561,"SF500000",9560,"SF510000",9554,"SF520000",9555,"SF530000",9579,"SF540000",9578,"Sacute",346,"Sacutedotaccent",7780,"Sampigreek",992,"Scaron",352,"Scarondotaccent",7782,"Scaronsmall",63229,"Scedilla",350,"Schwa",399,"Schwacyrillic",1240,"Schwadieresiscyrillic",1242,"Scircle",9416,"Scircumflex",348,"Scommaaccent",536,"Sdotaccent",7776,"Sdotbelow",7778,"Sdotbelowdotaccent",7784,"Seharmenian",1357,"Sevenroman",8550,"Shaarmenian",1351,"Shacyrillic",1064,"Shchacyrillic",1065,"Sheicoptic",994,"Shhacyrillic",1210,"Shimacoptic",1004,"Sigma",931,"Sixroman",8549,"Smonospace",65331,"Softsigncyrillic",1068,"Ssmall",63347,"Stigmagreek",986,"T",84,"Tau",932,"Tbar",358,"Tcaron",356,"Tcedilla",354,"Tcircle",9417,"Tcircumflexbelow",7792,"Tcommaaccent",354,"Tdotaccent",7786,"Tdotbelow",7788,"Tecyrillic",1058,"Tedescendercyrillic",1196,"Tenroman",8553,"Tetsecyrillic",1204,"Theta",920,"Thook",428,"Thorn",222,"Thornsmall",63486,"Threeroman",8546,"Tildesmall",63230,"Tiwnarmenian",1359,"Tlinebelow",7790,"Tmonospace",65332,"Toarmenian",1337,"Tonefive",444,"Tonesix",388,"Tonetwo",423,"Tretroflexhook",430,"Tsecyrillic",1062,"Tshecyrillic",1035,"Tsmall",63348,"Twelveroman",8555,"Tworoman",8545,"U",85,"Uacute",218,"Uacutesmall",63482,"Ubreve",364,"Ucaron",467,"Ucircle",9418,"Ucircumflex",219,"Ucircumflexbelow",7798,"Ucircumflexsmall",63483,"Ucyrillic",1059,"Udblacute",368,"Udblgrave",532,"Udieresis",220,"Udieresisacute",471,"Udieresisbelow",7794,"Udieresiscaron",473,"Udieresiscyrillic",1264,"Udieresisgrave",475,"Udieresismacron",469,"Udieresissmall",63484,"Udotbelow",7908,"Ugrave",217,"Ugravesmall",63481,"Uhookabove",7910,"Uhorn",431,"Uhornacute",7912,"Uhorndotbelow",7920,"Uhorngrave",7914,"Uhornhookabove",7916,"Uhorntilde",7918,"Uhungarumlaut",368,"Uhungarumlautcyrillic",1266,"Uinvertedbreve",534,"Ukcyrillic",1144,"Umacron",362,"Umacroncyrillic",1262,"Umacrondieresis",7802,"Umonospace",65333,"Uogonek",370,"Upsilon",933,"Upsilon1",978,"Upsilonacutehooksymbolgreek",979,"Upsilonafrican",433,"Upsilondieresis",939,"Upsilondieresishooksymbolgreek",980,"Upsilonhooksymbol",978,"Upsilontonos",910,"Uring",366,"Ushortcyrillic",1038,"Usmall",63349,"Ustraightcyrillic",1198,"Ustraightstrokecyrillic",1200,"Utilde",360,"Utildeacute",7800,"Utildebelow",7796,"V",86,"Vcircle",9419,"Vdotbelow",7806,"Vecyrillic",1042,"Vewarmenian",1358,"Vhook",434,"Vmonospace",65334,"Voarmenian",1352,"Vsmall",63350,"Vtilde",7804,"W",87,"Wacute",7810,"Wcircle",9420,"Wcircumflex",372,"Wdieresis",7812,"Wdotaccent",7814,"Wdotbelow",7816,"Wgrave",7808,"Wmonospace",65335,"Wsmall",63351,"X",88,"Xcircle",9421,"Xdieresis",7820,"Xdotaccent",7818,"Xeharmenian",1341,"Xi",926,"Xmonospace",65336,"Xsmall",63352,"Y",89,"Yacute",221,"Yacutesmall",63485,"Yatcyrillic",1122,"Ycircle",9422,"Ycircumflex",374,"Ydieresis",376,"Ydieresissmall",63487,"Ydotaccent",7822,"Ydotbelow",7924,"Yericyrillic",1067,"Yerudieresiscyrillic",1272,"Ygrave",7922,"Yhook",435,"Yhookabove",7926,"Yiarmenian",1349,"Yicyrillic",1031,"Yiwnarmenian",1362,"Ymonospace",65337,"Ysmall",63353,"Ytilde",7928,"Yusbigcyrillic",1130,"Yusbigiotifiedcyrillic",1132,"Yuslittlecyrillic",1126,"Yuslittleiotifiedcyrillic",1128,"Z",90,"Zaarmenian",1334,"Zacute",377,"Zcaron",381,"Zcaronsmall",63231,"Zcircle",9423,"Zcircumflex",7824,"Zdot",379,"Zdotaccent",379,"Zdotbelow",7826,"Zecyrillic",1047,"Zedescendercyrillic",1176,"Zedieresiscyrillic",1246,"Zeta",918,"Zhearmenian",1338,"Zhebrevecyrillic",1217,"Zhecyrillic",1046,"Zhedescendercyrillic",1174,"Zhedieresiscyrillic",1244,"Zlinebelow",7828,"Zmonospace",65338,"Zsmall",63354,"Zstroke",437,"a",97,"aabengali",2438,"aacute",225,"aadeva",2310,"aagujarati",2694,"aagurmukhi",2566,"aamatragurmukhi",2622,"aarusquare",13059,"aavowelsignbengali",2494,"aavowelsigndeva",2366,"aavowelsigngujarati",2750,"abbreviationmarkarmenian",1375,"abbreviationsigndeva",2416,"abengali",2437,"abopomofo",12570,"abreve",259,"abreveacute",7855,"abrevecyrillic",1233,"abrevedotbelow",7863,"abrevegrave",7857,"abrevehookabove",7859,"abrevetilde",7861,"acaron",462,"acircle",9424,"acircumflex",226,"acircumflexacute",7845,"acircumflexdotbelow",7853,"acircumflexgrave",7847,"acircumflexhookabove",7849,"acircumflextilde",7851,"acute",180,"acutebelowcmb",791,"acutecmb",769,"acutecomb",769,"acutedeva",2388,"acutelowmod",719,"acutetonecmb",833,"acyrillic",1072,"adblgrave",513,"addakgurmukhi",2673,"adeva",2309,"adieresis",228,"adieresiscyrillic",1235,"adieresismacron",479,"adotbelow",7841,"adotmacron",481,"ae",230,"aeacute",509,"aekorean",12624,"aemacron",483,"afii00208",8213,"afii08941",8356,"afii10017",1040,"afii10018",1041,"afii10019",1042,"afii10020",1043,"afii10021",1044,"afii10022",1045,"afii10023",1025,"afii10024",1046,"afii10025",1047,"afii10026",1048,"afii10027",1049,"afii10028",1050,"afii10029",1051,"afii10030",1052,"afii10031",1053,"afii10032",1054,"afii10033",1055,"afii10034",1056,"afii10035",1057,"afii10036",1058,"afii10037",1059,"afii10038",1060,"afii10039",1061,"afii10040",1062,"afii10041",1063,"afii10042",1064,"afii10043",1065,"afii10044",1066,"afii10045",1067,"afii10046",1068,"afii10047",1069,"afii10048",1070,"afii10049",1071,"afii10050",1168,"afii10051",1026,"afii10052",1027,"afii10053",1028,"afii10054",1029,"afii10055",1030,"afii10056",1031,"afii10057",1032,"afii10058",1033,"afii10059",1034,"afii10060",1035,"afii10061",1036,"afii10062",1038,"afii10063",63172,"afii10064",63173,"afii10065",1072,"afii10066",1073,"afii10067",1074,"afii10068",1075,"afii10069",1076,"afii10070",1077,"afii10071",1105,"afii10072",1078,"afii10073",1079,"afii10074",1080,"afii10075",1081,"afii10076",1082,"afii10077",1083,"afii10078",1084,"afii10079",1085,"afii10080",1086,"afii10081",1087,"afii10082",1088,"afii10083",1089,"afii10084",1090,"afii10085",1091,"afii10086",1092,"afii10087",1093,"afii10088",1094,"afii10089",1095,"afii10090",1096,"afii10091",1097,"afii10092",1098,"afii10093",1099,"afii10094",1100,"afii10095",1101,"afii10096",1102,"afii10097",1103,"afii10098",1169,"afii10099",1106,"afii10100",1107,"afii10101",1108,"afii10102",1109,"afii10103",1110,"afii10104",1111,"afii10105",1112,"afii10106",1113,"afii10107",1114,"afii10108",1115,"afii10109",1116,"afii10110",1118,"afii10145",1039,"afii10146",1122,"afii10147",1138,"afii10148",1140,"afii10192",63174,"afii10193",1119,"afii10194",1123,"afii10195",1139,"afii10196",1141,"afii10831",63175,"afii10832",63176,"afii10846",1241,"afii299",8206,"afii300",8207,"afii301",8205,"afii57381",1642,"afii57388",1548,"afii57392",1632,"afii57393",1633,"afii57394",1634,"afii57395",1635,"afii57396",1636,"afii57397",1637,"afii57398",1638,"afii57399",1639,"afii57400",1640,"afii57401",1641,"afii57403",1563,"afii57407",1567,"afii57409",1569,"afii57410",1570,"afii57411",1571,"afii57412",1572,"afii57413",1573,"afii57414",1574,"afii57415",1575,"afii57416",1576,"afii57417",1577,"afii57418",1578,"afii57419",1579,"afii57420",1580,"afii57421",1581,"afii57422",1582,"afii57423",1583,"afii57424",1584,"afii57425",1585,"afii57426",1586,"afii57427",1587,"afii57428",1588,"afii57429",1589,"afii57430",1590,"afii57431",1591,"afii57432",1592,"afii57433",1593,"afii57434",1594,"afii57440",1600,"afii57441",1601,"afii57442",1602,"afii57443",1603,"afii57444",1604,"afii57445",1605,"afii57446",1606,"afii57448",1608,"afii57449",1609,"afii57450",1610,"afii57451",1611,"afii57452",1612,"afii57453",1613,"afii57454",1614,"afii57455",1615,"afii57456",1616,"afii57457",1617,"afii57458",1618,"afii57470",1607,"afii57505",1700,"afii57506",1662,"afii57507",1670,"afii57508",1688,"afii57509",1711,"afii57511",1657,"afii57512",1672,"afii57513",1681,"afii57514",1722,"afii57519",1746,"afii57534",1749,"afii57636",8362,"afii57645",1470,"afii57658",1475,"afii57664",1488,"afii57665",1489,"afii57666",1490,"afii57667",1491,"afii57668",1492,"afii57669",1493,"afii57670",1494,"afii57671",1495,"afii57672",1496,"afii57673",1497,"afii57674",1498,"afii57675",1499,"afii57676",1500,"afii57677",1501,"afii57678",1502,"afii57679",1503,"afii57680",1504,"afii57681",1505,"afii57682",1506,"afii57683",1507,"afii57684",1508,"afii57685",1509,"afii57686",1510,"afii57687",1511,"afii57688",1512,"afii57689",1513,"afii57690",1514,"afii57694",64298,"afii57695",64299,"afii57700",64331,"afii57705",64287,"afii57716",1520,"afii57717",1521,"afii57718",1522,"afii57723",64309,"afii57793",1460,"afii57794",1461,"afii57795",1462,"afii57796",1467,"afii57797",1464,"afii57798",1463,"afii57799",1456,"afii57800",1458,"afii57801",1457,"afii57802",1459,"afii57803",1474,"afii57804",1473,"afii57806",1465,"afii57807",1468,"afii57839",1469,"afii57841",1471,"afii57842",1472,"afii57929",700,"afii61248",8453,"afii61289",8467,"afii61352",8470,"afii61573",8236,"afii61574",8237,"afii61575",8238,"afii61664",8204,"afii63167",1645,"afii64937",701,"agrave",224,"agujarati",2693,"agurmukhi",2565,"ahiragana",12354,"ahookabove",7843,"aibengali",2448,"aibopomofo",12574,"aideva",2320,"aiecyrillic",1237,"aigujarati",2704,"aigurmukhi",2576,"aimatragurmukhi",2632,"ainarabic",1593,"ainfinalarabic",65226,"aininitialarabic",65227,"ainmedialarabic",65228,"ainvertedbreve",515,"aivowelsignbengali",2504,"aivowelsigndeva",2376,"aivowelsigngujarati",2760,"akatakana",12450,"akatakanahalfwidth",65393,"akorean",12623,"alef",1488,"alefarabic",1575,"alefdageshhebrew",64304,"aleffinalarabic",65166,"alefhamzaabovearabic",1571,"alefhamzaabovefinalarabic",65156,"alefhamzabelowarabic",1573,"alefhamzabelowfinalarabic",65160,"alefhebrew",1488,"aleflamedhebrew",64335,"alefmaddaabovearabic",1570,"alefmaddaabovefinalarabic",65154,"alefmaksuraarabic",1609,"alefmaksurafinalarabic",65264,"alefmaksurainitialarabic",65267,"alefmaksuramedialarabic",65268,"alefpatahhebrew",64302,"alefqamatshebrew",64303,"aleph",8501,"allequal",8780,"alpha",945,"alphatonos",940,"amacron",257,"amonospace",65345,"ampersand",38,"ampersandmonospace",65286,"ampersandsmall",63270,"amsquare",13250,"anbopomofo",12578,"angbopomofo",12580,"angbracketleft",12296,"angbracketright",12297,"angkhankhuthai",3674,"angle",8736,"anglebracketleft",12296,"anglebracketleftvertical",65087,"anglebracketright",12297,"anglebracketrightvertical",65088,"angleleft",9001,"angleright",9002,"angstrom",8491,"anoteleia",903,"anudattadeva",2386,"anusvarabengali",2434,"anusvaradeva",2306,"anusvaragujarati",2690,"aogonek",261,"apaatosquare",13056,"aparen",9372,"apostrophearmenian",1370,"apostrophemod",700,"apple",63743,"approaches",8784,"approxequal",8776,"approxequalorimage",8786,"approximatelyequal",8773,"araeaekorean",12686,"araeakorean",12685,"arc",8978,"arighthalfring",7834,"aring",229,"aringacute",507,"aringbelow",7681,"arrowboth",8596,"arrowdashdown",8675,"arrowdashleft",8672,"arrowdashright",8674,"arrowdashup",8673,"arrowdblboth",8660,"arrowdbldown",8659,"arrowdblleft",8656,"arrowdblright",8658,"arrowdblup",8657,"arrowdown",8595,"arrowdownleft",8601,"arrowdownright",8600,"arrowdownwhite",8681,"arrowheaddownmod",709,"arrowheadleftmod",706,"arrowheadrightmod",707,"arrowheadupmod",708,"arrowhorizex",63719,"arrowleft",8592,"arrowleftdbl",8656,"arrowleftdblstroke",8653,"arrowleftoverright",8646,"arrowleftwhite",8678,"arrowright",8594,"arrowrightdblstroke",8655,"arrowrightheavy",10142,"arrowrightoverleft",8644,"arrowrightwhite",8680,"arrowtableft",8676,"arrowtabright",8677,"arrowup",8593,"arrowupdn",8597,"arrowupdnbse",8616,"arrowupdownbase",8616,"arrowupleft",8598,"arrowupleftofdown",8645,"arrowupright",8599,"arrowupwhite",8679,"arrowvertex",63718,"asciicircum",94,"asciicircummonospace",65342,"asciitilde",126,"asciitildemonospace",65374,"ascript",593,"ascriptturned",594,"asmallhiragana",12353,"asmallkatakana",12449,"asmallkatakanahalfwidth",65383,"asterisk",42,"asteriskaltonearabic",1645,"asteriskarabic",1645,"asteriskmath",8727,"asteriskmonospace",65290,"asterisksmall",65121,"asterism",8258,"asuperior",63209,"asymptoticallyequal",8771,"at",64,"atilde",227,"atmonospace",65312,"atsmall",65131,"aturned",592,"aubengali",2452,"aubopomofo",12576,"audeva",2324,"augujarati",2708,"augurmukhi",2580,"aulengthmarkbengali",2519,"aumatragurmukhi",2636,"auvowelsignbengali",2508,"auvowelsigndeva",2380,"auvowelsigngujarati",2764,"avagrahadeva",2365,"aybarmenian",1377,"ayin",1506,"ayinaltonehebrew",64288,"ayinhebrew",1506,"b",98,"babengali",2476,"backslash",92,"backslashmonospace",65340,"badeva",2348,"bagujarati",2732,"bagurmukhi",2604,"bahiragana",12400,"bahtthai",3647,"bakatakana",12496,"bar",124,"barmonospace",65372,"bbopomofo",12549,"bcircle",9425,"bdotaccent",7683,"bdotbelow",7685,"beamedsixteenthnotes",9836,"because",8757,"becyrillic",1073,"beharabic",1576,"behfinalarabic",65168,"behinitialarabic",65169,"behiragana",12409,"behmedialarabic",65170,"behmeeminitialarabic",64671,"behmeemisolatedarabic",64520,"behnoonfinalarabic",64621,"bekatakana",12505,"benarmenian",1378,"bet",1489,"beta",946,"betasymbolgreek",976,"betdagesh",64305,"betdageshhebrew",64305,"bethebrew",1489,"betrafehebrew",64332,"bhabengali",2477,"bhadeva",2349,"bhagujarati",2733,"bhagurmukhi",2605,"bhook",595,"bihiragana",12403,"bikatakana",12499,"bilabialclick",664,"bindigurmukhi",2562,"birusquare",13105,"blackcircle",9679,"blackdiamond",9670,"blackdownpointingtriangle",9660,"blackleftpointingpointer",9668,"blackleftpointingtriangle",9664,"blacklenticularbracketleft",12304,"blacklenticularbracketleftvertical",65083,"blacklenticularbracketright",12305,"blacklenticularbracketrightvertical",65084,"blacklowerlefttriangle",9699,"blacklowerrighttriangle",9698,"blackrectangle",9644,"blackrightpointingpointer",9658,"blackrightpointingtriangle",9654,"blacksmallsquare",9642,"blacksmilingface",9787,"blacksquare",9632,"blackstar",9733,"blackupperlefttriangle",9700,"blackupperrighttriangle",9701,"blackuppointingsmalltriangle",9652,"blackuppointingtriangle",9650,"blank",9251,"blinebelow",7687,"block",9608,"bmonospace",65346,"bobaimaithai",3610,"bohiragana",12412,"bokatakana",12508,"bparen",9373,"bqsquare",13251,"braceex",63732,"braceleft",123,"braceleftbt",63731,"braceleftmid",63730,"braceleftmonospace",65371,"braceleftsmall",65115,"bracelefttp",63729,"braceleftvertical",65079,"braceright",125,"bracerightbt",63742,"bracerightmid",63741,"bracerightmonospace",65373,"bracerightsmall",65116,"bracerighttp",63740,"bracerightvertical",65080,"bracketleft",91,"bracketleftbt",63728,"bracketleftex",63727,"bracketleftmonospace",65339,"bracketlefttp",63726,"bracketright",93,"bracketrightbt",63739,"bracketrightex",63738,"bracketrightmonospace",65341,"bracketrighttp",63737,"breve",728,"brevebelowcmb",814,"brevecmb",774,"breveinvertedbelowcmb",815,"breveinvertedcmb",785,"breveinverteddoublecmb",865,"bridgebelowcmb",810,"bridgeinvertedbelowcmb",826,"brokenbar",166,"bstroke",384,"bsuperior",63210,"btopbar",387,"buhiragana",12406,"bukatakana",12502,"bullet",8226,"bulletinverse",9688,"bulletoperator",8729,"bullseye",9678,"c",99,"caarmenian",1390,"cabengali",2458,"cacute",263,"cadeva",2330,"cagujarati",2714,"cagurmukhi",2586,"calsquare",13192,"candrabindubengali",2433,"candrabinducmb",784,"candrabindudeva",2305,"candrabindugujarati",2689,"capslock",8682,"careof",8453,"caron",711,"caronbelowcmb",812,"caroncmb",780,"carriagereturn",8629,"cbopomofo",12568,"ccaron",269,"ccedilla",231,"ccedillaacute",7689,"ccircle",9426,"ccircumflex",265,"ccurl",597,"cdot",267,"cdotaccent",267,"cdsquare",13253,"cedilla",184,"cedillacmb",807,"cent",162,"centigrade",8451,"centinferior",63199,"centmonospace",65504,"centoldstyle",63394,"centsuperior",63200,"chaarmenian",1401,"chabengali",2459,"chadeva",2331,"chagujarati",2715,"chagurmukhi",2587,"chbopomofo",12564,"cheabkhasiancyrillic",1213,"checkmark",10003,"checyrillic",1095,"chedescenderabkhasiancyrillic",1215,"chedescendercyrillic",1207,"chedieresiscyrillic",1269,"cheharmenian",1395,"chekhakassiancyrillic",1228,"cheverticalstrokecyrillic",1209,"chi",967,"chieuchacirclekorean",12919,"chieuchaparenkorean",12823,"chieuchcirclekorean",12905,"chieuchkorean",12618,"chieuchparenkorean",12809,"chochangthai",3594,"chochanthai",3592,"chochingthai",3593,"chochoethai",3596,"chook",392,"cieucacirclekorean",12918,"cieucaparenkorean",12822,"cieuccirclekorean",12904,"cieuckorean",12616,"cieucparenkorean",12808,"cieucuparenkorean",12828,"circle",9675,"circlecopyrt",169,"circlemultiply",8855,"circleot",8857,"circleplus",8853,"circlepostalmark",12342,"circlewithlefthalfblack",9680,"circlewithrighthalfblack",9681,"circumflex",710,"circumflexbelowcmb",813,"circumflexcmb",770,"clear",8999,"clickalveolar",450,"clickdental",448,"clicklateral",449,"clickretroflex",451,"club",9827,"clubsuitblack",9827,"clubsuitwhite",9831,"cmcubedsquare",13220,"cmonospace",65347,"cmsquaredsquare",13216,"coarmenian",1409,"colon",58,"colonmonetary",8353,"colonmonospace",65306,"colonsign",8353,"colonsmall",65109,"colontriangularhalfmod",721,"colontriangularmod",720,"comma",44,"commaabovecmb",787,"commaaboverightcmb",789,"commaaccent",63171,"commaarabic",1548,"commaarmenian",1373,"commainferior",63201,"commamonospace",65292,"commareversedabovecmb",788,"commareversedmod",701,"commasmall",65104,"commasuperior",63202,"commaturnedabovecmb",786,"commaturnedmod",699,"compass",9788,"congruent",8773,"contourintegral",8750,"control",8963,"controlACK",6,"controlBEL",7,"controlBS",8,"controlCAN",24,"controlCR",13,"controlDC1",17,"controlDC2",18,"controlDC3",19,"controlDC4",20,"controlDEL",127,"controlDLE",16,"controlEM",25,"controlENQ",5,"controlEOT",4,"controlESC",27,"controlETB",23,"controlETX",3,"controlFF",12,"controlFS",28,"controlGS",29,"controlHT",9,"controlLF",10,"controlNAK",21,"controlNULL",0,"controlRS",30,"controlSI",15,"controlSO",14,"controlSOT",2,"controlSTX",1,"controlSUB",26,"controlSYN",22,"controlUS",31,"controlVT",11,"copyright",169,"copyrightsans",63721,"copyrightserif",63193,"cornerbracketleft",12300,"cornerbracketlefthalfwidth",65378,"cornerbracketleftvertical",65089,"cornerbracketright",12301,"cornerbracketrighthalfwidth",65379,"cornerbracketrightvertical",65090,"corporationsquare",13183,"cosquare",13255,"coverkgsquare",13254,"cparen",9374,"cruzeiro",8354,"cstretched",663,"curlyand",8911,"curlyor",8910,"currency",164,"cyrBreve",63185,"cyrFlex",63186,"cyrbreve",63188,"cyrflex",63189,"d",100,"daarmenian",1380,"dabengali",2470,"dadarabic",1590,"dadeva",2342,"dadfinalarabic",65214,"dadinitialarabic",65215,"dadmedialarabic",65216,"dagesh",1468,"dageshhebrew",1468,"dagger",8224,"daggerdbl",8225,"dagujarati",2726,"dagurmukhi",2598,"dahiragana",12384,"dakatakana",12480,"dalarabic",1583,"dalet",1491,"daletdagesh",64307,"daletdageshhebrew",64307,"dalethebrew",1491,"dalfinalarabic",65194,"dammaarabic",1615,"dammalowarabic",1615,"dammatanaltonearabic",1612,"dammatanarabic",1612,"danda",2404,"dargahebrew",1447,"dargalefthebrew",1447,"dasiapneumatacyrilliccmb",1157,"dblGrave",63187,"dblanglebracketleft",12298,"dblanglebracketleftvertical",65085,"dblanglebracketright",12299,"dblanglebracketrightvertical",65086,"dblarchinvertedbelowcmb",811,"dblarrowleft",8660,"dblarrowright",8658,"dbldanda",2405,"dblgrave",63190,"dblgravecmb",783,"dblintegral",8748,"dbllowline",8215,"dbllowlinecmb",819,"dbloverlinecmb",831,"dblprimemod",698,"dblverticalbar",8214,"dblverticallineabovecmb",782,"dbopomofo",12553,"dbsquare",13256,"dcaron",271,"dcedilla",7697,"dcircle",9427,"dcircumflexbelow",7699,"dcroat",273,"ddabengali",2465,"ddadeva",2337,"ddagujarati",2721,"ddagurmukhi",2593,"ddalarabic",1672,"ddalfinalarabic",64393,"dddhadeva",2396,"ddhabengali",2466,"ddhadeva",2338,"ddhagujarati",2722,"ddhagurmukhi",2594,"ddotaccent",7691,"ddotbelow",7693,"decimalseparatorarabic",1643,"decimalseparatorpersian",1643,"decyrillic",1076,"degree",176,"dehihebrew",1453,"dehiragana",12391,"deicoptic",1007,"dekatakana",12487,"deleteleft",9003,"deleteright",8998,"delta",948,"deltaturned",397,"denominatorminusonenumeratorbengali",2552,"dezh",676,"dhabengali",2471,"dhadeva",2343,"dhagujarati",2727,"dhagurmukhi",2599,"dhook",599,"dialytikatonos",901,"dialytikatonoscmb",836,"diamond",9830,"diamondsuitwhite",9826,"dieresis",168,"dieresisacute",63191,"dieresisbelowcmb",804,"dieresiscmb",776,"dieresisgrave",63192,"dieresistonos",901,"dihiragana",12386,"dikatakana",12482,"dittomark",12291,"divide",247,"divides",8739,"divisionslash",8725,"djecyrillic",1106,"dkshade",9619,"dlinebelow",7695,"dlsquare",13207,"dmacron",273,"dmonospace",65348,"dnblock",9604,"dochadathai",3598,"dodekthai",3604,"dohiragana",12393,"dokatakana",12489,"dollar",36,"dollarinferior",63203,"dollarmonospace",65284,"dollaroldstyle",63268,"dollarsmall",65129,"dollarsuperior",63204,"dong",8363,"dorusquare",13094,"dotaccent",729,"dotaccentcmb",775,"dotbelowcmb",803,"dotbelowcomb",803,"dotkatakana",12539,"dotlessi",305,"dotlessj",63166,"dotlessjstrokehook",644,"dotmath",8901,"dottedcircle",9676,"doubleyodpatah",64287,"doubleyodpatahhebrew",64287,"downtackbelowcmb",798,"downtackmod",725,"dparen",9375,"dsuperior",63211,"dtail",598,"dtopbar",396,"duhiragana",12389,"dukatakana",12485,"dz",499,"dzaltone",675,"dzcaron",454,"dzcurl",677,"dzeabkhasiancyrillic",1249,"dzecyrillic",1109,"dzhecyrillic",1119,"e",101,"eacute",233,"earth",9793,"ebengali",2447,"ebopomofo",12572,"ebreve",277,"ecandradeva",2317,"ecandragujarati",2701,"ecandravowelsigndeva",2373,"ecandravowelsigngujarati",2757,"ecaron",283,"ecedillabreve",7709,"echarmenian",1381,"echyiwnarmenian",1415,"ecircle",9428,"ecircumflex",234,"ecircumflexacute",7871,"ecircumflexbelow",7705,"ecircumflexdotbelow",7879,"ecircumflexgrave",7873,"ecircumflexhookabove",7875,"ecircumflextilde",7877,"ecyrillic",1108,"edblgrave",517,"edeva",2319,"edieresis",235,"edot",279,"edotaccent",279,"edotbelow",7865,"eegurmukhi",2575,"eematragurmukhi",2631,"efcyrillic",1092,"egrave",232,"egujarati",2703,"eharmenian",1383,"ehbopomofo",12573,"ehiragana",12360,"ehookabove",7867,"eibopomofo",12575,"eight",56,"eightarabic",1640,"eightbengali",2542,"eightcircle",9319,"eightcircleinversesansserif",10129,"eightdeva",2414,"eighteencircle",9329,"eighteenparen",9349,"eighteenperiod",9369,"eightgujarati",2798,"eightgurmukhi",2670,"eighthackarabic",1640,"eighthangzhou",12328,"eighthnotebeamed",9835,"eightideographicparen",12839,"eightinferior",8328,"eightmonospace",65304,"eightoldstyle",63288,"eightparen",9339,"eightperiod",9359,"eightpersian",1784,"eightroman",8567,"eightsuperior",8312,"eightthai",3672,"einvertedbreve",519,"eiotifiedcyrillic",1125,"ekatakana",12456,"ekatakanahalfwidth",65396,"ekonkargurmukhi",2676,"ekorean",12628,"elcyrillic",1083,"element",8712,"elevencircle",9322,"elevenparen",9342,"elevenperiod",9362,"elevenroman",8570,"ellipsis",8230,"ellipsisvertical",8942,"emacron",275,"emacronacute",7703,"emacrongrave",7701,"emcyrillic",1084,"emdash",8212,"emdashvertical",65073,"emonospace",65349,"emphasismarkarmenian",1371,"emptyset",8709,"enbopomofo",12579,"encyrillic",1085,"endash",8211,"endashvertical",65074,"endescendercyrillic",1187,"eng",331,"engbopomofo",12581,"enghecyrillic",1189,"enhookcyrillic",1224,"enspace",8194,"eogonek",281,"eokorean",12627,"eopen",603,"eopenclosed",666,"eopenreversed",604,"eopenreversedclosed",606,"eopenreversedhook",605,"eparen",9376,"epsilon",949,"epsilontonos",941,"equal",61,"equalmonospace",65309,"equalsmall",65126,"equalsuperior",8316,"equivalence",8801,"erbopomofo",12582,"ercyrillic",1088,"ereversed",600,"ereversedcyrillic",1101,"escyrillic",1089,"esdescendercyrillic",1195,"esh",643,"eshcurl",646,"eshortdeva",2318,"eshortvowelsigndeva",2374,"eshreversedloop",426,"eshsquatreversed",645,"esmallhiragana",12359,"esmallkatakana",12455,"esmallkatakanahalfwidth",65386,"estimated",8494,"esuperior",63212,"eta",951,"etarmenian",1384,"etatonos",942,"eth",240,"etilde",7869,"etildebelow",7707,"etnahtafoukhhebrew",1425,"etnahtafoukhlefthebrew",1425,"etnahtahebrew",1425,"etnahtalefthebrew",1425,"eturned",477,"eukorean",12641,"euro",8364,"evowelsignbengali",2503,"evowelsigndeva",2375,"evowelsigngujarati",2759,"exclam",33,"exclamarmenian",1372,"exclamdbl",8252,"exclamdown",161,"exclamdownsmall",63393,"exclammonospace",65281,"exclamsmall",63265,"existential",8707,"ezh",658,"ezhcaron",495,"ezhcurl",659,"ezhreversed",441,"ezhtail",442,"f",102,"fadeva",2398,"fagurmukhi",2654,"fahrenheit",8457,"fathaarabic",1614,"fathalowarabic",1614,"fathatanarabic",1611,"fbopomofo",12552,"fcircle",9429,"fdotaccent",7711,"feharabic",1601,"feharmenian",1414,"fehfinalarabic",65234,"fehinitialarabic",65235,"fehmedialarabic",65236,"feicoptic",997,"female",9792,"ff",64256,"f_f",64256,"ffi",64259,"ffl",64260,"fi",64257,"fifteencircle",9326,"fifteenparen",9346,"fifteenperiod",9366,"figuredash",8210,"filledbox",9632,"filledrect",9644,"finalkaf",1498,"finalkafdagesh",64314,"finalkafdageshhebrew",64314,"finalkafhebrew",1498,"finalmem",1501,"finalmemhebrew",1501,"finalnun",1503,"finalnunhebrew",1503,"finalpe",1507,"finalpehebrew",1507,"finaltsadi",1509,"finaltsadihebrew",1509,"firsttonechinese",713,"fisheye",9673,"fitacyrillic",1139,"five",53,"fivearabic",1637,"fivebengali",2539,"fivecircle",9316,"fivecircleinversesansserif",10126,"fivedeva",2411,"fiveeighths",8541,"fivegujarati",2795,"fivegurmukhi",2667,"fivehackarabic",1637,"fivehangzhou",12325,"fiveideographicparen",12836,"fiveinferior",8325,"fivemonospace",65301,"fiveoldstyle",63285,"fiveparen",9336,"fiveperiod",9356,"fivepersian",1781,"fiveroman",8564,"fivesuperior",8309,"fivethai",3669,"fl",64258,"florin",402,"fmonospace",65350,"fmsquare",13209,"fofanthai",3615,"fofathai",3613,"fongmanthai",3663,"forall",8704,"four",52,"fourarabic",1636,"fourbengali",2538,"fourcircle",9315,"fourcircleinversesansserif",10125,"fourdeva",2410,"fourgujarati",2794,"fourgurmukhi",2666,"fourhackarabic",1636,"fourhangzhou",12324,"fourideographicparen",12835,"fourinferior",8324,"fourmonospace",65300,"fournumeratorbengali",2551,"fouroldstyle",63284,"fourparen",9335,"fourperiod",9355,"fourpersian",1780,"fourroman",8563,"foursuperior",8308,"fourteencircle",9325,"fourteenparen",9345,"fourteenperiod",9365,"fourthai",3668,"fourthtonechinese",715,"fparen",9377,"fraction",8260,"franc",8355,"g",103,"gabengali",2455,"gacute",501,"gadeva",2327,"gafarabic",1711,"gaffinalarabic",64403,"gafinitialarabic",64404,"gafmedialarabic",64405,"gagujarati",2711,"gagurmukhi",2583,"gahiragana",12364,"gakatakana",12460,"gamma",947,"gammalatinsmall",611,"gammasuperior",736,"gangiacoptic",1003,"gbopomofo",12557,"gbreve",287,"gcaron",487,"gcedilla",291,"gcircle",9430,"gcircumflex",285,"gcommaaccent",291,"gdot",289,"gdotaccent",289,"gecyrillic",1075,"gehiragana",12370,"gekatakana",12466,"geometricallyequal",8785,"gereshaccenthebrew",1436,"gereshhebrew",1523,"gereshmuqdamhebrew",1437,"germandbls",223,"gershayimaccenthebrew",1438,"gershayimhebrew",1524,"getamark",12307,"ghabengali",2456,"ghadarmenian",1394,"ghadeva",2328,"ghagujarati",2712,"ghagurmukhi",2584,"ghainarabic",1594,"ghainfinalarabic",65230,"ghaininitialarabic",65231,"ghainmedialarabic",65232,"ghemiddlehookcyrillic",1173,"ghestrokecyrillic",1171,"gheupturncyrillic",1169,"ghhadeva",2394,"ghhagurmukhi",2650,"ghook",608,"ghzsquare",13203,"gihiragana",12366,"gikatakana",12462,"gimarmenian",1379,"gimel",1490,"gimeldagesh",64306,"gimeldageshhebrew",64306,"gimelhebrew",1490,"gjecyrillic",1107,"glottalinvertedstroke",446,"glottalstop",660,"glottalstopinverted",662,"glottalstopmod",704,"glottalstopreversed",661,"glottalstopreversedmod",705,"glottalstopreversedsuperior",740,"glottalstopstroke",673,"glottalstopstrokereversed",674,"gmacron",7713,"gmonospace",65351,"gohiragana",12372,"gokatakana",12468,"gparen",9378,"gpasquare",13228,"gradient",8711,"grave",96,"gravebelowcmb",790,"gravecmb",768,"gravecomb",768,"gravedeva",2387,"gravelowmod",718,"gravemonospace",65344,"gravetonecmb",832,"greater",62,"greaterequal",8805,"greaterequalorless",8923,"greatermonospace",65310,"greaterorequivalent",8819,"greaterorless",8823,"greateroverequal",8807,"greatersmall",65125,"gscript",609,"gstroke",485,"guhiragana",12368,"guillemotleft",171,"guillemotright",187,"guilsinglleft",8249,"guilsinglright",8250,"gukatakana",12464,"guramusquare",13080,"gysquare",13257,"h",104,"haabkhasiancyrillic",1193,"haaltonearabic",1729,"habengali",2489,"hadescendercyrillic",1203,"hadeva",2361,"hagujarati",2745,"hagurmukhi",2617,"haharabic",1581,"hahfinalarabic",65186,"hahinitialarabic",65187,"hahiragana",12399,"hahmedialarabic",65188,"haitusquare",13098,"hakatakana",12495,"hakatakanahalfwidth",65418,"halantgurmukhi",2637,"hamzaarabic",1569,"hamzalowarabic",1569,"hangulfiller",12644,"hardsigncyrillic",1098,"harpoonleftbarbup",8636,"harpoonrightbarbup",8640,"hasquare",13258,"hatafpatah",1458,"hatafpatah16",1458,"hatafpatah23",1458,"hatafpatah2f",1458,"hatafpatahhebrew",1458,"hatafpatahnarrowhebrew",1458,"hatafpatahquarterhebrew",1458,"hatafpatahwidehebrew",1458,"hatafqamats",1459,"hatafqamats1b",1459,"hatafqamats28",1459,"hatafqamats34",1459,"hatafqamatshebrew",1459,"hatafqamatsnarrowhebrew",1459,"hatafqamatsquarterhebrew",1459,"hatafqamatswidehebrew",1459,"hatafsegol",1457,"hatafsegol17",1457,"hatafsegol24",1457,"hatafsegol30",1457,"hatafsegolhebrew",1457,"hatafsegolnarrowhebrew",1457,"hatafsegolquarterhebrew",1457,"hatafsegolwidehebrew",1457,"hbar",295,"hbopomofo",12559,"hbrevebelow",7723,"hcedilla",7721,"hcircle",9431,"hcircumflex",293,"hdieresis",7719,"hdotaccent",7715,"hdotbelow",7717,"he",1492,"heart",9829,"heartsuitblack",9829,"heartsuitwhite",9825,"hedagesh",64308,"hedageshhebrew",64308,"hehaltonearabic",1729,"heharabic",1607,"hehebrew",1492,"hehfinalaltonearabic",64423,"hehfinalalttwoarabic",65258,"hehfinalarabic",65258,"hehhamzaabovefinalarabic",64421,"hehhamzaaboveisolatedarabic",64420,"hehinitialaltonearabic",64424,"hehinitialarabic",65259,"hehiragana",12408,"hehmedialaltonearabic",64425,"hehmedialarabic",65260,"heiseierasquare",13179,"hekatakana",12504,"hekatakanahalfwidth",65421,"hekutaarusquare",13110,"henghook",615,"herutusquare",13113,"het",1495,"hethebrew",1495,"hhook",614,"hhooksuperior",689,"hieuhacirclekorean",12923,"hieuhaparenkorean",12827,"hieuhcirclekorean",12909,"hieuhkorean",12622,"hieuhparenkorean",12813,"hihiragana",12402,"hikatakana",12498,"hikatakanahalfwidth",65419,"hiriq",1460,"hiriq14",1460,"hiriq21",1460,"hiriq2d",1460,"hiriqhebrew",1460,"hiriqnarrowhebrew",1460,"hiriqquarterhebrew",1460,"hiriqwidehebrew",1460,"hlinebelow",7830,"hmonospace",65352,"hoarmenian",1392,"hohipthai",3627,"hohiragana",12411,"hokatakana",12507,"hokatakanahalfwidth",65422,"holam",1465,"holam19",1465,"holam26",1465,"holam32",1465,"holamhebrew",1465,"holamnarrowhebrew",1465,"holamquarterhebrew",1465,"holamwidehebrew",1465,"honokhukthai",3630,"hookabovecomb",777,"hookcmb",777,"hookpalatalizedbelowcmb",801,"hookretroflexbelowcmb",802,"hoonsquare",13122,"horicoptic",1001,"horizontalbar",8213,"horncmb",795,"hotsprings",9832,"house",8962,"hparen",9379,"hsuperior",688,"hturned",613,"huhiragana",12405,"huiitosquare",13107,"hukatakana",12501,"hukatakanahalfwidth",65420,"hungarumlaut",733,"hungarumlautcmb",779,"hv",405,"hyphen",45,"hypheninferior",63205,"hyphenmonospace",65293,"hyphensmall",65123,"hyphensuperior",63206,"hyphentwo",8208,"i",105,"iacute",237,"iacyrillic",1103,"ibengali",2439,"ibopomofo",12583,"ibreve",301,"icaron",464,"icircle",9432,"icircumflex",238,"icyrillic",1110,"idblgrave",521,"ideographearthcircle",12943,"ideographfirecircle",12939,"ideographicallianceparen",12863,"ideographiccallparen",12858,"ideographiccentrecircle",12965,"ideographicclose",12294,"ideographiccomma",12289,"ideographiccommaleft",65380,"ideographiccongratulationparen",12855,"ideographiccorrectcircle",12963,"ideographicearthparen",12847,"ideographicenterpriseparen",12861,"ideographicexcellentcircle",12957,"ideographicfestivalparen",12864,"ideographicfinancialcircle",12950,"ideographicfinancialparen",12854,"ideographicfireparen",12843,"ideographichaveparen",12850,"ideographichighcircle",12964,"ideographiciterationmark",12293,"ideographiclaborcircle",12952,"ideographiclaborparen",12856,"ideographicleftcircle",12967,"ideographiclowcircle",12966,"ideographicmedicinecircle",12969,"ideographicmetalparen",12846,"ideographicmoonparen",12842,"ideographicnameparen",12852,"ideographicperiod",12290,"ideographicprintcircle",12958,"ideographicreachparen",12867,"ideographicrepresentparen",12857,"ideographicresourceparen",12862,"ideographicrightcircle",12968,"ideographicsecretcircle",12953,"ideographicselfparen",12866,"ideographicsocietyparen",12851,"ideographicspace",12288,"ideographicspecialparen",12853,"ideographicstockparen",12849,"ideographicstudyparen",12859,"ideographicsunparen",12848,"ideographicsuperviseparen",12860,"ideographicwaterparen",12844,"ideographicwoodparen",12845,"ideographiczero",12295,"ideographmetalcircle",12942,"ideographmooncircle",12938,"ideographnamecircle",12948,"ideographsuncircle",12944,"ideographwatercircle",12940,"ideographwoodcircle",12941,"ideva",2311,"idieresis",239,"idieresisacute",7727,"idieresiscyrillic",1253,"idotbelow",7883,"iebrevecyrillic",1239,"iecyrillic",1077,"ieungacirclekorean",12917,"ieungaparenkorean",12821,"ieungcirclekorean",12903,"ieungkorean",12615,"ieungparenkorean",12807,"igrave",236,"igujarati",2695,"igurmukhi",2567,"ihiragana",12356,"ihookabove",7881,"iibengali",2440,"iicyrillic",1080,"iideva",2312,"iigujarati",2696,"iigurmukhi",2568,"iimatragurmukhi",2624,"iinvertedbreve",523,"iishortcyrillic",1081,"iivowelsignbengali",2496,"iivowelsigndeva",2368,"iivowelsigngujarati",2752,"ij",307,"ikatakana",12452,"ikatakanahalfwidth",65394,"ikorean",12643,"ilde",732,"iluyhebrew",1452,"imacron",299,"imacroncyrillic",1251,"imageorapproximatelyequal",8787,"imatragurmukhi",2623,"imonospace",65353,"increment",8710,"infinity",8734,"iniarmenian",1387,"integral",8747,"integralbottom",8993,"integralbt",8993,"integralex",63733,"integraltop",8992,"integraltp",8992,"intersection",8745,"intisquare",13061,"invbullet",9688,"invcircle",9689,"invsmileface",9787,"iocyrillic",1105,"iogonek",303,"iota",953,"iotadieresis",970,"iotadieresistonos",912,"iotalatin",617,"iotatonos",943,"iparen",9380,"irigurmukhi",2674,"ismallhiragana",12355,"ismallkatakana",12451,"ismallkatakanahalfwidth",65384,"issharbengali",2554,"istroke",616,"isuperior",63213,"iterationhiragana",12445,"iterationkatakana",12541,"itilde",297,"itildebelow",7725,"iubopomofo",12585,"iucyrillic",1102,"ivowelsignbengali",2495,"ivowelsigndeva",2367,"ivowelsigngujarati",2751,"izhitsacyrillic",1141,"izhitsadblgravecyrillic",1143,"j",106,"jaarmenian",1393,"jabengali",2460,"jadeva",2332,"jagujarati",2716,"jagurmukhi",2588,"jbopomofo",12560,"jcaron",496,"jcircle",9433,"jcircumflex",309,"jcrossedtail",669,"jdotlessstroke",607,"jecyrillic",1112,"jeemarabic",1580,"jeemfinalarabic",65182,"jeeminitialarabic",65183,"jeemmedialarabic",65184,"jeharabic",1688,"jehfinalarabic",64395,"jhabengali",2461,"jhadeva",2333,"jhagujarati",2717,"jhagurmukhi",2589,"jheharmenian",1403,"jis",12292,"jmonospace",65354,"jparen",9381,"jsuperior",690,"k",107,"kabashkircyrillic",1185,"kabengali",2453,"kacute",7729,"kacyrillic",1082,"kadescendercyrillic",1179,"kadeva",2325,"kaf",1499,"kafarabic",1603,"kafdagesh",64315,"kafdageshhebrew",64315,"kaffinalarabic",65242,"kafhebrew",1499,"kafinitialarabic",65243,"kafmedialarabic",65244,"kafrafehebrew",64333,"kagujarati",2709,"kagurmukhi",2581,"kahiragana",12363,"kahookcyrillic",1220,"kakatakana",12459,"kakatakanahalfwidth",65398,"kappa",954,"kappasymbolgreek",1008,"kapyeounmieumkorean",12657,"kapyeounphieuphkorean",12676,"kapyeounpieupkorean",12664,"kapyeounssangpieupkorean",12665,"karoriisquare",13069,"kashidaautoarabic",1600,"kashidaautonosidebearingarabic",1600,"kasmallkatakana",12533,"kasquare",13188,"kasraarabic",1616,"kasratanarabic",1613,"kastrokecyrillic",1183,"katahiraprolongmarkhalfwidth",65392,"kaverticalstrokecyrillic",1181,"kbopomofo",12558,"kcalsquare",13193,"kcaron",489,"kcedilla",311,"kcircle",9434,"kcommaaccent",311,"kdotbelow",7731,"keharmenian",1412,"kehiragana",12369,"kekatakana",12465,"kekatakanahalfwidth",65401,"kenarmenian",1391,"kesmallkatakana",12534,"kgreenlandic",312,"khabengali",2454,"khacyrillic",1093,"khadeva",2326,"khagujarati",2710,"khagurmukhi",2582,"khaharabic",1582,"khahfinalarabic",65190,"khahinitialarabic",65191,"khahmedialarabic",65192,"kheicoptic",999,"khhadeva",2393,"khhagurmukhi",2649,"khieukhacirclekorean",12920,"khieukhaparenkorean",12824,"khieukhcirclekorean",12906,"khieukhkorean",12619,"khieukhparenkorean",12810,"khokhaithai",3586,"khokhonthai",3589,"khokhuatthai",3587,"khokhwaithai",3588,"khomutthai",3675,"khook",409,"khorakhangthai",3590,"khzsquare",13201,"kihiragana",12365,"kikatakana",12461,"kikatakanahalfwidth",65399,"kiroguramusquare",13077,"kiromeetorusquare",13078,"kirosquare",13076,"kiyeokacirclekorean",12910,"kiyeokaparenkorean",12814,"kiyeokcirclekorean",12896,"kiyeokkorean",12593,"kiyeokparenkorean",12800,"kiyeoksioskorean",12595,"kjecyrillic",1116,"klinebelow",7733,"klsquare",13208,"kmcubedsquare",13222,"kmonospace",65355,"kmsquaredsquare",13218,"kohiragana",12371,"kohmsquare",13248,"kokaithai",3585,"kokatakana",12467,"kokatakanahalfwidth",65402,"kooposquare",13086,"koppacyrillic",1153,"koreanstandardsymbol",12927,"koroniscmb",835,"kparen",9382,"kpasquare",13226,"ksicyrillic",1135,"ktsquare",13263,"kturned",670,"kuhiragana",12367,"kukatakana",12463,"kukatakanahalfwidth",65400,"kvsquare",13240,"kwsquare",13246,"l",108,"labengali",2482,"lacute",314,"ladeva",2354,"lagujarati",2738,"lagurmukhi",2610,"lakkhangyaothai",3653,"lamaleffinalarabic",65276,"lamalefhamzaabovefinalarabic",65272,"lamalefhamzaaboveisolatedarabic",65271,"lamalefhamzabelowfinalarabic",65274,"lamalefhamzabelowisolatedarabic",65273,"lamalefisolatedarabic",65275,"lamalefmaddaabovefinalarabic",65270,"lamalefmaddaaboveisolatedarabic",65269,"lamarabic",1604,"lambda",955,"lambdastroke",411,"lamed",1500,"lameddagesh",64316,"lameddageshhebrew",64316,"lamedhebrew",1500,"lamfinalarabic",65246,"lamhahinitialarabic",64714,"laminitialarabic",65247,"lamjeeminitialarabic",64713,"lamkhahinitialarabic",64715,"lamlamhehisolatedarabic",65010,"lammedialarabic",65248,"lammeemhahinitialarabic",64904,"lammeeminitialarabic",64716,"largecircle",9711,"lbar",410,"lbelt",620,"lbopomofo",12556,"lcaron",318,"lcedilla",316,"lcircle",9435,"lcircumflexbelow",7741,"lcommaaccent",316,"ldot",320,"ldotaccent",320,"ldotbelow",7735,"ldotbelowmacron",7737,"leftangleabovecmb",794,"lefttackbelowcmb",792,"less",60,"lessequal",8804,"lessequalorgreater",8922,"lessmonospace",65308,"lessorequivalent",8818,"lessorgreater",8822,"lessoverequal",8806,"lesssmall",65124,"lezh",622,"lfblock",9612,"lhookretroflex",621,"lira",8356,"liwnarmenian",1388,"lj",457,"ljecyrillic",1113,"ll",63168,"lladeva",2355,"llagujarati",2739,"llinebelow",7739,"llladeva",2356,"llvocalicbengali",2529,"llvocalicdeva",2401,"llvocalicvowelsignbengali",2531,"llvocalicvowelsigndeva",2403,"lmiddletilde",619,"lmonospace",65356,"lmsquare",13264,"lochulathai",3628,"logicaland",8743,"logicalnot",172,"logicalnotreversed",8976,"logicalor",8744,"lolingthai",3621,"longs",383,"lowlinecenterline",65102,"lowlinecmb",818,"lowlinedashed",65101,"lozenge",9674,"lparen",9383,"lslash",322,"lsquare",8467,"lsuperior",63214,"ltshade",9617,"luthai",3622,"lvocalicbengali",2444,"lvocalicdeva",2316,"lvocalicvowelsignbengali",2530,"lvocalicvowelsigndeva",2402,"lxsquare",13267,"m",109,"mabengali",2478,"macron",175,"macronbelowcmb",817,"macroncmb",772,"macronlowmod",717,"macronmonospace",65507,"macute",7743,"madeva",2350,"magujarati",2734,"magurmukhi",2606,"mahapakhhebrew",1444,"mahapakhlefthebrew",1444,"mahiragana",12414,"maichattawalowleftthai",63637,"maichattawalowrightthai",63636,"maichattawathai",3659,"maichattawaupperleftthai",63635,"maieklowleftthai",63628,"maieklowrightthai",63627,"maiekthai",3656,"maiekupperleftthai",63626,"maihanakatleftthai",63620,"maihanakatthai",3633,"maitaikhuleftthai",63625,"maitaikhuthai",3655,"maitholowleftthai",63631,"maitholowrightthai",63630,"maithothai",3657,"maithoupperleftthai",63629,"maitrilowleftthai",63634,"maitrilowrightthai",63633,"maitrithai",3658,"maitriupperleftthai",63632,"maiyamokthai",3654,"makatakana",12510,"makatakanahalfwidth",65423,"male",9794,"mansyonsquare",13127,"maqafhebrew",1470,"mars",9794,"masoracirclehebrew",1455,"masquare",13187,"mbopomofo",12551,"mbsquare",13268,"mcircle",9436,"mcubedsquare",13221,"mdotaccent",7745,"mdotbelow",7747,"meemarabic",1605,"meemfinalarabic",65250,"meeminitialarabic",65251,"meemmedialarabic",65252,"meemmeeminitialarabic",64721,"meemmeemisolatedarabic",64584,"meetorusquare",13133,"mehiragana",12417,"meizierasquare",13182,"mekatakana",12513,"mekatakanahalfwidth",65426,"mem",1502,"memdagesh",64318,"memdageshhebrew",64318,"memhebrew",1502,"menarmenian",1396,"merkhahebrew",1445,"merkhakefulahebrew",1446,"merkhakefulalefthebrew",1446,"merkhalefthebrew",1445,"mhook",625,"mhzsquare",13202,"middledotkatakanahalfwidth",65381,"middot",183,"mieumacirclekorean",12914,"mieumaparenkorean",12818,"mieumcirclekorean",12900,"mieumkorean",12609,"mieumpansioskorean",12656,"mieumparenkorean",12804,"mieumpieupkorean",12654,"mieumsioskorean",12655,"mihiragana",12415,"mikatakana",12511,"mikatakanahalfwidth",65424,"minus",8722,"minusbelowcmb",800,"minuscircle",8854,"minusmod",727,"minusplus",8723,"minute",8242,"miribaarusquare",13130,"mirisquare",13129,"mlonglegturned",624,"mlsquare",13206,"mmcubedsquare",13219,"mmonospace",65357,"mmsquaredsquare",13215,"mohiragana",12418,"mohmsquare",13249,"mokatakana",12514,"mokatakanahalfwidth",65427,"molsquare",13270,"momathai",3617,"moverssquare",13223,"moverssquaredsquare",13224,"mparen",9384,"mpasquare",13227,"mssquare",13235,"msuperior",63215,"mturned",623,"mu",181,"mu1",181,"muasquare",13186,"muchgreater",8811,"muchless",8810,"mufsquare",13196,"mugreek",956,"mugsquare",13197,"muhiragana",12416,"mukatakana",12512,"mukatakanahalfwidth",65425,"mulsquare",13205,"multiply",215,"mumsquare",13211,"munahhebrew",1443,"munahlefthebrew",1443,"musicalnote",9834,"musicalnotedbl",9835,"musicflatsign",9837,"musicsharpsign",9839,"mussquare",13234,"muvsquare",13238,"muwsquare",13244,"mvmegasquare",13241,"mvsquare",13239,"mwmegasquare",13247,"mwsquare",13245,"n",110,"nabengali",2472,"nabla",8711,"nacute",324,"nadeva",2344,"nagujarati",2728,"nagurmukhi",2600,"nahiragana",12394,"nakatakana",12490,"nakatakanahalfwidth",65413,"napostrophe",329,"nasquare",13185,"nbopomofo",12555,"nbspace",160,"ncaron",328,"ncedilla",326,"ncircle",9437,"ncircumflexbelow",7755,"ncommaaccent",326,"ndotaccent",7749,"ndotbelow",7751,"nehiragana",12397,"nekatakana",12493,"nekatakanahalfwidth",65416,"newsheqelsign",8362,"nfsquare",13195,"ngabengali",2457,"ngadeva",2329,"ngagujarati",2713,"ngagurmukhi",2585,"ngonguthai",3591,"nhiragana",12435,"nhookleft",626,"nhookretroflex",627,"nieunacirclekorean",12911,"nieunaparenkorean",12815,"nieuncieuckorean",12597,"nieuncirclekorean",12897,"nieunhieuhkorean",12598,"nieunkorean",12596,"nieunpansioskorean",12648,"nieunparenkorean",12801,"nieunsioskorean",12647,"nieuntikeutkorean",12646,"nihiragana",12395,"nikatakana",12491,"nikatakanahalfwidth",65414,"nikhahitleftthai",63641,"nikhahitthai",3661,"nine",57,"ninearabic",1641,"ninebengali",2543,"ninecircle",9320,"ninecircleinversesansserif",10130,"ninedeva",2415,"ninegujarati",2799,"ninegurmukhi",2671,"ninehackarabic",1641,"ninehangzhou",12329,"nineideographicparen",12840,"nineinferior",8329,"ninemonospace",65305,"nineoldstyle",63289,"nineparen",9340,"nineperiod",9360,"ninepersian",1785,"nineroman",8568,"ninesuperior",8313,"nineteencircle",9330,"nineteenparen",9350,"nineteenperiod",9370,"ninethai",3673,"nj",460,"njecyrillic",1114,"nkatakana",12531,"nkatakanahalfwidth",65437,"nlegrightlong",414,"nlinebelow",7753,"nmonospace",65358,"nmsquare",13210,"nnabengali",2467,"nnadeva",2339,"nnagujarati",2723,"nnagurmukhi",2595,"nnnadeva",2345,"nohiragana",12398,"nokatakana",12494,"nokatakanahalfwidth",65417,"nonbreakingspace",160,"nonenthai",3603,"nonuthai",3609,"noonarabic",1606,"noonfinalarabic",65254,"noonghunnaarabic",1722,"noonghunnafinalarabic",64415,"nooninitialarabic",65255,"noonjeeminitialarabic",64722,"noonjeemisolatedarabic",64587,"noonmedialarabic",65256,"noonmeeminitialarabic",64725,"noonmeemisolatedarabic",64590,"noonnoonfinalarabic",64653,"notcontains",8716,"notelement",8713,"notelementof",8713,"notequal",8800,"notgreater",8815,"notgreaternorequal",8817,"notgreaternorless",8825,"notidentical",8802,"notless",8814,"notlessnorequal",8816,"notparallel",8742,"notprecedes",8832,"notsubset",8836,"notsucceeds",8833,"notsuperset",8837,"nowarmenian",1398,"nparen",9385,"nssquare",13233,"nsuperior",8319,"ntilde",241,"nu",957,"nuhiragana",12396,"nukatakana",12492,"nukatakanahalfwidth",65415,"nuktabengali",2492,"nuktadeva",2364,"nuktagujarati",2748,"nuktagurmukhi",2620,"numbersign",35,"numbersignmonospace",65283,"numbersignsmall",65119,"numeralsigngreek",884,"numeralsignlowergreek",885,"numero",8470,"nun",1504,"nundagesh",64320,"nundageshhebrew",64320,"nunhebrew",1504,"nvsquare",13237,"nwsquare",13243,"nyabengali",2462,"nyadeva",2334,"nyagujarati",2718,"nyagurmukhi",2590,"o",111,"oacute",243,"oangthai",3629,"obarred",629,"obarredcyrillic",1257,"obarreddieresiscyrillic",1259,"obengali",2451,"obopomofo",12571,"obreve",335,"ocandradeva",2321,"ocandragujarati",2705,"ocandravowelsigndeva",2377,"ocandravowelsigngujarati",2761,"ocaron",466,"ocircle",9438,"ocircumflex",244,"ocircumflexacute",7889,"ocircumflexdotbelow",7897,"ocircumflexgrave",7891,"ocircumflexhookabove",7893,"ocircumflextilde",7895,"ocyrillic",1086,"odblacute",337,"odblgrave",525,"odeva",2323,"odieresis",246,"odieresiscyrillic",1255,"odotbelow",7885,"oe",339,"oekorean",12634,"ogonek",731,"ogonekcmb",808,"ograve",242,"ogujarati",2707,"oharmenian",1413,"ohiragana",12362,"ohookabove",7887,"ohorn",417,"ohornacute",7899,"ohorndotbelow",7907,"ohorngrave",7901,"ohornhookabove",7903,"ohorntilde",7905,"ohungarumlaut",337,"oi",419,"oinvertedbreve",527,"okatakana",12458,"okatakanahalfwidth",65397,"okorean",12631,"olehebrew",1451,"omacron",333,"omacronacute",7763,"omacrongrave",7761,"omdeva",2384,"omega",969,"omega1",982,"omegacyrillic",1121,"omegalatinclosed",631,"omegaroundcyrillic",1147,"omegatitlocyrillic",1149,"omegatonos",974,"omgujarati",2768,"omicron",959,"omicrontonos",972,"omonospace",65359,"one",49,"onearabic",1633,"onebengali",2535,"onecircle",9312,"onecircleinversesansserif",10122,"onedeva",2407,"onedotenleader",8228,"oneeighth",8539,"onefitted",63196,"onegujarati",2791,"onegurmukhi",2663,"onehackarabic",1633,"onehalf",189,"onehangzhou",12321,"oneideographicparen",12832,"oneinferior",8321,"onemonospace",65297,"onenumeratorbengali",2548,"oneoldstyle",63281,"oneparen",9332,"oneperiod",9352,"onepersian",1777,"onequarter",188,"oneroman",8560,"onesuperior",185,"onethai",3665,"onethird",8531,"oogonek",491,"oogonekmacron",493,"oogurmukhi",2579,"oomatragurmukhi",2635,"oopen",596,"oparen",9386,"openbullet",9702,"option",8997,"ordfeminine",170,"ordmasculine",186,"orthogonal",8735,"oshortdeva",2322,"oshortvowelsigndeva",2378,"oslash",248,"oslashacute",511,"osmallhiragana",12361,"osmallkatakana",12457,"osmallkatakanahalfwidth",65387,"ostrokeacute",511,"osuperior",63216,"otcyrillic",1151,"otilde",245,"otildeacute",7757,"otildedieresis",7759,"oubopomofo",12577,"overline",8254,"overlinecenterline",65098,"overlinecmb",773,"overlinedashed",65097,"overlinedblwavy",65100,"overlinewavy",65099,"overscore",175,"ovowelsignbengali",2507,"ovowelsigndeva",2379,"ovowelsigngujarati",2763,"p",112,"paampssquare",13184,"paasentosquare",13099,"pabengali",2474,"pacute",7765,"padeva",2346,"pagedown",8671,"pageup",8670,"pagujarati",2730,"pagurmukhi",2602,"pahiragana",12401,"paiyannoithai",3631,"pakatakana",12497,"palatalizationcyrilliccmb",1156,"palochkacyrillic",1216,"pansioskorean",12671,"paragraph",182,"parallel",8741,"parenleft",40,"parenleftaltonearabic",64830,"parenleftbt",63725,"parenleftex",63724,"parenleftinferior",8333,"parenleftmonospace",65288,"parenleftsmall",65113,"parenleftsuperior",8317,"parenlefttp",63723,"parenleftvertical",65077,"parenright",41,"parenrightaltonearabic",64831,"parenrightbt",63736,"parenrightex",63735,"parenrightinferior",8334,"parenrightmonospace",65289,"parenrightsmall",65114,"parenrightsuperior",8318,"parenrighttp",63734,"parenrightvertical",65078,"partialdiff",8706,"paseqhebrew",1472,"pashtahebrew",1433,"pasquare",13225,"patah",1463,"patah11",1463,"patah1d",1463,"patah2a",1463,"patahhebrew",1463,"patahnarrowhebrew",1463,"patahquarterhebrew",1463,"patahwidehebrew",1463,"pazerhebrew",1441,"pbopomofo",12550,"pcircle",9439,"pdotaccent",7767,"pe",1508,"pecyrillic",1087,"pedagesh",64324,"pedageshhebrew",64324,"peezisquare",13115,"pefinaldageshhebrew",64323,"peharabic",1662,"peharmenian",1402,"pehebrew",1508,"pehfinalarabic",64343,"pehinitialarabic",64344,"pehiragana",12410,"pehmedialarabic",64345,"pekatakana",12506,"pemiddlehookcyrillic",1191,"perafehebrew",64334,"percent",37,"percentarabic",1642,"percentmonospace",65285,"percentsmall",65130,"period",46,"periodarmenian",1417,"periodcentered",183,"periodhalfwidth",65377,"periodinferior",63207,"periodmonospace",65294,"periodsmall",65106,"periodsuperior",63208,"perispomenigreekcmb",834,"perpendicular",8869,"perthousand",8240,"peseta",8359,"pfsquare",13194,"phabengali",2475,"phadeva",2347,"phagujarati",2731,"phagurmukhi",2603,"phi",966,"phi1",981,"phieuphacirclekorean",12922,"phieuphaparenkorean",12826,"phieuphcirclekorean",12908,"phieuphkorean",12621,"phieuphparenkorean",12812,"philatin",632,"phinthuthai",3642,"phisymbolgreek",981,"phook",421,"phophanthai",3614,"phophungthai",3612,"phosamphaothai",3616,"pi",960,"pieupacirclekorean",12915,"pieupaparenkorean",12819,"pieupcieuckorean",12662,"pieupcirclekorean",12901,"pieupkiyeokkorean",12658,"pieupkorean",12610,"pieupparenkorean",12805,"pieupsioskiyeokkorean",12660,"pieupsioskorean",12612,"pieupsiostikeutkorean",12661,"pieupthieuthkorean",12663,"pieuptikeutkorean",12659,"pihiragana",12404,"pikatakana",12500,"pisymbolgreek",982,"piwrarmenian",1411,"plus",43,"plusbelowcmb",799,"pluscircle",8853,"plusminus",177,"plusmod",726,"plusmonospace",65291,"plussmall",65122,"plussuperior",8314,"pmonospace",65360,"pmsquare",13272,"pohiragana",12413,"pointingindexdownwhite",9759,"pointingindexleftwhite",9756,"pointingindexrightwhite",9758,"pointingindexupwhite",9757,"pokatakana",12509,"poplathai",3611,"postalmark",12306,"postalmarkface",12320,"pparen",9387,"precedes",8826,"prescription",8478,"primemod",697,"primereversed",8245,"product",8719,"projective",8965,"prolongedkana",12540,"propellor",8984,"propersubset",8834,"propersuperset",8835,"proportion",8759,"proportional",8733,"psi",968,"psicyrillic",1137,"psilipneumatacyrilliccmb",1158,"pssquare",13232,"puhiragana",12407,"pukatakana",12503,"pvsquare",13236,"pwsquare",13242,"q",113,"qadeva",2392,"qadmahebrew",1448,"qafarabic",1602,"qaffinalarabic",65238,"qafinitialarabic",65239,"qafmedialarabic",65240,"qamats",1464,"qamats10",1464,"qamats1a",1464,"qamats1c",1464,"qamats27",1464,"qamats29",1464,"qamats33",1464,"qamatsde",1464,"qamatshebrew",1464,"qamatsnarrowhebrew",1464,"qamatsqatanhebrew",1464,"qamatsqatannarrowhebrew",1464,"qamatsqatanquarterhebrew",1464,"qamatsqatanwidehebrew",1464,"qamatsquarterhebrew",1464,"qamatswidehebrew",1464,"qarneyparahebrew",1439,"qbopomofo",12561,"qcircle",9440,"qhook",672,"qmonospace",65361,"qof",1511,"qofdagesh",64327,"qofdageshhebrew",64327,"qofhebrew",1511,"qparen",9388,"quarternote",9833,"qubuts",1467,"qubuts18",1467,"qubuts25",1467,"qubuts31",1467,"qubutshebrew",1467,"qubutsnarrowhebrew",1467,"qubutsquarterhebrew",1467,"qubutswidehebrew",1467,"question",63,"questionarabic",1567,"questionarmenian",1374,"questiondown",191,"questiondownsmall",63423,"questiongreek",894,"questionmonospace",65311,"questionsmall",63295,"quotedbl",34,"quotedblbase",8222,"quotedblleft",8220,"quotedblmonospace",65282,"quotedblprime",12318,"quotedblprimereversed",12317,"quotedblright",8221,"quoteleft",8216,"quoteleftreversed",8219,"quotereversed",8219,"quoteright",8217,"quoterightn",329,"quotesinglbase",8218,"quotesingle",39,"quotesinglemonospace",65287,"r",114,"raarmenian",1404,"rabengali",2480,"racute",341,"radeva",2352,"radical",8730,"radicalex",63717,"radoverssquare",13230,"radoverssquaredsquare",13231,"radsquare",13229,"rafe",1471,"rafehebrew",1471,"ragujarati",2736,"ragurmukhi",2608,"rahiragana",12425,"rakatakana",12521,"rakatakanahalfwidth",65431,"ralowerdiagonalbengali",2545,"ramiddlediagonalbengali",2544,"ramshorn",612,"ratio",8758,"rbopomofo",12566,"rcaron",345,"rcedilla",343,"rcircle",9441,"rcommaaccent",343,"rdblgrave",529,"rdotaccent",7769,"rdotbelow",7771,"rdotbelowmacron",7773,"referencemark",8251,"reflexsubset",8838,"reflexsuperset",8839,"registered",174,"registersans",63720,"registerserif",63194,"reharabic",1585,"reharmenian",1408,"rehfinalarabic",65198,"rehiragana",12428,"rekatakana",12524,"rekatakanahalfwidth",65434,"resh",1512,"reshdageshhebrew",64328,"reshhebrew",1512,"reversedtilde",8765,"reviahebrew",1431,"reviamugrashhebrew",1431,"revlogicalnot",8976,"rfishhook",638,"rfishhookreversed",639,"rhabengali",2525,"rhadeva",2397,"rho",961,"rhook",637,"rhookturned",635,"rhookturnedsuperior",693,"rhosymbolgreek",1009,"rhotichookmod",734,"rieulacirclekorean",12913,"rieulaparenkorean",12817,"rieulcirclekorean",12899,"rieulhieuhkorean",12608,"rieulkiyeokkorean",12602,"rieulkiyeoksioskorean",12649,"rieulkorean",12601,"rieulmieumkorean",12603,"rieulpansioskorean",12652,"rieulparenkorean",12803,"rieulphieuphkorean",12607,"rieulpieupkorean",12604,"rieulpieupsioskorean",12651,"rieulsioskorean",12605,"rieulthieuthkorean",12606,"rieultikeutkorean",12650,"rieulyeorinhieuhkorean",12653,"rightangle",8735,"righttackbelowcmb",793,"righttriangle",8895,"rihiragana",12426,"rikatakana",12522,"rikatakanahalfwidth",65432,"ring",730,"ringbelowcmb",805,"ringcmb",778,"ringhalfleft",703,"ringhalfleftarmenian",1369,"ringhalfleftbelowcmb",796,"ringhalfleftcentered",723,"ringhalfright",702,"ringhalfrightbelowcmb",825,"ringhalfrightcentered",722,"rinvertedbreve",531,"rittorusquare",13137,"rlinebelow",7775,"rlongleg",636,"rlonglegturned",634,"rmonospace",65362,"rohiragana",12429,"rokatakana",12525,"rokatakanahalfwidth",65435,"roruathai",3619,"rparen",9389,"rrabengali",2524,"rradeva",2353,"rragurmukhi",2652,"rreharabic",1681,"rrehfinalarabic",64397,"rrvocalicbengali",2528,"rrvocalicdeva",2400,"rrvocalicgujarati",2784,"rrvocalicvowelsignbengali",2500,"rrvocalicvowelsigndeva",2372,"rrvocalicvowelsigngujarati",2756,"rsuperior",63217,"rtblock",9616,"rturned",633,"rturnedsuperior",692,"ruhiragana",12427,"rukatakana",12523,"rukatakanahalfwidth",65433,"rupeemarkbengali",2546,"rupeesignbengali",2547,"rupiah",63197,"ruthai",3620,"rvocalicbengali",2443,"rvocalicdeva",2315,"rvocalicgujarati",2699,"rvocalicvowelsignbengali",2499,"rvocalicvowelsigndeva",2371,"rvocalicvowelsigngujarati",2755,"s",115,"sabengali",2488,"sacute",347,"sacutedotaccent",7781,"sadarabic",1589,"sadeva",2360,"sadfinalarabic",65210,"sadinitialarabic",65211,"sadmedialarabic",65212,"sagujarati",2744,"sagurmukhi",2616,"sahiragana",12373,"sakatakana",12469,"sakatakanahalfwidth",65403,"sallallahoualayhewasallamarabic",65018,"samekh",1505,"samekhdagesh",64321,"samekhdageshhebrew",64321,"samekhhebrew",1505,"saraaathai",3634,"saraaethai",3649,"saraaimaimalaithai",3652,"saraaimaimuanthai",3651,"saraamthai",3635,"saraathai",3632,"saraethai",3648,"saraiileftthai",63622,"saraiithai",3637,"saraileftthai",63621,"saraithai",3636,"saraothai",3650,"saraueeleftthai",63624,"saraueethai",3639,"saraueleftthai",63623,"sarauethai",3638,"sarauthai",3640,"sarauuthai",3641,"sbopomofo",12569,"scaron",353,"scarondotaccent",7783,"scedilla",351,"schwa",601,"schwacyrillic",1241,"schwadieresiscyrillic",1243,"schwahook",602,"scircle",9442,"scircumflex",349,"scommaaccent",537,"sdotaccent",7777,"sdotbelow",7779,"sdotbelowdotaccent",7785,"seagullbelowcmb",828,"second",8243,"secondtonechinese",714,"section",167,"seenarabic",1587,"seenfinalarabic",65202,"seeninitialarabic",65203,"seenmedialarabic",65204,"segol",1462,"segol13",1462,"segol1f",1462,"segol2c",1462,"segolhebrew",1462,"segolnarrowhebrew",1462,"segolquarterhebrew",1462,"segoltahebrew",1426,"segolwidehebrew",1462,"seharmenian",1405,"sehiragana",12379,"sekatakana",12475,"sekatakanahalfwidth",65406,"semicolon",59,"semicolonarabic",1563,"semicolonmonospace",65307,"semicolonsmall",65108,"semivoicedmarkkana",12444,"semivoicedmarkkanahalfwidth",65439,"sentisquare",13090,"sentosquare",13091,"seven",55,"sevenarabic",1639,"sevenbengali",2541,"sevencircle",9318,"sevencircleinversesansserif",10128,"sevendeva",2413,"seveneighths",8542,"sevengujarati",2797,"sevengurmukhi",2669,"sevenhackarabic",1639,"sevenhangzhou",12327,"sevenideographicparen",12838,"seveninferior",8327,"sevenmonospace",65303,"sevenoldstyle",63287,"sevenparen",9338,"sevenperiod",9358,"sevenpersian",1783,"sevenroman",8566,"sevensuperior",8311,"seventeencircle",9328,"seventeenparen",9348,"seventeenperiod",9368,"seventhai",3671,"sfthyphen",173,"shaarmenian",1399,"shabengali",2486,"shacyrillic",1096,"shaddaarabic",1617,"shaddadammaarabic",64609,"shaddadammatanarabic",64606,"shaddafathaarabic",64608,"shaddakasraarabic",64610,"shaddakasratanarabic",64607,"shade",9618,"shadedark",9619,"shadelight",9617,"shademedium",9618,"shadeva",2358,"shagujarati",2742,"shagurmukhi",2614,"shalshelethebrew",1427,"shbopomofo",12565,"shchacyrillic",1097,"sheenarabic",1588,"sheenfinalarabic",65206,"sheeninitialarabic",65207,"sheenmedialarabic",65208,"sheicoptic",995,"sheqel",8362,"sheqelhebrew",8362,"sheva",1456,"sheva115",1456,"sheva15",1456,"sheva22",1456,"sheva2e",1456,"shevahebrew",1456,"shevanarrowhebrew",1456,"shevaquarterhebrew",1456,"shevawidehebrew",1456,"shhacyrillic",1211,"shimacoptic",1005,"shin",1513,"shindagesh",64329,"shindageshhebrew",64329,"shindageshshindot",64300,"shindageshshindothebrew",64300,"shindageshsindot",64301,"shindageshsindothebrew",64301,"shindothebrew",1473,"shinhebrew",1513,"shinshindot",64298,"shinshindothebrew",64298,"shinsindot",64299,"shinsindothebrew",64299,"shook",642,"sigma",963,"sigma1",962,"sigmafinal",962,"sigmalunatesymbolgreek",1010,"sihiragana",12375,"sikatakana",12471,"sikatakanahalfwidth",65404,"siluqhebrew",1469,"siluqlefthebrew",1469,"similar",8764,"sindothebrew",1474,"siosacirclekorean",12916,"siosaparenkorean",12820,"sioscieuckorean",12670,"sioscirclekorean",12902,"sioskiyeokkorean",12666,"sioskorean",12613,"siosnieunkorean",12667,"siosparenkorean",12806,"siospieupkorean",12669,"siostikeutkorean",12668,"six",54,"sixarabic",1638,"sixbengali",2540,"sixcircle",9317,"sixcircleinversesansserif",10127,"sixdeva",2412,"sixgujarati",2796,"sixgurmukhi",2668,"sixhackarabic",1638,"sixhangzhou",12326,"sixideographicparen",12837,"sixinferior",8326,"sixmonospace",65302,"sixoldstyle",63286,"sixparen",9337,"sixperiod",9357,"sixpersian",1782,"sixroman",8565,"sixsuperior",8310,"sixteencircle",9327,"sixteencurrencydenominatorbengali",2553,"sixteenparen",9347,"sixteenperiod",9367,"sixthai",3670,"slash",47,"slashmonospace",65295,"slong",383,"slongdotaccent",7835,"smileface",9786,"smonospace",65363,"sofpasuqhebrew",1475,"softhyphen",173,"softsigncyrillic",1100,"sohiragana",12381,"sokatakana",12477,"sokatakanahalfwidth",65407,"soliduslongoverlaycmb",824,"solidusshortoverlaycmb",823,"sorusithai",3625,"sosalathai",3624,"sosothai",3595,"sosuathai",3626,"space",32,"spacehackarabic",32,"spade",9824,"spadesuitblack",9824,"spadesuitwhite",9828,"sparen",9390,"squarebelowcmb",827,"squarecc",13252,"squarecm",13213,"squarediagonalcrosshatchfill",9641,"squarehorizontalfill",9636,"squarekg",13199,"squarekm",13214,"squarekmcapital",13262,"squareln",13265,"squarelog",13266,"squaremg",13198,"squaremil",13269,"squaremm",13212,"squaremsquared",13217,"squareorthogonalcrosshatchfill",9638,"squareupperlefttolowerrightfill",9639,"squareupperrighttolowerleftfill",9640,"squareverticalfill",9637,"squarewhitewithsmallblack",9635,"srsquare",13275,"ssabengali",2487,"ssadeva",2359,"ssagujarati",2743,"ssangcieuckorean",12617,"ssanghieuhkorean",12677,"ssangieungkorean",12672,"ssangkiyeokkorean",12594,"ssangnieunkorean",12645,"ssangpieupkorean",12611,"ssangsioskorean",12614,"ssangtikeutkorean",12600,"ssuperior",63218,"sterling",163,"sterlingmonospace",65505,"strokelongoverlaycmb",822,"strokeshortoverlaycmb",821,"subset",8834,"subsetnotequal",8842,"subsetorequal",8838,"succeeds",8827,"suchthat",8715,"suhiragana",12377,"sukatakana",12473,"sukatakanahalfwidth",65405,"sukunarabic",1618,"summation",8721,"sun",9788,"superset",8835,"supersetnotequal",8843,"supersetorequal",8839,"svsquare",13276,"syouwaerasquare",13180,"t",116,"tabengali",2468,"tackdown",8868,"tackleft",8867,"tadeva",2340,"tagujarati",2724,"tagurmukhi",2596,"taharabic",1591,"tahfinalarabic",65218,"tahinitialarabic",65219,"tahiragana",12383,"tahmedialarabic",65220,"taisyouerasquare",13181,"takatakana",12479,"takatakanahalfwidth",65408,"tatweelarabic",1600,"tau",964,"tav",1514,"tavdages",64330,"tavdagesh",64330,"tavdageshhebrew",64330,"tavhebrew",1514,"tbar",359,"tbopomofo",12554,"tcaron",357,"tccurl",680,"tcedilla",355,"tcheharabic",1670,"tchehfinalarabic",64379,"tchehinitialarabic",64380,"tchehmedialarabic",64381,"tcircle",9443,"tcircumflexbelow",7793,"tcommaaccent",355,"tdieresis",7831,"tdotaccent",7787,"tdotbelow",7789,"tecyrillic",1090,"tedescendercyrillic",1197,"teharabic",1578,"tehfinalarabic",65174,"tehhahinitialarabic",64674,"tehhahisolatedarabic",64524,"tehinitialarabic",65175,"tehiragana",12390,"tehjeeminitialarabic",64673,"tehjeemisolatedarabic",64523,"tehmarbutaarabic",1577,"tehmarbutafinalarabic",65172,"tehmedialarabic",65176,"tehmeeminitialarabic",64676,"tehmeemisolatedarabic",64526,"tehnoonfinalarabic",64627,"tekatakana",12486,"tekatakanahalfwidth",65411,"telephone",8481,"telephoneblack",9742,"telishagedolahebrew",1440,"telishaqetanahebrew",1449,"tencircle",9321,"tenideographicparen",12841,"tenparen",9341,"tenperiod",9361,"tenroman",8569,"tesh",679,"tet",1496,"tetdagesh",64312,"tetdageshhebrew",64312,"tethebrew",1496,"tetsecyrillic",1205,"tevirhebrew",1435,"tevirlefthebrew",1435,"thabengali",2469,"thadeva",2341,"thagujarati",2725,"thagurmukhi",2597,"thalarabic",1584,"thalfinalarabic",65196,"thanthakhatlowleftthai",63640,"thanthakhatlowrightthai",63639,"thanthakhatthai",3660,"thanthakhatupperleftthai",63638,"theharabic",1579,"thehfinalarabic",65178,"thehinitialarabic",65179,"thehmedialarabic",65180,"thereexists",8707,"therefore",8756,"theta",952,"theta1",977,"thetasymbolgreek",977,"thieuthacirclekorean",12921,"thieuthaparenkorean",12825,"thieuthcirclekorean",12907,"thieuthkorean",12620,"thieuthparenkorean",12811,"thirteencircle",9324,"thirteenparen",9344,"thirteenperiod",9364,"thonangmonthothai",3601,"thook",429,"thophuthaothai",3602,"thorn",254,"thothahanthai",3607,"thothanthai",3600,"thothongthai",3608,"thothungthai",3606,"thousandcyrillic",1154,"thousandsseparatorarabic",1644,"thousandsseparatorpersian",1644,"three",51,"threearabic",1635,"threebengali",2537,"threecircle",9314,"threecircleinversesansserif",10124,"threedeva",2409,"threeeighths",8540,"threegujarati",2793,"threegurmukhi",2665,"threehackarabic",1635,"threehangzhou",12323,"threeideographicparen",12834,"threeinferior",8323,"threemonospace",65299,"threenumeratorbengali",2550,"threeoldstyle",63283,"threeparen",9334,"threeperiod",9354,"threepersian",1779,"threequarters",190,"threequartersemdash",63198,"threeroman",8562,"threesuperior",179,"threethai",3667,"thzsquare",13204,"tihiragana",12385,"tikatakana",12481,"tikatakanahalfwidth",65409,"tikeutacirclekorean",12912,"tikeutaparenkorean",12816,"tikeutcirclekorean",12898,"tikeutkorean",12599,"tikeutparenkorean",12802,"tilde",732,"tildebelowcmb",816,"tildecmb",771,"tildecomb",771,"tildedoublecmb",864,"tildeoperator",8764,"tildeoverlaycmb",820,"tildeverticalcmb",830,"timescircle",8855,"tipehahebrew",1430,"tipehalefthebrew",1430,"tippigurmukhi",2672,"titlocyrilliccmb",1155,"tiwnarmenian",1407,"tlinebelow",7791,"tmonospace",65364,"toarmenian",1385,"tohiragana",12392,"tokatakana",12488,"tokatakanahalfwidth",65412,"tonebarextrahighmod",741,"tonebarextralowmod",745,"tonebarhighmod",742,"tonebarlowmod",744,"tonebarmidmod",743,"tonefive",445,"tonesix",389,"tonetwo",424,"tonos",900,"tonsquare",13095,"topatakthai",3599,"tortoiseshellbracketleft",12308,"tortoiseshellbracketleftsmall",65117,"tortoiseshellbracketleftvertical",65081,"tortoiseshellbracketright",12309,"tortoiseshellbracketrightsmall",65118,"tortoiseshellbracketrightvertical",65082,"totaothai",3605,"tpalatalhook",427,"tparen",9391,"trademark",8482,"trademarksans",63722,"trademarkserif",63195,"tretroflexhook",648,"triagdn",9660,"triaglf",9668,"triagrt",9658,"triagup",9650,"ts",678,"tsadi",1510,"tsadidagesh",64326,"tsadidageshhebrew",64326,"tsadihebrew",1510,"tsecyrillic",1094,"tsere",1461,"tsere12",1461,"tsere1e",1461,"tsere2b",1461,"tserehebrew",1461,"tserenarrowhebrew",1461,"tserequarterhebrew",1461,"tserewidehebrew",1461,"tshecyrillic",1115,"tsuperior",63219,"ttabengali",2463,"ttadeva",2335,"ttagujarati",2719,"ttagurmukhi",2591,"tteharabic",1657,"ttehfinalarabic",64359,"ttehinitialarabic",64360,"ttehmedialarabic",64361,"tthabengali",2464,"tthadeva",2336,"tthagujarati",2720,"tthagurmukhi",2592,"tturned",647,"tuhiragana",12388,"tukatakana",12484,"tukatakanahalfwidth",65410,"tusmallhiragana",12387,"tusmallkatakana",12483,"tusmallkatakanahalfwidth",65391,"twelvecircle",9323,"twelveparen",9343,"twelveperiod",9363,"twelveroman",8571,"twentycircle",9331,"twentyhangzhou",21316,"twentyparen",9351,"twentyperiod",9371,"two",50,"twoarabic",1634,"twobengali",2536,"twocircle",9313,"twocircleinversesansserif",10123,"twodeva",2408,"twodotenleader",8229,"twodotleader",8229,"twodotleadervertical",65072,"twogujarati",2792,"twogurmukhi",2664,"twohackarabic",1634,"twohangzhou",12322,"twoideographicparen",12833,"twoinferior",8322,"twomonospace",65298,"twonumeratorbengali",2549,"twooldstyle",63282,"twoparen",9333,"twoperiod",9353,"twopersian",1778,"tworoman",8561,"twostroke",443,"twosuperior",178,"twothai",3666,"twothirds",8532,"u",117,"uacute",250,"ubar",649,"ubengali",2441,"ubopomofo",12584,"ubreve",365,"ucaron",468,"ucircle",9444,"ucircumflex",251,"ucircumflexbelow",7799,"ucyrillic",1091,"udattadeva",2385,"udblacute",369,"udblgrave",533,"udeva",2313,"udieresis",252,"udieresisacute",472,"udieresisbelow",7795,"udieresiscaron",474,"udieresiscyrillic",1265,"udieresisgrave",476,"udieresismacron",470,"udotbelow",7909,"ugrave",249,"ugujarati",2697,"ugurmukhi",2569,"uhiragana",12358,"uhookabove",7911,"uhorn",432,"uhornacute",7913,"uhorndotbelow",7921,"uhorngrave",7915,"uhornhookabove",7917,"uhorntilde",7919,"uhungarumlaut",369,"uhungarumlautcyrillic",1267,"uinvertedbreve",535,"ukatakana",12454,"ukatakanahalfwidth",65395,"ukcyrillic",1145,"ukorean",12636,"umacron",363,"umacroncyrillic",1263,"umacrondieresis",7803,"umatragurmukhi",2625,"umonospace",65365,"underscore",95,"underscoredbl",8215,"underscoremonospace",65343,"underscorevertical",65075,"underscorewavy",65103,"union",8746,"universal",8704,"uogonek",371,"uparen",9392,"upblock",9600,"upperdothebrew",1476,"upsilon",965,"upsilondieresis",971,"upsilondieresistonos",944,"upsilonlatin",650,"upsilontonos",973,"uptackbelowcmb",797,"uptackmod",724,"uragurmukhi",2675,"uring",367,"ushortcyrillic",1118,"usmallhiragana",12357,"usmallkatakana",12453,"usmallkatakanahalfwidth",65385,"ustraightcyrillic",1199,"ustraightstrokecyrillic",1201,"utilde",361,"utildeacute",7801,"utildebelow",7797,"uubengali",2442,"uudeva",2314,"uugujarati",2698,"uugurmukhi",2570,"uumatragurmukhi",2626,"uuvowelsignbengali",2498,"uuvowelsigndeva",2370,"uuvowelsigngujarati",2754,"uvowelsignbengali",2497,"uvowelsigndeva",2369,"uvowelsigngujarati",2753,"v",118,"vadeva",2357,"vagujarati",2741,"vagurmukhi",2613,"vakatakana",12535,"vav",1493,"vavdagesh",64309,"vavdagesh65",64309,"vavdageshhebrew",64309,"vavhebrew",1493,"vavholam",64331,"vavholamhebrew",64331,"vavvavhebrew",1520,"vavyodhebrew",1521,"vcircle",9445,"vdotbelow",7807,"vecyrillic",1074,"veharabic",1700,"vehfinalarabic",64363,"vehinitialarabic",64364,"vehmedialarabic",64365,"vekatakana",12537,"venus",9792,"verticalbar",124,"verticallineabovecmb",781,"verticallinebelowcmb",809,"verticallinelowmod",716,"verticallinemod",712,"vewarmenian",1406,"vhook",651,"vikatakana",12536,"viramabengali",2509,"viramadeva",2381,"viramagujarati",2765,"visargabengali",2435,"visargadeva",2307,"visargagujarati",2691,"vmonospace",65366,"voarmenian",1400,"voicediterationhiragana",12446,"voicediterationkatakana",12542,"voicedmarkkana",12443,"voicedmarkkanahalfwidth",65438,"vokatakana",12538,"vparen",9393,"vtilde",7805,"vturned",652,"vuhiragana",12436,"vukatakana",12532,"w",119,"wacute",7811,"waekorean",12633,"wahiragana",12431,"wakatakana",12527,"wakatakanahalfwidth",65436,"wakorean",12632,"wasmallhiragana",12430,"wasmallkatakana",12526,"wattosquare",13143,"wavedash",12316,"wavyunderscorevertical",65076,"wawarabic",1608,"wawfinalarabic",65262,"wawhamzaabovearabic",1572,"wawhamzaabovefinalarabic",65158,"wbsquare",13277,"wcircle",9446,"wcircumflex",373,"wdieresis",7813,"wdotaccent",7815,"wdotbelow",7817,"wehiragana",12433,"weierstrass",8472,"wekatakana",12529,"wekorean",12638,"weokorean",12637,"wgrave",7809,"whitebullet",9702,"whitecircle",9675,"whitecircleinverse",9689,"whitecornerbracketleft",12302,"whitecornerbracketleftvertical",65091,"whitecornerbracketright",12303,"whitecornerbracketrightvertical",65092,"whitediamond",9671,"whitediamondcontainingblacksmalldiamond",9672,"whitedownpointingsmalltriangle",9663,"whitedownpointingtriangle",9661,"whiteleftpointingsmalltriangle",9667,"whiteleftpointingtriangle",9665,"whitelenticularbracketleft",12310,"whitelenticularbracketright",12311,"whiterightpointingsmalltriangle",9657,"whiterightpointingtriangle",9655,"whitesmallsquare",9643,"whitesmilingface",9786,"whitesquare",9633,"whitestar",9734,"whitetelephone",9743,"whitetortoiseshellbracketleft",12312,"whitetortoiseshellbracketright",12313,"whiteuppointingsmalltriangle",9653,"whiteuppointingtriangle",9651,"wihiragana",12432,"wikatakana",12528,"wikorean",12639,"wmonospace",65367,"wohiragana",12434,"wokatakana",12530,"wokatakanahalfwidth",65382,"won",8361,"wonmonospace",65510,"wowaenthai",3623,"wparen",9394,"wring",7832,"wsuperior",695,"wturned",653,"wynn",447,"x",120,"xabovecmb",829,"xbopomofo",12562,"xcircle",9447,"xdieresis",7821,"xdotaccent",7819,"xeharmenian",1389,"xi",958,"xmonospace",65368,"xparen",9395,"xsuperior",739,"y",121,"yaadosquare",13134,"yabengali",2479,"yacute",253,"yadeva",2351,"yaekorean",12626,"yagujarati",2735,"yagurmukhi",2607,"yahiragana",12420,"yakatakana",12516,"yakatakanahalfwidth",65428,"yakorean",12625,"yamakkanthai",3662,"yasmallhiragana",12419,"yasmallkatakana",12515,"yasmallkatakanahalfwidth",65388,"yatcyrillic",1123,"ycircle",9448,"ycircumflex",375,"ydieresis",255,"ydotaccent",7823,"ydotbelow",7925,"yeharabic",1610,"yehbarreearabic",1746,"yehbarreefinalarabic",64431,"yehfinalarabic",65266,"yehhamzaabovearabic",1574,"yehhamzaabovefinalarabic",65162,"yehhamzaaboveinitialarabic",65163,"yehhamzaabovemedialarabic",65164,"yehinitialarabic",65267,"yehmedialarabic",65268,"yehmeeminitialarabic",64733,"yehmeemisolatedarabic",64600,"yehnoonfinalarabic",64660,"yehthreedotsbelowarabic",1745,"yekorean",12630,"yen",165,"yenmonospace",65509,"yeokorean",12629,"yeorinhieuhkorean",12678,"yerahbenyomohebrew",1450,"yerahbenyomolefthebrew",1450,"yericyrillic",1099,"yerudieresiscyrillic",1273,"yesieungkorean",12673,"yesieungpansioskorean",12675,"yesieungsioskorean",12674,"yetivhebrew",1434,"ygrave",7923,"yhook",436,"yhookabove",7927,"yiarmenian",1397,"yicyrillic",1111,"yikorean",12642,"yinyang",9775,"yiwnarmenian",1410,"ymonospace",65369,"yod",1497,"yoddagesh",64313,"yoddageshhebrew",64313,"yodhebrew",1497,"yodyodhebrew",1522,"yodyodpatahhebrew",64287,"yohiragana",12424,"yoikorean",12681,"yokatakana",12520,"yokatakanahalfwidth",65430,"yokorean",12635,"yosmallhiragana",12423,"yosmallkatakana",12519,"yosmallkatakanahalfwidth",65390,"yotgreek",1011,"yoyaekorean",12680,"yoyakorean",12679,"yoyakthai",3618,"yoyingthai",3597,"yparen",9396,"ypogegrammeni",890,"ypogegrammenigreekcmb",837,"yr",422,"yring",7833,"ysuperior",696,"ytilde",7929,"yturned",654,"yuhiragana",12422,"yuikorean",12684,"yukatakana",12518,"yukatakanahalfwidth",65429,"yukorean",12640,"yusbigcyrillic",1131,"yusbigiotifiedcyrillic",1133,"yuslittlecyrillic",1127,"yuslittleiotifiedcyrillic",1129,"yusmallhiragana",12421,"yusmallkatakana",12517,"yusmallkatakanahalfwidth",65389,"yuyekorean",12683,"yuyeokorean",12682,"yyabengali",2527,"yyadeva",2399,"z",122,"zaarmenian",1382,"zacute",378,"zadeva",2395,"zagurmukhi",2651,"zaharabic",1592,"zahfinalarabic",65222,"zahinitialarabic",65223,"zahiragana",12374,"zahmedialarabic",65224,"zainarabic",1586,"zainfinalarabic",65200,"zakatakana",12470,"zaqefgadolhebrew",1429,"zaqefqatanhebrew",1428,"zarqahebrew",1432,"zayin",1494,"zayindagesh",64310,"zayindageshhebrew",64310,"zayinhebrew",1494,"zbopomofo",12567,"zcaron",382,"zcircle",9449,"zcircumflex",7825,"zcurl",657,"zdot",380,"zdotaccent",380,"zdotbelow",7827,"zecyrillic",1079,"zedescendercyrillic",1177,"zedieresiscyrillic",1247,"zehiragana",12380,"zekatakana",12476,"zero",48,"zeroarabic",1632,"zerobengali",2534,"zerodeva",2406,"zerogujarati",2790,"zerogurmukhi",2662,"zerohackarabic",1632,"zeroinferior",8320,"zeromonospace",65296,"zerooldstyle",63280,"zeropersian",1776,"zerosuperior",8304,"zerothai",3664,"zerowidthjoiner",65279,"zerowidthnonjoiner",8204,"zerowidthspace",8203,"zeta",950,"zhbopomofo",12563,"zhearmenian",1386,"zhebrevecyrillic",1218,"zhecyrillic",1078,"zhedescendercyrillic",1175,"zhedieresiscyrillic",1245,"zihiragana",12376,"zikatakana",12472,"zinorhebrew",1454,"zlinebelow",7829,"zmonospace",65370,"zohiragana",12382,"zokatakana",12478,"zparen",9397,"zretroflexhook",656,"zstroke",438,"zuhiragana",12378,"zukatakana",12474,".notdef",0,"angbracketleftbig",9001,"angbracketleftBig",9001,"angbracketleftbigg",9001,"angbracketleftBigg",9001,"angbracketrightBig",9002,"angbracketrightbig",9002,"angbracketrightBigg",9002,"angbracketrightbigg",9002,"arrowhookleft",8618,"arrowhookright",8617,"arrowlefttophalf",8636,"arrowleftbothalf",8637,"arrownortheast",8599,"arrownorthwest",8598,"arrowrighttophalf",8640,"arrowrightbothalf",8641,"arrowsoutheast",8600,"arrowsouthwest",8601,"backslashbig",8726,"backslashBig",8726,"backslashBigg",8726,"backslashbigg",8726,"bardbl",8214,"bracehtipdownleft",65079,"bracehtipdownright",65079,"bracehtipupleft",65080,"bracehtipupright",65080,"braceleftBig",123,"braceleftbig",123,"braceleftbigg",123,"braceleftBigg",123,"bracerightBig",125,"bracerightbig",125,"bracerightbigg",125,"bracerightBigg",125,"bracketleftbig",91,"bracketleftBig",91,"bracketleftbigg",91,"bracketleftBigg",91,"bracketrightBig",93,"bracketrightbig",93,"bracketrightbigg",93,"bracketrightBigg",93,"ceilingleftbig",8968,"ceilingleftBig",8968,"ceilingleftBigg",8968,"ceilingleftbigg",8968,"ceilingrightbig",8969,"ceilingrightBig",8969,"ceilingrightbigg",8969,"ceilingrightBigg",8969,"circledotdisplay",8857,"circledottext",8857,"circlemultiplydisplay",8855,"circlemultiplytext",8855,"circleplusdisplay",8853,"circleplustext",8853,"contintegraldisplay",8750,"contintegraltext",8750,"coproductdisplay",8720,"coproducttext",8720,"floorleftBig",8970,"floorleftbig",8970,"floorleftbigg",8970,"floorleftBigg",8970,"floorrightbig",8971,"floorrightBig",8971,"floorrightBigg",8971,"floorrightbigg",8971,"hatwide",770,"hatwider",770,"hatwidest",770,"intercal",7488,"integraldisplay",8747,"integraltext",8747,"intersectiondisplay",8898,"intersectiontext",8898,"logicalanddisplay",8743,"logicalandtext",8743,"logicalordisplay",8744,"logicalortext",8744,"parenleftBig",40,"parenleftbig",40,"parenleftBigg",40,"parenleftbigg",40,"parenrightBig",41,"parenrightbig",41,"parenrightBigg",41,"parenrightbigg",41,"prime",8242,"productdisplay",8719,"producttext",8719,"radicalbig",8730,"radicalBig",8730,"radicalBigg",8730,"radicalbigg",8730,"radicalbt",8730,"radicaltp",8730,"radicalvertex",8730,"slashbig",47,"slashBig",47,"slashBigg",47,"slashbigg",47,"summationdisplay",8721,"summationtext",8721,"tildewide",732,"tildewider",732,"tildewidest",732,"uniondisplay",8899,"unionmultidisplay",8846,"unionmultitext",8846,"unionsqdisplay",8852,"unionsqtext",8852,"uniontext",8899,"vextenddouble",8741,"vextendsingle",8739]})),i=(0,n.getArrayLookupTableFactory)((function(){return["space",32,"a1",9985,"a2",9986,"a202",9987,"a3",9988,"a4",9742,"a5",9990,"a119",9991,"a118",9992,"a117",9993,"a11",9755,"a12",9758,"a13",9996,"a14",9997,"a15",9998,"a16",9999,"a105",1e4,"a17",10001,"a18",10002,"a19",10003,"a20",10004,"a21",10005,"a22",10006,"a23",10007,"a24",10008,"a25",10009,"a26",10010,"a27",10011,"a28",10012,"a6",10013,"a7",10014,"a8",10015,"a9",10016,"a10",10017,"a29",10018,"a30",10019,"a31",10020,"a32",10021,"a33",10022,"a34",10023,"a35",9733,"a36",10025,"a37",10026,"a38",10027,"a39",10028,"a40",10029,"a41",10030,"a42",10031,"a43",10032,"a44",10033,"a45",10034,"a46",10035,"a47",10036,"a48",10037,"a49",10038,"a50",10039,"a51",10040,"a52",10041,"a53",10042,"a54",10043,"a55",10044,"a56",10045,"a57",10046,"a58",10047,"a59",10048,"a60",10049,"a61",10050,"a62",10051,"a63",10052,"a64",10053,"a65",10054,"a66",10055,"a67",10056,"a68",10057,"a69",10058,"a70",10059,"a71",9679,"a72",10061,"a73",9632,"a74",10063,"a203",10064,"a75",10065,"a204",10066,"a76",9650,"a77",9660,"a78",9670,"a79",10070,"a81",9687,"a82",10072,"a83",10073,"a84",10074,"a97",10075,"a98",10076,"a99",10077,"a100",10078,"a101",10081,"a102",10082,"a103",10083,"a104",10084,"a106",10085,"a107",10086,"a108",10087,"a112",9827,"a111",9830,"a110",9829,"a109",9824,"a120",9312,"a121",9313,"a122",9314,"a123",9315,"a124",9316,"a125",9317,"a126",9318,"a127",9319,"a128",9320,"a129",9321,"a130",10102,"a131",10103,"a132",10104,"a133",10105,"a134",10106,"a135",10107,"a136",10108,"a137",10109,"a138",10110,"a139",10111,"a140",10112,"a141",10113,"a142",10114,"a143",10115,"a144",10116,"a145",10117,"a146",10118,"a147",10119,"a148",10120,"a149",10121,"a150",10122,"a151",10123,"a152",10124,"a153",10125,"a154",10126,"a155",10127,"a156",10128,"a157",10129,"a158",10130,"a159",10131,"a160",10132,"a161",8594,"a163",8596,"a164",8597,"a196",10136,"a165",10137,"a192",10138,"a166",10139,"a167",10140,"a168",10141,"a169",10142,"a170",10143,"a171",10144,"a172",10145,"a173",10146,"a162",10147,"a174",10148,"a175",10149,"a176",10150,"a177",10151,"a178",10152,"a179",10153,"a193",10154,"a180",10155,"a199",10156,"a181",10157,"a200",10158,"a182",10159,"a201",10161,"a183",10162,"a184",10163,"a197",10164,"a185",10165,"a194",10166,"a198",10167,"a186",10168,"a195",10169,"a187",10170,"a188",10171,"a189",10172,"a190",10173,"a191",10174,"a89",10088,"a90",10089,"a93",10090,"a94",10091,"a91",10092,"a92",10093,"a205",10094,"a85",10095,"a206",10096,"a86",10097,"a87",10098,"a88",10099,"a95",10100,"a96",10101,".notdef",0]}))},(e,t,r)=>{r.r(t),r.d(t,{clearUnicodeCaches:()=>p,getCharUnicodeCategory:()=>f,getNormalizedUnicodes:()=>l,getUnicodeForGlyph:()=>s,getUnicodeRangeFor:()=>c,mapSpecialUnicodeValues:()=>i,reverseIfRtl:()=>h});var n=r(6);const a=(0,n.getLookupTableFactory)((function(e){e[63721]=169,e[63193]=169,e[63720]=174,e[63194]=174,e[63722]=8482,e[63195]=8482,e[63729]=9127,e[63730]=9128,e[63731]=9129,e[63740]=9131,e[63741]=9132,e[63742]=9133,e[63726]=9121,e[63727]=9122,e[63728]=9123,e[63737]=9124,e[63738]=9125,e[63739]=9126,e[63723]=9115,e[63724]=9116,e[63725]=9117,e[63734]=9118,e[63735]=9119,e[63736]=9120}));function i(e){return 65520>e||e>65535?62976>e||e>63743?173===e?45:e:a()[e]||e:0}function s(e,t){let r=t[e];if(void 0!==r)return r;if(!e)return-1;if("u"===e[0]){const t=e.length;let n;if(7===t&&"n"===e[1]&&"i"===e[2])n=e.substring(3);else{if(5>t||t>7)return-1;n=e.substring(1)}if(n===n.toUpperCase()&&(r=parseInt(n,16),r>=0))return r}return-1}const o=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];function c(e){for(let t=0,r=o.length;r>t;t++){const r=o[t];if(e>=r.begin&&r.end>e)return t}return-1}const l=(0,n.getArrayLookupTableFactory)((function(){return["¨"," ̈","¯"," ̄","´"," ́","µ","μ","¸"," ̧","IJ","IJ","ij","ij","Ŀ","L·","ŀ","l·","ʼn","ʼn","ſ","s","DŽ","DŽ","Dž","Dž","dž","dž","LJ","LJ","Lj","Lj","lj","lj","NJ","NJ","Nj","Nj","nj","nj","DZ","DZ","Dz","Dz","dz","dz","˘"," ̆","˙"," ̇","˚"," ̊","˛"," ̨","˜"," ̃","˝"," ̋","ͺ"," ͅ","΄"," ́","ϐ","β","ϑ","θ","ϒ","Υ","ϕ","φ","ϖ","π","ϰ","κ","ϱ","ρ","ϲ","ς","ϴ","Θ","ϵ","ε","Ϲ","Σ","և","եւ","ٵ","اٴ","ٶ","وٴ","ٷ","ۇٴ","ٸ","يٴ","ำ","ํา","ຳ","ໍາ","ໜ","ຫນ","ໝ","ຫມ","ཷ","ྲཱྀ","ཹ","ླཱྀ","ẚ","aʾ","᾽"," ̓","᾿"," ̓","῀"," ͂","῾"," ̔"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","‗"," ̳","․",".","‥","..","…","...","″","′′","‴","′′′","‶","‵‵","‷","‵‵‵","‼","!!","‾"," ̅","⁇","??","⁈","?!","⁉","!?","⁗","′′′′"," "," ","₨","Rs","℀","a/c","℁","a/s","℃","°C","℅","c/o","℆","c/u","ℇ","Ɛ","℉","°F","№","No","℡","TEL","ℵ","א","ℶ","ב","ℷ","ג","ℸ","ד","℻","FAX","Ⅰ","I","Ⅱ","II","Ⅲ","III","Ⅳ","IV","Ⅴ","V","Ⅵ","VI","Ⅶ","VII","Ⅷ","VIII","Ⅸ","IX","Ⅹ","X","Ⅺ","XI","Ⅻ","XII","Ⅼ","L","Ⅽ","C","Ⅾ","D","Ⅿ","M","ⅰ","i","ⅱ","ii","ⅲ","iii","ⅳ","iv","ⅴ","v","ⅵ","vi","ⅶ","vii","ⅷ","viii","ⅸ","ix","ⅹ","x","ⅺ","xi","ⅻ","xii","ⅼ","l","ⅽ","c","ⅾ","d","ⅿ","m","∬","∫∫","∭","∫∫∫","∯","∮∮","∰","∮∮∮","⑴","(1)","⑵","(2)","⑶","(3)","⑷","(4)","⑸","(5)","⑹","(6)","⑺","(7)","⑻","(8)","⑼","(9)","⑽","(10)","⑾","(11)","⑿","(12)","⒀","(13)","⒁","(14)","⒂","(15)","⒃","(16)","⒄","(17)","⒅","(18)","⒆","(19)","⒇","(20)","⒈","1.","⒉","2.","⒊","3.","⒋","4.","⒌","5.","⒍","6.","⒎","7.","⒏","8.","⒐","9.","⒑","10.","⒒","11.","⒓","12.","⒔","13.","⒕","14.","⒖","15.","⒗","16.","⒘","17.","⒙","18.","⒚","19.","⒛","20.","⒜","(a)","⒝","(b)","⒞","(c)","⒟","(d)","⒠","(e)","⒡","(f)","⒢","(g)","⒣","(h)","⒤","(i)","⒥","(j)","⒦","(k)","⒧","(l)","⒨","(m)","⒩","(n)","⒪","(o)","⒫","(p)","⒬","(q)","⒭","(r)","⒮","(s)","⒯","(t)","⒰","(u)","⒱","(v)","⒲","(w)","⒳","(x)","⒴","(y)","⒵","(z)","⨌","∫∫∫∫","⩴","::=","⩵","==","⩶","===","⺟","母","⻳","龟","⼀","一","⼁","丨","⼂","丶","⼃","丿","⼄","乙","⼅","亅","⼆","二","⼇","亠","⼈","人","⼉","儿","⼊","入","⼋","八","⼌","冂","⼍","冖","⼎","冫","⼏","几","⼐","凵","⼑","刀","⼒","力","⼓","勹","⼔","匕","⼕","匚","⼖","匸","⼗","十","⼘","卜","⼙","卩","⼚","厂","⼛","厶","⼜","又","⼝","口","⼞","囗","⼟","土","⼠","士","⼡","夂","⼢","夊","⼣","夕","⼤","大","⼥","女","⼦","子","⼧","宀","⼨","寸","⼩","小","⼪","尢","⼫","尸","⼬","屮","⼭","山","⼮","巛","⼯","工","⼰","己","⼱","巾","⼲","干","⼳","幺","⼴","广","⼵","廴","⼶","廾","⼷","弋","⼸","弓","⼹","彐","⼺","彡","⼻","彳","⼼","心","⼽","戈","⼾","戶","⼿","手","⽀","支","⽁","攴","⽂","文","⽃","斗","⽄","斤","⽅","方","⽆","无","⽇","日","⽈","曰","⽉","月","⽊","木","⽋","欠","⽌","止","⽍","歹","⽎","殳","⽏","毋","⽐","比","⽑","毛","⽒","氏","⽓","气","⽔","水","⽕","火","⽖","爪","⽗","父","⽘","爻","⽙","爿","⽚","片","⽛","牙","⽜","牛","⽝","犬","⽞","玄","⽟","玉","⽠","瓜","⽡","瓦","⽢","甘","⽣","生","⽤","用","⽥","田","⽦","疋","⽧","疒","⽨","癶","⽩","白","⽪","皮","⽫","皿","⽬","目","⽭","矛","⽮","矢","⽯","石","⽰","示","⽱","禸","⽲","禾","⽳","穴","⽴","立","⽵","竹","⽶","米","⽷","糸","⽸","缶","⽹","网","⽺","羊","⽻","羽","⽼","老","⽽","而","⽾","耒","⽿","耳","⾀","聿","⾁","肉","⾂","臣","⾃","自","⾄","至","⾅","臼","⾆","舌","⾇","舛","⾈","舟","⾉","艮","⾊","色","⾋","艸","⾌","虍","⾍","虫","⾎","血","⾏","行","⾐","衣","⾑","襾","⾒","見","⾓","角","⾔","言","⾕","谷","⾖","豆","⾗","豕","⾘","豸","⾙","貝","⾚","赤","⾛","走","⾜","足","⾝","身","⾞","車","⾟","辛","⾠","辰","⾡","辵","⾢","邑","⾣","酉","⾤","釆","⾥","里","⾦","金","⾧","長","⾨","門","⾩","阜","⾪","隶","⾫","隹","⾬","雨","⾭","靑","⾮","非","⾯","面","⾰","革","⾱","韋","⾲","韭","⾳","音","⾴","頁","⾵","風","⾶","飛","⾷","食","⾸","首","⾹","香","⾺","馬","⾻","骨","⾼","高","⾽","髟","⾾","鬥","⾿","鬯","⿀","鬲","⿁","鬼","⿂","魚","⿃","鳥","⿄","鹵","⿅","鹿","⿆","麥","⿇","麻","⿈","黃","⿉","黍","⿊","黑","⿋","黹","⿌","黽","⿍","鼎","⿎","鼓","⿏","鼠","⿐","鼻","⿑","齊","⿒","齒","⿓","龍","⿔","龜","⿕","龠","〶","〒","〸","十","〹","卄","〺","卅","゛"," ゙","゜"," ゚","ㄱ","ᄀ","ㄲ","ᄁ","ㄳ","ᆪ","ㄴ","ᄂ","ㄵ","ᆬ","ㄶ","ᆭ","ㄷ","ᄃ","ㄸ","ᄄ","ㄹ","ᄅ","ㄺ","ᆰ","ㄻ","ᆱ","ㄼ","ᆲ","ㄽ","ᆳ","ㄾ","ᆴ","ㄿ","ᆵ","ㅀ","ᄚ","ㅁ","ᄆ","ㅂ","ᄇ","ㅃ","ᄈ","ㅄ","ᄡ","ㅅ","ᄉ","ㅆ","ᄊ","ㅇ","ᄋ","ㅈ","ᄌ","ㅉ","ᄍ","ㅊ","ᄎ","ㅋ","ᄏ","ㅌ","ᄐ","ㅍ","ᄑ","ㅎ","ᄒ","ㅏ","ᅡ","ㅐ","ᅢ","ㅑ","ᅣ","ㅒ","ᅤ","ㅓ","ᅥ","ㅔ","ᅦ","ㅕ","ᅧ","ㅖ","ᅨ","ㅗ","ᅩ","ㅘ","ᅪ","ㅙ","ᅫ","ㅚ","ᅬ","ㅛ","ᅭ","ㅜ","ᅮ","ㅝ","ᅯ","ㅞ","ᅰ","ㅟ","ᅱ","ㅠ","ᅲ","ㅡ","ᅳ","ㅢ","ᅴ","ㅣ","ᅵ","ㅤ","ᅠ","ㅥ","ᄔ","ㅦ","ᄕ","ㅧ","ᇇ","ㅨ","ᇈ","ㅩ","ᇌ","ㅪ","ᇎ","ㅫ","ᇓ","ㅬ","ᇗ","ㅭ","ᇙ","ㅮ","ᄜ","ㅯ","ᇝ","ㅰ","ᇟ","ㅱ","ᄝ","ㅲ","ᄞ","ㅳ","ᄠ","ㅴ","ᄢ","ㅵ","ᄣ","ㅶ","ᄧ","ㅷ","ᄩ","ㅸ","ᄫ","ㅹ","ᄬ","ㅺ","ᄭ","ㅻ","ᄮ","ㅼ","ᄯ","ㅽ","ᄲ","ㅾ","ᄶ","ㅿ","ᅀ","ㆀ","ᅇ","ㆁ","ᅌ","ㆂ","ᇱ","ㆃ","ᇲ","ㆄ","ᅗ","ㆅ","ᅘ","ㆆ","ᅙ","ㆇ","ᆄ","ㆈ","ᆅ","ㆉ","ᆈ","ㆊ","ᆑ","ㆋ","ᆒ","ㆌ","ᆔ","ㆍ","ᆞ","ㆎ","ᆡ","㈀","(ᄀ)","㈁","(ᄂ)","㈂","(ᄃ)","㈃","(ᄅ)","㈄","(ᄆ)","㈅","(ᄇ)","㈆","(ᄉ)","㈇","(ᄋ)","㈈","(ᄌ)","㈉","(ᄎ)","㈊","(ᄏ)","㈋","(ᄐ)","㈌","(ᄑ)","㈍","(ᄒ)","㈎","(가)","㈏","(나)","㈐","(다)","㈑","(라)","㈒","(마)","㈓","(바)","㈔","(사)","㈕","(아)","㈖","(자)","㈗","(차)","㈘","(카)","㈙","(타)","㈚","(파)","㈛","(하)","㈜","(주)","㈝","(오전)","㈞","(오후)","㈠","(一)","㈡","(二)","㈢","(三)","㈣","(四)","㈤","(五)","㈥","(六)","㈦","(七)","㈧","(八)","㈨","(九)","㈩","(十)","㈪","(月)","㈫","(火)","㈬","(水)","㈭","(木)","㈮","(金)","㈯","(土)","㈰","(日)","㈱","(株)","㈲","(有)","㈳","(社)","㈴","(名)","㈵","(特)","㈶","(財)","㈷","(祝)","㈸","(労)","㈹","(代)","㈺","(呼)","㈻","(学)","㈼","(監)","㈽","(企)","㈾","(資)","㈿","(協)","㉀","(祭)","㉁","(休)","㉂","(自)","㉃","(至)","㋀","1月","㋁","2月","㋂","3月","㋃","4月","㋄","5月","㋅","6月","㋆","7月","㋇","8月","㋈","9月","㋉","10月","㋊","11月","㋋","12月","㍘","0点","㍙","1点","㍚","2点","㍛","3点","㍜","4点","㍝","5点","㍞","6点","㍟","7点","㍠","8点","㍡","9点","㍢","10点","㍣","11点","㍤","12点","㍥","13点","㍦","14点","㍧","15点","㍨","16点","㍩","17点","㍪","18点","㍫","19点","㍬","20点","㍭","21点","㍮","22点","㍯","23点","㍰","24点","㏠","1日","㏡","2日","㏢","3日","㏣","4日","㏤","5日","㏥","6日","㏦","7日","㏧","8日","㏨","9日","㏩","10日","㏪","11日","㏫","12日","㏬","13日","㏭","14日","㏮","15日","㏯","16日","㏰","17日","㏱","18日","㏲","19日","㏳","20日","㏴","21日","㏵","22日","㏶","23日","㏷","24日","㏸","25日","㏹","26日","㏺","27日","㏻","28日","㏼","29日","㏽","30日","㏾","31日","ff","ff","fi","fi","fl","fl","ffi","ffi","ffl","ffl","ſt","ſt","st","st","ﬓ","մն","ﬔ","մե","ﬕ","մի","ﬖ","վն","ﬗ","մխ","ﭏ","אל","ﭐ","ٱ","ﭑ","ٱ","ﭒ","ٻ","ﭓ","ٻ","ﭔ","ٻ","ﭕ","ٻ","ﭖ","پ","ﭗ","پ","ﭘ","پ","ﭙ","پ","ﭚ","ڀ","ﭛ","ڀ","ﭜ","ڀ","ﭝ","ڀ","ﭞ","ٺ","ﭟ","ٺ","ﭠ","ٺ","ﭡ","ٺ","ﭢ","ٿ","ﭣ","ٿ","ﭤ","ٿ","ﭥ","ٿ","ﭦ","ٹ","ﭧ","ٹ","ﭨ","ٹ","ﭩ","ٹ","ﭪ","ڤ","ﭫ","ڤ","ﭬ","ڤ","ﭭ","ڤ","ﭮ","ڦ","ﭯ","ڦ","ﭰ","ڦ","ﭱ","ڦ","ﭲ","ڄ","ﭳ","ڄ","ﭴ","ڄ","ﭵ","ڄ","ﭶ","ڃ","ﭷ","ڃ","ﭸ","ڃ","ﭹ","ڃ","ﭺ","چ","ﭻ","چ","ﭼ","چ","ﭽ","چ","ﭾ","ڇ","ﭿ","ڇ","ﮀ","ڇ","ﮁ","ڇ","ﮂ","ڍ","ﮃ","ڍ","ﮄ","ڌ","ﮅ","ڌ","ﮆ","ڎ","ﮇ","ڎ","ﮈ","ڈ","ﮉ","ڈ","ﮊ","ژ","ﮋ","ژ","ﮌ","ڑ","ﮍ","ڑ","ﮎ","ک","ﮏ","ک","ﮐ","ک","ﮑ","ک","ﮒ","گ","ﮓ","گ","ﮔ","گ","ﮕ","گ","ﮖ","ڳ","ﮗ","ڳ","ﮘ","ڳ","ﮙ","ڳ","ﮚ","ڱ","ﮛ","ڱ","ﮜ","ڱ","ﮝ","ڱ","ﮞ","ں","ﮟ","ں","ﮠ","ڻ","ﮡ","ڻ","ﮢ","ڻ","ﮣ","ڻ","ﮤ","ۀ","ﮥ","ۀ","ﮦ","ہ","ﮧ","ہ","ﮨ","ہ","ﮩ","ہ","ﮪ","ھ","ﮫ","ھ","ﮬ","ھ","ﮭ","ھ","ﮮ","ے","ﮯ","ے","ﮰ","ۓ","ﮱ","ۓ","ﯓ","ڭ","ﯔ","ڭ","ﯕ","ڭ","ﯖ","ڭ","ﯗ","ۇ","ﯘ","ۇ","ﯙ","ۆ","ﯚ","ۆ","ﯛ","ۈ","ﯜ","ۈ","ﯝ","ٷ","ﯞ","ۋ","ﯟ","ۋ","ﯠ","ۅ","ﯡ","ۅ","ﯢ","ۉ","ﯣ","ۉ","ﯤ","ې","ﯥ","ې","ﯦ","ې","ﯧ","ې","ﯨ","ى","ﯩ","ى","ﯪ","ئا","ﯫ","ئا","ﯬ","ئە","ﯭ","ئە","ﯮ","ئو","ﯯ","ئو","ﯰ","ئۇ","ﯱ","ئۇ","ﯲ","ئۆ","ﯳ","ئۆ","ﯴ","ئۈ","ﯵ","ئۈ","ﯶ","ئې","ﯷ","ئې","ﯸ","ئې","ﯹ","ئى","ﯺ","ئى","ﯻ","ئى","ﯼ","ی","ﯽ","ی","ﯾ","ی","ﯿ","ی","ﰀ","ئج","ﰁ","ئح","ﰂ","ئم","ﰃ","ئى","ﰄ","ئي","ﰅ","بج","ﰆ","بح","ﰇ","بخ","ﰈ","بم","ﰉ","بى","ﰊ","بي","ﰋ","تج","ﰌ","تح","ﰍ","تخ","ﰎ","تم","ﰏ","تى","ﰐ","تي","ﰑ","ثج","ﰒ","ثم","ﰓ","ثى","ﰔ","ثي","ﰕ","جح","ﰖ","جم","ﰗ","حج","ﰘ","حم","ﰙ","خج","ﰚ","خح","ﰛ","خم","ﰜ","سج","ﰝ","سح","ﰞ","سخ","ﰟ","سم","ﰠ","صح","ﰡ","صم","ﰢ","ضج","ﰣ","ضح","ﰤ","ضخ","ﰥ","ضم","ﰦ","طح","ﰧ","طم","ﰨ","ظم","ﰩ","عج","ﰪ","عم","ﰫ","غج","ﰬ","غم","ﰭ","فج","ﰮ","فح","ﰯ","فخ","ﰰ","فم","ﰱ","فى","ﰲ","في","ﰳ","قح","ﰴ","قم","ﰵ","قى","ﰶ","قي","ﰷ","كا","ﰸ","كج","ﰹ","كح","ﰺ","كخ","ﰻ","كل","ﰼ","كم","ﰽ","كى","ﰾ","كي","ﰿ","لج","ﱀ","لح","ﱁ","لخ","ﱂ","لم","ﱃ","لى","ﱄ","لي","ﱅ","مج","ﱆ","مح","ﱇ","مخ","ﱈ","مم","ﱉ","مى","ﱊ","مي","ﱋ","نج","ﱌ","نح","ﱍ","نخ","ﱎ","نم","ﱏ","نى","ﱐ","ني","ﱑ","هج","ﱒ","هم","ﱓ","هى","ﱔ","هي","ﱕ","يج","ﱖ","يح","ﱗ","يخ","ﱘ","يم","ﱙ","يى","ﱚ","يي","ﱛ","ذٰ","ﱜ","رٰ","ﱝ","ىٰ","ﱞ"," ٌّ","ﱟ"," ٍّ","ﱠ"," َّ","ﱡ"," ُّ","ﱢ"," ِّ","ﱣ"," ّٰ","ﱤ","ئر","ﱥ","ئز","ﱦ","ئم","ﱧ","ئن","ﱨ","ئى","ﱩ","ئي","ﱪ","بر","ﱫ","بز","ﱬ","بم","ﱭ","بن","ﱮ","بى","ﱯ","بي","ﱰ","تر","ﱱ","تز","ﱲ","تم","ﱳ","تن","ﱴ","تى","ﱵ","تي","ﱶ","ثر","ﱷ","ثز","ﱸ","ثم","ﱹ","ثن","ﱺ","ثى","ﱻ","ثي","ﱼ","فى","ﱽ","في","ﱾ","قى","ﱿ","قي","ﲀ","كا","ﲁ","كل","ﲂ","كم","ﲃ","كى","ﲄ","كي","ﲅ","لم","ﲆ","لى","ﲇ","لي","ﲈ","ما","ﲉ","مم","ﲊ","نر","ﲋ","نز","ﲌ","نم","ﲍ","نن","ﲎ","نى","ﲏ","ني","ﲐ","ىٰ","ﲑ","ير","ﲒ","يز","ﲓ","يم","ﲔ","ين","ﲕ","يى","ﲖ","يي","ﲗ","ئج","ﲘ","ئح","ﲙ","ئخ","ﲚ","ئم","ﲛ","ئه","ﲜ","بج","ﲝ","بح","ﲞ","بخ","ﲟ","بم","ﲠ","به","ﲡ","تج","ﲢ","تح","ﲣ","تخ","ﲤ","تم","ﲥ","ته","ﲦ","ثم","ﲧ","جح","ﲨ","جم","ﲩ","حج","ﲪ","حم","ﲫ","خج","ﲬ","خم","ﲭ","سج","ﲮ","سح","ﲯ","سخ","ﲰ","سم","ﲱ","صح","ﲲ","صخ","ﲳ","صم","ﲴ","ضج","ﲵ","ضح","ﲶ","ضخ","ﲷ","ضم","ﲸ","طح","ﲹ","ظم","ﲺ","عج","ﲻ","عم","ﲼ","غج","ﲽ","غم","ﲾ","فج","ﲿ","فح","ﳀ","فخ","ﳁ","فم","ﳂ","قح","ﳃ","قم","ﳄ","كج","ﳅ","كح","ﳆ","كخ","ﳇ","كل","ﳈ","كم","ﳉ","لج","ﳊ","لح","ﳋ","لخ","ﳌ","لم","ﳍ","له","ﳎ","مج","ﳏ","مح","ﳐ","مخ","ﳑ","مم","ﳒ","نج","ﳓ","نح","ﳔ","نخ","ﳕ","نم","ﳖ","نه","ﳗ","هج","ﳘ","هم","ﳙ","هٰ","ﳚ","يج","ﳛ","يح","ﳜ","يخ","ﳝ","يم","ﳞ","يه","ﳟ","ئم","ﳠ","ئه","ﳡ","بم","ﳢ","به","ﳣ","تم","ﳤ","ته","ﳥ","ثم","ﳦ","ثه","ﳧ","سم","ﳨ","سه","ﳩ","شم","ﳪ","شه","ﳫ","كل","ﳬ","كم","ﳭ","لم","ﳮ","نم","ﳯ","نه","ﳰ","يم","ﳱ","يه","ﳲ","ـَّ","ﳳ","ـُّ","ﳴ","ـِّ","ﳵ","طى","ﳶ","طي","ﳷ","عى","ﳸ","عي","ﳹ","غى","ﳺ","غي","ﳻ","سى","ﳼ","سي","ﳽ","شى","ﳾ","شي","ﳿ","حى","ﴀ","حي","ﴁ","جى","ﴂ","جي","ﴃ","خى","ﴄ","خي","ﴅ","صى","ﴆ","صي","ﴇ","ضى","ﴈ","ضي","ﴉ","شج","ﴊ","شح","ﴋ","شخ","ﴌ","شم","ﴍ","شر","ﴎ","سر","ﴏ","صر","ﴐ","ضر","ﴑ","طى","ﴒ","طي","ﴓ","عى","ﴔ","عي","ﴕ","غى","ﴖ","غي","ﴗ","سى","ﴘ","سي","ﴙ","شى","ﴚ","شي","ﴛ","حى","ﴜ","حي","ﴝ","جى","ﴞ","جي","ﴟ","خى","ﴠ","خي","ﴡ","صى","ﴢ","صي","ﴣ","ضى","ﴤ","ضي","ﴥ","شج","ﴦ","شح","ﴧ","شخ","ﴨ","شم","ﴩ","شر","ﴪ","سر","ﴫ","صر","ﴬ","ضر","ﴭ","شج","ﴮ","شح","ﴯ","شخ","ﴰ","شم","ﴱ","سه","ﴲ","شه","ﴳ","طم","ﴴ","سج","ﴵ","سح","ﴶ","سخ","ﴷ","شج","ﴸ","شح","ﴹ","شخ","ﴺ","طم","ﴻ","ظم","ﴼ","اً","ﴽ","اً","ﵐ","تجم","ﵑ","تحج","ﵒ","تحج","ﵓ","تحم","ﵔ","تخم","ﵕ","تمج","ﵖ","تمح","ﵗ","تمخ","ﵘ","جمح","ﵙ","جمح","ﵚ","حمي","ﵛ","حمى","ﵜ","سحج","ﵝ","سجح","ﵞ","سجى","ﵟ","سمح","ﵠ","سمح","ﵡ","سمج","ﵢ","سمم","ﵣ","سمم","ﵤ","صحح","ﵥ","صحح","ﵦ","صمم","ﵧ","شحم","ﵨ","شحم","ﵩ","شجي","ﵪ","شمخ","ﵫ","شمخ","ﵬ","شمم","ﵭ","شمم","ﵮ","ضحى","ﵯ","ضخم","ﵰ","ضخم","ﵱ","طمح","ﵲ","طمح","ﵳ","طمم","ﵴ","طمي","ﵵ","عجم","ﵶ","عمم","ﵷ","عمم","ﵸ","عمى","ﵹ","غمم","ﵺ","غمي","ﵻ","غمى","ﵼ","فخم","ﵽ","فخم","ﵾ","قمح","ﵿ","قمم","ﶀ","لحم","ﶁ","لحي","ﶂ","لحى","ﶃ","لجج","ﶄ","لجج","ﶅ","لخم","ﶆ","لخم","ﶇ","لمح","ﶈ","لمح","ﶉ","محج","ﶊ","محم","ﶋ","محي","ﶌ","مجح","ﶍ","مجم","ﶎ","مخج","ﶏ","مخم","ﶒ","مجخ","ﶓ","همج","ﶔ","همم","ﶕ","نحم","ﶖ","نحى","ﶗ","نجم","ﶘ","نجم","ﶙ","نجى","ﶚ","نمي","ﶛ","نمى","ﶜ","يمم","ﶝ","يمم","ﶞ","بخي","ﶟ","تجي","ﶠ","تجى","ﶡ","تخي","ﶢ","تخى","ﶣ","تمي","ﶤ","تمى","ﶥ","جمي","ﶦ","جحى","ﶧ","جمى","ﶨ","سخى","ﶩ","صحي","ﶪ","شحي","ﶫ","ضحي","ﶬ","لجي","ﶭ","لمي","ﶮ","يحي","ﶯ","يجي","ﶰ","يمي","ﶱ","ممي","ﶲ","قمي","ﶳ","نحي","ﶴ","قمح","ﶵ","لحم","ﶶ","عمي","ﶷ","كمي","ﶸ","نجح","ﶹ","مخي","ﶺ","لجم","ﶻ","كمم","ﶼ","لجم","ﶽ","نجح","ﶾ","جحي","ﶿ","حجي","ﷀ","مجي","ﷁ","فمي","ﷂ","بحي","ﷃ","كمم","ﷄ","عجم","ﷅ","صمم","ﷆ","سخي","ﷇ","نجي","﹉","‾","﹊","‾","﹋","‾","﹌","‾","﹍","_","﹎","_","﹏","_","ﺀ","ء","ﺁ","آ","ﺂ","آ","ﺃ","أ","ﺄ","أ","ﺅ","ؤ","ﺆ","ؤ","ﺇ","إ","ﺈ","إ","ﺉ","ئ","ﺊ","ئ","ﺋ","ئ","ﺌ","ئ","ﺍ","ا","ﺎ","ا","ﺏ","ب","ﺐ","ب","ﺑ","ب","ﺒ","ب","ﺓ","ة","ﺔ","ة","ﺕ","ت","ﺖ","ت","ﺗ","ت","ﺘ","ت","ﺙ","ث","ﺚ","ث","ﺛ","ث","ﺜ","ث","ﺝ","ج","ﺞ","ج","ﺟ","ج","ﺠ","ج","ﺡ","ح","ﺢ","ح","ﺣ","ح","ﺤ","ح","ﺥ","خ","ﺦ","خ","ﺧ","خ","ﺨ","خ","ﺩ","د","ﺪ","د","ﺫ","ذ","ﺬ","ذ","ﺭ","ر","ﺮ","ر","ﺯ","ز","ﺰ","ز","ﺱ","س","ﺲ","س","ﺳ","س","ﺴ","س","ﺵ","ش","ﺶ","ش","ﺷ","ش","ﺸ","ش","ﺹ","ص","ﺺ","ص","ﺻ","ص","ﺼ","ص","ﺽ","ض","ﺾ","ض","ﺿ","ض","ﻀ","ض","ﻁ","ط","ﻂ","ط","ﻃ","ط","ﻄ","ط","ﻅ","ظ","ﻆ","ظ","ﻇ","ظ","ﻈ","ظ","ﻉ","ع","ﻊ","ع","ﻋ","ع","ﻌ","ع","ﻍ","غ","ﻎ","غ","ﻏ","غ","ﻐ","غ","ﻑ","ف","ﻒ","ف","ﻓ","ف","ﻔ","ف","ﻕ","ق","ﻖ","ق","ﻗ","ق","ﻘ","ق","ﻙ","ك","ﻚ","ك","ﻛ","ك","ﻜ","ك","ﻝ","ل","ﻞ","ل","ﻟ","ل","ﻠ","ل","ﻡ","م","ﻢ","م","ﻣ","م","ﻤ","م","ﻥ","ن","ﻦ","ن","ﻧ","ن","ﻨ","ن","ﻩ","ه","ﻪ","ه","ﻫ","ه","ﻬ","ه","ﻭ","و","ﻮ","و","ﻯ","ى","ﻰ","ى","ﻱ","ي","ﻲ","ي","ﻳ","ي","ﻴ","ي","ﻵ","لآ","ﻶ","لآ","ﻷ","لأ","ﻸ","لأ","ﻹ","لإ","ﻺ","لإ","ﻻ","لا","ﻼ","لا"]}));function h(e){const t=e.length;if(1>=t||!function(e){let t=o[13];return e>=t.begin&&t.end>e||(t=o[11],e>=t.begin&&t.end>e)}(e.charCodeAt(0)))return e;const r=[];for(let n=t-1;n>=0;n--)r.push(e[n]);return r.join("")}const u=RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$","u"),d=new Map;function f(e){const t=d.get(e);if(t)return t;const r=e.match(u),n={isWhitespace:!(!r||!r[1]),isZeroWidthDiacritic:!(!r||!r[2]),isInvisibleFormatMark:!(!r||!r[3])};return d.set(e,n),n}function p(){d.clear()}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSerifFonts=t.getNonStdFontMap=t.getGlyphMapForStandardFonts=t.getFontNameToFileMap=void 0,t.getStandardFontName=function(e){const t=(0,a.normalizeFontName)(e);return i()[t]},t.getSymbolsFonts=t.getSupplementalGlyphMapForCalibri=t.getSupplementalGlyphMapForArialBlack=t.getStdFontMap=void 0;var n=r(6),a=r(38);const i=(0,n.getLookupTableFactory)((function(e){e["Times-Roman"]="Times-Roman",e.Helvetica="Helvetica",e.Courier="Courier",e.Symbol="Symbol",e["Times-Bold"]="Times-Bold",e["Helvetica-Bold"]="Helvetica-Bold",e["Courier-Bold"]="Courier-Bold",e.ZapfDingbats="ZapfDingbats",e["Times-Italic"]="Times-Italic",e["Helvetica-Oblique"]="Helvetica-Oblique",e["Courier-Oblique"]="Courier-Oblique",e["Times-BoldItalic"]="Times-BoldItalic",e["Helvetica-BoldOblique"]="Helvetica-BoldOblique",e["Courier-BoldOblique"]="Courier-BoldOblique",e.ArialNarrow="Helvetica",e["ArialNarrow-Bold"]="Helvetica-Bold",e["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique",e["ArialNarrow-Italic"]="Helvetica-Oblique",e.ArialBlack="Helvetica",e["ArialBlack-Bold"]="Helvetica-Bold",e["ArialBlack-BoldItalic"]="Helvetica-BoldOblique",e["ArialBlack-Italic"]="Helvetica-Oblique",e["Arial-Black"]="Helvetica",e["Arial-Black-Bold"]="Helvetica-Bold",e["Arial-Black-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Black-Italic"]="Helvetica-Oblique",e.Arial="Helvetica",e["Arial-Bold"]="Helvetica-Bold",e["Arial-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Italic"]="Helvetica-Oblique",e.ArialMT="Helvetica",e["Arial-BoldItalicMT"]="Helvetica-BoldOblique",e["Arial-BoldMT"]="Helvetica-Bold",e["Arial-ItalicMT"]="Helvetica-Oblique",e.ArialUnicodeMS="Helvetica",e["ArialUnicodeMS-Bold"]="Helvetica-Bold",e["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldOblique",e["ArialUnicodeMS-Italic"]="Helvetica-Oblique",e["Courier-BoldItalic"]="Courier-BoldOblique",e["Courier-Italic"]="Courier-Oblique",e.CourierNew="Courier",e["CourierNew-Bold"]="Courier-Bold",e["CourierNew-BoldItalic"]="Courier-BoldOblique",e["CourierNew-Italic"]="Courier-Oblique",e["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique",e["CourierNewPS-BoldMT"]="Courier-Bold",e["CourierNewPS-ItalicMT"]="Courier-Oblique",e.CourierNewPSMT="Courier",e["Helvetica-BoldItalic"]="Helvetica-BoldOblique",e["Helvetica-Italic"]="Helvetica-Oblique",e["Symbol-Bold"]="Symbol",e["Symbol-BoldItalic"]="Symbol",e["Symbol-Italic"]="Symbol",e.TimesNewRoman="Times-Roman",e["TimesNewRoman-Bold"]="Times-Bold",e["TimesNewRoman-BoldItalic"]="Times-BoldItalic",e["TimesNewRoman-Italic"]="Times-Italic",e.TimesNewRomanPS="Times-Roman",e["TimesNewRomanPS-Bold"]="Times-Bold",e["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic",e["TimesNewRomanPS-BoldMT"]="Times-Bold",e["TimesNewRomanPS-Italic"]="Times-Italic",e["TimesNewRomanPS-ItalicMT"]="Times-Italic",e.TimesNewRomanPSMT="Times-Roman",e["TimesNewRomanPSMT-Bold"]="Times-Bold",e["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPSMT-Italic"]="Times-Italic"}));t.getStdFontMap=i;const s=(0,n.getLookupTableFactory)((function(e){e.Courier="FoxitFixed.pfb",e["Courier-Bold"]="FoxitFixedBold.pfb",e["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb",e["Courier-Oblique"]="FoxitFixedItalic.pfb",e.Helvetica="FoxitSans.pfb",e["Helvetica-Bold"]="FoxitSansBold.pfb",e["Helvetica-BoldOblique"]="FoxitSansBoldItalic.pfb",e["Helvetica-Oblique"]="FoxitSansItalic.pfb",e["Times-Roman"]="FoxitSerif.pfb",e["Times-Bold"]="FoxitSerifBold.pfb",e["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb",e["Times-Italic"]="FoxitSerifItalic.pfb",e.Symbol="FoxitSymbol.pfb",e.ZapfDingbats="FoxitDingbats.pfb",e["LiberationSans-Regular"]="LiberationSans-Regular.ttf",e["LiberationSans-Bold"]="LiberationSans-Bold.ttf",e["LiberationSans-Italic"]="LiberationSans-Italic.ttf",e["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"}));t.getFontNameToFileMap=s;const o=(0,n.getLookupTableFactory)((function(e){e.Calibri="Helvetica",e["Calibri-Bold"]="Helvetica-Bold",e["Calibri-BoldItalic"]="Helvetica-BoldOblique",e["Calibri-Italic"]="Helvetica-Oblique",e.CenturyGothic="Helvetica",e["CenturyGothic-Bold"]="Helvetica-Bold",e["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique",e["CenturyGothic-Italic"]="Helvetica-Oblique",e.ComicSansMS="Comic Sans MS",e["ComicSansMS-Bold"]="Comic Sans MS-Bold",e["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic",e["ComicSansMS-Italic"]="Comic Sans MS-Italic",e["ItcSymbol-Bold"]="Helvetica-Bold",e["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique",e["ItcSymbol-Book"]="Helvetica",e["ItcSymbol-BookItalic"]="Helvetica-Oblique",e["ItcSymbol-Medium"]="Helvetica",e["ItcSymbol-MediumItalic"]="Helvetica-Oblique",e.LucidaConsole="Courier",e["LucidaConsole-Bold"]="Courier-Bold",e["LucidaConsole-BoldItalic"]="Courier-BoldOblique",e["LucidaConsole-Italic"]="Courier-Oblique",e["LucidaSans-Demi"]="Helvetica-Bold",e["MS-Gothic"]="MS Gothic",e["MS-Gothic-Bold"]="MS Gothic-Bold",e["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic",e["MS-Gothic-Italic"]="MS Gothic-Italic",e["MS-Mincho"]="MS Mincho",e["MS-Mincho-Bold"]="MS Mincho-Bold",e["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic",e["MS-Mincho-Italic"]="MS Mincho-Italic",e["MS-PGothic"]="MS PGothic",e["MS-PGothic-Bold"]="MS PGothic-Bold",e["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic",e["MS-PGothic-Italic"]="MS PGothic-Italic",e["MS-PMincho"]="MS PMincho",e["MS-PMincho-Bold"]="MS PMincho-Bold",e["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic",e["MS-PMincho-Italic"]="MS PMincho-Italic",e.NuptialScript="Times-Italic",e.SegoeUISymbol="Helvetica",e.Wingdings="ZapfDingbats",e["Wingdings-Regular"]="ZapfDingbats"}));t.getNonStdFontMap=o;const c=(0,n.getLookupTableFactory)((function(e){e["Adobe Jenson"]=!0,e["Adobe Text"]=!0,e.Albertus=!0,e.Aldus=!0,e.Alexandria=!0,e.Algerian=!0,e["American Typewriter"]=!0,e.Antiqua=!0,e.Apex=!0,e.Arno=!0,e.Aster=!0,e.Aurora=!0,e.Baskerville=!0,e.Bell=!0,e.Bembo=!0,e["Bembo Schoolbook"]=!0,e.Benguiat=!0,e["Berkeley Old Style"]=!0,e["Bernhard Modern"]=!0,e["Berthold City"]=!0,e.Bodoni=!0,e["Bauer Bodoni"]=!0,e["Book Antiqua"]=!0,e.Bookman=!0,e["Bordeaux Roman"]=!0,e["Californian FB"]=!0,e.Calisto=!0,e.Calvert=!0,e.Capitals=!0,e.Cambria=!0,e.Cartier=!0,e.Caslon=!0,e.Catull=!0,e.Centaur=!0,e["Century Old Style"]=!0,e["Century Schoolbook"]=!0,e.Chaparral=!0,e["Charis SIL"]=!0,e.Cheltenham=!0,e["Cholla Slab"]=!0,e.Clarendon=!0,e.Clearface=!0,e.Cochin=!0,e.Colonna=!0,e["Computer Modern"]=!0,e["Concrete Roman"]=!0,e.Constantia=!0,e["Cooper Black"]=!0,e.Corona=!0,e.Ecotype=!0,e.Egyptienne=!0,e.Elephant=!0,e.Excelsior=!0,e.Fairfield=!0,e["FF Scala"]=!0,e.Folkard=!0,e.Footlight=!0,e.FreeSerif=!0,e["Friz Quadrata"]=!0,e.Garamond=!0,e.Gentium=!0,e.Georgia=!0,e.Gloucester=!0,e["Goudy Old Style"]=!0,e["Goudy Schoolbook"]=!0,e["Goudy Pro Font"]=!0,e.Granjon=!0,e["Guardian Egyptian"]=!0,e.Heather=!0,e.Hercules=!0,e["High Tower Text"]=!0,e.Hiroshige=!0,e["Hoefler Text"]=!0,e["Humana Serif"]=!0,e.Imprint=!0,e["Ionic No. 5"]=!0,e.Janson=!0,e.Joanna=!0,e.Korinna=!0,e.Lexicon=!0,e.LiberationSerif=!0,e["Liberation Serif"]=!0,e["Linux Libertine"]=!0,e.Literaturnaya=!0,e.Lucida=!0,e["Lucida Bright"]=!0,e.Melior=!0,e.Memphis=!0,e.Miller=!0,e.Minion=!0,e.Modern=!0,e["Mona Lisa"]=!0,e["Mrs Eaves"]=!0,e["MS Serif"]=!0,e["Museo Slab"]=!0,e["New York"]=!0,e["Nimbus Roman"]=!0,e["NPS Rawlinson Roadway"]=!0,e.NuptialScript=!0,e.Palatino=!0,e.Perpetua=!0,e.Plantin=!0,e["Plantin Schoolbook"]=!0,e.Playbill=!0,e["Poor Richard"]=!0,e["Rawlinson Roadway"]=!0,e.Renault=!0,e.Requiem=!0,e.Rockwell=!0,e.Roman=!0,e["Rotis Serif"]=!0,e.Sabon=!0,e.Scala=!0,e.Seagull=!0,e.Sistina=!0,e.Souvenir=!0,e.STIX=!0,e["Stone Informal"]=!0,e["Stone Serif"]=!0,e.Sylfaen=!0,e.Times=!0,e.Trajan=!0,e["Trinité"]=!0,e["Trump Mediaeval"]=!0,e.Utopia=!0,e["Vale Type"]=!0,e["Bitstream Vera"]=!0,e["Vera Serif"]=!0,e.Versailles=!0,e.Wanted=!0,e.Weiss=!0,e["Wide Latin"]=!0,e.Windsor=!0,e.XITS=!0}));t.getSerifFonts=c;const l=(0,n.getLookupTableFactory)((function(e){e.Dingbats=!0,e.Symbol=!0,e.ZapfDingbats=!0}));t.getSymbolsFonts=l;const h=(0,n.getLookupTableFactory)((function(e){e[2]=10,e[3]=32,e[4]=33,e[5]=34,e[6]=35,e[7]=36,e[8]=37,e[9]=38,e[10]=39,e[11]=40,e[12]=41,e[13]=42,e[14]=43,e[15]=44,e[16]=45,e[17]=46,e[18]=47,e[19]=48,e[20]=49,e[21]=50,e[22]=51,e[23]=52,e[24]=53,e[25]=54,e[26]=55,e[27]=56,e[28]=57,e[29]=58,e[30]=894,e[31]=60,e[32]=61,e[33]=62,e[34]=63,e[35]=64,e[36]=65,e[37]=66,e[38]=67,e[39]=68,e[40]=69,e[41]=70,e[42]=71,e[43]=72,e[44]=73,e[45]=74,e[46]=75,e[47]=76,e[48]=77,e[49]=78,e[50]=79,e[51]=80,e[52]=81,e[53]=82,e[54]=83,e[55]=84,e[56]=85,e[57]=86,e[58]=87,e[59]=88,e[60]=89,e[61]=90,e[62]=91,e[63]=92,e[64]=93,e[65]=94,e[66]=95,e[67]=96,e[68]=97,e[69]=98,e[70]=99,e[71]=100,e[72]=101,e[73]=102,e[74]=103,e[75]=104,e[76]=105,e[77]=106,e[78]=107,e[79]=108,e[80]=109,e[81]=110,e[82]=111,e[83]=112,e[84]=113,e[85]=114,e[86]=115,e[87]=116,e[88]=117,e[89]=118,e[90]=119,e[91]=120,e[92]=121,e[93]=122,e[94]=123,e[95]=124,e[96]=125,e[97]=126,e[98]=196,e[99]=197,e[100]=199,e[101]=201,e[102]=209,e[103]=214,e[104]=220,e[105]=225,e[106]=224,e[107]=226,e[108]=228,e[109]=227,e[110]=229,e[111]=231,e[112]=233,e[113]=232,e[114]=234,e[115]=235,e[116]=237,e[117]=236,e[118]=238,e[119]=239,e[120]=241,e[121]=243,e[122]=242,e[123]=244,e[124]=246,e[125]=245,e[126]=250,e[127]=249,e[128]=251,e[129]=252,e[130]=8224,e[131]=176,e[132]=162,e[133]=163,e[134]=167,e[135]=8226,e[136]=182,e[137]=223,e[138]=174,e[139]=169,e[140]=8482,e[141]=180,e[142]=168,e[143]=8800,e[144]=198,e[145]=216,e[146]=8734,e[147]=177,e[148]=8804,e[149]=8805,e[150]=165,e[151]=181,e[152]=8706,e[153]=8721,e[154]=8719,e[156]=8747,e[157]=170,e[158]=186,e[159]=8486,e[160]=230,e[161]=248,e[162]=191,e[163]=161,e[164]=172,e[165]=8730,e[166]=402,e[167]=8776,e[168]=8710,e[169]=171,e[170]=187,e[171]=8230,e[200]=193,e[203]=205,e[210]=218,e[223]=711,e[224]=321,e[225]=322,e[226]=352,e[227]=353,e[228]=381,e[229]=382,e[233]=221,e[234]=253,e[252]=263,e[253]=268,e[254]=269,e[258]=258,e[260]=260,e[261]=261,e[265]=280,e[266]=281,e[267]=282,e[268]=283,e[269]=313,e[275]=323,e[276]=324,e[278]=328,e[283]=344,e[284]=345,e[285]=346,e[286]=347,e[292]=367,e[295]=377,e[296]=378,e[298]=380,e[305]=963,e[306]=964,e[307]=966,e[308]=8215,e[309]=8252,e[310]=8319,e[311]=8359,e[312]=8592,e[313]=8593,e[337]=9552,e[493]=1039,e[494]=1040,e[672]=1488,e[673]=1489,e[674]=1490,e[675]=1491,e[676]=1492,e[677]=1493,e[678]=1494,e[679]=1495,e[680]=1496,e[681]=1497,e[682]=1498,e[683]=1499,e[684]=1500,e[685]=1501,e[686]=1502,e[687]=1503,e[688]=1504,e[689]=1505,e[690]=1506,e[691]=1507,e[692]=1508,e[693]=1509,e[694]=1510,e[695]=1511,e[696]=1512,e[697]=1513,e[698]=1514,e[705]=1524,e[706]=8362,e[710]=64288,e[711]=64298,e[759]=1617,e[761]=1776,e[763]=1778,e[775]=1652,e[777]=1764,e[778]=1780,e[779]=1781,e[780]=1782,e[782]=771,e[783]=64726,e[786]=8363,e[788]=8532,e[790]=768,e[791]=769,e[792]=768,e[795]=803,e[797]=64336,e[798]=64337,e[799]=64342,e[800]=64343,e[801]=64344,e[802]=64345,e[803]=64362,e[804]=64363,e[805]=64364,e[2424]=7821,e[2425]=7822,e[2426]=7823,e[2427]=7824,e[2428]=7825,e[2429]=7826,e[2430]=7827,e[2433]=7682,e[2678]=8045,e[2679]=8046,e[2830]=1552,e[2838]=686,e[2840]=751,e[2842]=753,e[2843]=754,e[2844]=755,e[2846]=757,e[2856]=767,e[2857]=848,e[2858]=849,e[2862]=853,e[2863]=854,e[2864]=855,e[2865]=861,e[2866]=862,e[2906]=7460,e[2908]=7462,e[2909]=7463,e[2910]=7464,e[2912]=7466,e[2913]=7467,e[2914]=7468,e[2916]=7470,e[2917]=7471,e[2918]=7472,e[2920]=7474,e[2921]=7475,e[2922]=7476,e[2924]=7478,e[2925]=7479,e[2926]=7480,e[2928]=7482,e[2929]=7483,e[2930]=7484,e[2932]=7486,e[2933]=7487,e[2934]=7488,e[2936]=7490,e[2937]=7491,e[2938]=7492,e[2940]=7494,e[2941]=7495,e[2942]=7496,e[2944]=7498,e[2946]=7500,e[2948]=7502,e[2950]=7504,e[2951]=7505,e[2952]=7506,e[2954]=7508,e[2955]=7509,e[2956]=7510,e[2958]=7512,e[2959]=7513,e[2960]=7514,e[2962]=7516,e[2963]=7517,e[2964]=7518,e[2966]=7520,e[2967]=7521,e[2968]=7522,e[2970]=7524,e[2971]=7525,e[2972]=7526,e[2974]=7528,e[2975]=7529,e[2976]=7530,e[2978]=1537,e[2979]=1538,e[2980]=1539,e[2982]=1549,e[2983]=1551,e[2984]=1552,e[2986]=1554,e[2987]=1555,e[2988]=1556,e[2990]=1623,e[2991]=1624,e[2995]=1775,e[2999]=1791,e[3002]=64290,e[3003]=64291,e[3004]=64292,e[3006]=64294,e[3007]=64295,e[3008]=64296,e[3011]=1900,e[3014]=8223,e[3015]=8244,e[3017]=7532,e[3018]=7533,e[3019]=7534,e[3075]=7590,e[3076]=7591,e[3079]=7594,e[3080]=7595,e[3083]=7598,e[3084]=7599,e[3087]=7602,e[3088]=7603,e[3091]=7606,e[3092]=7607,e[3095]=7610,e[3096]=7611,e[3099]=7614,e[3100]=7615,e[3103]=7618,e[3104]=7619,e[3107]=8337,e[3108]=8338,e[3116]=1884,e[3119]=1885,e[3120]=1885,e[3123]=1886,e[3124]=1886,e[3127]=1887,e[3128]=1887,e[3131]=1888,e[3132]=1888,e[3135]=1889,e[3136]=1889,e[3139]=1890,e[3140]=1890,e[3143]=1891,e[3144]=1891,e[3147]=1892,e[3148]=1892,e[3153]=580,e[3154]=581,e[3157]=584,e[3158]=585,e[3161]=588,e[3162]=589,e[3165]=891,e[3166]=892,e[3169]=1274,e[3170]=1275,e[3173]=1278,e[3174]=1279,e[3181]=7622,e[3182]=7623,e[3282]=11799,e[3316]=578,e[3379]=42785,e[3393]=1159,e[3416]=8377}));t.getGlyphMapForStandardFonts=h;const u=(0,n.getLookupTableFactory)((function(e){e[227]=322,e[264]=261,e[291]=346}));t.getSupplementalGlyphMapForArialBlack=u;const d=(0,n.getLookupTableFactory)((function(e){e[1]=32,e[4]=65,e[6]=193,e[17]=66,e[18]=67,e[21]=268,e[24]=68,e[28]=69,e[30]=201,e[32]=282,e[38]=70,e[39]=71,e[44]=72,e[47]=73,e[49]=205,e[58]=74,e[60]=75,e[62]=76,e[68]=77,e[69]=78,e[75]=79,e[87]=80,e[89]=81,e[90]=82,e[92]=344,e[94]=83,e[97]=352,e[100]=84,e[104]=85,e[115]=86,e[116]=87,e[121]=88,e[122]=89,e[124]=221,e[127]=90,e[129]=381,e[258]=97,e[260]=225,e[268]=261,e[271]=98,e[272]=99,e[273]=263,e[275]=269,e[282]=100,e[286]=101,e[288]=233,e[290]=283,e[295]=281,e[296]=102,e[336]=103,e[346]=104,e[349]=105,e[351]=237,e[361]=106,e[364]=107,e[367]=108,e[371]=322,e[373]=109,e[374]=110,e[381]=111,e[383]=243,e[393]=112,e[395]=113,e[396]=114,e[398]=345,e[400]=115,e[401]=347,e[403]=353,e[410]=116,e[437]=117,e[448]=118,e[449]=119,e[454]=120,e[455]=121,e[457]=253,e[460]=122,e[462]=382,e[463]=380,e[853]=44,e[855]=58,e[856]=46,e[876]=47,e[878]=45,e[882]=45,e[894]=40,e[895]=41,e[896]=91,e[897]=93,e[923]=64,e[1004]=48,e[1005]=49,e[1006]=50,e[1007]=51,e[1008]=52,e[1009]=53,e[1010]=54,e[1011]=55,e[1012]=56,e[1013]=57,e[1081]=37,e[1085]=43,e[1086]=45}));t.getSupplementalGlyphMapForCalibri=d},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToUnicodeMap=t.IdentityToUnicodeMap=void 0;var n=r(2);t.ToUnicodeMap=class{constructor(e=[]){this._map=e}get length(){return this._map.length}forEach(e){for(const t in this._map)e(t,this._map[t].charCodeAt(0))}has(e){return void 0!==this._map[e]}get(e){return this._map[e]}charCodeOf(e){const t=this._map;if(65536>=t.length)return t.indexOf(e);for(const r in t)if(t[r]===e)return 0|r;return-1}amend(e){for(const t in e)this._map[t]=e[t]}},t.IdentityToUnicodeMap=class{constructor(e,t){this.firstChar=e,this.lastChar=t}get length(){return this.lastChar+1-this.firstChar}forEach(e){for(let t=this.firstChar,r=this.lastChar;r>=t;t++)e(t,t)}has(e){return e>=this.firstChar&&this.lastChar>=e}get(e){if(e>=this.firstChar&&this.lastChar>=e)return String.fromCharCode(e)}charCodeOf(e){return!Number.isInteger(e)||this.firstChar>e||e>this.lastChar?-1:e}amend(e){(0,n.unreachable)("Should not call amend()")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CFFFont=void 0;var n=r(35),a=r(38),i=r(2);t.CFFFont=class{constructor(e,t){this.properties=t;const r=new n.CFFParser(e,t,a.SEAC_ANALYSIS_ENABLED);this.cff=r.parse(),this.cff.duplicateFirstGlyph();const s=new n.CFFCompiler(this.cff);this.seacs=this.cff.seacs;try{this.data=s.compile()}catch(r){(0,i.warn)("Failed to compile font "+t.loadedName),this.data=e}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(){return this.cff.charset.charset}getGlyphMapping(){const e=this.cff,t=this.properties,r=e.charset.charset;let n,i;if(t.composite){let a;if(n=Object.create(null),e.isCIDFont)for(i=0;r.length>i;i++)a=t.cMap.charCodeOf(r[i]),n[a]=i;else for(i=0;e.charStrings.count>i;i++)a=t.cMap.charCodeOf(i),n[a]=i;return n}let s=e.encoding?e.encoding.encoding:null;return t.isInternalFont&&(s=t.defaultEncoding),n=(0,a.type1FontGlyphMapping)(t,s,r),n}hasGlyphId(e){return this.cff.hasGlyphId(e)}_createBuiltInEncoding(){const{charset:e,encoding:t}=this.cff;if(!e||!t)return;const r=e.charset,n=t.encoding,a=[];for(const e in n){const t=n[e];if(t>=0){const n=r[t];n&&(a[e]=n)}}a.length>0&&(this.properties.builtInEncoding=a)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FontRendererFactory=void 0;var n=r(2),a=r(35),i=r(39),s=r(37),o=r(10);function c(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function l(e,t){return e[t]<<8|e[t+1]}function h(e,t){return(e[t]<<24|e[t+1]<<16)>>16}function u(e,t){return e[t]<<24>>24}function d(e,t){return h(e,t)/16384}function f(e){const t=e.length;let r=32768;return 1240>t?r=107:33900>t&&(r=1131),r}function p(e,t,r){const a=1===l(e,t+2)?c(e,t+8):c(e,t+16),i=l(e,t+a);let s,o,h;if(4===i){l(e,t+a+2);const r=l(e,t+a+6)>>1;for(o=t+a+14,s=[],h=0;r>h;h++,o+=2)s[h]={end:l(e,o)};for(o+=2,h=0;r>h;h++,o+=2)s[h].start=l(e,o);for(h=0;r>h;h++,o+=2)s[h].idDelta=l(e,o);for(h=0;r>h;h++,o+=2){let t=l(e,o);if(0!==t){s[h].ids=[];for(let r=0,n=s[h].end-s[h].start+1;n>r;r++)s[h].ids[r]=l(e,o+t),t+=2}}return s}if(12===i){const r=c(e,t+a+12);for(o=t+a+16,s=[],h=0;r>h;h++)t=c(e,o),s.push({start:t,end:c(e,o+4),idDelta:c(e,o+8)-t}),o+=12;return s}throw new n.FormatError("unsupported cmap: "+i)}function g(e,t,r,n){const i=new a.CFFParser(new o.Stream(e,t,r-t),{},n).parse();return{glyphs:i.charStrings.objects,subrs:i.topDict.privateDict&&i.topDict.privateDict.subrsIndex&&i.topDict.privateDict.subrsIndex.objects,gsubrs:i.globalSubrIndex&&i.globalSubrIndex.objects,isCFFCIDFont:i.isCIDFont,fdSelect:i.fdSelect,fdArray:i.fdArray}}function m(e,t){const r=t.codePointAt(0);let n=0,a=0,i=e.length-1;for(;i>a;){const t=a+i+1>>1;e[t].start>r?i=t-1:a=t}return e[a].start>r||r>e[a].end||(n=e[a].idDelta+(e[a].ids?e[a].ids[r-e[a].start]:r)&65535),{charCode:r,glyphId:n}}function b(e,t,r){function n(e,r){t.push({cmd:"moveTo",args:[e,r]})}function a(e,r){t.push({cmd:"lineTo",args:[e,r]})}function i(e,r,n,a){t.push({cmd:"quadraticCurveTo",args:[e,r,n,a]})}let s=0;const o=h(e,s);let c,f=0,p=0;if(s+=10,0>o)do{c=l(e,s);const n=l(e,s+2);let a,i;s+=4,1&c?(2&c?(a=h(e,s),i=h(e,s+2)):(a=l(e,s),i=l(e,s+2)),s+=4):2&c?(a=u(e,s++),i=u(e,s++)):(a=e[s++],i=e[s++]),2&c?(f=a,p=i):(f=0,p=0);let o=1,g=1,m=0,y=0;8&c?(o=g=d(e,s),s+=2):64&c?(o=d(e,s),g=d(e,s+2),s+=4):128&c&&(o=d(e,s),m=d(e,s+2),y=d(e,s+4),g=d(e,s+6),s+=8);const w=r.glyphs[n];w&&(t.push({cmd:"save"},{cmd:"transform",args:[o,m,y,g,f,p]}),b(w,t,r),t.push({cmd:"restore"}))}while(32&c);else{const t=[];let r,u;for(r=0;o>r;r++)t.push(l(e,s)),s+=2;s+=2+l(e,s);const d=t.at(-1)+1,g=[];for(;d>g.length;){c=e[s++];let t=1;for(8&c&&(t+=e[s++]);t-- >0;)g.push({flags:c})}for(r=0;d>r;r++){switch(18&g[r].flags){case 0:f+=h(e,s),s+=2;break;case 2:f-=e[s++];break;case 18:f+=e[s++]}g[r].x=f}for(r=0;d>r;r++){switch(36&g[r].flags){case 0:p+=h(e,s),s+=2;break;case 4:p-=e[s++];break;case 36:p+=e[s++]}g[r].y=p}let m=0;for(s=0;o>s;s++){const e=t[s],o=g.slice(m,e+1);if(1&o[0].flags)o.push(o[0]);else if(1&o.at(-1).flags)o.unshift(o.at(-1));else{const e={flags:1,x:(o[0].x+o.at(-1).x)/2,y:(o[0].y+o.at(-1).y)/2};o.unshift(e),o.push(e)}for(n(o[0].x,o[0].y),r=1,u=o.length;u>r;r++)1&o[r].flags?a(o[r].x,o[r].y):1&o[r+1].flags?(i(o[r].x,o[r].y,o[r+1].x,o[r+1].y),r++):i(o[r].x,o[r].y,(o[r].x+o[r+1].x)/2,(o[r].y+o[r+1].y)/2);m=e+1}}}function y(e,t,r,a){function i(e,r){t.push({cmd:"moveTo",args:[e,r]})}function o(e,r){t.push({cmd:"lineTo",args:[e,r]})}function c(e,r,n,a,i,s){t.push({cmd:"bezierCurveTo",args:[e,r,n,a,i,s]})}const l=[];let h=0,u=0,d=0;!function e(p){let g=0;for(;p.length>g;){let b,w,v,S,x,A,k,C,_,F=!1,T=p[g++];switch(T){case 1:case 3:case 18:case 23:d+=l.length>>1,F=!0;break;case 4:u+=l.pop(),i(h,u),F=!0;break;case 5:for(;l.length>0;)h+=l.shift(),u+=l.shift(),o(h,u);break;case 6:for(;l.length>0&&(h+=l.shift(),o(h,u),0!==l.length);)u+=l.shift(),o(h,u);break;case 7:for(;l.length>0&&(u+=l.shift(),o(h,u),0!==l.length);)h+=l.shift(),o(h,u);break;case 8:for(;l.length>0;)b=h+l.shift(),v=u+l.shift(),w=b+l.shift(),S=v+l.shift(),h=w+l.shift(),u=S+l.shift(),c(b,v,w,S,h,u);break;case 10:if(C=l.pop(),_=null,r.isCFFCIDFont){const e=r.fdSelect.getFDIndex(a);if(e>=0&&r.fdArray.length>e){const t=r.fdArray[e];let n;t.privateDict&&t.privateDict.subrsIndex&&(n=t.privateDict.subrsIndex.objects),n&&(C+=f(n),_=n[C])}else(0,n.warn)("Invalid fd index for glyph index.")}else _=r.subrs[C+r.subrsBias];_&&e(_);break;case 11:return;case 12:switch(T=p[g++],T){case 34:b=h+l.shift(),w=b+l.shift(),x=u+l.shift(),h=w+l.shift(),c(b,u,w,x,h,x),b=h+l.shift(),w=b+l.shift(),h=w+l.shift(),c(b,x,w,u,h,u);break;case 35:b=h+l.shift(),v=u+l.shift(),w=b+l.shift(),S=v+l.shift(),h=w+l.shift(),u=S+l.shift(),c(b,v,w,S,h,u),b=h+l.shift(),v=u+l.shift(),w=b+l.shift(),S=v+l.shift(),h=w+l.shift(),u=S+l.shift(),c(b,v,w,S,h,u),l.pop();break;case 36:b=h+l.shift(),x=u+l.shift(),w=b+l.shift(),A=x+l.shift(),h=w+l.shift(),c(b,x,w,A,h,A),b=h+l.shift(),w=b+l.shift(),k=A+l.shift(),h=w+l.shift(),c(b,A,w,k,h,u);break;case 37:const e=h,t=u;b=h+l.shift(),v=u+l.shift(),w=b+l.shift(),S=v+l.shift(),h=w+l.shift(),u=S+l.shift(),c(b,v,w,S,h,u),b=h+l.shift(),v=u+l.shift(),w=b+l.shift(),S=v+l.shift(),h=w,u=S,Math.abs(h-e)>Math.abs(u-t)?h+=l.shift():u+=l.shift(),c(b,v,w,S,h,u);break;default:throw new n.FormatError("unknown operator: 12 "+T)}break;case 14:if(l.length>=4){const e=l.pop(),n=l.pop();u=l.pop(),h=l.pop(),t.push({cmd:"save"},{cmd:"translate",args:[h,u]});let a=m(r.cmap,String.fromCharCode(r.glyphNameMap[s.StandardEncoding[e]]));y(r.glyphs[a.glyphId],t,r,a.glyphId),t.push({cmd:"restore"}),a=m(r.cmap,String.fromCharCode(r.glyphNameMap[s.StandardEncoding[n]])),y(r.glyphs[a.glyphId],t,r,a.glyphId)}return;case 19:case 20:d+=l.length>>1,g+=d+7>>3,F=!0;break;case 21:u+=l.pop(),h+=l.pop(),i(h,u),F=!0;break;case 22:h+=l.pop(),i(h,u),F=!0;break;case 24:for(;l.length>2;)b=h+l.shift(),v=u+l.shift(),w=b+l.shift(),S=v+l.shift(),h=w+l.shift(),u=S+l.shift(),c(b,v,w,S,h,u);h+=l.shift(),u+=l.shift(),o(h,u);break;case 25:for(;l.length>6;)h+=l.shift(),u+=l.shift(),o(h,u);b=h+l.shift(),v=u+l.shift(),w=b+l.shift(),S=v+l.shift(),h=w+l.shift(),u=S+l.shift(),c(b,v,w,S,h,u);break;case 26:for(l.length%2&&(h+=l.shift());l.length>0;)b=h,v=u+l.shift(),w=b+l.shift(),S=v+l.shift(),h=w,u=S+l.shift(),c(b,v,w,S,h,u);break;case 27:for(l.length%2&&(u+=l.shift());l.length>0;)b=h+l.shift(),v=u,w=b+l.shift(),S=v+l.shift(),h=w+l.shift(),u=S,c(b,v,w,S,h,u);break;case 28:l.push((p[g]<<24|p[g+1]<<16)>>16),g+=2;break;case 29:C=l.pop()+r.gsubrsBias,_=r.gsubrs[C],_&&e(_);break;case 30:for(;l.length>0&&(b=h,v=u+l.shift(),w=b+l.shift(),S=v+l.shift(),h=w+l.shift(),u=S+(1===l.length?l.shift():0),c(b,v,w,S,h,u),0!==l.length);)b=h+l.shift(),v=u,w=b+l.shift(),S=v+l.shift(),u=S+l.shift(),h=w+(1===l.length?l.shift():0),c(b,v,w,S,h,u);break;case 31:for(;l.length>0&&(b=h+l.shift(),v=u,w=b+l.shift(),S=v+l.shift(),u=S+l.shift(),h=w+(1===l.length?l.shift():0),c(b,v,w,S,h,u),0!==l.length);)b=h,v=u+l.shift(),w=b+l.shift(),S=v+l.shift(),h=w+l.shift(),u=S+(1===l.length?l.shift():0),c(b,v,w,S,h,u);break;default:if(32>T)throw new n.FormatError("unknown operator: "+T);247>T?l.push(T-139):251>T?l.push(256*(T-247)+p[g++]+108):255>T?l.push(256*-(T-251)-p[g++]-108):(l.push((p[g]<<24|p[g+1]<<16|p[g+2]<<8|p[g+3])/65536),g+=4)}F&&(l.length=0)}}(e)}const w=[];class v{constructor(e){this.constructor===v&&(0,n.unreachable)("Cannot initialize CompiledFont."),this.fontMatrix=e,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}getPathJs(e){const{charCode:t,glyphId:r}=m(this.cmap,e);let n=this.compiledGlyphs[r];if(!n)try{n=this.compileGlyph(this.glyphs[r],r),this.compiledGlyphs[r]=n}catch(e){throw this.compiledGlyphs[r]=w,void 0===this.compiledCharCodeToGlyphId[t]&&(this.compiledCharCodeToGlyphId[t]=r),e}return void 0===this.compiledCharCodeToGlyphId[t]&&(this.compiledCharCodeToGlyphId[t]=r),n}compileGlyph(e,t){if(!e||0===e.length||14===e[0])return w;let r=this.fontMatrix;if(this.isCFFCIDFont){const e=this.fdSelect.getFDIndex(t);e>=0&&this.fdArray.length>e?r=this.fdArray[e].getByName("FontMatrix")||n.FONT_IDENTITY_MATRIX:(0,n.warn)("Invalid fd index for glyph index.")}const a=[{cmd:"save"},{cmd:"transform",args:r.slice()},{cmd:"scale",args:["size","-size"]}];return this.compileGlyphImpl(e,a,t),a.push({cmd:"restore"}),a}compileGlyphImpl(){(0,n.unreachable)("Children classes should implement this.")}hasBuiltPath(e){const{charCode:t,glyphId:r}=m(this.cmap,e);return void 0!==this.compiledGlyphs[r]&&void 0!==this.compiledCharCodeToGlyphId[t]}}class S extends v{constructor(e,t,r){super(r||[488e-6,0,0,488e-6,0,0]),this.glyphs=e,this.cmap=t}compileGlyphImpl(e,t){b(e,t,this)}}class x extends v{constructor(e,t,r,n){super(r||[.001,0,0,.001,0,0]),this.glyphs=e.glyphs,this.gsubrs=e.gsubrs||[],this.subrs=e.subrs||[],this.cmap=t,this.glyphNameMap=n||(0,i.getGlyphsUnicode)(),this.gsubrsBias=f(this.gsubrs),this.subrsBias=f(this.subrs),this.isCFFCIDFont=e.isCFFCIDFont,this.fdSelect=e.fdSelect,this.fdArray=e.fdArray}compileGlyphImpl(e,t,r){y(e,t,this,r)}}t.FontRendererFactory=class{static create(e,t){const r=new Uint8Array(e.data);let a,i,s,o,h,u;const d=l(r,4);for(let e=0,f=12;d>e;e++,f+=16){const e=(0,n.bytesToString)(r.subarray(f,f+4)),d=c(r,f+8),m=c(r,f+12);switch(e){case"cmap":a=p(r,d);break;case"glyf":i=r.subarray(d,d+m);break;case"loca":s=r.subarray(d,d+m);break;case"head":u=l(r,d+18),h=l(r,d+50);break;case"CFF ":o=g(r,d,d+m,t)}}if(i){const t=u?[1/u,0,0,1/u,0,0]:e.fontMatrix;return new S(function(e,t,r){let n,a;r?(n=4,a=c):(n=2,a=(e,t)=>2*l(e,t));const i=[];let s=a(t,0);for(let r=n;t.length>r;r+=n){const n=a(t,r);i.push(e.subarray(s,n)),s=n}return i}(i,s,h),a,t)}return new x(o,a,e.fontMatrix,e.glyphNameMap)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getMetrics=t.getFontBasicMetrics=void 0;var n=r(6);const a=(0,n.getLookupTableFactory)((function(e){e.Courier=600,e["Courier-Bold"]=600,e["Courier-BoldOblique"]=600,e["Courier-Oblique"]=600,e.Helvetica=(0,n.getLookupTableFactory)((function(e){e.space=278,e.exclam=278,e.quotedbl=355,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=667,e.quoteright=222,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=278,e.semicolon=278,e.less=584,e.equal=584,e.greater=584,e.question=556,e.at=1015,e.A=667,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=500,e.K=667,e.L=556,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=278,e.backslash=278,e.bracketright=278,e.asciicircum=469,e.underscore=556,e.quoteleft=222,e.a=556,e.b=556,e.c=500,e.d=556,e.e=556,e.f=278,e.g=556,e.h=556,e.i=222,e.j=222,e.k=500,e.l=222,e.m=833,e.n=556,e.o=556,e.p=556,e.q=556,e.r=333,e.s=500,e.t=278,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=500,e.braceleft=334,e.bar=260,e.braceright=334,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=191,e.quotedblleft=333,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=537,e.bullet=350,e.quotesinglbase=222,e.quotedblbase=333,e.quotedblright=333,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=556,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=222,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=556,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=667,e.aacute=556,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=500,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=500,e.aring=556,e.Ncommaaccent=722,e.lacute=222,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=500,e.scedilla=500,e.iacute=278,e.lozenge=471,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=556,e.Amacron=667,e.rcaron=333,e.ccedilla=500,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=643,e.Umacron=722,e.uring=556,e.threesuperior=333,e.Ograve=778,e.Agrave=667,e.Abreve=667,e.multiply=584,e.uacute=556,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=500,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=260,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=333,e.omacron=556,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=222,e.tcaron=317,e.eogonek=556,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=556,e.zacute=500,e.iogonek=222,e.Oacute=778,e.oacute=556,e.amacron=556,e.sacute=500,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=333,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=556,e.Eogonek=667,e.dcroat=556,e.threequarters=834,e.Scedilla=667,e.lcaron=299,e.Kcommaaccent=667,e.Lacute=556,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=556,e.onehalf=834,e.lessequal=549,e.ocircumflex=556,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=556,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=556,e.Ccaron=722,e.ugrave=556,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=556,e.Rcommaaccent=722,e.Lcommaaccent=556,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=500,e.minus=584,e.Icircumflex=278,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=584,e.odieresis=556,e.udieresis=556,e.notequal=549,e.gcommaaccent=556,e.eth=556,e.zcaron=500,e.ncommaaccent=556,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-Bold"]=(0,n.getLookupTableFactory)((function(e){e.space=278,e.exclam=333,e.quotedbl=474,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=722,e.quoteright=278,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=333,e.semicolon=333,e.less=584,e.equal=584,e.greater=584,e.question=611,e.at=975,e.A=722,e.B=722,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=556,e.K=722,e.L=611,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=584,e.underscore=556,e.quoteleft=278,e.a=556,e.b=611,e.c=556,e.d=611,e.e=556,e.f=333,e.g=611,e.h=611,e.i=278,e.j=278,e.k=556,e.l=278,e.m=889,e.n=611,e.o=611,e.p=611,e.q=611,e.r=389,e.s=556,e.t=333,e.u=611,e.v=556,e.w=778,e.x=556,e.y=556,e.z=500,e.braceleft=389,e.bar=280,e.braceright=389,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=238,e.quotedblleft=500,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=611,e.fl=611,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=556,e.bullet=350,e.quotesinglbase=278,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=611,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=278,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=611,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=722,e.aacute=556,e.Ucircumflex=722,e.yacute=556,e.scommaaccent=556,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=611,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=556,e.aring=556,e.Ncommaaccent=722,e.lacute=278,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=556,e.scedilla=556,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=611,e.acircumflex=556,e.Amacron=722,e.rcaron=389,e.ccedilla=556,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=743,e.Umacron=722,e.uring=611,e.threesuperior=333,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=584,e.uacute=611,e.Tcaron=611,e.partialdiff=494,e.ydieresis=556,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=556,e.nacute=611,e.umacron=611,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=280,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=611,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=389,e.eogonek=556,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=556,e.zacute=500,e.iogonek=278,e.Oacute=778,e.oacute=611,e.amacron=556,e.sacute=556,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=611,e.twosuperior=333,e.Odieresis=778,e.mu=611,e.igrave=278,e.ohungarumlaut=611,e.Eogonek=667,e.dcroat=611,e.threequarters=834,e.Scedilla=667,e.lcaron=400,e.Kcommaaccent=722,e.Lacute=611,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=611,e.onehalf=834,e.lessequal=549,e.ocircumflex=611,e.ntilde=611,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=611,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=611,e.Ccaron=722,e.ugrave=611,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=611,e.Rcommaaccent=722,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=556,e.minus=584,e.Icircumflex=278,e.ncaron=611,e.tcommaaccent=333,e.logicalnot=584,e.odieresis=611,e.udieresis=611,e.notequal=549,e.gcommaaccent=611,e.eth=611,e.zcaron=500,e.ncommaaccent=611,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-BoldOblique"]=(0,n.getLookupTableFactory)((function(e){e.space=278,e.exclam=333,e.quotedbl=474,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=722,e.quoteright=278,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=333,e.semicolon=333,e.less=584,e.equal=584,e.greater=584,e.question=611,e.at=975,e.A=722,e.B=722,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=556,e.K=722,e.L=611,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=584,e.underscore=556,e.quoteleft=278,e.a=556,e.b=611,e.c=556,e.d=611,e.e=556,e.f=333,e.g=611,e.h=611,e.i=278,e.j=278,e.k=556,e.l=278,e.m=889,e.n=611,e.o=611,e.p=611,e.q=611,e.r=389,e.s=556,e.t=333,e.u=611,e.v=556,e.w=778,e.x=556,e.y=556,e.z=500,e.braceleft=389,e.bar=280,e.braceright=389,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=238,e.quotedblleft=500,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=611,e.fl=611,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=556,e.bullet=350,e.quotesinglbase=278,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=611,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=278,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=611,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=722,e.aacute=556,e.Ucircumflex=722,e.yacute=556,e.scommaaccent=556,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=611,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=556,e.aring=556,e.Ncommaaccent=722,e.lacute=278,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=556,e.scedilla=556,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=611,e.acircumflex=556,e.Amacron=722,e.rcaron=389,e.ccedilla=556,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=743,e.Umacron=722,e.uring=611,e.threesuperior=333,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=584,e.uacute=611,e.Tcaron=611,e.partialdiff=494,e.ydieresis=556,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=556,e.nacute=611,e.umacron=611,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=280,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=611,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=389,e.eogonek=556,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=556,e.zacute=500,e.iogonek=278,e.Oacute=778,e.oacute=611,e.amacron=556,e.sacute=556,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=611,e.twosuperior=333,e.Odieresis=778,e.mu=611,e.igrave=278,e.ohungarumlaut=611,e.Eogonek=667,e.dcroat=611,e.threequarters=834,e.Scedilla=667,e.lcaron=400,e.Kcommaaccent=722,e.Lacute=611,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=611,e.onehalf=834,e.lessequal=549,e.ocircumflex=611,e.ntilde=611,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=611,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=611,e.Ccaron=722,e.ugrave=611,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=611,e.Rcommaaccent=722,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=556,e.minus=584,e.Icircumflex=278,e.ncaron=611,e.tcommaaccent=333,e.logicalnot=584,e.odieresis=611,e.udieresis=611,e.notequal=549,e.gcommaaccent=611,e.eth=611,e.zcaron=500,e.ncommaaccent=611,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-Oblique"]=(0,n.getLookupTableFactory)((function(e){e.space=278,e.exclam=278,e.quotedbl=355,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=667,e.quoteright=222,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=278,e.semicolon=278,e.less=584,e.equal=584,e.greater=584,e.question=556,e.at=1015,e.A=667,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=500,e.K=667,e.L=556,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=278,e.backslash=278,e.bracketright=278,e.asciicircum=469,e.underscore=556,e.quoteleft=222,e.a=556,e.b=556,e.c=500,e.d=556,e.e=556,e.f=278,e.g=556,e.h=556,e.i=222,e.j=222,e.k=500,e.l=222,e.m=833,e.n=556,e.o=556,e.p=556,e.q=556,e.r=333,e.s=500,e.t=278,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=500,e.braceleft=334,e.bar=260,e.braceright=334,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=191,e.quotedblleft=333,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=537,e.bullet=350,e.quotesinglbase=222,e.quotedblbase=333,e.quotedblright=333,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=556,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=222,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=556,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=667,e.aacute=556,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=500,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=500,e.aring=556,e.Ncommaaccent=722,e.lacute=222,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=500,e.scedilla=500,e.iacute=278,e.lozenge=471,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=556,e.Amacron=667,e.rcaron=333,e.ccedilla=500,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=643,e.Umacron=722,e.uring=556,e.threesuperior=333,e.Ograve=778,e.Agrave=667,e.Abreve=667,e.multiply=584,e.uacute=556,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=500,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=260,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=333,e.omacron=556,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=222,e.tcaron=317,e.eogonek=556,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=556,e.zacute=500,e.iogonek=222,e.Oacute=778,e.oacute=556,e.amacron=556,e.sacute=500,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=333,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=556,e.Eogonek=667,e.dcroat=556,e.threequarters=834,e.Scedilla=667,e.lcaron=299,e.Kcommaaccent=667,e.Lacute=556,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=556,e.onehalf=834,e.lessequal=549,e.ocircumflex=556,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=556,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=556,e.Ccaron=722,e.ugrave=556,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=556,e.Rcommaaccent=722,e.Lcommaaccent=556,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=500,e.minus=584,e.Icircumflex=278,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=584,e.odieresis=556,e.udieresis=556,e.notequal=549,e.gcommaaccent=556,e.eth=556,e.zcaron=500,e.ncommaaccent=556,e.onesuperior=333,e.imacron=278,e.Euro=556})),e.Symbol=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.universal=713,e.numbersign=500,e.existential=549,e.percent=833,e.ampersand=778,e.suchthat=439,e.parenleft=333,e.parenright=333,e.asteriskmath=500,e.plus=549,e.comma=250,e.minus=549,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=278,e.semicolon=278,e.less=549,e.equal=549,e.greater=549,e.question=444,e.congruent=549,e.Alpha=722,e.Beta=667,e.Chi=722,e.Delta=612,e.Epsilon=611,e.Phi=763,e.Gamma=603,e.Eta=722,e.Iota=333,e.theta1=631,e.Kappa=722,e.Lambda=686,e.Mu=889,e.Nu=722,e.Omicron=722,e.Pi=768,e.Theta=741,e.Rho=556,e.Sigma=592,e.Tau=611,e.Upsilon=690,e.sigma1=439,e.Omega=768,e.Xi=645,e.Psi=795,e.Zeta=611,e.bracketleft=333,e.therefore=863,e.bracketright=333,e.perpendicular=658,e.underscore=500,e.radicalex=500,e.alpha=631,e.beta=549,e.chi=549,e.delta=494,e.epsilon=439,e.phi=521,e.gamma=411,e.eta=603,e.iota=329,e.phi1=603,e.kappa=549,e.lambda=549,e.mu=576,e.nu=521,e.omicron=549,e.pi=549,e.theta=521,e.rho=549,e.sigma=603,e.tau=439,e.upsilon=576,e.omega1=713,e.omega=686,e.xi=493,e.psi=686,e.zeta=494,e.braceleft=480,e.bar=200,e.braceright=480,e.similar=549,e.Euro=750,e.Upsilon1=620,e.minute=247,e.lessequal=549,e.fraction=167,e.infinity=713,e.florin=500,e.club=753,e.diamond=753,e.heart=753,e.spade=753,e.arrowboth=1042,e.arrowleft=987,e.arrowup=603,e.arrowright=987,e.arrowdown=603,e.degree=400,e.plusminus=549,e.second=411,e.greaterequal=549,e.multiply=549,e.proportional=713,e.partialdiff=494,e.bullet=460,e.divide=549,e.notequal=549,e.equivalence=549,e.approxequal=549,e.ellipsis=1e3,e.arrowvertex=603,e.arrowhorizex=1e3,e.carriagereturn=658,e.aleph=823,e.Ifraktur=686,e.Rfraktur=795,e.weierstrass=987,e.circlemultiply=768,e.circleplus=768,e.emptyset=823,e.intersection=768,e.union=768,e.propersuperset=713,e.reflexsuperset=713,e.notsubset=713,e.propersubset=713,e.reflexsubset=713,e.element=713,e.notelement=713,e.angle=768,e.gradient=713,e.registerserif=790,e.copyrightserif=790,e.trademarkserif=890,e.product=823,e.radical=549,e.dotmath=250,e.logicalnot=713,e.logicaland=603,e.logicalor=603,e.arrowdblboth=1042,e.arrowdblleft=987,e.arrowdblup=603,e.arrowdblright=987,e.arrowdbldown=603,e.lozenge=494,e.angleleft=329,e.registersans=790,e.copyrightsans=790,e.trademarksans=786,e.summation=713,e.parenlefttp=384,e.parenleftex=384,e.parenleftbt=384,e.bracketlefttp=384,e.bracketleftex=384,e.bracketleftbt=384,e.bracelefttp=494,e.braceleftmid=494,e.braceleftbt=494,e.braceex=494,e.angleright=329,e.integral=274,e.integraltp=686,e.integralex=686,e.integralbt=686,e.parenrighttp=384,e.parenrightex=384,e.parenrightbt=384,e.bracketrighttp=384,e.bracketrightex=384,e.bracketrightbt=384,e.bracerighttp=494,e.bracerightmid=494,e.bracerightbt=494,e.apple=790})),e["Times-Roman"]=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.quotedbl=408,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=564,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=278,e.semicolon=278,e.less=564,e.equal=564,e.greater=564,e.question=444,e.at=921,e.A=722,e.B=667,e.C=667,e.D=722,e.E=611,e.F=556,e.G=722,e.H=722,e.I=333,e.J=389,e.K=722,e.L=611,e.M=889,e.N=722,e.O=722,e.P=556,e.Q=722,e.R=667,e.S=556,e.T=611,e.U=722,e.V=722,e.W=944,e.X=722,e.Y=722,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=469,e.underscore=500,e.quoteleft=333,e.a=444,e.b=500,e.c=444,e.d=500,e.e=444,e.f=333,e.g=500,e.h=500,e.i=278,e.j=278,e.k=500,e.l=278,e.m=778,e.n=500,e.o=500,e.p=500,e.q=500,e.r=333,e.s=389,e.t=278,e.u=500,e.v=500,e.w=722,e.x=500,e.y=500,e.z=444,e.braceleft=480,e.bar=200,e.braceright=480,e.asciitilde=541,e.exclamdown=333,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=180,e.quotedblleft=444,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=453,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=444,e.quotedblright=444,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=444,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=889,e.ordfeminine=276,e.Lslash=611,e.Oslash=722,e.OE=889,e.ordmasculine=310,e.ae=667,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=500,e.Idieresis=333,e.eacute=444,e.abreve=444,e.uhungarumlaut=500,e.ecaron=444,e.Ydieresis=722,e.divide=564,e.Yacute=722,e.Acircumflex=722,e.aacute=444,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=444,e.Uacute=722,e.uogonek=500,e.Edieresis=611,e.Dcroat=722,e.commaaccent=250,e.copyright=760,e.Emacron=611,e.ccaron=444,e.aring=444,e.Ncommaaccent=722,e.lacute=278,e.agrave=444,e.Tcommaaccent=611,e.Cacute=667,e.atilde=444,e.Edotaccent=611,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=471,e.Rcaron=667,e.Gcommaaccent=722,e.ucircumflex=500,e.acircumflex=444,e.Amacron=722,e.rcaron=333,e.ccedilla=444,e.Zdotaccent=611,e.Thorn=556,e.Omacron=722,e.Racute=667,e.Sacute=556,e.dcaron=588,e.Umacron=722,e.uring=500,e.threesuperior=300,e.Ograve=722,e.Agrave=722,e.Abreve=722,e.multiply=564,e.uacute=500,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=611,e.adieresis=444,e.edieresis=444,e.cacute=444,e.nacute=500,e.umacron=500,e.Ncaron=722,e.Iacute=333,e.plusminus=564,e.brokenbar=200,e.registered=760,e.Gbreve=722,e.Idotaccent=333,e.summation=600,e.Egrave=611,e.racute=333,e.omacron=500,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=326,e.eogonek=444,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=444,e.zacute=444,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=444,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=500,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=611,e.dcroat=500,e.threequarters=750,e.Scedilla=556,e.lcaron=344,e.Kcommaaccent=722,e.Lacute=611,e.trademark=980,e.edotaccent=444,e.Igrave=333,e.Imacron=333,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=500,e.Uhungarumlaut=722,e.Eacute=611,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=500,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=667,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=722,e.zdotaccent=444,e.Ecaron=611,e.Iogonek=333,e.kcommaaccent=500,e.minus=564,e.Icircumflex=333,e.ncaron=500,e.tcommaaccent=278,e.logicalnot=564,e.odieresis=500,e.udieresis=500,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=444,e.ncommaaccent=500,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-Bold"]=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.quotedbl=555,e.numbersign=500,e.dollar=500,e.percent=1e3,e.ampersand=833,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=570,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=570,e.equal=570,e.greater=570,e.question=500,e.at=930,e.A=722,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=778,e.I=389,e.J=500,e.K=778,e.L=667,e.M=944,e.N=722,e.O=778,e.P=611,e.Q=778,e.R=722,e.S=556,e.T=667,e.U=722,e.V=722,e.W=1e3,e.X=722,e.Y=722,e.Z=667,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=581,e.underscore=500,e.quoteleft=333,e.a=500,e.b=556,e.c=444,e.d=556,e.e=444,e.f=333,e.g=500,e.h=556,e.i=278,e.j=333,e.k=556,e.l=278,e.m=833,e.n=556,e.o=500,e.p=556,e.q=556,e.r=444,e.s=389,e.t=333,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=444,e.braceleft=394,e.bar=220,e.braceright=394,e.asciitilde=520,e.exclamdown=333,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=278,e.quotedblleft=500,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=540,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=300,e.Lslash=667,e.Oslash=778,e.OE=1e3,e.ordmasculine=330,e.ae=722,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=556,e.Idieresis=389,e.eacute=444,e.abreve=500,e.uhungarumlaut=556,e.ecaron=444,e.Ydieresis=722,e.divide=570,e.Yacute=722,e.Acircumflex=722,e.aacute=500,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=747,e.Emacron=667,e.ccaron=444,e.aring=500,e.Ncommaaccent=722,e.lacute=278,e.agrave=500,e.Tcommaaccent=667,e.Cacute=722,e.atilde=500,e.Edotaccent=667,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=500,e.Amacron=722,e.rcaron=444,e.ccedilla=444,e.Zdotaccent=667,e.Thorn=611,e.Omacron=778,e.Racute=722,e.Sacute=556,e.dcaron=672,e.Umacron=722,e.uring=556,e.threesuperior=300,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=570,e.uacute=556,e.Tcaron=667,e.partialdiff=494,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=389,e.plusminus=570,e.brokenbar=220,e.registered=747,e.Gbreve=778,e.Idotaccent=389,e.summation=600,e.Egrave=667,e.racute=444,e.omacron=500,e.Zacute=667,e.Zcaron=667,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=416,e.eogonek=444,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=444,e.zacute=444,e.iogonek=278,e.Oacute=778,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=300,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=667,e.dcroat=556,e.threequarters=750,e.Scedilla=556,e.lcaron=394,e.Kcommaaccent=778,e.Lacute=667,e.trademark=1e3,e.edotaccent=444,e.Igrave=389,e.Imacron=389,e.Lcaron=667,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=778,e.degree=400,e.ograve=500,e.Ccaron=722,e.ugrave=556,e.radical=549,e.Dcaron=722,e.rcommaaccent=444,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=722,e.Lcommaaccent=667,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=444,e.Ecaron=667,e.Iogonek=389,e.kcommaaccent=556,e.minus=570,e.Icircumflex=389,e.ncaron=556,e.tcommaaccent=333,e.logicalnot=570,e.odieresis=500,e.udieresis=556,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=444,e.ncommaaccent=556,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-BoldItalic"]=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=389,e.quotedbl=555,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=570,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=570,e.equal=570,e.greater=570,e.question=500,e.at=832,e.A=667,e.B=667,e.C=667,e.D=722,e.E=667,e.F=667,e.G=722,e.H=778,e.I=389,e.J=500,e.K=667,e.L=611,e.M=889,e.N=722,e.O=722,e.P=611,e.Q=722,e.R=667,e.S=556,e.T=611,e.U=722,e.V=667,e.W=889,e.X=667,e.Y=611,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=570,e.underscore=500,e.quoteleft=333,e.a=500,e.b=500,e.c=444,e.d=500,e.e=444,e.f=333,e.g=500,e.h=556,e.i=278,e.j=278,e.k=500,e.l=278,e.m=778,e.n=556,e.o=500,e.p=500,e.q=500,e.r=389,e.s=389,e.t=278,e.u=556,e.v=444,e.w=667,e.x=500,e.y=444,e.z=389,e.braceleft=348,e.bar=220,e.braceright=348,e.asciitilde=570,e.exclamdown=389,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=278,e.quotedblleft=500,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=500,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=944,e.ordfeminine=266,e.Lslash=611,e.Oslash=722,e.OE=944,e.ordmasculine=300,e.ae=722,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=500,e.Idieresis=389,e.eacute=444,e.abreve=500,e.uhungarumlaut=556,e.ecaron=444,e.Ydieresis=611,e.divide=570,e.Yacute=611,e.Acircumflex=667,e.aacute=500,e.Ucircumflex=722,e.yacute=444,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=747,e.Emacron=667,e.ccaron=444,e.aring=500,e.Ncommaaccent=722,e.lacute=278,e.agrave=500,e.Tcommaaccent=611,e.Cacute=667,e.atilde=500,e.Edotaccent=667,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=494,e.Rcaron=667,e.Gcommaaccent=722,e.ucircumflex=556,e.acircumflex=500,e.Amacron=667,e.rcaron=389,e.ccedilla=444,e.Zdotaccent=611,e.Thorn=611,e.Omacron=722,e.Racute=667,e.Sacute=556,e.dcaron=608,e.Umacron=722,e.uring=556,e.threesuperior=300,e.Ograve=722,e.Agrave=667,e.Abreve=667,e.multiply=570,e.uacute=556,e.Tcaron=611,e.partialdiff=494,e.ydieresis=444,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=389,e.plusminus=570,e.brokenbar=220,e.registered=747,e.Gbreve=722,e.Idotaccent=389,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=500,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=366,e.eogonek=444,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=444,e.zacute=389,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=576,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=667,e.dcroat=500,e.threequarters=750,e.Scedilla=556,e.lcaron=382,e.Kcommaaccent=667,e.Lacute=611,e.trademark=1e3,e.edotaccent=444,e.Igrave=389,e.Imacron=389,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=556,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=667,e.Lcommaaccent=611,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=722,e.zdotaccent=389,e.Ecaron=667,e.Iogonek=389,e.kcommaaccent=500,e.minus=606,e.Icircumflex=389,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=606,e.odieresis=500,e.udieresis=556,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=389,e.ncommaaccent=556,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-Italic"]=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.quotedbl=420,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=675,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=675,e.equal=675,e.greater=675,e.question=500,e.at=920,e.A=611,e.B=611,e.C=667,e.D=722,e.E=611,e.F=611,e.G=722,e.H=722,e.I=333,e.J=444,e.K=667,e.L=556,e.M=833,e.N=667,e.O=722,e.P=611,e.Q=722,e.R=611,e.S=500,e.T=556,e.U=722,e.V=611,e.W=833,e.X=611,e.Y=556,e.Z=556,e.bracketleft=389,e.backslash=278,e.bracketright=389,e.asciicircum=422,e.underscore=500,e.quoteleft=333,e.a=500,e.b=500,e.c=444,e.d=500,e.e=444,e.f=278,e.g=500,e.h=500,e.i=278,e.j=278,e.k=444,e.l=278,e.m=722,e.n=500,e.o=500,e.p=500,e.q=500,e.r=389,e.s=389,e.t=278,e.u=500,e.v=444,e.w=667,e.x=444,e.y=444,e.z=389,e.braceleft=400,e.bar=275,e.braceright=400,e.asciitilde=541,e.exclamdown=389,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=214,e.quotedblleft=556,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=523,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=556,e.quotedblright=556,e.guillemotright=500,e.ellipsis=889,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=889,e.AE=889,e.ordfeminine=276,e.Lslash=556,e.Oslash=722,e.OE=944,e.ordmasculine=310,e.ae=667,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=667,e.germandbls=500,e.Idieresis=333,e.eacute=444,e.abreve=500,e.uhungarumlaut=500,e.ecaron=444,e.Ydieresis=556,e.divide=675,e.Yacute=556,e.Acircumflex=611,e.aacute=500,e.Ucircumflex=722,e.yacute=444,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=500,e.Edieresis=611,e.Dcroat=722,e.commaaccent=250,e.copyright=760,e.Emacron=611,e.ccaron=444,e.aring=500,e.Ncommaaccent=667,e.lacute=278,e.agrave=500,e.Tcommaaccent=556,e.Cacute=667,e.atilde=500,e.Edotaccent=611,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=471,e.Rcaron=611,e.Gcommaaccent=722,e.ucircumflex=500,e.acircumflex=500,e.Amacron=611,e.rcaron=389,e.ccedilla=444,e.Zdotaccent=556,e.Thorn=611,e.Omacron=722,e.Racute=611,e.Sacute=500,e.dcaron=544,e.Umacron=722,e.uring=500,e.threesuperior=300,e.Ograve=722,e.Agrave=611,e.Abreve=611,e.multiply=675,e.uacute=500,e.Tcaron=556,e.partialdiff=476,e.ydieresis=444,e.Nacute=667,e.icircumflex=278,e.Ecircumflex=611,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=500,e.umacron=500,e.Ncaron=667,e.Iacute=333,e.plusminus=675,e.brokenbar=275,e.registered=760,e.Gbreve=722,e.Idotaccent=333,e.summation=600,e.Egrave=611,e.racute=389,e.omacron=500,e.Zacute=556,e.Zcaron=556,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=300,e.eogonek=444,e.Uogonek=722,e.Aacute=611,e.Adieresis=611,e.egrave=444,e.zacute=389,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=500,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=611,e.dcroat=500,e.threequarters=750,e.Scedilla=500,e.lcaron=300,e.Kcommaaccent=667,e.Lacute=556,e.trademark=980,e.edotaccent=444,e.Igrave=333,e.Imacron=333,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=500,e.Uhungarumlaut=722,e.Eacute=611,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=500,e.Scommaaccent=500,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=500,e.radical=453,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=667,e.otilde=500,e.Rcommaaccent=611,e.Lcommaaccent=556,e.Atilde=611,e.Aogonek=611,e.Aring=611,e.Otilde=722,e.zdotaccent=389,e.Ecaron=611,e.Iogonek=333,e.kcommaaccent=444,e.minus=675,e.Icircumflex=333,e.ncaron=500,e.tcommaaccent=278,e.logicalnot=675,e.odieresis=500,e.udieresis=500,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=389,e.ncommaaccent=500,e.onesuperior=300,e.imacron=278,e.Euro=500})),e.ZapfDingbats=(0,n.getLookupTableFactory)((function(e){e.space=278,e.a1=974,e.a2=961,e.a202=974,e.a3=980,e.a4=719,e.a5=789,e.a119=790,e.a118=791,e.a117=690,e.a11=960,e.a12=939,e.a13=549,e.a14=855,e.a15=911,e.a16=933,e.a105=911,e.a17=945,e.a18=974,e.a19=755,e.a20=846,e.a21=762,e.a22=761,e.a23=571,e.a24=677,e.a25=763,e.a26=760,e.a27=759,e.a28=754,e.a6=494,e.a7=552,e.a8=537,e.a9=577,e.a10=692,e.a29=786,e.a30=788,e.a31=788,e.a32=790,e.a33=793,e.a34=794,e.a35=816,e.a36=823,e.a37=789,e.a38=841,e.a39=823,e.a40=833,e.a41=816,e.a42=831,e.a43=923,e.a44=744,e.a45=723,e.a46=749,e.a47=790,e.a48=792,e.a49=695,e.a50=776,e.a51=768,e.a52=792,e.a53=759,e.a54=707,e.a55=708,e.a56=682,e.a57=701,e.a58=826,e.a59=815,e.a60=789,e.a61=789,e.a62=707,e.a63=687,e.a64=696,e.a65=689,e.a66=786,e.a67=787,e.a68=713,e.a69=791,e.a70=785,e.a71=791,e.a72=873,e.a73=761,e.a74=762,e.a203=762,e.a75=759,e.a204=759,e.a76=892,e.a77=892,e.a78=788,e.a79=784,e.a81=438,e.a82=138,e.a83=277,e.a84=415,e.a97=392,e.a98=392,e.a99=668,e.a100=668,e.a89=390,e.a90=390,e.a93=317,e.a94=317,e.a91=276,e.a92=276,e.a205=509,e.a85=509,e.a206=410,e.a86=410,e.a87=234,e.a88=234,e.a95=334,e.a96=334,e.a101=732,e.a102=544,e.a103=544,e.a104=910,e.a106=667,e.a107=760,e.a108=760,e.a112=776,e.a111=595,e.a110=694,e.a109=626,e.a120=788,e.a121=788,e.a122=788,e.a123=788,e.a124=788,e.a125=788,e.a126=788,e.a127=788,e.a128=788,e.a129=788,e.a130=788,e.a131=788,e.a132=788,e.a133=788,e.a134=788,e.a135=788,e.a136=788,e.a137=788,e.a138=788,e.a139=788,e.a140=788,e.a141=788,e.a142=788,e.a143=788,e.a144=788,e.a145=788,e.a146=788,e.a147=788,e.a148=788,e.a149=788,e.a150=788,e.a151=788,e.a152=788,e.a153=788,e.a154=788,e.a155=788,e.a156=788,e.a157=788,e.a158=788,e.a159=788,e.a160=894,e.a161=838,e.a163=1016,e.a164=458,e.a196=748,e.a165=924,e.a192=748,e.a166=918,e.a167=927,e.a168=928,e.a169=928,e.a170=834,e.a171=873,e.a172=828,e.a173=924,e.a162=924,e.a174=917,e.a175=930,e.a176=931,e.a177=463,e.a178=883,e.a179=836,e.a193=836,e.a180=867,e.a199=867,e.a181=696,e.a200=696,e.a182=874,e.a201=874,e.a183=760,e.a184=946,e.a197=771,e.a185=865,e.a194=771,e.a198=888,e.a186=967,e.a195=888,e.a187=831,e.a188=873,e.a189=927,e.a190=970,e.a191=918}))}));t.getMetrics=a;const i=(0,n.getLookupTableFactory)((function(e){e.Courier={ascent:629,descent:-157,capHeight:562,xHeight:-426},e["Courier-Bold"]={ascent:629,descent:-157,capHeight:562,xHeight:439},e["Courier-Oblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},e["Courier-BoldOblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},e.Helvetica={ascent:718,descent:-207,capHeight:718,xHeight:523},e["Helvetica-Bold"]={ascent:718,descent:-207,capHeight:718,xHeight:532},e["Helvetica-Oblique"]={ascent:718,descent:-207,capHeight:718,xHeight:523},e["Helvetica-BoldOblique"]={ascent:718,descent:-207,capHeight:718,xHeight:532},e["Times-Roman"]={ascent:683,descent:-217,capHeight:662,xHeight:450},e["Times-Bold"]={ascent:683,descent:-217,capHeight:676,xHeight:461},e["Times-Italic"]={ascent:683,descent:-217,capHeight:653,xHeight:441},e["Times-BoldItalic"]={ascent:683,descent:-217,capHeight:669,xHeight:462},e.Symbol={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN},e.ZapfDingbats={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN}}));t.getFontBasicMetrics=i},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlyfTable=void 0,t.GlyfTable=class{constructor({glyfTable:e,isGlyphLocationsLong:t,locaTable:n,numGlyphs:a}){this.glyphs=[];const i=new DataView(n.buffer,n.byteOffset,n.byteLength),s=new DataView(e.buffer,e.byteOffset,e.byteLength),o=t?4:2;let c=t?i.getUint32(0):2*i.getUint16(0),l=0;for(let e=0;a>e;e++){l+=o;const e=t?i.getUint32(l):2*i.getUint16(l);if(e===c){this.glyphs.push(new r({}));continue}const n=r.parse(c,s);this.glyphs.push(n),c=e}}getSize(){return this.glyphs.reduce(((e,t)=>e+(t.getSize()+3&-4)),0)}write(){const e=this.getSize(),t=new DataView(new ArrayBuffer(e)),r=e>131070,n=r?4:2,a=new DataView(new ArrayBuffer((this.glyphs.length+1)*n));r?a.setUint32(0,0):a.setUint16(0,0);let i=0,s=0;for(const e of this.glyphs)i+=e.write(i,t),i=i+3&-4,s+=n,r?a.setUint32(s,i):a.setUint16(s,i>>1);return{isLocationLong:r,loca:new Uint8Array(a.buffer),glyf:new Uint8Array(t.buffer)}}scale(e){for(let t=0,r=this.glyphs.length;r>t;t++)this.glyphs[t].scale(e[t])}};class r{constructor({header:e=null,simple:t=null,composites:r=null}){this.header=e,this.simple=t,this.composites=r}static parse(e,t){const[a,o]=n.parse(e,t);if(e+=a,0>o.numberOfContours){const n=[];for(;;){const[r,a]=s.parse(e,t);if(e+=r,n.push(a),!(32&a.flags))break}return new r({header:o,composites:n})}const c=i.parse(e,t,o.numberOfContours);return new r({header:o,simple:c})}getSize(){if(!this.header)return 0;const e=this.simple?this.simple.getSize():this.composites.reduce(((e,t)=>e+t.getSize()),0);return this.header.getSize()+e}write(e,t){if(!this.header)return 0;const r=e;if(e+=this.header.write(e,t),this.simple)e+=this.simple.write(e,t);else for(const r of this.composites)e+=r.write(e,t);return e-r}scale(e){if(!this.header)return;const t=(this.header.xMin+this.header.xMax)/2;if(this.header.scale(t,e),this.simple)this.simple.scale(t,e);else for(const r of this.composites)r.scale(t,e)}}class n{constructor({numberOfContours:e,xMin:t,yMin:r,xMax:n,yMax:a}){this.numberOfContours=e,this.xMin=t,this.yMin=r,this.xMax=n,this.yMax=a}static parse(e,t){return[10,new n({numberOfContours:t.getInt16(e),xMin:t.getInt16(e+2),yMin:t.getInt16(e+4),xMax:t.getInt16(e+6),yMax:t.getInt16(e+8)})]}getSize(){return 10}write(e,t){return t.setInt16(e,this.numberOfContours),t.setInt16(e+2,this.xMin),t.setInt16(e+4,this.yMin),t.setInt16(e+6,this.xMax),t.setInt16(e+8,this.yMax),10}scale(e,t){this.xMin=Math.round(e+(this.xMin-e)*t),this.xMax=Math.round(e+(this.xMax-e)*t)}}class a{constructor({flags:e,xCoordinates:t,yCoordinates:r}){this.xCoordinates=t,this.yCoordinates=r,this.flags=e}}class i{constructor({contours:e,instructions:t}){this.contours=e,this.instructions=t}static parse(e,t,r){const n=[];for(let a=0;r>a;a++){const r=t.getUint16(e);e+=2,n.push(r)}const s=n[r-1]+1,o=t.getUint16(e);e+=2;const c=new Uint8Array(t).slice(e,e+o);e+=o;const l=[];for(let r=0;s>r;e++,r++){let n=t.getUint8(e);if(l.push(n),8&n){const a=t.getUint8(++e);n^=8;for(let e=0;a>e;e++)l.push(n);r+=a}}const h=[];let u=[],d=[],f=[];const p=[];let g=0,m=0;for(let r=0;s>r;r++){const a=l[r];if(2&a){const r=t.getUint8(e++);m+=16&a?r:-r,u.push(m)}else 16&a||(m+=t.getInt16(e),e+=2),u.push(m);n[g]===r&&(g++,h.push(u),u=[])}m=0,g=0;for(let r=0;s>r;r++){const i=l[r];if(4&i){const r=t.getUint8(e++);m+=32&i?r:-r,d.push(m)}else 32&i||(m+=t.getInt16(e),e+=2),d.push(m);f.push(1&i|64&i),n[g]===r&&(u=h[g],g++,p.push(new a({flags:f,xCoordinates:u,yCoordinates:d})),d=[],f=[])}return new i({contours:p,instructions:c})}getSize(){let e=2*this.contours.length+2+this.instructions.length,t=0,r=0;for(const n of this.contours){e+=n.flags.length;for(let a=0,i=n.xCoordinates.length;i>a;a++){const i=n.xCoordinates[a],s=n.yCoordinates[a];let o=Math.abs(i-t);o>255?e+=2:o>0&&(e+=1),t=i,o=Math.abs(s-r),o>255?e+=2:o>0&&(e+=1),r=s}}return e}write(e,t){const r=e,n=[],a=[],i=[];let s=0,o=0;for(const r of this.contours){for(let e=0,t=r.xCoordinates.length;t>e;e++){let t=r.flags[e];const c=r.xCoordinates[e];let l=c-s;if(0===l)t|=16,n.push(0);else{const e=Math.abs(l);e>255?n.push(l):(t|=0>l?2:18,n.push(e))}s=c;const h=r.yCoordinates[e];if(l=h-o,0===l)t|=32,a.push(0);else{const e=Math.abs(l);e>255?a.push(l):(t|=0>l?4:36,a.push(e))}o=h,i.push(t)}t.setUint16(e,n.length-1),e+=2}t.setUint16(e,this.instructions.length),e+=2,this.instructions.length&&(new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e),e+=this.instructions.length);for(const r of i)t.setUint8(e++,r);for(let r=0,a=n.length;a>r;r++){const a=n[r],s=i[r];2&s?t.setUint8(e++,a):16&s||(t.setInt16(e,a),e+=2)}for(let r=0,n=a.length;n>r;r++){const n=a[r],s=i[r];4&s?t.setUint8(e++,n):32&s||(t.setInt16(e,n),e+=2)}return e-r}scale(e,t){for(const r of this.contours)if(0!==r.xCoordinates.length)for(let n=0,a=r.xCoordinates.length;a>n;n++)r.xCoordinates[n]=Math.round(e+(r.xCoordinates[n]-e)*t)}}class s{constructor({flags:e,glyphIndex:t,argument1:r,argument2:n,transf:a,instructions:i}){this.flags=e,this.glyphIndex=t,this.argument1=r,this.argument2=n,this.transf=a,this.instructions=i}static parse(e,t){const r=e,n=[];let a=t.getUint16(e);const i=t.getUint16(e+2);let o,c;e+=4,1&a?(2&a?(o=t.getInt16(e),c=t.getInt16(e+2)):(o=t.getUint16(e),c=t.getUint16(e+2)),e+=4,a^=1):(2&a?(o=t.getInt8(e),c=t.getInt8(e+1)):(o=t.getUint8(e),c=t.getUint8(e+1)),e+=2),8&a?(n.push(t.getUint16(e)),e+=2):64&a?(n.push(t.getUint16(e),t.getUint16(e+2)),e+=4):128&a&&(n.push(t.getUint16(e),t.getUint16(e+2),t.getUint16(e+4),t.getUint16(e+6)),e+=8);let l=null;if(256&a){const r=t.getUint16(e);e+=2,l=new Uint8Array(t).slice(e,e+r),e+=r}return[e-r,new s({flags:a,glyphIndex:i,argument1:o,argument2:c,transf:n,instructions:l})]}getSize(){let e=4+2*this.transf.length;return 256&this.flags&&(e+=2+this.instructions.length),e+=2,2&this.flags?(-128>this.argument1||this.argument1>127||-128>this.argument2||this.argument2>127)&&(e+=2):(0>this.argument1||this.argument1>255||0>this.argument2||this.argument2>255)&&(e+=2),e}write(e,t){const r=e;return 2&this.flags?(-128>this.argument1||this.argument1>127||-128>this.argument2||this.argument2>127)&&(this.flags|=1):(0>this.argument1||this.argument1>255||0>this.argument2||this.argument2>255)&&(this.flags|=1),t.setUint16(e,this.flags),t.setUint16(e+2,this.glyphIndex),e+=4,1&this.flags?(2&this.flags?(t.setInt16(e,this.argument1),t.setInt16(e+2,this.argument2)):(t.setUint16(e,this.argument1),t.setUint16(e+2,this.argument2)),e+=4):(t.setUint8(e,this.argument1),t.setUint8(e+1,this.argument2),e+=2),256&this.flags&&(t.setUint16(e,this.instructions.length),e+=2,this.instructions.length&&(new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e),e+=this.instructions.length)),e-r}scale(e,t){}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OpenTypeFileBuilder=void 0;var n=r(6),a=r(2);function i(e,t,r){e[t]=r>>8&255,e[t+1]=255&r}function s(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function o(e,t,r){if(r instanceof Uint8Array)e.set(r,t);else if("string"==typeof r)for(let n=0,a=r.length;a>n;n++)e[t++]=255&r.charCodeAt(n);else for(let n=0,a=r.length;a>n;n++)e[t++]=255&r[n]}class c{constructor(e){this.sfnt=e,this.tables=Object.create(null)}static getSearchParams(e,t){let r=1,n=0;for(;(r^e)>r;)r<<=1,n++;const a=r*t;return{range:a,entry:n,rangeShift:t*e-a}}toArray(){let e=this.sfnt;const t=this.tables,r=Object.keys(t);r.sort();const l=r.length;let h,u,d,f,p,g=12+16*l;const m=[g];for(h=0;l>h;h++)f=t[r[h]],g+=(f.length+3&-4)>>>0,m.push(g);const b=new Uint8Array(g);for(h=0;l>h;h++)f=t[r[h]],o(b,m[h],f);"true"===e&&(e=(0,a.string32)(65536)),b[0]=255&e.charCodeAt(0),b[1]=255&e.charCodeAt(1),b[2]=255&e.charCodeAt(2),b[3]=255&e.charCodeAt(3),i(b,4,l);const y=c.getSearchParams(l,16);for(i(b,6,y.range),i(b,8,y.entry),i(b,10,y.rangeShift),g=12,h=0;l>h;h++){p=r[h],b[g]=255&p.charCodeAt(0),b[g+1]=255&p.charCodeAt(1),b[g+2]=255&p.charCodeAt(2),b[g+3]=255&p.charCodeAt(3);let e=0;for(u=m[h],d=m[h+1];d>u;u+=4)e=e+(0,n.readUint32)(b,u)>>>0;s(b,g+4,e),s(b,g+8,m[h]),s(b,g+12,t[p].length),g+=16}return b}addTable(e,t){if(e in this.tables)throw Error("Table "+e+" already exists");this.tables[e]=t}}t.OpenTypeFileBuilder=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Type1Font=void 0;var n=r(35),a=r(38),i=r(6),s=r(10),o=r(49),c=r(2);function l(e,t,r){const n=e.length,a=t.length,s=n-a;let o=r,c=!1;for(;s>o;){let r=0;for(;a>r&&e[o+r]===t[r];)r++;if(r>=a){for(o+=r;n>o&&(0,i.isWhiteSpace)(e[o]);)o++;c=!0;break}o++}return{found:c,length:o}}t.Type1Font=class{constructor(e,t,r){let n=r.length1,i=t.peekBytes(6);const h=128===i[0]&&1===i[1];h&&(t.skip(6),n=i[5]<<24|i[4]<<16|i[3]<<8|i[2]);const u=function(e,t){const r=[101,101,120,101,99],n=e.pos;let a,i,o,h;try{a=e.getBytes(t),i=a.length}catch(e){}if(i===t&&(o=l(a,r,t-2*r.length),o.found&&o.length===t))return{stream:new s.Stream(a),length:t};for((0,c.warn)('Invalid "Length1" property in Type1 font -- trying to recover.'),e.pos=n;o=l(e.peekBytes(2048),r,0),0!==o.length;)if(e.pos+=o.length,o.found){h=e.pos-n;break}return e.pos=n,h?{stream:new s.Stream(e.getBytes(h)),length:h}:((0,c.warn)('Unable to recover "Length1" property in Type1 font -- using as is.'),{stream:new s.Stream(e.getBytes(t)),length:t})}(t,n);new o.Type1Parser(u.stream,!1,a.SEAC_ANALYSIS_ENABLED).extractFontHeader(r),h&&(i=t.getBytes(6));const d=function(e){const t=e.getBytes();return{stream:new s.Stream(t),length:t.length}}(t),f=new o.Type1Parser(d.stream,!0,a.SEAC_ANALYSIS_ENABLED).extractFontProgram(r);for(const e in f.properties)r[e]=f.properties[e];const p=f.charstrings,g=this.getType2Charstrings(p),m=this.getType2Subrs(f.subrs);this.charstrings=p,this.data=this.wrap(e,g,this.charstrings,m,r),this.seacs=this.getSeacs(f.charstrings)}get numGlyphs(){return this.charstrings.length+1}getCharset(){const e=[".notdef"];for(const{glyphName:t}of this.charstrings)e.push(t);return e}getGlyphMapping(e){const t=this.charstrings;if(e.composite){const r=Object.create(null);for(let n=0,a=t.length;a>n;n++)r[e.cMap.charCodeOf(n)]=n+1;return r}const r=[".notdef"];let n,i;for(i=0;t.length>i;i++)r.push(t[i].glyphName);const s=e.builtInEncoding;if(s){n=Object.create(null);for(const e in s)i=r.indexOf(s[e]),0>i||(n[e]=i)}return(0,a.type1FontGlyphMapping)(e,n,r)}hasGlyphId(e){return e>=0&&this.numGlyphs>e&&(0===e||this.charstrings[e-1].charstring.length>0)}getSeacs(e){const t=[];for(let r=0,n=e.length;n>r;r++){const n=e[r];n.seac&&(t[r+1]=n.seac)}return t}getType2Charstrings(e){const t=[];for(let r=0,n=e.length;n>r;r++)t.push(e[r].charstring);return t}getType2Subrs(e){let t=0;const r=e.length;t=1133>r?107:33769>r?1131:32768;const n=[];let a;for(a=0;t>a;a++)n.push([11]);for(a=0;r>a;a++)n.push(e[a]);return n}wrap(e,t,r,a,i){const s=new n.CFF;s.header=new n.CFFHeader(1,0,4,4),s.names=[e];const o=new n.CFFTopDict;o.setByName("version",391),o.setByName("Notice",392),o.setByName("FullName",393),o.setByName("FamilyName",394),o.setByName("Weight",395),o.setByName("Encoding",null),o.setByName("FontMatrix",i.fontMatrix),o.setByName("FontBBox",i.bbox),o.setByName("charset",null),o.setByName("CharStrings",null),o.setByName("Private",null),s.topDict=o;const c=new n.CFFStrings;c.add("Version 0.11"),c.add("See original notice"),c.add(e),c.add(e),c.add("Medium"),s.strings=c,s.globalSubrIndex=new n.CFFIndex;const l=t.length,h=[".notdef"];let u,d;for(u=0;l>u;u++){const e=r[u].glyphName;-1===n.CFFStandardStrings.indexOf(e)&&c.add(e),h.push(e)}s.charset=new n.CFFCharset(!1,0,h);const f=new n.CFFIndex;for(f.add([139,14]),u=0;l>u;u++)f.add(t[u]);s.charStrings=f;const p=new n.CFFPrivateDict;p.setByName("Subrs",null);const g=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(u=0,d=g.length;d>u;u++){const e=g[u];if(!(e in i.privateData))continue;const t=i.privateData[e];if(Array.isArray(t))for(let e=t.length-1;e>0;e--)t[e]-=t[e-1];p.setByName(e,t)}s.topDict.privateDict=p;const m=new n.CFFIndex;for(u=0,d=a.length;d>u;u++)m.add(a[u]);return p.subrsIndex=m,new n.CFFCompiler(s).compile()}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Type1Parser=void 0;var n=r(37),a=r(6),i=r(10),s=r(2);const o=[4],c=[5],l=[6],h=[7],u=[8],d=[12,35],f=[14],p=[21],g=[22],m=[30],b=[31];class y{constructor(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}convert(e,t,r){const n=e.length;let a,i,y,w=!1;for(let v=0;n>v;v++){let n=e[v];if(32>n){switch(12===n&&(n=(n<<8)+e[++v]),n){case 1:case 3:case 9:case 3072:case 3073:case 3074:case 3105:this.stack=[];break;case 4:if(this.flexing){if(1>this.stack.length){w=!0;break}const e=this.stack.pop();this.stack.push(0,e);break}w=this.executeCommand(1,o);break;case 5:w=this.executeCommand(2,c);break;case 6:w=this.executeCommand(1,l);break;case 7:w=this.executeCommand(1,h);break;case 8:w=this.executeCommand(6,u);break;case 10:if(1>this.stack.length){w=!0;break}if(y=this.stack.pop(),!t[y]){w=!0;break}w=this.convert(t[y],t,r);break;case 11:return w;case 13:if(2>this.stack.length){w=!0;break}a=this.stack.pop(),i=this.stack.pop(),this.lsb=i,this.width=a,this.stack.push(a,i),w=this.executeCommand(2,g);break;case 14:this.output.push(f[0]);break;case 21:if(this.flexing)break;w=this.executeCommand(2,p);break;case 22:if(this.flexing){this.stack.push(0);break}w=this.executeCommand(1,g);break;case 30:w=this.executeCommand(4,m);break;case 31:w=this.executeCommand(4,b);break;case 3078:if(r){const e=this.stack.at(-5);this.seac=this.stack.splice(-4,4),this.seac[0]+=this.lsb-e,w=this.executeCommand(0,f)}else w=this.executeCommand(4,f);break;case 3079:if(4>this.stack.length){w=!0;break}this.stack.pop(),a=this.stack.pop();const e=this.stack.pop();i=this.stack.pop(),this.lsb=i,this.width=a,this.stack.push(a,i,e),w=this.executeCommand(3,p);break;case 3084:if(2>this.stack.length){w=!0;break}const v=this.stack.pop(),S=this.stack.pop();this.stack.push(S/v);break;case 3088:if(2>this.stack.length){w=!0;break}y=this.stack.pop();const x=this.stack.pop();if(0===y&&3===x){const e=this.stack.splice(this.stack.length-17,17);this.stack.push(e[2]+e[0],e[3]+e[1],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14]),w=this.executeCommand(13,d,!0),this.flexing=!1,this.stack.push(e[15],e[16])}else 1===y&&0===x&&(this.flexing=!0);break;case 3089:break;default:(0,s.warn)('Unknown type 1 charstring command of "'+n+'"')}if(w)break}else n>246?n=n>250?n>254?(255&e[++v])<<24|(255&e[++v])<<16|(255&e[++v])<<8|255&e[++v]:-256*(n-251)-e[++v]-108:256*(n-247)+e[++v]+108:n-=139,this.stack.push(n)}return w}executeCommand(e,t,r){const n=this.stack.length;if(e>n)return!0;const a=n-e;for(let e=a;n>e;e++){let t=this.stack[e];Number.isInteger(t)?this.output.push(28,t>>8&255,255&t):(t=65536*t|0,this.output.push(255,t>>24&255,t>>16&255,t>>8&255,255&t))}return this.output.push(...t),r?this.stack.splice(a,e):this.stack.length=0,!1}}function w(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function v(e,t,r){if(r>=e.length)return new Uint8Array(0);let n,a,i=0|t;for(n=0;r>n;n++)i=52845*(e[n]+i)+22719&65535;const s=e.length-r,o=new Uint8Array(s);for(n=r,a=0;s>a;n++,a++){const t=e[n];o[a]=t^i>>8,i=52845*(t+i)+22719&65535}return o}function S(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}t.Type1Parser=class{constructor(e,t,r){if(t){const t=e.getBytes(),r=!((w(t[0])||(0,a.isWhiteSpace)(t[0]))&&w(t[1])&&w(t[2])&&w(t[3])&&w(t[4])&&w(t[5])&&w(t[6])&&w(t[7]));e=new i.Stream(r?v(t,55665,4):function(e,t,r){let n=0|t;const a=e.length,i=new Uint8Array(a>>>1);let s,o;for(s=0,o=0;a>s;s++){const t=e[s];if(!w(t))continue;let r;for(s++;a>s&&!w(r=e[s]);)s++;if(a>s){const e=parseInt(String.fromCharCode(t,r),16);i[o++]=e^n>>8,n=52845*(e+n)+22719&65535}}return i.slice(r,o)}(t,55665,4))}this.seacAnalysisEnabled=!!r,this.stream=e,this.nextChar()}readNumberArray(){this.getToken();const e=[];for(;;){const t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e}readNumber(){const e=this.getToken();return parseFloat(e||0)}readInt(){const e=this.getToken();return 0|parseInt(e||0,10)}readBoolean(){return"true"===this.getToken()?1:0}nextChar(){return this.currentChar=this.stream.getByte()}prevChar(){return this.stream.skip(-2),this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,a.isWhiteSpace)(t))break;t=this.nextChar()}if(S(t))return this.nextChar(),String.fromCharCode(t);let r="";do{r+=String.fromCharCode(t),t=this.nextChar()}while(t>=0&&!(0,a.isWhiteSpace)(t)&&!S(t));return r}readCharStrings(e,t){return-1===t?e:v(e,4330,t)}extractFontProgram(e){const t=this.stream,r=[],n=[],a=Object.create(null);a.lenIV=4;const i={subrs:[],charstrings:[],properties:{privateData:a}};let s,o,c,l;for(;null!==(s=this.getToken());)if("/"===s)switch(s=this.getToken(),s){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();s=this.getToken(),null!==s&&"end"!==s;){if("/"!==s)continue;const e=this.getToken();o=this.readInt(),this.getToken(),c=o>0?t.getBytes(o):new Uint8Array(0),l=i.properties.privateData.lenIV;const r=this.readCharStrings(c,l);this.nextChar(),s=this.getToken(),"noaccess"===s?this.getToken():"/"===s&&this.prevChar(),n.push({glyph:e,encoded:r})}break;case"Subrs":for(this.readInt(),this.getToken();"dup"===this.getToken();){const e=this.readInt();o=this.readInt(),this.getToken(),c=o>0?t.getBytes(o):new Uint8Array(0),l=i.properties.privateData.lenIV;const n=this.readCharStrings(c,l);this.nextChar(),s=this.getToken(),"noaccess"===s&&this.getToken(),r[e]=n}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":this.readNumberArray();break;case"StemSnapH":case"StemSnapV":i.properties.privateData[s]=this.readNumberArray();break;case"StdHW":case"StdVW":i.properties.privateData[s]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":case"ExpansionFactor":i.properties.privateData[s]=this.readNumber();break;case"ForceBold":i.properties.privateData[s]=this.readBoolean()}for(const{encoded:t,glyph:a}of n){const n=new y,s=n.convert(t,r,this.seacAnalysisEnabled);let o=n.output;s&&(o=[14]);const c={glyphName:a,charstring:o,width:n.width,lsb:n.lsb,seac:n.seac};if(".notdef"===a?i.charstrings.unshift(c):i.charstrings.push(c),e.builtInEncoding){const t=e.builtInEncoding.indexOf(a);-1>=t||void 0!==e.widths[t]||e.firstChar>t||t>e.lastChar||(e.widths[t]=n.width)}}return i}extractFontHeader(e){let t;for(;null!==(t=this.getToken());)if("/"===t)switch(t=this.getToken(),t){case"FontMatrix":const r=this.readNumberArray();e.fontMatrix=r;break;case"Encoding":const a=this.getToken();let i;if(/^\d+$/.test(a)){i=[];const e=0|parseInt(a,10);this.getToken();for(let r=0;e>r;r++){for(t=this.getToken();"dup"!==t&&"def"!==t;)if(t=this.getToken(),null===t)return;if("def"===t)break;const e=this.readInt();this.getToken();const r=this.getToken();i[e]=r,this.getToken()}}else i=(0,n.getEncoding)(a);e.builtInEncoding=i;break;case"FontBBox":const s=this.readNumberArray();e.ascent=Math.max(s[3],s[1]),e.descent=Math.min(s[1],s[3]),e.ascentScaled=!0}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Pattern=void 0,t.getTilingPatternIR=function(e,t,r){const a=t.getArray("Matrix"),i=n.Util.normalizeRect(t.getArray("BBox")),s=t.get("XStep"),o=t.get("YStep"),c=t.get("PaintType"),l=t.get("TilingType");if(i[2]-i[0]==0||i[3]-i[1]==0)throw new n.FormatError(`Invalid getTilingPatternIR /BBox array: [${i}].`);return["TilingPattern",r,e,a,i,s,o,c,l]};var n=r(2),a=r(7),i=r(14),s=r(6);const o=2,c=3,l=4,h=5,u=6,d=7;t.Pattern=class{constructor(){(0,n.unreachable)("Cannot initialize Pattern.")}static parseShading(e,t,r,i,f,g){const m=e instanceof a.BaseStream?e.dict:e,w=m.get("ShadingType");try{switch(w){case o:case c:return new p(m,t,r,f,g);case l:case h:case u:case d:return new b(e,t,r,f,g);default:throw new n.FormatError("Unsupported ShadingType: "+w)}}catch(e){if(e instanceof s.MissingDataException)throw e;return i.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.shadingPattern}),(0,n.warn)(e),new y}}};class f{static get SMALL_NUMBER(){return(0,n.shadow)(this,"SMALL_NUMBER",1e-6)}constructor(){this.constructor===f&&(0,n.unreachable)("Cannot initialize BaseShading.")}getIR(){(0,n.unreachable)("Abstract method `getIR` called.")}}class p extends f{constructor(e,t,r,a,s){super(),this.coordsArr=e.getArray("Coords"),this.shadingType=e.get("ShadingType");const o=i.ColorSpace.parse({cs:e.getRaw("CS")||e.getRaw("ColorSpace"),xref:t,resources:r,pdfFunctionFactory:a,localColorSpaceCache:s}),l=e.getArray("BBox");this.bbox=Array.isArray(l)&&4===l.length?n.Util.normalizeRect(l):null;let h=0,u=1;if(e.has("Domain")){const t=e.getArray("Domain");h=t[0],u=t[1]}let d=!1,p=!1;if(e.has("Extend")){const t=e.getArray("Extend");d=t[0],p=t[1]}if(!(this.shadingType!==c||d&&p)){const[e,t,r,a,i,s]=this.coordsArr,o=Math.hypot(e-a,t-i);r>s+o||s>r+o||(0,n.warn)("Unsupported radial gradient.")}this.extendStart=d,this.extendEnd=p;const g=e.getRaw("Function"),m=a.createFromArray(g),b=(u-h)/10,y=this.colorStops=[];if(h>=u||0>=b)return void(0,n.info)("Bad shading domain.");const w=new Float32Array(o.numComps),v=new Float32Array(1);let S;for(let e=0;10>=e;e++){v[0]=h+e*b,m(v,0,w,0),S=o.getRgb(w,0);const t=n.Util.makeHexColor(S[0],S[1],S[2]);y.push([e/10,t])}let x="transparent";e.has("Background")&&(S=o.getRgb(e.get("Background"),0),x=n.Util.makeHexColor(S[0],S[1],S[2])),d||(y.unshift([0,x]),y[1][0]+=f.SMALL_NUMBER),p||(y.at(-1)[0]-=f.SMALL_NUMBER,y.push([1,x])),this.colorStops=y}getIR(){const e=this.coordsArr,t=this.shadingType;let r,a,i,s,l;return t===o?(a=[e[0],e[1]],i=[e[2],e[3]],s=null,l=null,r="axial"):t===c?(a=[e[0],e[1]],i=[e[3],e[4]],s=e[2],l=e[5],r="radial"):(0,n.unreachable)("getPattern type unknown: "+t),["RadialAxial",r,this.bbox,this.colorStops,a,i,s,l]}}class g{constructor(e,t){this.stream=e,this.context=t,this.buffer=0,this.bufferLength=0,this.tmpCompsBuf=new Float32Array(t.numComps),this.tmpCsCompsBuf=t.colorFn?new Float32Array(t.colorSpace.numComps):this.tmpCompsBuf}get hasData(){if(this.stream.end)return this.stream.end>this.stream.pos;if(this.bufferLength>0)return!0;const e=this.stream.getByte();return e>=0&&(this.buffer=e,this.bufferLength=8,!0)}readBits(e){let t=this.buffer,r=this.bufferLength;if(32===e){if(0===r)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;t=t<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();const e=this.stream.getByte();return this.buffer=e&(1<<r)-1,(t<<8-r|(255&e)>>r)>>>0}if(8===e&&0===r)return this.stream.getByte();for(;e>r;)t=t<<8|this.stream.getByte(),r+=8;return r-=e,this.bufferLength=r,this.buffer=t&(1<<r)-1,t>>r}align(){this.buffer=0,this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){const e=this.context.bitsPerCoordinate,t=this.readBits(e),r=this.readBits(e),n=this.context.decode,a=32>e?1/((1<<e)-1):2.3283064365386963e-10;return[t*a*(n[1]-n[0])+n[0],r*a*(n[3]-n[2])+n[2]]}readComponents(){const e=this.context.numComps,t=this.context.bitsPerComponent,r=32>t?1/((1<<t)-1):2.3283064365386963e-10,n=this.context.decode,a=this.tmpCompsBuf;for(let i=0,s=4;e>i;i++,s+=2){const e=this.readBits(t);a[i]=e*r*(n[s+1]-n[s])+n[s]}const i=this.tmpCsCompsBuf;return this.context.colorFn&&this.context.colorFn(a,0,i,0),this.context.colorSpace.getRgb(i,0)}}const m=function(){const e=[];return function(t){return e[t]||(e[t]=function(e){const t=[];for(let r=0;e>=r;r++){const n=r/e,a=1-n;t.push(new Float32Array([a*a*a,3*n*a*a,3*n*n*a,n*n*n]))}return t}(t)),e[t]}}();class b extends f{static get MIN_SPLIT_PATCH_CHUNKS_AMOUNT(){return(0,n.shadow)(this,"MIN_SPLIT_PATCH_CHUNKS_AMOUNT",3)}static get MAX_SPLIT_PATCH_CHUNKS_AMOUNT(){return(0,n.shadow)(this,"MAX_SPLIT_PATCH_CHUNKS_AMOUNT",20)}static get TRIANGLE_DENSITY(){return(0,n.shadow)(this,"TRIANGLE_DENSITY",20)}constructor(e,t,r,s,o){if(super(),!(e instanceof a.BaseStream))throw new n.FormatError("Mesh data is not a stream");const c=e.dict;this.shadingType=c.get("ShadingType");const f=c.getArray("BBox");this.bbox=Array.isArray(f)&&4===f.length?n.Util.normalizeRect(f):null;const p=i.ColorSpace.parse({cs:c.getRaw("CS")||c.getRaw("ColorSpace"),xref:t,resources:r,pdfFunctionFactory:s,localColorSpaceCache:o});this.background=c.has("Background")?p.getRgb(c.get("Background"),0):null;const m=c.getRaw("Function"),b=m?s.createFromArray(m):null;this.coords=[],this.colors=[],this.figures=[];const y={bitsPerCoordinate:c.get("BitsPerCoordinate"),bitsPerComponent:c.get("BitsPerComponent"),bitsPerFlag:c.get("BitsPerFlag"),decode:c.getArray("Decode"),colorFn:b,colorSpace:p,numComps:b?1:p.numComps},w=new g(e,y);let v=!1;switch(this.shadingType){case l:this._decodeType4Shading(w);break;case h:const e=0|c.get("VerticesPerRow");if(2>e)throw new n.FormatError("Invalid VerticesPerRow");this._decodeType5Shading(w,e);break;case u:this._decodeType6Shading(w),v=!0;break;case d:this._decodeType7Shading(w),v=!0;break;default:(0,n.unreachable)("Unsupported mesh type.")}if(v){this._updateBounds();for(let e=0,t=this.figures.length;t>e;e++)this._buildFigureFromPatch(e)}this._updateBounds(),this._packData()}_decodeType4Shading(e){const t=this.coords,r=this.colors,a=[];let i=0;for(;e.hasData;){const s=e.readFlag(),o=e.readCoordinate(),c=e.readComponents();if(0===i){if(0>s||s>2)throw new n.FormatError("Unknown type4 flag");switch(s){case 0:i=3;break;case 1:a.push(a.at(-2),a.at(-1)),i=1;break;case 2:a.push(a.at(-3),a.at(-1)),i=1}}a.push(t.length),t.push(o),r.push(c),i--,e.align()}this.figures.push({type:"triangles",coords:new Int32Array(a),colors:new Int32Array(a)})}_decodeType5Shading(e,t){const r=this.coords,n=this.colors,a=[];for(;e.hasData;){const t=e.readCoordinate(),i=e.readComponents();a.push(r.length),r.push(t),n.push(i)}this.figures.push({type:"lattice",coords:new Int32Array(a),colors:new Int32Array(a),verticesPerRow:t})}_decodeType6Shading(e){const t=this.coords,r=this.colors,a=new Int32Array(16),i=new Int32Array(4);for(;e.hasData;){const s=e.readFlag();if(0>s||s>3)throw new n.FormatError("Unknown type6 flag");const o=t.length;for(let r=0,n=0!==s?8:12;n>r;r++)t.push(e.readCoordinate());const c=r.length;for(let t=0,n=0!==s?2:4;n>t;t++)r.push(e.readComponents());let l,h,u,d;switch(s){case 0:a[12]=o+3,a[13]=o+4,a[14]=o+5,a[15]=o+6,a[8]=o+2,a[11]=o+7,a[4]=o+1,a[7]=o+8,a[0]=o,a[1]=o+11,a[2]=o+10,a[3]=o+9,i[2]=c+1,i[3]=c+2,i[0]=c,i[1]=c+3;break;case 1:l=a[12],h=a[13],u=a[14],d=a[15],a[12]=d,a[13]=o+0,a[14]=o+1,a[15]=o+2,a[8]=u,a[11]=o+3,a[4]=h,a[7]=o+4,a[0]=l,a[1]=o+7,a[2]=o+6,a[3]=o+5,l=i[2],h=i[3],i[2]=h,i[3]=c,i[0]=l,i[1]=c+1;break;case 2:l=a[15],h=a[11],a[12]=a[3],a[13]=o+0,a[14]=o+1,a[15]=o+2,a[8]=a[7],a[11]=o+3,a[4]=h,a[7]=o+4,a[0]=l,a[1]=o+7,a[2]=o+6,a[3]=o+5,l=i[3],i[2]=i[1],i[3]=c,i[0]=l,i[1]=c+1;break;case 3:a[12]=a[0],a[13]=o+0,a[14]=o+1,a[15]=o+2,a[8]=a[1],a[11]=o+3,a[4]=a[2],a[7]=o+4,a[0]=a[3],a[1]=o+7,a[2]=o+6,a[3]=o+5,i[2]=i[0],i[3]=c,i[0]=i[1],i[1]=c+1}a[5]=t.length,t.push([(-4*t[a[0]][0]-t[a[15]][0]+6*(t[a[4]][0]+t[a[1]][0])-2*(t[a[12]][0]+t[a[3]][0])+3*(t[a[13]][0]+t[a[7]][0]))/9,(-4*t[a[0]][1]-t[a[15]][1]+6*(t[a[4]][1]+t[a[1]][1])-2*(t[a[12]][1]+t[a[3]][1])+3*(t[a[13]][1]+t[a[7]][1]))/9]),a[6]=t.length,t.push([(-4*t[a[3]][0]-t[a[12]][0]+6*(t[a[2]][0]+t[a[7]][0])-2*(t[a[0]][0]+t[a[15]][0])+3*(t[a[4]][0]+t[a[14]][0]))/9,(-4*t[a[3]][1]-t[a[12]][1]+6*(t[a[2]][1]+t[a[7]][1])-2*(t[a[0]][1]+t[a[15]][1])+3*(t[a[4]][1]+t[a[14]][1]))/9]),a[9]=t.length,t.push([(-4*t[a[12]][0]-t[a[3]][0]+6*(t[a[8]][0]+t[a[13]][0])-2*(t[a[0]][0]+t[a[15]][0])+3*(t[a[11]][0]+t[a[1]][0]))/9,(-4*t[a[12]][1]-t[a[3]][1]+6*(t[a[8]][1]+t[a[13]][1])-2*(t[a[0]][1]+t[a[15]][1])+3*(t[a[11]][1]+t[a[1]][1]))/9]),a[10]=t.length,t.push([(-4*t[a[15]][0]-t[a[0]][0]+6*(t[a[11]][0]+t[a[14]][0])-2*(t[a[12]][0]+t[a[3]][0])+3*(t[a[2]][0]+t[a[8]][0]))/9,(-4*t[a[15]][1]-t[a[0]][1]+6*(t[a[11]][1]+t[a[14]][1])-2*(t[a[12]][1]+t[a[3]][1])+3*(t[a[2]][1]+t[a[8]][1]))/9]),this.figures.push({type:"patch",coords:new Int32Array(a),colors:new Int32Array(i)})}}_decodeType7Shading(e){const t=this.coords,r=this.colors,a=new Int32Array(16),i=new Int32Array(4);for(;e.hasData;){const s=e.readFlag();if(0>s||s>3)throw new n.FormatError("Unknown type7 flag");const o=t.length;for(let r=0,n=0!==s?12:16;n>r;r++)t.push(e.readCoordinate());const c=r.length;for(let t=0,n=0!==s?2:4;n>t;t++)r.push(e.readComponents());let l,h,u,d;switch(s){case 0:a[12]=o+3,a[13]=o+4,a[14]=o+5,a[15]=o+6,a[8]=o+2,a[9]=o+13,a[10]=o+14,a[11]=o+7,a[4]=o+1,a[5]=o+12,a[6]=o+15,a[7]=o+8,a[0]=o,a[1]=o+11,a[2]=o+10,a[3]=o+9,i[2]=c+1,i[3]=c+2,i[0]=c,i[1]=c+3;break;case 1:l=a[12],h=a[13],u=a[14],d=a[15],a[12]=d,a[13]=o+0,a[14]=o+1,a[15]=o+2,a[8]=u,a[9]=o+9,a[10]=o+10,a[11]=o+3,a[4]=h,a[5]=o+8,a[6]=o+11,a[7]=o+4,a[0]=l,a[1]=o+7,a[2]=o+6,a[3]=o+5,l=i[2],h=i[3],i[2]=h,i[3]=c,i[0]=l,i[1]=c+1;break;case 2:l=a[15],h=a[11],a[12]=a[3],a[13]=o+0,a[14]=o+1,a[15]=o+2,a[8]=a[7],a[9]=o+9,a[10]=o+10,a[11]=o+3,a[4]=h,a[5]=o+8,a[6]=o+11,a[7]=o+4,a[0]=l,a[1]=o+7,a[2]=o+6,a[3]=o+5,l=i[3],i[2]=i[1],i[3]=c,i[0]=l,i[1]=c+1;break;case 3:a[12]=a[0],a[13]=o+0,a[14]=o+1,a[15]=o+2,a[8]=a[1],a[9]=o+9,a[10]=o+10,a[11]=o+3,a[4]=a[2],a[5]=o+8,a[6]=o+11,a[7]=o+4,a[0]=a[3],a[1]=o+7,a[2]=o+6,a[3]=o+5,i[2]=i[0],i[3]=c,i[0]=i[1],i[1]=c+1}this.figures.push({type:"patch",coords:new Int32Array(a),colors:new Int32Array(i)})}}_buildFigureFromPatch(e){const t=this.figures[e];(0,n.assert)("patch"===t.type,"Unexpected patch mesh figure");const r=this.coords,a=this.colors,i=t.coords,s=t.colors,o=Math.min(r[i[0]][0],r[i[3]][0],r[i[12]][0],r[i[15]][0]),c=Math.min(r[i[0]][1],r[i[3]][1],r[i[12]][1],r[i[15]][1]),l=Math.max(r[i[0]][0],r[i[3]][0],r[i[12]][0],r[i[15]][0]),h=Math.max(r[i[0]][1],r[i[3]][1],r[i[12]][1],r[i[15]][1]);let u=Math.ceil((l-o)*b.TRIANGLE_DENSITY/(this.bounds[2]-this.bounds[0]));u=Math.max(b.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(b.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,u));let d=Math.ceil((h-c)*b.TRIANGLE_DENSITY/(this.bounds[3]-this.bounds[1]));d=Math.max(b.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(b.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,d));const f=u+1,p=new Int32Array((d+1)*f),g=new Int32Array((d+1)*f);let y=0;const w=new Uint8Array(3),v=new Uint8Array(3),S=a[s[0]],x=a[s[1]],A=a[s[2]],k=a[s[3]],C=m(d),_=m(u);for(let e=0;d>=e;e++){w[0]=(S[0]*(d-e)+A[0]*e)/d|0,w[1]=(S[1]*(d-e)+A[1]*e)/d|0,w[2]=(S[2]*(d-e)+A[2]*e)/d|0,v[0]=(x[0]*(d-e)+k[0]*e)/d|0,v[1]=(x[1]*(d-e)+k[1]*e)/d|0,v[2]=(x[2]*(d-e)+k[2]*e)/d|0;for(let t=0;u>=t;t++,y++){if(!(0!==e&&e!==d||0!==t&&t!==u))continue;let n=0,s=0,o=0;for(let a=0;3>=a;a++)for(let c=0;3>=c;c++,o++){const l=C[e][a]*_[t][c];n+=r[i[o]][0]*l,s+=r[i[o]][1]*l}p[y]=r.length,r.push([n,s]),g[y]=a.length;const c=new Uint8Array(3);c[0]=(w[0]*(u-t)+v[0]*t)/u|0,c[1]=(w[1]*(u-t)+v[1]*t)/u|0,c[2]=(w[2]*(u-t)+v[2]*t)/u|0,a.push(c)}}p[0]=i[0],g[0]=s[0],p[u]=i[3],g[u]=s[1],p[f*d]=i[12],g[f*d]=s[2],p[f*d+u]=i[15],g[f*d+u]=s[3],this.figures[e]={type:"lattice",coords:p,colors:g,verticesPerRow:f}}_updateBounds(){let e=this.coords[0][0],t=this.coords[0][1],r=e,n=t;for(let a=1,i=this.coords.length;i>a;a++){const i=this.coords[a][0],s=this.coords[a][1];e=e>i?i:e,t=t>s?s:t,r=i>r?i:r,n=s>n?s:n}this.bounds=[e,t,r,n]}_packData(){let e,t,r,n;const a=this.coords,i=new Float32Array(2*a.length);for(e=0,r=0,t=a.length;t>e;e++){const t=a[e];i[r++]=t[0],i[r++]=t[1]}this.coords=i;const s=this.colors,o=new Uint8Array(3*s.length);for(e=0,r=0,t=s.length;t>e;e++){const t=s[e];o[r++]=t[0],o[r++]=t[1],o[r++]=t[2]}this.colors=o;const c=this.figures;for(e=0,t=c.length;t>e;e++){const t=c[e],a=t.coords,i=t.colors;for(r=0,n=a.length;n>r;r++)a[r]*=2,i[r]*=3}}getIR(){return["Mesh",this.shadingType,this.coords,this.colors,this.figures,this.bounds,this.bbox,this.background]}}class y extends f{getIR(){return["Dummy"]}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getXfaFontDict=function(e){const t=function(e){const t=d(e);if(!t)return null;const{baseWidths:r,baseMapping:n,factors:a}=t;let i;i=a?r.map(((e,t)=>e*a[t])):r;let s,o=-2;const c=[];for(const[e,t]of n.map(((e,t)=>[e,t])).sort((([e],[t])=>e-t)))-1!==e&&(e===o+1?(s.push(i[t]),o+=1):(o=e,s=[i[t]],c.push(e,s)));return c}(e),r=new a.Dict(null);r.set("BaseFont",a.Name.get(e)),r.set("Type",a.Name.get("Font")),r.set("Subtype",a.Name.get("CIDFontType2")),r.set("Encoding",a.Name.get("Identity-H")),r.set("CIDToGIDMap",a.Name.get("Identity")),r.set("W",t),r.set("FirstChar",t[0]),r.set("LastChar",t.at(-2)+t.at(-1).length-1);const n=new a.Dict(null);r.set("FontDescriptor",n);const i=new a.Dict(null);return i.set("Ordering","Identity"),i.set("Registry","Adobe"),i.set("Supplement",0),r.set("CIDSystemInfo",i),r},t.getXfaFontName=d;var n=r(52),a=r(5),i=r(53),s=r(54),o=r(55),c=r(56),l=r(6),h=r(38);const u=(0,l.getLookupTableFactory)((function(e){e["MyriadPro-Regular"]=e["PdfJS-Fallback-Regular"]={name:"LiberationSans-Regular",factors:o.MyriadProRegularFactors,baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping,metrics:o.MyriadProRegularMetrics},e["MyriadPro-Bold"]=e["PdfJS-Fallback-Bold"]={name:"LiberationSans-Bold",factors:o.MyriadProBoldFactors,baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping,metrics:o.MyriadProBoldMetrics},e["MyriadPro-It"]=e["MyriadPro-Italic"]=e["PdfJS-Fallback-Italic"]={name:"LiberationSans-Italic",factors:o.MyriadProItalicFactors,baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping,metrics:o.MyriadProItalicMetrics},e["MyriadPro-BoldIt"]=e["MyriadPro-BoldItalic"]=e["PdfJS-Fallback-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:o.MyriadProBoldItalicFactors,baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping,metrics:o.MyriadProBoldItalicMetrics},e.ArialMT=e.Arial=e["Arial-Regular"]={name:"LiberationSans-Regular",baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping},e["Arial-BoldMT"]=e["Arial-Bold"]={name:"LiberationSans-Bold",baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping},e["Arial-ItalicMT"]=e["Arial-Italic"]={name:"LiberationSans-Italic",baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping},e["Arial-BoldItalicMT"]=e["Arial-BoldItalic"]={name:"LiberationSans-BoldItalic",baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping},e["Calibri-Regular"]={name:"LiberationSans-Regular",factors:n.CalibriRegularFactors,baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping,metrics:n.CalibriRegularMetrics},e["Calibri-Bold"]={name:"LiberationSans-Bold",factors:n.CalibriBoldFactors,baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping,metrics:n.CalibriBoldMetrics},e["Calibri-Italic"]={name:"LiberationSans-Italic",factors:n.CalibriItalicFactors,baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping,metrics:n.CalibriItalicMetrics},e["Calibri-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:n.CalibriBoldItalicFactors,baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping,metrics:n.CalibriBoldItalicMetrics},e["Segoeui-Regular"]={name:"LiberationSans-Regular",factors:c.SegoeuiRegularFactors,baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping,metrics:c.SegoeuiRegularMetrics},e["Segoeui-Bold"]={name:"LiberationSans-Bold",factors:c.SegoeuiBoldFactors,baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping,metrics:c.SegoeuiBoldMetrics},e["Segoeui-Italic"]={name:"LiberationSans-Italic",factors:c.SegoeuiItalicFactors,baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping,metrics:c.SegoeuiItalicMetrics},e["Segoeui-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:c.SegoeuiBoldItalicFactors,baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping,metrics:c.SegoeuiBoldItalicMetrics},e["Helvetica-Regular"]=e.Helvetica={name:"LiberationSans-Regular",factors:i.HelveticaRegularFactors,baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping,metrics:i.HelveticaRegularMetrics},e["Helvetica-Bold"]={name:"LiberationSans-Bold",factors:i.HelveticaBoldFactors,baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping,metrics:i.HelveticaBoldMetrics},e["Helvetica-Italic"]={name:"LiberationSans-Italic",factors:i.HelveticaItalicFactors,baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping,metrics:i.HelveticaItalicMetrics},e["Helvetica-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:i.HelveticaBoldItalicFactors,baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping,metrics:i.HelveticaBoldItalicMetrics}}));function d(e){const t=(0,h.normalizeFontName)(e);return u()[t]}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CalibriRegularMetrics=t.CalibriRegularFactors=t.CalibriItalicMetrics=t.CalibriItalicFactors=t.CalibriBoldMetrics=t.CalibriBoldItalicMetrics=t.CalibriBoldItalicFactors=t.CalibriBoldFactors=void 0,t.CalibriBoldFactors=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.54657,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.73293,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.9121,.86943,.79795,.88198,.77958,.70864,.81055,.90399,.88653,.96017,.82577,.77892,.78257,.97507,1.54657,.97507,.85284,.89552,.90176,.88762,.8785,.75241,.8785,.90518,.95015,.77618,.8785,.88401,.91916,.86304,.88401,.91488,.8785,.8801,.8785,.8785,.91343,.7173,1.04106,.8785,.85075,.95794,.82616,.85162,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.12401,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.73293,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.9121,.86943,.86943,.86943,.86943,.86943,.85284,.87508,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.88762,.88762,.88762,.88762,.88762,.88762,.8715,.75241,.90518,.90518,.90518,.90518,.88401,.88401,.88401,.88401,.8785,.8785,.8801,.8801,.8801,.8801,.8801,.90747,.89049,.8785,.8785,.8785,.8785,.85162,.8785,.85162,.83908,.88762,.83908,.88762,.83908,.88762,.73293,.75241,.73293,.75241,.73293,.75241,.73293,.75241,.87289,.83016,.88506,.93125,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.81921,.77618,.81921,.77618,.81921,.77618,1,1,.87356,.8785,.91075,.89608,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76229,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.79468,.91926,.88175,.70823,.94903,.9121,.8785,1,1,.9121,.8785,.87802,.88656,.8785,.86943,.8801,.86943,.8801,.86943,.8801,.87402,.89291,.77958,.91343,1,1,.77958,.91343,.70864,.7173,.70864,.7173,.70864,.7173,.70864,.7173,1,1,.81055,.75841,.81055,1.06452,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.96017,.95794,.77892,.85162,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.88762,.77539,.8715,.87508,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70674,.98387,.94721,1.33431,1.45894,.95161,1.06303,.83908,.80352,.57184,.6965,.56289,.82001,.56029,.81235,1.02988,.83908,.7762,.68156,.80367,.73133,.78257,.87356,.86943,.95958,.75727,.89019,1.04924,.9121,.7648,.86943,.87356,.79795,.78275,.81055,.77892,.9762,.82577,.99819,.84896,.95958,.77892,.96108,1.01407,.89049,1.02988,.94211,.96108,.8936,.84021,.87842,.96399,.79109,.89049,1.00813,1.02988,.86077,.87445,.92099,.84723,.86513,.8801,.75638,.85714,.78216,.79586,.87965,.94211,.97747,.78287,.97926,.84971,1.02988,.94211,.8801,.94211,.84971,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90264,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.90518,1,1,1,1,1,1,1,1,1,1,1,1,.90548,1,1,1,1,1,1,.96017,.95794,.96017,.95794,.96017,.95794,.77892,.85162,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.92794,.87012,.87012,.87012,.89552,.89552,1.42259,.71143,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.93835,.83406,.91133,.84107,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90527,1.81055,.90527,1.81055,1.31006,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],t.CalibriBoldMetrics={lineHeight:1.2207,lineGap:.2207},t.CalibriBoldItalicFactors=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.56239,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.71805,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.90872,.85938,.79795,.87068,.77958,.69766,.81055,.90399,.88653,.96068,.82577,.77892,.78257,.97507,1.529,.97507,.85284,.89552,.90176,.94908,.86411,.74012,.86411,.88323,.95015,.86411,.86331,.88401,.91916,.86304,.88401,.9039,.86331,.86331,.86411,.86411,.90464,.70852,1.04106,.86331,.84372,.95794,.82616,.84548,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.19129,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.71805,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.90872,.85938,.85938,.85938,.85938,.85938,.85284,.87068,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.94908,.94908,.94908,.94908,.94908,.94908,.85887,.74012,.88323,.88323,.88323,.88323,.88401,.88401,.88401,.88401,.8785,.86331,.86331,.86331,.86331,.86331,.86331,.90747,.89049,.86331,.86331,.86331,.86331,.84548,.86411,.84548,.83908,.94908,.83908,.94908,.83908,.94908,.71805,.74012,.71805,.74012,.71805,.74012,.71805,.74012,.87289,.79538,.88506,.92726,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.81921,.86411,.81921,.86411,.81921,.86411,1,1,.87356,.86331,.91075,.8777,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76467,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.77312,.91926,.88175,.70823,.94903,.90872,.86331,1,1,.90872,.86331,.86906,.88116,.86331,.85938,.86331,.85938,.86331,.85938,.86331,.87402,.86549,.77958,.90464,1,1,.77958,.90464,.69766,.70852,.69766,.70852,.69766,.70852,.69766,.70852,1,1,.81055,.75841,.81055,1.06452,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.96068,.95794,.77892,.84548,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.94908,.77539,.85887,.87068,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70088,.98387,.94721,1.33431,1.45894,.95161,1.48387,.83908,.80352,.57118,.6965,.56347,.79179,.55853,.80346,1.02988,.83908,.7762,.67174,.86036,.73133,.78257,.87356,.86441,.95958,.75727,.89019,1.04924,.90872,.74889,.85938,.87891,.79795,.7957,.81055,.77892,.97447,.82577,.97466,.87179,.95958,.77892,.94252,.95612,.8753,1.02988,.92733,.94252,.87411,.84021,.8728,.95612,.74081,.8753,1.02189,1.02988,.84814,.87445,.91822,.84723,.85668,.86331,.81344,.87581,.76422,.82046,.96057,.92733,.99375,.78022,.95452,.86015,1.02988,.92733,.86331,.92733,.86015,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90631,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.88323,1,1,1,1,1,1,1,1,1,1,1,1,.85174,1,1,1,1,1,1,.96068,.95794,.96068,.95794,.96068,.95794,.77892,.84548,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.89807,.87012,.87012,.87012,.89552,.89552,1.42259,.71094,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.92972,.83406,.91133,.83326,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90616,1.81055,.90527,1.81055,1.3107,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],t.CalibriBoldItalicMetrics={lineHeight:1.2207,lineGap:.2207},t.CalibriItalicFactors=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39543,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.72346,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89249,.84118,.77452,.85374,.75186,.67789,.79776,.88844,.85066,.94309,.77818,.7306,.76659,1.10369,1.38313,1.10369,1.06139,.89552,.8739,.9245,.9245,.83203,.9245,.85865,1.09842,.9245,.9245,1.03297,1.07692,.90918,1.03297,.94959,.9245,.92274,.9245,.9245,1.02933,.77832,1.20562,.9245,.8916,.98986,.86621,.89453,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.16359,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.72346,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89249,.84118,.84118,.84118,.84118,.84118,.85284,.84557,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.9245,.9245,.9245,.9245,.9245,.9245,.84843,.83203,.85865,.85865,.85865,.85865,.82601,.82601,.82601,.82601,.94469,.9245,.92274,.92274,.92274,.92274,.92274,.90747,.86651,.9245,.9245,.9245,.9245,.89453,.9245,.89453,.8675,.9245,.8675,.9245,.8675,.9245,.72346,.83203,.72346,.83203,.72346,.83203,.72346,.83203,.85193,.8875,.86477,.99034,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.81105,.9245,.81105,.9245,.81105,.9245,1,1,.86275,.9245,.90872,.93591,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77896,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.9375,.98156,.93407,.77261,1.11429,.89249,.9245,1,1,.89249,.9245,.92534,.86698,.9245,.84118,.92274,.84118,.92274,.84118,.92274,.8667,.86291,.75186,1.02933,1,1,.75186,1.02933,.67789,.77832,.67789,.77832,.67789,.77832,.67789,.77832,1,1,.79776,.97655,.79776,1.23023,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.94309,.98986,.7306,.89453,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.9245,.76318,.84843,.84557,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67009,.96334,.93695,1.35191,1.40909,.95161,1.48387,.8675,.90861,.6192,.7363,.64824,.82411,.56321,.85696,1.23516,.8675,.81552,.7286,.84134,.73206,.76659,.86275,.84369,.90685,.77892,.85871,1.02638,.89249,.75828,.84118,.85984,.77452,.76466,.79776,.7306,.90782,.77818,.903,.87291,.90685,.7306,.99058,1.03667,.94635,1.23516,.9849,.99058,.92393,.8916,.942,1.03667,.75026,.94635,1.0297,1.23516,.90918,.94048,.98217,.89746,.84153,.92274,.82507,.88832,.84438,.88178,1.03525,.9849,1.00225,.78086,.97248,.89404,1.23516,.9849,.92274,.9849,.89404,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.89693,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.85865,1,1,1,1,1,1,1,1,1,1,1,1,.90933,1,1,1,1,1,1,.94309,.98986,.94309,.98986,.94309,.98986,.7306,.89453,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.68994,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.97858,.82616,.91133,.83437,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90572,1.81055,.90749,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85284,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],t.CalibriItalicMetrics={lineHeight:1.2207,lineGap:.2207},t.CalibriRegularFactors=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39016,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.73834,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89385,.85122,.77452,.86503,.75186,.68887,.79776,.88844,.85066,.94258,.77818,.7306,.76659,1.10369,1.39016,1.10369,1.06139,.89552,.8739,.86128,.94469,.8457,.94469,.89464,1.09842,.84636,.94469,1.03297,1.07692,.90918,1.03297,.95897,.94469,.9482,.94469,.94469,1.04692,.78223,1.20562,.94469,.90332,.98986,.86621,.90527,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.08707,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.73834,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89385,.85122,.85122,.85122,.85122,.85122,.85284,.85311,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.86128,.86128,.86128,.86128,.86128,.86128,.8693,.8457,.89464,.89464,.89464,.89464,.82601,.82601,.82601,.82601,.94469,.94469,.9482,.9482,.9482,.9482,.9482,.90747,.86651,.94469,.94469,.94469,.94469,.90527,.94469,.90527,.8675,.86128,.8675,.86128,.8675,.86128,.73834,.8457,.73834,.8457,.73834,.8457,.73834,.8457,.85193,.92454,.86477,.9921,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.81105,.84636,.81105,.84636,.81105,.84636,1,1,.86275,.94469,.90872,.95786,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77741,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.90452,.98156,1.11842,.77261,1.11429,.89385,.94469,1,1,.89385,.94469,.95877,.86901,.94469,.85122,.9482,.85122,.9482,.85122,.9482,.8667,.90016,.75186,1.04692,1,1,.75186,1.04692,.68887,.78223,.68887,.78223,.68887,.78223,.68887,.78223,1,1,.79776,.92188,.79776,1.23023,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.94258,.98986,.7306,.90527,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.86128,.76318,.8693,.85311,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67742,.96334,.93695,1.35191,1.40909,.95161,1.48387,.86686,.90861,.62267,.74359,.65649,.85498,.56963,.88254,1.23516,.8675,.81552,.75443,.84503,.73206,.76659,.86275,.85122,.90685,.77892,.85746,1.02638,.89385,.75657,.85122,.86275,.77452,.74171,.79776,.7306,.95165,.77818,.89772,.88831,.90685,.7306,.98142,1.02191,.96576,1.23516,.99018,.98142,.9236,.89258,.94035,1.02191,.78848,.96576,.9561,1.23516,.90918,.92578,.95424,.89746,.83969,.9482,.80113,.89442,.85208,.86155,.98022,.99018,1.00452,.81209,.99247,.89181,1.23516,.99018,.9482,.99018,.89181,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.88844,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.89464,1,1,1,1,1,1,1,1,1,1,1,1,.96766,1,1,1,1,1,1,.94258,.98986,.94258,.98986,.94258,.98986,.7306,.90527,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.69043,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.99331,.82616,.91133,.84286,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90527,1.81055,.90527,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1.07185,.99413,.96334,1.08065,1,1,1,1,1,1,1,1,1,1,1],t.CalibriRegularMetrics={lineHeight:1.2207,lineGap:.2207}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HelveticaRegularMetrics=t.HelveticaRegularFactors=t.HelveticaItalicMetrics=t.HelveticaItalicFactors=t.HelveticaBoldMetrics=t.HelveticaBoldItalicMetrics=t.HelveticaBoldItalicFactors=t.HelveticaBoldFactors=void 0,t.HelveticaBoldFactors=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.03374,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.00042,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.03828,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00034,.99977,1,.99997,1.00026,1.00078,1.00036,.99973,1.00013,1.0006,.99977,.99977,.99988,.85148,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,1.00069,1.00022,.99977,1.00001,.99984,1.00026,1.00001,1.00024,1.00001,.9999,1,1.0006,1.00001,1.00041,.99962,1.00026,1.0006,.99995,1.00041,.99942,.99973,.99927,1.00082,.99902,1.00026,1.00087,1.0006,1.00069,.99973,.99867,.99973,.9993,1.00026,1.00049,1.00056,1,.99988,.99935,.99995,.99954,1.00055,.99945,1.00032,1.0006,.99995,1.00026,.99995,1.00032,1.00001,1.00008,.99971,1.00019,.9994,1.00001,1.0006,1.00044,.99973,1.00023,1.00047,1,.99942,.99561,.99989,1.00035,.99977,1.00035,.99977,1.00019,.99944,1.00001,1.00021,.99926,1.00035,1.00035,.99942,1.00048,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.99989,1.00057,1.00001,.99936,1.00052,1.00012,.99996,1.00043,1,1.00035,.9994,.99976,1.00035,.99973,1.00052,1.00041,1.00119,1.00037,.99973,1.00002,.99986,1.00041,1.00041,.99902,.9996,1.00034,.99999,1.00026,.99999,1.00026,.99973,1.00052,.99973,1,.99973,1.00041,1.00075,.9994,1.0003,.99999,1,1.00041,.99955,1,.99915,.99973,.99973,1.00026,1.00119,.99955,.99973,1.0006,.99911,1.0006,1.00026,.99972,1.00026,.99902,1.00041,.99973,.99999,1,1,1.00038,1.0005,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,1.00047,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],t.HelveticaBoldMetrics={lineHeight:1.2,lineGap:.2},t.HelveticaBoldItalicFactors=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.0044,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99971,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.01011,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99977,1,1,1.00026,.99969,.99972,.99981,.9998,1.0006,.99977,.99977,1.00022,.91155,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,.99966,1.00022,1.00032,1.00001,.99944,1.00026,1.00001,.99968,1.00001,1.00047,1,1.0006,1.00001,.99981,1.00101,1.00026,1.0006,.99948,.99981,1.00064,.99973,.99942,1.00101,1.00061,1.00026,1.00069,1.0006,1.00014,.99973,1.01322,.99973,1.00065,1.00026,1.00012,.99923,1,1.00064,1.00076,.99948,1.00055,1.00063,1.00007,.99943,1.0006,.99948,1.00026,.99948,.99943,1.00001,1.00001,1.00029,1.00038,1.00035,1.00001,1.0006,1.0006,.99973,.99978,1.00001,1.00057,.99989,.99967,.99964,.99967,.99977,.99999,.99977,1.00038,.99977,1.00001,.99973,1.00066,.99967,.99967,1.00041,.99998,.99999,.99977,1.00022,.99967,1.00001,.99977,1.00026,.99964,1.00031,1.00001,.99999,.99999,1,1.00023,1,1,.99999,1.00035,1.00001,.99999,.99973,.99977,.99999,1.00058,.99973,.99973,.99955,.9995,1.00026,1.00026,1.00032,.99989,1.00034,.99999,1.00026,1.00026,1.00026,.99973,.45998,.99973,1.00026,.99973,1.00001,.99999,.99982,.99994,.99996,1,1.00042,1.00044,1.00029,1.00023,.99973,.99973,1.00026,.99949,1.00002,.99973,1.0006,1.0006,1.0006,.99975,1.00026,1.00026,1.00032,.98685,.99973,1.00026,1,1,.99966,1.00044,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1,.99973,.99971,.99978,1,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00098,1,1,1,1.00049,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],t.HelveticaBoldItalicMetrics={lineHeight:1.35,lineGap:.2},t.HelveticaItalicFactors=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.0288,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,.99946,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.06311,.99973,1.00024,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,1.00041,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.89547,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00001,1,1.00054,.99977,1.00084,1.00007,.99973,1.00013,.99924,1.00001,1.00001,.99945,.91221,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00001,.99999,.99977,.99933,1.00022,1.00054,1.00001,1.00065,1.00026,1.00001,1.0001,1.00001,1.00052,1,1.0006,1.00001,.99945,.99897,.99968,.99924,1.00036,.99945,.99949,1,1.0006,.99897,.99918,.99968,.99911,.99924,1,.99962,1.01487,1,1.0005,.99973,1.00012,1.00043,1,.99995,.99994,1.00036,.99947,1.00019,1.00063,1.00025,.99924,1.00036,.99973,1.00036,1.00025,1.00001,1.00001,1.00027,1.0001,1.00068,1.00001,1.0006,1.0006,1,1.00008,.99957,.99972,.9994,.99954,.99975,1.00051,1.00001,1.00019,1.00001,1.0001,.99986,1.00001,1.00001,1.00038,.99954,.99954,.9994,1.00066,.99999,.99977,1.00022,1.00054,1.00001,.99977,1.00026,.99975,1.0001,1.00001,.99993,.9995,.99955,1.00016,.99978,.99974,1.00019,1.00022,.99955,1.00053,.99973,1.00089,1.00005,.99967,1.00048,.99973,1.00002,1.00034,.99973,.99973,.99964,1.00006,1.00066,.99947,.99973,.98894,.99973,1,.44898,1,.99946,1,1.00039,1.00082,.99991,.99991,.99985,1.00022,1.00023,1.00061,1.00006,.99966,.99973,.99973,.99973,1.00019,1.0008,1,.99924,.99924,.99924,.99983,1.00044,.99973,.99964,.98332,1,.99973,1,1,.99962,.99895,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,1.00423,.99925,.99999,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00049,1,1.00245,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,1.00003,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],t.HelveticaItalicMetrics={lineHeight:1.35,lineGap:.2},t.HelveticaRegularFactors=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.04596,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,1.00019,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.02572,.99973,1.00005,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,.99999,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.84533,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99928,1,.99977,1.00013,1.00055,.99947,.99945,.99941,.99924,1.00001,1.00001,1.0004,.91621,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00005,.99999,.99977,1.00015,1.00022,.99977,1.00001,.99973,1.00026,1.00001,1.00019,1.00001,.99946,1,1.0006,1.00001,.99978,1.00045,.99973,.99924,1.00023,.99978,.99966,1,1.00065,1.00045,1.00019,.99973,.99973,.99924,1,1,.96499,1,1.00055,.99973,1.00008,1.00027,1,.9997,.99995,1.00023,.99933,1.00019,1.00015,1.00031,.99924,1.00023,.99973,1.00023,1.00031,1.00001,.99928,1.00029,1.00092,1.00035,1.00001,1.0006,1.0006,1,.99988,.99975,1,1.00082,.99561,.9996,1.00035,1.00001,.99962,1.00001,1.00092,.99964,1.00001,.99963,.99999,1.00035,1.00035,1.00082,.99962,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.9996,.99967,1.00001,1.00034,1.00074,1.00054,1.00053,1.00063,.99971,.99962,1.00035,.99975,.99977,.99973,1.00043,.99953,1.0007,.99915,.99973,1.00008,.99892,1.00073,1.00073,1.00114,.99915,1.00073,.99955,.99973,1.00092,.99973,1,.99998,1,1.0003,1,1.00043,1.00001,.99969,1.0003,1,1.00035,1.00001,.9995,1,1.00092,.99973,.99973,.99973,1.0007,.9995,1,.99924,1.0006,.99924,.99972,1.00062,.99973,1.00114,1.00073,1,.99955,1,1,1.00047,.99968,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,.99925,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],t.HelveticaRegularMetrics={lineHeight:1.2,lineGap:.2}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LiberationSansRegularWidths=t.LiberationSansRegularMapping=t.LiberationSansItalicWidths=t.LiberationSansItalicMapping=t.LiberationSansBoldWidths=t.LiberationSansBoldMapping=t.LiberationSansBoldItalicWidths=t.LiberationSansBoldItalicMapping=void 0,t.LiberationSansBoldWidths=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,719,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,785,556,556,278,722,556,556,611,278,611,278,611,385,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,465,722,333,853,906,474,825,927,838,278,722,722,601,719,667,611,722,778,278,722,667,833,722,644,778,722,667,600,611,667,821,667,809,802,278,667,615,451,611,278,582,615,610,556,606,475,460,611,541,278,558,556,612,556,445,611,766,619,520,684,446,582,715,576,753,845,278,582,611,582,845,667,669,885,567,711,667,278,276,556,1094,1062,875,610,722,622,719,722,719,722,567,712,667,904,626,719,719,610,702,833,722,778,719,667,722,611,622,854,667,730,703,1005,1019,870,979,719,711,1031,719,556,618,615,417,635,556,709,497,615,615,500,635,740,604,611,604,611,556,490,556,875,556,615,581,833,844,729,854,615,552,854,583,556,556,611,417,552,556,278,281,278,969,906,611,500,615,556,604,778,611,487,447,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1094,556,885,489,1115,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],t.LiberationSansBoldMapping=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],t.LiberationSansBoldItalicWidths=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,740,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,782,556,556,278,722,556,556,611,278,611,278,611,396,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,333,722,333,854,906,473,844,930,847,278,722,722,610,671,667,611,722,778,278,722,667,833,722,657,778,718,667,590,611,667,822,667,829,781,278,667,620,479,611,278,591,620,621,556,610,479,492,611,558,278,566,556,603,556,450,611,712,605,532,664,409,591,704,578,773,834,278,591,611,591,834,667,667,886,614,719,667,278,278,556,1094,1042,854,622,719,677,719,722,708,722,614,722,667,927,643,719,719,615,687,833,722,778,719,667,722,611,677,781,667,729,708,979,989,854,1e3,708,719,1042,729,556,619,604,534,618,556,736,510,611,611,507,622,740,604,611,611,611,556,889,556,885,556,646,583,889,935,707,854,594,552,865,589,556,556,611,469,563,556,278,278,278,969,906,611,507,619,556,611,778,611,575,467,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1104,556,885,516,1146,1e3,768,600,834,834,834,834,999,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],t.LiberationSansBoldItalicMapping=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],t.LiberationSansItalicWidths=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,625,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,733,444,500,222,667,500,500,556,222,556,222,556,281,556,400,556,222,722,556,722,556,722,556,615,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,354,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,789,846,389,794,865,775,222,667,667,570,671,667,611,722,778,278,667,667,833,722,648,778,725,667,600,611,667,837,667,831,761,278,667,570,439,555,222,550,570,571,500,556,439,463,555,542,222,500,492,548,500,447,556,670,573,486,603,374,550,652,546,728,779,222,550,556,550,779,667,667,843,544,708,667,278,278,500,1066,982,844,589,715,639,724,667,651,667,544,704,667,917,614,715,715,589,686,833,722,778,725,667,722,611,639,795,667,727,673,920,923,805,886,651,694,1022,682,556,562,522,493,553,556,688,465,556,556,472,564,686,550,556,556,556,500,833,500,835,500,572,518,830,851,621,736,526,492,752,534,556,556,556,378,496,500,222,222,222,910,828,556,472,565,500,556,778,556,492,339,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1083,1e3,768,600,834,834,834,834,1e3,500,998,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,584,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],t.LiberationSansItalicMapping=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],t.LiberationSansRegularWidths=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,615,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,735,444,500,222,667,500,500,556,222,556,222,556,292,556,334,556,222,722,556,722,556,722,556,604,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,375,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,784,838,384,774,855,752,222,667,667,551,668,667,611,722,778,278,667,668,833,722,650,778,722,667,618,611,667,798,667,835,748,278,667,578,446,556,222,547,578,575,500,557,446,441,556,556,222,500,500,576,500,448,556,690,569,482,617,395,547,648,525,713,781,222,547,556,547,781,667,667,865,542,719,667,278,278,500,1057,1010,854,583,722,635,719,667,656,667,542,677,667,923,604,719,719,583,656,833,722,778,719,667,722,611,635,760,667,740,667,917,938,792,885,656,719,1010,722,556,573,531,365,583,556,669,458,559,559,438,583,688,552,556,542,556,500,458,500,823,500,573,521,802,823,625,719,521,510,750,542,556,556,556,365,510,500,222,278,222,906,812,556,438,559,500,552,778,556,489,411,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1073,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],t.LiberationSansRegularMapping=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MyriadProRegularMetrics=t.MyriadProRegularFactors=t.MyriadProItalicMetrics=t.MyriadProItalicFactors=t.MyriadProBoldMetrics=t.MyriadProBoldItalicMetrics=t.MyriadProBoldItalicFactors=t.MyriadProBoldFactors=void 0,t.MyriadProBoldFactors=[1.36898,1,1,.72706,.80479,.83734,.98894,.99793,.9897,.93884,.86209,.94292,.94292,1.16661,1.02058,.93582,.96694,.93582,1.19137,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.78076,.78076,1.02058,1.02058,1.02058,.72851,.78966,.90838,.83637,.82391,.96376,.80061,.86275,.8768,.95407,1.0258,.73901,.85022,.83655,1.0156,.95546,.92179,.87107,.92179,.82114,.8096,.89713,.94438,.95353,.94083,.91905,.90406,.9446,.94292,1.18777,.94292,1.02058,.89903,.90088,.94938,.97898,.81093,.97571,.94938,1.024,.9577,.95933,.98621,1.0474,.97455,.98981,.9672,.95933,.9446,.97898,.97407,.97646,.78036,1.10208,.95442,.95298,.97579,.9332,.94039,.938,.80687,1.01149,.80687,1.02058,.80479,.99793,.99793,.99793,.99793,1.01149,1.00872,.90088,.91882,1.0213,.8361,1.02058,.62295,.54324,.89022,1.08595,1,1,.90088,1,.97455,.93582,.90088,1,1.05686,.8361,.99642,.99642,.99642,.72851,.90838,.90838,.90838,.90838,.90838,.90838,.868,.82391,.80061,.80061,.80061,.80061,1.0258,1.0258,1.0258,1.0258,.97484,.95546,.92179,.92179,.92179,.92179,.92179,1.02058,.92179,.94438,.94438,.94438,.94438,.90406,.86958,.98225,.94938,.94938,.94938,.94938,.94938,.94938,.9031,.81093,.94938,.94938,.94938,.94938,.98621,.98621,.98621,.98621,.93969,.95933,.9446,.9446,.9446,.9446,.9446,1.08595,.9446,.95442,.95442,.95442,.95442,.94039,.97898,.94039,.90838,.94938,.90838,.94938,.90838,.94938,.82391,.81093,.82391,.81093,.82391,.81093,.82391,.81093,.96376,.84313,.97484,.97571,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.8768,.9577,.8768,.9577,.8768,.9577,1,1,.95407,.95933,.97069,.95933,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,.887,1.01591,.73901,1.0474,1,1,.97455,.83655,.98981,1,1,.83655,.73977,.83655,.73903,.84638,1.033,.95546,.95933,1,1,.95546,.95933,.8271,.95417,.95933,.92179,.9446,.92179,.9446,.92179,.9446,.936,.91964,.82114,.97646,1,1,.82114,.97646,.8096,.78036,.8096,.78036,1,1,.8096,.78036,1,1,.89713,.77452,.89713,1.10208,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94083,.97579,.90406,.94039,.90406,.9446,.938,.9446,.938,.9446,.938,1,.99793,.90838,.94938,.868,.9031,.92179,.9446,1,1,.89713,1.10208,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90989,.9358,.91945,.83181,.75261,.87992,.82976,.96034,.83689,.97268,1.0078,.90838,.83637,.8019,.90157,.80061,.9446,.95407,.92436,1.0258,.85022,.97153,1.0156,.95546,.89192,.92179,.92361,.87107,.96318,.89713,.93704,.95638,.91905,.91709,.92796,1.0258,.93704,.94836,1.0373,.95933,1.0078,.95871,.94836,.96174,.92601,.9498,.98607,.95776,.95933,1.05453,1.0078,.98275,.9314,.95617,.91701,1.05993,.9446,.78367,.9553,1,.86832,1.0128,.95871,.99394,.87548,.96361,.86774,1.0078,.95871,.9446,.95871,.86774,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.94083,.97579,.94083,.97579,.94083,.97579,.90406,.94039,.96694,1,.89903,1,1,1,.93582,.93582,.93582,1,.908,.908,.918,.94219,.94219,.96544,1,1.285,1,1,.81079,.81079,1,1,.74854,1,1,1,1,.99793,1,1,1,.65,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.17173,1,.80535,.76169,1.02058,1.0732,1.05486,1,1,1.30692,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.16161,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],t.MyriadProBoldMetrics={lineHeight:1.2,lineGap:.2},t.MyriadProBoldItalicFactors=[1.36898,1,1,.66227,.80779,.81625,.97276,.97276,.97733,.92222,.83266,.94292,.94292,1.16148,1.02058,.93582,.96694,.93582,1.17337,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.78076,.78076,1.02058,1.02058,1.02058,.71541,.76813,.85576,.80591,.80729,.94299,.77512,.83655,.86523,.92222,.98621,.71743,.81698,.79726,.98558,.92222,.90637,.83809,.90637,.80729,.76463,.86275,.90699,.91605,.9154,.85308,.85458,.90531,.94292,1.21296,.94292,1.02058,.89903,1.18616,.99613,.91677,.78216,.91677,.90083,.98796,.9135,.92168,.95381,.98981,.95298,.95381,.93459,.92168,.91513,.92004,.91677,.95077,.748,1.04502,.91677,.92061,.94236,.89544,.89364,.9,.80687,.8578,.80687,1.02058,.80779,.97276,.97276,.97276,.97276,.8578,.99973,1.18616,.91339,1.08074,.82891,1.02058,.55509,.71526,.89022,1.08595,1,1,1.18616,1,.96736,.93582,1.18616,1,1.04864,.82711,.99043,.99043,.99043,.71541,.85576,.85576,.85576,.85576,.85576,.85576,.845,.80729,.77512,.77512,.77512,.77512,.98621,.98621,.98621,.98621,.95961,.92222,.90637,.90637,.90637,.90637,.90637,1.02058,.90251,.90699,.90699,.90699,.90699,.85458,.83659,.94951,.99613,.99613,.99613,.99613,.99613,.99613,.85811,.78216,.90083,.90083,.90083,.90083,.95381,.95381,.95381,.95381,.9135,.92168,.91513,.91513,.91513,.91513,.91513,1.08595,.91677,.91677,.91677,.91677,.91677,.89364,.92332,.89364,.85576,.99613,.85576,.99613,.85576,.99613,.80729,.78216,.80729,.78216,.80729,.78216,.80729,.78216,.94299,.76783,.95961,.91677,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.86523,.9135,.86523,.9135,.86523,.9135,1,1,.92222,.92168,.92222,.92168,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.86036,.97096,.71743,.98981,1,1,.95298,.79726,.95381,1,1,.79726,.6894,.79726,.74321,.81691,1.0006,.92222,.92168,1,1,.92222,.92168,.79464,.92098,.92168,.90637,.91513,.90637,.91513,.90637,.91513,.909,.87514,.80729,.95077,1,1,.80729,.95077,.76463,.748,.76463,.748,1,1,.76463,.748,1,1,.86275,.72651,.86275,1.04502,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.9154,.94236,.85458,.89364,.85458,.90531,.9,.90531,.9,.90531,.9,1,.97276,.85576,.99613,.845,.85811,.90251,.91677,1,1,.86275,1.04502,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.00899,1.30628,.85576,.80178,.66862,.7927,.69323,.88127,.72459,.89711,.95381,.85576,.80591,.7805,.94729,.77512,.90531,.92222,.90637,.98621,.81698,.92655,.98558,.92222,.85359,.90637,.90976,.83809,.94523,.86275,.83509,.93157,.85308,.83392,.92346,.98621,.83509,.92886,.91324,.92168,.95381,.90646,.92886,.90557,.86847,.90276,.91324,.86842,.92168,.99531,.95381,.9224,.85408,.92699,.86847,1.0051,.91513,.80487,.93481,1,.88159,1.05214,.90646,.97355,.81539,.89398,.85923,.95381,.90646,.91513,.90646,.85923,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.9154,.94236,.9154,.94236,.9154,.94236,.85458,.89364,.96694,1,.89903,1,1,1,.91782,.91782,.91782,1,.896,.896,.896,.9332,.9332,.95973,1,1.26,1,1,.80479,.80178,1,1,.85633,1,1,1,1,.97276,1,1,1,.698,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.14542,1,.79199,.78694,1.02058,1.03493,1.05486,1,1,1.23026,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.20006,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],t.MyriadProBoldItalicMetrics={lineHeight:1.2,lineGap:.2},t.MyriadProItalicFactors=[1.36898,1,1,.65507,.84943,.85639,.88465,.88465,.86936,.88307,.86948,.85283,.85283,1.06383,1.02058,.75945,.9219,.75945,1.17337,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.75945,.75945,1.02058,1.02058,1.02058,.69046,.70926,.85158,.77812,.76852,.89591,.70466,.76125,.80094,.86822,.83864,.728,.77212,.79475,.93637,.87514,.8588,.76013,.8588,.72421,.69866,.77598,.85991,.80811,.87832,.78112,.77512,.8562,1.0222,1.18417,1.0222,1.27014,.89903,1.15012,.93859,.94399,.846,.94399,.81453,1.0186,.94219,.96017,1.03075,1.02175,.912,1.03075,.96998,.96017,.93859,.94399,.94399,.95493,.746,1.12658,.94578,.91,.979,.882,.882,.83,.85034,.83537,.85034,1.02058,.70869,.88465,.88465,.88465,.88465,.83537,.90083,1.15012,.9161,.94565,.73541,1.02058,.53609,.69353,.79519,1.08595,1,1,1.15012,1,.91974,.75945,1.15012,1,.9446,.73361,.9005,.9005,.9005,.62864,.85158,.85158,.85158,.85158,.85158,.85158,.773,.76852,.70466,.70466,.70466,.70466,.83864,.83864,.83864,.83864,.90561,.87514,.8588,.8588,.8588,.8588,.8588,1.02058,.85751,.85991,.85991,.85991,.85991,.77512,.76013,.88075,.93859,.93859,.93859,.93859,.93859,.93859,.8075,.846,.81453,.81453,.81453,.81453,.82424,.82424,.82424,.82424,.9278,.96017,.93859,.93859,.93859,.93859,.93859,1.08595,.8562,.94578,.94578,.94578,.94578,.882,.94578,.882,.85158,.93859,.85158,.93859,.85158,.93859,.76852,.846,.76852,.846,.76852,.846,.76852,.846,.89591,.8544,.90561,.94399,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.80094,.94219,.80094,.94219,.80094,.94219,1,1,.86822,.96017,.86822,.96017,.83864,.82424,.83864,.82424,.83864,.82424,.83864,1.03075,.83864,.82424,.81402,1.02738,.728,1.02175,1,1,.912,.79475,1.03075,1,1,.79475,.83911,.79475,.66266,.80553,1.06676,.87514,.96017,1,1,.87514,.96017,.86865,.87396,.96017,.8588,.93859,.8588,.93859,.8588,.93859,.867,.84759,.72421,.95493,1,1,.72421,.95493,.69866,.746,.69866,.746,1,1,.69866,.746,1,1,.77598,.88417,.77598,1.12658,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.87832,.979,.77512,.882,.77512,.8562,.83,.8562,.83,.8562,.83,1,.88465,.85158,.93859,.773,.8075,.85751,.8562,1,1,.77598,1.12658,1.15012,1.15012,1.15012,1.15012,1.15012,1.15313,1.15012,1.15012,1.15012,1.08106,1.03901,.85158,.77025,.62264,.7646,.65351,.86026,.69461,.89947,1.03075,.85158,.77812,.76449,.88836,.70466,.8562,.86822,.8588,.83864,.77212,.85308,.93637,.87514,.82352,.8588,.85701,.76013,.89058,.77598,.8156,.82565,.78112,.77899,.89386,.83864,.8156,.9486,.92388,.96186,1.03075,.91123,.9486,.93298,.878,.93942,.92388,.84596,.96186,.95119,1.03075,.922,.88787,.95829,.88,.93559,.93859,.78815,.93758,1,.89217,1.03737,.91123,.93969,.77487,.85769,.86799,1.03075,.91123,.93859,.91123,.86799,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.87832,.979,.87832,.979,.87832,.979,.77512,.882,.9219,1,.89903,1,1,1,.87321,.87321,.87321,1,1.027,1.027,1.027,.86847,.86847,.79121,1,1.124,1,1,.73572,.73572,1,1,.85034,1,1,1,1,.88465,1,1,1,.669,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.04828,1,.74948,.75187,1.02058,.98391,1.02119,1,1,1.06233,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05233,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],t.MyriadProItalicMetrics={lineHeight:1.2,lineGap:.2},t.MyriadProRegularFactors=[1.36898,1,1,.76305,.82784,.94935,.89364,.92241,.89073,.90706,.98472,.85283,.85283,1.0664,1.02058,.74505,.9219,.74505,1.23456,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.74505,.74505,1.02058,1.02058,1.02058,.73002,.72601,.91755,.8126,.80314,.92222,.73764,.79726,.83051,.90284,.86023,.74,.8126,.84869,.96518,.91115,.8858,.79761,.8858,.74498,.73914,.81363,.89591,.83659,.89633,.85608,.8111,.90531,1.0222,1.22736,1.0222,1.27014,.89903,.90088,.86667,1.0231,.896,1.01411,.90083,1.05099,1.00512,.99793,1.05326,1.09377,.938,1.06226,1.00119,.99793,.98714,1.0231,1.01231,.98196,.792,1.19137,.99074,.962,1.01915,.926,.942,.856,.85034,.92006,.85034,1.02058,.69067,.92241,.92241,.92241,.92241,.92006,.9332,.90088,.91882,.93484,.75339,1.02058,.56866,.54324,.79519,1.08595,1,1,.90088,1,.95325,.74505,.90088,1,.97198,.75339,.91009,.91009,.91009,.66466,.91755,.91755,.91755,.91755,.91755,.91755,.788,.80314,.73764,.73764,.73764,.73764,.86023,.86023,.86023,.86023,.92915,.91115,.8858,.8858,.8858,.8858,.8858,1.02058,.8858,.89591,.89591,.89591,.89591,.8111,.79611,.89713,.86667,.86667,.86667,.86667,.86667,.86667,.86936,.896,.90083,.90083,.90083,.90083,.84224,.84224,.84224,.84224,.97276,.99793,.98714,.98714,.98714,.98714,.98714,1.08595,.89876,.99074,.99074,.99074,.99074,.942,1.0231,.942,.91755,.86667,.91755,.86667,.91755,.86667,.80314,.896,.80314,.896,.80314,.896,.80314,.896,.92222,.93372,.92915,1.01411,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.83051,1.00512,.83051,1.00512,.83051,1.00512,1,1,.90284,.99793,.90976,.99793,.86023,.84224,.86023,.84224,.86023,.84224,.86023,1.05326,.86023,.84224,.82873,1.07469,.74,1.09377,1,1,.938,.84869,1.06226,1,1,.84869,.83704,.84869,.81441,.85588,1.08927,.91115,.99793,1,1,.91115,.99793,.91887,.90991,.99793,.8858,.98714,.8858,.98714,.8858,.98714,.894,.91434,.74498,.98196,1,1,.74498,.98196,.73914,.792,.73914,.792,1,1,.73914,.792,1,1,.81363,.904,.81363,1.19137,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89633,1.01915,.8111,.942,.8111,.90531,.856,.90531,.856,.90531,.856,1,.92241,.91755,.86667,.788,.86936,.8858,.89876,1,1,.81363,1.19137,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90388,1.03901,.92138,.78105,.7154,.86169,.80513,.94007,.82528,.98612,1.06226,.91755,.8126,.81884,.92819,.73764,.90531,.90284,.8858,.86023,.8126,.91172,.96518,.91115,.83089,.8858,.87791,.79761,.89297,.81363,.88157,.89992,.85608,.81992,.94307,.86023,.88157,.95308,.98699,.99793,1.06226,.95817,.95308,.97358,.928,.98088,.98699,.92761,.99793,.96017,1.06226,.986,.944,.95978,.938,.96705,.98714,.80442,.98972,1,.89762,1.04552,.95817,.99007,.87064,.91879,.88888,1.06226,.95817,.98714,.95817,.88888,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.89633,1.01915,.89633,1.01915,.89633,1.01915,.8111,.942,.9219,1,.89903,1,1,1,.93173,.93173,.93173,1,1.06304,1.06304,1.06904,.89903,.89903,.80549,1,1.156,1,1,.76575,.76575,1,1,.72458,1,1,1,1,.92241,1,1,1,.619,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.07257,1,.74705,.71119,1.02058,1.024,1.02119,1,1,1.1536,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05638,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],t.MyriadProRegularMetrics={lineHeight:1.2,lineGap:.2}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SegoeuiRegularMetrics=t.SegoeuiRegularFactors=t.SegoeuiItalicMetrics=t.SegoeuiItalicFactors=t.SegoeuiBoldMetrics=t.SegoeuiBoldItalicMetrics=t.SegoeuiBoldItalicFactors=t.SegoeuiBoldFactors=void 0,t.SegoeuiBoldFactors=[1.76738,1,1,.99297,.9824,1.04016,1.06497,1.03424,.97529,1.17647,1.23203,1.1085,1.1085,1.16939,1.2107,.9754,1.21408,.9754,1.59578,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,.81378,.81378,1.2107,1.2107,1.2107,.71703,.97847,.97363,.88776,.8641,1.02096,.79795,.85132,.914,1.06085,1.1406,.8007,.89858,.83693,1.14889,1.09398,.97489,.92094,.97489,.90399,.84041,.95923,1.00135,1,1.06467,.98243,.90996,.99361,1.1085,1.56942,1.1085,1.2107,.74627,.94282,.96752,1.01519,.86304,1.01359,.97278,1.15103,1.01359,.98561,1.02285,1.02285,1.00527,1.02285,1.0302,.99041,1.0008,1.01519,1.01359,1.02258,.79104,1.16862,.99041,.97454,1.02511,.99298,.96752,.95801,.94856,1.16579,.94856,1.2107,.9824,1.03424,1.03424,1,1.03424,1.16579,.8727,1.3871,1.18622,1.10818,1.04478,1.2107,1.18622,.75155,.94994,1.28826,1.21408,1.21408,.91056,1,.91572,.9754,.64663,1.18328,1.24866,1.04478,1.14169,1.15749,1.17389,.71703,.97363,.97363,.97363,.97363,.97363,.97363,.93506,.8641,.79795,.79795,.79795,.79795,1.1406,1.1406,1.1406,1.1406,1.02096,1.09398,.97426,.97426,.97426,.97426,.97426,1.2107,.97489,1.00135,1.00135,1.00135,1.00135,.90996,.92094,1.02798,.96752,.96752,.96752,.96752,.96752,.96752,.93136,.86304,.97278,.97278,.97278,.97278,1.02285,1.02285,1.02285,1.02285,.97122,.99041,1,1,1,1,1,1.28826,1.0008,.99041,.99041,.99041,.99041,.96752,1.01519,.96752,.97363,.96752,.97363,.96752,.97363,.96752,.8641,.86304,.8641,.86304,.8641,.86304,.8641,.86304,1.02096,1.03057,1.02096,1.03517,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.914,1.01359,.914,1.01359,.914,1.01359,1,1,1.06085,.98561,1.06085,1.00879,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,.97138,1.08692,.8007,1.02285,1,1,1.00527,.83693,1.02285,1,1,.83693,.9455,.83693,.90418,.83693,1.13005,1.09398,.99041,1,1,1.09398,.99041,.96692,1.09251,.99041,.97489,1.0008,.97489,1.0008,.97489,1.0008,.93994,.97931,.90399,1.02258,1,1,.90399,1.02258,.84041,.79104,.84041,.79104,.84041,.79104,.84041,.79104,1,1,.95923,1.07034,.95923,1.16862,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.06467,1.02511,.90996,.96752,.90996,.99361,.95801,.99361,.95801,.99361,.95801,1.07733,1.03424,.97363,.96752,.93506,.93136,.97489,1.0008,1,1,.95923,1.16862,1.15103,1.15103,1.01173,1.03959,.75953,.81378,.79912,1.15103,1.21994,.95161,.87815,1.01149,.81525,.7676,.98167,1.01134,1.02546,.84097,1.03089,1.18102,.97363,.88776,.85134,.97826,.79795,.99361,1.06085,.97489,1.1406,.89858,1.0388,1.14889,1.09398,.86039,.97489,1.0595,.92094,.94793,.95923,.90996,.99346,.98243,1.02112,.95493,1.1406,.90996,1.03574,1.02597,1.0008,1.18102,1.06628,1.03574,1.0192,1.01932,1.00886,.97531,1.0106,1.0008,1.13189,1.18102,1.02277,.98683,1.0016,.99561,1.07237,1.0008,.90434,.99921,.93803,.8965,1.23085,1.06628,1.04983,.96268,1.0499,.98439,1.18102,1.06628,1.0008,1.06628,.98439,.79795,1,1,1,1,1,1,1,1,1,1,1,1,1.09466,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.97278,1,1,1,1,1,1,1,1,1,1,1,1,1.02065,1,1,1,1,1,1,1.06467,1.02511,1.06467,1.02511,1.06467,1.02511,.90996,.96752,1,1.21408,.89903,1,1,.75155,1.04394,1.04394,1.04394,1.04394,.98633,.98633,.98633,.73047,.73047,1.20642,.91211,1.25635,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.12454,.93503,1.03424,1.19687,1.03424,1,1,1,.771,1,1,1.15749,1.15749,1.15749,1.10948,.86279,.94434,.86279,.94434,.86182,1,1,1.16897,1,.96085,.90137,1.2107,1.18416,1.13973,.69825,.9716,2.10339,1.29004,1.29004,1.21172,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18874,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.09193,1.09193,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],t.SegoeuiBoldMetrics={lineHeight:1.33008,lineGap:0},t.SegoeuiBoldItalicFactors=[1.76738,1,1,.98946,1.03959,1.04016,1.02809,1.036,.97639,1.10953,1.23203,1.11144,1.11144,1.16939,1.21237,.9754,1.21261,.9754,1.59754,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,.81378,.81378,1.21237,1.21237,1.21237,.73541,.97847,.97363,.89723,.87897,1.0426,.79429,.85292,.91149,1.05815,1.1406,.79631,.90128,.83853,1.04396,1.10615,.97552,.94436,.97552,.88641,.80527,.96083,1.00135,1,1.06777,.9817,.91142,.99361,1.11144,1.57293,1.11144,1.21237,.74627,1.31818,1.06585,.97042,.83055,.97042,.93503,1.1261,.97042,.97922,1.14236,.94552,1.01054,1.14236,1.02471,.97922,.94165,.97042,.97042,1.0276,.78929,1.1261,.97922,.95874,1.02197,.98507,.96752,.97168,.95107,1.16579,.95107,1.21237,1.03959,1.036,1.036,1,1.036,1.16579,.87357,1.31818,1.18754,1.26781,1.05356,1.21237,1.18622,.79487,.94994,1.29004,1.24047,1.24047,1.31818,1,.91484,.9754,1.31818,1.1349,1.24866,1.05356,1.13934,1.15574,1.17389,.73541,.97363,.97363,.97363,.97363,.97363,.97363,.94385,.87897,.79429,.79429,.79429,.79429,1.1406,1.1406,1.1406,1.1406,1.0426,1.10615,.97552,.97552,.97552,.97552,.97552,1.21237,.97552,1.00135,1.00135,1.00135,1.00135,.91142,.94436,.98721,1.06585,1.06585,1.06585,1.06585,1.06585,1.06585,.96705,.83055,.93503,.93503,.93503,.93503,1.14236,1.14236,1.14236,1.14236,.93125,.97922,.94165,.94165,.94165,.94165,.94165,1.29004,.94165,.97922,.97922,.97922,.97922,.96752,.97042,.96752,.97363,1.06585,.97363,1.06585,.97363,1.06585,.87897,.83055,.87897,.83055,.87897,.83055,.87897,.83055,1.0426,1.0033,1.0426,.97042,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.91149,.97042,.91149,.97042,.91149,.97042,1,1,1.05815,.97922,1.05815,.97922,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,.97441,1.04302,.79631,1.01582,1,1,1.01054,.83853,1.14236,1,1,.83853,1.09125,.83853,.90418,.83853,1.19508,1.10615,.97922,1,1,1.10615,.97922,1.01034,1.10466,.97922,.97552,.94165,.97552,.94165,.97552,.94165,.91602,.91981,.88641,1.0276,1,1,.88641,1.0276,.80527,.78929,.80527,.78929,.80527,.78929,.80527,.78929,1,1,.96083,1.05403,.95923,1.16862,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.06777,1.02197,.91142,.96752,.91142,.99361,.97168,.99361,.97168,.99361,.97168,1.23199,1.036,.97363,1.06585,.94385,.96705,.97552,.94165,1,1,.96083,1.1261,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,.95161,1.27126,1.00811,.83284,.77702,.99137,.95253,1.0347,.86142,1.07205,1.14236,.97363,.89723,.86869,1.09818,.79429,.99361,1.05815,.97552,1.1406,.90128,1.06662,1.04396,1.10615,.84918,.97552,1.04694,.94436,.98015,.96083,.91142,1.00356,.9817,1.01945,.98999,1.1406,.91142,1.04961,.9898,1.00639,1.14236,1.07514,1.04961,.99607,1.02897,1.008,.9898,.95134,1.00639,1.11121,1.14236,1.00518,.97981,1.02186,1,1.08578,.94165,.99314,.98387,.93028,.93377,1.35125,1.07514,1.10687,.93491,1.04232,1.00351,1.14236,1.07514,.94165,1.07514,1.00351,.79429,1,1,1,1,1,1,1,1,1,1,1,1,1.09097,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.93503,1,1,1,1,1,1,1,1,1,1,1,1,.96609,1,1,1,1,1,1,1.06777,1.02197,1.06777,1.02197,1.06777,1.02197,.91142,.96752,1,1.21261,.89903,1,1,.75155,1.04745,1.04745,1.04745,1.04394,.98633,.98633,.98633,.72959,.72959,1.20502,.91406,1.26514,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.09125,.93327,1.03336,1.16541,1.036,1,1,1,.771,1,1,1.15574,1.15574,1.15574,1.15574,.86364,.94434,.86279,.94434,.86224,1,1,1.16798,1,.96085,.90068,1.21237,1.18416,1.13904,.69825,.9716,2.10339,1.29004,1.29004,1.21339,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18775,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.13269,1.13269,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],t.SegoeuiBoldItalicMetrics={lineHeight:1.33008,lineGap:0},t.SegoeuiItalicFactors=[1.76738,1,1,.98946,1.14763,1.05365,1.06234,.96927,.92586,1.15373,1.18414,.91349,.91349,1.07403,1.17308,.78383,1.20088,.78383,1.42531,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78383,.78383,1.17308,1.17308,1.17308,.77349,.94565,.94729,.85944,.88506,.9858,.74817,.80016,.88449,.98039,.95782,.69238,.89898,.83231,.98183,1.03989,.96924,.86237,.96924,.80595,.74524,.86091,.95402,.94143,.98448,.8858,.83089,.93285,1.0949,1.39016,1.0949,1.45994,.74627,1.04839,.97454,.97454,.87207,.97454,.87533,1.06151,.97454,1.00176,1.16484,1.08132,.98047,1.16484,1.02989,1.01054,.96225,.97454,.97454,1.06598,.79004,1.16344,1.00351,.94629,.9973,.91016,.96777,.9043,.91082,.92481,.91082,1.17308,.95748,.96927,.96927,1,.96927,.92481,.80597,1.04839,1.23393,1.1781,.9245,1.17308,1.20808,.63218,.94261,1.24822,1.09971,1.09971,1.04839,1,.85273,.78032,1.04839,1.09971,1.22326,.9245,1.09836,1.13525,1.15222,.70424,.94729,.94729,.94729,.94729,.94729,.94729,.85498,.88506,.74817,.74817,.74817,.74817,.95782,.95782,.95782,.95782,.9858,1.03989,.96924,.96924,.96924,.96924,.96924,1.17308,.96924,.95402,.95402,.95402,.95402,.83089,.86237,.88409,.97454,.97454,.97454,.97454,.97454,.97454,.92916,.87207,.87533,.87533,.87533,.87533,.93146,.93146,.93146,.93146,.93854,1.01054,.96225,.96225,.96225,.96225,.96225,1.24822,.8761,1.00351,1.00351,1.00351,1.00351,.96777,.97454,.96777,.94729,.97454,.94729,.97454,.94729,.97454,.88506,.87207,.88506,.87207,.88506,.87207,.88506,.87207,.9858,.95391,.9858,.97454,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.88449,.97454,.88449,.97454,.88449,.97454,1,1,.98039,1.00176,.98039,1.00176,.95782,.93146,.95782,.93146,.95782,.93146,.95782,1.16484,.95782,.93146,.84421,1.12761,.69238,1.08132,1,1,.98047,.83231,1.16484,1,1,.84723,1.04861,.84723,.78755,.83231,1.23736,1.03989,1.01054,1,1,1.03989,1.01054,.9857,1.03849,1.01054,.96924,.96225,.96924,.96225,.96924,.96225,.92383,.90171,.80595,1.06598,1,1,.80595,1.06598,.74524,.79004,.74524,.79004,.74524,.79004,.74524,.79004,1,1,.86091,1.02759,.85771,1.16344,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.98448,.9973,.83089,.96777,.83089,.93285,.9043,.93285,.9043,.93285,.9043,1.31868,.96927,.94729,.97454,.85498,.92916,.96924,.8761,1,1,.86091,1.16344,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,.81965,.81965,.94729,.78032,.71022,.90883,.84171,.99877,.77596,1.05734,1.2,.94729,.85944,.82791,.9607,.74817,.93285,.98039,.96924,.95782,.89898,.98316,.98183,1.03989,.78614,.96924,.97642,.86237,.86075,.86091,.83089,.90082,.8858,.97296,1.01284,.95782,.83089,1.0976,1.04,1.03342,1.2,1.0675,1.0976,.98205,1.03809,1.05097,1.04,.95364,1.03342,1.05401,1.2,1.02148,1.0119,1.04724,1.0127,1.02732,.96225,.8965,.97783,.93574,.94818,1.30679,1.0675,1.11826,.99821,1.0557,1.0326,1.2,1.0675,.96225,1.0675,1.0326,.74817,1,1,1,1,1,1,1,1,1,1,1,1,1.03754,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.87533,1,1,1,1,1,1,1,1,1,1,1,1,.98705,1,1,1,1,1,1,.98448,.9973,.98448,.9973,.98448,.9973,.83089,.96777,1,1.20088,.89903,1,1,.75155,.94945,.94945,.94945,.94945,1.12317,1.12317,1.12317,.67603,.67603,1.15621,.73584,1.21191,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87709,.96927,1.01473,.96927,1,1,1,.77295,1,1,1.09836,1.09836,1.09836,1.01522,.86321,.94434,.8649,.94434,.86182,1,1,1.083,1,.91578,.86438,1.17308,1.18416,1.14589,.69825,.97622,1.96791,1.24822,1.24822,1.17308,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.17984,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10742,1.10742,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],t.SegoeuiItalicMetrics={lineHeight:1.33008,lineGap:0},t.SegoeuiRegularFactors=[1.76738,1,1,.98594,1.02285,1.10454,1.06234,.96927,.92037,1.19985,1.2046,.90616,.90616,1.07152,1.1714,.78032,1.20088,.78032,1.40246,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78032,.78032,1.1714,1.1714,1.1714,.80597,.94084,.96706,.85944,.85734,.97093,.75842,.79936,.88198,.9831,.95782,.71387,.86969,.84636,1.07796,1.03584,.96924,.83968,.96924,.82826,.79649,.85771,.95132,.93119,.98965,.88433,.8287,.93365,1.08612,1.3638,1.08612,1.45786,.74627,.80499,.91484,1.05707,.92383,1.05882,.9403,1.12654,1.05882,1.01756,1.09011,1.09011,.99414,1.09011,1.034,1.01756,1.05356,1.05707,1.05882,1.04399,.84863,1.21968,1.01756,.95801,1.00068,.91797,.96777,.9043,.90351,.92105,.90351,1.1714,.85337,.96927,.96927,.99912,.96927,.92105,.80597,1.2434,1.20808,1.05937,.90957,1.1714,1.20808,.75155,.94261,1.24644,1.09971,1.09971,.84751,1,.85273,.78032,.61584,1.05425,1.17914,.90957,1.08665,1.11593,1.14169,.73381,.96706,.96706,.96706,.96706,.96706,.96706,.86035,.85734,.75842,.75842,.75842,.75842,.95782,.95782,.95782,.95782,.97093,1.03584,.96924,.96924,.96924,.96924,.96924,1.1714,.96924,.95132,.95132,.95132,.95132,.8287,.83968,.89049,.91484,.91484,.91484,.91484,.91484,.91484,.93575,.92383,.9403,.9403,.9403,.9403,.8717,.8717,.8717,.8717,1.00527,1.01756,1.05356,1.05356,1.05356,1.05356,1.05356,1.24644,.95923,1.01756,1.01756,1.01756,1.01756,.96777,1.05707,.96777,.96706,.91484,.96706,.91484,.96706,.91484,.85734,.92383,.85734,.92383,.85734,.92383,.85734,.92383,.97093,1.0969,.97093,1.05882,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.88198,1.05882,.88198,1.05882,.88198,1.05882,1,1,.9831,1.01756,.9831,1.01756,.95782,.8717,.95782,.8717,.95782,.8717,.95782,1.09011,.95782,.8717,.84784,1.11551,.71387,1.09011,1,1,.99414,.84636,1.09011,1,1,.84636,1.0536,.84636,.94298,.84636,1.23297,1.03584,1.01756,1,1,1.03584,1.01756,1.00323,1.03444,1.01756,.96924,1.05356,.96924,1.05356,.96924,1.05356,.93066,.98293,.82826,1.04399,1,1,.82826,1.04399,.79649,.84863,.79649,.84863,.79649,.84863,.79649,.84863,1,1,.85771,1.17318,.85771,1.21968,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.98965,1.00068,.8287,.96777,.8287,.93365,.9043,.93365,.9043,.93365,.9043,1.08571,.96927,.96706,.91484,.86035,.93575,.96924,.95923,1,1,.85771,1.21968,1.11437,1.11437,.93109,.91202,.60411,.84164,.55572,1.01173,.97361,.81818,.81818,.96635,.78032,.72727,.92366,.98601,1.03405,.77968,1.09799,1.2,.96706,.85944,.85638,.96491,.75842,.93365,.9831,.96924,.95782,.86969,.94152,1.07796,1.03584,.78437,.96924,.98715,.83968,.83491,.85771,.8287,.94492,.88433,.9287,1.0098,.95782,.8287,1.0625,.98248,1.03424,1.2,1.01071,1.0625,.95246,1.03809,1.04912,.98248,1.00221,1.03424,1.05443,1.2,1.04785,.99609,1.00169,1.05176,.99346,1.05356,.9087,1.03004,.95542,.93117,1.23362,1.01071,1.07831,1.02512,1.05205,1.03502,1.2,1.01071,1.05356,1.01071,1.03502,.75842,1,1,1,1,1,1,1,1,1,1,1,1,1.03719,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.9403,1,1,1,1,1,1,1,1,1,1,1,1,1.04021,1,1,1,1,1,1,.98965,1.00068,.98965,1.00068,.98965,1.00068,.8287,.96777,1,1.20088,.89903,1,1,.75155,1.03077,1.03077,1.03077,1.03077,1.13196,1.13196,1.13196,.67428,.67428,1.16039,.73291,1.20996,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87796,.96927,1.01518,.96927,1,1,1,.77295,1,1,1.10539,1.10539,1.11358,1.06967,.86279,.94434,.86279,.94434,.86182,1,1,1.083,1,.91578,.86507,1.1714,1.18416,1.14589,.69825,.97622,1.9697,1.24822,1.24822,1.17238,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18083,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10938,1.10938,1,1,1,1.05425,1.09971,1.09971,1.09971,1,1,1,1,1,1,1,1,1,1,1],t.SegoeuiRegularMetrics={lineHeight:1.33008,lineGap:0}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostScriptEvaluator=t.PostScriptCompiler=t.PDFFunctionFactory=void 0,t.isPDFFunction=function(e){let t;if("object"!=typeof e)return!1;if(e instanceof n.Dict)t=e;else{if(!(e instanceof s.BaseStream))return!1;t=e.dict}return t.has("FunctionType")};var n=r(5),a=r(2),i=r(58),s=r(7),o=r(59);function c(e){if(!Array.isArray(e))return null;const t=e.length;for(let r=0;t>r;r++)if("number"!=typeof e[r]){const r=Array(t);for(let n=0;t>n;n++)r[n]=+e[n];return r}return e}t.PDFFunctionFactory=class{constructor({xref:e,isEvalSupported:t=!0}){this.xref=e,this.isEvalSupported=!1!==t}create(e){const t=this.getCached(e);if(t)return t;const r=l.parse({xref:this.xref,isEvalSupported:this.isEvalSupported,fn:e instanceof n.Ref?this.xref.fetch(e):e});return this._cache(e,r),r}createFromArray(e){const t=this.getCached(e);if(t)return t;const r=l.parseArray({xref:this.xref,isEvalSupported:this.isEvalSupported,fnObj:e instanceof n.Ref?this.xref.fetch(e):e});return this._cache(e,r),r}getCached(e){let t;if(e instanceof n.Ref?t=e:e instanceof n.Dict?t=e.objId:e instanceof s.BaseStream&&(t=e.dict&&e.dict.objId),t){const e=this._localFunctionCache.getByRef(t);if(e)return e}return null}_cache(e,t){if(!t)throw Error('PDFFunctionFactory._cache - expected "parsedFunction" argument.');let r;e instanceof n.Ref?r=e:e instanceof n.Dict?r=e.objId:e instanceof s.BaseStream&&(r=e.dict&&e.dict.objId),r&&this._localFunctionCache.set(null,r,t)}get _localFunctionCache(){return(0,a.shadow)(this,"_localFunctionCache",new o.LocalFunctionCache)}};class l{static getSampleArray(e,t,r,n){let a,i,s=1;for(a=0,i=e.length;i>a;a++)s*=e[a];s*=t;const o=Array(s);let c=0,l=0;const h=1/(2**r-1),u=n.getBytes((s*r+7)/8);let d=0;for(a=0;s>a;a++){for(;r>c;)l<<=8,l|=u[d++],c+=8;c-=r,o[a]=(l>>c)*h,l&=(1<<c)-1}return o}static parse({xref:e,isEvalSupported:t,fn:r}){const n=r.dict||r;switch(n.get("FunctionType")){case 0:return this.constructSampled({xref:e,isEvalSupported:t,fn:r,dict:n});case 1:break;case 2:return this.constructInterpolated({xref:e,isEvalSupported:t,dict:n});case 3:return this.constructStiched({xref:e,isEvalSupported:t,dict:n});case 4:return this.constructPostScript({xref:e,isEvalSupported:t,fn:r,dict:n})}throw new a.FormatError("Unknown type of function")}static parseArray({xref:e,isEvalSupported:t,fnObj:r}){if(!Array.isArray(r))return this.parse({xref:e,isEvalSupported:t,fn:r});const n=[];for(let a=0,i=r.length;i>a;a++)n.push(this.parse({xref:e,isEvalSupported:t,fn:e.fetchIfRef(r[a])}));return function(e,t,r,a){for(let i=0,s=n.length;s>i;i++)n[i](e,t,r,a+i)}}static constructSampled({fn:e,dict:t}){function r(e){const t=e.length,r=[];let n=0;for(let a=0;t>a;a+=2)r[n++]=[e[a],e[a+1]];return r}function n(e,t,r,n,a){return n+(a-n)/(r-t)*(e-t)}let i=c(t.getArray("Domain")),s=c(t.getArray("Range"));if(!i||!s)throw new a.FormatError("No domain or range");const o=i.length/2,l=s.length/2;i=r(i),s=r(s);const h=c(t.getArray("Size")),u=t.get("BitsPerSample"),d=t.get("Order")||1;1!==d&&(0,a.info)("No support for cubic spline interpolation: "+d);let f=c(t.getArray("Encode"));if(f)f=r(f);else{f=[];for(let e=0;o>e;++e)f.push([0,h[e]-1])}let p=c(t.getArray("Decode"));p=p?r(p):s;const g=this.getSampleArray(h,l,u,e);return function(e,t,r,a){const c=1<<o,u=new Float64Array(c),d=new Uint32Array(c);let m,b;for(b=0;c>b;b++)u[b]=1;let y=l,w=1;for(m=0;o>m;++m){const r=i[m][0],a=i[m][1];let s=n(Math.min(Math.max(e[t+m],r),a),r,a,f[m][0],f[m][1]);const o=h[m];s=Math.min(Math.max(s,0),o-1);const l=o-1>s?Math.floor(s):s-1,p=l+1-s,g=s-l,v=l*y,S=v+y;for(b=0;c>b;b++)b&w?(u[b]*=g,d[b]+=S):(u[b]*=p,d[b]+=v);y*=o,w<<=1}for(b=0;l>b;++b){let e=0;for(m=0;c>m;m++)e+=g[d[m]+b]*u[m];e=n(e,0,1,p[b][0],p[b][1]),r[a+b]=Math.min(Math.max(e,s[b][0]),s[b][1])}}}static constructInterpolated({dict:e}){const t=c(e.getArray("C0"))||[0],r=c(e.getArray("C1"))||[1],n=e.get("N"),a=[];for(let e=0,n=t.length;n>e;++e)a.push(r[e]-t[e]);const i=a.length;return function(e,r,s,o){const c=1===n?e[r]:e[r]**n;for(let e=0;i>e;++e)s[o+e]=t[e]+c*a[e]}}static constructStiched({xref:e,isEvalSupported:t,dict:r}){const n=c(r.getArray("Domain"));if(!n)throw new a.FormatError("No domain");if(1!=n.length/2)throw new a.FormatError("Bad domain for stiched function");const i=r.get("Functions"),s=[];for(let r=0,n=i.length;n>r;++r)s.push(this.parse({xref:e,isEvalSupported:t,fn:e.fetchIfRef(i[r])}));const o=c(r.getArray("Bounds")),l=c(r.getArray("Encode")),h=new Float32Array(1);return function(e,t,r,a){const i=function(e,t,r){return e>r?e=r:t>e&&(e=t),e}(e[t],n[0],n[1]),c=o.length;let u;for(u=0;c>u&&i>=o[u];++u);let d=n[0];u>0&&(d=o[u-1]);let f=n[1];o.length>u&&(f=o[u]);const p=l[2*u];h[0]=d===f?p:p+(i-d)*(l[2*u+1]-p)/(f-d),s[u](h,0,r,a)}}static constructPostScript({isEvalSupported:e,fn:t,dict:r}){const n=c(r.getArray("Domain")),s=c(r.getArray("Range"));if(!n)throw new a.FormatError("No domain.");if(!s)throw new a.FormatError("No range.");const o=new i.PostScriptLexer(t),l=new i.PostScriptParser(o).parse();if(e&&a.FeatureTest.isEvalSupported){const e=(new k).compile(l,n,s);if(e)return Function("src","srcOffset","dest","destOffset",e)}(0,a.info)("Unable to compile PS function");const h=s.length>>1,d=n.length>>1,f=new u(l),p=Object.create(null);let g=8192;const m=new Float32Array(d);return function(e,t,r,n){let a,i,o="";const c=m;for(a=0;d>a;a++)i=e[t+a],c[a]=i,o+=i+"_";const l=p[o];if(void 0!==l)return void r.set(l,n);const u=new Float32Array(h),b=f.execute(c),y=b.length-h;for(a=0;h>a;a++){i=b[y+a];let e=s[2*a];e>i?i=e:(e=s[2*a+1],i>e&&(i=e)),u[a]=i}g>0&&(g--,p[o]=u),r.set(u,n)}}}class h{static get MAX_STACK_SIZE(){return(0,a.shadow)(this,"MAX_STACK_SIZE",100)}constructor(e){this.stack=e?Array.prototype.slice.call(e,0):[]}push(e){if(this.stack.length>=h.MAX_STACK_SIZE)throw Error("PostScript function stack overflow.");this.stack.push(e)}pop(){if(0>=this.stack.length)throw Error("PostScript function stack underflow.");return this.stack.pop()}copy(e){if(this.stack.length+e>=h.MAX_STACK_SIZE)throw Error("PostScript function stack overflow.");const t=this.stack;for(let r=t.length-e,n=e-1;n>=0;n--,r++)t.push(t[r])}index(e){this.push(this.stack[this.stack.length-e-1])}roll(e,t){const r=this.stack,n=r.length-e,a=r.length-1,i=n+(t-Math.floor(t/e)*e);for(let e=n,t=a;t>e;e++,t--){const n=r[e];r[e]=r[t],r[t]=n}for(let e=n,t=i-1;t>e;e++,t--){const n=r[e];r[e]=r[t],r[t]=n}for(let e=i,t=a;t>e;e++,t--){const n=r[e];r[e]=r[t],r[t]=n}}}class u{constructor(e){this.operators=e}execute(e){const t=new h(e);let r=0;const n=this.operators,i=n.length;let s,o,c;for(;i>r;)if(s=n[r++],"number"!=typeof s)switch(s){case"jz":c=t.pop(),o=t.pop(),o||(r=c);break;case"j":o=t.pop(),r=o;break;case"abs":o=t.pop(),t.push(Math.abs(o));break;case"add":c=t.pop(),o=t.pop(),t.push(o+c);break;case"and":c=t.pop(),o=t.pop(),t.push("boolean"==typeof o&&"boolean"==typeof c?o&&c:o&c);break;case"atan":o=t.pop(),t.push(Math.atan(o));break;case"bitshift":c=t.pop(),o=t.pop(),t.push(o>0?o<<c:o>>c);break;case"ceiling":o=t.pop(),t.push(Math.ceil(o));break;case"copy":o=t.pop(),t.copy(o);break;case"cos":o=t.pop(),t.push(Math.cos(o));break;case"cvi":o=0|t.pop(),t.push(o);break;case"cvr":break;case"div":c=t.pop(),o=t.pop(),t.push(o/c);break;case"dup":t.copy(1);break;case"eq":c=t.pop(),o=t.pop(),t.push(o===c);break;case"exch":t.roll(2,1);break;case"exp":c=t.pop(),o=t.pop(),t.push(o**c);break;case"false":t.push(!1);break;case"floor":o=t.pop(),t.push(Math.floor(o));break;case"ge":c=t.pop(),o=t.pop(),t.push(o>=c);break;case"gt":c=t.pop(),o=t.pop(),t.push(o>c);break;case"idiv":c=t.pop(),o=t.pop(),t.push(o/c|0);break;case"index":o=t.pop(),t.index(o);break;case"le":c=t.pop(),o=t.pop(),t.push(c>=o);break;case"ln":o=t.pop(),t.push(Math.log(o));break;case"log":o=t.pop(),t.push(Math.log(o)/Math.LN10);break;case"lt":c=t.pop(),o=t.pop(),t.push(c>o);break;case"mod":c=t.pop(),o=t.pop(),t.push(o%c);break;case"mul":c=t.pop(),o=t.pop(),t.push(o*c);break;case"ne":c=t.pop(),o=t.pop(),t.push(o!==c);break;case"neg":o=t.pop(),t.push(-o);break;case"not":o=t.pop(),t.push("boolean"==typeof o?!o:~o);break;case"or":c=t.pop(),o=t.pop(),t.push("boolean"==typeof o&&"boolean"==typeof c?o||c:o|c);break;case"pop":t.pop();break;case"roll":c=t.pop(),o=t.pop(),t.roll(o,c);break;case"round":o=t.pop(),t.push(Math.round(o));break;case"sin":o=t.pop(),t.push(Math.sin(o));break;case"sqrt":o=t.pop(),t.push(Math.sqrt(o));break;case"sub":c=t.pop(),o=t.pop(),t.push(o-c);break;case"true":t.push(!0);break;case"truncate":o=t.pop(),o=0>o?Math.ceil(o):Math.floor(o),t.push(o);break;case"xor":c=t.pop(),o=t.pop(),t.push("boolean"==typeof o&&"boolean"==typeof c?o!==c:o^c);break;default:throw new a.FormatError("Unknown operator "+s)}else t.push(s);return t.stack}}t.PostScriptEvaluator=u;class d{constructor(e){this.type=e}visit(e){(0,a.unreachable)("abstract method")}}class f extends d{constructor(e,t,r){super("args"),this.index=e,this.min=t,this.max=r}visit(e){e.visitArgument(this)}}class p extends d{constructor(e){super("literal"),this.number=e,this.min=e,this.max=e}visit(e){e.visitLiteral(this)}}class g extends d{constructor(e,t,r,n,a){super("binary"),this.op=e,this.arg1=t,this.arg2=r,this.min=n,this.max=a}visit(e){e.visitBinaryOperation(this)}}class m extends d{constructor(e,t){super("max"),this.arg=e,this.min=e.min,this.max=t}visit(e){e.visitMin(this)}}class b extends d{constructor(e,t,r){super("var"),this.index=e,this.min=t,this.max=r}visit(e){e.visitVariable(this)}}class y extends d{constructor(e,t){super("definition"),this.variable=e,this.arg=t}visit(e){e.visitVariableDefinition(this)}}class w{constructor(){this.parts=[]}visitArgument(e){this.parts.push("Math.max(",e.min,", Math.min(",e.max,", src[srcOffset + ",e.index,"]))")}visitVariable(e){this.parts.push("v",e.index)}visitLiteral(e){this.parts.push(e.number)}visitBinaryOperation(e){this.parts.push("("),e.arg1.visit(this),this.parts.push(" ",e.op," "),e.arg2.visit(this),this.parts.push(")")}visitVariableDefinition(e){this.parts.push("var "),e.variable.visit(this),this.parts.push(" = "),e.arg.visit(this),this.parts.push(";")}visitMin(e){this.parts.push("Math.min("),e.arg.visit(this),this.parts.push(", ",e.max,")")}toString(){return this.parts.join("")}}function v(e,t){return"literal"===t.type&&0===t.number?e:"literal"===e.type&&0===e.number?t:"literal"===t.type&&"literal"===e.type?new p(e.number+t.number):new g("+",e,t,e.min+t.min,e.max+t.max)}function S(e,t){if("literal"===t.type){if(0===t.number)return new p(0);if(1===t.number)return e;if("literal"===e.type)return new p(e.number*t.number)}if("literal"===e.type){if(0===e.number)return new p(0);if(1===e.number)return t}return new g("*",e,t,Math.min(e.min*t.min,e.min*t.max,e.max*t.min,e.max*t.max),Math.max(e.min*t.min,e.min*t.max,e.max*t.min,e.max*t.max))}function x(e,t){if("literal"===t.type){if(0===t.number)return e;if("literal"===e.type)return new p(e.number-t.number)}return"binary"===t.type&&"-"===t.op&&"literal"===e.type&&1===e.number&&"literal"===t.arg1.type&&1===t.arg1.number?t.arg2:new g("-",e,t,e.min-t.max,e.max-t.min)}function A(e,t){return t>e.min?e.max>t?new m(e,t):e:new p(t)}class k{compile(e,t,r){const n=[],a=[],i=t.length>>1,s=r.length>>1;let o,c,l,h,u,d,g,m,k=0;for(let e=0;i>e;e++)n.push(new f(e,t[2*e],t[2*e+1]));for(let t=0,r=e.length;r>t;t++)if(m=e[t],"number"!=typeof m)switch(m){case"add":if(2>n.length)return null;h=n.pop(),l=n.pop(),n.push(v(l,h));break;case"cvr":if(1>n.length)return null;break;case"mul":if(2>n.length)return null;h=n.pop(),l=n.pop(),n.push(S(l,h));break;case"sub":if(2>n.length)return null;h=n.pop(),l=n.pop(),n.push(x(l,h));break;case"exch":if(2>n.length)return null;u=n.pop(),d=n.pop(),n.push(u,d);break;case"pop":if(1>n.length)return null;n.pop();break;case"index":if(1>n.length)return null;if(l=n.pop(),"literal"!==l.type)return null;if(o=l.number,0>o||!Number.isInteger(o)||o>n.length)return null;if(u=n[n.length-o-1],"literal"===u.type||"var"===u.type){n.push(u);break}g=new b(k++,u.min,u.max),n[n.length-o-1]=g,n.push(g),a.push(new y(g,u));break;case"dup":if(1>n.length)return null;if("number"==typeof e[t+1]&&"gt"===e[t+2]&&e[t+3]===t+7&&"jz"===e[t+4]&&"pop"===e[t+5]&&e[t+6]===e[t+1]){l=n.pop(),n.push(A(l,e[t+1])),t+=6;break}if(u=n.at(-1),"literal"===u.type||"var"===u.type){n.push(u);break}g=new b(k++,u.min,u.max),n[n.length-1]=g,n.push(g),a.push(new y(g,u));break;case"roll":if(2>n.length)return null;if(h=n.pop(),l=n.pop(),"literal"!==h.type||"literal"!==l.type)return null;if(c=h.number,o=l.number,0>=o||!Number.isInteger(o)||!Number.isInteger(c)||o>n.length)return null;if(c=(c%o+o)%o,0===c)break;Array.prototype.push.apply(n,n.splice(n.length-o,o-c));break;default:return null}else n.push(new p(m));if(n.length!==s)return null;const C=[];for(const e of a){const t=new w;e.visit(t),C.push(""+t)}for(let e=0,t=n.length;t>e;e++){const t=n[e],a=new w;t.visit(a);const i=r[2*e],s=r[2*e+1],o=[""+a];i>t.min&&(o.unshift("Math.max(",i,", "),o.push(")")),t.max>s&&(o.unshift("Math.min(",s,", "),o.push(")")),o.unshift("dest[destOffset + ",e,"] = "),o.push(";"),C.push(o.join(""))}return C.join("\n")}}t.PostScriptCompiler=k},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostScriptParser=t.PostScriptLexer=void 0;var n=r(2),a=r(5),i=r(6);t.PostScriptParser=class{constructor(e){this.lexer=e,this.operators=[],this.token=null,this.prev=null}nextToken(){this.prev=this.token,this.token=this.lexer.getToken()}accept(e){return this.token.type===e&&(this.nextToken(),!0)}expect(e){if(this.accept(e))return!0;throw new n.FormatError(`Unexpected symbol: found ${this.token.type} expected ${e}.`)}parse(){return this.nextToken(),this.expect(s.LBRACE),this.parseBlock(),this.expect(s.RBRACE),this.operators}parseBlock(){for(;;)if(this.accept(s.NUMBER))this.operators.push(this.prev.value);else if(this.accept(s.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(s.LBRACE))return;this.parseCondition()}}parseCondition(){const e=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(s.RBRACE),this.accept(s.IF))this.operators[e]=this.operators.length,this.operators[e+1]="jz";else{if(!this.accept(s.LBRACE))throw new n.FormatError("PS Function: error parsing conditional.");{const t=this.operators.length;this.operators.push(null,null);const r=this.operators.length;this.parseBlock(),this.expect(s.RBRACE),this.expect(s.IFELSE),this.operators[t]=this.operators.length,this.operators[t+1]="j",this.operators[e]=r,this.operators[e+1]="jz"}}}};const s={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};class o{static get opCache(){return(0,n.shadow)(this,"opCache",Object.create(null))}constructor(e,t){this.type=e,this.value=t}static getOperator(e){const t=o.opCache[e];return t||(o.opCache[e]=new o(s.OPERATOR,e))}static get LBRACE(){return(0,n.shadow)(this,"LBRACE",new o(s.LBRACE,"{"))}static get RBRACE(){return(0,n.shadow)(this,"RBRACE",new o(s.RBRACE,"}"))}static get IF(){return(0,n.shadow)(this,"IF",new o(s.IF,"IF"))}static get IFELSE(){return(0,n.shadow)(this,"IFELSE",new o(s.IFELSE,"IFELSE"))}}t.PostScriptLexer=class{constructor(e){this.stream=e,this.nextChar(),this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(0>t)return a.EOF;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,i.isWhiteSpace)(t))break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new o(s.NUMBER,this.getNumber());case 123:return this.nextChar(),o.LBRACE;case 125:return this.nextChar(),o.RBRACE}const r=this.strBuf;for(r.length=0,r[0]=String.fromCharCode(t);(t=this.nextChar())>=0&&(t>=65&&90>=t||t>=97&&122>=t);)r.push(String.fromCharCode(t));const n=r.join("");switch(n.toLowerCase()){case"if":return o.IF;case"ifelse":return o.IFELSE;default:return o.getOperator(n)}}getNumber(){let e=this.currentChar;const t=this.strBuf;for(t.length=0,t[0]=String.fromCharCode(e);(e=this.nextChar())>=0&&(e>=48&&57>=e||45===e||46===e);)t.push(String.fromCharCode(e));const r=parseFloat(t.join(""));if(isNaN(r))throw new n.FormatError("Invalid floating point number: "+r);return r}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocalTilingPatternCache=t.LocalImageCache=t.LocalGStateCache=t.LocalFunctionCache=t.LocalColorSpaceCache=t.GlobalImageCache=void 0;var n=r(2),a=r(5);class i{constructor(e){this.constructor===i&&(0,n.unreachable)("Cannot initialize BaseLocalCache."),this._onlyRefs=!0===(e&&e.onlyRefs),this._onlyRefs||(this._nameRefMap=new Map,this._imageMap=new Map),this._imageCache=new a.RefSetCache}getByName(e){this._onlyRefs&&(0,n.unreachable)("Should not call `getByName` method.");const t=this._nameRefMap.get(e);return t?this.getByRef(t):this._imageMap.get(e)||null}getByRef(e){return this._imageCache.get(e)||null}set(e,t,r){(0,n.unreachable)("Abstract method `set` called.")}}t.LocalImageCache=class extends i{set(e,t=null,r){if("string"!=typeof e)throw Error('LocalImageCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}},t.LocalColorSpaceCache=class extends i{set(e=null,t=null,r){if("string"!=typeof e&&!t)throw Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(t){if(this._imageCache.has(t))return;return null!==e&&this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}},t.LocalFunctionCache=class extends i{constructor(e){super({onlyRefs:!0})}set(e=null,t,r){if(!t)throw Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,r)}},t.LocalGStateCache=class extends i{set(e,t=null,r){if("string"!=typeof e)throw Error('LocalGStateCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}},t.LocalTilingPatternCache=class extends i{constructor(e){super({onlyRefs:!0})}set(e=null,t,r){if(!t)throw Error('LocalTilingPatternCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,r)}};class s{static get NUM_PAGES_THRESHOLD(){return(0,n.shadow)(this,"NUM_PAGES_THRESHOLD",2)}static get MIN_IMAGES_TO_CACHE(){return(0,n.shadow)(this,"MIN_IMAGES_TO_CACHE",10)}static get MAX_BYTE_SIZE(){return(0,n.shadow)(this,"MAX_BYTE_SIZE",4e7)}constructor(){this._refCache=new a.RefSetCache,this._imageCache=new a.RefSetCache}get _byteSize(){let e=0;for(const t of this._imageCache)e+=t.byteSize;return e}get _cacheLimitReached(){return this._imageCache.size>=s.MIN_IMAGES_TO_CACHE&&this._byteSize>=s.MAX_BYTE_SIZE}shouldCache(e,t){const r=this._refCache.get(e),n=r?r.size+(r.has(t)?0:1):1;return!(s.NUM_PAGES_THRESHOLD>n||!this._imageCache.has(e)&&this._cacheLimitReached)}addPageIndex(e,t){let r=this._refCache.get(e);r||(r=new Set,this._refCache.put(e,r)),r.add(t)}addByteSize(e,t){const r=this._imageCache.get(e);r&&(r.byteSize||(r.byteSize=t))}getData(e,t){const r=this._refCache.get(e);if(!r)return null;if(s.NUM_PAGES_THRESHOLD>r.size)return null;const n=this._imageCache.get(e);return n?(r.add(t),n):null}setData(e,t){if(!this._refCache.has(e))throw Error('GlobalImageCache.setData - expected "addPageIndex" to have been called.');this._imageCache.has(e)||(this._cacheLimitReached?(0,n.warn)("GlobalImageCache.setData - cache limit reached."):this._imageCache.put(e,t))}clear(e=!1){e||this._refCache.clear(),this._imageCache.clear()}}t.GlobalImageCache=s},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bidi=function(e,t=-1,r=!1){let p=!0;const g=e.length;if(0===g||r)return u(e,p,r);d.length=g,f.length=g;let m,b,y=0;for(m=0;g>m;++m){d[m]=e.charAt(m);const t=e.charCodeAt(m);let r="L";t>255?1424>t||t>1524?1536>t||t>1791?1792>t||t>2220||(r="AL"):(r=i[255&t],r||(0,n.warn)("Bidi: invalid Unicode character "+t.toString(16))):r="R":r=a[t],"R"!==r&&"AL"!==r&&"AN"!==r||y++,f[m]=r}if(0===y)return p=!0,u(e,p);-1===t&&(.3>y/g&&g>4?(p=!0,t=0):(p=!1,t=1));const w=[];for(m=0;g>m;++m)w[m]=t;const v=s(t)?"R":"L",S=v,x=S;let A,k=S;for(m=0;g>m;++m)"NSM"===f[m]?f[m]=k:k=f[m];for(k=S,m=0;g>m;++m)A=f[m],"EN"===A?f[m]="AL"===k?"AN":"EN":"R"!==A&&"L"!==A&&"AL"!==A||(k=A);for(m=0;g>m;++m)A=f[m],"AL"===A&&(f[m]="R");for(m=1;g-1>m;++m)"ES"===f[m]&&"EN"===f[m-1]&&"EN"===f[m+1]&&(f[m]="EN"),"CS"!==f[m]||"EN"!==f[m-1]&&"AN"!==f[m-1]||f[m+1]!==f[m-1]||(f[m]=f[m-1]);for(m=0;g>m;++m)if("EN"===f[m]){for(let e=m-1;e>=0&&"ET"===f[e];--e)f[e]="EN";for(let e=m+1;g>e&&"ET"===f[e];++e)f[e]="EN"}for(m=0;g>m;++m)A=f[m],"WS"!==A&&"ES"!==A&&"ET"!==A&&"CS"!==A||(f[m]="ON");for(k=S,m=0;g>m;++m)A=f[m],"EN"===A?f[m]="L"===k?"L":"EN":"R"!==A&&"L"!==A||(k=A);for(m=0;g>m;++m)if("ON"===f[m]){const e=c(f,m+1,"ON");let t=S;m>0&&(t=f[m-1]);let r=x;g>e+1&&(r=f[e+1]),"L"!==t&&(t="R"),"L"!==r&&(r="R"),t===r&&l(f,m,e,t),m=e-1}for(m=0;g>m;++m)"ON"===f[m]&&(f[m]=v);for(m=0;g>m;++m)A=f[m],o(w[m])?"R"===A?w[m]+=1:"AN"!==A&&"EN"!==A||(w[m]+=2):"L"!==A&&"AN"!==A&&"EN"!==A||(w[m]+=1);let C,_=-1,F=99;for(m=0,b=w.length;b>m;++m)C=w[m],C>_&&(_=C),F>C&&s(C)&&(F=C);for(C=_;C>=F;--C){let e=-1;for(m=0,b=w.length;b>m;++m)C>w[m]?0>e||(h(d,e,m),e=-1):0>e&&(e=m);0>e||h(d,e,w.length)}for(m=0,b=d.length;b>m;++m){const e=d[m];"<"!==e&&">"!==e||(d[m]="")}return u(d.join(""),p)};var n=r(2);const a=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],i=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"];function s(e){return!!(1&e)}function o(e){return!(1&e)}function c(e,t,r){let n,a;for(n=t,a=e.length;a>n;++n)if(e[n]!==r)return n;return n}function l(e,t,r,n){for(let a=t;r>a;++a)e[a]=n}function h(e,t,r){for(let n=t,a=r-1;a>n;++n,--a){const t=e[n];e[n]=e[a],e[a]=t}}function u(e,t,r=!1){let n="ltr";return r?n="ttb":t||(n="rtl"),{str:e,dir:n}}const d=[],f=[]},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var n=r(2);const a=3285377520,i=4294901760,s=65535;t.MurmurHash3_64=class{constructor(e){this.h1=e?4294967295&e:a,this.h2=e?4294967295&e:a}update(e){let t,r;if("string"==typeof e){t=new Uint8Array(2*e.length),r=0;for(let n=0,a=e.length;a>n;n++){const a=e.charCodeAt(n);a>255?(t[r++]=a>>>8,t[r++]=255&a):t[r++]=a}}else{if(!(0,n.isArrayBuffer)(e))throw Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");t=e.slice(),r=t.byteLength}const a=r>>2,o=r-4*a,c=new Uint32Array(t.buffer,0,a);let l=0,h=0,u=this.h1,d=this.h2;const f=3432918353,p=461845907,g=11601,m=13715;for(let e=0;a>e;e++)1&e?(l=c[e],l=l*f&i|l*g&s,l=l<<15|l>>>17,l=l*p&i|l*m&s,u^=l,u=u<<13|u>>>19,u=5*u+3864292196):(h=c[e],h=h*f&i|h*g&s,h=h<<15|h>>>17,h=h*p&i|h*m&s,d^=h,d=d<<13|d>>>19,d=5*d+3864292196);switch(l=0,o){case 3:l^=t[4*a+2]<<16;case 2:l^=t[4*a+1]<<8;case 1:l^=t[4*a],l=l*f&i|l*g&s,l=l<<15|l>>>17,l=l*p&i|l*m&s,1&a?u^=l:d^=l}this.h1=u,this.h2=d}hexdigest(){let e=this.h1,t=this.h2;e^=t>>>1,e=3981806797*e&i|36045*e&s,t=4283543511*t&i|(2950163797*(t<<16|e>>>16)&i)>>>16,e^=t>>>1,e=444984403*e&i|60499*e&s,t=3301882366*t&i|(3120437893*(t<<16|e>>>16)&i)>>>16,e^=t>>>1;const r=(e>>>0).toString(16),n=(t>>>0).toString(16);return r.padStart(8,"0")+n.padStart(8,"0")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorList=void 0;var n=r(2);function a(e,t,r,n,a){let i=e;for(let e=0,r=t.length-1;r>e;e++){const r=t[e];i=i[r]||(i[r]=[])}i[t.at(-1)]={checkFn:r,iterateFn:n,processFn:a}}const i=[];a(i,[n.OPS.save,n.OPS.transform,n.OPS.paintInlineImageXObject,n.OPS.restore],null,(function(e,t){const r=e.fnArray,a=(t-(e.iCurr-3))%4;switch(a){case 0:return r[t]===n.OPS.save;case 1:return r[t]===n.OPS.transform;case 2:return r[t]===n.OPS.paintInlineImageXObject;case 3:return r[t]===n.OPS.restore}throw Error("iterateInlineImageGroup - invalid pos: "+a)}),(function(e,t){const r=e.fnArray,a=e.argsArray,i=e.iCurr,s=i-3,o=i-2,c=i-1,l=Math.min(Math.floor((t-s)/4),200);if(10>l)return t-(t-s)%4;let h=0;const u=[];let d=0,f=1,p=1;for(let e=0;l>e;e++){const t=a[o+(e<<2)],r=a[c+(e<<2)][0];f+r.width>1e3&&(h=Math.max(h,f),p+=d+2,f=0,d=0),u.push({transform:t,x:f,y:p,w:r.width,h:r.height}),f+=r.width+2,d=Math.max(d,r.height)}const g=Math.max(h,f)+1,m=p+d+1,b=new Uint8Array(g*m*4),y=g<<2;for(let e=0;l>e;e++){const t=a[c+(e<<2)][0].data,r=u[e].w<<2;let n=0,i=u[e].x+u[e].y*g<<2;b.set(t.subarray(0,r),i-y);for(let a=0,s=u[e].h;s>a;a++)b.set(t.subarray(n,n+r),i),n+=r,i+=y;for(b.set(t.subarray(n-r,n),i);i>=0;)t[i-4]=t[i],t[i-3]=t[i+1],t[i-2]=t[i+2],t[i-1]=t[i+3],t[i+r]=t[i+r-4],t[i+r+1]=t[i+r-3],t[i+r+2]=t[i+r-2],t[i+r+3]=t[i+r-1],i-=y}return r.splice(s,4*l,n.OPS.paintInlineImageXObjectGroup),a.splice(s,4*l,[{width:g,height:m,kind:n.ImageKind.RGBA_32BPP,data:b},u]),s+1})),a(i,[n.OPS.save,n.OPS.transform,n.OPS.paintImageMaskXObject,n.OPS.restore],null,(function(e,t){const r=e.fnArray,a=(t-(e.iCurr-3))%4;switch(a){case 0:return r[t]===n.OPS.save;case 1:return r[t]===n.OPS.transform;case 2:return r[t]===n.OPS.paintImageMaskXObject;case 3:return r[t]===n.OPS.restore}throw Error("iterateImageMaskGroup - invalid pos: "+a)}),(function(e,t){const r=e.fnArray,a=e.argsArray,i=e.iCurr,s=i-3,o=i-2,c=i-1;let l=Math.floor((t-s)/4);if(10>l)return t-(t-s)%4;let h,u,d=!1;const f=a[c][0],p=a[o][0],g=a[o][1],m=a[o][2],b=a[o][3];if(g===m){d=!0,h=o+4;let e=c+4;for(let t=1;l>t;t++,h+=4,e+=4)if(u=a[h],a[e][0]!==f||u[0]!==p||u[1]!==g||u[2]!==m||u[3]!==b){10>t?d=!1:l=t;break}}if(d){l=Math.min(l,1e3);const e=new Float32Array(2*l);h=o;for(let t=0;l>t;t++,h+=4)u=a[h],e[t<<1]=u[4],e[1+(t<<1)]=u[5];r.splice(s,4*l,n.OPS.paintImageMaskXObjectRepeat),a.splice(s,4*l,[f,p,g,m,b,e])}else{l=Math.min(l,100);const e=[];for(let t=0;l>t;t++){u=a[o+(t<<2)];const r=a[c+(t<<2)][0];e.push({data:r.data,width:r.width,height:r.height,interpolate:r.interpolate,count:r.count,transform:u})}r.splice(s,4*l,n.OPS.paintImageMaskXObjectGroup),a.splice(s,4*l,[e])}return s+1})),a(i,[n.OPS.save,n.OPS.transform,n.OPS.paintImageXObject,n.OPS.restore],(function(e){const t=e.argsArray,r=e.iCurr-2;return 0===t[r][1]&&0===t[r][2]}),(function(e,t){const r=e.fnArray,a=e.argsArray,i=(t-(e.iCurr-3))%4;switch(i){case 0:return r[t]===n.OPS.save;case 1:if(r[t]!==n.OPS.transform)return!1;const i=e.iCurr-2;return a[t][0]===a[i][0]&&0===a[t][1]&&0===a[t][2]&&a[t][3]===a[i][3];case 2:return r[t]===n.OPS.paintImageXObject&&a[t][0]===a[e.iCurr-1][0];case 3:return r[t]===n.OPS.restore}throw Error("iterateImageGroup - invalid pos: "+i)}),(function(e,t){const r=e.fnArray,a=e.argsArray,i=e.iCurr,s=i-3,o=i-2,c=a[i-1][0],l=a[o][0],h=a[o][3],u=Math.min(Math.floor((t-s)/4),1e3);if(3>u)return t-(t-s)%4;const d=new Float32Array(2*u);let f=o;for(let e=0;u>e;e++,f+=4){const t=a[f];d[e<<1]=t[4],d[1+(e<<1)]=t[5]}const p=[c,l,h,d];return r.splice(s,4*u,n.OPS.paintImageXObjectRepeat),a.splice(s,4*u,p),s+1})),a(i,[n.OPS.beginText,n.OPS.setFont,n.OPS.setTextMatrix,n.OPS.showText,n.OPS.endText],null,(function(e,t){const r=e.fnArray,a=e.argsArray,i=(t-(e.iCurr-4))%5;switch(i){case 0:return r[t]===n.OPS.beginText;case 1:return r[t]===n.OPS.setFont;case 2:return r[t]===n.OPS.setTextMatrix;case 3:if(r[t]!==n.OPS.showText)return!1;const i=e.iCurr-3;return a[t][0]===a[i][0]&&a[t][1]===a[i][1];case 4:return r[t]===n.OPS.endText}throw Error("iterateShowTextGroup - invalid pos: "+i)}),(function(e,t){const r=e.fnArray,n=e.argsArray,a=e.iCurr,i=a-4,s=a-3,o=a-2,c=a-1,l=a,h=n[s][0],u=n[s][1];let d=Math.min(Math.floor((t-i)/5),1e3);if(3>d)return t-(t-i)%5;let f=i;4>i||r[i-4]!==r[s]||r[i-3]!==r[o]||r[i-2]!==r[c]||r[i-1]!==r[l]||n[i-4][0]!==h||n[i-4][1]!==u||(d++,f-=5);let p=f+4;for(let e=1;d>e;e++)r.splice(p,3),n.splice(p,3),p+=2;return p+1}));class s{constructor(e){this.queue=e}_optimize(){}push(e,t){this.queue.fnArray.push(e),this.queue.argsArray.push(t),this._optimize()}flush(){}reset(){}}class o extends s{constructor(e){super(e),this.state=null,this.context={iCurr:0,fnArray:e.fnArray,argsArray:e.argsArray},this.match=null,this.lastProcessed=0}_optimize(){const e=this.queue.fnArray;let t=this.lastProcessed,r=e.length,n=this.state,a=this.match;if(!n&&!a&&t+1===r&&!i[e[t]])return void(this.lastProcessed=r);const s=this.context;for(;r>t;){if(a){if((0,a.iterateFn)(s,t)){t++;continue}if(t=(0,a.processFn)(s,t+1),r=e.length,a=null,n=null,t>=r)break}n=(n||i)[e[t]],n&&!Array.isArray(n)?(s.iCurr=t,t++,!n.checkFn||(0,n.checkFn)(s)?(a=n,n=null):n=null):t++}this.state=n,this.match=a,this.lastProcessed=t}flush(){for(;this.match;)this.lastProcessed=(0,this.match.processFn)(this.context,this.queue.fnArray.length),this.match=null,this.state=null,this._optimize()}reset(){this.state=null,this.match=null,this.lastProcessed=0}}class c{static get CHUNK_SIZE(){return(0,n.shadow)(this,"CHUNK_SIZE",1e3)}static get CHUNK_SIZE_ABOUT(){return(0,n.shadow)(this,"CHUNK_SIZE_ABOUT",this.CHUNK_SIZE-5)}constructor(e=0,t){this._streamSink=t,this.fnArray=[],this.argsArray=[],this.optimizer=!t||e&n.RenderingIntentFlag.OPLIST?new s(this):new o(this),this.dependencies=new Set,this._totalLength=0,this.weight=0,this._resolved=t?null:Promise.resolve()}get length(){return this.argsArray.length}get ready(){return this._resolved||this._streamSink.ready}get totalLength(){return this._totalLength+this.length}addOp(e,t){this.optimizer.push(e,t),this.weight++,this._streamSink&&(c.CHUNK_SIZE>this.weight&&(c.CHUNK_SIZE_ABOUT>this.weight||e!==n.OPS.restore&&e!==n.OPS.endText)||this.flush())}addImageOps(e,t,r){void 0!==r&&this.addOp(n.OPS.beginMarkedContentProps,["OC",r]),this.addOp(e,t),void 0!==r&&this.addOp(n.OPS.endMarkedContent,[])}addDependency(e){this.dependencies.has(e)||(this.dependencies.add(e),this.addOp(n.OPS.dependency,[e]))}addDependencies(e){for(const t of e)this.addDependency(t)}addOpList(e){if(e instanceof c){for(const t of e.dependencies)this.dependencies.add(t);for(let t=0,r=e.length;r>t;t++)this.addOp(e.fnArray[t],e.argsArray[t])}else(0,n.warn)('addOpList - ignoring invalid "opList" parameter.')}getIR(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}}get _transfers(){const e=[],{fnArray:t,argsArray:r,length:a}=this;for(let i=0;a>i;i++)switch(t[i]){case n.OPS.paintInlineImageXObject:case n.OPS.paintInlineImageXObjectGroup:case n.OPS.paintImageMaskXObject:const t=r[i][0];!t.cached&&t.data&&t.data.buffer instanceof ArrayBuffer&&e.push(t.data.buffer)}return e}flush(e=!1,t=null){this.optimizer.flush();const r=this.length;this._totalLength+=r,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:e,separateAnnots:t,length:r},1,this._transfers),this.dependencies.clear(),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}}t.OperatorList=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFImage=void 0;var n=r(2),a=r(64),i=r(7),s=r(14),o=r(19),c=r(27),l=r(30),h=r(5);function u(e,t,r,n){return 0>(e=t+e*r)?e=0:e>n&&(e=n),e}function d(e,t,r,n,a,i){const s=a*i;let o;o=t>8?t>16?new Uint32Array(s):new Uint16Array(s):new Uint8Array(s);const c=r/a,l=n/i;let h,u,d,f,p=0;const g=new Uint16Array(a),m=r;for(h=0;a>h;h++)g[h]=Math.floor(h*c);for(h=0;i>h;h++)for(d=Math.floor(h*l)*m,u=0;a>u;u++)f=d+g[u],o[p++]=e[f];return o}class f{constructor({xref:e,res:t,image:r,isInline:a=!1,smask:o=null,mask:c=null,isMask:u=!1,pdfFunctionFactory:d,localColorSpaceCache:p}){this.image=r;const g=r.dict,m=g.get("F","Filter");let b;if(m instanceof h.Name)b=m.name;else if(Array.isArray(m)){const t=e.fetchIfRef(m[0]);t instanceof h.Name&&(b=t.name)}switch(b){case"JPXDecode":const e=new l.JpxImage;e.parseImageProperties(r.stream),r.stream.reset(),r.width=e.width,r.height=e.height,r.bitsPerComponent=e.bitsPerComponent,r.numComps=e.componentsCount;break;case"JBIG2Decode":r.bitsPerComponent=1,r.numComps=1}let y=g.get("W","Width"),w=g.get("H","Height");if(Number.isInteger(r.width)&&r.width>0&&Number.isInteger(r.height)&&r.height>0&&(r.width!==y||r.height!==w)&&((0,n.warn)("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),y=r.width,w=r.height),1>y||1>w)throw new n.FormatError(`Invalid image width: ${y} or height: ${w}`);this.width=y,this.height=w,this.interpolate=g.get("I","Interpolate"),this.imageMask=g.get("IM","ImageMask")||!1,this.matte=g.get("Matte")||!1;let v=r.bitsPerComponent;if(!v&&(v=g.get("BPC","BitsPerComponent"),!v)){if(!this.imageMask)throw new n.FormatError("Bits per component missing in image: "+this.imageMask);v=1}if(this.bpc=v,!this.imageMask){let i=g.getRaw("CS")||g.getRaw("ColorSpace");if(!i)switch((0,n.info)("JPX images (which do not require color spaces)"),r.numComps){case 1:i=h.Name.get("DeviceGray");break;case 3:i=h.Name.get("DeviceRGB");break;case 4:i=h.Name.get("DeviceCMYK");break;default:throw Error(`JPX images with ${r.numComps} color components not supported.`)}this.colorSpace=s.ColorSpace.parse({cs:i,xref:e,resources:a?t:null,pdfFunctionFactory:d,localColorSpaceCache:p}),this.numComps=this.colorSpace.numComps}if(this.decode=g.getArray("D","Decode"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,v)||u&&!s.ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=!0;const e=(1<<v)-1;this.decodeCoefficients=[],this.decodeAddends=[];const t=this.colorSpace&&"Indexed"===this.colorSpace.name;for(let r=0,n=0;this.decode.length>r;r+=2,++n){const a=this.decode[r],i=this.decode[r+1];this.decodeCoefficients[n]=t?(i-a)/e:i-a,this.decodeAddends[n]=t?a:e*a}}o?this.smask=new f({xref:e,res:t,image:o,isInline:a,pdfFunctionFactory:d,localColorSpaceCache:p}):c&&(c instanceof i.BaseStream?c.dict.get("IM","ImageMask")?this.mask=new f({xref:e,res:t,image:c,isInline:a,isMask:!0,pdfFunctionFactory:d,localColorSpaceCache:p}):(0,n.warn)("Ignoring /Mask in image without /ImageMask."):this.mask=c)}static async buildImage({xref:e,res:t,image:r,isInline:a=!1,pdfFunctionFactory:s,localColorSpaceCache:o}){const c=r;let l=null,h=null;const u=r.dict.get("SMask"),d=r.dict.get("Mask");return u?u instanceof i.BaseStream?l=u:(0,n.warn)("Unsupported /SMask format."):d&&(d instanceof i.BaseStream||Array.isArray(d)?h=d:(0,n.warn)("Unsupported /Mask format.")),new f({xref:e,res:t,image:c,isInline:a,smask:l,mask:h,pdfFunctionFactory:s,localColorSpaceCache:o})}static createRawMask({imgArray:e,width:t,height:r,imageIsFromDecodeStream:n,inverseDecode:a,interpolate:i}){const s=(t+7>>3)*r,o=e.byteLength;let c,l;if(!n||a&&s!==o?a?(c=new Uint8Array(s),c.set(e),c.fill(255,o)):c=new Uint8Array(e):c=e,a)for(l=0;o>l;l++)c[l]^=255;return{data:c,width:t,height:r,interpolate:i}}static createMask({imgArray:e,width:t,height:r,imageIsFromDecodeStream:i,inverseDecode:s,interpolate:o}){const c=1===t&&1===r&&s===(0===e.length||!!(128&e[0]));if(c)return{isSingleOpaquePixel:c};if(n.FeatureTest.isOffscreenCanvasSupported){const n=new OffscreenCanvas(t,r),i=n.getContext("2d"),c=i.createImageData(t,r);return(0,a.applyMaskImageData)({src:e,dest:c.data,width:t,height:r,inverseDecode:s}),i.putImageData(c,0,0),{data:null,width:t,height:r,interpolate:o,bitmap:n.transferToImageBitmap()}}return this.createRawMask({imgArray:e,width:t,height:r,inverseDecode:s,imageIsFromDecodeStream:i,interpolate:o})}get drawWidth(){return Math.max(this.width,this.smask&&this.smask.width||0,this.mask&&this.mask.width||0)}get drawHeight(){return Math.max(this.height,this.smask&&this.smask.height||0,this.mask&&this.mask.height||0)}decodeBuffer(e){const t=this.bpc,r=this.numComps,n=this.decodeAddends,a=this.decodeCoefficients,i=(1<<t)-1;let s,o;if(1===t){for(s=0,o=e.length;o>s;s++)e[s]=+!e[s];return}let c=0;for(s=0,o=this.width*this.height;o>s;s++)for(let t=0;r>t;t++)e[c]=u(e[c],n[t],a[t],i),c++}getComponents(e){const t=this.bpc;if(8===t)return e;const r=this.width,n=this.height,a=this.numComps,i=r*n*a;let s,o=0;s=t>8?t>16?new Uint32Array(i):new Uint16Array(i):new Uint8Array(i);const c=r*a,l=(1<<t)-1;let h,u,d=0;if(1===t){let t,r,a;for(let i=0;n>i;i++){for(r=d+(-8&c),a=d+c;r>d;)u=e[o++],s[d]=u>>7&1,s[d+1]=u>>6&1,s[d+2]=u>>5&1,s[d+3]=u>>4&1,s[d+4]=u>>3&1,s[d+5]=u>>2&1,s[d+6]=u>>1&1,s[d+7]=1&u,d+=8;if(a>d)for(u=e[o++],t=128;a>d;)s[d++]=+!!(u&t),t>>=1}}else{let r=0;for(u=0,d=0,h=i;h>d;++d){for(d%c==0&&(u=0,r=0);t>r;)u=u<<8|e[o++],r+=8;const n=r-t;let a=u>>n;0>a?a=0:a>l&&(a=l),s[d]=a,u&=(1<<n)-1,r=n}}return s}fillOpacity(e,t,r,a,i){const s=this.smask,o=this.mask;let c,l,h,u,p,g;if(s)l=s.width,h=s.height,c=new Uint8ClampedArray(l*h),s.fillGrayBuffer(c),l===t&&h===r||(c=d(c,s.bpc,l,h,t,r));else if(o)if(o instanceof f){for(l=o.width,h=o.height,c=new Uint8ClampedArray(l*h),o.numComps=1,o.fillGrayBuffer(c),u=0,p=l*h;p>u;++u)c[u]=255-c[u];l===t&&h===r||(c=d(c,o.bpc,l,h,t,r))}else{if(!Array.isArray(o))throw new n.FormatError("Unknown mask format.");{c=new Uint8ClampedArray(t*r);const e=this.numComps;for(u=0,p=t*r;p>u;++u){let t=0;const r=u*e;for(g=0;e>g;++g){const e=i[r+g],n=2*g;if(o[n]>e||e>o[n+1]){t=255;break}}c[u]=t}}}if(c)for(u=0,g=3,p=t*a;p>u;++u,g+=4)e[g]=c[u];else for(u=0,g=3,p=t*a;p>u;++u,g+=4)e[g]=255}undoPreblend(e,t,r){const n=this.smask&&this.smask.matte;if(!n)return;const a=this.colorSpace.getRgb(n,0),i=a[0],s=a[1],o=a[2],c=t*r*4;for(let t=0;c>t;t+=4){const r=e[t+3];if(0===r){e[t]=255,e[t+1]=255,e[t+2]=255;continue}const n=255/r;e[t]=(e[t]-i)*n+i,e[t+1]=(e[t+1]-s)*n+s,e[t+2]=(e[t+2]-o)*n+o}}createImageData(e=!1){const t=this.drawWidth,r=this.drawHeight,a={width:t,height:r,interpolate:this.interpolate,kind:0,data:null},i=this.width,s=this.height,o=this.bpc,l=i*this.numComps*o+7>>3;if(!e){let e;if("DeviceGray"===this.colorSpace.name&&1===o?e=n.ImageKind.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==o||this.needsDecode||(e=n.ImageKind.RGB_24BPP),e&&!this.smask&&!this.mask&&t===i&&r===s){if(a.kind=e,a.data=this.getImageBytes(s*l,{}),this.needsDecode){(0,n.assert)(e===n.ImageKind.GRAYSCALE_1BPP,"PDFImage.createImageData: The image must be grayscale.");const t=a.data;for(let e=0,r=t.length;r>e;e++)t[e]^=255}return a}if(this.image instanceof c.JpegStream&&!this.smask&&!this.mask){let e=s*l;switch(this.colorSpace.name){case"DeviceGray":e*=3;case"DeviceRGB":case"DeviceCMYK":return a.kind=n.ImageKind.RGB_24BPP,a.data=this.getImageBytes(e,{drawWidth:t,drawHeight:r,forceRGB:!0}),a}}}const h=this.getImageBytes(s*l,{internal:!0}),u=0|h.length/l*r/s,d=this.getComponents(h);let f,p;return e||this.smask||this.mask?(a.kind=n.ImageKind.RGBA_32BPP,a.data=new Uint8ClampedArray(t*r*4),f=1,p=!0,this.fillOpacity(a.data,t,r,u,d)):(a.kind=n.ImageKind.RGB_24BPP,a.data=new Uint8ClampedArray(t*r*3),f=0,p=!1),this.needsDecode&&this.decodeBuffer(d),this.colorSpace.fillRgb(a.data,i,s,t,r,u,o,d,f),p&&this.undoPreblend(a.data,t,u),a}fillGrayBuffer(e){const t=this.numComps;if(1!==t)throw new n.FormatError("Reading gray scale from a color image: "+t);const r=this.width,a=this.height,i=this.bpc,s=this.getImageBytes(a*(r*t*i+7>>3),{internal:!0}),o=this.getComponents(s);let c,l;if(1===i){if(l=r*a,this.needsDecode)for(c=0;l>c;++c)e[c]=o[c]-1&255;else for(c=0;l>c;++c)e[c]=255&-o[c];return}this.needsDecode&&this.decodeBuffer(o),l=r*a;const h=255/((1<<i)-1);for(c=0;l>c;++c)e[c]=h*o[c]}getImageBytes(e,{drawWidth:t,drawHeight:r,forceRGB:a=!1,internal:i=!1}){this.image.reset(),this.image.drawWidth=t||this.width,this.image.drawHeight=r||this.height,this.image.forceRGB=!!a;const s=this.image.getBytes(e);return i||this.image instanceof o.DecodeStream?s:((0,n.assert)(s instanceof Uint8Array,'PDFImage.getImageBytes: Unsupported "imageBytes" type.'),new Uint8Array(s))}}t.PDFImage=f},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.applyMaskImageData=function({src:e,srcPos:t=0,dest:r,destPos:a=0,width:i,height:s,inverseDecode:o=!1}){const c=n.FeatureTest.isLittleEndian?4278190080:255,[l,h]=o?[0,c]:[c,0],u=i>>3,d=7&i,f=e.length;r=new Uint32Array(r.buffer);for(let n=0;s>n;n++){for(const n=t+u;n>t;t++){const n=f>t?e[t]:255;r[a++]=128&n?h:l,r[a++]=64&n?h:l,r[a++]=32&n?h:l,r[a++]=16&n?h:l,r[a++]=8&n?h:l,r[a++]=4&n?h:l,r[a++]=2&n?h:l,r[a++]=1&n?h:l}if(0===d)continue;const n=f>t?e[t++]:255;for(let e=0;d>e;e++)r[a++]=n&1<<7-e?h:l}return{srcPos:t,destPos:a}};var n=r(2)},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.incrementalUpdate=function({originalData:e,xrefInfo:t,newRefs:r,xref:o=null,hasXfa:h=!1,xfaDatasetsRef:u=null,hasXfaDatasetsEntry:p=!1,acroFormRef:g=null,acroForm:m=null,xfaData:b=null}){h&&function({xfaData:e,xfaDatasetsRef:t,hasXfaDatasetsEntry:r,acroFormRef:a,acroForm:o,newRefs:c,xref:h}){if(null===h)return;if(!r){if(!a)return void(0,n.warn)("XFA - Cannot save it");const e=o.get("XFA"),r=e.slice();r.splice(2,0,"datasets"),r.splice(3,0,t),o.set("XFA",r);const i=h.encrypt;let s=null;i&&(s=i.createCipherTransform(a.num,a.gen));const u=[`${a.num} ${a.gen} obj\n`];l(o,u,s),u.push("\n"),o.set("XFA",e),c.push({ref:a,data:u.join("")})}null===e&&(e=function(e,t){const r=new s.SimpleXMLParser({hasAttributes:!0}).parseFromString(e);for(const{xfa:e}of t){if(!e)continue;const{path:t,value:a}=e;if(!t)continue;const o=r.documentElement.searchNode((0,i.parseXFAPath)(t),0);o?o.childNodes=Array.isArray(a)?a.map((e=>new s.SimpleDOMNode("value",e))):[new s.SimpleDOMNode("#text",a)]:(0,n.warn)("Node not found for path: "+t)}const a=[];return r.documentElement.dump(a),a.join("")}(h.fetchIfRef(t).getString(),c));const u=h.encrypt;u&&(e=u.createCipherTransform(t.num,t.gen).encryptString(e));const d=`${t.num} ${t.gen} obj\n<< /Type /EmbeddedFile /Length ${e.length}>>\nstream\n`+e+"\nendstream\nendobj\n";c.push({ref:t,data:d})}({xfaData:b,xfaDatasetsRef:u,hasXfaDatasetsEntry:p,acroFormRef:g,acroForm:m,newRefs:r,xref:o,xrefInfo:t});const y=new a.Dict(null),w=t.newRef;let v,S;const x=e.at(-1);10===x||13===x?(v=[],S=e.length):(v=["\n"],S=e.length+1),y.set("Size",w.num+1),y.set("Prev",t.startXRef),y.set("Type",a.Name.get("XRef")),null!==t.rootRef&&y.set("Root",t.rootRef),null!==t.infoRef&&y.set("Info",t.infoRef),null!==t.encryptRef&&y.set("Encrypt",t.encryptRef),r.push({ref:w,data:""}),r=r.sort(((e,t)=>e.ref.num-t.ref.num));const A=[[0,1,65535]],k=[0,1];let C=0;for(const{ref:e,data:t}of r)C=Math.max(C,S),A.push([1,S,Math.min(e.gen,65535)]),S+=t.length,k.push(e.num,1),v.push(t);if(y.set("Index",k),Array.isArray(t.fileIds)&&t.fileIds.length>0){const e=function(e,t){const r=Math.floor(Date.now()/1e3),a=t.filename||"",i=[""+r,a,""+e];let s=i.reduce(((e,t)=>e+t.length),0);for(const e of Object.values(t.info))i.push(e),s+=e.length;const o=new Uint8Array(s);let l=0;for(const e of i)f(e,l,o),l+=e.length;return(0,n.bytesToString)((0,c.calculateMD5)(o))}(S,t);y.set("ID",[t.fileIds[0],e])}const _=[1,Math.ceil(Math.log2(C)/8),2],F=(_[0]+_[1]+_[2])*A.length;y.set("W",_),y.set("Length",F),v.push(`${w.num} ${w.gen} obj\n`),l(y,v,null),v.push(" stream\n");const T=v.reduce(((e,t)=>e+t.length),0),O=`\nendstream\nendobj\nstartxref\n${S}\n%%EOF\n`,P=new Uint8Array(e.length+T+F+O.length);P.set(e);let I=e.length;for(const e of v)f(e,I,P),I+=e.length;for(const[e,t,r]of A)I=d(e,_[0],I,P),I=d(t,_[1],I,P),I=d(r,_[2],I,P);return f(O,I,P),P},t.writeDict=l,t.writeObject=function(e,t,r,n){r.push(`${e.num} ${e.gen} obj\n`),t instanceof a.Dict?l(t,r,n):t instanceof o.BaseStream&&h(t,r,n),r.push("\nendobj\n")};var n=r(2),a=r(5),i=r(6),s=r(66),o=r(7),c=r(67);function l(e,t,r){t.push("<<");for(const n of e.getKeys())t.push(` /${(0,i.escapePDFName)(n)} `),u(e.getRaw(n),t,r);t.push(">>")}function h(e,t,r){l(e.dict,t,r),t.push(" stream\n");let n=e.getString();null!==r&&(n=r.encryptString(n)),t.push(n,"\nendstream\n")}function u(e,t,r){e instanceof a.Name?t.push("/"+(0,i.escapePDFName)(e.name)):e instanceof a.Ref?t.push(`${e.num} ${e.gen} R`):Array.isArray(e)?function(e,t,r){t.push("[");let n=!0;for(const a of e)n?n=!1:t.push(" "),u(a,t,r);t.push("]")}(e,t,r):"string"==typeof e?(null!==r&&(e=r.encryptString(e)),t.push(`(${(0,n.escapeString)(e)})`)):"number"==typeof e?t.push((0,i.numberToString)(e)):"boolean"==typeof e?t.push(""+e):e instanceof a.Dict?l(e,t,r):e instanceof o.BaseStream?h(e,t,r):null===e?t.push("null"):(0,n.warn)(`Unhandled value in writer: ${typeof e}, please file a bug.`)}function d(e,t,r,n){for(let a=t+r-1;a>r-1;a--)n[a]=255&e,e>>=8;return r+t}function f(e,t,r){for(let n=0,a=e.length;a>n;n++)r[t+n]=255&e.charCodeAt(n)}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XMLParserErrorCode=t.XMLParserBase=t.SimpleXMLParser=t.SimpleDOMNode=void 0;var n=r(6);const a={NoError:0,EndOfDocument:-1,UnterminatedCdat:-2,UnterminatedXmlDeclaration:-3,UnterminatedDoctypeDeclaration:-4,UnterminatedComment:-5,MalformedElement:-6,OutOfMemory:-7,UnterminatedAttributeValue:-8,UnterminatedElement:-9,ElementNeverBegun:-10};function i(e,t){const r=e[t];return" "===r||"\n"===r||"\r"===r||"\t"===r}t.XMLParserErrorCode=a;class s{_resolveEntities(e){return e.replace(/&([^;]+);/g,((e,t)=>{if("#x"===t.substring(0,2))return String.fromCodePoint(parseInt(t.substring(2),16));if("#"===t.substring(0,1))return String.fromCodePoint(parseInt(t.substring(1),10));switch(t){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return this.onResolveEntity(t)}))}_parseContent(e,t){const r=[];let n=t;function a(){for(;e.length>n&&i(e,n);)++n}for(;e.length>n&&!i(e,n)&&">"!==e[n]&&"/"!==e[n];)++n;const s=e.substring(t,n);for(a();e.length>n&&">"!==e[n]&&"/"!==e[n]&&"?"!==e[n];){a();let t="",s="";for(;e.length>n&&!i(e,n)&&"="!==e[n];)t+=e[n],++n;if(a(),"="!==e[n])return null;++n,a();const o=e[n];if('"'!==o&&"'"!==o)return null;const c=e.indexOf(o,++n);if(0>c)return null;s=e.substring(n,c),r.push({name:t,value:this._resolveEntities(s)}),n=c+1,a()}return{name:s,attributes:r,parsed:n-t}}_parseProcessingInstruction(e,t){let r=t;for(;e.length>r&&!i(e,r)&&">"!==e[r]&&"?"!==e[r]&&"/"!==e[r];)++r;const n=e.substring(t,r);!function(){for(;e.length>r&&i(e,r);)++r}();const a=r;for(;e.length>r&&("?"!==e[r]||">"!==e[r+1]);)++r;return{name:n,value:e.substring(a,r),parsed:r-t}}parseXml(e){let t=0;for(;e.length>t;){let r=t;if("<"===e[t]){let t;switch(++r,e[r]){case"/":if(++r,t=e.indexOf(">",r),0>t)return void this.onError(a.UnterminatedElement);this.onEndElement(e.substring(r,t)),r=t+1;break;case"?":++r;const n=this._parseProcessingInstruction(e,r);if("?>"!==e.substring(r+n.parsed,r+n.parsed+2))return void this.onError(a.UnterminatedXmlDeclaration);this.onPi(n.name,n.value),r+=n.parsed+2;break;case"!":if("--"===e.substring(r+1,r+3)){if(t=e.indexOf("--\x3e",r+3),0>t)return void this.onError(a.UnterminatedComment);this.onComment(e.substring(r+3,t)),r=t+3}else if("[CDATA["===e.substring(r+1,r+8)){if(t=e.indexOf("]]>",r+8),0>t)return void this.onError(a.UnterminatedCdat);this.onCdata(e.substring(r+8,t)),r=t+3}else{if("DOCTYPE"!==e.substring(r+1,r+8))return void this.onError(a.MalformedElement);{const n=e.indexOf("[",r+8);let i=!1;if(t=e.indexOf(">",r+8),0>t)return void this.onError(a.UnterminatedDoctypeDeclaration);if(n>0&&t>n){if(t=e.indexOf("]>",r+8),0>t)return void this.onError(a.UnterminatedDoctypeDeclaration);i=!0}const s=e.substring(r+8,t+(i?1:0));this.onDoctype(s),r=t+(i?2:1)}}break;default:const i=this._parseContent(e,r);if(null===i)return void this.onError(a.MalformedElement);let s=!1;if("/>"===e.substring(r+i.parsed,r+i.parsed+2))s=!0;else if(">"!==e.substring(r+i.parsed,r+i.parsed+1))return void this.onError(a.UnterminatedElement);this.onBeginElement(i.name,i.attributes,s),r+=i.parsed+(s?2:1)}}else{for(;e.length>r&&"<"!==e[r];)r++;const n=e.substring(t,r);this.onText(this._resolveEntities(n))}t=r}}onResolveEntity(e){return`&${e};`}onPi(e,t){}onComment(e){}onCdata(e){}onDoctype(e){}onText(e){}onBeginElement(e,t,r){}onEndElement(e){}onError(e){}}t.XMLParserBase=s;class o{constructor(e,t){this.nodeName=e,this.nodeValue=t,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){return this.childNodes&&this.childNodes[0]}get nextSibling(){const e=this.parentNode.childNodes;if(!e)return;const t=e.indexOf(this);return-1!==t?e[t+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map((function(e){return e.textContent})).join(""):this.nodeValue||""}get children(){return this.childNodes||[]}hasChildNodes(){return this.childNodes&&this.childNodes.length>0}searchNode(e,t){if(t>=e.length)return this;const r=e[t],n=[];let a=this;for(;;){if(r.name===a.nodeName){if(0!==r.pos){if(0===n.length)return null;{const[i]=n.pop();let s=0;for(const n of i.childNodes)if(r.name===n.nodeName){if(s===r.pos)return n.searchNode(e,t+1);s++}return a.searchNode(e,t+1)}}{const r=a.searchNode(e,t+1);if(null!==r)return r}}if(a.childNodes&&0!==a.childNodes.length)n.push([a,0]),a=a.childNodes[0];else{if(0===n.length)return null;for(;0!==n.length;){const[e,t]=n.pop(),r=t+1;if(e.childNodes.length>r){n.push([e,r]),a=e.childNodes[r];break}}if(0===n.length)return null}}}dump(e){if("#text"!==this.nodeName){if(e.push("<"+this.nodeName),this.attributes)for(const t of this.attributes)e.push(` ${t.name}="${(0,n.encodeToXmlString)(t.value)}"`);if(this.hasChildNodes()){e.push(">");for(const t of this.childNodes)t.dump(e);e.push(`</${this.nodeName}>`)}else e.push(this.nodeValue?`>${(0,n.encodeToXmlString)(this.nodeValue)}</${this.nodeName}>`:"/>")}else e.push((0,n.encodeToXmlString)(this.nodeValue))}}t.SimpleDOMNode=o,t.SimpleXMLParser=class extends s{constructor({hasAttributes:e=!1,lowerCaseName:t=!1}){super(),this._currentFragment=null,this._stack=null,this._errorCode=a.NoError,this._hasAttributes=e,this._lowerCaseName=t}parseFromString(e){if(this._currentFragment=[],this._stack=[],this._errorCode=a.NoError,this.parseXml(e),this._errorCode!==a.NoError)return;const[t]=this._currentFragment;return t?{documentElement:t}:void 0}onText(e){if(function(e){for(let t=0,r=e.length;r>t;t++)if(!i(e,t))return!1;return!0}(e))return;const t=new o("#text",e);this._currentFragment.push(t)}onCdata(e){const t=new o("#text",e);this._currentFragment.push(t)}onBeginElement(e,t,r){this._lowerCaseName&&(e=e.toLowerCase());const n=new o(e);n.childNodes=[],this._hasAttributes&&(n.attributes=t),this._currentFragment.push(n),r||(this._stack.push(this._currentFragment),this._currentFragment=n.childNodes)}onEndElement(e){this._currentFragment=this._stack.pop()||[];const t=this._currentFragment.at(-1);if(!t)return null;for(let e=0,r=t.childNodes.length;r>e;e++)t.childNodes[e].parentNode=t;return t}onError(e){this._errorCode=e}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateSHA256=t.calculateMD5=t.PDF20=t.PDF17=t.CipherTransformFactory=t.ARCFourCipher=t.AES256Cipher=t.AES128Cipher=void 0,t.calculateSHA384=u,t.calculateSHA512=void 0;var n=r(2),a=r(5),i=r(68);class s{constructor(e){this.a=0,this.b=0;const t=new Uint8Array(256),r=e.length;for(let e=0;256>e;++e)t[e]=e;for(let n=0,a=0;256>n;++n){const i=t[n];a=a+i+e[n%r]&255,t[n]=t[a],t[a]=i}this.s=t}encryptBlock(e){let t=this.a,r=this.b;const n=this.s,a=e.length,i=new Uint8Array(a);for(let s=0;a>s;++s){t=t+1&255;const a=n[t];r=r+a&255;const o=n[r];n[t]=o,n[r]=a,i[s]=e[s]^n[a+o&255]}return this.a=t,this.b=r,i}decryptBlock(e){return this.encryptBlock(e)}encrypt(e){return this.encryptBlock(e)}}t.ARCFourCipher=s;const o=function(){const e=new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]),t=new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]);return function(r,n,a){let i=1732584193,s=-271733879,o=-1732584194,c=271733878;const l=a+72&-64,h=new Uint8Array(l);let u,d;for(u=0;a>u;++u)h[u]=r[n++];h[u++]=128;const f=l-8;for(;f>u;)h[u++]=0;h[u++]=a<<3&255,h[u++]=a>>5&255,h[u++]=a>>13&255,h[u++]=a>>21&255,h[u++]=a>>>29&255,h[u++]=0,h[u++]=0,h[u++]=0;const p=new Int32Array(16);for(u=0;l>u;){for(d=0;16>d;++d,u+=4)p[d]=h[u]|h[u+1]<<8|h[u+2]<<16|h[u+3]<<24;let r,n,a=i,l=s,f=o,g=c;for(d=0;64>d;++d){16>d?(r=l&f|~l&g,n=d):32>d?(r=g&l|~g&f,n=5*d+1&15):48>d?(r=l^f^g,n=3*d+5&15):(r=f^(l|~g),n=7*d&15);const i=g,s=a+r+t[d]+p[n]|0,o=e[d];g=f,f=l,l=l+(s<<o|s>>>32-o)|0,a=i}i=i+a|0,s=s+l|0,o=o+f|0,c=c+g|0}return new Uint8Array([255&i,i>>8&255,i>>16&255,i>>>24&255,255&s,s>>8&255,s>>16&255,s>>>24&255,255&o,o>>8&255,o>>16&255,o>>>24&255,255&c,c>>8&255,c>>16&255,c>>>24&255])}}();t.calculateMD5=o;class c{constructor(e,t){this.high=0|e,this.low=0|t}and(e){this.high&=e.high,this.low&=e.low}xor(e){this.high^=e.high,this.low^=e.low}or(e){this.high|=e.high,this.low|=e.low}shiftRight(e){32>e?(this.low=this.low>>>e|this.high<<32-e,this.high=this.high>>>e|0):(this.low=this.high>>>e-32|0,this.high=0)}shiftLeft(e){32>e?(this.high=this.high<<e|this.low>>>32-e,this.low<<=e):(this.high=this.low<<e-32,this.low=0)}rotateRight(e){let t,r;32&e?(r=this.low,t=this.high):(t=this.low,r=this.high),this.low=t>>>(e&=31)|r<<32-e,this.high=r>>>e|t<<32-e}not(){this.high=~this.high,this.low=~this.low}add(e){const t=(this.low>>>0)+(e.low>>>0);let r=(this.high>>>0)+(e.high>>>0);t>4294967295&&(r+=1),this.low=0|t,this.high=0|r}copyTo(e,t){e[t]=this.high>>>24&255,e[t+1]=this.high>>16&255,e[t+2]=this.high>>8&255,e[t+3]=255&this.high,e[t+4]=this.low>>>24&255,e[t+5]=this.low>>16&255,e[t+6]=this.low>>8&255,e[t+7]=255&this.low}assign(e){this.high=e.high,this.low=e.low}}const l=function(){function e(e,t){return e>>>t|e<<32-t}function t(e,t,r){return e&t^~e&r}function r(e,t,r){return e&t^e&r^t&r}function n(t){return e(t,2)^e(t,13)^e(t,22)}function a(t){return e(t,6)^e(t,11)^e(t,25)}function i(t){return e(t,7)^e(t,18)^t>>>3}const s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return function(o,c,l){let h=1779033703,u=3144134277,d=1013904242,f=2773480762,p=1359893119,g=2600822924,m=528734635,b=1541459225;const y=64*Math.ceil((l+9)/64),w=new Uint8Array(y);let v,S;for(v=0;l>v;++v)w[v]=o[c++];w[v++]=128;const x=y-8;for(;x>v;)w[v++]=0;w[v++]=0,w[v++]=0,w[v++]=0,w[v++]=l>>>29&255,w[v++]=l>>21&255,w[v++]=l>>13&255,w[v++]=l>>5&255,w[v++]=l<<3&255;const A=new Uint32Array(64);for(v=0;y>v;){for(S=0;16>S;++S)A[S]=w[v]<<24|w[v+1]<<16|w[v+2]<<8|w[v+3],v+=4;for(S=16;64>S;++S)A[S]=0|(e(k=A[S-2],17)^e(k,19)^k>>>10)+A[S-7]+i(A[S-15])+A[S-16];let o,c,l=h,y=u,x=d,C=f,_=p,F=g,T=m,O=b;for(S=0;64>S;++S)o=O+a(_)+t(_,F,T)+s[S]+A[S],c=n(l)+r(l,y,x),O=T,T=F,F=_,_=C+o|0,C=x,x=y,y=l,l=o+c|0;h=h+l|0,u=u+y|0,d=d+x|0,f=f+C|0,p=p+_|0,g=g+F|0,m=m+T|0,b=b+O|0}var k;return new Uint8Array([h>>24&255,h>>16&255,h>>8&255,255&h,u>>24&255,u>>16&255,u>>8&255,255&u,d>>24&255,d>>16&255,d>>8&255,255&d,f>>24&255,f>>16&255,f>>8&255,255&f,p>>24&255,p>>16&255,p>>8&255,255&p,g>>24&255,g>>16&255,g>>8&255,255&g,m>>24&255,m>>16&255,m>>8&255,255&m,b>>24&255,b>>16&255,b>>8&255,255&b])}}();t.calculateSHA256=l;const h=function(){function e(e,t,r,n,a){e.assign(t),e.and(r),a.assign(t),a.not(),a.and(n),e.xor(a)}function t(e,t,r,n,a){e.assign(t),e.and(r),a.assign(t),a.and(n),e.xor(a),a.assign(r),a.and(n),e.xor(a)}function r(e,t,r){e.assign(t),e.rotateRight(28),r.assign(t),r.rotateRight(34),e.xor(r),r.assign(t),r.rotateRight(39),e.xor(r)}function n(e,t,r){e.assign(t),e.rotateRight(14),r.assign(t),r.rotateRight(18),e.xor(r),r.assign(t),r.rotateRight(41),e.xor(r)}function a(e,t,r){e.assign(t),e.rotateRight(1),r.assign(t),r.rotateRight(8),e.xor(r),r.assign(t),r.shiftRight(7),e.xor(r)}function i(e,t,r){e.assign(t),e.rotateRight(19),r.assign(t),r.rotateRight(61),e.xor(r),r.assign(t),r.shiftRight(6),e.xor(r)}const s=[new c(1116352408,3609767458),new c(1899447441,602891725),new c(3049323471,3964484399),new c(3921009573,2173295548),new c(961987163,4081628472),new c(1508970993,3053834265),new c(2453635748,2937671579),new c(2870763221,3664609560),new c(3624381080,2734883394),new c(310598401,1164996542),new c(607225278,1323610764),new c(1426881987,3590304994),new c(1925078388,4068182383),new c(2162078206,991336113),new c(2614888103,633803317),new c(3248222580,3479774868),new c(3835390401,2666613458),new c(4022224774,944711139),new c(264347078,2341262773),new c(604807628,2007800933),new c(770255983,1495990901),new c(1249150122,1856431235),new c(1555081692,3175218132),new c(1996064986,2198950837),new c(2554220882,3999719339),new c(2821834349,766784016),new c(2952996808,2566594879),new c(3210313671,3203337956),new c(3336571891,1034457026),new c(3584528711,2466948901),new c(113926993,3758326383),new c(338241895,168717936),new c(666307205,1188179964),new c(773529912,1546045734),new c(1294757372,1522805485),new c(1396182291,2643833823),new c(1695183700,2343527390),new c(1986661051,1014477480),new c(2177026350,1206759142),new c(2456956037,344077627),new c(2730485921,1290863460),new c(2820302411,3158454273),new c(3259730800,3505952657),new c(3345764771,106217008),new c(3516065817,3606008344),new c(3600352804,1432725776),new c(4094571909,1467031594),new c(275423344,851169720),new c(430227734,3100823752),new c(506948616,1363258195),new c(659060556,3750685593),new c(883997877,3785050280),new c(958139571,3318307427),new c(1322822218,3812723403),new c(1537002063,2003034995),new c(1747873779,3602036899),new c(1955562222,1575990012),new c(2024104815,1125592928),new c(2227730452,2716904306),new c(2361852424,442776044),new c(2428436474,593698344),new c(2756734187,3733110249),new c(3204031479,2999351573),new c(3329325298,3815920427),new c(3391569614,3928383900),new c(3515267271,566280711),new c(3940187606,3454069534),new c(4118630271,4000239992),new c(116418474,1914138554),new c(174292421,2731055270),new c(289380356,3203993006),new c(460393269,320620315),new c(685471733,587496836),new c(852142971,1086792851),new c(1017036298,365543100),new c(1126000580,2618297676),new c(1288033470,3409855158),new c(1501505948,4234509866),new c(1607167915,987167468),new c(1816402316,1246189591)];return function(o,l,h,u=!1){let d,f,p,g,m,b,y,w;u?(d=new c(3418070365,3238371032),f=new c(1654270250,914150663),p=new c(2438529370,812702999),g=new c(355462360,4144912697),m=new c(1731405415,4290775857),b=new c(2394180231,1750603025),y=new c(3675008525,1694076839),w=new c(1203062813,3204075428)):(d=new c(1779033703,4089235720),f=new c(3144134277,2227873595),p=new c(1013904242,4271175723),g=new c(2773480762,1595750129),m=new c(1359893119,2917565137),b=new c(2600822924,725511199),y=new c(528734635,4215389547),w=new c(1541459225,327033209));const v=128*Math.ceil((h+17)/128),S=new Uint8Array(v);let x,A;for(x=0;h>x;++x)S[x]=o[l++];S[x++]=128;const k=v-16;for(;k>x;)S[x++]=0;S[x++]=0,S[x++]=0,S[x++]=0,S[x++]=0,S[x++]=0,S[x++]=0,S[x++]=0,S[x++]=0,S[x++]=0,S[x++]=0,S[x++]=0,S[x++]=h>>>29&255,S[x++]=h>>21&255,S[x++]=h>>13&255,S[x++]=h>>5&255,S[x++]=h<<3&255;const C=Array(80);for(x=0;80>x;x++)C[x]=new c(0,0);let _=new c(0,0),F=new c(0,0),T=new c(0,0),O=new c(0,0),P=new c(0,0),I=new c(0,0),E=new c(0,0),M=new c(0,0);const R=new c(0,0),D=new c(0,0),N=new c(0,0),L=new c(0,0);let j,B;for(x=0;v>x;){for(A=0;16>A;++A)C[A].high=S[x]<<24|S[x+1]<<16|S[x+2]<<8|S[x+3],C[A].low=S[x+4]<<24|S[x+5]<<16|S[x+6]<<8|S[x+7],x+=8;for(A=16;80>A;++A)j=C[A],i(j,C[A-2],L),j.add(C[A-7]),a(N,C[A-15],L),j.add(N),j.add(C[A-16]);for(_.assign(d),F.assign(f),T.assign(p),O.assign(g),P.assign(m),I.assign(b),E.assign(y),M.assign(w),A=0;80>A;++A)R.assign(M),n(N,P,L),R.add(N),e(N,P,I,E,L),R.add(N),R.add(s[A]),R.add(C[A]),r(D,_,L),t(N,_,F,T,L),D.add(N),j=M,M=E,E=I,I=P,O.add(R),P=O,O=T,T=F,F=_,j.assign(R),j.add(D),_=j;d.add(_),f.add(F),p.add(T),g.add(O),m.add(P),b.add(I),y.add(E),w.add(M)}return u?(B=new Uint8Array(48),d.copyTo(B,0),f.copyTo(B,8),p.copyTo(B,16),g.copyTo(B,24),m.copyTo(B,32),b.copyTo(B,40)):(B=new Uint8Array(64),d.copyTo(B,0),f.copyTo(B,8),p.copyTo(B,16),g.copyTo(B,24),m.copyTo(B,32),b.copyTo(B,40),y.copyTo(B,48),w.copyTo(B,56)),B}}();function u(e,t,r){return h(e,t,r,!0)}t.calculateSHA512=h;class d{decryptBlock(e){return e}encrypt(e){return e}}class f{constructor(){this.constructor===f&&(0,n.unreachable)("Cannot initialize AESBaseCipher."),this._s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),this._inv_s=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),this._mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]),this._mixCol=new Uint8Array(256);for(let e=0;256>e;e++)this._mixCol[e]=128>e?e<<1:e<<1^27;this.buffer=new Uint8Array(16),this.bufferPosition=0}_expandKey(e){(0,n.unreachable)("Cannot call `_expandKey` on the base class")}_decrypt(e,t){let r,n,a;const i=new Uint8Array(16);i.set(e);for(let e=0,r=this._keySize;16>e;++e,++r)i[e]^=t[r];for(let e=this._cyclesOfRepetition-1;e>=1;--e){r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],n=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=n,r=i[15],n=i[11],a=i[7],i[15]=i[3],i[11]=r,i[7]=n,i[3]=a;for(let e=0;16>e;++e)i[e]=this._inv_s[i[e]];for(let r=0,n=16*e;16>r;++r,++n)i[r]^=t[n];for(let e=0;16>e;e+=4){const t=this._mix[i[e+1]],n=this._mix[i[e+2]],a=this._mix[i[e+3]];r=this._mix[i[e]]^t>>>8^t<<24^n>>>16^n<<16^a>>>24^a<<8,i[e]=r>>>24&255,i[e+1]=r>>16&255,i[e+2]=r>>8&255,i[e+3]=255&r}}r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],n=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=n,r=i[15],n=i[11],a=i[7],i[15]=i[3],i[11]=r,i[7]=n,i[3]=a;for(let e=0;16>e;++e)i[e]=this._inv_s[i[e]],i[e]^=t[e];return i}_encrypt(e,t){const r=this._s;let n,a,i;const s=new Uint8Array(16);s.set(e);for(let e=0;16>e;++e)s[e]^=t[e];for(let e=1;this._cyclesOfRepetition>e;e++){for(let e=0;16>e;++e)s[e]=r[s[e]];i=s[1],s[1]=s[5],s[5]=s[9],s[9]=s[13],s[13]=i,i=s[2],a=s[6],s[2]=s[10],s[6]=s[14],s[10]=i,s[14]=a,i=s[3],a=s[7],n=s[11],s[3]=s[15],s[7]=i,s[11]=a,s[15]=n;for(let e=0;16>e;e+=4){const t=s[e+0],r=s[e+1],a=s[e+2],i=s[e+3];n=t^r^a^i,s[e+0]^=n^this._mixCol[t^r],s[e+1]^=n^this._mixCol[r^a],s[e+2]^=n^this._mixCol[a^i],s[e+3]^=n^this._mixCol[i^t]}for(let r=0,n=16*e;16>r;++r,++n)s[r]^=t[n]}for(let e=0;16>e;++e)s[e]=r[s[e]];i=s[1],s[1]=s[5],s[5]=s[9],s[9]=s[13],s[13]=i,i=s[2],a=s[6],s[2]=s[10],s[6]=s[14],s[10]=i,s[14]=a,i=s[3],a=s[7],n=s[11],s[3]=s[15],s[7]=i,s[11]=a,s[15]=n;for(let e=0,r=this._keySize;16>e;++e,++r)s[e]^=t[r];return s}_decryptBlock2(e,t){const r=e.length;let n=this.buffer,a=this.bufferPosition;const i=[];let s=this.iv;for(let t=0;r>t;++t){if(n[a]=e[t],++a,16>a)continue;const r=this._decrypt(n,this._key);for(let e=0;16>e;++e)r[e]^=s[e];s=n,i.push(r),n=new Uint8Array(16),a=0}if(this.buffer=n,this.bufferLength=a,this.iv=s,0===i.length)return new Uint8Array(0);let o=16*i.length;if(t){const e=i.at(-1);let t=e[15];if(16>=t){for(let r=15,n=16-t;r>=n;--r)if(e[r]!==t){t=0;break}o-=t,i[i.length-1]=e.subarray(0,16-t)}}const c=new Uint8Array(o);for(let e=0,t=0,r=i.length;r>e;++e,t+=16)c.set(i[e],t);return c}decryptBlock(e,t,r=null){const n=e.length,a=this.buffer;let i=this.bufferPosition;if(r)this.iv=r;else{for(let t=0;16>i&&n>t;++t,++i)a[i]=e[t];if(16>i)return this.bufferLength=i,new Uint8Array(0);this.iv=a,e=e.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=this._decryptBlock2,this.decryptBlock(e,t)}encrypt(e,t){const r=e.length;let n=this.buffer,a=this.bufferPosition;const i=[];t||(t=new Uint8Array(16));for(let s=0;r>s;++s){if(n[a]=e[s],++a,16>a)continue;for(let e=0;16>e;++e)n[e]^=t[e];const r=this._encrypt(n,this._key);t=r,i.push(r),n=new Uint8Array(16),a=0}if(this.buffer=n,this.bufferLength=a,this.iv=t,0===i.length)return new Uint8Array(0);const s=new Uint8Array(16*i.length);for(let e=0,t=0,r=i.length;r>e;++e,t+=16)s.set(i[e],t);return s}}class p extends f{constructor(e){super(),this._cyclesOfRepetition=10,this._keySize=160,this._rcon=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),this._key=this._expandKey(e)}_expandKey(e){const t=this._s,r=this._rcon,n=new Uint8Array(176);n.set(e);for(let e=16,a=1;176>e;++a){let i=n[e-3],s=n[e-2],o=n[e-1],c=n[e-4];i=t[i],s=t[s],o=t[o],c=t[c],i^=r[a];for(let t=0;4>t;++t)n[e]=i^=n[e-16],e++,n[e]=s^=n[e-16],e++,n[e]=o^=n[e-16],e++,n[e]=c^=n[e-16],e++}return n}}t.AES128Cipher=p;class g extends f{constructor(e){super(),this._cyclesOfRepetition=14,this._keySize=224,this._key=this._expandKey(e)}_expandKey(e){const t=this._s,r=new Uint8Array(240);r.set(e);let n,a,i,s,o=1;for(let e=32,c=1;240>e;++c){e%32==16?(n=t[n],a=t[a],i=t[i],s=t[s]):e%32==0&&(n=r[e-3],a=r[e-2],i=r[e-1],s=r[e-4],n=t[n],a=t[a],i=t[i],s=t[s],n^=o,256>(o<<=1)||(o=255&(27^o)));for(let t=0;4>t;++t)r[e]=n^=r[e-32],e++,r[e]=a^=r[e-32],e++,r[e]=i^=r[e-32],e++,r[e]=s^=r[e-32],e++}return r}}t.AES256Cipher=g;class m{checkOwnerPassword(e,t,r,a){const i=new Uint8Array(e.length+56);i.set(e,0),i.set(t,e.length),i.set(r,e.length+t.length);const s=l(i,0,i.length);return(0,n.isArrayEqual)(s,a)}checkUserPassword(e,t,r){const a=new Uint8Array(e.length+8);a.set(e,0),a.set(t,e.length);const i=l(a,0,a.length);return(0,n.isArrayEqual)(i,r)}getOwnerKey(e,t,r,n){const a=new Uint8Array(e.length+56);a.set(e,0),a.set(t,e.length),a.set(r,e.length+t.length);const i=l(a,0,a.length);return new g(i).decryptBlock(n,!1,new Uint8Array(16))}getUserKey(e,t,r){const n=new Uint8Array(e.length+8);n.set(e,0),n.set(t,e.length);const a=l(n,0,n.length);return new g(a).decryptBlock(r,!1,new Uint8Array(16))}}t.PDF17=m;const b=function(){function e(e,t,r){let n=l(t,0,t.length).subarray(0,32),a=[0],i=0;for(;64>i||a.at(-1)>i-32;){const t=e.length+n.length+r.length,s=new Uint8Array(t);let o=0;s.set(e,o),o+=e.length,s.set(n,o),o+=n.length,s.set(r,o);const c=new Uint8Array(64*t);for(let e=0,r=0;64>e;e++,r+=t)c.set(s,r);a=new p(n.subarray(0,16)).encrypt(c,n.subarray(16,32));let d=0;for(let e=0;16>e;e++)d*=1,d%=3,d+=(a[e]>>>0)%3,d%=3;0===d?n=l(a,0,a.length):1===d?n=u(a,0,a.length):2===d&&(n=h(a,0,a.length)),i++}return n.subarray(0,32)}return class{hash(t,r,n){return e(t,r,n)}checkOwnerPassword(t,r,a,i){const s=new Uint8Array(t.length+56);s.set(t,0),s.set(r,t.length),s.set(a,t.length+r.length);const o=e(t,s,a);return(0,n.isArrayEqual)(o,i)}checkUserPassword(t,r,a){const i=new Uint8Array(t.length+8);i.set(t,0),i.set(r,t.length);const s=e(t,i,[]);return(0,n.isArrayEqual)(s,a)}getOwnerKey(t,r,n,a){const i=new Uint8Array(t.length+56);i.set(t,0),i.set(r,t.length),i.set(n,t.length+r.length);const s=e(t,i,n);return new g(s).decryptBlock(a,!1,new Uint8Array(16))}getUserKey(t,r,n){const a=new Uint8Array(t.length+8);a.set(t,0),a.set(r,t.length);const i=e(t,a,[]);return new g(i).decryptBlock(n,!1,new Uint8Array(16))}}}();t.PDF20=b;class y{constructor(e,t){this.StringCipherConstructor=e,this.StreamCipherConstructor=t}createStream(e,t){const r=new this.StreamCipherConstructor;return new i.DecryptStream(e,t,(function(e,t){return r.decryptBlock(e,t)}))}decryptString(e){const t=new this.StringCipherConstructor;let r=(0,n.stringToBytes)(e);return r=t.decryptBlock(r,!0),(0,n.bytesToString)(r)}encryptString(e){const t=new this.StringCipherConstructor;if(t instanceof f){const r=16-e.length%16;e+=String.fromCharCode(r).repeat(r);const a=new Uint8Array(16);if("undefined"!=typeof crypto)crypto.getRandomValues(a);else for(let e=0;16>e;e++)a[e]=Math.floor(256*Math.random());let i=(0,n.stringToBytes)(e);i=t.encrypt(i,a);const s=new Uint8Array(16+i.length);return s.set(a),s.set(i,16),(0,n.bytesToString)(s)}let r=(0,n.stringToBytes)(e);return r=t.encrypt(r),(0,n.bytesToString)(r)}}const w=function(){const e=new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]);function t(t,r,n,a,i,c,l,h){const u=new Uint8Array(40+n.length+t.length);let d,f,p=0;if(r)for(f=Math.min(32,r.length);f>p;++p)u[p]=r[p];for(d=0;32>p;)u[p++]=e[d++];for(d=0,f=n.length;f>d;++d)u[p++]=n[d];for(u[p++]=255&i,u[p++]=i>>8&255,u[p++]=i>>16&255,u[p++]=i>>>24&255,d=0,f=t.length;f>d;++d)u[p++]=t[d];4>c||h||(u[p++]=255,u[p++]=255,u[p++]=255,u[p++]=255);let g=o(u,0,p);const m=l>>3;if(c>=3)for(d=0;50>d;++d)g=o(g,0,m);const b=g.subarray(0,m);let y,w;if(3>c){for(y=new s(b),w=y.encryptBlock(e),d=0,f=w.length;f>d;++d)if(a[d]!==w[d])return null}else{for(p=0;32>p;++p)u[p]=e[p];for(d=0,f=t.length;f>d;++d)u[p++]=t[d];y=new s(b),w=y.encryptBlock(o(u,0,p)),f=b.length;const r=new Uint8Array(f);for(d=1;19>=d;++d){for(let e=0;f>e;++e)r[e]=b[e]^d;y=new s(r),w=y.encryptBlock(w)}for(d=0,f=w.length;f>d;++d)if(a[d]!==w[d])return null}return b}const r=a.Name.get("Identity");function i(e,t,r,n=!1){const a=new Uint8Array(r.length+9),i=r.length;let s;for(s=0;i>s;++s)a[s]=r[s];return a[s++]=255&e,a[s++]=e>>8&255,a[s++]=e>>16&255,a[s++]=255&t,a[s++]=t>>8&255,n&&(a[s++]=115,a[s++]=65,a[s++]=108,a[s++]=84),o(a,0,s).subarray(0,Math.min(r.length+5,16))}function c(e,t,r,o,c){if(!(t instanceof a.Name))throw new n.FormatError("Invalid crypt filter name.");const l=e.get(t.name);let h;if(null!=l&&(h=l.get("CFM")),!h||"None"===h.name)return function(){return new d};if("V2"===h.name)return function(){return new s(i(r,o,c,!1))};if("AESV2"===h.name)return function(){return new p(i(r,o,c,!0))};if("AESV3"===h.name)return function(){return new g(c)};throw new n.FormatError("Unknown crypto method")}return class{constructor(i,c,l){const h=i.get("Filter");if(!(0,a.isName)(h,"Standard"))throw new n.FormatError("unknown encryption method");this.filterName=h.name,this.dict=i;const u=i.get("V");if(!Number.isInteger(u)||1!==u&&2!==u&&4!==u&&5!==u)throw new n.FormatError("unsupported encryption algorithm");this.algorithm=u;let d=i.get("Length");if(!d)if(u>3){const e=i.get("CF"),t=i.get("StmF");if(e instanceof a.Dict&&t instanceof a.Name){e.suppressEncryption=!0;const r=e.get(t.name);d=r&&r.get("Length")||128,40>d&&(d<<=3)}}else d=40;if(!Number.isInteger(d)||40>d||d%8!=0)throw new n.FormatError("invalid key length");const f=(0,n.stringToBytes)(i.get("O")).subarray(0,32),p=(0,n.stringToBytes)(i.get("U")).subarray(0,32),g=i.get("P"),y=i.get("R"),w=(4===u||5===u)&&!1!==i.get("EncryptMetadata");this.encryptMetadata=w;const v=(0,n.stringToBytes)(c);let S,x;if(l){if(6===y)try{l=(0,n.utf8StringToString)(l)}catch(e){(0,n.warn)("CipherTransformFactory: Unable to convert UTF8 encoded password.")}S=(0,n.stringToBytes)(l)}if(5!==u)x=t(v,S,f,p,g,y,d,w);else{const e=(0,n.stringToBytes)(i.get("O")).subarray(32,40),t=(0,n.stringToBytes)(i.get("O")).subarray(40,48),r=(0,n.stringToBytes)(i.get("U")).subarray(0,48),a=(0,n.stringToBytes)(i.get("U")).subarray(32,40),s=(0,n.stringToBytes)(i.get("U")).subarray(40,48),o=(0,n.stringToBytes)(i.get("OE")),c=(0,n.stringToBytes)(i.get("UE"));(0,n.stringToBytes)(i.get("Perms")),x=function(e,t,r,n,a,i,s,o,c,l,h){let u;return t=t?t.subarray(0,Math.min(127,t.length)):[],u=6===e?new b:new m,u.checkUserPassword(t,o,s)?u.getUserKey(t,c,h):t.length&&u.checkOwnerPassword(t,n,i,r)?u.getOwnerKey(t,a,i,l):null}(y,S,f,e,t,r,p,a,s,o,c)}if(!x&&!l)throw new n.PasswordException("No password given",n.PasswordResponses.NEED_PASSWORD);if(!x&&l){const r=function(t,r,n,a){const i=new Uint8Array(32);let c=0;const l=Math.min(32,t.length);for(;l>c;++c)i[c]=t[c];let h=0;for(;32>c;)i[c++]=e[h++];let u=o(i,0,c);const d=a>>3;if(n>=3)for(h=0;50>h;++h)u=o(u,0,u.length);let f,p;if(3>n)f=new s(u.subarray(0,d)),p=f.encryptBlock(r);else{p=r;const e=new Uint8Array(d);for(h=19;h>=0;h--){for(let t=0;d>t;++t)e[t]=u[t]^h;f=new s(e),p=f.encryptBlock(p)}}return p}(S,f,y,d);x=t(v,r,f,p,g,y,d,w)}if(!x)throw new n.PasswordException("Incorrect Password",n.PasswordResponses.INCORRECT_PASSWORD);if(this.encryptionKey=x,u>=4){const e=i.get("CF");e instanceof a.Dict&&(e.suppressEncryption=!0),this.cf=e,this.stmf=i.get("StmF")||r,this.strf=i.get("StrF")||r,this.eff=i.get("EFF")||this.stmf}}createCipherTransform(e,t){if(4===this.algorithm||5===this.algorithm)return new y(c(this.cf,this.strf,e,t,this.encryptionKey),c(this.cf,this.stmf,e,t,this.encryptionKey));const r=i(e,t,this.encryptionKey,!1),n=function(){return new s(r)};return new y(n,n)}}}();t.CipherTransformFactory=w},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecryptStream=void 0;var n=r(19);t.DecryptStream=class extends n.DecodeStream{constructor(e,t,r){super(t),this.str=e,this.dict=e.dict,this.decrypt=r,this.nextChunk=null,this.initialized=!1}readBlock(){let e;if(this.initialized?e=this.nextChunk:(e=this.str.getBytes(512),this.initialized=!0),!e||0===e.length)return void(this.eof=!0);this.nextChunk=this.str.getBytes(512),e=(0,this.decrypt)(e,!(this.nextChunk&&this.nextChunk.length>0));let t=this.bufferLength;const r=e.length,n=this.ensureBuffer(t+r);for(let a=0;r>a;a++)n[t++]=e[a];this.bufferLength=t}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Catalog=void 0;var n=r(6),a=r(2),i=r(5),s=r(70),o=r(7),c=r(71),l=r(14),h=r(72),u=r(59),d=r(73),f=r(74);function p(e){return e instanceof i.Dict&&(e=e.get("D")),Array.isArray(e)?e:null}class g{constructor(e,t){if(this.pdfManager=e,this.xref=t,this._catDict=t.getCatalogObj(),!(this._catDict instanceof i.Dict))throw new a.FormatError("Catalog object is not a dictionary.");this._actualNumPages=null,this.fontCache=new i.RefSetCache,this.builtInCMapCache=new Map,this.standardFontDataCache=new Map,this.globalImageCache=new u.GlobalImageCache,this.pageKidsCountCache=new i.RefSetCache,this.pageIndexCache=new i.RefSetCache,this.nonBlendModesSet=new i.RefSet}get version(){const e=this._catDict.get("Version");return(0,a.shadow)(this,"version",e instanceof i.Name?e.name:null)}get lang(){const e=this._catDict.get("Lang");return(0,a.shadow)(this,"lang","string"==typeof e?(0,a.stringToPDFString)(e):null)}get needsRendering(){const e=this._catDict.get("NeedsRendering");return(0,a.shadow)(this,"needsRendering","boolean"==typeof e&&e)}get collection(){let e=null;try{const t=this._catDict.get("Collection");t instanceof i.Dict&&t.size>0&&(e=t)}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.info)("Cannot fetch Collection entry; assuming no collection is present.")}return(0,a.shadow)(this,"collection",e)}get acroForm(){let e=null;try{const t=this._catDict.get("AcroForm");t instanceof i.Dict&&t.size>0&&(e=t)}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.info)("Cannot fetch AcroForm entry; assuming no forms are present.")}return(0,a.shadow)(this,"acroForm",e)}get acroFormRef(){const e=this._catDict.getRaw("AcroForm");return(0,a.shadow)(this,"acroFormRef",e instanceof i.Ref?e:null)}get metadata(){const e=this._catDict.getRaw("Metadata");if(!(e instanceof i.Ref))return(0,a.shadow)(this,"metadata",null);let t=null;try{const r=this.xref.fetch(e,!(this.xref.encrypt&&this.xref.encrypt.encryptMetadata));if(r instanceof o.BaseStream&&r.dict instanceof i.Dict){const e=r.dict.get("Type"),n=r.dict.get("Subtype");if((0,i.isName)(e,"Metadata")&&(0,i.isName)(n,"XML")){const e=(0,a.stringToUTF8String)(r.getString());e&&(t=new d.MetadataParser(e).serializable)}}}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.info)(`Skipping invalid Metadata: "${e}".`)}return(0,a.shadow)(this,"metadata",t)}get markInfo(){let e=null;try{e=this._readMarkInfo()}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.warn)("Unable to read mark info.")}return(0,a.shadow)(this,"markInfo",e)}_readMarkInfo(){const e=this._catDict.get("MarkInfo");if(!(e instanceof i.Dict))return null;const t={Marked:!1,UserProperties:!1,Suspects:!1};for(const r in t){const n=e.get(r);"boolean"==typeof n&&(t[r]=n)}return t}get structTreeRoot(){let e=null;try{e=this._readStructTreeRoot()}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.warn)("Unable read to structTreeRoot info.")}return(0,a.shadow)(this,"structTreeRoot",e)}_readStructTreeRoot(){const e=this._catDict.get("StructTreeRoot");if(!(e instanceof i.Dict))return null;const t=new f.StructTreeRoot(e);return t.init(),t}get toplevelPagesDict(){const e=this._catDict.get("Pages");if(!(e instanceof i.Dict))throw new a.FormatError("Invalid top-level pages dictionary.");return(0,a.shadow)(this,"toplevelPagesDict",e)}get documentOutline(){let e=null;try{e=this._readDocumentOutline()}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.warn)("Unable to read document outline.")}return(0,a.shadow)(this,"documentOutline",e)}_readDocumentOutline(){let e=this._catDict.get("Outlines");if(!(e instanceof i.Dict))return null;if(e=e.getRaw("First"),!(e instanceof i.Ref))return null;const t={items:[]},r=[{obj:e,parent:t}],n=new i.RefSet;n.put(e);const s=this.xref,o=new Uint8ClampedArray(3);for(;r.length>0;){const t=r.shift(),c=s.fetchIfRef(t.obj);if(null===c)continue;if(!c.has("Title"))throw new a.FormatError("Invalid outline item encountered.");const h={url:null,dest:null};g.parseDestDictionary({destDict:c,resultObj:h,docBaseUrl:this.pdfManager.docBaseUrl});const u=c.get("Title"),d=c.get("F")||0,f=c.getArray("C"),p=c.get("Count");let m=o;!Array.isArray(f)||3!==f.length||0===f[0]&&0===f[1]&&0===f[2]||(m=l.ColorSpace.singletons.rgb.getRgb(f,0));const b={dest:h.dest,url:h.url,unsafeUrl:h.unsafeUrl,newWindow:h.newWindow,title:(0,a.stringToPDFString)(u),color:m,count:Number.isInteger(p)?p:void 0,bold:!!(2&d),italic:!!(1&d),items:[]};t.parent.items.push(b),e=c.getRaw("First"),e instanceof i.Ref&&!n.has(e)&&(r.push({obj:e,parent:b}),n.put(e)),e=c.getRaw("Next"),e instanceof i.Ref&&!n.has(e)&&(r.push({obj:e,parent:t.parent}),n.put(e))}return t.items.length>0?t.items:null}get permissions(){let e=null;try{e=this._readPermissions()}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.warn)("Unable to read permissions.")}return(0,a.shadow)(this,"permissions",e)}_readPermissions(){const e=this.xref.trailer.get("Encrypt");if(!(e instanceof i.Dict))return null;let t=e.get("P");if("number"!=typeof t)return null;t+=2**32;const r=[];for(const e in a.PermissionFlag){const n=a.PermissionFlag[e];t&n&&r.push(n)}return r}get optionalContentConfig(){let e=null;try{const t=this._catDict.get("OCProperties");if(!t)return(0,a.shadow)(this,"optionalContentConfig",null);const r=t.get("D");if(!r)return(0,a.shadow)(this,"optionalContentConfig",null);const n=t.get("OCGs");if(!Array.isArray(n))return(0,a.shadow)(this,"optionalContentConfig",null);const s=[],o=[];for(const e of n){if(!(e instanceof i.Ref))continue;o.push(e);const t=this.xref.fetchIfRef(e);s.push({id:""+e,name:"string"==typeof t.get("Name")?(0,a.stringToPDFString)(t.get("Name")):null,intent:"string"==typeof t.get("Intent")?(0,a.stringToPDFString)(t.get("Intent")):null})}e=this._readOptionalContentConfig(r,o),e.groups=s}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.warn)("Unable to read optional content config: "+e)}return(0,a.shadow)(this,"optionalContentConfig",e)}_readOptionalContentConfig(e,t){function r(e){const r=[];if(Array.isArray(e))for(const n of e)n instanceof i.Ref&&t.includes(n)&&r.push(""+n);return r}function n(e,r=0){if(!Array.isArray(e))return null;const n=[];for(const a of e){if(a instanceof i.Ref&&t.includes(a)){c.put(a),n.push(""+a);continue}const e=s(a,r);e&&n.push(e)}if(r>0)return n;const a=[];for(const e of t)c.has(e)||a.push(""+e);return a.length&&n.push({name:null,order:a}),n}function s(e,t){if(++t>l)return(0,a.warn)("parseNestedOrder - reached MAX_NESTED_LEVELS."),null;const r=o.fetchIfRef(e);if(!Array.isArray(r))return null;const i=o.fetchIfRef(r[0]);if("string"!=typeof i)return null;const s=n(r.slice(1),t);return s&&s.length?{name:(0,a.stringToPDFString)(i),order:s}:null}const o=this.xref,c=new i.RefSet,l=10;return{name:"string"==typeof e.get("Name")?(0,a.stringToPDFString)(e.get("Name")):null,creator:"string"==typeof e.get("Creator")?(0,a.stringToPDFString)(e.get("Creator")):null,baseState:e.get("BaseState")instanceof i.Name?e.get("BaseState").name:null,on:r(e.get("ON")),off:r(e.get("OFF")),order:n(e.get("Order")),groups:null}}setActualNumPages(e=null){this._actualNumPages=e}get hasActualNumPages(){return null!==this._actualNumPages}get _pagesCount(){const e=this.toplevelPagesDict.get("Count");if(!Number.isInteger(e))throw new a.FormatError("Page count in top-level pages dictionary is not an integer.");return(0,a.shadow)(this,"_pagesCount",e)}get numPages(){return this.hasActualNumPages?this._actualNumPages:this._pagesCount}get destinations(){const e=this._readDests(),t=Object.create(null);if(e instanceof s.NameTree)for(const[r,n]of e.getAll()){const e=p(n);e&&(t[(0,a.stringToPDFString)(r)]=e)}else e instanceof i.Dict&&e.forEach((function(e,r){const n=p(r);n&&(t[e]=n)}));return(0,a.shadow)(this,"destinations",t)}getDestination(e){const t=this._readDests();if(t instanceof s.NameTree){const r=p(t.get(e));if(r)return r;const n=this.destinations[e];if(n)return(0,a.warn)(`Found "${e}" at an incorrect position in the NameTree.`),n}else if(t instanceof i.Dict){const r=p(t.get(e));if(r)return r}return null}_readDests(){const e=this._catDict.get("Names");return e&&e.has("Dests")?new s.NameTree(e.getRaw("Dests"),this.xref):this._catDict.has("Dests")?this._catDict.get("Dests"):void 0}get pageLabels(){let e=null;try{e=this._readPageLabels()}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.warn)("Unable to read page labels.")}return(0,a.shadow)(this,"pageLabels",e)}_readPageLabels(){const e=this._catDict.getRaw("PageLabels");if(!e)return null;const t=Array(this.numPages);let r=null,o="";const c=new s.NumberTree(e,this.xref).getAll();let l="",h=1;for(let e=0,s=this.numPages;s>e;e++){const s=c.get(e);if(void 0!==s){if(!(s instanceof i.Dict))throw new a.FormatError("PageLabel is not a dictionary.");if(s.has("Type")&&!(0,i.isName)(s.get("Type"),"PageLabel"))throw new a.FormatError("Invalid type in PageLabel dictionary.");if(s.has("S")){const e=s.get("S");if(!(e instanceof i.Name))throw new a.FormatError("Invalid style in PageLabel dictionary.");r=e.name}else r=null;if(s.has("P")){const e=s.get("P");if("string"!=typeof e)throw new a.FormatError("Invalid prefix in PageLabel dictionary.");o=(0,a.stringToPDFString)(e)}else o="";if(s.has("St")){const e=s.get("St");if(!Number.isInteger(e)||1>e)throw new a.FormatError("Invalid start in PageLabel dictionary.");h=e}else h=1}switch(r){case"D":l=h;break;case"R":case"r":l=(0,n.toRomanNumerals)(h,"r"===r);break;case"A":case"a":const e=26,t=h-1;l=String.fromCharCode(("a"===r?97:65)+t%e).repeat(Math.floor(t/e)+1);break;default:if(r)throw new a.FormatError(`Invalid style "${r}" in PageLabel dictionary.`);l=""}t[e]=o+l,h++}return t}get pageLayout(){const e=this._catDict.get("PageLayout");let t="";if(e instanceof i.Name)switch(e.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":t=e.name}return(0,a.shadow)(this,"pageLayout",t)}get pageMode(){const e=this._catDict.get("PageMode");let t="UseNone";if(e instanceof i.Name)switch(e.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":t=e.name}return(0,a.shadow)(this,"pageMode",t)}get viewerPreferences(){const e=this._catDict.get("ViewerPreferences");if(!(e instanceof i.Dict))return(0,a.shadow)(this,"viewerPreferences",null);let t=null;for(const r of e.getKeys()){const n=e.get(r);let s;switch(r){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":"boolean"==typeof n&&(s=n);break;case"NonFullScreenPageMode":if(n instanceof i.Name)switch(n.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":s=n.name;break;default:s="UseNone"}break;case"Direction":if(n instanceof i.Name)switch(n.name){case"L2R":case"R2L":s=n.name;break;default:s="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":if(n instanceof i.Name)switch(n.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":s=n.name;break;default:s="CropBox"}break;case"PrintScaling":if(n instanceof i.Name)switch(n.name){case"None":case"AppDefault":s=n.name;break;default:s="AppDefault"}break;case"Duplex":if(n instanceof i.Name)switch(n.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":s=n.name;break;default:s="None"}break;case"PrintPageRange":Array.isArray(n)&&n.length%2==0&&n.every(((e,t,r)=>Number.isInteger(e)&&e>0&&(0===t||e>=r[t-1])&&this.numPages>=e))&&(s=n);break;case"NumCopies":Number.isInteger(n)&&n>0&&(s=n);break;default:(0,a.warn)(`Ignoring non-standard key in ViewerPreferences: ${r}.`);continue}void 0!==s?(t||(t=Object.create(null)),t[r]=s):(0,a.warn)(`Bad value, for key "${r}", in ViewerPreferences: ${n}.`)}return(0,a.shadow)(this,"viewerPreferences",t)}get openAction(){const e=this._catDict.get("OpenAction"),t=Object.create(null);if(e instanceof i.Dict){const r=new i.Dict(this.xref);r.set("A",e);const n={url:null,dest:null,action:null};g.parseDestDictionary({destDict:r,resultObj:n}),Array.isArray(n.dest)?t.dest=n.dest:n.action&&(t.action=n.action)}else Array.isArray(e)&&(t.dest=e);return(0,a.shadow)(this,"openAction",(0,a.objectSize)(t)>0?t:null)}get attachments(){const e=this._catDict.get("Names");let t=null;if(e instanceof i.Dict&&e.has("EmbeddedFiles")){const r=new s.NameTree(e.getRaw("EmbeddedFiles"),this.xref);for(const[e,n]of r.getAll()){const r=new h.FileSpec(n,this.xref);t||(t=Object.create(null)),t[(0,a.stringToPDFString)(e)]=r.serializable}}return(0,a.shadow)(this,"attachments",t)}get xfaImages(){const e=this._catDict.get("Names");let t=null;if(e instanceof i.Dict&&e.has("XFAImages")){const r=new s.NameTree(e.getRaw("XFAImages"),this.xref);for(const[e,n]of r.getAll())t||(t=new i.Dict(this.xref)),t.set((0,a.stringToPDFString)(e),n)}return(0,a.shadow)(this,"xfaImages",t)}_collectJavaScript(){const e=this._catDict.get("Names");let t=null;function r(e,r){if(!(r instanceof i.Dict))return;if(!(0,i.isName)(r.get("S"),"JavaScript"))return;let n=r.get("JS");if(n instanceof o.BaseStream)n=n.getString();else if("string"!=typeof n)return;null===t&&(t=new Map),n=(0,a.stringToPDFString)(n).replace(/\u0000/g,""),t.set(e,n)}if(e instanceof i.Dict&&e.has("JavaScript")){const t=new s.NameTree(e.getRaw("JavaScript"),this.xref);for(const[e,n]of t.getAll())r((0,a.stringToPDFString)(e),n)}const n=this._catDict.get("OpenAction");return n&&r("OpenAction",n),t}get javaScript(){const e=this._collectJavaScript();return(0,a.shadow)(this,"javaScript",e?[...e.values()]:null)}get jsActions(){const e=this._collectJavaScript();let t=(0,n.collectActions)(this.xref,this._catDict,a.DocumentActionEventType);if(e){t||(t=Object.create(null));for(const[r,n]of e)r in t?t[r].push(n):t[r]=[n]}return(0,a.shadow)(this,"jsActions",t)}async fontFallback(e,t){const r=await Promise.all(this.fontCache);for(const n of r)if(n.loadedName===e)return void n.fallback(t)}async cleanup(e=!1){(0,c.clearGlobalCaches)(),this.globalImageCache.clear(e),this.pageKidsCountCache.clear(),this.pageIndexCache.clear(),this.nonBlendModesSet.clear();const t=await Promise.all(this.fontCache);for(const{dict:e}of t)delete e.cacheKey;this.fontCache.clear(),this.builtInCMapCache.clear(),this.standardFontDataCache.clear()}async getPageDict(e){const t=[this.toplevelPagesDict],r=new i.RefSet,n=this._catDict.getRaw("Pages");n instanceof i.Ref&&r.put(n);const s=this.xref,o=this.pageKidsCountCache,c=this.pageIndexCache;let l=0;for(;t.length;){const n=t.pop();if(n instanceof i.Ref){const h=o.get(n);if(h>=0&&e>=l+h){l+=h;continue}if(r.has(n))throw new a.FormatError("Pages tree contains circular reference.");r.put(n);const u=await s.fetchAsync(n);if(u instanceof i.Dict){let t=u.getRaw("Type");if(t instanceof i.Ref&&(t=await s.fetchAsync(t)),(0,i.isName)(t,"Page")||!u.has("Kids")){if(o.has(n)||o.put(n,1),c.has(n)||c.put(n,l),l===e)return[u,n];l++;continue}}t.push(u);continue}if(!(n instanceof i.Dict))throw new a.FormatError("Page dictionary kid reference points to wrong type of object.");const{objId:h}=n;let u=n.getRaw("Count");if(u instanceof i.Ref&&(u=await s.fetchAsync(u)),Number.isInteger(u)&&u>=0&&(h&&!o.has(h)&&o.put(h,u),e>=l+u)){l+=u;continue}let d=n.getRaw("Kids");if(d instanceof i.Ref&&(d=await s.fetchAsync(d)),!Array.isArray(d)){let t=n.getRaw("Type");if(t instanceof i.Ref&&(t=await s.fetchAsync(t)),(0,i.isName)(t,"Page")||!n.has("Kids")){if(l===e)return[n,null];l++;continue}throw new a.FormatError("Page dictionary kids object is not an array.")}for(let e=d.length-1;e>=0;e--)t.push(d[e])}throw Error(`Page index ${e} not found.`)}async getAllPageDicts(e=!1){const t=[{currentNode:this.toplevelPagesDict,posInKids:0}],r=new i.RefSet,s=this._catDict.getRaw("Pages");s instanceof i.Ref&&r.put(s);const o=new Map,c=this.xref,l=this.pageIndexCache;let h=0;function u(t){if(t instanceof n.XRefEntryException&&!e)throw t;o.set(h++,[t,null])}for(;t.length>0;){const e=t.at(-1),{currentNode:n,posInKids:s}=e;let p=n.getRaw("Kids");if(p instanceof i.Ref)try{p=await c.fetchAsync(p)}catch(e){u(e);break}if(!Array.isArray(p)){u(new a.FormatError("Page dictionary kids object is not an array."));break}if(s>=p.length){t.pop();continue}const g=p[s];let m;if(g instanceof i.Ref){if(r.has(g)){u(new a.FormatError("Pages tree contains circular reference."));break}r.put(g);try{m=await c.fetchAsync(g)}catch(e){u(e);break}}else m=g;if(!(m instanceof i.Dict)){u(new a.FormatError("Page dictionary kid reference points to wrong type of object."));break}let b=m.getRaw("Type");if(b instanceof i.Ref)try{b=await c.fetchAsync(b)}catch(e){u(e);break}(0,i.isName)(b,"Page")||!m.has("Kids")?(d=m,(f=g instanceof i.Ref?g:null)&&!l.has(f)&&l.put(f,h),o.set(h++,[d,f])):t.push({currentNode:m,posInKids:0}),e.posInKids++}var d,f;return o}getPageIndex(e){const t=this.pageIndexCache.get(e);if(void 0!==t)return Promise.resolve(t);const r=this.xref;let n=0;const s=t=>function(t){let n,s=0;return r.fetchAsync(t).then((function(r){if((0,i.isRefsEqual)(t,e)&&!(0,i.isDict)(r,"Page")&&!(r instanceof i.Dict&&!r.has("Type")&&r.has("Contents")))throw new a.FormatError("The reference does not point to a /Page dictionary.");if(!r)return null;if(!(r instanceof i.Dict))throw new a.FormatError("Node must be a dictionary.");return n=r.getRaw("Parent"),r.getAsync("Parent")})).then((function(e){if(!e)return null;if(!(e instanceof i.Dict))throw new a.FormatError("Parent must be a dictionary.");return e.getAsync("Kids")})).then((function(e){if(!e)return null;const o=[];let c=!1;for(let n=0,l=e.length;l>n;n++){const l=e[n];if(!(l instanceof i.Ref))throw new a.FormatError("Kid must be a reference.");if((0,i.isRefsEqual)(l,t)){c=!0;break}o.push(r.fetchAsync(l).then((function(e){if(!(e instanceof i.Dict))throw new a.FormatError("Kid node must be a dictionary.");e.has("Count")?s+=e.get("Count"):s++})))}if(!c)throw new a.FormatError("Kid reference not found in parent's kids.");return Promise.all(o).then((function(){return[s,n]}))}))}(t).then((t=>{if(!t)return this.pageIndexCache.put(e,n),n;const[r,a]=t;return n+=r,s(a)}));return s(e)}get baseUrl(){const e=this._catDict.get("URI");if(e instanceof i.Dict){const t=e.get("Base");if("string"==typeof t){const e=(0,a.createValidAbsoluteUrl)(t,null,{tryConvertEncoding:!0});if(e)return(0,a.shadow)(this,"baseUrl",e.href)}}return(0,a.shadow)(this,"baseUrl",null)}static parseDestDictionary(e){const t=e.destDict;if(!(t instanceof i.Dict))return void(0,a.warn)("parseDestDictionary: `destDict` must be a dictionary.");const r=e.resultObj;if("object"!=typeof r)return void(0,a.warn)("parseDestDictionary: `resultObj` must be an object.");const s=e.docBaseUrl||null;let c,l,h=t.get("A");if(h instanceof i.Dict||(t.has("Dest")?h=t.get("Dest"):(h=t.get("AA"),h instanceof i.Dict&&(h.has("D")?h=h.get("D"):h.has("U")&&(h=h.get("U"))))),h instanceof i.Dict){const e=h.get("S");if(!(e instanceof i.Name))return void(0,a.warn)("parseDestDictionary: Invalid type in Action dictionary.");const t=e.name;switch(t){case"ResetForm":const e=h.get("Flags"),s=!(1&("number"==typeof e?e:0)),u=[],d=[];for(const e of h.get("Fields")||[])e instanceof i.Ref?d.push(""+e):"string"==typeof e&&u.push((0,a.stringToPDFString)(e));r.resetForm={fields:u,refs:d,include:s};break;case"URI":c=h.get("URI"),c instanceof i.Name&&(c="/"+c.name);break;case"GoTo":l=h.get("D");break;case"Launch":case"GoToR":const f=h.get("F");f instanceof i.Dict?c=f.get("F")||null:"string"==typeof f&&(c=f);let p=h.get("D");if(p&&(p instanceof i.Name&&(p=p.name),"string"==typeof c)){const e=c.split("#")[0];"string"==typeof p?c=e+"#"+p:Array.isArray(p)&&(c=e+"#"+JSON.stringify(p))}const g=h.get("NewWindow");"boolean"==typeof g&&(r.newWindow=g);break;case"Named":const m=h.get("N");m instanceof i.Name&&(r.action=m.name);break;case"JavaScript":const b=h.get("JS");let y;b instanceof o.BaseStream?y=b.getString():"string"==typeof b&&(y=b);const w=y&&(0,n.recoverJsURL)((0,a.stringToPDFString)(y));if(w){c=w.url,r.newWindow=w.newWindow;break}default:if("JavaScript"===t||"SubmitForm"===t)break;(0,a.warn)(`parseDestDictionary - unsupported action: "${t}".`)}}else t.has("Dest")&&(l=t.get("Dest"));if("string"==typeof c){const e=(0,a.createValidAbsoluteUrl)(c,s,{addDefaultProtocol:!0,tryConvertEncoding:!0});e&&(r.url=e.href),r.unsafeUrl=c}l&&(l instanceof i.Name&&(l=l.name),"string"==typeof l?r.dest=(0,a.stringToPDFString)(l):Array.isArray(l)&&(r.dest=l))}}t.Catalog=g},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NumberTree=t.NameTree=void 0;var n=r(5),a=r(2);class i{constructor(e,t,r){this.constructor===i&&(0,a.unreachable)("Cannot initialize NameOrNumberTree."),this.root=e,this.xref=t,this._type=r}getAll(){const e=new Map;if(!this.root)return e;const t=this.xref,r=new n.RefSet;r.put(this.root);const i=[this.root];for(;i.length>0;){const s=t.fetchIfRef(i.shift());if(!(s instanceof n.Dict))continue;if(s.has("Kids")){const e=s.get("Kids");if(!Array.isArray(e))continue;for(const t of e){if(r.has(t))throw new a.FormatError(`Duplicate entry in "${this._type}" tree.`);i.push(t),r.put(t)}continue}const o=s.get(this._type);if(Array.isArray(o))for(let r=0,n=o.length;n>r;r+=2)e.set(t.fetchIfRef(o[r]),t.fetchIfRef(o[r+1]))}return e}get(e){if(!this.root)return null;const t=this.xref;let r=t.fetchIfRef(this.root),n=0;for(;r.has("Kids");){if(++n>10)return(0,a.warn)(`Search depth limit reached for "${this._type}" tree.`),null;const i=r.get("Kids");if(!Array.isArray(i))return null;let s=0,o=i.length-1;for(;o>=s;){const n=s+o>>1,a=t.fetchIfRef(i[n]),c=a.get("Limits");if(e<t.fetchIfRef(c[0]))o=n-1;else{if(e<=t.fetchIfRef(c[1])){r=a;break}s=n+1}}if(s>o)return null}const i=r.get(this._type);if(Array.isArray(i)){let r=0,n=i.length-2;for(;n>=r;){const a=r+n>>1,s=a+(1&a),o=t.fetchIfRef(i[s]);if(o>e)n=s-2;else{if(o>=e)return t.fetchIfRef(i[s+1]);r=s+2}}}return null}}t.NameTree=class extends i{constructor(e,t){super(e,t,"Names")}},t.NumberTree=class extends i{constructor(e,t){super(e,t,"Nums")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clearGlobalCaches=function(){(0,n.clearPrimitiveCaches)(),(0,a.clearUnicodeCaches)()};var n=r(5),a=r(40)},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileSpec=void 0;var n=r(2),a=r(7),i=r(5);function s(e){return e.has("UF")?e.get("UF"):e.has("F")?e.get("F"):e.has("Unix")?e.get("Unix"):e.has("Mac")?e.get("Mac"):e.has("DOS")?e.get("DOS"):null}t.FileSpec=class{constructor(e,t){e instanceof i.Dict&&(this.xref=t,this.root=e,e.has("FS")&&(this.fs=e.get("FS")),this.description=e.has("Desc")?(0,n.stringToPDFString)(e.get("Desc")):"",e.has("RF")&&(0,n.warn)("Related file specifications are not supported"),this.contentAvailable=!0,e.has("EF")||(this.contentAvailable=!1,(0,n.warn)("Non-embedded file specifications are not supported")))}get filename(){if(!this._filename&&this.root){const e=s(this.root)||"unnamed";this._filename=(0,n.stringToPDFString)(e).replace(/\\\\/g,"\\").replace(/\\\//g,"/").replace(/\\/g,"/")}return this._filename}get content(){if(!this.contentAvailable)return null;!this.contentRef&&this.root&&(this.contentRef=s(this.root.get("EF")));let e=null;if(this.contentRef){const t=this.xref.fetchIfRef(this.contentRef);t instanceof a.BaseStream?e=t.getBytes():(0,n.warn)("Embedded file specification points to non-existing/invalid content")}else(0,n.warn)("Embedded file specification does not have a content");return e}get serializable(){return{filename:this.filename,content:this.content}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataParser=void 0;var n=r(66);t.MetadataParser=class{constructor(e){e=this._repair(e);const t=new n.SimpleXMLParser({lowerCaseName:!0}).parseFromString(e);this._metadataMap=new Map,this._data=e,t&&this._parse(t)}_repair(e){return e.replace(/^[^<]+/,"").replace(/>\\376\\377([^<]+)/g,(function(e,t){const r=t.replace(/\\([0-3])([0-7])([0-7])/g,(function(e,t,r,n){return String.fromCharCode(64*t+8*r+1*n)})).replace(/&(amp|apos|gt|lt|quot);/g,(function(e,t){switch(t){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw Error(`_repair: ${t} isn't defined.`)})),n=[];for(let e=0,t=r.length;t>e;e+=2){const t=256*r.charCodeAt(e)+r.charCodeAt(e+1);n.push(t>=32&&127>t&&60!==t&&62!==t&&38!==t?String.fromCharCode(t):"&#x"+(65536+t).toString(16).substring(1)+";")}return">"+n.join("")}))}_getSequence(e){const t=e.nodeName;return"rdf:bag"!==t&&"rdf:seq"!==t&&"rdf:alt"!==t?null:e.childNodes.filter((e=>"rdf:li"===e.nodeName))}_parseArray(e){if(!e.hasChildNodes())return;const[t]=e.childNodes,r=this._getSequence(t)||[];this._metadataMap.set(e.nodeName,r.map((e=>e.textContent.trim())))}_parse(e){let t=e.documentElement;if("rdf:rdf"!==t.nodeName)for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName;)t=t.nextSibling;if(t&&"rdf:rdf"===t.nodeName&&t.hasChildNodes())for(const e of t.childNodes)if("rdf:description"===e.nodeName)for(const t of e.childNodes){const e=t.nodeName;switch(e){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(t);continue}this._metadataMap.set(e,t.textContent.trim())}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StructTreeRoot=t.StructTreePage=void 0;var n=r(5),a=r(2),i=r(70);const s="PAGE_CONTENT",o="STREAM_CONTENT",c="OBJECT",l="ELEMENT";t.StructTreeRoot=class{constructor(e){this.dict=e,this.roleMap=new Map}init(){this.readRoleMap()}readRoleMap(){const e=this.dict.get("RoleMap");e instanceof n.Dict&&e.forEach(((e,t)=>{t instanceof n.Name&&this.roleMap.set(e,t.name)}))}};class h{constructor(e,t){this.tree=e,this.dict=t,this.kids=[],this.parseKids()}get role(){const e=this.dict.get("S"),t=e instanceof n.Name?e.name:"",{root:r}=this.tree;return r.roleMap.has(t)?r.roleMap.get(t):t}parseKids(){let e=null;const t=this.dict.getRaw("Pg");t instanceof n.Ref&&(e=""+t);const r=this.dict.get("K");if(Array.isArray(r))for(const t of r){const r=this.parseKid(e,t);r&&this.kids.push(r)}else{const t=this.parseKid(e,r);t&&this.kids.push(t)}}parseKid(e,t){if(Number.isInteger(t))return this.tree.pageDict.objId!==e?null:new u({type:s,mcid:t,pageObjId:e});let r=null;if(t instanceof n.Ref?r=this.dict.xref.fetch(t):t instanceof n.Dict&&(r=t),!r)return null;const a=r.getRaw("Pg");a instanceof n.Ref&&(e=""+a);const i=r.get("Type")instanceof n.Name?r.get("Type").name:null;return"MCR"===i?this.tree.pageDict.objId!==e?null:new u({type:o,refObjId:r.getRaw("Stm")instanceof n.Ref?""+r.getRaw("Stm"):null,pageObjId:e,mcid:r.get("MCID")}):"OBJR"===i?this.tree.pageDict.objId!==e?null:new u({type:c,refObjId:r.getRaw("Obj")instanceof n.Ref?""+r.getRaw("Obj"):null,pageObjId:e}):new u({type:l,dict:r})}}class u{constructor({type:e,dict:t=null,mcid:r=null,pageObjId:n=null,refObjId:a=null}){this.type=e,this.dict=t,this.mcid=r,this.pageObjId=n,this.refObjId=a,this.parentNode=null}}t.StructTreePage=class{constructor(e,t){this.root=e,this.rootDict=e?e.dict:null,this.pageDict=t,this.nodes=[]}parse(){if(!this.root||!this.rootDict)return;const e=this.rootDict.get("ParentTree");if(!e)return;const t=this.pageDict.get("StructParents");if(!Number.isInteger(t))return;const r=new i.NumberTree(e,this.rootDict.xref).get(t);if(!Array.isArray(r))return;const a=new Map;for(const e of r)e instanceof n.Ref&&this.addNode(this.rootDict.xref.fetch(e),a)}addNode(e,t,r=0){if(r>40)return(0,a.warn)("StructTree MAX_DEPTH reached."),null;if(t.has(e))return t.get(e);const i=new h(this,e);t.set(e,i);const s=e.get("P");if(!s||(0,n.isName)(s.get("Type"),"StructTreeRoot"))return this.addTopLevelNode(e,i)||t.delete(e),i;const o=this.addNode(s,t,r+1);if(!o)return i;let c=!1;for(const t of o.kids)t.type===l&&t.dict===e&&(t.parentNode=i,c=!0);return c||t.delete(e),i}addTopLevelNode(e,t){const r=this.rootDict.get("K");if(!r)return!1;if(r instanceof n.Dict)return r.objId===e.objId&&(this.nodes[0]=t,!0);if(!Array.isArray(r))return!0;let a=!1;for(let n=0;r.length>n;n++){const i=r[n];i&&""+i===e.objId&&(this.nodes[n]=t,a=!0)}return a}get serializable(){function e(t,r,n=0){if(n>40)return void(0,a.warn)("StructTree too deep to be fully serialized.");const i=Object.create(null);i.role=t.role,i.children=[],r.children.push(i);const h=t.dict.get("Alt");"string"==typeof h&&(i.alt=(0,a.stringToPDFString)(h));const u=t.dict.get("Lang");"string"==typeof u&&(i.lang=(0,a.stringToPDFString)(u));for(const r of t.kids){const t=r.type===l?r.parentNode:null;t?e(t,i,n+1):r.type===s||r.type===o?i.children.push({type:"content",id:`page${r.pageObjId}_mcid${r.mcid}`}):r.type===c&&i.children.push({type:"object",id:r.refObjId})}}const t=Object.create(null);t.children=[],t.role="Root";for(const r of this.nodes)r&&e(r,t);return t}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectLoader=void 0;var n=r(5),a=r(7),i=r(6),s=r(2);function o(e,t){if(e instanceof n.Dict)e=e.getRawValues();else if(e instanceof a.BaseStream)e=e.dict.getRawValues();else if(!Array.isArray(e))return;for(const i of e)((r=i)instanceof n.Ref||r instanceof n.Dict||r instanceof a.BaseStream||Array.isArray(r))&&t.push(i);var r}t.ObjectLoader=class{constructor(e,t,r){this.dict=e,this.keys=t,this.xref=r,this.refSet=null}async load(){if(this.xref.stream.isDataLoaded)return;const{keys:e,dict:t}=this;this.refSet=new n.RefSet;const r=[];for(let n=0,a=e.length;a>n;n++){const a=t.getRaw(e[n]);void 0!==a&&r.push(a)}return this._walk(r)}async _walk(e){const t=[],r=[];for(;e.length;){let c=e.pop();if(c instanceof n.Ref){if(this.refSet.has(c))continue;try{this.refSet.put(c),c=this.xref.fetch(c)}catch(e){if(!(e instanceof i.MissingDataException)){(0,s.warn)(`ObjectLoader._walk - requesting all data: "${e}".`),this.refSet=null;const{manager:t}=this.xref.stream;return t.requestAllChunks()}t.push(c),r.push({begin:e.begin,end:e.end})}}if(c instanceof a.BaseStream){const e=c.getBaseStreams();if(e){let n=!1;for(const t of e)t.isDataLoaded||(n=!0,r.push({begin:t.start,end:t.end}));n&&t.push(c)}}o(c,e)}if(r.length){await this.xref.stream.manager.requestRanges(r);for(const e of t)e instanceof n.Ref&&this.refSet.remove(e);return this._walk(t)}this.refSet=null}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XFAFactory=void 0;var n=r(77),a=r(81),i=r(87),s=r(85),o=r(78),c=r(2),l=r(88),h=r(98);class u{constructor(e){try{this.root=(new l.XFAParser).parse(u._createDocument(e));const t=new a.Binder(this.root);this.form=t.bind(),this.dataHandler=new i.DataHandler(this.root,t.getData()),this.form[n.$globalData].template=this.form}catch(e){(0,c.warn)("XFA - an error occurred during parsing and binding: "+e)}}isValid(){return this.root&&this.form}_createPagesHelper(){const e=this.form[n.$toPages]();return new Promise(((t,r)=>{const n=()=>{try{const r=e.next();r.done?t(r.value):setTimeout(n,0)}catch(e){r(e)}};setTimeout(n,0)}))}async _createPages(){try{this.pages=await this._createPagesHelper(),this.dims=this.pages.children.map((e=>{const{width:t,height:r}=e.attributes.style;return[0,0,parseInt(t),parseInt(r)]}))}catch(e){(0,c.warn)("XFA - an error occurred during layout: "+e)}}getBoundingBox(e){return this.dims[e]}async getNumPages(){return this.pages||await this._createPages(),this.dims.length}setImages(e){this.form[n.$globalData].images=e}setFonts(e){this.form[n.$globalData].fontFinder=new s.FontFinder(e);const t=[];for(let e of this.form[n.$globalData].usedTypefaces)e=(0,o.stripQuotes)(e),this.form[n.$globalData].fontFinder.find(e)||t.push(e);return t.length>0?t:null}appendFonts(e,t){this.form[n.$globalData].fontFinder.add(e,t)}async getPages(){this.pages||await this._createPages();const e=this.pages;return this.pages=null,e}serializeData(e){return this.dataHandler.serialize(e)}static _createDocument(e){return e["/xdp:xdp"]?Object.values(e).join(""):e["xdp:xdp"]}static getRichTextAsHtml(e){if(!e||"string"!=typeof e)return null;try{let t=new l.XFAParser(h.XhtmlNamespace,!0).parse(e);if(!["body","xhtml"].includes(t[n.$nodeName])){const e=h.XhtmlNamespace.body({});e[n.$appendChild](t),t=e}const r=t[n.$toHTML]();if(!r.success)return null;const{html:a}=r,{attributes:i}=a;return i&&(i.class&&(i.class=i.class.filter((e=>!e.startsWith("xfa")))),i.dir="auto"),{html:a,str:t[n.$text]()}}catch(e){(0,c.warn)("XFA - an error occurred during parsing of rich text: "+e)}return null}}t.XFAFactory=u},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XmlObject=t.XFAObjectArray=t.XFAObject=t.XFAAttribute=t.StringObject=t.OptionObject=t.Option10=t.Option01=t.IntegerObject=t.ContentObject=t.$uid=t.$toStyle=t.$toString=t.$toPages=t.$toHTML=t.$text=t.$tabIndex=t.$setValue=t.$setSetAttributes=t.$setId=t.$searchNode=t.$root=t.$resolvePrototypes=t.$removeChild=t.$pushPara=t.$pushGlyphs=t.$popPara=t.$onText=t.$onChildCheck=t.$onChild=t.$nsAttributes=t.$nodeName=t.$namespaceId=t.$isUsable=t.$isTransparent=t.$isThereMoreWidth=t.$isSplittable=t.$isNsAgnostic=t.$isDescendent=t.$isDataValue=t.$isCDATAXml=t.$isBindable=t.$insertAt=t.$indexOf=t.$ids=t.$hasSettableValue=t.$globalData=t.$getTemplateRoot=t.$getSubformParent=t.$getRealChildrenByNameIt=t.$getParent=t.$getNextPage=t.$getExtra=t.$getDataValue=t.$getContainedChildren=t.$getChildrenByNameIt=t.$getChildrenByName=t.$getChildrenByClass=t.$getChildren=t.$getAvailableSpace=t.$getAttributes=t.$getAttributeIt=t.$flushHTML=t.$finalize=t.$extra=t.$dump=t.$data=t.$content=t.$consumed=t.$clone=t.$cleanup=t.$cleanPage=t.$clean=t.$childrenToHTML=t.$appendChild=t.$addHTML=t.$acceptWhitespace=void 0;var n=r(78),a=r(2),i=r(6),s=r(79),o=r(80);const c=Symbol();t.$acceptWhitespace=c;const l=Symbol();t.$addHTML=l;const h=Symbol();t.$appendChild=h;const u=Symbol();t.$childrenToHTML=u;const d=Symbol();t.$clean=d;const f=Symbol();t.$cleanPage=f;const p=Symbol();t.$cleanup=p;const g=Symbol();t.$clone=g;const m=Symbol();t.$consumed=m;const b=Symbol("content");t.$content=b;const y=Symbol("data");t.$data=y;const w=Symbol();t.$dump=w;const v=Symbol("extra");t.$extra=v;const S=Symbol();t.$finalize=S;const x=Symbol();t.$flushHTML=x;const A=Symbol();t.$getAttributeIt=A;const k=Symbol();t.$getAttributes=k;const C=Symbol();t.$getAvailableSpace=C;const _=Symbol();t.$getChildrenByClass=_;const F=Symbol();t.$getChildrenByName=F;const T=Symbol();t.$getChildrenByNameIt=T;const O=Symbol();t.$getDataValue=O;const P=Symbol();t.$getExtra=P;const I=Symbol();t.$getRealChildrenByNameIt=I;const E=Symbol();t.$getChildren=E;const M=Symbol();t.$getContainedChildren=M;const R=Symbol();t.$getNextPage=R;const D=Symbol();t.$getSubformParent=D;const N=Symbol();t.$getParent=N;const L=Symbol();t.$getTemplateRoot=L;const j=Symbol();t.$globalData=j;const B=Symbol();t.$hasSettableValue=B;const U=Symbol();t.$ids=U;const $=Symbol();t.$indexOf=$;const q=Symbol();t.$insertAt=q;const X=Symbol();t.$isCDATAXml=X;const H=Symbol();t.$isBindable=H;const W=Symbol();t.$isDataValue=W;const z=Symbol();t.$isDescendent=z;const G=Symbol();t.$isNsAgnostic=G;const V=Symbol();t.$isSplittable=V;const Y=Symbol();t.$isThereMoreWidth=Y;const K=Symbol();t.$isTransparent=K;const J=Symbol();t.$isUsable=J;const Z=Symbol(),Q=Symbol("namespaceId");t.$namespaceId=Q;const ee=Symbol("nodeName");t.$nodeName=ee;const te=Symbol();t.$nsAttributes=te;const re=Symbol();t.$onChild=re;const ne=Symbol();t.$onChildCheck=ne;const ae=Symbol();t.$onText=ae;const ie=Symbol();t.$pushGlyphs=ie;const se=Symbol();t.$popPara=se;const oe=Symbol();t.$pushPara=oe;const ce=Symbol();t.$removeChild=ce;const le=Symbol("root");t.$root=le;const he=Symbol();t.$resolvePrototypes=he;const ue=Symbol();t.$searchNode=ue;const de=Symbol();t.$setId=de;const fe=Symbol();t.$setSetAttributes=fe;const pe=Symbol();t.$setValue=pe;const ge=Symbol();t.$tabIndex=ge;const me=Symbol();t.$text=me;const be=Symbol();t.$toPages=be;const ye=Symbol();t.$toHTML=ye;const we=Symbol();t.$toString=we;const ve=Symbol();t.$toStyle=ve;const Se=Symbol("uid");t.$uid=Se;const xe=Symbol(),Ae=Symbol(),ke=Symbol(),Ce=Symbol("_children"),_e=Symbol(),Fe=Symbol(),Te=Symbol(),Oe=Symbol(),Pe=Symbol(),Ie=Symbol(),Ee=Symbol(),Me=Symbol(),Re=Symbol(),De=Symbol("parent"),Ne=Symbol(),Le=Symbol(),je=Symbol();let Be=0;const Ue=s.NamespaceIds.datasets.id;class $e{constructor(e,t,r=!1){this[Q]=e,this[ee]=t,this[Ee]=r,this[De]=null,this[Ce]=[],this[Se]=`${t}${Be++}`,this[j]=null}[re](e){if(!this[Ee]||!this[ne](e))return!1;const t=e[ee],r=this[t];if(!(r instanceof qe))return null!==r&&this[ce](r),this[t]=e,this[h](e),!0;if(r.push(e))return this[h](e),!0;let n="";return this.id?n=` (id: ${this.id})`:this.name&&(n=` (name: ${this.name} ${this.h.value})`),(0,a.warn)(`XFA - node "${this[ee]}"${n} has already enough "${t}"!`),!1}[ne](e){return this.hasOwnProperty(e[ee])&&e[Q]===this[Q]}[G](){return!1}[c](){return!1}[X](){return!1}[H](){return!1}[se](){this.para&&this[L]()[v].paraStack.pop()}[oe](){this[L]()[v].paraStack.push(this.para)}[de](e){this.id&&this[Q]===s.NamespaceIds.template.id&&e.set(this.id,this)}[L](){return this[j].template}[V](){return!1}[Y](){return!1}[h](e){e[De]=this,this[Ce].push(e),!e[j]&&this[j]&&(e[j]=this[j])}[ce](e){const t=this[Ce].indexOf(e);this[Ce].splice(t,1)}[B](){return this.hasOwnProperty("value")}[pe](e){}[ae](e){}[S](){}[d](e){delete this[Ee],this[p]&&(e.clean(this[p]),delete this[p])}[$](e){return this[Ce].indexOf(e)}[q](e,t){t[De]=this,this[Ce].splice(e,0,t),!t[j]&&this[j]&&(t[j]=this[j])}[K](){return!this.name}[Z](){return""}[me](){return 0===this[Ce].length?this[b]:this[Ce].map((e=>e[me]())).join("")}get[ke](){const e=Object.getPrototypeOf(this);if(!e._attributes){const t=e._attributes=new Set;for(const e of Object.getOwnPropertyNames(this)){if(null===this[e]||this[e]instanceof $e||this[e]instanceof qe)break;t.add(e)}}return(0,a.shadow)(this,ke,e._attributes)}[z](e){let t=this;for(;t;){if(t===e)return!0;t=t[N]()}return!1}[N](){return this[De]}[D](){return this[N]()}[E](e=null){return e?this[e]:this[Ce]}[w](){const e=Object.create(null);this[b]&&(e.$content=this[b]);for(const t of Object.getOwnPropertyNames(this)){const r=this[t];null!==r&&(r instanceof $e?e[t]=r[w]():r instanceof qe?r.isEmpty()||(e[t]=r.dump()):e[t]=r)}return e}[ve](){return null}[ye](){return n.HTMLResult.EMPTY}*[M](){for(const e of this[E]())yield e}*[Oe](e,t){for(const r of this[M]())if(!e||t===e.has(r[ee])){const e=this[C](),t=r[ye](e);t.success||(this[v].failingNode=r),yield t}}[x](){return null}[l](e,t){this[v].children.push(e)}[C](){}[u]({filter:e=null,include:t=!0}){if(this[v].generator){const e=this[C](),t=this[v].failingNode[ye](e);if(!t.success)return t;t.html&&this[l](t.html,t.bbox),delete this[v].failingNode}else this[v].generator=this[Oe](e,t);for(;;){const e=this[v].generator.next();if(e.done)break;const t=e.value;if(!t.success)return t;t.html&&this[l](t.html,t.bbox)}return this[v].generator=null,n.HTMLResult.EMPTY}[fe](e){this[Le]=new Set(Object.keys(e))}[Ie](e){const t=this[ke],r=this[Le];return[...e].filter((e=>t.has(e)&&!r.has(e)))}[he](e,t=new Set){for(const r of this[Ce])r[Ne](e,t)}[Ne](e,t){const r=this[Pe](e,t);r?this[xe](r,e,t):this[he](e,t)}[Pe](e,t){const{use:r,usehref:n}=this;if(!r&&!n)return null;let i=null,s=null,c=null,l=r;if(n?(l=n,n.startsWith("#som(")&&n.endsWith(")")?s=n.slice(5,n.length-1):n.startsWith(".#som(")&&n.endsWith(")")?s=n.slice(6,n.length-1):n.startsWith("#")?c=n.slice(1):n.startsWith(".#")&&(c=n.slice(2))):r.startsWith("#")?c=r.slice(1):s=r,this.use=this.usehref="",c?i=e.get(c):(i=(0,o.searchNode)(e.get(le),this,s,!0,!1),i&&(i=i[0])),!i)return(0,a.warn)(`XFA - Invalid prototype reference: ${l}.`),null;if(i[ee]!==this[ee])return(0,a.warn)(`XFA - Incompatible prototype: ${i[ee]} !== ${this[ee]}.`),null;if(t.has(i))return(0,a.warn)("XFA - Cycle detected in prototypes use."),null;t.add(i);const h=i[Pe](e,t);return h&&i[xe](h,e,t),i[he](e,t),t.delete(i),i}[xe](e,t,r){if(r.has(e))(0,a.warn)("XFA - Cycle detected in prototypes use.");else{!this[b]&&e[b]&&(this[b]=e[b]),new Set(r).add(e);for(const t of this[Ie](e[Le]))this[t]=e[t],this[Le]&&this[Le].add(t);for(const n of Object.getOwnPropertyNames(this)){if(this[ke].has(n))continue;const a=this[n],i=e[n];if(a instanceof qe){for(const e of a[Ce])e[Ne](t,r);for(let n=a[Ce].length,s=i[Ce].length;s>n;n++){const i=e[Ce][n][g]();if(!a.push(i))break;i[De]=this,this[Ce].push(i),i[Ne](t,r)}}else if(null===a){if(null!==i){const e=i[g]();e[De]=this,this[n]=e,this[Ce].push(e),e[Ne](t,r)}}else a[he](t,r),i&&a[xe](i,t,r)}}}static[_e](e){return Array.isArray(e)?e.map((e=>$e[_e](e))):"object"==typeof e&&null!==e?Object.assign({},e):e}[g](){const e=Object.create(Object.getPrototypeOf(this));for(const t of Object.getOwnPropertySymbols(this))try{e[t]=this[t]}catch(r){(0,a.shadow)(e,t,this[t])}e[Se]=`${e[ee]}${Be++}`,e[Ce]=[];for(const t of Object.getOwnPropertyNames(this)){if(this[ke].has(t)){e[t]=$e[_e](this[t]);continue}const r=this[t];e[t]=r instanceof qe?new qe(r[Me]):null}for(const t of this[Ce]){const r=t[ee],n=t[g]();e[Ce].push(n),n[De]=e,null===e[r]?e[r]=n:e[r][Ce].push(n)}return e}[E](e=null){return e?this[Ce].filter((t=>t[ee]===e)):this[Ce]}[_](e){return this[e]}[F](e,t,r=!0){return Array.from(this[T](e,t,r))}*[T](e,t,r=!0){if("parent"!==e){for(const r of this[Ce])r[ee]===e&&(yield r),r.name===e&&(yield r),(t||r[K]())&&(yield*r[T](e,t,!1));r&&this[ke].has(e)&&(yield new Xe(this,e,this[e]))}else yield this[De]}}t.XFAObject=$e;class qe{constructor(e=1/0){this[Me]=e,this[Ce]=[]}push(e){return this[Ce].length>this[Me]?((0,a.warn)(`XFA - node "${e[ee]}" accepts no more than ${this[Me]} children`),!1):(this[Ce].push(e),!0)}isEmpty(){return 0===this[Ce].length}dump(){return 1===this[Ce].length?this[Ce][0][w]():this[Ce].map((e=>e[w]()))}[g](){const e=new qe(this[Me]);return e[Ce]=this[Ce].map((e=>e[g]())),e}get children(){return this[Ce]}clear(){this[Ce].length=0}}t.XFAObjectArray=qe;class Xe{constructor(e,t,r){this[De]=e,this[ee]=t,this[b]=r,this[m]=!1,this[Se]="attribute"+Be++}[N](){return this[De]}[W](){return!0}[O](){return this[b].trim()}[pe](e){this[b]=""+(e=e.value||"")}[me](){return this[b]}[z](e){return this[De]===e||this[De][z](e)}}t.XFAAttribute=Xe;class He extends $e{constructor(e,t,r={}){if(super(e,t),this[b]="",this[Fe]=null,"#text"!==t){const e=new Map;this[Ae]=e;for(const[t,n]of Object.entries(r))e.set(t,new Xe(this,t,n));if(r.hasOwnProperty(te)){const e=r[te].xfa.dataNode;void 0!==e&&("dataGroup"===e?this[Fe]=!1:"dataValue"===e&&(this[Fe]=!0))}}this[m]=!1}[we](e){const t=this[ee];if("#text"===t)return void e.push((0,i.encodeToXmlString)(this[b]));const r=(0,a.utf8StringToString)(t),n=this[Q]===Ue?"xfa:":"";e.push(`<${n}${r}`);for(const[t,r]of this[Ae].entries()){const n=(0,a.utf8StringToString)(t);e.push(` ${n}="${(0,i.encodeToXmlString)(r[b])}"`)}if(null!==this[Fe]&&e.push(this[Fe]?' xfa:dataNode="dataValue"':' xfa:dataNode="dataGroup"'),this[b]||0!==this[Ce].length){if(e.push(">"),this[b])"string"==typeof this[b]?e.push((0,i.encodeToXmlString)(this[b])):this[b][we](e);else for(const t of this[Ce])t[we](e);e.push(`</${n}${r}>`)}else e.push("/>")}[re](e){if(this[b]){const e=new He(this[Q],"#text");this[h](e),e[b]=this[b],this[b]=""}return this[h](e),!0}[ae](e){this[b]+=e}[S](){if(this[b]&&this[Ce].length>0){const e=new He(this[Q],"#text");this[h](e),e[b]=this[b],delete this[b]}}[ye](){return"#text"===this[ee]?n.HTMLResult.success({name:"#text",value:this[b]}):n.HTMLResult.EMPTY}[E](e=null){return e?this[Ce].filter((t=>t[ee]===e)):this[Ce]}[k](){return this[Ae]}[_](e){const t=this[Ae].get(e);return void 0!==t?t:this[E](e)}*[T](e,t){const r=this[Ae].get(e);r&&(yield r);for(const r of this[Ce])r[ee]===e&&(yield r),t&&(yield*r[T](e,t))}*[A](e,t){const r=this[Ae].get(e);!r||t&&r[m]||(yield r);for(const r of this[Ce])yield*r[A](e,t)}*[I](e,t,r){for(const n of this[Ce])n[ee]!==e||r&&n[m]||(yield n),t&&(yield*n[I](e,t,r))}[W](){return null===this[Fe]?0===this[Ce].length||this[Ce][0][Q]===s.NamespaceIds.xhtml.id:this[Fe]}[O](){return null===this[Fe]?0===this[Ce].length?this[b].trim():this[Ce][0][Q]===s.NamespaceIds.xhtml.id?this[Ce][0][me]().trim():null:this[b].trim()}[pe](e){this[b]=""+(e=e.value||"")}[w](e=!1){const t=Object.create(null);e&&(t.$ns=this[Q]),this[b]&&(t.$content=this[b]),t.$name=this[ee],t.children=[];for(const r of this[Ce])t.children.push(r[w](e));t.attributes=Object.create(null);for(const[e,r]of this[Ae])t.attributes[e]=r[b];return t}}t.XmlObject=He;class We extends $e{constructor(e,t){super(e,t),this[b]=""}[ae](e){this[b]+=e}[S](){}}t.ContentObject=We,t.OptionObject=class extends We{constructor(e,t,r){super(e,t),this[Re]=r}[S](){this[b]=(0,n.getKeyword)({data:this[b],defaultValue:this[Re][0],validate:e=>this[Re].includes(e)})}[d](e){super[d](e),delete this[Re]}},t.StringObject=class extends We{[S](){this[b]=this[b].trim()}};class ze extends We{constructor(e,t,r,n){super(e,t),this[Te]=r,this[je]=n}[S](){this[b]=(0,n.getInteger)({data:this[b],defaultValue:this[Te],validate:this[je]})}[d](e){super[d](e),delete this[Te],delete this[je]}}t.IntegerObject=ze,t.Option01=class extends ze{constructor(e,t){super(e,t,0,(e=>1===e))}},t.Option10=class extends ze{constructor(e,t){super(e,t,1,(e=>0===e))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLResult=void 0,t.getBBox=function(e){const t=-1;if(!e)return{x:t,y:t,width:t,height:t};const r=e.trim().split(/\s*,\s*/).map((e=>o(e,"-1")));if(4>r.length||0>r[2]||0>r[3])return{x:t,y:t,width:t,height:t};const[n,a,i,s]=r;return{x:n,y:a,width:i,height:s}},t.getColor=function(e,t=[0,0,0]){let[r,n,a]=t;if(!e)return{r:r,g:n,b:a};const i=e.trim().split(/\s*,\s*/).map((e=>Math.min(Math.max(0,parseInt(e.trim(),10)),255))).map((e=>isNaN(e)?0:e));return 3>i.length||([r,n,a]=i),{r:r,g:n,b:a}},t.getFloat=function({data:e,defaultValue:t,validate:r}){if(!e)return t;e=e.trim();const n=parseFloat(e);return!isNaN(n)&&r(n)?n:t},t.getInteger=function({data:e,defaultValue:t,validate:r}){if(!e)return t;e=e.trim();const n=parseInt(e,10);return!isNaN(n)&&r(n)?n:t},t.getKeyword=s,t.getMeasurement=o,t.getRatio=function(e){if(!e)return{num:1,den:1};const t=e.trim().split(/\s*:\s*/).map((e=>parseFloat(e))).filter((e=>!isNaN(e)));if(1===t.length&&t.push(1),0===t.length)return{num:1,den:1};const[r,n]=t;return{num:r,den:n}},t.getRelevant=function(e){return e?e.trim().split(/\s+/).map((e=>({excluded:"-"===e[0],viewname:e.substring(1)}))):[]},t.getStringOption=function(e,t){return s({data:e,defaultValue:t[0],validate:e=>t.includes(e)})},t.stripQuotes=function(e){return e.startsWith("'")||e.startsWith('"')?e.slice(1,e.length-1):e};var n=r(2);const a={pt:e=>e,cm:e=>e/2.54*72,mm:e=>e/25.4*72,in:e=>72*e,px:e=>e},i=/([+-]?\d+\.?\d*)(.*)/;function s({data:e,defaultValue:t,validate:r}){return e&&r(e=e.trim())?e:t}function o(e,t="0"){if(t=t||"0",!e)return o(t);const r=e.trim().match(i);if(!r)return o(t);const[,n,s]=r,c=parseFloat(n);if(isNaN(c))return o(t);if(0===c)return 0;const l=a[s];return l?l(c):c}class c{static get FAILURE(){return(0,n.shadow)(this,"FAILURE",new c(!1,null,null,null))}static get EMPTY(){return(0,n.shadow)(this,"EMPTY",new c(!0,null,null,null))}constructor(e,t,r,n){this.success=e,this.html=t,this.bbox=r,this.breakNode=n}isBreak(){return!!this.breakNode}static breakNode(e){return new c(!1,null,null,e)}static success(e,t=null){return new c(!0,e,t,null)}}t.HTMLResult=c},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NamespaceIds=t.$buildXFAObject=void 0;const r=Symbol();t.$buildXFAObject=r,t.NamespaceIds={config:{id:0,check:e=>e.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check:e=>"http://ns.adobe.com/xdp/pdf/"===e},signature:{id:6,check:e=>"http://www.w3.org/2000/09/xmldsig#"===e},sourceSet:{id:7,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:e=>"http://www.w3.org/1999/XSL/Transform"===e},template:{id:9,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:e=>e.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:e=>"http://ns.adobe.com/xdp/"===e},xfdf:{id:12,check:e=>"http://ns.adobe.com/xfdf/"===e},xhtml:{id:13,check:e=>"http://www.w3.org/1999/xhtml"===e},xmpmeta:{id:14,check:e=>"http://ns.adobe.com/xmpmeta/"===e}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createDataNode=function(e,t,r){const a=d(r);if(!a)return null;if(a.some((e=>e.operator===c.dotDot)))return null;const s=l.get(a[0].name);let o=0;s?(e=s(e,t),o=1):e=t||e;for(let t=a.length;t>o;o++){const{name:t,operator:r,index:s}=a[o];if(!isFinite(s))return a[o].index=0,f(e,a.slice(o));let l;switch(r){case c.dot:l=e[n.$getChildrenByName](t,!1);break;case c.dotDot:l=e[n.$getChildrenByName](t,!0);break;case c.dotHash:l=e[n.$getChildrenByClass](t),l=l instanceof n.XFAObjectArray?l.children:[l]}if(0===l.length)return f(e,a.slice(o));if(s>=l.length)return a[o].index=s-l.length,f(e,a.slice(o));{const t=l[s];if(!(t instanceof n.XFAObject))return(0,i.warn)("XFA - Cannot create a node."),null;e=t}}return null},t.searchNode=function(e,t,r,a=!0,i=!0){const s=d(r,a);if(!s)return null;const o=l.get(s[0].name);let u,f=0;o?(u=!0,e=[o(e,t)],f=1):(u=null===t,e=[t||e]);for(let r=s.length;r>f;f++){const{name:r,cacheName:a,operator:o,index:l}=s[f],d=[];for(const t of e){if(!(t instanceof n.XFAObject))continue;let e,s;if(i&&(s=h.get(t),s||(s=new Map,h.set(t,s)),e=s.get(a)),!e){switch(o){case c.dot:e=t[n.$getChildrenByName](r,!1);break;case c.dotDot:e=t[n.$getChildrenByName](r,!0);break;case c.dotHash:e=t[n.$getChildrenByClass](r),e=e instanceof n.XFAObjectArray?e.children:[e]}i&&s.set(a,e)}e.length>0&&d.push(e)}if(0!==d.length||u||0!==f)e=isFinite(l)?d.filter((e=>e.length>l)).map((e=>e[l])):d.flat();else{const r=t[n.$getParent]();if(!(t=r))return null;f=-1,e=[t]}}return 0===e.length?null:e};var n=r(77),a=r(79),i=r(2);const s=/^[^.[]+/,o=/^[^\]]+/,c={dot:0,dotDot:1,dotHash:2,dotBracket:3,dotParen:4},l=new Map([["$data",(e,t)=>e.datasets?e.datasets.data:e],["$record",(e,t)=>(e.datasets?e.datasets.data:e)[n.$getChildren]()[0]],["$template",(e,t)=>e.template],["$connectionSet",(e,t)=>e.connectionSet],["$form",(e,t)=>e.form],["$layout",(e,t)=>e.layout],["$host",(e,t)=>e.host],["$dataWindow",(e,t)=>e.dataWindow],["$event",(e,t)=>e.event],["!",(e,t)=>e.datasets],["$xfa",(e,t)=>e],["xfa",(e,t)=>e],["$",(e,t)=>t]]),h=new WeakMap,u=a.NamespaceIds.datasets.id;function d(e,t,r=!0){let n=e.match(s);if(!n)return null;let[a]=n;const l=[{name:a,cacheName:"."+a,index:0,js:null,formCalc:null,operator:c.dot}];let h=a.length;for(;e.length>h;){const d=h;if("["===e.charAt(h++)){if(n=e.slice(h).match(o),!n)return(0,i.warn)("XFA - Invalid index in SOM expression"),null;l.at(-1).index="*"===(u=(u=n[0]).trim())?1/0:parseInt(u,10)||0,h+=n[0].length+1;continue}let f;switch(e.charAt(h)){case".":if(!t)return null;h++,f=c.dotDot;break;case"#":h++,f=c.dotHash;break;case"[":if(r)return(0,i.warn)("XFA - SOM expression contains a FormCalc subexpression which is not supported for now."),null;f=c.dotBracket;break;case"(":if(r)return(0,i.warn)("XFA - SOM expression contains a JavaScript subexpression which is not supported for now."),null;f=c.dotParen;break;default:f=c.dot}if(n=e.slice(h).match(s),!n)break;[a]=n,h+=a.length,l.push({name:a,cacheName:e.slice(d,h),operator:f,index:0,js:null,formCalc:null})}var u;return l}function f(e,t){let r=null;for(const{name:a,index:i}of t){for(let t=0,s=isFinite(i)?i:0;s>=t;t++)r=new n.XmlObject(e[n.$namespaceId]===u?-1:e[n.$namespaceId],a),e[n.$appendChild](r);e=r}return r}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Binder=void 0;var n=r(77),a=r(82),i=r(80),s=r(79),o=r(2);const c=s.NamespaceIds.datasets.id;function l(e){const t=new a.Text({});return t[n.$content]=e,t}t.Binder=class{constructor(e){this.root=e,this.datasets=e.datasets,this.data=e.datasets&&e.datasets.data?e.datasets.data:new n.XmlObject(s.NamespaceIds.datasets.id,"data"),this.emptyMerge=0===this.data[n.$getChildren]().length,this.root.form=this.form=e.template[n.$clone]()}_isConsumeData(){return!this.emptyMerge&&this._mergeMode}_isMatchTemplate(){return!this._isConsumeData()}bind(){return this._bindElement(this.form,this.data),this.form}getData(){return this.data}_bindValue(e,t,r){if(e[n.$data]=t,e[n.$hasSettableValue]())if(t[n.$isDataValue]()){const r=t[n.$getDataValue]();e[n.$setValue](l(r))}else if(e instanceof a.Field&&e.ui&&e.ui.choiceList&&"multiSelect"===e.ui.choiceList.open){const r=t[n.$getChildren]().map((e=>e[n.$content].trim())).join("\n");e[n.$setValue](l(r))}else this._isConsumeData()&&(0,o.warn)("XFA - Nodes haven't the same type.");else!t[n.$isDataValue]()||this._isMatchTemplate()?this._bindElement(e,t):(0,o.warn)("XFA - Nodes haven't the same type.")}_findDataByNameToConsume(e,t,r,a){if(!e)return null;let i,o;for(let a=0;3>a;a++){for(i=r[n.$getRealChildrenByNameIt](e,!1,!0);o=i.next().value,o;)if(t===o[n.$isDataValue]())return o;if(r[n.$namespaceId]===s.NamespaceIds.datasets.id&&"data"===r[n.$nodeName])break;r=r[n.$getParent]()}return a?(i=this.data[n.$getRealChildrenByNameIt](e,!0,!1),o=i.next().value,o||(i=this.data[n.$getAttributeIt](e,!0),o=i.next().value,o&&o[n.$isDataValue]()?o:null)):null}_setProperties(e,t){if(e.hasOwnProperty("setProperty"))for(const{ref:r,target:s,connection:c}of e.setProperty.children){if(c)continue;if(!r)continue;const l=(0,i.searchNode)(this.root,t,r,!1,!1);if(!l){(0,o.warn)(`XFA - Invalid reference: ${r}.`);continue}const[h]=l;if(!h[n.$isDescendent](this.data)){(0,o.warn)("XFA - Invalid node: must be a data node.");continue}const u=(0,i.searchNode)(this.root,e,s,!1,!1);if(!u){(0,o.warn)(`XFA - Invalid target: ${s}.`);continue}const[d]=u;if(!d[n.$isDescendent](e)){(0,o.warn)("XFA - Invalid target: must be a property or subproperty.");continue}const f=d[n.$getParent]();if(d instanceof a.SetProperty||f instanceof a.SetProperty){(0,o.warn)("XFA - Invalid target: cannot be a setProperty or one of its properties.");continue}if(d instanceof a.BindItems||f instanceof a.BindItems){(0,o.warn)("XFA - Invalid target: cannot be a bindItems or one of its properties.");continue}const p=h[n.$text](),g=d[n.$nodeName];if(d instanceof n.XFAAttribute){const e=Object.create(null);e[g]=p;const t=Reflect.construct(Object.getPrototypeOf(f).constructor,[e]);f[g]=t[g]}else d.hasOwnProperty(n.$content)?(d[n.$data]=h,d[n.$content]=p,d[n.$finalize]()):(0,o.warn)("XFA - Invalid node to use in setProperty")}}_bindItems(e,t){if(!e.hasOwnProperty("items")||!e.hasOwnProperty("bindItems")||e.bindItems.isEmpty())return;for(const t of e.items.children)e[n.$removeChild](t);e.items.clear();const r=new a.Items({}),s=new a.Items({});e[n.$appendChild](r),e.items.push(r),e[n.$appendChild](s),e.items.push(s);for(const{ref:a,labelRef:c,valueRef:h,connection:u}of e.bindItems.children){if(u)continue;if(!a)continue;const e=(0,i.searchNode)(this.root,t,a,!1,!1);if(e)for(const t of e){if(!t[n.$isDescendent](this.datasets)){(0,o.warn)(`XFA - Invalid ref (${a}): must be a datasets child.`);continue}const e=(0,i.searchNode)(this.root,t,c,!0,!1);if(!e){(0,o.warn)(`XFA - Invalid label: ${c}.`);continue}const[u]=e;if(!u[n.$isDescendent](this.datasets)){(0,o.warn)("XFA - Invalid label: must be a datasets child.");continue}const d=(0,i.searchNode)(this.root,t,h,!0,!1);if(!d){(0,o.warn)(`XFA - Invalid value: ${h}.`);continue}const[f]=d;if(!f[n.$isDescendent](this.datasets)){(0,o.warn)("XFA - Invalid value: must be a datasets child.");continue}const p=l(u[n.$text]()),g=l(f[n.$text]());r[n.$appendChild](p),r.text.push(p),s[n.$appendChild](g),s.text.push(g)}else(0,o.warn)(`XFA - Invalid reference: ${a}.`)}}_bindOccurrences(e,t,r){let a;if(t.length>1&&(a=e[n.$clone](),a[n.$removeChild](a.occur),a.occur=null),this._bindValue(e,t[0],r),this._setProperties(e,t[0]),this._bindItems(e,t[0]),1===t.length)return;const i=e[n.$getParent](),s=e[n.$nodeName],o=i[n.$indexOf](e);for(let e=1,c=t.length;c>e;e++){const c=t[e],l=a[n.$clone]();i[s].push(l),i[n.$insertAt](o+e,l),this._bindValue(l,c,r),this._setProperties(l,c),this._bindItems(l,c)}}_createOccurrences(e){if(!this.emptyMerge)return;const{occur:t}=e;if(!t||1>=t.initial)return;const r=e[n.$getParent](),a=e[n.$nodeName];if(!(r[a]instanceof n.XFAObjectArray))return;let i;i=e.name?r[a].children.filter((t=>t.name===e.name)).length:r[a].children.length;const s=r[n.$indexOf](e)+1,o=t.initial-i;if(o){const t=e[n.$clone]();t[n.$removeChild](t.occur),t.occur=null,r[a].push(t),r[n.$insertAt](s,t);for(let e=1;o>e;e++){const i=t[n.$clone]();r[a].push(i),r[n.$insertAt](s+e,i)}}}_getOccurInfo(e){const{name:t,occur:r}=e;return r&&t?[r.min,-1===r.max?1/0:r.max]:[1,1]}_setAndBind(e,t){this._setProperties(e,t),this._bindItems(e,t),this._bindElement(e,t)}_bindElement(e,t){const r=[];this._createOccurrences(e);for(const a of e[n.$getChildren]()){if(a[n.$data])continue;if(void 0===this._mergeMode&&"subform"===a[n.$nodeName]){this._mergeMode="consumeData"===a.mergeMode;const e=t[n.$getChildren]();if(e.length>0)this._bindOccurrences(a,[e[0]],null);else if(this.emptyMerge){const e=a[n.$data]=new n.XmlObject(t[n.$namespaceId]===c?-1:t[n.$namespaceId],a.name||"root");t[n.$appendChild](e),this._bindElement(a,e)}continue}if(!a[n.$isBindable]())continue;let e=!1,s=null,l=null,h=null;if(a.bind){switch(a.bind.match){case"none":this._setAndBind(a,t);continue;case"global":e=!0;break;case"dataRef":if(!a.bind.ref){(0,o.warn)(`XFA - ref is empty in node ${a[n.$nodeName]}.`),this._setAndBind(a,t);continue}l=a.bind.ref}a.bind.picture&&(s=a.bind.picture[n.$content])}const[u,d]=this._getOccurInfo(a);if(l){if(h=(0,i.searchNode)(this.root,t,l,!0,!1),null===h){if(h=(0,i.createDataNode)(this.data,t,l),!h)continue;this._isConsumeData()&&(h[n.$consumed]=!0),this._setAndBind(a,h);continue}this._isConsumeData()&&(h=h.filter((e=>!e[n.$consumed]))),h.length>d?h=h.slice(0,d):0===h.length&&(h=null),h&&this._isConsumeData()&&h.forEach((e=>{e[n.$consumed]=!0}))}else{if(!a.name){this._setAndBind(a,t);continue}if(this._isConsumeData()){const r=[];for(;d>r.length;){const i=this._findDataByNameToConsume(a.name,a[n.$hasSettableValue](),t,e);if(!i)break;i[n.$consumed]=!0,r.push(i)}h=r.length>0?r:null}else{if(h=t[n.$getRealChildrenByNameIt](a.name,!1,this.emptyMerge).next().value,!h){if(0===u){r.push(a);continue}h=a[n.$data]=new n.XmlObject(t[n.$namespaceId]===c?-1:t[n.$namespaceId],a.name),this.emptyMerge&&(h[n.$consumed]=!0),t[n.$appendChild](h),this._setAndBind(a,h);continue}this.emptyMerge&&(h[n.$consumed]=!0),h=[h]}}h?this._bindOccurrences(a,h,s):u>0?this._setAndBind(a,t):r.push(a)}r.forEach((e=>e[n.$getParent]()[n.$removeChild](e)))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Value=t.Text=t.TemplateNamespace=t.Template=t.SetProperty=t.Items=t.Field=t.BindItems=void 0;var n=r(77),a=r(79),i=r(83),s=r(84),o=r(78),c=r(2),l=r(85),h=r(6),u=r(80);const d=a.NamespaceIds.template.id,f="http://www.w3.org/2000/svg",p=/^H(\d+)$/,g=new Set(["image/gif","image/jpeg","image/jpg","image/pjpeg","image/png","image/apng","image/x-png","image/bmp","image/x-ms-bmp","image/tiff","image/tif","application/octet-stream"]),m=[[[66,77],"image/bmp"],[[255,216,255],"image/jpeg"],[[73,73,42,0],"image/tiff"],[[77,77,0,42],"image/tiff"],[[71,73,70,56,57,97],"image/gif"],[[137,80,78,71,13,10,26,10],"image/png"]];function b(e){if(!e||!e.border)return{w:0,h:0};const t=e.border[n.$getExtra]();return t?{w:t.widths[0]+t.widths[2]+t.insets[0]+t.insets[2],h:t.widths[1]+t.widths[3]+t.insets[1]+t.insets[3]}:{w:0,h:0}}function y(e){return e.margin&&(e.margin.topInset||e.margin.rightInset||e.margin.bottomInset||e.margin.leftInset)}function w(e,t){if(!e.value){const t=new Mt({});e[n.$appendChild](t),e.value=t}e.value[n.$setValue](t)}function*v(e){for(const t of e[n.$getChildren]())t instanceof wt?yield*t[n.$getContainedChildren]():yield t}function S(e){return e.validate&&"error"===e.validate.nullTest}function x(e){for(;e;){if(!e.traversal)return void(e[n.$tabIndex]=e[n.$getParent]()[n.$tabIndex]);if(e[n.$tabIndex])return;let t=null;for(const r of e.traversal[n.$getChildren]())if("next"===r.operation){t=r;break}if(!t||!t.ref)return void(e[n.$tabIndex]=e[n.$getParent]()[n.$tabIndex]);const r=e[n.$getTemplateRoot]();e[n.$tabIndex]=++r[n.$tabIndex];const a=r[n.$searchNode](t.ref,e);if(!a)return;e=a[0]}}function A(e,t){const r=e.assist;if(r){const e=r[n.$toHTML]();e&&(t.title=e);const a=r.role.match(p);if(a){const e=a[1];t.role="heading",t["aria-level"]=e}}if("table"===e.layout)t.role="table";else if("row"===e.layout)t.role="row";else{const r=e[n.$getParent]();"row"===r.layout&&(t.role=r.assist&&"TH"===r.assist.role?"columnheader":"cell")}}function k(e){if(!e.assist)return null;const t=e.assist;return t.speak&&""!==t.speak[n.$content]?t.speak[n.$content]:t.toolTip?t.toolTip[n.$content]:null}function C(e){return o.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{style:Object.create(null)},value:e}]})}function _(e){const t=e[n.$getTemplateRoot]();null===t[n.$extra].firstUnsplittable&&(t[n.$extra].firstUnsplittable=e,t[n.$extra].noLayoutFailure=!0)}function F(e){const t=e[n.$getTemplateRoot]();t[n.$extra].firstUnsplittable===e&&(t[n.$extra].noLayoutFailure=!1)}function T(e){if(e[n.$extra])return!1;if(e[n.$extra]=Object.create(null),"auto"===e.targetType)return!1;const t=e[n.$getTemplateRoot]();let r=null;if(e.target){if(r=t[n.$searchNode](e.target,e[n.$getParent]()),!r)return!1;r=r[0]}const{currentPageArea:a,currentContentArea:i}=t[n.$extra];if("pageArea"===e.targetType)return r instanceof Ze||(r=null),e.startNew?(e[n.$extra].target=r||a,!0):!(!r||r===a||(e[n.$extra].target=r,0));r instanceof Q||(r=null);const s=r&&r[n.$getParent]();let o,c=s;if(e.startNew)if(r){const e=s.contentArea.children,t=e.indexOf(i),n=e.indexOf(r);-1!==t&&n>t&&(c=null),o=n-1}else o=a.contentArea.children.indexOf(i);else{if(!r||r===i)return!1;o=s.contentArea.children.indexOf(r)-1,c=s===a?null:s}return e[n.$extra].target=c,e[n.$extra].index=o,!0}function O(e,t,r){const a=e[n.$getTemplateRoot](),i=a[n.$extra].noLayoutFailure,s=t[n.$getSubformParent];t[n.$getSubformParent]=()=>e,a[n.$extra].noLayoutFailure=!0;const o=t[n.$toHTML](r);e[n.$addHTML](o.html,o.bbox),a[n.$extra].noLayoutFailure=i,t[n.$getSubformParent]=s}class P extends n.StringObject{constructor(e){super(d,"appearanceFilter"),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}}class I extends n.XFAObject{constructor(e){super(d,"arc",!0),this.circular=(0,o.getInteger)({data:e.circular,defaultValue:0,validate:e=>1===e}),this.hand=(0,o.getStringOption)(e.hand,["even","left","right"]),this.id=e.id||"",this.startAngle=(0,o.getFloat)({data:e.startAngle,defaultValue:0,validate:e=>!0}),this.sweepAngle=(0,o.getFloat)({data:e.sweepAngle,defaultValue:360,validate:e=>!0}),this.use=e.use||"",this.usehref=e.usehref||"",this.edge=null,this.fill=null}[n.$toHTML](){const e=this.edge||new he({}),t=e[n.$toStyle](),r=Object.create(null);let a;this.fill&&"visible"===this.fill.presence?Object.assign(r,this.fill[n.$toStyle]()):r.fill="transparent",r.strokeWidth=(0,s.measureToString)("visible"===e.presence?e.thickness:0),r.stroke=t.color;const i={xmlns:f,style:{width:"100%",height:"100%",overflow:"visible"}};if(360===this.sweepAngle)a={name:"ellipse",attributes:{xmlns:f,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:r}};else{const e=this.startAngle*Math.PI/180,t=this.sweepAngle*Math.PI/180,n=this.sweepAngle>180?1:0,[s,o,c,l]=[50*(1+Math.cos(e)),50*(1-Math.sin(e)),50*(1+Math.cos(e+t)),50*(1-Math.sin(e+t))];a={name:"path",attributes:{xmlns:f,d:`M ${s} ${o} A 50 50 0 ${n} 0 ${c} ${l}`,vectorEffect:"non-scaling-stroke",style:r}},Object.assign(i,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}const c={name:"svg",children:[a],attributes:i};return y(this[n.$getParent]()[n.$getParent]())?o.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[c]}):(c.attributes.style.position="absolute",o.HTMLResult.success(c))}}class E extends n.XFAObject{constructor(e){super(d,"area",!0),this.colSpan=(0,o.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.id=e.id||"",this.name=e.name||"",this.relevant=(0,o.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.x=(0,o.getMeasurement)(e.x,"0pt"),this.y=(0,o.getMeasurement)(e.y,"0pt"),this.desc=null,this.extras=null,this.area=new n.XFAObjectArray,this.draw=new n.XFAObjectArray,this.exObject=new n.XFAObjectArray,this.exclGroup=new n.XFAObjectArray,this.field=new n.XFAObjectArray,this.subform=new n.XFAObjectArray,this.subformSet=new n.XFAObjectArray}*[n.$getContainedChildren](){yield*v(this)}[n.$isTransparent](){return!0}[n.$isBindable](){return!0}[n.$addHTML](e,t){const[r,a,i,s]=t;this[n.$extra].width=Math.max(this[n.$extra].width,r+i),this[n.$extra].height=Math.max(this[n.$extra].height,a+s),this[n.$extra].children.push(e)}[n.$getAvailableSpace](){return this[n.$extra].availableSpace}[n.$toHTML](e){const t=(0,s.toStyle)(this,"position"),r={style:t,id:this[n.$uid],class:["xfaArea"]};(0,s.isPrintOnly)(this)&&r.class.push("xfaPrintOnly"),this.name&&(r.xfaName=this.name);const a=[];this[n.$extra]={children:a,width:0,height:0,availableSpace:e};const i=this[n.$childrenToHTML]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!i.success)return i.isBreak()?i:(delete this[n.$extra],o.HTMLResult.FAILURE);t.width=(0,s.measureToString)(this[n.$extra].width),t.height=(0,s.measureToString)(this[n.$extra].height);const c={name:"div",attributes:r,children:a},l=[this.x,this.y,this[n.$extra].width,this[n.$extra].height];return delete this[n.$extra],o.HTMLResult.success(c,l)}}class M extends n.XFAObject{constructor(e){super(d,"assist",!0),this.id=e.id||"",this.role=e.role||"",this.use=e.use||"",this.usehref=e.usehref||"",this.speak=null,this.toolTip=null}[n.$toHTML](){return this.toolTip&&this.toolTip[n.$content]?this.toolTip[n.$content]:null}}class R extends n.XFAObject{constructor(e){super(d,"barcode",!0),this.charEncoding=(0,o.getKeyword)({data:e.charEncoding?e.charEncoding.toLowerCase():"",defaultValue:"",validate:e=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\d{2}/)}),this.checksum=(0,o.getStringOption)(e.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]),this.dataColumnCount=(0,o.getInteger)({data:e.dataColumnCount,defaultValue:-1,validate:e=>e>=0}),this.dataLength=(0,o.getInteger)({data:e.dataLength,defaultValue:-1,validate:e=>e>=0}),this.dataPrep=(0,o.getStringOption)(e.dataPrep,["none","flateCompress"]),this.dataRowCount=(0,o.getInteger)({data:e.dataRowCount,defaultValue:-1,validate:e=>e>=0}),this.endChar=e.endChar||"",this.errorCorrectionLevel=(0,o.getInteger)({data:e.errorCorrectionLevel,defaultValue:-1,validate:e=>e>=0&&8>=e}),this.id=e.id||"",this.moduleHeight=(0,o.getMeasurement)(e.moduleHeight,"5mm"),this.moduleWidth=(0,o.getMeasurement)(e.moduleWidth,"0.25mm"),this.printCheckDigit=(0,o.getInteger)({data:e.printCheckDigit,defaultValue:0,validate:e=>1===e}),this.rowColumnRatio=(0,o.getRatio)(e.rowColumnRatio),this.startChar=e.startChar||"",this.textLocation=(0,o.getStringOption)(e.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]),this.truncate=(0,o.getInteger)({data:e.truncate,defaultValue:0,validate:e=>1===e}),this.type=(0,o.getStringOption)(e.type?e.type.toLowerCase():"",["aztec","codabar","code2of5industrial","code2of5interleaved","code2of5matrix","code2of5standard","code3of9","code3of9extended","code11","code49","code93","code128","code128a","code128b","code128c","code128sscc","datamatrix","ean8","ean8add2","ean8add5","ean13","ean13add2","ean13add5","ean13pwcd","fim","logmars","maxicode","msi","pdf417","pdf417macro","plessey","postauscust2","postauscust3","postausreplypaid","postausstandard","postukrm4scc","postusdpbc","postusimb","postusstandard","postus5zip","qrcode","rfid","rss14","rss14expanded","rss14limited","rss14stacked","rss14stackedomni","rss14truncated","telepen","ucc128","ucc128random","ucc128sscc","upca","upcaadd2","upcaadd5","upcapwcd","upce","upceadd2","upceadd5","upcean2","upcean5","upsmaxicode"]),this.upsMode=(0,o.getStringOption)(e.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]),this.use=e.use||"",this.usehref=e.usehref||"",this.wideNarrowRatio=(0,o.getRatio)(e.wideNarrowRatio),this.encrypt=null,this.extras=null}}class D extends n.XFAObject{constructor(e){super(d,"bind",!0),this.match=(0,o.getStringOption)(e.match,["once","dataRef","global","none"]),this.ref=e.ref||"",this.picture=null}}class N extends n.XFAObject{constructor(e){super(d,"bindItems"),this.connection=e.connection||"",this.labelRef=e.labelRef||"",this.ref=e.ref||"",this.valueRef=e.valueRef||""}}t.BindItems=N;class L extends n.XFAObject{constructor(e){super(d,"bookend"),this.id=e.id||"",this.leader=e.leader||"",this.trailer=e.trailer||"",this.use=e.use||"",this.usehref=e.usehref||""}}class j extends n.Option01{constructor(e){super(d,"boolean"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[n.$toHTML](e){return C(1===this[n.$content]?"1":"0")}}class B extends n.XFAObject{constructor(e){super(d,"border",!0),this.break=(0,o.getStringOption)(e.break,["close","open"]),this.hand=(0,o.getStringOption)(e.hand,["even","left","right"]),this.id=e.id||"",this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,o.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.corner=new n.XFAObjectArray(4),this.edge=new n.XFAObjectArray(4),this.extras=null,this.fill=null,this.margin=null}[n.$getExtra](){if(!this[n.$extra]){const e=this.edge.children.slice();if(4>e.length){const t=e.at(-1)||new he({});for(let r=e.length;4>r;r++)e.push(t)}const t=e.map((e=>e.thickness)),r=[0,0,0,0];this.margin&&(r[0]=this.margin.topInset,r[1]=this.margin.rightInset,r[2]=this.margin.bottomInset,r[3]=this.margin.leftInset),this[n.$extra]={widths:t,insets:r,edges:e}}return this[n.$extra]}[n.$toStyle](){const{edges:e}=this[n.$getExtra](),t=e.map((e=>{const t=e[n.$toStyle]();return t.color=t.color||"#000000",t})),r=Object.create(null);if(this.margin&&Object.assign(r,this.margin[n.$toStyle]()),this.fill&&"visible"===this.fill.presence&&Object.assign(r,this.fill[n.$toStyle]()),this.corner.children.some((e=>0!==e.radius))){const e=this.corner.children.map((e=>e[n.$toStyle]()));if(2===e.length||3===e.length){const t=e.at(-1);for(let r=e.length;4>r;r++)e.push(t)}r.borderRadius=e.map((e=>e.radius)).join(" ")}switch(this.presence){case"invisible":case"hidden":r.borderStyle="";break;case"inactive":r.borderStyle="none";break;default:r.borderStyle=t.map((e=>e.style)).join(" ")}return r.borderWidth=t.map((e=>e.width)).join(" "),r.borderColor=t.map((e=>e.color)).join(" "),r}}class U extends n.XFAObject{constructor(e){super(d,"break",!0),this.after=(0,o.getStringOption)(e.after,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.afterTarget=e.afterTarget||"",this.before=(0,o.getStringOption)(e.before,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.beforeTarget=e.beforeTarget||"",this.bookendLeader=e.bookendLeader||"",this.bookendTrailer=e.bookendTrailer||"",this.id=e.id||"",this.overflowLeader=e.overflowLeader||"",this.overflowTarget=e.overflowTarget||"",this.overflowTrailer=e.overflowTrailer||"",this.startNew=(0,o.getInteger)({data:e.startNew,defaultValue:0,validate:e=>1===e}),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}}class $ extends n.XFAObject{constructor(e){super(d,"breakAfter",!0),this.id=e.id||"",this.leader=e.leader||"",this.startNew=(0,o.getInteger)({data:e.startNew,defaultValue:0,validate:e=>1===e}),this.target=e.target||"",this.targetType=(0,o.getStringOption)(e.targetType,["auto","contentArea","pageArea"]),this.trailer=e.trailer||"",this.use=e.use||"",this.usehref=e.usehref||"",this.script=null}}class q extends n.XFAObject{constructor(e){super(d,"breakBefore",!0),this.id=e.id||"",this.leader=e.leader||"",this.startNew=(0,o.getInteger)({data:e.startNew,defaultValue:0,validate:e=>1===e}),this.target=e.target||"",this.targetType=(0,o.getStringOption)(e.targetType,["auto","contentArea","pageArea"]),this.trailer=e.trailer||"",this.use=e.use||"",this.usehref=e.usehref||"",this.script=null}[n.$toHTML](e){return this[n.$extra]={},o.HTMLResult.FAILURE}}class X extends n.XFAObject{constructor(e){super(d,"button",!0),this.highlight=(0,o.getStringOption)(e.highlight,["inverted","none","outline","push"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}[n.$toHTML](e){const t=this[n.$getParent]()[n.$getParent](),r={name:"button",attributes:{id:this[n.$uid],class:["xfaButton"],style:{}},children:[]};for(const e of t.event.children){if("click"!==e.activity||!e.script)continue;const t=(0,h.recoverJsURL)(e.script[n.$content]);if(!t)continue;const a=(0,s.fixURL)(t.url);a&&r.children.push({name:"a",attributes:{id:"link"+this[n.$uid],href:a,newWindow:t.newWindow,class:["xfaLink"],style:{}},children:[]})}return o.HTMLResult.success(r)}}class H extends n.XFAObject{constructor(e){super(d,"calculate",!0),this.id=e.id||"",this.override=(0,o.getStringOption)(e.override,["disabled","error","ignore","warning"]),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.message=null,this.script=null}}class W extends n.XFAObject{constructor(e){super(d,"caption",!0),this.id=e.id||"",this.placement=(0,o.getStringOption)(e.placement,["left","bottom","inline","right","top"]),this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.reserve=Math.ceil((0,o.getMeasurement)(e.reserve)),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.font=null,this.margin=null,this.para=null,this.value=null}[n.$setValue](e){w(this,e)}[n.$getExtra](e){if(!this[n.$extra]){let{width:t,height:r}=e;switch(this.placement){case"left":case"right":case"inline":t=this.reserve>0?this.reserve:t;break;case"top":case"bottom":r=this.reserve>0?this.reserve:r}this[n.$extra]=(0,s.layoutNode)(this,{width:t,height:r})}return this[n.$extra]}[n.$toHTML](e){if(!this.value)return o.HTMLResult.EMPTY;this[n.$pushPara]();const t=this.value[n.$toHTML](e).html;if(!t)return this[n.$popPara](),o.HTMLResult.EMPTY;const r=this.reserve;if(0>=this.reserve){const{w:t,h:r}=this[n.$getExtra](e);switch(this.placement){case"left":case"right":case"inline":this.reserve=t;break;case"top":case"bottom":this.reserve=r}}const a=[];a.push("string"==typeof t?{name:"#text",value:t}:t);const i=(0,s.toStyle)(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(i.width=(0,s.measureToString)(this.reserve));break;case"top":case"bottom":this.reserve>0&&(i.height=(0,s.measureToString)(this.reserve))}return(0,s.setPara)(this,null,t),this[n.$popPara](),this.reserve=r,o.HTMLResult.success({name:"div",attributes:{style:i,class:["xfaCaption"]},children:a})}}class z extends n.StringObject{constructor(e){super(d,"certificate"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class G extends n.XFAObject{constructor(e){super(d,"certificates",!0),this.credentialServerPolicy=(0,o.getStringOption)(e.credentialServerPolicy,["optional","required"]),this.id=e.id||"",this.url=e.url||"",this.urlPolicy=e.urlPolicy||"",this.use=e.use||"",this.usehref=e.usehref||"",this.encryption=null,this.issuers=null,this.keyUsage=null,this.oids=null,this.signing=null,this.subjectDNs=null}}class V extends n.XFAObject{constructor(e){super(d,"checkButton",!0),this.id=e.id||"",this.mark=(0,o.getStringOption)(e.mark,["default","check","circle","cross","diamond","square","star"]),this.shape=(0,o.getStringOption)(e.shape,["square","round"]),this.size=(0,o.getMeasurement)(e.size,"10pt"),this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.margin=null}[n.$toHTML](e){const t=(0,s.toStyle)("margin"),r=(0,s.measureToString)(this.size);let a,i,c;t.width=t.height=r;const l=this[n.$getParent]()[n.$getParent](),h=l.items.children.length&&l.items.children[0][n.$toHTML]().html||[],u={on:""+(void 0!==h[0]?h[0]:"on"),off:""+(void 0!==h[1]?h[1]:"off")},d=(l.value&&l.value[n.$text]()||"off")===u.on||void 0,f=l[n.$getSubformParent]();let p;f instanceof Se?(c=f[n.$uid],a="radio",i="xfaRadio",p=f[n.$data]&&f[n.$data][n.$uid]||f[n.$uid]):(a="checkbox",i="xfaCheckbox",p=l[n.$data]&&l[n.$data][n.$uid]||l[n.$uid]);const g={name:"input",attributes:{class:[i],style:t,fieldId:l[n.$uid],dataId:p,type:a,checked:d,xfaOn:u.on,xfaOff:u.off,"aria-label":k(l),"aria-required":!1}};return c&&(g.attributes.name=c),S(l)&&(g.attributes["aria-required"]=!0,g.attributes.required=!0),o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[g]})}}class Y extends n.XFAObject{constructor(e){super(d,"choiceList",!0),this.commitOn=(0,o.getStringOption)(e.commitOn,["select","exit"]),this.id=e.id||"",this.open=(0,o.getStringOption)(e.open,["userControl","always","multiSelect","onEntry"]),this.textEntry=(0,o.getInteger)({data:e.textEntry,defaultValue:0,validate:e=>1===e}),this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.margin=null}[n.$toHTML](e){const t=(0,s.toStyle)(this,"border","margin"),r=this[n.$getParent]()[n.$getParent](),a={fontSize:`calc(${r.font&&r.font.size||10}px * var(--scale-factor))`},i=[];if(r.items.children.length>0){const e=r.items;let t=0,s=0;2===e.children.length&&(t=e.children[0].save,s=1-t);const o=e.children[t][n.$toHTML]().html,c=e.children[s][n.$toHTML]().html;let l=!1;const h=r.value&&r.value[n.$text]()||"";for(let e=0,t=o.length;t>e;e++){const t={name:"option",attributes:{value:c[e]||o[e],style:a},value:o[e]};c[e]===h&&(t.attributes.selected=l=!0),i.push(t)}l||i.splice(0,0,{name:"option",attributes:{hidden:!0,selected:!0},value:" "})}const c={class:["xfaSelect"],fieldId:r[n.$uid],dataId:r[n.$data]&&r[n.$data][n.$uid]||r[n.$uid],style:t,"aria-label":k(r),"aria-required":!1};return S(r)&&(c["aria-required"]=!0,c.required=!0),"multiSelect"===this.open&&(c.multiple=!0),o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[{name:"select",children:i,attributes:c}]})}}class K extends n.XFAObject{constructor(e){super(d,"color",!0),this.cSpace=(0,o.getStringOption)(e.cSpace,["SRGB"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.value=e.value?(0,o.getColor)(e.value):"",this.extras=null}[n.$hasSettableValue](){return!1}[n.$toStyle](){return this.value?c.Util.makeHexColor(this.value.r,this.value.g,this.value.b):null}}class J extends n.XFAObject{constructor(e){super(d,"comb"),this.id=e.id||"",this.numberOfCells=(0,o.getInteger)({data:e.numberOfCells,defaultValue:0,validate:e=>e>=0}),this.use=e.use||"",this.usehref=e.usehref||""}}class Z extends n.XFAObject{constructor(e){super(d,"connect",!0),this.connection=e.connection||"",this.id=e.id||"",this.ref=e.ref||"",this.usage=(0,o.getStringOption)(e.usage,["exportAndImport","exportOnly","importOnly"]),this.use=e.use||"",this.usehref=e.usehref||"",this.picture=null}}class Q extends n.XFAObject{constructor(e){super(d,"contentArea",!0),this.h=(0,o.getMeasurement)(e.h),this.id=e.id||"",this.name=e.name||"",this.relevant=(0,o.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.w=(0,o.getMeasurement)(e.w),this.x=(0,o.getMeasurement)(e.x,"0pt"),this.y=(0,o.getMeasurement)(e.y,"0pt"),this.desc=null,this.extras=null}[n.$toHTML](e){const t={left:(0,s.measureToString)(this.x),top:(0,s.measureToString)(this.y),width:(0,s.measureToString)(this.w),height:(0,s.measureToString)(this.h)},r=["xfaContentarea"];return(0,s.isPrintOnly)(this)&&r.push("xfaPrintOnly"),o.HTMLResult.success({name:"div",children:[],attributes:{style:t,class:r,id:this[n.$uid]}})}}class ee extends n.XFAObject{constructor(e){super(d,"corner",!0),this.id=e.id||"",this.inverted=(0,o.getInteger)({data:e.inverted,defaultValue:0,validate:e=>1===e}),this.join=(0,o.getStringOption)(e.join,["square","round"]),this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.radius=(0,o.getMeasurement)(e.radius),this.stroke=(0,o.getStringOption)(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=(0,o.getMeasurement)(e.thickness,"0.5pt"),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[n.$toStyle](){const e=(0,s.toStyle)(this,"visibility");return e.radius=(0,s.measureToString)("square"===this.join?0:this.radius),e}}class te extends n.ContentObject{constructor(e){super(d,"date"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[n.$finalize](){const e=this[n.$content].trim();this[n.$content]=e?new Date(e):null}[n.$toHTML](e){return C(this[n.$content]?""+this[n.$content]:"")}}class re extends n.ContentObject{constructor(e){super(d,"dateTime"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[n.$finalize](){const e=this[n.$content].trim();this[n.$content]=e?new Date(e):null}[n.$toHTML](e){return C(this[n.$content]?""+this[n.$content]:"")}}class ne extends n.XFAObject{constructor(e){super(d,"dateTimeEdit",!0),this.hScrollPolicy=(0,o.getStringOption)(e.hScrollPolicy,["auto","off","on"]),this.id=e.id||"",this.picker=(0,o.getStringOption)(e.picker,["host","none"]),this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[n.$toHTML](e){const t=(0,s.toStyle)(this,"border","font","margin"),r=this[n.$getParent]()[n.$getParent](),a={name:"input",attributes:{type:"text",fieldId:r[n.$uid],dataId:r[n.$data]&&r[n.$data][n.$uid]||r[n.$uid],class:["xfaTextfield"],style:t,"aria-label":k(r),"aria-required":!1}};return S(r)&&(a.attributes["aria-required"]=!0,a.attributes.required=!0),o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[a]})}}class ae extends n.ContentObject{constructor(e){super(d,"decimal"),this.fracDigits=(0,o.getInteger)({data:e.fracDigits,defaultValue:2,validate:e=>!0}),this.id=e.id||"",this.leadDigits=(0,o.getInteger)({data:e.leadDigits,defaultValue:-1,validate:e=>!0}),this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[n.$finalize](){const e=parseFloat(this[n.$content].trim());this[n.$content]=isNaN(e)?null:e}[n.$toHTML](e){return C(null!==this[n.$content]?""+this[n.$content]:"")}}class ie extends n.XFAObject{constructor(e){super(d,"defaultUi",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}}class se extends n.XFAObject{constructor(e){super(d,"desc",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.boolean=new n.XFAObjectArray,this.date=new n.XFAObjectArray,this.dateTime=new n.XFAObjectArray,this.decimal=new n.XFAObjectArray,this.exData=new n.XFAObjectArray,this.float=new n.XFAObjectArray,this.image=new n.XFAObjectArray,this.integer=new n.XFAObjectArray,this.text=new n.XFAObjectArray,this.time=new n.XFAObjectArray}}class oe extends n.OptionObject{constructor(e){super(d,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class ce extends n.XFAObject{constructor(e){super(d,"digestMethods",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.digestMethod=new n.XFAObjectArray}}class le extends n.XFAObject{constructor(e){super(d,"draw",!0),this.anchorType=(0,o.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,o.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.h=e.h?(0,o.getMeasurement)(e.h):"",this.hAlign=(0,o.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.locale=e.locale||"",this.maxH=(0,o.getMeasurement)(e.maxH,"0pt"),this.maxW=(0,o.getMeasurement)(e.maxW,"0pt"),this.minH=(0,o.getMeasurement)(e.minH,"0pt"),this.minW=(0,o.getMeasurement)(e.minW,"0pt"),this.name=e.name||"",this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,o.getRelevant)(e.relevant),this.rotate=(0,o.getInteger)({data:e.rotate,defaultValue:0,validate:e=>e%90==0}),this.use=e.use||"",this.usehref=e.usehref||"",this.w=e.w?(0,o.getMeasurement)(e.w):"",this.x=(0,o.getMeasurement)(e.x,"0pt"),this.y=(0,o.getMeasurement)(e.y,"0pt"),this.assist=null,this.border=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.value=null,this.setProperty=new n.XFAObjectArray}[n.$setValue](e){w(this,e)}[n.$toHTML](e){if(x(this),"hidden"===this.presence||"inactive"===this.presence)return o.HTMLResult.EMPTY;(0,s.fixDimensions)(this),this[n.$pushPara]();const t=this.w,r=this.h,{w:a,h:c,isBroken:l}=(0,s.layoutNode)(this,e);if(a&&""===this.w){if(l&&this[n.$getSubformParent]()[n.$isThereMoreWidth]())return this[n.$popPara](),o.HTMLResult.FAILURE;this.w=a}if(c&&""===this.h&&(this.h=c),_(this),!(0,i.checkDimensions)(this,e))return this.w=t,this.h=r,this[n.$popPara](),o.HTMLResult.FAILURE;F(this);const h=(0,s.toStyle)(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");(0,s.setMinMaxDimensions)(this,h),h.margin&&(h.padding=h.margin,delete h.margin);const u=["xfaDraw"];this.font&&u.push("xfaFont"),(0,s.isPrintOnly)(this)&&u.push("xfaPrintOnly");const d={style:h,id:this[n.$uid],class:u};this.name&&(d.xfaName=this.name);const f={name:"div",attributes:d,children:[]};A(this,d);const p=(0,s.computeBbox)(this,f,e),g=this.value?this.value[n.$toHTML](e).html:null;return null===g?(this.w=t,this.h=r,this[n.$popPara](),o.HTMLResult.success((0,s.createWrapper)(this,f),p)):(f.children.push(g),(0,s.setPara)(this,h,g),this.w=t,this.h=r,this[n.$popPara](),o.HTMLResult.success((0,s.createWrapper)(this,f),p))}}class he extends n.XFAObject{constructor(e){super(d,"edge",!0),this.cap=(0,o.getStringOption)(e.cap,["square","butt","round"]),this.id=e.id||"",this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.stroke=(0,o.getStringOption)(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=(0,o.getMeasurement)(e.thickness,"0.5pt"),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[n.$toStyle](){const e=(0,s.toStyle)(this,"visibility");if(Object.assign(e,{linecap:this.cap,width:(0,s.measureToString)(this.thickness),color:this.color?this.color[n.$toStyle]():"#000000",style:""}),"visible"!==this.presence)e.style="none";else switch(this.stroke){case"solid":e.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":e.style="dashed";break;case"dotted":e.style="dotted";break;case"embossed":e.style="ridge";break;case"etched":e.style="groove";break;case"lowered":e.style="inset";break;case"raised":e.style="outset"}return e}}class ue extends n.OptionObject{constructor(e){super(d,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class de extends n.XFAObject{constructor(e){super(d,"encodings",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.encoding=new n.XFAObjectArray}}class fe extends n.XFAObject{constructor(e){super(d,"encrypt",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.certificate=null}}class pe extends n.XFAObject{constructor(e){super(d,"encryptData",!0),this.id=e.id||"",this.operation=(0,o.getStringOption)(e.operation,["encrypt","decrypt"]),this.target=e.target||"",this.use=e.use||"",this.usehref=e.usehref||"",this.filter=null,this.manifest=null}}class ge extends n.XFAObject{constructor(e){super(d,"encryption",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.certificate=new n.XFAObjectArray}}class me extends n.OptionObject{constructor(e){super(d,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class be extends n.XFAObject{constructor(e){super(d,"encryptionMethods",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.encryptionMethod=new n.XFAObjectArray}}class ye extends n.XFAObject{constructor(e){super(d,"event",!0),this.activity=(0,o.getStringOption)(e.activity,["click","change","docClose","docReady","enter","exit","full","indexChange","initialize","mouseDown","mouseEnter","mouseExit","mouseUp","postExecute","postOpen","postPrint","postSave","postSign","postSubmit","preExecute","preOpen","prePrint","preSave","preSign","preSubmit","ready","validationState"]),this.id=e.id||"",this.listen=(0,o.getStringOption)(e.listen,["refOnly","refAndDescendents"]),this.name=e.name||"",this.ref=e.ref||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.encryptData=null,this.execute=null,this.script=null,this.signData=null,this.submit=null}}class we extends n.ContentObject{constructor(e){super(d,"exData"),this.contentType=e.contentType||"",this.href=e.href||"",this.id=e.id||"",this.maxLength=(0,o.getInteger)({data:e.maxLength,defaultValue:-1,validate:e=>e>=-1}),this.name=e.name||"",this.rid=e.rid||"",this.transferEncoding=(0,o.getStringOption)(e.transferEncoding,["none","base64","package"]),this.use=e.use||"",this.usehref=e.usehref||""}[n.$isCDATAXml](){return"text/html"===this.contentType}[n.$onChild](e){return("text/html"===this.contentType&&e[n.$namespaceId]===a.NamespaceIds.xhtml.id||"text/xml"===this.contentType)&&(this[n.$content]=e,!0)}[n.$toHTML](e){return"text/html"===this.contentType&&this[n.$content]?this[n.$content][n.$toHTML](e):o.HTMLResult.EMPTY}}class ve extends n.XFAObject{constructor(e){super(d,"exObject",!0),this.archive=e.archive||"",this.classId=e.classId||"",this.codeBase=e.codeBase||"",this.codeType=e.codeType||"",this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.boolean=new n.XFAObjectArray,this.date=new n.XFAObjectArray,this.dateTime=new n.XFAObjectArray,this.decimal=new n.XFAObjectArray,this.exData=new n.XFAObjectArray,this.exObject=new n.XFAObjectArray,this.float=new n.XFAObjectArray,this.image=new n.XFAObjectArray,this.integer=new n.XFAObjectArray,this.text=new n.XFAObjectArray,this.time=new n.XFAObjectArray}}class Se extends n.XFAObject{constructor(e){super(d,"exclGroup",!0),this.access=(0,o.getStringOption)(e.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=e.accessKey||"",this.anchorType=(0,o.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,o.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.h=e.h?(0,o.getMeasurement)(e.h):"",this.hAlign=(0,o.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.layout=(0,o.getStringOption)(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.maxH=(0,o.getMeasurement)(e.maxH,"0pt"),this.maxW=(0,o.getMeasurement)(e.maxW,"0pt"),this.minH=(0,o.getMeasurement)(e.minH,"0pt"),this.minW=(0,o.getMeasurement)(e.minW,"0pt"),this.name=e.name||"",this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,o.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.w=e.w?(0,o.getMeasurement)(e.w):"",this.x=(0,o.getMeasurement)(e.x,"0pt"),this.y=(0,o.getMeasurement)(e.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.margin=null,this.para=null,this.traversal=null,this.validate=null,this.connect=new n.XFAObjectArray,this.event=new n.XFAObjectArray,this.field=new n.XFAObjectArray,this.setProperty=new n.XFAObjectArray}[n.$isBindable](){return!0}[n.$hasSettableValue](){return!0}[n.$setValue](e){for(const t of this.field.children){if(!t.value){const e=new Mt({});t[n.$appendChild](e),t.value=e}t.value[n.$setValue](e)}}[n.$isThereMoreWidth](){return this.layout.endsWith("-tb")&&0===this[n.$extra].attempt&&this[n.$extra].numberInLine>0||this[n.$getParent]()[n.$isThereMoreWidth]()}[n.$isSplittable](){const e=this[n.$getSubformParent]();return!!e[n.$isSplittable]()&&(void 0!==this[n.$extra]._isSplittable?this[n.$extra]._isSplittable:"position"===this.layout||this.layout.includes("row")?(this[n.$extra]._isSplittable=!1,!1):!(e.layout&&e.layout.endsWith("-tb")&&0!==e[n.$extra].numberInLine||(this[n.$extra]._isSplittable=!0,0)))}[n.$flushHTML](){return(0,i.flushHTML)(this)}[n.$addHTML](e,t){(0,i.addHTML)(this,e,t)}[n.$getAvailableSpace](){return(0,i.getAvailableSpace)(this)}[n.$toHTML](e){if(x(this),"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return o.HTMLResult.EMPTY;(0,s.fixDimensions)(this);const t=[],r={id:this[n.$uid],class:[]};(0,s.setAccess)(this,r.class),this[n.$extra]||(this[n.$extra]=Object.create(null)),Object.assign(this[n.$extra],{children:t,attributes:r,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const a=this[n.$isSplittable]();if(a||_(this),!(0,i.checkDimensions)(this,e))return o.HTMLResult.FAILURE;const c=new Set(["field"]);if(this.layout.includes("row")){const e=this[n.$getSubformParent]().columnWidths;Array.isArray(e)&&e.length>0&&(this[n.$extra].columnWidths=e,this[n.$extra].currentColumn=0)}const l=(0,s.toStyle)(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),h=["xfaExclgroup"],u=(0,s.layoutClass)(this);u&&h.push(u),(0,s.isPrintOnly)(this)&&h.push("xfaPrintOnly"),r.style=l,r.class=h,this.name&&(r.xfaName=this.name),this[n.$pushPara]();const d="lr-tb"===this.layout||"rl-tb"===this.layout,f=d?2:1;for(;f>this[n.$extra].attempt;this[n.$extra].attempt++){d&&1===this[n.$extra].attempt&&(this[n.$extra].numberInLine=0);const e=this[n.$childrenToHTML]({filter:c,include:!0});if(e.success)break;if(e.isBreak())return this[n.$popPara](),e;if(d&&0===this[n.$extra].attempt&&0===this[n.$extra].numberInLine&&!this[n.$getTemplateRoot]()[n.$extra].noLayoutFailure){this[n.$extra].attempt=f;break}}if(this[n.$popPara](),a||F(this),this[n.$extra].attempt===f)return a||delete this[n.$extra],o.HTMLResult.FAILURE;let p=0,g=0;this.margin&&(p=this.margin.leftInset+this.margin.rightInset,g=this.margin.topInset+this.margin.bottomInset);const m=Math.max(this[n.$extra].width+p,this.w||0),b=Math.max(this[n.$extra].height+g,this.h||0),y=[this.x,this.y,m,b];""===this.w&&(l.width=(0,s.measureToString)(m)),""===this.h&&(l.height=(0,s.measureToString)(b));const w={name:"div",attributes:r,children:t};return A(this,r),delete this[n.$extra],o.HTMLResult.success((0,s.createWrapper)(this,w),y)}}class xe extends n.XFAObject{constructor(e){super(d,"execute"),this.connection=e.connection||"",this.executeType=(0,o.getStringOption)(e.executeType,["import","remerge"]),this.id=e.id||"",this.runAt=(0,o.getStringOption)(e.runAt,["client","both","server"]),this.use=e.use||"",this.usehref=e.usehref||""}}class Ae extends n.XFAObject{constructor(e){super(d,"extras",!0),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||"",this.boolean=new n.XFAObjectArray,this.date=new n.XFAObjectArray,this.dateTime=new n.XFAObjectArray,this.decimal=new n.XFAObjectArray,this.exData=new n.XFAObjectArray,this.extras=new n.XFAObjectArray,this.float=new n.XFAObjectArray,this.image=new n.XFAObjectArray,this.integer=new n.XFAObjectArray,this.text=new n.XFAObjectArray,this.time=new n.XFAObjectArray}}class ke extends n.XFAObject{constructor(e){super(d,"field",!0),this.access=(0,o.getStringOption)(e.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=e.accessKey||"",this.anchorType=(0,o.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,o.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.h=e.h?(0,o.getMeasurement)(e.h):"",this.hAlign=(0,o.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.locale=e.locale||"",this.maxH=(0,o.getMeasurement)(e.maxH,"0pt"),this.maxW=(0,o.getMeasurement)(e.maxW,"0pt"),this.minH=(0,o.getMeasurement)(e.minH,"0pt"),this.minW=(0,o.getMeasurement)(e.minW,"0pt"),this.name=e.name||"",this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,o.getRelevant)(e.relevant),this.rotate=(0,o.getInteger)({data:e.rotate,defaultValue:0,validate:e=>e%90==0}),this.use=e.use||"",this.usehref=e.usehref||"",this.w=e.w?(0,o.getMeasurement)(e.w):"",this.x=(0,o.getMeasurement)(e.x,"0pt"),this.y=(0,o.getMeasurement)(e.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.format=null,this.items=new n.XFAObjectArray(2),this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.validate=null,this.value=null,this.bindItems=new n.XFAObjectArray,this.connect=new n.XFAObjectArray,this.event=new n.XFAObjectArray,this.setProperty=new n.XFAObjectArray}[n.$isBindable](){return!0}[n.$setValue](e){w(this,e)}[n.$toHTML](e){if(x(this),!this.ui){let e;switch(this.ui=new It({}),this.ui[n.$globalData]=this[n.$globalData],this[n.$appendChild](this.ui),this.items.children.length){case 0:e=new Ct({}),this.ui.textEdit=e;break;case 1:e=new V({}),this.ui.checkButton=e;break;case 2:e=new Y({}),this.ui.choiceList=e}this.ui[n.$appendChild](e)}if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return o.HTMLResult.EMPTY;this.caption&&delete this.caption[n.$extra],this[n.$pushPara]();const t=this.caption?this.caption[n.$toHTML](e).html:null,r=this.w,a=this.h;let c=0,h=0;this.margin&&(c=this.margin.leftInset+this.margin.rightInset,h=this.margin.topInset+this.margin.bottomInset);let u=null;if(""===this.w||""===this.h){let t=null,r=null,a=0,i=0;if(this.ui.checkButton)a=i=this.ui.checkButton.size;else{const{w:t,h:r}=(0,s.layoutNode)(this,e);null!==t?(a=t,i=r):i=(0,l.getMetrics)(this.font,!0).lineNoGap}if(u=b(this.ui[n.$getExtra]()),a+=u.w,i+=u.h,this.caption){const{w:s,h:c,isBroken:l}=this.caption[n.$getExtra](e);if(l&&this[n.$getSubformParent]()[n.$isThereMoreWidth]())return this[n.$popPara](),o.HTMLResult.FAILURE;switch(t=s,r=c,this.caption.placement){case"left":case"right":case"inline":t+=a;break;case"top":case"bottom":r+=i}}else t=a,r=i;t&&""===this.w&&(t+=c,this.w=Math.min(this.maxW>0?this.maxW:1/0,t>this.minW+1?t:this.minW)),r&&""===this.h&&(r+=h,this.h=Math.min(this.maxH>0?this.maxH:1/0,r>this.minH+1?r:this.minH))}if(this[n.$popPara](),(0,s.fixDimensions)(this),_(this),!(0,i.checkDimensions)(this,e))return this.w=r,this.h=a,this[n.$popPara](),o.HTMLResult.FAILURE;F(this);const d=(0,s.toStyle)(this,"font","dimensions","position","rotate","anchorType","presence","margin","hAlign");(0,s.setMinMaxDimensions)(this,d);const f=["xfaField"];this.font&&f.push("xfaFont"),(0,s.isPrintOnly)(this)&&f.push("xfaPrintOnly");const p={style:d,id:this[n.$uid],class:f};d.margin&&(d.padding=d.margin,delete d.margin),(0,s.setAccess)(this,f),this.name&&(p.xfaName=this.name);const g=[],m={name:"div",attributes:p,children:g};A(this,p);const y=this.border?this.border[n.$toStyle]():null,w=(0,s.computeBbox)(this,m,e),v=this.ui[n.$toHTML]().html;if(!v)return Object.assign(d,y),o.HTMLResult.success((0,s.createWrapper)(this,m),w);this[n.$tabIndex]&&(v.children&&v.children[0]?v.children[0].attributes.tabindex=this[n.$tabIndex]:v.attributes.tabindex=this[n.$tabIndex]),v.attributes.style||(v.attributes.style=Object.create(null));let S=null;if(this.ui.button?(1===v.children.length&&([S]=v.children.splice(0,1)),Object.assign(v.attributes.style,y)):Object.assign(d,y),g.push(v),this.value)if(this.ui.imageEdit)v.children.push(this.value[n.$toHTML]().html);else if(!this.ui.button){let e="";if(this.value.exData)e=this.value.exData[n.$text]();else if(this.value.text)e=this.value.text[n.$getExtra]();else{const t=this.value[n.$toHTML]().html;null!==t&&(e=t.children[0].value)}this.ui.textEdit&&this.value.text&&this.value.text.maxChars&&(v.children[0].attributes.maxLength=this.value.text.maxChars),e&&(this.ui.numericEdit&&(e=parseFloat(e),e=isNaN(e)?"":""+e),"textarea"===v.children[0].name?v.children[0].attributes.textContent=e:v.children[0].attributes.value=e)}if(!this.ui.imageEdit&&v.children&&v.children[0]&&this.h){u=u||b(this.ui[n.$getExtra]());let t=0;this.caption&&["top","bottom"].includes(this.caption.placement)?(t=this.caption.reserve,t>0||(t=this.caption[n.$getExtra](e).h),v.children[0].attributes.style.height=(0,s.measureToString)(this.h-t-h-u.h)):v.children[0].attributes.style.height="100%"}if(S&&v.children.push(S),!t)return v.attributes.class&&v.attributes.class.push("xfaLeft"),this.w=r,this.h=a,o.HTMLResult.success((0,s.createWrapper)(this,m),w);if(this.ui.button)return d.padding&&delete d.padding,"div"===t.name&&(t.name="span"),v.children.push(t),o.HTMLResult.success(m,w);switch(this.ui.checkButton&&(t.attributes.class[0]="xfaCaptionForCheckButton"),v.attributes.class||(v.attributes.class=[]),v.children.splice(0,0,t),this.caption.placement){case"left":case"inline":v.attributes.class.push("xfaLeft");break;case"right":v.attributes.class.push("xfaRight");break;case"top":v.attributes.class.push("xfaTop");break;case"bottom":v.attributes.class.push("xfaBottom")}return this.w=r,this.h=a,o.HTMLResult.success((0,s.createWrapper)(this,m),w)}}t.Field=ke;class Ce extends n.XFAObject{constructor(e){super(d,"fill",!0),this.id=e.id||"",this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null,this.linear=null,this.pattern=null,this.radial=null,this.solid=null,this.stipple=null}[n.$toStyle](){const e=this[n.$getParent](),t=e[n.$getParent]()[n.$getParent](),r=Object.create(null);let a="color",i=a;e instanceof B&&(a="background-color",i="background",t instanceof It&&(r.backgroundColor="white")),(e instanceof ct||e instanceof I)&&(a=i="fill",r.fill="white");for(const e of Object.getOwnPropertyNames(this)){if("extras"===e||"color"===e)continue;const t=this[e];if(!(t instanceof n.XFAObject))continue;const s=t[n.$toStyle](this.color);return s&&(r[s.startsWith("#")?a:i]=s),r}if(this.color&&this.color.value){const e=this.color[n.$toStyle]();r[e.startsWith("#")?a:i]=e}return r}}class _e extends n.XFAObject{constructor(e){super(d,"filter",!0),this.addRevocationInfo=(0,o.getStringOption)(e.addRevocationInfo,["","required","optional","none"]),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||"",this.version=(0,o.getInteger)({data:this.version,defaultValue:5,validate:e=>e>=1&&5>=e}),this.appearanceFilter=null,this.certificates=null,this.digestMethods=null,this.encodings=null,this.encryptionMethods=null,this.handler=null,this.lockDocument=null,this.mdp=null,this.reasons=null,this.timeStamp=null}}class Fe extends n.ContentObject{constructor(e){super(d,"float"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[n.$finalize](){const e=parseFloat(this[n.$content].trim());this[n.$content]=isNaN(e)?null:e}[n.$toHTML](e){return C(null!==this[n.$content]?""+this[n.$content]:"")}}class Te extends n.XFAObject{constructor(e){super(d,"font",!0),this.baselineShift=(0,o.getMeasurement)(e.baselineShift),this.fontHorizontalScale=(0,o.getFloat)({data:e.fontHorizontalScale,defaultValue:100,validate:e=>e>=0}),this.fontVerticalScale=(0,o.getFloat)({data:e.fontVerticalScale,defaultValue:100,validate:e=>e>=0}),this.id=e.id||"",this.kerningMode=(0,o.getStringOption)(e.kerningMode,["none","pair"]),this.letterSpacing=(0,o.getMeasurement)(e.letterSpacing,"0"),this.lineThrough=(0,o.getInteger)({data:e.lineThrough,defaultValue:0,validate:e=>1===e||2===e}),this.lineThroughPeriod=(0,o.getStringOption)(e.lineThroughPeriod,["all","word"]),this.overline=(0,o.getInteger)({data:e.overline,defaultValue:0,validate:e=>1===e||2===e}),this.overlinePeriod=(0,o.getStringOption)(e.overlinePeriod,["all","word"]),this.posture=(0,o.getStringOption)(e.posture,["normal","italic"]),this.size=(0,o.getMeasurement)(e.size,"10pt"),this.typeface=e.typeface||"Courier",this.underline=(0,o.getInteger)({data:e.underline,defaultValue:0,validate:e=>1===e||2===e}),this.underlinePeriod=(0,o.getStringOption)(e.underlinePeriod,["all","word"]),this.use=e.use||"",this.usehref=e.usehref||"",this.weight=(0,o.getStringOption)(e.weight,["normal","bold"]),this.extras=null,this.fill=null}[n.$clean](e){super[n.$clean](e),this[n.$globalData].usedTypefaces.add(this.typeface)}[n.$toStyle](){const e=(0,s.toStyle)(this,"fill"),t=e.color;return t&&("#000000"===t?delete e.color:t.startsWith("#")||(e.background=t,e.backgroundClip="text",e.color="transparent")),this.baselineShift&&(e.verticalAlign=(0,s.measureToString)(this.baselineShift)),e.fontKerning="none"===this.kerningMode?"none":"normal",e.letterSpacing=(0,s.measureToString)(this.letterSpacing),0!==this.lineThrough&&(e.textDecoration="line-through",2===this.lineThrough&&(e.textDecorationStyle="double")),0!==this.overline&&(e.textDecoration="overline",2===this.overline&&(e.textDecorationStyle="double")),e.fontStyle=this.posture,e.fontSize=(0,s.measureToString)(.99*this.size),(0,s.setFontFamily)(this,this,this[n.$globalData].fontFinder,e),0!==this.underline&&(e.textDecoration="underline",2===this.underline&&(e.textDecorationStyle="double")),e.fontWeight=this.weight,e}}class Oe extends n.XFAObject{constructor(e){super(d,"format",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.picture=null}}class Pe extends n.StringObject{constructor(e){super(d,"handler"),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}}class Ie extends n.XFAObject{constructor(e){super(d,"hyphenation"),this.excludeAllCaps=(0,o.getInteger)({data:e.excludeAllCaps,defaultValue:0,validate:e=>1===e}),this.excludeInitialCap=(0,o.getInteger)({data:e.excludeInitialCap,defaultValue:0,validate:e=>1===e}),this.hyphenate=(0,o.getInteger)({data:e.hyphenate,defaultValue:0,validate:e=>1===e}),this.id=e.id||"",this.pushCharacterCount=(0,o.getInteger)({data:e.pushCharacterCount,defaultValue:3,validate:e=>e>=0}),this.remainCharacterCount=(0,o.getInteger)({data:e.remainCharacterCount,defaultValue:3,validate:e=>e>=0}),this.use=e.use||"",this.usehref=e.usehref||"",this.wordCharacterCount=(0,o.getInteger)({data:e.wordCharacterCount,defaultValue:7,validate:e=>e>=0})}}class Ee extends n.StringObject{constructor(e){super(d,"image"),this.aspect=(0,o.getStringOption)(e.aspect,["fit","actual","height","none","width"]),this.contentType=e.contentType||"",this.href=e.href||"",this.id=e.id||"",this.name=e.name||"",this.transferEncoding=(0,o.getStringOption)(e.transferEncoding,["base64","none","package"]),this.use=e.use||"",this.usehref=e.usehref||""}[n.$toHTML](){if(this.contentType&&!g.has(this.contentType.toLowerCase()))return o.HTMLResult.EMPTY;let e=this[n.$globalData].images&&this[n.$globalData].images.get(this.href);if(!e&&(this.href||!this[n.$content]))return o.HTMLResult.EMPTY;if(e||"base64"!==this.transferEncoding||(e=(0,c.stringToBytes)(atob(this[n.$content]))),!e)return o.HTMLResult.EMPTY;if(!this.contentType){for(const[t,r]of m)if(e.length>t.length&&t.every(((t,r)=>t===e[r]))){this.contentType=r;break}if(!this.contentType)return o.HTMLResult.EMPTY}const t=new Blob([e],{type:this.contentType});let r;switch(this.aspect){case"fit":case"actual":break;case"height":r={height:"100%",objectFit:"fill"};break;case"none":r={width:"100%",height:"100%",objectFit:"fill"};break;case"width":r={width:"100%",objectFit:"fill"}}const a=this[n.$getParent]();return o.HTMLResult.success({name:"img",attributes:{class:["xfaImage"],style:r,src:URL.createObjectURL(t),alt:a?k(a[n.$getParent]()):null}})}}class Me extends n.XFAObject{constructor(e){super(d,"imageEdit",!0),this.data=(0,o.getStringOption)(e.data,["link","embed"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.margin=null}[n.$toHTML](e){return"embed"===this.data?o.HTMLResult.success({name:"div",children:[],attributes:{}}):o.HTMLResult.EMPTY}}class Re extends n.ContentObject{constructor(e){super(d,"integer"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[n.$finalize](){const e=parseInt(this[n.$content].trim(),10);this[n.$content]=isNaN(e)?null:e}[n.$toHTML](e){return C(null!==this[n.$content]?""+this[n.$content]:"")}}class De extends n.XFAObject{constructor(e){super(d,"issuers",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.certificate=new n.XFAObjectArray}}class Ne extends n.XFAObject{constructor(e){super(d,"items",!0),this.id=e.id||"",this.name=e.name||"",this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.ref=e.ref||"",this.save=(0,o.getInteger)({data:e.save,defaultValue:0,validate:e=>1===e}),this.use=e.use||"",this.usehref=e.usehref||"",this.boolean=new n.XFAObjectArray,this.date=new n.XFAObjectArray,this.dateTime=new n.XFAObjectArray,this.decimal=new n.XFAObjectArray,this.exData=new n.XFAObjectArray,this.float=new n.XFAObjectArray,this.image=new n.XFAObjectArray,this.integer=new n.XFAObjectArray,this.text=new n.XFAObjectArray,this.time=new n.XFAObjectArray}[n.$toHTML](){const e=[];for(const t of this[n.$getChildren]())e.push(t[n.$text]());return o.HTMLResult.success(e)}}t.Items=Ne;class Le extends n.XFAObject{constructor(e){super(d,"keep",!0),this.id=e.id||"";const t=["none","contentArea","pageArea"];this.intact=(0,o.getStringOption)(e.intact,t),this.next=(0,o.getStringOption)(e.next,t),this.previous=(0,o.getStringOption)(e.previous,t),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}}class je extends n.XFAObject{constructor(e){super(d,"keyUsage");const t=["","yes","no"];this.crlSign=(0,o.getStringOption)(e.crlSign,t),this.dataEncipherment=(0,o.getStringOption)(e.dataEncipherment,t),this.decipherOnly=(0,o.getStringOption)(e.decipherOnly,t),this.digitalSignature=(0,o.getStringOption)(e.digitalSignature,t),this.encipherOnly=(0,o.getStringOption)(e.encipherOnly,t),this.id=e.id||"",this.keyAgreement=(0,o.getStringOption)(e.keyAgreement,t),this.keyCertSign=(0,o.getStringOption)(e.keyCertSign,t),this.keyEncipherment=(0,o.getStringOption)(e.keyEncipherment,t),this.nonRepudiation=(0,o.getStringOption)(e.nonRepudiation,t),this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}}class Be extends n.XFAObject{constructor(e){super(d,"line",!0),this.hand=(0,o.getStringOption)(e.hand,["even","left","right"]),this.id=e.id||"",this.slope=(0,o.getStringOption)(e.slope,["\\","/"]),this.use=e.use||"",this.usehref=e.usehref||"",this.edge=null}[n.$toHTML](){const e=this[n.$getParent]()[n.$getParent](),t=this.edge||new he({}),r=t[n.$toStyle](),a=Object.create(null),i="visible"===t.presence?t.thickness:0;let c,l,h,u;a.strokeWidth=(0,s.measureToString)(i),a.stroke=r.color;let d="100%",p="100%";e.w>i?e.h>i?[c,l,h,u]="\\"===this.slope?[0,0,"100%","100%"]:[0,"100%","100%",0]:([c,l,h,u]=[0,"50%","100%","50%"],p=a.strokeWidth):([c,l,h,u]=["50%",0,"50%","100%"],d=a.strokeWidth);const g={name:"svg",children:[{name:"line",attributes:{xmlns:f,x1:c,y1:l,x2:h,y2:u,style:a}}],attributes:{xmlns:f,width:d,height:p,style:{overflow:"visible"}}};return y(e)?o.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[g]}):(g.attributes.style.position="absolute",o.HTMLResult.success(g))}}class Ue extends n.XFAObject{constructor(e){super(d,"linear",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["toRight","toBottom","toLeft","toTop"]),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[n.$toStyle](e){return e=e?e[n.$toStyle]():"#FFFFFF",`linear-gradient(${this.type.replace(/([RBLT])/," $1").toLowerCase()}, ${e}, ${this.color?this.color[n.$toStyle]():"#000000"})`}}class $e extends n.ContentObject{constructor(e){super(d,"lockDocument"),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}[n.$finalize](){this[n.$content]=(0,o.getStringOption)(this[n.$content],["auto","0","1"])}}class qe extends n.XFAObject{constructor(e){super(d,"manifest",!0),this.action=(0,o.getStringOption)(e.action,["include","all","exclude"]),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.ref=new n.XFAObjectArray}}class Xe extends n.XFAObject{constructor(e){super(d,"margin",!0),this.bottomInset=(0,o.getMeasurement)(e.bottomInset,"0"),this.id=e.id||"",this.leftInset=(0,o.getMeasurement)(e.leftInset,"0"),this.rightInset=(0,o.getMeasurement)(e.rightInset,"0"),this.topInset=(0,o.getMeasurement)(e.topInset,"0"),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}[n.$toStyle](){return{margin:(0,s.measureToString)(this.topInset)+" "+(0,s.measureToString)(this.rightInset)+" "+(0,s.measureToString)(this.bottomInset)+" "+(0,s.measureToString)(this.leftInset)}}}class He extends n.XFAObject{constructor(e){super(d,"mdp"),this.id=e.id||"",this.permissions=(0,o.getInteger)({data:e.permissions,defaultValue:2,validate:e=>1===e||3===e}),this.signatureType=(0,o.getStringOption)(e.signatureType,["filler","author"]),this.use=e.use||"",this.usehref=e.usehref||""}}class We extends n.XFAObject{constructor(e){super(d,"medium"),this.id=e.id||"",this.imagingBBox=(0,o.getBBox)(e.imagingBBox),this.long=(0,o.getMeasurement)(e.long),this.orientation=(0,o.getStringOption)(e.orientation,["portrait","landscape"]),this.short=(0,o.getMeasurement)(e.short),this.stock=e.stock||"",this.trayIn=(0,o.getStringOption)(e.trayIn,["auto","delegate","pageFront"]),this.trayOut=(0,o.getStringOption)(e.trayOut,["auto","delegate"]),this.use=e.use||"",this.usehref=e.usehref||""}}class ze extends n.XFAObject{constructor(e){super(d,"message",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.text=new n.XFAObjectArray}}class Ge extends n.XFAObject{constructor(e){super(d,"numericEdit",!0),this.hScrollPolicy=(0,o.getStringOption)(e.hScrollPolicy,["auto","off","on"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[n.$toHTML](e){const t=(0,s.toStyle)(this,"border","font","margin"),r=this[n.$getParent]()[n.$getParent](),a={name:"input",attributes:{type:"text",fieldId:r[n.$uid],dataId:r[n.$data]&&r[n.$data][n.$uid]||r[n.$uid],class:["xfaTextfield"],style:t,"aria-label":k(r),"aria-required":!1}};return S(r)&&(a.attributes["aria-required"]=!0,a.attributes.required=!0),o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[a]})}}class Ve extends n.XFAObject{constructor(e){super(d,"occur",!0),this.id=e.id||"",this.initial=""!==e.initial?(0,o.getInteger)({data:e.initial,defaultValue:"",validate:e=>!0}):"",this.max=""!==e.max?(0,o.getInteger)({data:e.max,defaultValue:1,validate:e=>!0}):"",this.min=""!==e.min?(0,o.getInteger)({data:e.min,defaultValue:1,validate:e=>!0}):"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}[n.$clean](){const e=this[n.$getParent](),t=this.min;""===this.min&&(this.min=e instanceof Ze||e instanceof Qe?0:1),""===this.max&&(this.max=""===t?e instanceof Ze||e instanceof Qe?-1:1:this.min),-1!==this.max&&this.min>this.max&&(this.max=this.min),""===this.initial&&(this.initial=e instanceof At?1:this.min)}}class Ye extends n.StringObject{constructor(e){super(d,"oid"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class Ke extends n.XFAObject{constructor(e){super(d,"oids",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.oid=new n.XFAObjectArray}}class Je extends n.XFAObject{constructor(e){super(d,"overflow"),this.id=e.id||"",this.leader=e.leader||"",this.target=e.target||"",this.trailer=e.trailer||"",this.use=e.use||"",this.usehref=e.usehref||""}[n.$getExtra](){if(!this[n.$extra]){const e=this[n.$getParent](),t=this[n.$getTemplateRoot](),r=t[n.$searchNode](this.target,e),a=t[n.$searchNode](this.leader,e),i=t[n.$searchNode](this.trailer,e);this[n.$extra]={target:r&&r[0]||null,leader:a&&a[0]||null,trailer:i&&i[0]||null,addLeader:!1,addTrailer:!1}}return this[n.$extra]}}class Ze extends n.XFAObject{constructor(e){super(d,"pageArea",!0),this.blankOrNotBlank=(0,o.getStringOption)(e.blankOrNotBlank,["any","blank","notBlank"]),this.id=e.id||"",this.initialNumber=(0,o.getInteger)({data:e.initialNumber,defaultValue:1,validate:e=>!0}),this.name=e.name||"",this.numbered=(0,o.getInteger)({data:e.numbered,defaultValue:1,validate:e=>!0}),this.oddOrEven=(0,o.getStringOption)(e.oddOrEven,["any","even","odd"]),this.pagePosition=(0,o.getStringOption)(e.pagePosition,["any","first","last","only","rest"]),this.relevant=(0,o.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.desc=null,this.extras=null,this.medium=null,this.occur=null,this.area=new n.XFAObjectArray,this.contentArea=new n.XFAObjectArray,this.draw=new n.XFAObjectArray,this.exclGroup=new n.XFAObjectArray,this.field=new n.XFAObjectArray,this.subform=new n.XFAObjectArray}[n.$isUsable](){return this[n.$extra]?!this.occur||-1===this.occur.max||this.occur.max>this[n.$extra].numberOfUse:(this[n.$extra]={numberOfUse:0},!0)}[n.$cleanPage](){delete this[n.$extra]}[n.$getNextPage](){this[n.$extra]||(this[n.$extra]={numberOfUse:0});const e=this[n.$getParent]();return"orderedOccurrence"===e.relation&&this[n.$isUsable]()?(this[n.$extra].numberOfUse+=1,this):e[n.$getNextPage]()}[n.$getAvailableSpace](){return this[n.$extra].space||{width:0,height:0}}[n.$toHTML](){this[n.$extra]||(this[n.$extra]={numberOfUse:1});const e=[];this[n.$extra].children=e;const t=Object.create(null);if(this.medium&&this.medium.short&&this.medium.long){if(t.width=(0,s.measureToString)(this.medium.short),t.height=(0,s.measureToString)(this.medium.long),this[n.$extra].space={width:this.medium.short,height:this.medium.long},"landscape"===this.medium.orientation){const e=t.width;t.width=t.height,t.height=e,this[n.$extra].space={width:this.medium.long,height:this.medium.short}}}else(0,c.warn)("XFA - No medium specified in pageArea: please file a bug.");return this[n.$childrenToHTML]({filter:new Set(["area","draw","field","subform"]),include:!0}),this[n.$childrenToHTML]({filter:new Set(["contentArea"]),include:!0}),o.HTMLResult.success({name:"div",children:e,attributes:{class:["xfaPage"],id:this[n.$uid],style:t,xfaName:this.name}})}}class Qe extends n.XFAObject{constructor(e){super(d,"pageSet",!0),this.duplexImposition=(0,o.getStringOption)(e.duplexImposition,["longEdge","shortEdge"]),this.id=e.id||"",this.name=e.name||"",this.relation=(0,o.getStringOption)(e.relation,["orderedOccurrence","duplexPaginated","simplexPaginated"]),this.relevant=(0,o.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.occur=null,this.pageArea=new n.XFAObjectArray,this.pageSet=new n.XFAObjectArray}[n.$cleanPage](){for(const e of this.pageArea.children)e[n.$cleanPage]();for(const e of this.pageSet.children)e[n.$cleanPage]()}[n.$isUsable](){return!this.occur||-1===this.occur.max||this.occur.max>this[n.$extra].numberOfUse}[n.$getNextPage](){if(this[n.$extra]||(this[n.$extra]={numberOfUse:1,pageIndex:-1,pageSetIndex:-1}),"orderedOccurrence"===this.relation){if(this.pageArea.children.length>this[n.$extra].pageIndex+1)return this[n.$extra].pageIndex+=1,this.pageArea.children[this[n.$extra].pageIndex][n.$getNextPage]();if(this.pageSet.children.length>this[n.$extra].pageSetIndex+1)return this[n.$extra].pageSetIndex+=1,this.pageSet.children[this[n.$extra].pageSetIndex][n.$getNextPage]();if(this[n.$isUsable]())return this[n.$extra].numberOfUse+=1,this[n.$extra].pageIndex=-1,this[n.$extra].pageSetIndex=-1,this[n.$getNextPage]();const e=this[n.$getParent]();return e instanceof Qe?e[n.$getNextPage]():(this[n.$cleanPage](),this[n.$getNextPage]())}const e=this[n.$getTemplateRoot]()[n.$extra].pageNumber,t=e%2==0?"even":"odd",r=0===e?"first":"rest";let a=this.pageArea.children.find((e=>e.oddOrEven===t&&e.pagePosition===r));return a||(a=this.pageArea.children.find((e=>"any"===e.oddOrEven&&e.pagePosition===r)),a||(a=this.pageArea.children.find((e=>"any"===e.oddOrEven&&"any"===e.pagePosition)),a||this.pageArea.children[0]))}}class et extends n.XFAObject{constructor(e){super(d,"para",!0),this.hAlign=(0,o.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.lineHeight=e.lineHeight?(0,o.getMeasurement)(e.lineHeight,"0pt"):"",this.marginLeft=e.marginLeft?(0,o.getMeasurement)(e.marginLeft,"0pt"):"",this.marginRight=e.marginRight?(0,o.getMeasurement)(e.marginRight,"0pt"):"",this.orphans=(0,o.getInteger)({data:e.orphans,defaultValue:0,validate:e=>e>=0}),this.preserve=e.preserve||"",this.radixOffset=e.radixOffset?(0,o.getMeasurement)(e.radixOffset,"0pt"):"",this.spaceAbove=e.spaceAbove?(0,o.getMeasurement)(e.spaceAbove,"0pt"):"",this.spaceBelow=e.spaceBelow?(0,o.getMeasurement)(e.spaceBelow,"0pt"):"",this.tabDefault=e.tabDefault?(0,o.getMeasurement)(this.tabDefault):"",this.tabStops=(e.tabStops||"").trim().split(/\s+/).map(((e,t)=>t%2==1?(0,o.getMeasurement)(e):e)),this.textIndent=e.textIndent?(0,o.getMeasurement)(e.textIndent,"0pt"):"",this.use=e.use||"",this.usehref=e.usehref||"",this.vAlign=(0,o.getStringOption)(e.vAlign,["top","bottom","middle"]),this.widows=(0,o.getInteger)({data:e.widows,defaultValue:0,validate:e=>e>=0}),this.hyphenation=null}[n.$toStyle](){const e=(0,s.toStyle)(this,"hAlign");return""!==this.marginLeft&&(e.paddingLeft=(0,s.measureToString)(this.marginLeft)),""!==this.marginRight&&(e.paddingight=(0,s.measureToString)(this.marginRight)),""!==this.spaceAbove&&(e.paddingTop=(0,s.measureToString)(this.spaceAbove)),""!==this.spaceBelow&&(e.paddingBottom=(0,s.measureToString)(this.spaceBelow)),""!==this.textIndent&&(e.textIndent=(0,s.measureToString)(this.textIndent),(0,s.fixTextIndent)(e)),this.lineHeight>0&&(e.lineHeight=(0,s.measureToString)(this.lineHeight)),""!==this.tabDefault&&(e.tabSize=(0,s.measureToString)(this.tabDefault)),this.hyphenatation&&Object.assign(e,this.hyphenatation[n.$toStyle]()),e}}class tt extends n.XFAObject{constructor(e){super(d,"passwordEdit",!0),this.hScrollPolicy=(0,o.getStringOption)(e.hScrollPolicy,["auto","off","on"]),this.id=e.id||"",this.passwordChar=e.passwordChar||"*",this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.margin=null}}class rt extends n.XFAObject{constructor(e){super(d,"pattern",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[n.$toStyle](e){e=e?e[n.$toStyle]():"#FFFFFF";const t=this.color?this.color[n.$toStyle]():"#000000",r="repeating-linear-gradient",a=`${e},${e} 5px,${t} 5px,${t} 10px`;switch(this.type){case"crossHatch":return`${r}(to top,${a}) ${r}(to right,${a})`;case"crossDiagonal":return`${r}(45deg,${a}) ${r}(-45deg,${a})`;case"diagonalLeft":return`${r}(45deg,${a})`;case"diagonalRight":return`${r}(-45deg,${a})`;case"horizontal":return`${r}(to top,${a})`;case"vertical":return`${r}(to right,${a})`}return""}}class nt extends n.StringObject{constructor(e){super(d,"picture"),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class at extends n.XFAObject{constructor(e){super(d,"proto",!0),this.appearanceFilter=new n.XFAObjectArray,this.arc=new n.XFAObjectArray,this.area=new n.XFAObjectArray,this.assist=new n.XFAObjectArray,this.barcode=new n.XFAObjectArray,this.bindItems=new n.XFAObjectArray,this.bookend=new n.XFAObjectArray,this.boolean=new n.XFAObjectArray,this.border=new n.XFAObjectArray,this.break=new n.XFAObjectArray,this.breakAfter=new n.XFAObjectArray,this.breakBefore=new n.XFAObjectArray,this.button=new n.XFAObjectArray,this.calculate=new n.XFAObjectArray,this.caption=new n.XFAObjectArray,this.certificate=new n.XFAObjectArray,this.certificates=new n.XFAObjectArray,this.checkButton=new n.XFAObjectArray,this.choiceList=new n.XFAObjectArray,this.color=new n.XFAObjectArray,this.comb=new n.XFAObjectArray,this.connect=new n.XFAObjectArray,this.contentArea=new n.XFAObjectArray,this.corner=new n.XFAObjectArray,this.date=new n.XFAObjectArray,this.dateTime=new n.XFAObjectArray,this.dateTimeEdit=new n.XFAObjectArray,this.decimal=new n.XFAObjectArray,this.defaultUi=new n.XFAObjectArray,this.desc=new n.XFAObjectArray,this.digestMethod=new n.XFAObjectArray,this.digestMethods=new n.XFAObjectArray,this.draw=new n.XFAObjectArray,this.edge=new n.XFAObjectArray,this.encoding=new n.XFAObjectArray,this.encodings=new n.XFAObjectArray,this.encrypt=new n.XFAObjectArray,this.encryptData=new n.XFAObjectArray,this.encryption=new n.XFAObjectArray,this.encryptionMethod=new n.XFAObjectArray,this.encryptionMethods=new n.XFAObjectArray,this.event=new n.XFAObjectArray,this.exData=new n.XFAObjectArray,this.exObject=new n.XFAObjectArray,this.exclGroup=new n.XFAObjectArray,this.execute=new n.XFAObjectArray,this.extras=new n.XFAObjectArray,this.field=new n.XFAObjectArray,this.fill=new n.XFAObjectArray,this.filter=new n.XFAObjectArray,this.float=new n.XFAObjectArray,this.font=new n.XFAObjectArray,this.format=new n.XFAObjectArray,this.handler=new n.XFAObjectArray,this.hyphenation=new n.XFAObjectArray,this.image=new n.XFAObjectArray,this.imageEdit=new n.XFAObjectArray,this.integer=new n.XFAObjectArray,this.issuers=new n.XFAObjectArray,this.items=new n.XFAObjectArray,this.keep=new n.XFAObjectArray,this.keyUsage=new n.XFAObjectArray,this.line=new n.XFAObjectArray,this.linear=new n.XFAObjectArray,this.lockDocument=new n.XFAObjectArray,this.manifest=new n.XFAObjectArray,this.margin=new n.XFAObjectArray,this.mdp=new n.XFAObjectArray,this.medium=new n.XFAObjectArray,this.message=new n.XFAObjectArray,this.numericEdit=new n.XFAObjectArray,this.occur=new n.XFAObjectArray,this.oid=new n.XFAObjectArray,this.oids=new n.XFAObjectArray,this.overflow=new n.XFAObjectArray,this.pageArea=new n.XFAObjectArray,this.pageSet=new n.XFAObjectArray,this.para=new n.XFAObjectArray,this.passwordEdit=new n.XFAObjectArray,this.pattern=new n.XFAObjectArray,this.picture=new n.XFAObjectArray,this.radial=new n.XFAObjectArray,this.reason=new n.XFAObjectArray,this.reasons=new n.XFAObjectArray,this.rectangle=new n.XFAObjectArray,this.ref=new n.XFAObjectArray,this.script=new n.XFAObjectArray,this.setProperty=new n.XFAObjectArray,this.signData=new n.XFAObjectArray,this.signature=new n.XFAObjectArray,this.signing=new n.XFAObjectArray,this.solid=new n.XFAObjectArray,this.speak=new n.XFAObjectArray,this.stipple=new n.XFAObjectArray,this.subform=new n.XFAObjectArray,this.subformSet=new n.XFAObjectArray,this.subjectDN=new n.XFAObjectArray,this.subjectDNs=new n.XFAObjectArray,this.submit=new n.XFAObjectArray,this.text=new n.XFAObjectArray,this.textEdit=new n.XFAObjectArray,this.time=new n.XFAObjectArray,this.timeStamp=new n.XFAObjectArray,this.toolTip=new n.XFAObjectArray,this.traversal=new n.XFAObjectArray,this.traverse=new n.XFAObjectArray,this.ui=new n.XFAObjectArray,this.validate=new n.XFAObjectArray,this.value=new n.XFAObjectArray,this.variables=new n.XFAObjectArray}}class it extends n.XFAObject{constructor(e){super(d,"radial",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["toEdge","toCenter"]),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[n.$toStyle](e){e=e?e[n.$toStyle]():"#FFFFFF";const t=this.color?this.color[n.$toStyle]():"#000000";return`radial-gradient(circle at center, ${"toEdge"===this.type?`${e},${t}`:`${t},${e}`})`}}class st extends n.StringObject{constructor(e){super(d,"reason"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class ot extends n.XFAObject{constructor(e){super(d,"reasons",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.reason=new n.XFAObjectArray}}class ct extends n.XFAObject{constructor(e){super(d,"rectangle",!0),this.hand=(0,o.getStringOption)(e.hand,["even","left","right"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.corner=new n.XFAObjectArray(4),this.edge=new n.XFAObjectArray(4),this.fill=null}[n.$toHTML](){const e=this.edge.children.length?this.edge.children[0]:new he({}),t=e[n.$toStyle](),r=Object.create(null);this.fill&&"visible"===this.fill.presence?Object.assign(r,this.fill[n.$toStyle]()):r.fill="transparent",r.strokeWidth=(0,s.measureToString)("visible"===e.presence?e.thickness:0),r.stroke=t.color;const a=(this.corner.children.length?this.corner.children[0]:new ee({}))[n.$toStyle](),i={name:"svg",children:[{name:"rect",attributes:{xmlns:f,width:"100%",height:"100%",x:0,y:0,rx:a.radius,ry:a.radius,style:r}}],attributes:{xmlns:f,style:{overflow:"visible"},width:"100%",height:"100%"}};return y(this[n.$getParent]()[n.$getParent]())?o.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[i]}):(i.attributes.style.position="absolute",o.HTMLResult.success(i))}}class lt extends n.StringObject{constructor(e){super(d,"ref"),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class ht extends n.StringObject{constructor(e){super(d,"script"),this.binding=e.binding||"",this.contentType=e.contentType||"",this.id=e.id||"",this.name=e.name||"",this.runAt=(0,o.getStringOption)(e.runAt,["client","both","server"]),this.use=e.use||"",this.usehref=e.usehref||""}}class ut extends n.XFAObject{constructor(e){super(d,"setProperty"),this.connection=e.connection||"",this.ref=e.ref||"",this.target=e.target||""}}t.SetProperty=ut;class dt extends n.XFAObject{constructor(e){super(d,"signData",!0),this.id=e.id||"",this.operation=(0,o.getStringOption)(e.operation,["sign","clear","verify"]),this.ref=e.ref||"",this.target=e.target||"",this.use=e.use||"",this.usehref=e.usehref||"",this.filter=null,this.manifest=null}}class ft extends n.XFAObject{constructor(e){super(d,"signature",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["PDF1.3","PDF1.6"]),this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.filter=null,this.manifest=null,this.margin=null}}class pt extends n.XFAObject{constructor(e){super(d,"signing",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.certificate=new n.XFAObjectArray}}class gt extends n.XFAObject{constructor(e){super(d,"solid",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}[n.$toStyle](e){return e?e[n.$toStyle]():"#FFFFFF"}}class mt extends n.StringObject{constructor(e){super(d,"speak"),this.disable=(0,o.getInteger)({data:e.disable,defaultValue:0,validate:e=>1===e}),this.id=e.id||"",this.priority=(0,o.getStringOption)(e.priority,["custom","caption","name","toolTip"]),this.rid=e.rid||"",this.use=e.use||"",this.usehref=e.usehref||""}}class bt extends n.XFAObject{constructor(e){super(d,"stipple",!0),this.id=e.id||"",this.rate=(0,o.getInteger)({data:e.rate,defaultValue:50,validate:e=>e>=0&&100>=e}),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[n.$toStyle](e){const t=this.rate/100;return c.Util.makeHexColor(Math.round(e.value.r*(1-t)+this.value.r*t),Math.round(e.value.g*(1-t)+this.value.g*t),Math.round(e.value.b*(1-t)+this.value.b*t))}}class yt extends n.XFAObject{constructor(e){super(d,"subform",!0),this.access=(0,o.getStringOption)(e.access,["open","nonInteractive","protected","readOnly"]),this.allowMacro=(0,o.getInteger)({data:e.allowMacro,defaultValue:0,validate:e=>1===e}),this.anchorType=(0,o.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,o.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.columnWidths=(e.columnWidths||"").trim().split(/\s+/).map((e=>"-1"===e?-1:(0,o.getMeasurement)(e))),this.h=e.h?(0,o.getMeasurement)(e.h):"",this.hAlign=(0,o.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.layout=(0,o.getStringOption)(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.locale=e.locale||"",this.maxH=(0,o.getMeasurement)(e.maxH,"0pt"),this.maxW=(0,o.getMeasurement)(e.maxW,"0pt"),this.mergeMode=(0,o.getStringOption)(e.mergeMode,["consumeData","matchTemplate"]),this.minH=(0,o.getMeasurement)(e.minH,"0pt"),this.minW=(0,o.getMeasurement)(e.minW,"0pt"),this.name=e.name||"",this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,o.getRelevant)(e.relevant),this.restoreState=(0,o.getStringOption)(e.restoreState,["manual","auto"]),this.scope=(0,o.getStringOption)(e.scope,["name","none"]),this.use=e.use||"",this.usehref=e.usehref||"",this.w=e.w?(0,o.getMeasurement)(e.w):"",this.x=(0,o.getMeasurement)(e.x,"0pt"),this.y=(0,o.getMeasurement)(e.y,"0pt"),this.assist=null,this.bind=null,this.bookend=null,this.border=null,this.break=null,this.calculate=null,this.desc=null,this.extras=null,this.keep=null,this.margin=null,this.occur=null,this.overflow=null,this.pageSet=null,this.para=null,this.traversal=null,this.validate=null,this.variables=null,this.area=new n.XFAObjectArray,this.breakAfter=new n.XFAObjectArray,this.breakBefore=new n.XFAObjectArray,this.connect=new n.XFAObjectArray,this.draw=new n.XFAObjectArray,this.event=new n.XFAObjectArray,this.exObject=new n.XFAObjectArray,this.exclGroup=new n.XFAObjectArray,this.field=new n.XFAObjectArray,this.proto=new n.XFAObjectArray,this.setProperty=new n.XFAObjectArray,this.subform=new n.XFAObjectArray,this.subformSet=new n.XFAObjectArray}[n.$getSubformParent](){const e=this[n.$getParent]();return e instanceof wt?e[n.$getSubformParent]():e}[n.$isBindable](){return!0}[n.$isThereMoreWidth](){return this.layout.endsWith("-tb")&&0===this[n.$extra].attempt&&this[n.$extra].numberInLine>0||this[n.$getParent]()[n.$isThereMoreWidth]()}*[n.$getContainedChildren](){yield*v(this)}[n.$flushHTML](){return(0,i.flushHTML)(this)}[n.$addHTML](e,t){(0,i.addHTML)(this,e,t)}[n.$getAvailableSpace](){return(0,i.getAvailableSpace)(this)}[n.$isSplittable](){const e=this[n.$getSubformParent]();return!!e[n.$isSplittable]()&&(void 0!==this[n.$extra]._isSplittable?this[n.$extra]._isSplittable:"position"===this.layout||this.layout.includes("row")||this.keep&&"none"!==this.keep.intact?(this[n.$extra]._isSplittable=!1,!1):!(e.layout&&e.layout.endsWith("-tb")&&0!==e[n.$extra].numberInLine||(this[n.$extra]._isSplittable=!0,0)))}[n.$toHTML](e){if(x(this),this.break){if("auto"!==this.break.after||""!==this.break.afterTarget){const e=new $({targetType:this.break.after,target:this.break.afterTarget,startNew:""+this.break.startNew});e[n.$globalData]=this[n.$globalData],this[n.$appendChild](e),this.breakAfter.push(e)}if("auto"!==this.break.before||""!==this.break.beforeTarget){const e=new q({targetType:this.break.before,target:this.break.beforeTarget,startNew:""+this.break.startNew});e[n.$globalData]=this[n.$globalData],this[n.$appendChild](e),this.breakBefore.push(e)}if(""!==this.break.overflowTarget){const e=new Je({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});e[n.$globalData]=this[n.$globalData],this[n.$appendChild](e),this.overflow.push(e)}this[n.$removeChild](this.break),this.break=null}if("hidden"===this.presence||"inactive"===this.presence)return o.HTMLResult.EMPTY;if((this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&(0,c.warn)("XFA - Several breakBefore or breakAfter in subforms: please file a bug."),this.breakBefore.children.length>=1){const e=this.breakBefore.children[0];if(T(e))return o.HTMLResult.breakNode(e)}if(this[n.$extra]&&this[n.$extra].afterBreakAfter)return o.HTMLResult.EMPTY;(0,s.fixDimensions)(this);const t=[],r={id:this[n.$uid],class:[]};(0,s.setAccess)(this,r.class),this[n.$extra]||(this[n.$extra]=Object.create(null)),Object.assign(this[n.$extra],{children:t,line:null,attributes:r,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const a=this[n.$getTemplateRoot](),l=a[n.$extra].noLayoutFailure,h=this[n.$isSplittable]();if(h||_(this),!(0,i.checkDimensions)(this,e))return o.HTMLResult.FAILURE;const u=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){const e=this[n.$getSubformParent]().columnWidths;Array.isArray(e)&&e.length>0&&(this[n.$extra].columnWidths=e,this[n.$extra].currentColumn=0)}const d=(0,s.toStyle)(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),f=["xfaSubform"],p=(0,s.layoutClass)(this);if(p&&f.push(p),r.style=d,r.class=f,this.name&&(r.xfaName=this.name),this.overflow){const t=this.overflow[n.$getExtra]();t.addLeader&&(t.addLeader=!1,O(this,t.leader,e))}this[n.$pushPara]();const g="lr-tb"===this.layout||"rl-tb"===this.layout,m=g?2:1;for(;m>this[n.$extra].attempt;this[n.$extra].attempt++){g&&1===this[n.$extra].attempt&&(this[n.$extra].numberInLine=0);const e=this[n.$childrenToHTML]({filter:u,include:!0});if(e.success)break;if(e.isBreak())return this[n.$popPara](),e;if(g&&0===this[n.$extra].attempt&&0===this[n.$extra].numberInLine&&!a[n.$extra].noLayoutFailure){this[n.$extra].attempt=m;break}}if(this[n.$popPara](),h||F(this),a[n.$extra].noLayoutFailure=l,this[n.$extra].attempt===m)return this.overflow&&(this[n.$getTemplateRoot]()[n.$extra].overflowNode=this.overflow),h||delete this[n.$extra],o.HTMLResult.FAILURE;if(this.overflow){const t=this.overflow[n.$getExtra]();t.addTrailer&&(t.addTrailer=!1,O(this,t.trailer,e))}let b=0,y=0;this.margin&&(b=this.margin.leftInset+this.margin.rightInset,y=this.margin.topInset+this.margin.bottomInset);const w=Math.max(this[n.$extra].width+b,this.w||0),v=Math.max(this[n.$extra].height+y,this.h||0),S=[this.x,this.y,w,v];if(""===this.w&&(d.width=(0,s.measureToString)(w)),""===this.h&&(d.height=(0,s.measureToString)(v)),("0px"===d.width||"0px"===d.height)&&0===t.length)return o.HTMLResult.EMPTY;const k={name:"div",attributes:r,children:t};A(this,r);const C=o.HTMLResult.success((0,s.createWrapper)(this,k),S);if(this.breakAfter.children.length>=1){const e=this.breakAfter.children[0];if(T(e))return this[n.$extra].afterBreakAfter=C,o.HTMLResult.breakNode(e)}return delete this[n.$extra],C}}class wt extends n.XFAObject{constructor(e){super(d,"subformSet",!0),this.id=e.id||"",this.name=e.name||"",this.relation=(0,o.getStringOption)(e.relation,["ordered","choice","unordered"]),this.relevant=(0,o.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.bookend=null,this.break=null,this.desc=null,this.extras=null,this.occur=null,this.overflow=null,this.breakAfter=new n.XFAObjectArray,this.breakBefore=new n.XFAObjectArray,this.subform=new n.XFAObjectArray,this.subformSet=new n.XFAObjectArray}*[n.$getContainedChildren](){yield*v(this)}[n.$getSubformParent](){let e=this[n.$getParent]();for(;!(e instanceof yt);)e=e[n.$getParent]();return e}[n.$isBindable](){return!0}}class vt extends n.ContentObject{constructor(e){super(d,"subjectDN"),this.delimiter=e.delimiter||",",this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[n.$finalize](){this[n.$content]=new Map(this[n.$content].split(this.delimiter).map((e=>((e=e.split("=",2))[0]=e[0].trim(),e))))}}class St extends n.XFAObject{constructor(e){super(d,"subjectDNs",!0),this.id=e.id||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.subjectDN=new n.XFAObjectArray}}class xt extends n.XFAObject{constructor(e){super(d,"submit",!0),this.embedPDF=(0,o.getInteger)({data:e.embedPDF,defaultValue:0,validate:e=>1===e}),this.format=(0,o.getStringOption)(e.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]),this.id=e.id||"",this.target=e.target||"",this.textEncoding=(0,o.getKeyword)({data:e.textEncoding?e.textEncoding.toLowerCase():"",defaultValue:"",validate:e=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\d{2}/)}),this.use=e.use||"",this.usehref=e.usehref||"",this.xdpContent=e.xdpContent||"",this.encrypt=null,this.encryptData=new n.XFAObjectArray,this.signData=new n.XFAObjectArray}}class At extends n.XFAObject{constructor(e){super(d,"template",!0),this.baseProfile=(0,o.getStringOption)(e.baseProfile,["full","interactiveForms"]),this.extras=null,this.subform=new n.XFAObjectArray}[n.$finalize](){0===this.subform.children.length&&(0,c.warn)("XFA - No subforms in template node."),2>this.subform.children.length||(0,c.warn)("XFA - Several subforms in template node: please file a bug."),this[n.$tabIndex]=5e3}[n.$isSplittable](){return!0}[n.$searchNode](e,t){return e.startsWith("#")?[this[n.$ids].get(e.slice(1))]:(0,u.searchNode)(this,t,e,!0,!0)}*[n.$toPages](){if(!this.subform.children.length)return o.HTMLResult.success({name:"div",children:[]});this[n.$extra]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};const e=this.subform.children[0];e.pageSet[n.$cleanPage]();const t=e.pageSet.pageArea.children,r={name:"div",children:[]};let a=null,i=null,s=null;if(1>e.breakBefore.children.length?1>e.subform.children.length||1>e.subform.children[0].breakBefore.children.length?e.break&&e.break.beforeTarget?(i=e.break,s=i.beforeTarget):e.subform.children.length>=1&&e.subform.children[0].break&&e.subform.children[0].break.beforeTarget&&(i=e.subform.children[0].break,s=i.beforeTarget):(i=e.subform.children[0].breakBefore.children[0],s=i.target):(i=e.breakBefore.children[0],s=i.target),i){const e=this[n.$searchNode](s,i[n.$getParent]());e instanceof Ze&&(a=e,i[n.$extra]={})}a||(a=t[0]),a[n.$extra]={numberOfUse:1};const l=a[n.$getParent]();let h;l[n.$extra]={numberOfUse:1,pageIndex:l.pageArea.children.indexOf(a),pageSetIndex:0};let u=null,d=null,f=!0,p=0,g=0;for(;;){if(f)p=0;else if(r.children.pop(),3==++p)return(0,c.warn)("XFA - Something goes wrong: please file a bug."),r;h=null,this[n.$extra].currentPageArea=a;const t=a[n.$toHTML]().html;r.children.push(t),u&&(this[n.$extra].noLayoutFailure=!0,t.children.push(u[n.$toHTML](a[n.$extra].space).html),u=null),d&&(this[n.$extra].noLayoutFailure=!0,t.children.push(d[n.$toHTML](a[n.$extra].space).html),d=null);const i=a.contentArea.children,s=t.children.filter((e=>e.attributes.class.includes("xfaContentarea")));f=!1,this[n.$extra].firstUnsplittable=null,this[n.$extra].noLayoutFailure=!1;const o=t=>{const r=e[n.$flushHTML]();r&&(f=f||r.children&&0!==r.children.length,s[t].children.push(r))};for(let t=g,a=i.length;a>t;t++){const a=this[n.$extra].currentContentArea=i[t],c={width:a.w,height:a.h};g=0,u&&(s[t].children.push(u[n.$toHTML](c).html),u=null),d&&(s[t].children.push(d[n.$toHTML](c).html),d=null);const l=e[n.$toHTML](c);if(l.success)return l.html?(f=f||l.html.children&&0!==l.html.children.length,s[t].children.push(l.html)):!f&&r.children.length>1&&r.children.pop(),r;if(l.isBreak()){const e=l.breakNode;if(o(t),"auto"===e.targetType)continue;e.leader&&(u=this[n.$searchNode](e.leader,e[n.$getParent]()),u=u?u[0]:null),e.trailer&&(d=this[n.$searchNode](e.trailer,e[n.$getParent]()),d=d?d[0]:null),"pageArea"===e.targetType?(h=e[n.$extra].target,t=1/0):e[n.$extra].target?(h=e[n.$extra].target,g=e[n.$extra].index+1,t=1/0):t=e[n.$extra].index}else if(this[n.$extra].overflowNode){const e=this[n.$extra].overflowNode;this[n.$extra].overflowNode=null;const r=e[n.$getExtra](),a=r.target;r.addLeader=null!==r.leader,r.addTrailer=null!==r.trailer,o(t);const s=t;if(t=1/0,a instanceof Ze)h=a;else if(a instanceof Q){const e=i.indexOf(a);-1!==e?e>s?t=e-1:g=e:(h=a[n.$getParent](),g=h.contentArea.children.indexOf(a))}}else o(t)}this[n.$extra].pageNumber+=1,h&&(h[n.$isUsable]()?h[n.$extra].numberOfUse+=1:h=null),a=h||a[n.$getNextPage](),yield null}}}t.Template=At;class kt extends n.ContentObject{constructor(e){super(d,"text"),this.id=e.id||"",this.maxChars=(0,o.getInteger)({data:e.maxChars,defaultValue:0,validate:e=>e>=0}),this.name=e.name||"",this.rid=e.rid||"",this.use=e.use||"",this.usehref=e.usehref||""}[n.$acceptWhitespace](){return!0}[n.$onChild](e){return e[n.$namespaceId]===a.NamespaceIds.xhtml.id?(this[n.$content]=e,!0):((0,c.warn)(`XFA - Invalid content in Text: ${e[n.$nodeName]}.`),!1)}[n.$onText](e){this[n.$content]instanceof n.XFAObject||super[n.$onText](e)}[n.$finalize](){"string"==typeof this[n.$content]&&(this[n.$content]=this[n.$content].replace(/\r\n/g,"\n"))}[n.$getExtra](){return"string"==typeof this[n.$content]?this[n.$content].split(/[\u2029\u2028\n]/).reduce(((e,t)=>(t&&e.push(t),e)),[]).join("\n"):this[n.$content][n.$text]()}[n.$toHTML](e){if("string"==typeof this[n.$content]){const e=C(this[n.$content]).html;return this[n.$content].includes("\u2029")?(e.name="div",e.children=[],this[n.$content].split("\u2029").map((e=>e.split(/[\u2028\n]/).reduce(((e,t)=>(e.push({name:"span",value:t},{name:"br"}),e)),[]))).forEach((t=>{e.children.push({name:"p",children:t})}))):/[\u2028\n]/.test(this[n.$content])&&(e.name="div",e.children=[],this[n.$content].split(/[\u2028\n]/).forEach((t=>{e.children.push({name:"span",value:t},{name:"br"})}))),o.HTMLResult.success(e)}return this[n.$content][n.$toHTML](e)}}t.Text=kt;class Ct extends n.XFAObject{constructor(e){super(d,"textEdit",!0),this.allowRichText=(0,o.getInteger)({data:e.allowRichText,defaultValue:0,validate:e=>1===e}),this.hScrollPolicy=(0,o.getStringOption)(e.hScrollPolicy,["auto","off","on"]),this.id=e.id||"",this.multiLine=(0,o.getInteger)({data:e.multiLine,defaultValue:"",validate:e=>0===e||1===e}),this.use=e.use||"",this.usehref=e.usehref||"",this.vScrollPolicy=(0,o.getStringOption)(e.vScrollPolicy,["auto","off","on"]),this.border=null,this.comb=null,this.extras=null,this.margin=null}[n.$toHTML](e){const t=(0,s.toStyle)(this,"border","font","margin");let r;const a=this[n.$getParent]()[n.$getParent]();return""===this.multiLine&&(this.multiLine=a instanceof le?1:0),r=1===this.multiLine?{name:"textarea",attributes:{dataId:a[n.$data]&&a[n.$data][n.$uid]||a[n.$uid],fieldId:a[n.$uid],class:["xfaTextfield"],style:t,"aria-label":k(a),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:a[n.$data]&&a[n.$data][n.$uid]||a[n.$uid],fieldId:a[n.$uid],class:["xfaTextfield"],style:t,"aria-label":k(a),"aria-required":!1}},S(a)&&(r.attributes["aria-required"]=!0,r.attributes.required=!0),o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[r]})}}class _t extends n.StringObject{constructor(e){super(d,"time"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[n.$finalize](){const e=this[n.$content].trim();this[n.$content]=e?new Date(e):null}[n.$toHTML](e){return C(this[n.$content]?""+this[n.$content]:"")}}class Ft extends n.XFAObject{constructor(e){super(d,"timeStamp"),this.id=e.id||"",this.server=e.server||"",this.type=(0,o.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}}class Tt extends n.StringObject{constructor(e){super(d,"toolTip"),this.id=e.id||"",this.rid=e.rid||"",this.use=e.use||"",this.usehref=e.usehref||""}}class Ot extends n.XFAObject{constructor(e){super(d,"traversal",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.traverse=new n.XFAObjectArray}}class Pt extends n.XFAObject{constructor(e){super(d,"traverse",!0),this.id=e.id||"",this.operation=(0,o.getStringOption)(e.operation,["next","back","down","first","left","right","up"]),this.ref=e.ref||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.script=null}get name(){return this.operation}[n.$isTransparent](){return!1}}class It extends n.XFAObject{constructor(e){super(d,"ui",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.picture=null,this.barcode=null,this.button=null,this.checkButton=null,this.choiceList=null,this.dateTimeEdit=null,this.defaultUi=null,this.imageEdit=null,this.numericEdit=null,this.passwordEdit=null,this.signature=null,this.textEdit=null}[n.$getExtra](){if(void 0===this[n.$extra]){for(const e of Object.getOwnPropertyNames(this)){if("extras"===e||"picture"===e)continue;const t=this[e];if(t instanceof n.XFAObject)return this[n.$extra]=t,t}this[n.$extra]=null}return this[n.$extra]}[n.$toHTML](e){const t=this[n.$getExtra]();return t?t[n.$toHTML](e):o.HTMLResult.EMPTY}}class Et extends n.XFAObject{constructor(e){super(d,"validate",!0),this.formatTest=(0,o.getStringOption)(e.formatTest,["warning","disabled","error"]),this.id=e.id||"",this.nullTest=(0,o.getStringOption)(e.nullTest,["disabled","error","warning"]),this.scriptTest=(0,o.getStringOption)(e.scriptTest,["error","disabled","warning"]),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.message=null,this.picture=null,this.script=null}}class Mt extends n.XFAObject{constructor(e){super(d,"value",!0),this.id=e.id||"",this.override=(0,o.getInteger)({data:e.override,defaultValue:0,validate:e=>1===e}),this.relevant=(0,o.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.arc=null,this.boolean=null,this.date=null,this.dateTime=null,this.decimal=null,this.exData=null,this.float=null,this.image=null,this.integer=null,this.line=null,this.rectangle=null,this.text=null,this.time=null}[n.$setValue](e){const t=this[n.$getParent]();if(t instanceof ke&&t.ui&&t.ui.imageEdit)return this.image||(this.image=new Ee({}),this[n.$appendChild](this.image)),void(this.image[n.$content]=e[n.$content]);const r=e[n.$nodeName];if(null===this[r]){for(const e of Object.getOwnPropertyNames(this)){const t=this[e];t instanceof n.XFAObject&&(this[e]=null,this[n.$removeChild](t))}this[e[n.$nodeName]]=e,this[n.$appendChild](e)}else this[r][n.$content]=e[n.$content]}[n.$text](){if(this.exData)return"string"==typeof this.exData[n.$content]?this.exData[n.$content].trim():this.exData[n.$content][n.$text]().trim();for(const e of Object.getOwnPropertyNames(this)){if("image"===e)continue;const t=this[e];if(t instanceof n.XFAObject)return(""+(t[n.$content]||"")).trim()}return null}[n.$toHTML](e){for(const t of Object.getOwnPropertyNames(this)){const r=this[t];if(r instanceof n.XFAObject)return r[n.$toHTML](e)}return o.HTMLResult.EMPTY}}t.Value=Mt;class Rt extends n.XFAObject{constructor(e){super(d,"variables",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.boolean=new n.XFAObjectArray,this.date=new n.XFAObjectArray,this.dateTime=new n.XFAObjectArray,this.decimal=new n.XFAObjectArray,this.exData=new n.XFAObjectArray,this.float=new n.XFAObjectArray,this.image=new n.XFAObjectArray,this.integer=new n.XFAObjectArray,this.manifest=new n.XFAObjectArray,this.script=new n.XFAObjectArray,this.text=new n.XFAObjectArray,this.time=new n.XFAObjectArray}[n.$isTransparent](){return!0}}class Dt{static[a.$buildXFAObject](e,t){if(Dt.hasOwnProperty(e)){const r=Dt[e](t);return r[n.$setSetAttributes](t),r}}static appearanceFilter(e){return new P(e)}static arc(e){return new I(e)}static area(e){return new E(e)}static assist(e){return new M(e)}static barcode(e){return new R(e)}static bind(e){return new D(e)}static bindItems(e){return new N(e)}static bookend(e){return new L(e)}static boolean(e){return new j(e)}static border(e){return new B(e)}static break(e){return new U(e)}static breakAfter(e){return new $(e)}static breakBefore(e){return new q(e)}static button(e){return new X(e)}static calculate(e){return new H(e)}static caption(e){return new W(e)}static certificate(e){return new z(e)}static certificates(e){return new G(e)}static checkButton(e){return new V(e)}static choiceList(e){return new Y(e)}static color(e){return new K(e)}static comb(e){return new J(e)}static connect(e){return new Z(e)}static contentArea(e){return new Q(e)}static corner(e){return new ee(e)}static date(e){return new te(e)}static dateTime(e){return new re(e)}static dateTimeEdit(e){return new ne(e)}static decimal(e){return new ae(e)}static defaultUi(e){return new ie(e)}static desc(e){return new se(e)}static digestMethod(e){return new oe(e)}static digestMethods(e){return new ce(e)}static draw(e){return new le(e)}static edge(e){return new he(e)}static encoding(e){return new ue(e)}static encodings(e){return new de(e)}static encrypt(e){return new fe(e)}static encryptData(e){return new pe(e)}static encryption(e){return new ge(e)}static encryptionMethod(e){return new me(e)}static encryptionMethods(e){return new be(e)}static event(e){return new ye(e)}static exData(e){return new we(e)}static exObject(e){return new ve(e)}static exclGroup(e){return new Se(e)}static execute(e){return new xe(e)}static extras(e){return new Ae(e)}static field(e){return new ke(e)}static fill(e){return new Ce(e)}static filter(e){return new _e(e)}static float(e){return new Fe(e)}static font(e){return new Te(e)}static format(e){return new Oe(e)}static handler(e){return new Pe(e)}static hyphenation(e){return new Ie(e)}static image(e){return new Ee(e)}static imageEdit(e){return new Me(e)}static integer(e){return new Re(e)}static issuers(e){return new De(e)}static items(e){return new Ne(e)}static keep(e){return new Le(e)}static keyUsage(e){return new je(e)}static line(e){return new Be(e)}static linear(e){return new Ue(e)}static lockDocument(e){return new $e(e)}static manifest(e){return new qe(e)}static margin(e){return new Xe(e)}static mdp(e){return new He(e)}static medium(e){return new We(e)}static message(e){return new ze(e)}static numericEdit(e){return new Ge(e)}static occur(e){return new Ve(e)}static oid(e){return new Ye(e)}static oids(e){return new Ke(e)}static overflow(e){return new Je(e)}static pageArea(e){return new Ze(e)}static pageSet(e){return new Qe(e)}static para(e){return new et(e)}static passwordEdit(e){return new tt(e)}static pattern(e){return new rt(e)}static picture(e){return new nt(e)}static proto(e){return new at(e)}static radial(e){return new it(e)}static reason(e){return new st(e)}static reasons(e){return new ot(e)}static rectangle(e){return new ct(e)}static ref(e){return new lt(e)}static script(e){return new ht(e)}static setProperty(e){return new ut(e)}static signData(e){return new dt(e)}static signature(e){return new ft(e)}static signing(e){return new pt(e)}static solid(e){return new gt(e)}static speak(e){return new mt(e)}static stipple(e){return new bt(e)}static subform(e){return new yt(e)}static subformSet(e){return new wt(e)}static subjectDN(e){return new vt(e)}static subjectDNs(e){return new St(e)}static submit(e){return new xt(e)}static template(e){return new At(e)}static text(e){return new kt(e)}static textEdit(e){return new Ct(e)}static time(e){return new _t(e)}static timeStamp(e){return new Ft(e)}static toolTip(e){return new Tt(e)}static traversal(e){return new Ot(e)}static traverse(e){return new Pt(e)}static ui(e){return new It(e)}static validate(e){return new Et(e)}static value(e){return new Mt(e)}static variables(e){return new Rt(e)}}t.TemplateNamespace=Dt},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addHTML=function(e,t,r){const s=e[n.$extra],o=s.availableSpace,[c,l,h,u]=r;switch(e.layout){case"position":s.width=Math.max(s.width,c+h),s.height=Math.max(s.height,l+u),s.children.push(t);break;case"lr-tb":case"rl-tb":s.line&&1!==s.attempt||(s.line=i(e,[]),s.children.push(s.line),s.numberInLine=0),s.numberInLine+=1,s.line.children.push(t),0===s.attempt?(s.currentWidth+=h,s.height=Math.max(s.height,s.prevHeight+u)):(s.currentWidth=h,s.prevHeight=s.height,s.height+=u,s.attempt=0),s.width=Math.max(s.width,s.currentWidth);break;case"rl-row":case"row":{s.children.push(t),s.width+=h,s.height=Math.max(s.height,u);const e=(0,a.measureToString)(s.height);for(const t of s.children)t.attributes.style.height=e;break}case"table":case"tb":s.width=Math.min(o.width,Math.max(s.width,h)),s.height+=u,s.children.push(t)}},t.checkDimensions=function(e,t){if(null===e[n.$getTemplateRoot]()[n.$extra].firstUnsplittable)return!0;if(0===e.w||0===e.h)return!0;const r=e[n.$getSubformParent](),a=r[n.$extra]&&r[n.$extra].attempt||0,[,i,s,o]=function(e){let t,r,n=""===e.w?NaN:e.w,a=""===e.h?NaN:e.h,[i,s]=[0,0];switch(e.anchorType||""){case"bottomCenter":[i,s]=[n/2,a];break;case"bottomLeft":[i,s]=[0,a];break;case"bottomRight":[i,s]=[n,a];break;case"middleCenter":[i,s]=[n/2,a/2];break;case"middleLeft":[i,s]=[0,a/2];break;case"middleRight":[i,s]=[n,a/2];break;case"topCenter":[i,s]=[n/2,0];break;case"topRight":[i,s]=[n,0]}switch(e.rotate||0){case 0:[t,r]=[-i,-s];break;case 90:[t,r]=[-s,i],[n,a]=[a,-n];break;case 180:[t,r]=[i,s],[n,a]=[-n,-a];break;case 270:[t,r]=[s,-i],[n,a]=[-a,n]}return[e.x+t+Math.min(0,n),e.y+r+Math.min(0,a),Math.abs(n),Math.abs(a)]}(e);switch(r.layout){case"lr-tb":case"rl-tb":return 0===a?e[n.$getTemplateRoot]()[n.$extra].noLayoutFailure?""!==e.w?2>=Math.round(s-t.width):t.width>2:(""===e.h||2>=Math.round(o-t.height))&&(""!==e.w?2>=Math.round(s-t.width)||0===r[n.$extra].numberInLine&&t.height>2:t.width>2):!!e[n.$getTemplateRoot]()[n.$extra].noLayoutFailure||(""===e.h||2>=Math.round(o-t.height))&&(""!==e.w&&Math.round(s-t.width)>2?!r[n.$isThereMoreWidth]()&&t.height>2:t.height>2);case"table":case"tb":return!!e[n.$getTemplateRoot]()[n.$extra].noLayoutFailure||(""===e.h||e[n.$isSplittable]()?""!==e.w&&Math.round(s-t.width)>2?!r[n.$isThereMoreWidth]()&&t.height>2:t.height>2:2>=Math.round(o-t.height));case"position":return!!e[n.$getTemplateRoot]()[n.$extra].noLayoutFailure||""===e.h||2>=Math.round(o+i-t.height)||o+i>e[n.$getTemplateRoot]()[n.$extra].currentContentArea.h;case"rl-row":case"row":return!!e[n.$getTemplateRoot]()[n.$extra].noLayoutFailure||""===e.h||2>=Math.round(o-t.height);default:return!0}},t.flushHTML=function(e){if(!e[n.$extra])return null;const t={name:"div",attributes:e[n.$extra].attributes,children:e[n.$extra].children};if(e[n.$extra].failingNode){const r=e[n.$extra].failingNode[n.$flushHTML]();r&&(e.layout.endsWith("-tb")?t.children.push(i(e,[r])):t.children.push(r))}return 0===t.children.length?null:t},t.getAvailableSpace=function(e){const t=e[n.$extra].availableSpace,r=e.margin?e.margin.topInset+e.margin.bottomInset:0,a=e.margin?e.margin.leftInset+e.margin.rightInset:0;switch(e.layout){case"lr-tb":case"rl-tb":return 0===e[n.$extra].attempt?{width:t.width-a-e[n.$extra].currentWidth,height:t.height-r-e[n.$extra].prevHeight}:{width:t.width-a,height:t.height-r-e[n.$extra].height};case"rl-row":case"row":return{width:e[n.$extra].columnWidths.slice(e[n.$extra].currentColumn).reduce(((e,t)=>e+t)),height:t.height-a};case"table":case"tb":return{width:t.width-a,height:t.height-r-e[n.$extra].height};default:return t}};var n=r(77),a=r(84);function i(e,t){return{name:"div",attributes:{class:["lr-tb"===e.layout?"xfaLr":"xfaRl"]},children:t}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.computeBbox=function(e,t,r){let a;if(""!==e.w&&""!==e.h)a=[e.x,e.y,e.w,e.h];else{if(!r)return null;let i=e.w;if(""===i){if(0===e.maxW){const t=e[n.$getSubformParent]();i="position"===t.layout&&""!==t.w?0:e.minW}else i=Math.min(e.maxW,r.width);t.attributes.style.width=c(i)}let s=e.h;if(""===s){if(0===e.maxH){const t=e[n.$getSubformParent]();s="position"===t.layout&&""!==t.h?0:e.minH}else s=Math.min(e.maxH,r.height);t.attributes.style.height=c(s)}a=[e.x,e.y,i,s]}return a},t.createWrapper=function(e,t){const{attributes:r}=t,{style:a}=r,i={name:"div",attributes:{class:["xfaWrapper"],style:Object.create(null)},children:[]};if(r.class.push("xfaWrapped"),e.border){const{widths:r,insets:s}=e.border[n.$extra];let o,c,l=s[0],h=s[3];const d=s[0]+s[2],f=s[1]+s[3];switch(e.border.hand){case"even":l-=r[0]/2,h-=r[3]/2,o=`calc(100% + ${(r[1]+r[3])/2-f}px)`,c=`calc(100% + ${(r[0]+r[2])/2-d}px)`;break;case"left":l-=r[0],h-=r[3],o=`calc(100% + ${r[1]+r[3]-f}px)`,c=`calc(100% + ${r[0]+r[2]-d}px)`;break;case"right":o=f?`calc(100% - ${f}px)`:"100%",c=d?`calc(100% - ${d}px)`:"100%"}const p=["xfaBorder"];u(e.border)&&p.push("xfaPrintOnly");const g={name:"div",attributes:{class:p,style:{top:l+"px",left:h+"px",width:o,height:c}},children:[]};for(const e of["border","borderWidth","borderColor","borderRadius","borderStyle"])void 0!==a[e]&&(g.attributes.style[e]=a[e],delete a[e]);i.children.push(g,t)}else i.children.push(t);for(const e of["background","backgroundClip","top","left","width","height","minWidth","minHeight","maxWidth","maxHeight","transform","transformOrigin","visibility"])void 0!==a[e]&&(i.attributes.style[e]=a[e],delete a[e]);return i.attributes.style.position="absolute"===a.position?"absolute":"relative",delete a.position,a.alignSelf&&(i.attributes.style.alignSelf=a.alignSelf,delete a.alignSelf),i},t.fixDimensions=function(e){const t=e[n.$getSubformParent]();if(t.layout&&t.layout.includes("row")){const r=t[n.$extra],a=e.colSpan;let i;i=-1===a?r.columnWidths.slice(r.currentColumn).reduce(((e,t)=>e+t),0):r.columnWidths.slice(r.currentColumn,r.currentColumn+a).reduce(((e,t)=>e+t),0),isNaN(i)||(e.w=i)}t.layout&&"position"!==t.layout&&(e.x=e.y=0),"table"===e.layout&&""===e.w&&Array.isArray(e.columnWidths)&&(e.w=e.columnWidths.reduce(((e,t)=>e+t),0))},t.fixTextIndent=function(e){const t=(0,i.getMeasurement)(e.textIndent,"0px");if(t>=0)return;const r="padding"+("left"==("right"===e.textAlign?"right":"left")?"Left":"Right"),n=(0,i.getMeasurement)(e[r],"0px");e[r]=n-t+"px"},t.fixURL=function(e){const t=(0,a.createValidAbsoluteUrl)(e,null,{addDefaultProtocol:!0,tryConvertEncoding:!0});return t?t.href:null},t.isPrintOnly=u,t.layoutClass=function(e){switch(e.layout){case"position":default:return"xfaPosition";case"lr-tb":return"xfaLrTb";case"rl-row":return"xfaRlRow";case"rl-tb":return"xfaRlTb";case"row":return"xfaRow";case"table":return"xfaTable";case"tb":return"xfaTb"}},t.layoutNode=function(e,t){let r=null,a=null,i=!1;if((!e.w||!e.h)&&e.value){let s=0,o=0;e.margin&&(s=e.margin.leftInset+e.margin.rightInset,o=e.margin.topInset+e.margin.bottomInset);let c=null,l=null;e.para&&(l=Object.create(null),c=""===e.para.lineHeight?null:e.para.lineHeight,l.top=""===e.para.spaceAbove?0:e.para.spaceAbove,l.bottom=""===e.para.spaceBelow?0:e.para.spaceBelow,l.left=""===e.para.marginLeft?0:e.para.marginLeft,l.right=""===e.para.marginRight?0:e.para.marginRight);let u=e.font;if(!u){const t=e[n.$getTemplateRoot]();let r=e[n.$getParent]();for(;r&&r!==t;){if(r.font){u=r.font;break}r=r[n.$getParent]()}}const d=(e.w||t.width)-s,f=e[n.$globalData].fontFinder;if(e.value.exData&&e.value.exData[n.$content]&&"text/html"===e.value.exData.contentType){const t=h(e.value.exData[n.$content],u,l,c,f,d);a=t.width,r=t.height,i=t.isBroken}else{const t=e.value[n.$text]();if(t){const e=h(t,u,l,c,f,d);a=e.width,r=e.height,i=e.isBroken}}null===a||e.w||(a+=s),null===r||e.h||(r+=o)}return{w:a,h:r,isBroken:i}},t.measureToString=c,t.setAccess=function(e,t){switch(e.access){case"nonInteractive":t.push("xfaNonInteractive");break;case"readOnly":t.push("xfaReadOnly");break;case"protected":t.push("xfaDisabled")}},t.setFontFamily=function(e,t,r,n){if(!r)return void delete n.fontFamily;const a=(0,i.stripQuotes)(e.typeface);n.fontFamily=`"${a}"`;const o=r.find(a);if(o){const{fontFamily:r}=o.regular.cssFontInfo;r!==a&&(n.fontFamily=`"${r}"`);const i=d(t);if(i&&""!==i.lineHeight)return;if(n.lineHeight)return;const c=(0,s.selectFont)(e,o);c&&(n.lineHeight=Math.max(1.2,c.lineHeight))}},t.setMinMaxDimensions=function(e,t){"position"===e[n.$getSubformParent]().layout&&(e.minW>0&&(t.minWidth=c(e.minW)),e.maxW>0&&(t.maxWidth=c(e.maxW)),e.minH>0&&(t.minHeight=c(e.minH)),e.maxH>0&&(t.maxHeight=c(e.maxH)))},t.setPara=function(e,t,r){if(r.attributes.class&&r.attributes.class.includes("xfaRich")){t&&(""===e.h&&(t.height="auto"),""===e.w&&(t.width="auto"));const a=d(e);if(a){const e=r.attributes.style;switch(e.display="flex",e.flexDirection="column",a.vAlign){case"top":e.justifyContent="start";break;case"bottom":e.justifyContent="end";break;case"middle":e.justifyContent="center"}const t=a[n.$toStyle]();for(const[r,n]of Object.entries(t))r in e||(e[r]=n)}}},t.toStyle=function(e,...t){const r=Object.create(null);for(const i of t){const t=e[i];if(null!==t)if(l.hasOwnProperty(i))l[i](e,r);else if(t instanceof n.XFAObject){const e=t[n.$toStyle]();e?Object.assign(r,e):(0,a.warn)(`(DEBUG) - XFA - style for ${i} not implemented yet`)}}return r};var n=r(77),a=r(2),i=r(78),s=r(85),o=r(86);function c(e){return"string"==typeof e?"0px":Number.isInteger(e)?e+"px":e.toFixed(2)+"px"}const l={anchorType(e,t){const r=e[n.$getSubformParent]();if(r&&(!r.layout||"position"===r.layout))switch("transform"in t||(t.transform=""),e.anchorType){case"bottomCenter":t.transform+="translate(-50%, -100%)";break;case"bottomLeft":t.transform+="translate(0,-100%)";break;case"bottomRight":t.transform+="translate(-100%,-100%)";break;case"middleCenter":t.transform+="translate(-50%,-50%)";break;case"middleLeft":t.transform+="translate(0,-50%)";break;case"middleRight":t.transform+="translate(-100%,-50%)";break;case"topCenter":t.transform+="translate(-50%,0)";break;case"topRight":t.transform+="translate(-100%,0)"}},dimensions(e,t){const r=e[n.$getSubformParent]();let a=e.w;const i=e.h;if(r.layout&&r.layout.includes("row")){const t=r[n.$extra],i=e.colSpan;let s;-1===i?(s=t.columnWidths.slice(t.currentColumn).reduce(((e,t)=>e+t),0),t.currentColumn=0):(s=t.columnWidths.slice(t.currentColumn,t.currentColumn+i).reduce(((e,t)=>e+t),0),t.currentColumn=(t.currentColumn+e.colSpan)%t.columnWidths.length),isNaN(s)||(a=e.w=s)}t.width=""!==a?c(a):"auto",t.height=""!==i?c(i):"auto"},position(e,t){const r=e[n.$getSubformParent]();r&&r.layout&&"position"!==r.layout||(t.position="absolute",t.left=c(e.x),t.top=c(e.y))},rotate(e,t){e.rotate&&("transform"in t||(t.transform=""),t.transform+=`rotate(-${e.rotate}deg)`,t.transformOrigin="top left")},presence(e,t){switch(e.presence){case"invisible":t.visibility="hidden";break;case"hidden":case"inactive":t.display="none"}},hAlign(e,t){if("para"===e[n.$nodeName])switch(e.hAlign){case"justifyAll":t.textAlign="justify-all";break;case"radix":t.textAlign="left";break;default:t.textAlign=e.hAlign}else switch(e.hAlign){case"left":t.alignSelf="start";break;case"center":t.alignSelf="center";break;case"right":t.alignSelf="end"}},margin(e,t){e.margin&&(t.margin=e.margin[n.$toStyle]().margin)}};function h(e,t,r,a,i,s){const c=new o.TextMeasure(t,r,a,i);return"string"==typeof e?c.addString(e):e[n.$pushGlyphs](c),c.compute(s)}function u(e){return e.relevant.length>0&&!e.relevant[0].excluded&&"print"===e.relevant[0].viewname}function d(e){const t=e[n.$getTemplateRoot]()[n.$extra].paraStack;return t.length?t.at(-1):null}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FontFinder=void 0,t.getMetrics=function(e,t=!1){let r=null;if(e){const t=(0,a.stripQuotes)(e.typeface),i=e[n.$globalData].fontFinder.find(t);r=s(e,i)}if(!r)return{lineHeight:12,lineGap:2,lineNoGap:10};const i=e.size||10,o=r.lineHeight?Math.max(t?0:1.2,r.lineHeight):1.2,c=void 0===r.lineGap?.2:r.lineGap;return{lineHeight:o*i,lineGap:c*i,lineNoGap:Math.max(1,o-c)*i}},t.selectFont=s;var n=r(77),a=r(78),i=r(2);function s(e,t){return"italic"===e.posture?"bold"===e.weight?t.bolditalic:t.italic:"bold"===e.weight?t.bold:t.regular}t.FontFinder=class{constructor(e){this.fonts=new Map,this.cache=new Map,this.warned=new Set,this.defaultFont=null,this.add(e)}add(e,t=null){for(const t of e)this.addPdfFont(t);for(const e of this.fonts.values())e.regular||(e.regular=e.italic||e.bold||e.bolditalic);if(!t||0===t.size)return;const r=this.fonts.get("PdfJS-Fallback-PdfJS-XFA");for(const e of t)this.fonts.set(e,r)}addPdfFont(e){const t=e.cssFontInfo,r=t.fontFamily;let n=this.fonts.get(r);n||(n=Object.create(null),this.fonts.set(r,n),this.defaultFont||(this.defaultFont=n));let a="";const i=parseFloat(t.fontWeight);0!==parseFloat(t.italicAngle)?a=700>i?"italic":"bolditalic":700>i||(a="bold"),a||((e.name.includes("Bold")||e.psName&&e.psName.includes("Bold"))&&(a="bold"),(e.name.includes("Italic")||e.name.endsWith("It")||e.psName&&(e.psName.includes("Italic")||e.psName.endsWith("It")))&&(a+="italic")),a||(a="regular"),n[a]=e}getDefault(){return this.defaultFont}find(e,t=!0){let r=this.fonts.get(e)||this.cache.get(e);if(r)return r;const n=/,|-|_| |bolditalic|bold|italic|regular|it/gi;let a=e.replace(n,"");if(r=this.fonts.get(a),r)return this.cache.set(e,r),r;a=a.toLowerCase();const s=[];for(const[e,t]of this.fonts.entries())e.replace(n,"").toLowerCase().startsWith(a)&&s.push(t);if(0===s.length)for(const[,e]of this.fonts.entries())e.regular.name&&e.regular.name.replace(n,"").toLowerCase().startsWith(a)&&s.push(e);if(0===s.length){a=a.replace(/psmt|mt/gi,"");for(const[e,t]of this.fonts.entries())e.replace(n,"").toLowerCase().startsWith(a)&&s.push(t)}if(0===s.length)for(const e of this.fonts.values())e.regular.name&&e.regular.name.replace(n,"").toLowerCase().startsWith(a)&&s.push(e);return 1>s.length?(t&&!this.warned.has(e)&&(this.warned.add(e),(0,i.warn)("XFA - Cannot find the font: "+e)),null):(1!==s.length&&t&&(0,i.warn)("XFA - Too many choices to guess the correct font: "+e),this.cache.set(e,s[0]),s[0])}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextMeasure=void 0;var n=r(85);class a{constructor(e,t,r,a){if(this.lineHeight=r,this.paraMargin=t||{top:0,bottom:0,left:0,right:0},!e)return void([this.pdfFont,this.xfaFont]=this.defaultFont(a));this.xfaFont={typeface:e.typeface,posture:e.posture,weight:e.weight,size:e.size,letterSpacing:e.letterSpacing};const i=a.find(e.typeface);i?(this.pdfFont=(0,n.selectFont)(e,i),this.pdfFont||([this.pdfFont,this.xfaFont]=this.defaultFont(a))):[this.pdfFont,this.xfaFont]=this.defaultFont(a)}defaultFont(e){const t=e.find("Helvetica",!1)||e.find("Myriad Pro",!1)||e.find("Arial",!1)||e.getDefault();if(t&&t.regular){const e=t.regular;return[e,{typeface:e.cssFontInfo.fontFamily,posture:"normal",weight:"normal",size:10,letterSpacing:0}]}return[null,{typeface:"Courier",posture:"normal",weight:"normal",size:10,letterSpacing:0}]}}class i{constructor(e,t,r,n){this.fontFinder=n,this.stack=[new a(e,t,r,n)]}pushData(e,t,r){const n=this.stack.at(-1);for(const t of["typeface","posture","weight","size","letterSpacing"])e[t]||(e[t]=n.xfaFont[t]);for(const e of["top","bottom","left","right"])isNaN(t[e])&&(t[e]=n.paraMargin[e]);const i=new a(e,t,r||n.lineHeight,this.fontFinder);i.pdfFont||(i.pdfFont=n.pdfFont),this.stack.push(i)}popFont(){this.stack.pop()}topFont(){return this.stack.at(-1)}}t.TextMeasure=class{constructor(e,t,r,n){this.glyphs=[],this.fontSelector=new i(e,t,r,n),this.extraHeight=0}pushData(e,t,r){this.fontSelector.pushData(e,t,r)}popFont(e){return this.fontSelector.popFont()}addPara(){const e=this.fontSelector.topFont();this.extraHeight+=e.paraMargin.top+e.paraMargin.bottom}addString(e){if(!e)return;const t=this.fontSelector.topFont(),r=t.xfaFont.size;if(t.pdfFont){const n=t.xfaFont.letterSpacing,a=t.pdfFont,i=a.lineHeight||1.2,s=t.lineHeight||Math.max(1.2,i)*r,o=Math.max(1,i-(void 0===a.lineGap?.2:a.lineGap))*r,c=r/1e3,l=a.defaultWidth||a.charsToGlyphs(" ")[0].width;for(const t of e.split(/[\u2029\n]/)){const e=a.encodeString(t).join(""),r=a.charsToGlyphs(e);for(const e of r)this.glyphs.push([(e.width||l)*c+n,s,o,e.unicode,!1]);this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop()}else{for(const t of e.split(/[\u2029\n]/)){for(const e of t.split(""))this.glyphs.push([r,1.2*r,r,e,!1]);this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop()}}compute(e){let t=-1,r=0,n=0,a=0,i=0,s=0,o=!1,c=!0;for(let l=0,h=this.glyphs.length;h>l;l++){const[h,u,d,f,p]=this.glyphs[l],g=" "===f,m=c?d:u;p?(n=Math.max(n,i),i=0,a+=s,s=m,t=-1,r=0,c=!1):g?i+h>e?(n=Math.max(n,i),i=0,a+=s,s=m,t=-1,r=0,o=!0,c=!1):(s=Math.max(m,s),r=i,i+=h,t=l):i+h>e?(a+=s,s=m,-1!==t?(l=t,n=Math.max(n,r),i=0,t=-1,r=0):(n=Math.max(n,i),i=h),o=!0,c=!1):(i+=h,s=Math.max(m,s))}return n=Math.max(n,i),a+=s+this.extraHeight,{width:1.02*n,height:a,isBroken:o}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DataHandler=void 0;var n=r(77);t.DataHandler=class{constructor(e,t){this.data=t,this.dataset=e.datasets||null}serialize(e){const t=[[-1,this.data[n.$getChildren]()]];for(;t.length>0;){const r=t.at(-1),[a,i]=r;if(a+1===i.length){t.pop();continue}const s=i[++r[0]],o=e.get(s[n.$uid]);if(o)s[n.$setValue](o);else{const t=s[n.$getAttributes]();for(const r of t.values()){const t=e.get(r[n.$uid]);if(t){r[n.$setValue](t);break}}}const c=s[n.$getChildren]();c.length>0&&t.push([-1,c])}const r=['<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">'];if(this.dataset)for(const e of this.dataset[n.$getChildren]())"data"!==e[n.$nodeName]&&e[n.$toString](r);return this.data[n.$toString](r),r.push("</xfa:datasets>"),r.join("")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XFAParser=void 0;var n=r(77),a=r(66),i=r(89),s=r(2);class o extends a.XMLParserBase{constructor(e=null,t=!1){super(),this._builder=new i.Builder(e),this._stack=[],this._globalData={usedTypefaces:new Set},this._ids=new Map,this._current=this._builder.buildRoot(this._ids),this._errorCode=a.XMLParserErrorCode.NoError,this._whiteRegex=/^\s+$/,this._nbsps=/\xa0+/g,this._richText=t}parse(e){if(this.parseXml(e),this._errorCode===a.XMLParserErrorCode.NoError)return this._current[n.$finalize](),this._current.element}onText(e){e=e.replace(this._nbsps,(e=>e.slice(1)+" ")),this._richText||this._current[n.$acceptWhitespace]()?this._current[n.$onText](e,this._richText):this._whiteRegex.test(e)||this._current[n.$onText](e.trim())}onCdata(e){this._current[n.$onText](e)}_mkAttributes(e,t){let r=null,a=null;const i=Object.create({});for(const{name:o,value:c}of e)if("xmlns"===o)r?(0,s.warn)(`XFA - multiple namespace definition in <${t}>`):r=c;else if(o.startsWith("xmlns:")){const e=o.substring(6);a||(a=[]),a.push({prefix:e,value:c})}else{const e=o.indexOf(":");if(-1===e)i[o]=c;else{let t=i[n.$nsAttributes];t||(t=i[n.$nsAttributes]=Object.create(null));const[r,a]=[o.slice(0,e),o.slice(e+1)];let s=t[r];s||(s=t[r]=Object.create(null)),s[a]=c}}return[r,a,i]}_getNameAndPrefix(e,t){const r=e.indexOf(":");return-1===r?[e,null]:[e.substring(r+1),t?"":e.substring(0,r)]}onBeginElement(e,t,r){const[a,i,s]=this._mkAttributes(t,e),[o,c]=this._getNameAndPrefix(e,this._builder.isNsAgnostic()),l=this._builder.build({nsPrefix:c,name:o,attributes:s,namespace:a,prefixes:i});if(l[n.$globalData]=this._globalData,r)return l[n.$finalize](),this._current[n.$onChild](l)&&l[n.$setId](this._ids),void l[n.$clean](this._builder);this._stack.push(this._current),this._current=l}onEndElement(e){const t=this._current;if(t[n.$isCDATAXml]()&&"string"==typeof t[n.$content]){const e=new o;e._globalData=this._globalData;const r=e.parse(t[n.$content]);t[n.$content]=null,t[n.$onChild](r)}t[n.$finalize](),this._current=this._stack.pop(),this._current[n.$onChild](t)&&t[n.$setId](this._ids),t[n.$clean](this._builder)}onError(e){this._errorCode=e}}t.XFAParser=o},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Builder=void 0;var n=r(79),a=r(77),i=r(90),s=r(82),o=r(99),c=r(2);class l extends a.XFAObject{constructor(e){super(-1,"root",Object.create(null)),this.element=null,this[a.$ids]=e}[a.$onChild](e){return this.element=e,!0}[a.$finalize](){super[a.$finalize](),this.element.template instanceof s.Template&&(this[a.$ids].set(a.$root,this.element),this.element.template[a.$resolvePrototypes](this[a.$ids]),this.element.template[a.$ids]=this[a.$ids])}}class h extends a.XFAObject{constructor(){super(-1,"",Object.create(null))}[a.$onChild](e){return!1}}t.Builder=class{constructor(e=null){this._namespaceStack=[],this._nsAgnosticLevel=0,this._namespacePrefixes=new Map,this._namespaces=new Map,this._nextNsId=Math.max(...Object.values(n.NamespaceIds).map((({id:e})=>e))),this._currentNamespace=e||new o.UnknownNamespace(++this._nextNsId)}buildRoot(e){return new l(e)}build({nsPrefix:e,name:t,attributes:r,namespace:s,prefixes:o}){const c=null!==s;if(c&&(this._namespaceStack.push(this._currentNamespace),this._currentNamespace=this._searchNamespace(s)),o&&this._addNamespacePrefix(o),r.hasOwnProperty(a.$nsAttributes)){const e=i.NamespaceSetUp.datasets,t=r[a.$nsAttributes];let n=null;for(const[r,a]of Object.entries(t))if(this._getNamespaceToUse(r)===e){n={xfa:a};break}n?r[a.$nsAttributes]=n:delete r[a.$nsAttributes]}const l=this._getNamespaceToUse(e),u=l&&l[n.$buildXFAObject](t,r)||new h;return u[a.$isNsAgnostic]()&&this._nsAgnosticLevel++,(c||o||u[a.$isNsAgnostic]())&&(u[a.$cleanup]={hasNamespace:c,prefixes:o,nsAgnostic:u[a.$isNsAgnostic]()}),u}isNsAgnostic(){return this._nsAgnosticLevel>0}_searchNamespace(e){let t=this._namespaces.get(e);if(t)return t;for(const[r,{check:a}]of Object.entries(n.NamespaceIds))if(a(e)){if(t=i.NamespaceSetUp[r],t)return this._namespaces.set(e,t),t;break}return t=new o.UnknownNamespace(++this._nextNsId),this._namespaces.set(e,t),t}_addNamespacePrefix(e){for(const{prefix:t,value:r}of e){const e=this._searchNamespace(r);let n=this._namespacePrefixes.get(t);n||(n=[],this._namespacePrefixes.set(t,n)),n.push(e)}}_getNamespaceToUse(e){if(!e)return this._currentNamespace;const t=this._namespacePrefixes.get(e);return t&&t.length>0?t.at(-1):((0,c.warn)(`Unknown namespace prefix: ${e}.`),null)}clean(e){const{hasNamespace:t,prefixes:r,nsAgnostic:n}=e;t&&(this._currentNamespace=this._namespaceStack.pop()),r&&r.forEach((({prefix:e})=>{this._namespacePrefixes.get(e).pop()})),n&&this._nsAgnosticLevel--}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NamespaceSetUp=void 0;var n=r(91),a=r(92),i=r(93),s=r(94),o=r(95),c=r(96),l=r(82),h=r(97),u=r(98);t.NamespaceSetUp={config:n.ConfigNamespace,connection:a.ConnectionSetNamespace,datasets:i.DatasetsNamespace,localeSet:s.LocaleSetNamespace,signature:o.SignatureNamespace,stylesheet:c.StylesheetNamespace,template:l.TemplateNamespace,xdp:h.XdpNamespace,xhtml:u.XhtmlNamespace}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigNamespace=void 0;var n=r(79),a=r(77),i=r(78),s=r(2);const o=n.NamespaceIds.config.id;class c extends a.XFAObject{constructor(e){super(o,"acrobat",!0),this.acrobat7=null,this.autoSave=null,this.common=null,this.validate=null,this.validateApprovalSignatures=null,this.submitUrl=new a.XFAObjectArray}}class l extends a.XFAObject{constructor(e){super(o,"acrobat7",!0),this.dynamicRender=null}}class h extends a.OptionObject{constructor(e){super(o,"ADBE_JSConsole",["delegate","Enable","Disable"])}}class u extends a.OptionObject{constructor(e){super(o,"ADBE_JSDebugger",["delegate","Enable","Disable"])}}class d extends a.Option01{constructor(e){super(o,"addSilentPrint")}}class f extends a.Option01{constructor(e){super(o,"addViewerPreferences")}}class p extends a.Option10{constructor(e){super(o,"adjustData")}}class g extends a.IntegerObject{constructor(e){super(o,"adobeExtensionLevel",0,(e=>e>=1&&8>=e))}}class m extends a.XFAObject{constructor(e){super(o,"agent",!0),this.name=e.name?e.name.trim():"",this.common=new a.XFAObjectArray}}class b extends a.ContentObject{constructor(e){super(o,"alwaysEmbed")}}class y extends a.StringObject{constructor(e){super(o,"amd")}}class w extends a.XFAObject{constructor(e){super(o,"area"),this.level=(0,i.getInteger)({data:e.level,defaultValue:0,validate:e=>e>=1&&3>=e}),this.name=(0,i.getStringOption)(e.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}}class v extends a.OptionObject{constructor(e){super(o,"attributes",["preserve","delegate","ignore"])}}class S extends a.OptionObject{constructor(e){super(o,"autoSave",["disabled","enabled"])}}class x extends a.StringObject{constructor(e){super(o,"base")}}class A extends a.XFAObject{constructor(e){super(o,"batchOutput"),this.format=(0,i.getStringOption)(e.format,["none","concat","zip","zipCompress"])}}class k extends a.ContentObject{constructor(e){super(o,"behaviorOverride")}[a.$finalize](){this[a.$content]=new Map(this[a.$content].trim().split(/\s+/).filter((e=>e.includes(":"))).map((e=>e.split(":",2))))}}class C extends a.XFAObject{constructor(e){super(o,"cache",!0),this.templateCache=null}}class _ extends a.Option01{constructor(e){super(o,"change")}}class F extends a.XFAObject{constructor(e){super(o,"common",!0),this.data=null,this.locale=null,this.localeSet=null,this.messaging=null,this.suppressBanner=null,this.template=null,this.validationMessaging=null,this.versionControl=null,this.log=new a.XFAObjectArray}}class T extends a.XFAObject{constructor(e){super(o,"compress"),this.scope=(0,i.getStringOption)(e.scope,["imageOnly","document"])}}class O extends a.Option01{constructor(e){super(o,"compressLogicalStructure")}}class P extends a.Option10{constructor(e){super(o,"compressObjectStream")}}class I extends a.XFAObject{constructor(e){super(o,"compression",!0),this.compressLogicalStructure=null,this.compressObjectStream=null,this.level=null,this.type=null}}class E extends a.XFAObject{constructor(e){super(o,"config",!0),this.acrobat=null,this.present=null,this.trace=null,this.agent=new a.XFAObjectArray}}class M extends a.OptionObject{constructor(e){super(o,"conformance",["A","B"])}}class R extends a.Option01{constructor(e){super(o,"contentCopy")}}class D extends a.IntegerObject{constructor(e){super(o,"copies",1,(e=>e>=1))}}class N extends a.StringObject{constructor(e){super(o,"creator")}}class L extends a.IntegerObject{constructor(e){super(o,"currentPage",0,(e=>e>=0))}}class j extends a.XFAObject{constructor(e){super(o,"data",!0),this.adjustData=null,this.attributes=null,this.incrementalLoad=null,this.outputXSL=null,this.range=null,this.record=null,this.startNode=null,this.uri=null,this.window=null,this.xsl=null,this.excludeNS=new a.XFAObjectArray,this.transform=new a.XFAObjectArray}}class B extends a.XFAObject{constructor(e){super(o,"debug",!0),this.uri=null}}class U extends a.ContentObject{constructor(e){super(o,"defaultTypeface"),this.writingScript=(0,i.getStringOption)(e.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"])}}class $ extends a.OptionObject{constructor(e){super(o,"destination",["pdf","pcl","ps","webClient","zpl"])}}class q extends a.Option01{constructor(e){super(o,"documentAssembly")}}class X extends a.XFAObject{constructor(e){super(o,"driver",!0),this.name=e.name?e.name.trim():"",this.fontInfo=null,this.xdc=null}}class H extends a.OptionObject{constructor(e){super(o,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}}class W extends a.OptionObject{constructor(e){super(o,"dynamicRender",["forbidden","required"])}}class z extends a.Option01{constructor(e){super(o,"embed")}}class G extends a.Option01{constructor(e){super(o,"encrypt")}}class V extends a.XFAObject{constructor(e){super(o,"encryption",!0),this.encrypt=null,this.encryptionLevel=null,this.permissions=null}}class Y extends a.OptionObject{constructor(e){super(o,"encryptionLevel",["40bit","128bit"])}}class K extends a.StringObject{constructor(e){super(o,"enforce")}}class J extends a.XFAObject{constructor(e){super(o,"equate"),this.force=(0,i.getInteger)({data:e.force,defaultValue:1,validate:e=>0===e}),this.from=e.from||"",this.to=e.to||""}}class Z extends a.XFAObject{constructor(e){super(o,"equateRange"),this.from=e.from||"",this.to=e.to||"",this._unicodeRange=e.unicodeRange||""}get unicodeRange(){const e=[],t=/U\+([0-9a-fA-F]+)/,r=this._unicodeRange;for(let n of r.split(",").map((e=>e.trim())).filter((e=>!!e)))n=n.split("-",2).map((e=>{const r=e.match(t);return r?parseInt(r[1],16):0})),1===n.length&&n.push(n[0]),e.push(n);return(0,s.shadow)(this,"unicodeRange",e)}}class Q extends a.ContentObject{constructor(e){super(o,"exclude")}[a.$finalize](){this[a.$content]=this[a.$content].trim().split(/\s+/).filter((e=>e&&["calculate","close","enter","exit","initialize","ready","validate"].includes(e)))}}class ee extends a.StringObject{constructor(e){super(o,"excludeNS")}}class te extends a.OptionObject{constructor(e){super(o,"flipLabel",["usePrinterSetting","on","off"])}}class re extends a.XFAObject{constructor(e){super(o,"fontInfo",!0),this.embed=null,this.map=null,this.subsetBelow=null,this.alwaysEmbed=new a.XFAObjectArray,this.defaultTypeface=new a.XFAObjectArray,this.neverEmbed=new a.XFAObjectArray}}class ne extends a.Option01{constructor(e){super(o,"formFieldFilling")}}class ae extends a.StringObject{constructor(e){super(o,"groupParent")}}class ie extends a.OptionObject{constructor(e){super(o,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}}class se extends a.StringObject{constructor(e){super(o,"includeXDPContent")}}class oe extends a.OptionObject{constructor(e){super(o,"incrementalLoad",["none","forwardOnly"])}}class ce extends a.Option01{constructor(e){super(o,"incrementalMerge")}}class le extends a.Option01{constructor(e){super(o,"interactive")}}class he extends a.OptionObject{constructor(e){super(o,"jog",["usePrinterSetting","none","pageSet"])}}class ue extends a.XFAObject{constructor(e){super(o,"labelPrinter",!0),this.name=(0,i.getStringOption)(e.name,["zpl","dpl","ipl","tcpl"]),this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class de extends a.OptionObject{constructor(e){super(o,"layout",["paginate","panel"])}}class fe extends a.IntegerObject{constructor(e){super(o,"level",0,(e=>e>0))}}class pe extends a.Option01{constructor(e){super(o,"linearized")}}class ge extends a.StringObject{constructor(e){super(o,"locale")}}class me extends a.StringObject{constructor(e){super(o,"localeSet")}}class be extends a.XFAObject{constructor(e){super(o,"log",!0),this.mode=null,this.threshold=null,this.to=null,this.uri=null}}class ye extends a.XFAObject{constructor(e){super(o,"map",!0),this.equate=new a.XFAObjectArray,this.equateRange=new a.XFAObjectArray}}class we extends a.XFAObject{constructor(e){super(o,"mediumInfo",!0),this.map=null}}class ve extends a.XFAObject{constructor(e){super(o,"message",!0),this.msgId=null,this.severity=null}}class Se extends a.XFAObject{constructor(e){super(o,"messaging",!0),this.message=new a.XFAObjectArray}}class xe extends a.OptionObject{constructor(e){super(o,"mode",["append","overwrite"])}}class Ae extends a.Option01{constructor(e){super(o,"modifyAnnots")}}class ke extends a.IntegerObject{constructor(e){super(o,"msgId",1,(e=>e>=1))}}class Ce extends a.StringObject{constructor(e){super(o,"nameAttr")}}class _e extends a.ContentObject{constructor(e){super(o,"neverEmbed")}}class Fe extends a.IntegerObject{constructor(e){super(o,"numberOfCopies",null,(e=>e>=2&&5>=e))}}class Te extends a.XFAObject{constructor(e){super(o,"openAction",!0),this.destination=null}}class Oe extends a.XFAObject{constructor(e){super(o,"output",!0),this.to=null,this.type=null,this.uri=null}}class Pe extends a.StringObject{constructor(e){super(o,"outputBin")}}class Ie extends a.XFAObject{constructor(e){super(o,"outputXSL",!0),this.uri=null}}class Ee extends a.OptionObject{constructor(e){super(o,"overprint",["none","both","draw","field"])}}class Me extends a.StringObject{constructor(e){super(o,"packets")}[a.$finalize](){"*"!==this[a.$content]&&(this[a.$content]=this[a.$content].trim().split(/\s+/).filter((e=>["config","datasets","template","xfdf","xslt"].includes(e))))}}class Re extends a.XFAObject{constructor(e){super(o,"pageOffset"),this.x=(0,i.getInteger)({data:e.x,defaultValue:"useXDCSetting",validate:e=>!0}),this.y=(0,i.getInteger)({data:e.y,defaultValue:"useXDCSetting",validate:e=>!0})}}class De extends a.StringObject{constructor(e){super(o,"pageRange")}[a.$finalize](){const e=this[a.$content].trim().split(/\s+/).map((e=>parseInt(e,10))),t=[];for(let r=0,n=e.length;n>r;r+=2)t.push(e.slice(r,r+2));this[a.$content]=t}}class Ne extends a.OptionObject{constructor(e){super(o,"pagination",["simplex","duplexShortEdge","duplexLongEdge"])}}class Le extends a.OptionObject{constructor(e){super(o,"paginationOverride",["none","forceDuplex","forceDuplexLongEdge","forceDuplexShortEdge","forceSimplex"])}}class je extends a.IntegerObject{constructor(e){super(o,"part",1,(e=>!1))}}class Be extends a.XFAObject{constructor(e){super(o,"pcl",!0),this.name=e.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.pageOffset=null,this.staple=null,this.xdc=null}}class Ue extends a.XFAObject{constructor(e){super(o,"pdf",!0),this.name=e.name||"",this.adobeExtensionLevel=null,this.batchOutput=null,this.compression=null,this.creator=null,this.encryption=null,this.fontInfo=null,this.interactive=null,this.linearized=null,this.openAction=null,this.pdfa=null,this.producer=null,this.renderPolicy=null,this.scriptModel=null,this.silentPrint=null,this.submitFormat=null,this.tagged=null,this.version=null,this.viewerPreferences=null,this.xdc=null}}class $e extends a.XFAObject{constructor(e){super(o,"pdfa",!0),this.amd=null,this.conformance=null,this.includeXDPContent=null,this.part=null}}class qe extends a.XFAObject{constructor(e){super(o,"permissions",!0),this.accessibleContent=null,this.change=null,this.contentCopy=null,this.documentAssembly=null,this.formFieldFilling=null,this.modifyAnnots=null,this.plaintextMetadata=null,this.print=null,this.printHighQuality=null}}class Xe extends a.Option01{constructor(e){super(o,"pickTrayByPDFSize")}}class He extends a.StringObject{constructor(e){super(o,"picture")}}class We extends a.Option01{constructor(e){super(o,"plaintextMetadata")}}class ze extends a.OptionObject{constructor(e){super(o,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}}class Ge extends a.XFAObject{constructor(e){super(o,"present",!0),this.behaviorOverride=null,this.cache=null,this.common=null,this.copies=null,this.destination=null,this.incrementalMerge=null,this.layout=null,this.output=null,this.overprint=null,this.pagination=null,this.paginationOverride=null,this.script=null,this.validate=null,this.xdp=null,this.driver=new a.XFAObjectArray,this.labelPrinter=new a.XFAObjectArray,this.pcl=new a.XFAObjectArray,this.pdf=new a.XFAObjectArray,this.ps=new a.XFAObjectArray,this.submitUrl=new a.XFAObjectArray,this.webClient=new a.XFAObjectArray,this.zpl=new a.XFAObjectArray}}class Ve extends a.Option01{constructor(e){super(o,"print")}}class Ye extends a.Option01{constructor(e){super(o,"printHighQuality")}}class Ke extends a.OptionObject{constructor(e){super(o,"printScaling",["appdefault","noScaling"])}}class Je extends a.StringObject{constructor(e){super(o,"printerName")}}class Ze extends a.StringObject{constructor(e){super(o,"producer")}}class Qe extends a.XFAObject{constructor(e){super(o,"ps",!0),this.name=e.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.staple=null,this.xdc=null}}class et extends a.ContentObject{constructor(e){super(o,"range")}[a.$finalize](){this[a.$content]=this[a.$content].trim().split(/\s*,\s*/,2).map((e=>e.split("-").map((e=>parseInt(e.trim(),10))))).filter((e=>e.every((e=>!isNaN(e))))).map((e=>(1===e.length&&e.push(e[0]),e)))}}class tt extends a.ContentObject{constructor(e){super(o,"record")}[a.$finalize](){this[a.$content]=this[a.$content].trim();const e=parseInt(this[a.$content],10);isNaN(e)||0>e||(this[a.$content]=e)}}class rt extends a.ContentObject{constructor(e){super(o,"relevant")}[a.$finalize](){this[a.$content]=this[a.$content].trim().split(/\s+/)}}class nt extends a.ContentObject{constructor(e){super(o,"rename")}[a.$finalize](){this[a.$content]=this[a.$content].trim(),(this[a.$content].toLowerCase().startsWith("xml")||this[a.$content].match(RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*","u")))&&(0,s.warn)("XFA - Rename: invalid XFA name")}}class at extends a.OptionObject{constructor(e){super(o,"renderPolicy",["server","client"])}}class it extends a.OptionObject{constructor(e){super(o,"runScripts",["both","client","none","server"])}}class st extends a.XFAObject{constructor(e){super(o,"script",!0),this.currentPage=null,this.exclude=null,this.runScripts=null}}class ot extends a.OptionObject{constructor(e){super(o,"scriptModel",["XFA","none"])}}class ct extends a.OptionObject{constructor(e){super(o,"severity",["ignore","error","information","trace","warning"])}}class lt extends a.XFAObject{constructor(e){super(o,"silentPrint",!0),this.addSilentPrint=null,this.printerName=null}}class ht extends a.XFAObject{constructor(e){super(o,"staple"),this.mode=(0,i.getStringOption)(e.mode,["usePrinterSetting","on","off"])}}class ut extends a.StringObject{constructor(e){super(o,"startNode")}}class dt extends a.IntegerObject{constructor(e){super(o,"startPage",0,(e=>!0))}}class ft extends a.OptionObject{constructor(e){super(o,"submitFormat",["html","delegate","fdf","xml","pdf"])}}class pt extends a.StringObject{constructor(e){super(o,"submitUrl")}}class gt extends a.IntegerObject{constructor(e){super(o,"subsetBelow",100,(e=>e>=0&&100>=e))}}class mt extends a.Option01{constructor(e){super(o,"suppressBanner")}}class bt extends a.Option01{constructor(e){super(o,"tagged")}}class yt extends a.XFAObject{constructor(e){super(o,"template",!0),this.base=null,this.relevant=null,this.startPage=null,this.uri=null,this.xsl=null}}class wt extends a.OptionObject{constructor(e){super(o,"threshold",["trace","error","information","warning"])}}class vt extends a.OptionObject{constructor(e){super(o,"to",["null","memory","stderr","stdout","system","uri"])}}class St extends a.XFAObject{constructor(e){super(o,"templateCache"),this.maxEntries=(0,i.getInteger)({data:e.maxEntries,defaultValue:5,validate:e=>e>=0})}}class xt extends a.XFAObject{constructor(e){super(o,"trace",!0),this.area=new a.XFAObjectArray}}class At extends a.XFAObject{constructor(e){super(o,"transform",!0),this.groupParent=null,this.ifEmpty=null,this.nameAttr=null,this.picture=null,this.presence=null,this.rename=null,this.whitespace=null}}class kt extends a.OptionObject{constructor(e){super(o,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}}class Ct extends a.StringObject{constructor(e){super(o,"uri")}}class _t extends a.OptionObject{constructor(e){super(o,"validate",["preSubmit","prePrint","preExecute","preSave"])}}class Ft extends a.ContentObject{constructor(e){super(o,"validateApprovalSignatures")}[a.$finalize](){this[a.$content]=this[a.$content].trim().split(/\s+/).filter((e=>["docReady","postSign"].includes(e)))}}class Tt extends a.OptionObject{constructor(e){super(o,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}}class Ot extends a.OptionObject{constructor(e){super(o,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}}class Pt extends a.XFAObject{constructor(e){super(o,"VersionControl"),this.outputBelow=(0,i.getStringOption)(e.outputBelow,["warn","error","update"]),this.sourceAbove=(0,i.getStringOption)(e.sourceAbove,["warn","error"]),this.sourceBelow=(0,i.getStringOption)(e.sourceBelow,["update","maintain"])}}class It extends a.XFAObject{constructor(e){super(o,"viewerPreferences",!0),this.ADBE_JSConsole=null,this.ADBE_JSDebugger=null,this.addViewerPreferences=null,this.duplexOption=null,this.enforce=null,this.numberOfCopies=null,this.pageRange=null,this.pickTrayByPDFSize=null,this.printScaling=null}}class Et extends a.XFAObject{constructor(e){super(o,"webClient",!0),this.name=e.name?e.name.trim():"",this.fontInfo=null,this.xdc=null}}class Mt extends a.OptionObject{constructor(e){super(o,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}}class Rt extends a.ContentObject{constructor(e){super(o,"window")}[a.$finalize](){const e=this[a.$content].trim().split(/\s*,\s*/,2).map((e=>parseInt(e,10)));e.some((e=>isNaN(e)))?this[a.$content]=[0,0]:(1===e.length&&e.push(e[0]),this[a.$content]=e)}}class Dt extends a.XFAObject{constructor(e){super(o,"xdc",!0),this.uri=new a.XFAObjectArray,this.xsl=new a.XFAObjectArray}}class Nt extends a.XFAObject{constructor(e){super(o,"xdp",!0),this.packets=null}}class Lt extends a.XFAObject{constructor(e){super(o,"xsl",!0),this.debug=null,this.uri=null}}class jt extends a.XFAObject{constructor(e){super(o,"zpl",!0),this.name=e.name?e.name.trim():"",this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class Bt{static[n.$buildXFAObject](e,t){if(Bt.hasOwnProperty(e))return Bt[e](t)}static acrobat(e){return new c(e)}static acrobat7(e){return new l(e)}static ADBE_JSConsole(e){return new h(e)}static ADBE_JSDebugger(e){return new u(e)}static addSilentPrint(e){return new d(e)}static addViewerPreferences(e){return new f(e)}static adjustData(e){return new p(e)}static adobeExtensionLevel(e){return new g(e)}static agent(e){return new m(e)}static alwaysEmbed(e){return new b(e)}static amd(e){return new y(e)}static area(e){return new w(e)}static attributes(e){return new v(e)}static autoSave(e){return new S(e)}static base(e){return new x(e)}static batchOutput(e){return new A(e)}static behaviorOverride(e){return new k(e)}static cache(e){return new C(e)}static change(e){return new _(e)}static common(e){return new F(e)}static compress(e){return new T(e)}static compressLogicalStructure(e){return new O(e)}static compressObjectStream(e){return new P(e)}static compression(e){return new I(e)}static config(e){return new E(e)}static conformance(e){return new M(e)}static contentCopy(e){return new R(e)}static copies(e){return new D(e)}static creator(e){return new N(e)}static currentPage(e){return new L(e)}static data(e){return new j(e)}static debug(e){return new B(e)}static defaultTypeface(e){return new U(e)}static destination(e){return new $(e)}static documentAssembly(e){return new q(e)}static driver(e){return new X(e)}static duplexOption(e){return new H(e)}static dynamicRender(e){return new W(e)}static embed(e){return new z(e)}static encrypt(e){return new G(e)}static encryption(e){return new V(e)}static encryptionLevel(e){return new Y(e)}static enforce(e){return new K(e)}static equate(e){return new J(e)}static equateRange(e){return new Z(e)}static exclude(e){return new Q(e)}static excludeNS(e){return new ee(e)}static flipLabel(e){return new te(e)}static fontInfo(e){return new re(e)}static formFieldFilling(e){return new ne(e)}static groupParent(e){return new ae(e)}static ifEmpty(e){return new ie(e)}static includeXDPContent(e){return new se(e)}static incrementalLoad(e){return new oe(e)}static incrementalMerge(e){return new ce(e)}static interactive(e){return new le(e)}static jog(e){return new he(e)}static labelPrinter(e){return new ue(e)}static layout(e){return new de(e)}static level(e){return new fe(e)}static linearized(e){return new pe(e)}static locale(e){return new ge(e)}static localeSet(e){return new me(e)}static log(e){return new be(e)}static map(e){return new ye(e)}static mediumInfo(e){return new we(e)}static message(e){return new ve(e)}static messaging(e){return new Se(e)}static mode(e){return new xe(e)}static modifyAnnots(e){return new Ae(e)}static msgId(e){return new ke(e)}static nameAttr(e){return new Ce(e)}static neverEmbed(e){return new _e(e)}static numberOfCopies(e){return new Fe(e)}static openAction(e){return new Te(e)}static output(e){return new Oe(e)}static outputBin(e){return new Pe(e)}static outputXSL(e){return new Ie(e)}static overprint(e){return new Ee(e)}static packets(e){return new Me(e)}static pageOffset(e){return new Re(e)}static pageRange(e){return new De(e)}static pagination(e){return new Ne(e)}static paginationOverride(e){return new Le(e)}static part(e){return new je(e)}static pcl(e){return new Be(e)}static pdf(e){return new Ue(e)}static pdfa(e){return new $e(e)}static permissions(e){return new qe(e)}static pickTrayByPDFSize(e){return new Xe(e)}static picture(e){return new He(e)}static plaintextMetadata(e){return new We(e)}static presence(e){return new ze(e)}static present(e){return new Ge(e)}static print(e){return new Ve(e)}static printHighQuality(e){return new Ye(e)}static printScaling(e){return new Ke(e)}static printerName(e){return new Je(e)}static producer(e){return new Ze(e)}static ps(e){return new Qe(e)}static range(e){return new et(e)}static record(e){return new tt(e)}static relevant(e){return new rt(e)}static rename(e){return new nt(e)}static renderPolicy(e){return new at(e)}static runScripts(e){return new it(e)}static script(e){return new st(e)}static scriptModel(e){return new ot(e)}static severity(e){return new ct(e)}static silentPrint(e){return new lt(e)}static staple(e){return new ht(e)}static startNode(e){return new ut(e)}static startPage(e){return new dt(e)}static submitFormat(e){return new ft(e)}static submitUrl(e){return new pt(e)}static subsetBelow(e){return new gt(e)}static suppressBanner(e){return new mt(e)}static tagged(e){return new bt(e)}static template(e){return new yt(e)}static templateCache(e){return new St(e)}static threshold(e){return new wt(e)}static to(e){return new vt(e)}static trace(e){return new xt(e)}static transform(e){return new At(e)}static type(e){return new kt(e)}static uri(e){return new Ct(e)}static validate(e){return new _t(e)}static validateApprovalSignatures(e){return new Ft(e)}static validationMessaging(e){return new Tt(e)}static version(e){return new Ot(e)}static versionControl(e){return new Pt(e)}static viewerPreferences(e){return new It(e)}static webClient(e){return new Et(e)}static whitespace(e){return new Mt(e)}static window(e){return new Rt(e)}static xdc(e){return new Dt(e)}static xdp(e){return new Nt(e)}static xsl(e){return new Lt(e)}static zpl(e){return new jt(e)}}t.ConfigNamespace=Bt},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionSetNamespace=void 0;var n=r(79),a=r(77);const i=n.NamespaceIds.connectionSet.id;class s extends a.XFAObject{constructor(e){super(i,"connectionSet",!0),this.wsdlConnection=new a.XFAObjectArray,this.xmlConnection=new a.XFAObjectArray,this.xsdConnection=new a.XFAObjectArray}}class o extends a.XFAObject{constructor(e){super(i,"effectiveInputPolicy"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class c extends a.XFAObject{constructor(e){super(i,"effectiveOutputPolicy"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class l extends a.StringObject{constructor(e){super(i,"operation"),this.id=e.id||"",this.input=e.input||"",this.name=e.name||"",this.output=e.output||"",this.use=e.use||"",this.usehref=e.usehref||""}}class h extends a.StringObject{constructor(e){super(i,"rootElement"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class u extends a.StringObject{constructor(e){super(i,"soapAction"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class d extends a.StringObject{constructor(e){super(i,"soapAddress"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class f extends a.StringObject{constructor(e){super(i,"uri"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class p extends a.StringObject{constructor(e){super(i,"wsdlAddress"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class g extends a.XFAObject{constructor(e){super(i,"wsdlConnection",!0),this.dataDescription=e.dataDescription||"",this.name=e.name||"",this.effectiveInputPolicy=null,this.effectiveOutputPolicy=null,this.operation=null,this.soapAction=null,this.soapAddress=null,this.wsdlAddress=null}}class m extends a.XFAObject{constructor(e){super(i,"xmlConnection",!0),this.dataDescription=e.dataDescription||"",this.name=e.name||"",this.uri=null}}class b extends a.XFAObject{constructor(e){super(i,"xsdConnection",!0),this.dataDescription=e.dataDescription||"",this.name=e.name||"",this.rootElement=null,this.uri=null}}class y{static[n.$buildXFAObject](e,t){if(y.hasOwnProperty(e))return y[e](t)}static connectionSet(e){return new s(e)}static effectiveInputPolicy(e){return new o(e)}static effectiveOutputPolicy(e){return new c(e)}static operation(e){return new l(e)}static rootElement(e){return new h(e)}static soapAction(e){return new u(e)}static soapAddress(e){return new d(e)}static uri(e){return new f(e)}static wsdlAddress(e){return new p(e)}static wsdlConnection(e){return new g(e)}static xmlConnection(e){return new m(e)}static xsdConnection(e){return new b(e)}}t.ConnectionSetNamespace=y},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DatasetsNamespace=void 0;var n=r(77),a=r(79);const i=a.NamespaceIds.datasets.id;class s extends n.XmlObject{constructor(e){super(i,"data",e)}[n.$isNsAgnostic](){return!0}}class o extends n.XFAObject{constructor(e){super(i,"datasets",!0),this.data=null,this.Signature=null}[n.$onChild](e){const t=e[n.$nodeName];("data"===t&&e[n.$namespaceId]===i||"Signature"===t&&e[n.$namespaceId]===a.NamespaceIds.signature.id)&&(this[t]=e),this[n.$appendChild](e)}}class c{static[a.$buildXFAObject](e,t){if(c.hasOwnProperty(e))return c[e](t)}static datasets(e){return new o(e)}static data(e){return new s(e)}}t.DatasetsNamespace=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocaleSetNamespace=void 0;var n=r(79),a=r(77),i=r(78);const s=n.NamespaceIds.localeSet.id;class o extends a.XFAObject{constructor(e){super(s,"calendarSymbols",!0),this.name="gregorian",this.dayNames=new a.XFAObjectArray(2),this.eraNames=null,this.meridiemNames=null,this.monthNames=new a.XFAObjectArray(2)}}class c extends a.StringObject{constructor(e){super(s,"currencySymbol"),this.name=(0,i.getStringOption)(e.name,["symbol","isoname","decimal"])}}class l extends a.XFAObject{constructor(e){super(s,"currencySymbols",!0),this.currencySymbol=new a.XFAObjectArray(3)}}class h extends a.StringObject{constructor(e){super(s,"datePattern"),this.name=(0,i.getStringOption)(e.name,["full","long","med","short"])}}class u extends a.XFAObject{constructor(e){super(s,"datePatterns",!0),this.datePattern=new a.XFAObjectArray(4)}}class d extends a.ContentObject{constructor(e){super(s,"dateTimeSymbols")}}class f extends a.StringObject{constructor(e){super(s,"day")}}class p extends a.XFAObject{constructor(e){super(s,"dayNames",!0),this.abbr=(0,i.getInteger)({data:e.abbr,defaultValue:0,validate:e=>1===e}),this.day=new a.XFAObjectArray(7)}}class g extends a.StringObject{constructor(e){super(s,"era")}}class m extends a.XFAObject{constructor(e){super(s,"eraNames",!0),this.era=new a.XFAObjectArray(2)}}class b extends a.XFAObject{constructor(e){super(s,"locale",!0),this.desc=e.desc||"",this.name="isoname",this.calendarSymbols=null,this.currencySymbols=null,this.datePatterns=null,this.dateTimeSymbols=null,this.numberPatterns=null,this.numberSymbols=null,this.timePatterns=null,this.typeFaces=null}}class y extends a.XFAObject{constructor(e){super(s,"localeSet",!0),this.locale=new a.XFAObjectArray}}class w extends a.StringObject{constructor(e){super(s,"meridiem")}}class v extends a.XFAObject{constructor(e){super(s,"meridiemNames",!0),this.meridiem=new a.XFAObjectArray(2)}}class S extends a.StringObject{constructor(e){super(s,"month")}}class x extends a.XFAObject{constructor(e){super(s,"monthNames",!0),this.abbr=(0,i.getInteger)({data:e.abbr,defaultValue:0,validate:e=>1===e}),this.month=new a.XFAObjectArray(12)}}class A extends a.StringObject{constructor(e){super(s,"numberPattern"),this.name=(0,i.getStringOption)(e.name,["full","long","med","short"])}}class k extends a.XFAObject{constructor(e){super(s,"numberPatterns",!0),this.numberPattern=new a.XFAObjectArray(4)}}class C extends a.StringObject{constructor(e){super(s,"numberSymbol"),this.name=(0,i.getStringOption)(e.name,["decimal","grouping","percent","minus","zero"])}}class _ extends a.XFAObject{constructor(e){super(s,"numberSymbols",!0),this.numberSymbol=new a.XFAObjectArray(5)}}class F extends a.StringObject{constructor(e){super(s,"timePattern"),this.name=(0,i.getStringOption)(e.name,["full","long","med","short"])}}class T extends a.XFAObject{constructor(e){super(s,"timePatterns",!0),this.timePattern=new a.XFAObjectArray(4)}}class O extends a.XFAObject{constructor(e){super(s,"typeFace",!0),this.name=""|e.name}}class P extends a.XFAObject{constructor(e){super(s,"typeFaces",!0),this.typeFace=new a.XFAObjectArray}}class I{static[n.$buildXFAObject](e,t){if(I.hasOwnProperty(e))return I[e](t)}static calendarSymbols(e){return new o(e)}static currencySymbol(e){return new c(e)}static currencySymbols(e){return new l(e)}static datePattern(e){return new h(e)}static datePatterns(e){return new u(e)}static dateTimeSymbols(e){return new d(e)}static day(e){return new f(e)}static dayNames(e){return new p(e)}static era(e){return new g(e)}static eraNames(e){return new m(e)}static locale(e){return new b(e)}static localeSet(e){return new y(e)}static meridiem(e){return new w(e)}static meridiemNames(e){return new v(e)}static month(e){return new S(e)}static monthNames(e){return new x(e)}static numberPattern(e){return new A(e)}static numberPatterns(e){return new k(e)}static numberSymbol(e){return new C(e)}static numberSymbols(e){return new _(e)}static timePattern(e){return new F(e)}static timePatterns(e){return new T(e)}static typeFace(e){return new O(e)}static typeFaces(e){return new P(e)}}t.LocaleSetNamespace=I},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureNamespace=void 0;var n=r(79),a=r(77);const i=n.NamespaceIds.signature.id;class s extends a.XFAObject{constructor(e){super(i,"signature",!0)}}class o{static[n.$buildXFAObject](e,t){if(o.hasOwnProperty(e))return o[e](t)}static signature(e){return new s(e)}}t.SignatureNamespace=o},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StylesheetNamespace=void 0;var n=r(79),a=r(77);const i=n.NamespaceIds.stylesheet.id;class s extends a.XFAObject{constructor(e){super(i,"stylesheet",!0)}}class o{static[n.$buildXFAObject](e,t){if(o.hasOwnProperty(e))return o[e](t)}static stylesheet(e){return new s(e)}}t.StylesheetNamespace=o},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XdpNamespace=void 0;var n=r(79),a=r(77);const i=n.NamespaceIds.xdp.id;class s extends a.XFAObject{constructor(e){super(i,"xdp",!0),this.uuid=e.uuid||"",this.timeStamp=e.timeStamp||"",this.config=null,this.connectionSet=null,this.datasets=null,this.localeSet=null,this.stylesheet=new a.XFAObjectArray,this.template=null}[a.$onChildCheck](e){const t=n.NamespaceIds[e[a.$nodeName]];return t&&e[a.$namespaceId]===t.id}}class o{static[n.$buildXFAObject](e,t){if(o.hasOwnProperty(e))return o[e](t)}static xdp(e){return new s(e)}}t.XdpNamespace=o},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XhtmlNamespace=void 0;var n=r(77),a=r(79),i=r(84),s=r(78);const o=a.NamespaceIds.xhtml.id,c=Symbol(),l=new Set(["color","font","font-family","font-size","font-stretch","font-style","font-weight","margin","margin-bottom","margin-left","margin-right","margin-top","letter-spacing","line-height","orphans","page-break-after","page-break-before","page-break-inside","tab-interval","tab-stop","text-align","text-decoration","text-indent","vertical-align","widows","kerning-mode","xfa-font-horizontal-scale","xfa-font-vertical-scale","xfa-spacerun","xfa-tab-stops"]),h=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",e=>"none"===e?"none":"normal"],["xfa-font-horizontal-scale",e=>`scaleX(${Math.max(0,Math.min(parseInt(e)/100)).toFixed(2)})`],["xfa-font-vertical-scale",e=>`scaleY(${Math.max(0,Math.min(parseInt(e)/100)).toFixed(2)})`],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(e,t)=>(e=t.fontSize=(0,s.getMeasurement)(e),(0,i.measureToString)(.99*e))],["letter-spacing",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["line-height",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["margin",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["margin-bottom",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["margin-left",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["margin-right",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["margin-top",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["text-indent",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["font-family",e=>e],["vertical-align",e=>(0,i.measureToString)((0,s.getMeasurement)(e))]]),u=/\s+/g,d=/[\r\n]+/g,f=/\r\n?/g;function p(e,t,r){const a=Object.create(null);if(!e)return a;const o=Object.create(null);for(const[t,r]of e.split(";").map((e=>e.split(":",2)))){const e=h.get(t);if(""===e)continue;let n=r;e&&(n="string"==typeof e?e:e(r,o)),t.endsWith("scale")?a.transform=a.transform?`${a[t]} ${n}`:n:a[t.replaceAll(/-([a-zA-Z])/g,((e,t)=>t.toUpperCase()))]=n}if(a.fontFamily&&(0,i.setFontFamily)({typeface:a.fontFamily,weight:a.fontWeight||"normal",posture:a.fontStyle||"normal",size:o.fontSize||0},t,t[n.$globalData].fontFinder,a),r&&a.verticalAlign&&"0px"!==a.verticalAlign&&a.fontSize){const e=.583,t=.333,r=(0,s.getMeasurement)(a.fontSize);a.fontSize=(0,i.measureToString)(r*e),a.verticalAlign=(0,i.measureToString)(Math.sign((0,s.getMeasurement)(a.verticalAlign))*r*t)}return r&&a.fontSize&&(a.fontSize=`calc(${a.fontSize} * var(--scale-factor))`),(0,i.fixTextIndent)(a),a}const g=new Set(["body","html"]);class m extends n.XmlObject{constructor(e,t){super(o,t),this[c]=!1,this.style=e.style||""}[n.$clean](e){var t;super[n.$clean](e),this.style=(t=this).style?t.style.trim().split(/\s*;\s*/).filter((e=>!!e)).map((e=>e.split(/\s*:\s*/,2))).filter((([e,r])=>("font-family"===e&&t[n.$globalData].usedTypefaces.add(r),l.has(e)))).map((e=>e.join(":"))).join(";"):""}[n.$acceptWhitespace](){return!g.has(this[n.$nodeName])}[n.$onText](e,t=!1){t?this[c]=!0:(e=e.replace(d,""),this.style.includes("xfa-spacerun:yes")||(e=e.replace(u," "))),e&&(this[n.$content]+=e)}[n.$pushGlyphs](e,t=!0){const r=Object.create(null),a={top:NaN,bottom:NaN,left:NaN,right:NaN};let i=null;for(const[e,t]of this.style.split(";").map((e=>e.split(":",2))))switch(e){case"font-family":r.typeface=(0,s.stripQuotes)(t);break;case"font-size":r.size=(0,s.getMeasurement)(t);break;case"font-weight":r.weight=t;break;case"font-style":r.posture=t;break;case"letter-spacing":r.letterSpacing=(0,s.getMeasurement)(t);break;case"margin":const e=t.split(/ \t/).map((e=>(0,s.getMeasurement)(e)));switch(e.length){case 1:a.top=a.bottom=a.left=a.right=e[0];break;case 2:a.top=a.bottom=e[0],a.left=a.right=e[1];break;case 3:a.top=e[0],a.bottom=e[2],a.left=a.right=e[1];break;case 4:a.top=e[0],a.left=e[1],a.bottom=e[2],a.right=e[3]}break;case"margin-top":a.top=(0,s.getMeasurement)(t);break;case"margin-bottom":a.bottom=(0,s.getMeasurement)(t);break;case"margin-left":a.left=(0,s.getMeasurement)(t);break;case"margin-right":a.right=(0,s.getMeasurement)(t);break;case"line-height":i=(0,s.getMeasurement)(t)}if(e.pushData(r,a,i),this[n.$content])e.addString(this[n.$content]);else for(const t of this[n.$getChildren]())"#text"!==t[n.$nodeName]?t[n.$pushGlyphs](e):e.addString(t[n.$content]);t&&e.popFont()}[n.$toHTML](e){const t=[];if(this[n.$extra]={children:t},this[n.$childrenToHTML]({}),0===t.length&&!this[n.$content])return s.HTMLResult.EMPTY;let r;return r=this[c]?this[n.$content]?this[n.$content].replace(f,"\n"):void 0:this[n.$content]||void 0,s.HTMLResult.success({name:this[n.$nodeName],attributes:{href:this.href,style:p(this.style,this,this[c])},children:t,value:r})}}class b extends m{constructor(e){super(e,"a"),this.href=(0,i.fixURL)(e.href)||""}}class y extends m{constructor(e){super(e,"b")}[n.$pushGlyphs](e){e.pushFont({weight:"bold"}),super[n.$pushGlyphs](e),e.popFont()}}class w extends m{constructor(e){super(e,"body")}[n.$toHTML](e){const t=super[n.$toHTML](e),{html:r}=t;return r?(r.name="div",r.attributes.class=["xfaRich"],t):s.HTMLResult.EMPTY}}class v extends m{constructor(e){super(e,"br")}[n.$text](){return"\n"}[n.$pushGlyphs](e){e.addString("\n")}[n.$toHTML](e){return s.HTMLResult.success({name:"br"})}}class S extends m{constructor(e){super(e,"html")}[n.$toHTML](e){const t=[];if(this[n.$extra]={children:t},this[n.$childrenToHTML]({}),0===t.length)return s.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[n.$content]||""});if(1===t.length){const e=t[0];if(e.attributes&&e.attributes.class.includes("xfaRich"))return s.HTMLResult.success(e)}return s.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:t})}}class x extends m{constructor(e){super(e,"i")}[n.$pushGlyphs](e){e.pushFont({posture:"italic"}),super[n.$pushGlyphs](e),e.popFont()}}class A extends m{constructor(e){super(e,"li")}}class k extends m{constructor(e){super(e,"ol")}}class C extends m{constructor(e){super(e,"p")}[n.$pushGlyphs](e){super[n.$pushGlyphs](e,!1),e.addString("\n"),e.addPara(),e.popFont()}[n.$text](){return this[n.$getParent]()[n.$getChildren]().at(-1)===this?super[n.$text]():super[n.$text]()+"\n"}}class _ extends m{constructor(e){super(e,"span")}}class F extends m{constructor(e){super(e,"sub")}}class T extends m{constructor(e){super(e,"sup")}}class O extends m{constructor(e){super(e,"ul")}}class P{static[a.$buildXFAObject](e,t){if(P.hasOwnProperty(e))return P[e](t)}static a(e){return new b(e)}static b(e){return new y(e)}static body(e){return new w(e)}static br(e){return new v(e)}static html(e){return new S(e)}static i(e){return new x(e)}static li(e){return new A(e)}static ol(e){return new k(e)}static p(e){return new C(e)}static span(e){return new _(e)}static sub(e){return new F(e)}static sup(e){return new T(e)}static ul(e){return new O(e)}}t.XhtmlNamespace=P},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownNamespace=void 0;var n=r(79),a=r(77);t.UnknownNamespace=class{constructor(e){this.namespaceId=e}[n.$buildXFAObject](e,t){return new a.XmlObject(this.namespaceId,e,t)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DatasetReader=void 0;var n=r(2),a=r(6),i=r(66);function s(e){try{return(0,n.stringToUTF8String)(e)}catch(t){return(0,n.warn)(`UTF-8 decoding failed: "${t}".`),e}}class o extends i.SimpleXMLParser{constructor(e){super(e),this.node=null}onEndElement(e){const t=super.onEndElement(e);if(t&&"xfa:datasets"===e)throw this.node=t,Error("Aborting DatasetXMLParser.")}}t.DatasetReader=class{constructor(e){if(e.datasets)this.node=new i.SimpleXMLParser({hasAttributes:!0}).parseFromString(e.datasets).documentElement;else{const t=new o({hasAttributes:!0});try{t.parseFromString(e["xdp:xdp"])}catch(e){}this.node=t.node}}getValue(e){if(!this.node||!e)return"";const t=this.node.searchNode((0,a.parseXFAPath)(e),0);if(!t)return"";const r=t.firstChild;return r&&"value"===r.nodeName?t.children.map((e=>s(e.textContent))):s(t.textContent)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XRef=void 0;var n=r(2),a=r(5),i=r(6),s=r(17),o=r(7),c=r(67);t.XRef=class{constructor(e,t){this.stream=e,this.pdfManager=t,this.entries=[],this.xrefstms=Object.create(null),this._cacheMap=new Map,this._pendingRefs=new a.RefSet,this.stats=new i.DocStats(t.msgHandler),this._newRefNum=null}getNewRef(){return null===this._newRefNum&&(this._newRefNum=this.entries.length||1),a.Ref.get(this._newRefNum++,0)}resetNewRef(){this._newRefNum=null}setStartXRef(e){this.startXRefQueue=[e]}parse(e=!1){let t,r,s;e?((0,n.warn)("Indexing all PDF objects"),t=this.indexObjects()):t=this.readXRef(),t.assignXref(this),this.trailer=t;try{r=t.get("Encrypt")}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.warn)(`XRef.parse - Invalid "Encrypt" reference: "${e}".`)}if(r instanceof a.Dict){const e=t.get("ID"),n=e&&e.length?e[0]:"";r.suppressEncryption=!0,this.encrypt=new c.CipherTransformFactory(r,n,this.pdfManager.password)}try{s=t.get("Root")}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.warn)(`XRef.parse - Invalid "Root" reference: "${e}".`)}if(s instanceof a.Dict)try{if(s.get("Pages")instanceof a.Dict)return void(this.root=s)}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.warn)(`XRef.parse - Invalid "Pages" reference: "${e}".`)}if(!e)throw new i.XRefParseException;throw new n.InvalidPDFException("Invalid Root reference.")}processXRefTable(e){"tableState"in this||(this.tableState={entryNum:0,streamPos:e.lexer.stream.pos,parserBuf1:e.buf1,parserBuf2:e.buf2});const t=this.readXRefTable(e);if(!(0,a.isCmd)(t,"trailer"))throw new n.FormatError("Invalid XRef table: could not find trailer dictionary");let r=e.getObj();if(r instanceof a.Dict||!r.dict||(r=r.dict),!(r instanceof a.Dict))throw new n.FormatError("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,r}readXRefTable(e){const t=e.lexer.stream,r=this.tableState;let i;for(t.pos=r.streamPos,e.buf1=r.parserBuf1,e.buf2=r.parserBuf2;;){if(!("firstEntryNum"in r)||!("entryCount"in r)){if((0,a.isCmd)(i=e.getObj(),"trailer"))break;r.firstEntryNum=i,r.entryCount=e.getObj()}let s=r.firstEntryNum;const o=r.entryCount;if(!Number.isInteger(s)||!Number.isInteger(o))throw new n.FormatError("Invalid XRef table: wrong types in subsection header");for(let i=r.entryNum;o>i;i++){r.streamPos=t.pos,r.entryNum=i,r.parserBuf1=e.buf1,r.parserBuf2=e.buf2;const c={};c.offset=e.getObj(),c.gen=e.getObj();const l=e.getObj();if(l instanceof a.Cmd)switch(l.cmd){case"f":c.free=!0;break;case"n":c.uncompressed=!0}if(!Number.isInteger(c.offset)||!Number.isInteger(c.gen)||!c.free&&!c.uncompressed)throw new n.FormatError(`Invalid entry in XRef subsection: ${s}, ${o}`);0===i&&c.free&&1===s&&(s=0),this.entries[i+s]||(this.entries[i+s]=c)}r.entryNum=0,r.streamPos=t.pos,r.parserBuf1=e.buf1,r.parserBuf2=e.buf2,delete r.firstEntryNum,delete r.entryCount}if(this.entries[0]&&!this.entries[0].free)throw new n.FormatError("Invalid XRef table: unexpected first object");return i}processXRefStream(e){if(!("streamState"in this)){const t=e.dict,r=t.get("W");let n=t.get("Index");n||(n=[0,t.get("Size")]),this.streamState={entryRanges:n,byteWidths:r,entryNum:0,streamPos:e.pos}}return this.readXRefStream(e),delete this.streamState,e.dict}readXRefStream(e){const t=this.streamState;e.pos=t.streamPos;const[r,a,i]=t.byteWidths,s=t.entryRanges;for(;s.length>0;){const[o,c]=s;if(!Number.isInteger(o)||!Number.isInteger(c))throw new n.FormatError(`Invalid XRef range fields: ${o}, ${c}`);if(!Number.isInteger(r)||!Number.isInteger(a)||!Number.isInteger(i))throw new n.FormatError(`Invalid XRef entry fields length: ${o}, ${c}`);for(let s=t.entryNum;c>s;++s){t.entryNum=s,t.streamPos=e.pos;let c=0,l=0,h=0;for(let t=0;r>t;++t){const t=e.getByte();if(-1===t)throw new n.FormatError("Invalid XRef byteWidths 'type'.");c=c<<8|t}0===r&&(c=1);for(let t=0;a>t;++t){const t=e.getByte();if(-1===t)throw new n.FormatError("Invalid XRef byteWidths 'offset'.");l=l<<8|t}for(let t=0;i>t;++t){const t=e.getByte();if(-1===t)throw new n.FormatError("Invalid XRef byteWidths 'generation'.");h=h<<8|t}const u={};switch(u.offset=l,u.gen=h,c){case 0:u.free=!0;break;case 1:u.uncompressed=!0;break;case 2:break;default:throw new n.FormatError("Invalid XRef entry type: "+c)}this.entries[o+s]||(this.entries[o+s]=u)}t.entryNum=0,t.streamPos=e.pos,s.splice(0,2)}}indexObjects(){function e(e,t){let r="",n=e[t];for(;10!==n&&13!==n&&60!==n&&++t<e.length;)r+=String.fromCharCode(n),n=e[t];return r}function t(e,t,r){const n=r.length,a=e.length;let i=0;for(;a>t;){let a=0;for(;n>a&&e[t+a]===r[a];)++a;if(a>=n)break;t++,i++}return i}const r=/^(\d+)\s+(\d+)\s+obj\b/,o=/\bendobj[\b\s]$/,c=/\s+(\d+\s+\d+\s+obj[\b\s<])$/,l=new Uint8Array([116,114,97,105,108,101,114]),h=new Uint8Array([115,116,97,114,116,120,114,101,102]),u=new Uint8Array([111,98,106]),d=new Uint8Array([47,88,82,101,102]);this.entries.length=0,this._cacheMap.clear();const f=this.stream;f.pos=0;const p=f.getBytes(),g=p.length;let m=f.start;const b=[],y=[];for(;g>m;){let a=p[m];if(9===a||10===a||13===a||32===a){++m;continue}if(37===a){do{if(++m,m>=g)break;a=p[m]}while(10!==a&&13!==a);continue}const w=e(p,m);let v;if(w.startsWith("xref")&&(4===w.length||/\s/.test(w[4])))m+=t(p,m,l),b.push(m),m+=t(p,m,h);else if(v=r.exec(w)){const e=0|v[1],r=0|v[2];let a,l=m+w.length,h=!1;if(this.entries[e]){if(this.entries[e].gen===r)try{new s.Parser({lexer:new s.Lexer(f.makeSubStream(l))}).getObj(),h=!0}catch(e){e instanceof i.ParserEOFException?(0,n.warn)(`indexObjects -- checking object (${w}): "${e}".`):h=!0}}else h=!0;for(h&&(this.entries[e]={offset:m-f.start,gen:r,uncompressed:!0});p.length>l;){const e=l+t(p,l,u)+4;a=e-m;const r=(0,n.bytesToString)(p.subarray(Math.max(e-25,l),e));if(o.test(r))break;{const e=c.exec(r);if(e&&e[1]){(0,n.warn)('indexObjects: Found new "obj" inside of another "obj", caused by missing "endobj" -- trying to recover.'),a-=e[1].length;break}}l=e}const g=p.subarray(m,m+a),b=t(g,0,d);a>b&&64>g[b+5]&&(y.push(m-f.start),this.xrefstms[m-f.start]=1),m+=a}else w.startsWith("trailer")&&(7===w.length||/\s/.test(w[7]))?(b.push(m),m+=t(p,m,h)):m+=w.length+1}for(let e=0,t=y.length;t>e;++e)this.startXRefQueue.push(y[e]),this.readXRef(!0);let w;for(let e=0,t=b.length;t>e;++e){f.pos=b[e];const t=new s.Parser({lexer:new s.Lexer(f),xref:this,allowStreams:!0,recoveryMode:!0}),r=t.getObj();if(!(0,a.isCmd)(r,"trailer"))continue;const n=t.getObj();if(n instanceof a.Dict){try{const e=n.get("Root");if(!(e instanceof a.Dict))continue;const t=e.get("Pages");if(!(t instanceof a.Dict))continue;const r=t.get("Count");if(!Number.isInteger(r))continue}catch(e){continue}if(n.has("ID"))return n;w=n}}if(w)return w;if(this.topDict)return this.topDict;throw new n.InvalidPDFException("Invalid PDF structure.")}readXRef(e=!1){const t=this.stream,r=new Set;try{for(;this.startXRefQueue.length;){const e=this.startXRefQueue[0];if(r.has(e)){(0,n.warn)("readXRef - skipping XRef table since it was already parsed."),this.startXRefQueue.shift();continue}r.add(e),t.pos=e+t.start;const i=new s.Parser({lexer:new s.Lexer(t),xref:this,allowStreams:!0});let c,l=i.getObj();if((0,a.isCmd)(l,"xref")){if(c=this.processXRefTable(i),this.topDict||(this.topDict=c),l=c.get("XRefStm"),Number.isInteger(l)){const e=l;e in this.xrefstms||(this.xrefstms[e]=1,this.startXRefQueue.push(e))}}else{if(!Number.isInteger(l))throw new n.FormatError("Invalid XRef stream header");if(!(Number.isInteger(i.getObj())&&(0,a.isCmd)(i.getObj(),"obj")&&(l=i.getObj())instanceof o.BaseStream))throw new n.FormatError("Invalid XRef stream");if(c=this.processXRefStream(l),this.topDict||(this.topDict=c),!c)throw new n.FormatError("Failed to read XRef stream")}l=c.get("Prev"),Number.isInteger(l)?this.startXRefQueue.push(l):l instanceof a.Ref&&this.startXRefQueue.push(l.num),this.startXRefQueue.shift()}return this.topDict}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.info)("(while reading XRef): "+e),this.startXRefQueue.shift()}if(!e)throw new i.XRefParseException}getEntry(e){const t=this.entries[e];return t&&!t.free&&t.offset?t:null}fetchIfRef(e,t=!1){return e instanceof a.Ref?this.fetch(e,t):e}fetch(e,t=!1){if(!(e instanceof a.Ref))throw Error("ref object is not a reference");const r=e.num,i=this._cacheMap.get(r);if(void 0!==i)return i instanceof a.Dict&&!i.objId&&(i.objId=""+e),i;let s=this.getEntry(r);if(null===s)return this._cacheMap.set(r,s),s;if(this._pendingRefs.has(e))return this._pendingRefs.remove(e),(0,n.warn)(`Ignoring circular reference: ${e}.`),a.CIRCULAR_REF;this._pendingRefs.put(e);try{s=s.uncompressed?this.fetchUncompressed(e,s,t):this.fetchCompressed(e,s,t),this._pendingRefs.remove(e)}catch(t){throw this._pendingRefs.remove(e),t}return s instanceof a.Dict?s.objId=""+e:s instanceof o.BaseStream&&(s.dict.objId=""+e),s}fetchUncompressed(e,t,r=!1){const n=e.gen;let c=e.num;if(t.gen!==n)throw new i.XRefEntryException("Inconsistent generation in XRef: "+e);const l=this.stream.makeSubStream(t.offset+this.stream.start),h=new s.Parser({lexer:new s.Lexer(l),xref:this,allowStreams:!0}),u=h.getObj(),d=h.getObj(),f=h.getObj();if(u!==c||d!==n||!(f instanceof a.Cmd))throw new i.XRefEntryException("Bad (uncompressed) XRef entry: "+e);if("obj"!==f.cmd){if(f.cmd.startsWith("obj")&&(c=parseInt(f.cmd.substring(3),10),!Number.isNaN(c)))return c;throw new i.XRefEntryException("Bad (uncompressed) XRef entry: "+e)}return(t=this.encrypt&&!r?h.getObj(this.encrypt.createCipherTransform(c,n)):h.getObj())instanceof o.BaseStream||this._cacheMap.set(c,t),t}fetchCompressed(e,t,r=!1){const c=t.offset,l=this.fetch(a.Ref.get(c,0));if(!(l instanceof o.BaseStream))throw new n.FormatError("bad ObjStm stream");const h=l.dict.get("First"),u=l.dict.get("N");if(!Number.isInteger(h)||!Number.isInteger(u))throw new n.FormatError("invalid first and n parameters for ObjStm stream");let d=new s.Parser({lexer:new s.Lexer(l),xref:this,allowStreams:!0});const f=Array(u),p=Array(u);for(let e=0;u>e;++e){const t=d.getObj();if(!Number.isInteger(t))throw new n.FormatError("invalid object number in the ObjStm stream: "+t);const r=d.getObj();if(!Number.isInteger(r))throw new n.FormatError("invalid object offset in the ObjStm stream: "+r);f[e]=t,p[e]=r}const g=(l.start||0)+h,m=Array(u);for(let e=0;u>e;++e){const t=u-1>e?p[e+1]-p[e]:void 0;if(0>t)throw new n.FormatError("Invalid offset in the ObjStm stream.");d=new s.Parser({lexer:new s.Lexer(l.makeSubStream(g+p[e],t,l.dict)),xref:this,allowStreams:!0});const r=d.getObj();if(m[e]=r,r instanceof o.BaseStream)continue;const a=f[e],i=this.entries[a];i&&i.offset===c&&i.gen===e&&this._cacheMap.set(a,r)}if(void 0===(t=m[t.gen]))throw new i.XRefEntryException("Bad (compressed) XRef entry: "+e);return t}async fetchIfRefAsync(e,t){return e instanceof a.Ref?this.fetchAsync(e,t):e}async fetchAsync(e,t){try{return this.fetch(e,t)}catch(r){if(!(r instanceof i.MissingDataException))throw r;return await this.pdfManager.requestRange(r.begin,r.end),this.fetchAsync(e,t)}}getCatalogObj(){return this.root}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n=r(2);const a=1,i=2,s=1,o=2,c=3,l=4,h=5,u=6,d=7,f=8;function p(e){switch(e instanceof Error||"object"==typeof e&&null!==e||(0,n.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new n.AbortException(e.message);case"MissingPDFException":return new n.MissingPDFException(e.message);case"PasswordException":return new n.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new n.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new n.UnknownErrorException(e.message,e.details);default:return new n.UnknownErrorException(e.message,""+e)}}t.MessageHandler=class{constructor(e,t,r){this.sourceName=e,this.targetName=t,this.comObj=r,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=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void this._processStreamMessage(t);if(t.callback){const e=t.callbackId,r=this.callbackCapabilities[e];if(!r)throw Error("Cannot resolve callback "+e);if(delete this.callbackCapabilities[e],t.callback===a)r.resolve(t.data);else{if(t.callback!==i)throw Error("Unexpected callback case");r.reject(p(t.reason))}return}const n=this.actionHandler[t.action];if(!n)throw Error("Unknown action from worker: "+t.action);if(t.callbackId){const e=this.sourceName,s=t.sourceName;new Promise((function(e){e(n(t.data))})).then((function(n){r.postMessage({sourceName:e,targetName:s,callback:a,callbackId:t.callbackId,data:n})}),(function(n){r.postMessage({sourceName:e,targetName:s,callback:i,callbackId:t.callbackId,reason:p(n)})}))}else t.streamId?this._createStreamSink(t):n(t.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,t){const r=this.actionHandler;if(r[e])throw Error(`There is already an actionName called "${e}"`);r[e]=t}send(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}sendWithPromise(e,t,r){const a=this.callbackId++,i=(0,n.createPromiseCapability)();this.callbackCapabilities[a]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:a,data:t},r)}catch(e){i.reject(e)}return i.promise}sendWithStream(e,t,r,a){const i=this.streamId++,o=this.sourceName,c=this.targetName,l=this.comObj;return new ReadableStream({start:r=>{const s=(0,n.createPromiseCapability)();return this.streamControllers[i]={controller:r,startCall:s,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:o,targetName:c,action:e,streamId:i,data:t,desiredSize:r.desiredSize},a),s.promise},pull:e=>{const t=(0,n.createPromiseCapability)();return this.streamControllers[i].pullCall=t,l.postMessage({sourceName:o,targetName:c,stream:u,streamId:i,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,n.assert)(e instanceof Error,"cancel must have a valid reason");const t=(0,n.createPromiseCapability)();return this.streamControllers[i].cancelCall=t,this.streamControllers[i].isClosed=!0,l.postMessage({sourceName:o,targetName:c,stream:s,streamId:i,reason:p(e)}),t.promise}},r)}_createStreamSink(e){const t=e.streamId,r=this.sourceName,a=e.sourceName,i=this.comObj,s=this,o=this.actionHandler[e.action],u={enqueue(e,s=1,o){if(this.isCancelled)return;const c=this.desiredSize;this.desiredSize-=s,c>0&&0>=this.desiredSize&&(this.sinkCapability=(0,n.createPromiseCapability)(),this.ready=this.sinkCapability.promise),i.postMessage({sourceName:r,targetName:a,stream:l,streamId:t,chunk:e},o)},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:a,stream:c,streamId:t}),delete s.streamSinks[t])},error(e){(0,n.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:a,stream:h,streamId:t,reason:p(e)}))},sinkCapability:(0,n.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(o(e.data,u))})).then((function(){i.postMessage({sourceName:r,targetName:a,stream:f,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:r,targetName:a,stream:f,streamId:t,reason:p(e)})}))}_processStreamMessage(e){const t=e.streamId,r=this.sourceName,a=e.sourceName,i=this.comObj,g=this.streamControllers[t],m=this.streamSinks[t];switch(e.stream){case f:e.success?g.startCall.resolve():g.startCall.reject(p(e.reason));break;case d:e.success?g.pullCall.resolve():g.pullCall.reject(p(e.reason));break;case u:if(!m){i.postMessage({sourceName:r,targetName:a,stream:d,streamId:t,success:!0});break}0>=m.desiredSize&&e.desiredSize>0&&m.sinkCapability.resolve(),m.desiredSize=e.desiredSize,new Promise((function(e){e(m.onPull&&m.onPull())})).then((function(){i.postMessage({sourceName:r,targetName:a,stream:d,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:r,targetName:a,stream:d,streamId:t,reason:p(e)})}));break;case l:if((0,n.assert)(g,"enqueue should have stream controller"),g.isClosed)break;g.controller.enqueue(e.chunk);break;case c:if((0,n.assert)(g,"close should have stream controller"),g.isClosed)break;g.isClosed=!0,g.controller.close(),this._deleteStreamController(g,t);break;case h:(0,n.assert)(g,"error should have stream controller"),g.controller.error(p(e.reason)),this._deleteStreamController(g,t);break;case o:e.success?g.cancelCall.resolve():g.cancelCall.reject(p(e.reason)),this._deleteStreamController(g,t);break;case s:if(!m)break;new Promise((function(t){t(m.onCancel&&m.onCancel(p(e.reason)))})).then((function(){i.postMessage({sourceName:r,targetName:a,stream:o,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:r,targetName:a,stream:o,streamId:t,reason:p(e)})})),m.sinkCapability.reject(p(e.reason)),m.isCancelled=!0,delete this.streamSinks[t];break;default:throw Error("Unexpected stream case")}}async _deleteStreamController(e,t){await Promise.allSettled([e.startCall&&e.startCall.promise,e.pullCall&&e.pullCall.promise,e.cancelCall&&e.cancelCall.promise]),delete this.streamControllers[t]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFWorkerStream=void 0;var n=r(2);t.PDFWorkerStream=class{constructor(e){this._msgHandler=e,this._contentLength=null,this._fullRequestReader=null,this._rangeRequestReaders=[]}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be called once."),this._fullRequestReader=new a(this._msgHandler),this._fullRequestReader}getRangeReader(e,t){const r=new i(e,t,this._msgHandler);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class a{constructor(e){this._msgHandler=e,this.onProgress=null,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;const t=this._msgHandler.sendWithStream("GetReader");this._reader=t.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then((e=>{this._isStreamingSupported=e.isStreamingSupported,this._isRangeSupported=e.isRangeSupported,this._contentLength=e.contentLength}))}get headersReady(){return this._headersReady}get contentLength(){return this._contentLength}get isStreamingSupported(){return this._isStreamingSupported}get isRangeSupported(){return this._isRangeSupported}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}class i{constructor(e,t,r){this._msgHandler=r,this.onProgress=null;const n=this._msgHandler.sendWithStream("GetRangeReader",{begin:e,end:t});this._reader=n.getReader()}get isStreamingSupported(){return!1}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}}],t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"WorkerMessageHandler",{enumerable:!0,get:function(){return t.WorkerMessageHandler}});var t=r(1)})(),n})(),pdf_worker.exports=factory();var pdf_workerExports=pdf_worker.exports;("undefined"!=typeof window?window:{}).pdfjsWorker=pdf_workerExports,pdfExports.GlobalWorkerOptions.workerSrc=window.pdfjsWorker;var PdfPlugin=function(){return _createClass((function e(){_classCallCheck(this,e)}),null,[{key:"getDevicePixelRatio",value:function(){return window.devicePixelRatio||1}},{key:"loadPdf",value:function(e,t){var r=this,n=Date.now();return pdfExports.getDocument({url:e,cMapUrl:"https://cdn.jsdelivr.net/npm/pdfjs-dist@2.16.105/cmaps/",cMapPacked:!0}).promise.then(function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(a){var i;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Date.now(),Log.logInfo("PdfPlugin.fetch Pdf resource cost",i-n,t.docId,t.name),t.pdfViewer.totalHeight=0,e.abrupt("return",r.preparePdfPage(a,t,0,t.width).then((function(){Log.logInfo("PdfPlugin.load Pdf cost",Date.now()-i,t.docId,t.name)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},{key:"preparePdfPage",value:function(e,t,r,n){var a=this;Log.logInfo("PdfPlugin.preparePdfPage");var i=e.numPages;if(r>=i)return Promise.resolve();var s=t.pdfViewer.domRef;return e.getPage(r+1).then((function(e){var a;e.cleanupAfterRender=!0;var o=e.getViewport({scale:2}),c=n*o.height/o.width;t.pdfViewer.totalHeight+=c;var l=document.createElement("div");l.className="dingrtc-pdf-viewer__page",0===r&&(s.innerHTML=""),s.appendChild(l),l.setAttribute("data-i","".concat(r+1,"/").concat(i));var h=document.createElement("img");h.style.width="".concat(n,"px"),h.style.height="".concat(c,"px"),l.style.width="".concat(n,"px"),l.style.height="".concat(c,"px");var u=parseFloat((null===(a=t.pdfViewer.pdfPages.get(r-1))||void 0===a?void 0:a.domRef.getAttribute("data-h"))||"")||0;h.setAttribute("data-w","".concat(n)),h.setAttribute("data-h","".concat(c)),h.setAttribute("data-t","".concat(u)),l.style.top="".concat(u,"px"),l.setAttribute("data-h","".concat(u+c));var d=createSkeleton();l.appendChild(d),t.pdfViewer.pdfPages.set(r,{viewport:o,pdfProxy:e,domRef:l,skeleton:d,img:h,rendered:!1,top:u,rendering:!1}),t.pdfViewer.pageHightList.push((t.pdfViewer.pageHightList[r-1]||0)+c)})).then((function(){return a.preparePdfPage(e,t,r+1,n)})).catch((function(){return Log.logError("RtcWhiteboard.handlePdfResource preparePdfPage failed",t.docId,t.name,r),a.preparePdfPage(e,t,r+1,n)}))}},{key:"updatePdfWidth",value:function(e,t){var r;Log.logError("RtcWhiteboard.updatePdfWidth",t,e.docId,e.name),e.pdfViewer.width=t,e.pdfViewer.totalHeight=0;var n=t/e.width;null===(r=e.pdfViewer)||void 0===r||r.pdfPages.forEach((function(r){var a=r.img,i=r.domRef,s=parseFloat(a.getAttribute("data-h")||"")*n;e.pdfViewer.totalHeight+=s,a.style.width="".concat(t,"px"),a.style.height="".concat(s,"px"),i.style.width="".concat(t,"px"),i.style.height="".concat(s,"px");var o=parseFloat(a.getAttribute("data-t")||"")*n;a.setAttribute("data-w","".concat(t)),a.setAttribute("data-h","".concat(s)),a.setAttribute("data-t","".concat(o)),i.style.top="".concat(o,"px"),i.setAttribute("data-h","".concat(o+s))}))}}])}();export{PdfPlugin,PdfPlugin as default};