Some checks failed
Automated Container Build / build-and-push (push) Failing after 8s
31 lines
No EOL
104 KiB
JavaScript
31 lines
No EOL
104 KiB
JavaScript
/**
|
||
* @licstart The following is the entire license notice for the
|
||
* JavaScript code in this page
|
||
*
|
||
* Copyright 2024 Mozilla Foundation
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*
|
||
* @licend The above is the entire license notice for the
|
||
* JavaScript code in this page
|
||
*/
|
||
/**
|
||
* pdfjsVersion = 5.7.284
|
||
* pdfjsBuild = 7e5b36c2d
|
||
*/var t={9306(t,e,r){var n=r(4901),o=r(6823),a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(o(t)+" is not a function")}},3506(t,e,r){var n=r(3925),o=String,a=TypeError;t.exports=function(t){if(n(t))return t;throw new a("Can't set "+o(t)+" as a prototype")}},7080(t,e,r){var n=r(4402).has;t.exports=function(t){n(t);return t}},3463(t){var e=TypeError;t.exports=function(t){if("string"==typeof t)return t;throw new e("Argument is not a string")}},6469(t,e,r){var n=r(8227),o=r(2360),a=r(4913).f,i=n("unscopables"),s=Array.prototype;void 0===s[i]&&a(s,i,{configurable:!0,value:o(null)});t.exports=function(t){s[i][t]=!0}},679(t,e,r){var n=r(1625),o=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new o("Incorrect invocation")}},3972(t,e,r){var n=r(34),o=String,a=TypeError;t.exports=function(t){if(void 0===t||n(t))return t;throw new a(o(t)+" is not an object or undefined")}},8551(t,e,r){var n=r(34),o=String,a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(o(t)+" is not an object")}},4154(t,e,r){var n=r(6955),o=TypeError;t.exports=function(t){if("Uint8Array"===n(t))return t;throw new o("Argument is not an Uint8Array")}},7811(t){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7394(t,e,r){var n=r(4576),o=r(6706),a=r(2195),i=n.ArrayBuffer,s=n.TypeError;t.exports=i&&o(i.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==a(t))throw new s("ArrayBuffer expected");return t.byteLength}},3238(t,e,r){var n=r(4576),o=r(7811),a=r(7394),i=n.DataView;t.exports=function(t){if(!o||0!==a(t))return!1;try{new i(t);return!1}catch(t){return!0}}},5169(t,e,r){var n=r(3238),o=TypeError;t.exports=function(t){if(n(t))throw new o("ArrayBuffer is detached");return t}},5636(t,e,r){var n=r(4576),o=r(9504),a=r(6706),i=r(7696),s=r(5169),c=r(7394),u=r(4483),f=r(1548),l=n.structuredClone,h=n.ArrayBuffer,p=n.DataView,m=Math.max,g=Math.min,d=h.prototype,y=p.prototype,b=o(d.slice),w=a(d,"resizable","get"),v=a(d,"maxByteLength","get"),_=o(y.getInt8),x=o(y.setInt8);t.exports=(f||u)&&function(t,e,r){var n,o=c(t),a=void 0===e?o:i(e),d=!w||!w(t);s(t);if(f){t=l(t,{transfer:[t]});if(o===a&&(r||d))return t}if(o>=a&&(!r||d))n=b(t,0,a);else{var y=r&&!d&&v?{maxByteLength:m(a,v(t))}:void 0;n=new h(a,y);for(var C=new p(t),A=new p(n),S=g(a,o),R=0;R<S;R++)x(A,R,_(C,R))}f||u(t);return n}},4644(t,e,r){var n,o,a,i=r(7811),s=r(3724),c=r(4576),u=r(4901),f=r(34),l=r(9297),h=r(6955),p=r(6823),m=r(6699),g=r(6840),d=r(2106),y=r(1625),b=r(2787),w=r(2967),v=r(8227),_=r(3392),x=r(1181),C=x.enforce,A=x.get,S=c.Int8Array,R=S&&S.prototype,B=c.Uint8ClampedArray,I=B&&B.prototype,k=S&&b(S),E=R&&b(R),M=Object.prototype,D=c.TypeError,T=v("toStringTag"),O=_("TYPED_ARRAY_TAG"),P="TypedArrayConstructor",U=i&&!!w&&"Opera"!==h(c.opera),L=!1,G={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},j={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(t){var e=b(t);if(f(e)){var r=A(e);return r&&l(r,P)?r[P]:getTypedArrayConstructor(e)}},isTypedArray=function(t){if(!f(t))return!1;var e=h(t);return l(G,e)||l(j,e)};for(n in G)(a=(o=c[n])&&o.prototype)?C(a)[P]=o:U=!1;for(n in j)(a=(o=c[n])&&o.prototype)&&(C(a)[P]=o);if(!U||!u(k)||k===Function.prototype){k=function TypedArray(){throw new D("Incorrect invocation")};if(U)for(n in G)c[n]&&w(c[n],k)}if(!U||!E||E===M){E=k.prototype;if(U)for(n in G)c[n]&&w(c[n].prototype,E)}U&&b(I)!==E&&w(I,E);if(s&&!l(E,T)){L=!0;d(E,T,{configurable:!0,get:function(){return f(this)?this[O]:void 0}});for(n in G)c[n]&&m(c[n].prototype,O,n)}t.exports={NATIVE_ARRAY_BUFFER_VIEWS:U,TYPED_ARRAY_TAG:L&&O,aTypedArray:function(t){if(isTypedArray(t))return t;throw new D("Target is not a typed array")},aTypedArrayConstructor:function(t){if(u(t)&&(!w||y(k,t)))return t;throw new D(p(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(s){if(r)for(var o in G){var a=c[o];if(a&&l(a.prototype,t))try{delete a.prototype[t]}catch(r){try{a.prototype[t]=e}catch(t){}}}E[t]&&!r||g(E,t,r?e:U&&R[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,o;if(s){if(w){if(r)for(n in G)if((o=c[n])&&l(o,t))try{delete o[t]}catch(t){}if(k[t]&&!r)return;try{return g(k,t,r?e:U&&k[t]||e)}catch(t){}}for(n in G)!(o=c[n])||o[t]&&!r||g(o,t,e)}},getTypedArrayConstructor,isView:function isView(t){if(!f(t))return!1;var e=h(t);return"DataView"===e||l(G,e)||l(j,e)},isTypedArray,TypedArray:k,TypedArrayPrototype:E}},9617(t,e,r){var n=r(5397),o=r(5610),a=r(6198),createMethod=function(t){return function(e,r,i){var s=n(e),c=a(s);if(0===c)return!t&&-1;var u,f=o(i,c);if(t&&r!=r){for(;c>f;)if((u=s[f++])!=u)return!0}else for(;c>f;f++)if((t||f in s)&&s[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},4527(t,e,r){var n=r(3724),o=r(4376),a=TypeError,i=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(o(t)&&!i(t,"length").writable)throw new a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},2804(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=e+"+/",n=e+"-_",inverse=function(t){for(var e={},r=0;r<64;r++)e[t.charAt(r)]=r;return e};t.exports={i2c:r,c2i:inverse(r),i2cUrl:n,c2iUrl:inverse(n)}},6319(t,e,r){var n=r(8551),o=r(9539);t.exports=function(t,e,r,a){try{return a?e(n(r)[0],r[1]):e(r)}catch(e){o(t,"throw",e)}}},2195(t,e,r){var n=r(9504),o=n({}.toString),a=n("".slice);t.exports=function(t){return a(o(t),8,-1)}},6955(t,e,r){var n=r(2140),o=r(4901),a=r(2195),i=r(8227)("toStringTag"),s=Object,c="Arguments"===a(function(){return arguments}());t.exports=n?a:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),i))?r:c?a(e):"Object"===(n=a(e))&&o(e.callee)?"Arguments":n}},7740(t,e,r){var n=r(9297),o=r(5031),a=r(7347),i=r(4913);t.exports=function(t,e,r){for(var s=o(e),c=i.f,u=a.f,f=0;f<s.length;f++){var l=s[f];n(t,l)||r&&n(r,l)||c(t,l,u(e,l))}}},2211(t,e,r){var n=r(9039);t.exports=!n(function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype})},2529(t){t.exports=function(t,e){return{value:t,done:e}}},6699(t,e,r){var n=r(3724),o=r(4913),a=r(6980);t.exports=n?function(t,e,r){return o.f(t,e,a(1,r))}:function(t,e,r){t[e]=r;return t}},6980(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4659(t,e,r){var n=r(3724),o=r(4913),a=r(6980);t.exports=function(t,e,r){n?o.f(t,e,a(0,r)):t[e]=r}},2106(t,e,r){var n=r(283),o=r(4913);t.exports=function(t,e,r){r.get&&n(r.get,e,{getter:!0});r.set&&n(r.set,e,{setter:!0});return o.f(t,e,r)}},6840(t,e,r){var n=r(4901),o=r(4913),a=r(283),i=r(9433);t.exports=function(t,e,r,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:e;n(r)&&a(r,u,s);if(s.global)c?t[e]=r:i(e,r);else{try{s.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=r:o.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},6279(t,e,r){var n=r(6840);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},9433(t,e,r){var n=r(4576),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},3724(t,e,r){var n=r(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4483(t,e,r){var n,o,a,i,s=r(4576),c=r(9429),u=r(1548),f=s.structuredClone,l=s.ArrayBuffer,h=s.MessageChannel,p=!1;if(u)p=function(t){f(t,{transfer:[t]})};else if(l)try{h||(n=c("worker_threads"))&&(h=n.MessageChannel);if(h){o=new h;a=new l(2);i=function(t){o.port1.postMessage(null,[t])};if(2===a.byteLength){i(a);0===a.byteLength&&(p=i)}}}catch(t){}t.exports=p},4055(t,e,r){var n=r(4576),o=r(34),a=n.document,i=o(a)&&o(a.createElement);t.exports=function(t){return i?a.createElement(t):{}}},6837(t){var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw new e("Maximum allowed index exceeded");return t}},8727(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6193(t,e,r){var n=r(4215);t.exports="NODE"===n},2839(t,e,r){var n=r(4576).navigator,o=n&&n.userAgent;t.exports=o?String(o):""},9519(t,e,r){var n,o,a=r(4576),i=r(2839),s=a.process,c=a.Deno,u=s&&s.versions||c&&c.version,f=u&&u.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1]));!o&&i&&(!(n=i.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=i.match(/Chrome\/(\d+)/))&&(o=+n[1]);t.exports=o},4215(t,e,r){var n=r(4576),o=r(2839),a=r(2195),userAgentStartsWith=function(t){return o.slice(0,t.length)===t};t.exports=userAgentStartsWith("Bun/")?"BUN":userAgentStartsWith("Cloudflare-Workers")?"CLOUDFLARE":userAgentStartsWith("Deno/")?"DENO":userAgentStartsWith("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===a(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},6518(t,e,r){var n=r(4576),o=r(7347).f,a=r(6699),i=r(6840),s=r(9433),c=r(7740),u=r(2796);t.exports=function(t,e){var r,f,l,h,p,m=t.target,g=t.global,d=t.stat;if(r=g?n:d?n[m]||s(m,{}):n[m]&&n[m].prototype)for(f in e){h=e[f];l=t.dontCallGetSet?(p=o(r,f))&&p.value:r[f];if(!u(g?f:m+(d?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;c(h,l)}(t.sham||l&&l.sham)&&a(h,"sham",!0);i(r,f,h,t)}}},9039(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},6080(t,e,r){var n=r(7476),o=r(9306),a=r(616),i=n(n.bind);t.exports=function(t,e){o(t);return void 0===e?t:a?i(t,e):function(){return t.apply(e,arguments)}}},616(t,e,r){var n=r(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},9565(t,e,r){var n=r(616),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},350(t,e,r){var n=r(3724),o=r(9297),a=Function.prototype,i=n&&Object.getOwnPropertyDescriptor,s=o(a,"name"),c=s&&"something"===function something(){}.name,u=s&&(!n||n&&i(a,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},6706(t,e,r){var n=r(9504),o=r(9306);t.exports=function(t,e,r){try{return n(o(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},7476(t,e,r){var n=r(2195),o=r(9504);t.exports=function(t){if("Function"===n(t))return o(t)}},9504(t,e,r){var n=r(616),o=Function.prototype,a=o.call,i=n&&o.bind.bind(a,a);t.exports=n?i:function(t){return function(){return a.apply(t,arguments)}}},944(t){var e=TypeError;t.exports=function(t){var r=t&&t.alphabet;if(void 0===r||"base64"===r||"base64url"===r)return r||"base64";throw new e("Incorrect `alphabet` option")}},9429(t,e,r){var n=r(4576),o=r(6193);t.exports=function(t){if(o){try{return n.process.getBuiltinModule(t)}catch(t){}try{return Function('return require("'+t+'")')()}catch(t){}}}},7751(t,e,r){var n=r(4576),o=r(4901);t.exports=function(t,e){return arguments.length<2?(r=n[t],o(r)?r:void 0):n[t]&&n[t][e];var r}},1767(t){t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},851(t,e,r){var n=r(6955),o=r(5966),a=r(4117),i=r(6269),s=r(8227)("iterator");t.exports=function(t){if(!a(t))return o(t,s)||o(t,"@@iterator")||i[n(t)]}},81(t,e,r){var n=r(9565),o=r(9306),a=r(8551),i=r(6823),s=r(851),c=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(o(r))return a(n(r,t));throw new c(i(t)+" is not iterable")}},5966(t,e,r){var n=r(9306),o=r(4117);t.exports=function(t,e){var r=t[e];return o(r)?void 0:n(r)}},3789(t,e,r){var n=r(9306),o=r(8551),a=r(9565),i=r(1291),s=r(1767),c="Invalid size",u=RangeError,f=TypeError,l=Math.max,SetRecord=function(t,e){this.set=t;this.size=l(e,0);this.has=n(t.has);this.keys=n(t.keys)};SetRecord.prototype={getIterator:function(){return s(o(a(this.keys,this.set)))},includes:function(t){return a(this.has,this.set,t)}};t.exports=function(t){o(t);var e=+t.size;if(e!=e)throw new f(c);var r=i(e);if(r<0)throw new u(c);return new SetRecord(t,r)}},4576(t){var check=function(t){return t&&t.Math===Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297(t,e,r){var n=r(9504),o=r(8981),a=n({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,e){return a(o(t),e)}},421(t){t.exports={}},397(t,e,r){var n=r(7751);t.exports=n("document","documentElement")},5917(t,e,r){var n=r(3724),o=r(9039),a=r(4055);t.exports=!n&&!o(function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a})},7055(t,e,r){var n=r(9504),o=r(9039),a=r(2195),i=Object,s=n("".split);t.exports=o(function(){return!i("z").propertyIsEnumerable(0)})?function(t){return"String"===a(t)?s(t,""):i(t)}:i},3706(t,e,r){var n=r(9504),o=r(4901),a=r(7629),i=n(Function.toString);o(a.inspectSource)||(a.inspectSource=function(t){return i(t)});t.exports=a.inspectSource},1181(t,e,r){var n,o,a,i=r(8622),s=r(4576),c=r(34),u=r(6699),f=r(9297),l=r(7629),h=r(6119),p=r(421),m="Object already initialized",g=s.TypeError,d=s.WeakMap;if(i||l.state){var y=l.state||(l.state=new d);y.get=y.get;y.has=y.has;y.set=y.set;n=function(t,e){if(y.has(t))throw new g(m);e.facade=t;y.set(t,e);return e};o=function(t){return y.get(t)||{}};a=function(t){return y.has(t)}}else{var b=h("state");p[b]=!0;n=function(t,e){if(f(t,b))throw new g(m);e.facade=t;u(t,b,e);return e};o=function(t){return f(t,b)?t[b]:{}};a=function(t){return f(t,b)}}t.exports={set:n,get:o,has:a,enforce:function(t){return a(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!c(e)||(r=o(e)).type!==t)throw new g("Incompatible receiver, "+t+" required");return r}}}},4209(t,e,r){var n=r(8227),o=r(6269),a=n("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||i[a]===t)}},4376(t,e,r){var n=r(2195);t.exports=Array.isArray||function isArray(t){return"Array"===n(t)}},1108(t,e,r){var n=r(6955);t.exports=function(t){var e=n(t);return"BigInt64Array"===e||"BigUint64Array"===e}},4901(t){var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},2796(t,e,r){var n=r(9039),o=r(4901),a=/#|\.prototype\./,isForced=function(t,e){var r=s[i(t)];return r===u||r!==c&&(o(e)?n(e):!!e)},i=isForced.normalize=function(t){return String(t).replace(a,".").toLowerCase()},s=isForced.data={},c=isForced.NATIVE="N",u=isForced.POLYFILL="P";t.exports=isForced},4117(t){t.exports=function(t){return null==t}},34(t,e,r){var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},3925(t,e,r){var n=r(34);t.exports=function(t){return n(t)||null===t}},6395(t){t.exports=!1},757(t,e,r){var n=r(7751),o=r(4901),a=r(1625),i=r(7040),s=Object;t.exports=i?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&a(e.prototype,s(t))}},507(t,e,r){var n=r(9565);t.exports=function(t,e,r){for(var o,a,i=r?t:t.iterator,s=t.next;!(o=n(s,i)).done;)if(void 0!==(a=e(o.value)))return a}},2652(t,e,r){var n=r(6080),o=r(9565),a=r(8551),i=r(6823),s=r(4209),c=r(6198),u=r(1625),f=r(81),l=r(851),h=r(9539),p=TypeError,Result=function(t,e){this.stopped=t;this.result=e},m=Result.prototype;t.exports=function(t,e,r){var g,d,y,b,w,v,_,x=r&&r.that,C=!(!r||!r.AS_ENTRIES),A=!(!r||!r.IS_RECORD),S=!(!r||!r.IS_ITERATOR),R=!(!r||!r.INTERRUPTED),B=n(e,x),stop=function(t){var e=g;g=void 0;e&&h(e,"normal");return new Result(!0,t)},callFn=function(t){if(C){a(t);return R?B(t[0],t[1],stop):B(t[0],t[1])}return R?B(t,stop):B(t)};if(A)g=t.iterator;else if(S)g=t;else{if(!(d=l(t)))throw new p(i(t)+" is not iterable");if(s(d)){for(y=0,b=c(t);b>y;y++)if((w=callFn(t[y]))&&u(m,w))return w;return new Result(!1)}g=f(t,d)}v=A?t.next:g.next;for(;!(_=o(v,g)).done;){var I=_.value;try{w=callFn(I)}catch(t){if(!g)throw t;h(g,"throw",t)}if("object"==typeof w&&w&&u(m,w))return w}return new Result(!1)}},1385(t,e,r){var n=r(9539);t.exports=function(t,e,r){for(var o=t.length-1;o>=0;o--)if(void 0!==t[o])try{r=n(t[o].iterator,e,r)}catch(t){e="throw";r=t}if("throw"===e)throw r;return r}},9539(t,e,r){var n=r(9565),o=r(8551),a=r(5966);t.exports=function(t,e,r){var i,s;o(t);try{if(!(i=a(t,"return"))){if("throw"===e)throw r;return r}i=n(i,t)}catch(t){s=!0;i=t}if("throw"===e)throw r;if(s)throw i;o(i);return r}},9462(t,e,r){var n=r(9565),o=r(2360),a=r(6699),i=r(6279),s=r(8227),c=r(1181),u=r(5966),f=r(7657).IteratorPrototype,l=r(2529),h=r(9539),p=r(1385),m=s("toStringTag"),g="IteratorHelper",d="WrapForValidIterator",y="normal",b="throw",w=c.set,createIteratorProxyPrototype=function(t){var e=c.getterFor(t?d:g);return i(o(f),{next:function next(){var r=e(this);if(t)return r.nextHandler();if(r.done)return l(void 0,!0);try{var n=r.nextHandler();return r.returnHandlerResult?n:l(n,r.done)}catch(t){r.done=!0;throw t}},return:function(){var r=e(this),o=r.iterator,a=r.done;r.done=!0;if(t){var i=u(o,"return");return i?n(i,o):l(void 0,!0)}if(a)return l(void 0,!0);if(r.inner)try{h(r.inner.iterator,y)}catch(t){return h(o,b,t)}if(r.openIters)try{p(r.openIters,y)}catch(t){if(o)return h(o,b,t);throw t}o&&h(o,y);return l(void 0,!0)}})},v=createIteratorProxyPrototype(!0),_=createIteratorProxyPrototype(!1);a(_,m,"Iterator Helper");t.exports=function(t,e,r){var n=function Iterator(n,o){if(o){o.iterator=n.iterator;o.next=n.next}else o=n;o.type=e?d:g;o.returnHandlerResult=!!r;o.nextHandler=t;o.counter=0;o.done=!1;w(this,o)};n.prototype=e?v:_;return n}},684(t){t.exports=function(t,e){var r="function"==typeof Iterator&&Iterator.prototype[t];if(r)try{r.call({next:null},e).next()}catch(t){return!0}}},4549(t,e,r){var n=r(4576);t.exports=function(t,e){var r=n.Iterator,o=r&&r.prototype,a=o&&o[t],i=!1;if(a)try{a.call({next:function(){return{done:!0}},return:function(){i=!0}},-1)}catch(t){t instanceof e||(i=!1)}if(!i)return a}},7657(t,e,r){var n,o,a,i=r(9039),s=r(4901),c=r(34),u=r(2360),f=r(2787),l=r(6840),h=r(8227),p=r(6395),m=h("iterator"),g=!1;[].keys&&("next"in(a=[].keys())?(o=f(f(a)))!==Object.prototype&&(n=o):g=!0);!c(n)||i(function(){var t={};return n[m].call(t)!==t})?n={}:p&&(n=u(n));s(n[m])||l(n,m,function(){return this});t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},6269(t){t.exports={}},6198(t,e,r){var n=r(8014);t.exports=function(t){return n(t.length)}},283(t,e,r){var n=r(9504),o=r(9039),a=r(4901),i=r(9297),s=r(3724),c=r(350).CONFIGURABLE,u=r(3706),f=r(1181),l=f.enforce,h=f.get,p=String,m=Object.defineProperty,g=n("".slice),d=n("".replace),y=n([].join),b=s&&!o(function(){return 8!==m(function(){},"length",{value:8}).length}),w=String(String).split("String"),v=t.exports=function(t,e,r){"Symbol("===g(p(e),0,7)&&(e="["+d(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]");r&&r.getter&&(e="get "+e);r&&r.setter&&(e="set "+e);(!i(t,"name")||c&&t.name!==e)&&(s?m(t,"name",{value:e,configurable:!0}):t.name=e);b&&r&&i(r,"arity")&&t.length!==r.arity&&m(t,"length",{value:r.arity});try{r&&i(r,"constructor")&&r.constructor?s&&m(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=l(t);i(n,"source")||(n.source=y(w,"string"==typeof e?e:""));return t};Function.prototype.toString=v(function toString(){return a(this)&&h(this).source||u(this)},"toString")},2248(t,e,r){var n=r(9504),o=Map.prototype;t.exports={Map,set:n(o.set),get:n(o.get),has:n(o.has),remove:n(o.delete),proto:o}},741(t){var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function trunc(t){var n=+t;return(n>0?r:e)(n)}},6043(t,e,r){var n=r(9306),o=TypeError,PromiseCapability=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw new o("Bad Promise constructor");e=t;r=n});this.resolve=n(e);this.reject=n(r)};t.exports.f=function(t){return new PromiseCapability(t)}},2360(t,e,r){var n,o=r(8551),a=r(6801),i=r(8727),s=r(421),c=r(397),u=r(4055),f=r(6119),l="prototype",h="script",p=f("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<"+h+">"+t+"</"+h+">"},NullProtoObjectViaActiveX=function(t){t.write(scriptTag(""));t.close();var e=t.parentWindow.Object;t=null;return e},NullProtoObject=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}NullProtoObject="undefined"!=typeof document?document.domain&&n?NullProtoObjectViaActiveX(n):function(){var t,e=u("iframe"),r="java"+h+":";e.style.display="none";c.appendChild(e);e.src=String(r);(t=e.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}():NullProtoObjectViaActiveX(n);for(var t=i.length;t--;)delete NullProtoObject[l][i[t]];return NullProtoObject()};s[p]=!0;t.exports=Object.create||function create(t,e){var r;if(null!==t){EmptyConstructor[l]=o(t);r=new EmptyConstructor;EmptyConstructor[l]=null;r[p]=t}else r=NullProtoObject();return void 0===e?r:a.f(r,e)}},6801(t,e,r){var n=r(3724),o=r(8686),a=r(4913),i=r(8551),s=r(5397),c=r(1072);e.f=n&&!o?Object.defineProperties:function defineProperties(t,e){i(t);for(var r,n=s(e),o=c(e),u=o.length,f=0;u>f;)a.f(t,r=o[f++],n[r]);return t}},4913(t,e,r){var n=r(3724),o=r(5917),a=r(8686),i=r(8551),s=r(6969),c=TypeError,u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",h="configurable",p="writable";e.f=n?a?function defineProperty(t,e,r){i(t);e=s(e);i(r);if("function"==typeof t&&"prototype"===e&&"value"in r&&p in r&&!r[p]){var n=f(t,e);if(n&&n[p]){t[e]=r.value;r={configurable:h in r?r[h]:n[h],enumerable:l in r?r[l]:n[l],writable:!1}}}return u(t,e,r)}:u:function defineProperty(t,e,r){i(t);e=s(e);i(r);if(o)try{return u(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new c("Accessors not supported");"value"in r&&(t[e]=r.value);return t}},7347(t,e,r){var n=r(3724),o=r(9565),a=r(8773),i=r(6980),s=r(5397),c=r(6969),u=r(9297),f=r(5917),l=Object.getOwnPropertyDescriptor;e.f=n?l:function getOwnPropertyDescriptor(t,e){t=s(t);e=c(e);if(f)try{return l(t,e)}catch(t){}if(u(t,e))return i(!o(a.f,t,e),t[e])}},8480(t,e,r){var n=r(1828),o=r(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return n(t,o)}},3717(t,e){e.f=Object.getOwnPropertySymbols},2787(t,e,r){var n=r(9297),o=r(4901),a=r(8981),i=r(6119),s=r(2211),c=i("IE_PROTO"),u=Object,f=u.prototype;t.exports=s?u.getPrototypeOf:function(t){var e=a(t);if(n(e,c))return e[c];var r=e.constructor;return o(r)&&e instanceof r?r.prototype:e instanceof u?f:null}},1625(t,e,r){var n=r(9504);t.exports=n({}.isPrototypeOf)},1828(t,e,r){var n=r(9504),o=r(9297),a=r(5397),i=r(9617).indexOf,s=r(421),c=n([].push);t.exports=function(t,e){var r,n=a(t),u=0,f=[];for(r in n)!o(s,r)&&o(n,r)&&c(f,r);for(;e.length>u;)o(n,r=e[u++])&&(~i(f,r)||c(f,r));return f}},1072(t,e,r){var n=r(1828),o=r(8727);t.exports=Object.keys||function keys(t){return n(t,o)}},8773(t,e){var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function propertyIsEnumerable(t){var e=n(this,t);return!!e&&e.enumerable}:r},2967(t,e,r){var n=r(6706),o=r(34),a=r(7750),i=r(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]);e=r instanceof Array}catch(t){}return function setPrototypeOf(r,n){a(r);i(n);if(!o(r))return r;e?t(r,n):r.__proto__=n;return r}}():void 0)},4270(t,e,r){var n=r(9565),o=r(4901),a=r(34),i=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&o(r=t.toString)&&!a(s=n(r,t)))return s;if(o(r=t.valueOf)&&!a(s=n(r,t)))return s;if("string"!==e&&o(r=t.toString)&&!a(s=n(r,t)))return s;throw new i("Can't convert object to primitive value")}},5031(t,e,r){var n=r(7751),o=r(9504),a=r(8480),i=r(3717),s=r(8551),c=o([].concat);t.exports=n("Reflect","ownKeys")||function ownKeys(t){var e=a.f(s(t)),r=i.f;return r?c(e,r(t)):e}},7750(t,e,r){var n=r(4117),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},9286(t,e,r){var n=r(4402),o=r(8469),a=n.Set,i=n.add;t.exports=function(t){var e=new a;o(t,function(t){i(e,t)});return e}},3440(t,e,r){var n=r(7080),o=r(4402),a=r(9286),i=r(5170),s=r(3789),c=r(8469),u=r(507),f=o.has,l=o.remove;t.exports=function difference(t){var e=n(this),r=s(t),o=a(e);i(o)<=r.size?c(o,function(t){r.includes(t)&&l(o,t)}):u(r.getIterator(),function(t){f(o,t)&&l(o,t)});return o}},4402(t,e,r){var n=r(9504),o=Set.prototype;t.exports={Set,add:n(o.add),has:n(o.has),remove:n(o.delete),proto:o}},8750(t,e,r){var n=r(7080),o=r(4402),a=r(5170),i=r(3789),s=r(8469),c=r(507),u=o.Set,f=o.add,l=o.has;t.exports=function intersection(t){var e=n(this),r=i(t),o=new u;a(e)>r.size?c(r.getIterator(),function(t){l(e,t)&&f(o,t)}):s(e,function(t){r.includes(t)&&f(o,t)});return o}},4449(t,e,r){var n=r(7080),o=r(4402).has,a=r(5170),i=r(3789),s=r(8469),c=r(507),u=r(9539);t.exports=function isDisjointFrom(t){var e=n(this),r=i(t);if(a(e)<=r.size)return!1!==s(e,function(t){if(r.includes(t))return!1},!0);var f=r.getIterator();return!1!==c(f,function(t){if(o(e,t))return u(f.iterator,"normal",!1)})}},3838(t,e,r){var n=r(7080),o=r(5170),a=r(8469),i=r(3789);t.exports=function isSubsetOf(t){var e=n(this),r=i(t);return!(o(e)>r.size)&&!1!==a(e,function(t){if(!r.includes(t))return!1},!0)}},8527(t,e,r){var n=r(7080),o=r(4402).has,a=r(5170),i=r(3789),s=r(507),c=r(9539);t.exports=function isSupersetOf(t){var e=n(this),r=i(t);if(a(e)<r.size)return!1;var u=r.getIterator();return!1!==s(u,function(t){if(!o(e,t))return c(u.iterator,"normal",!1)})}},8469(t,e,r){var n=r(9504),o=r(507),a=r(4402),i=a.Set,s=a.proto,c=n(s.forEach),u=n(s.keys),f=u(new i).next;t.exports=function(t,e,r){return r?o({iterator:u(t),next:f},e):c(t,e)}},4916(t,e,r){var n=r(7751),createSetLike=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},createSetLikeWithInfinitySize=function(t){return{size:t,has:function(){return!0},keys:function(){throw new Error("e")}}};t.exports=function(t,e){var r=n("Set");try{(new r)[t](createSetLike(0));try{(new r)[t](createSetLike(-1));return!1}catch(n){if(!e)return!0;try{(new r)[t](createSetLikeWithInfinitySize(-1/0));return!1}catch(n){return e(new r([1,2])[t](createSetLikeWithInfinitySize(1/0)))}}}catch(t){return!1}}},9835(t){t.exports=function(t){try{var e=new Set,r={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){e.clear();e.add(4);return function(){return{done:!0}}}})}},n=e[t](r);return 1===n.size&&4===n.values().next().value}catch(t){return!1}}},5170(t,e,r){var n=r(6706),o=r(4402);t.exports=n(o.proto,"size","get")||function(t){return t.size}},3650(t,e,r){var n=r(7080),o=r(4402),a=r(9286),i=r(3789),s=r(507),c=o.add,u=o.has,f=o.remove;t.exports=function symmetricDifference(t){var e=n(this),r=i(t).getIterator(),o=a(e);s(r,function(t){u(e,t)?f(o,t):c(o,t)});return o}},4204(t,e,r){var n=r(7080),o=r(4402).add,a=r(9286),i=r(3789),s=r(507);t.exports=function union(t){var e=n(this),r=i(t).getIterator(),c=a(e);s(r,function(t){o(c,t)});return c}},6119(t,e,r){var n=r(5745),o=r(3392),a=n("keys");t.exports=function(t){return a[t]||(a[t]=o(t))}},7629(t,e,r){var n=r(6395),o=r(4576),a=r(9433),i="__core-js_shared__",s=t.exports=o[i]||a(i,{});(s.versions||(s.versions=[])).push({version:"3.49.0",mode:n?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745(t,e,r){var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},1548(t,e,r){var n=r(4576),o=r(9039),a=r(9519),i=r(4215),s=n.structuredClone;t.exports=!!s&&!o(function(){if("DENO"===i&&a>92||"NODE"===i&&a>94||"BROWSER"===i&&a>97)return!1;var t=new ArrayBuffer(8),e=s(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength})},4495(t,e,r){var n=r(9519),o=r(9039),a=r(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},5610(t,e,r){var n=r(1291),o=Math.max,a=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):a(r,e)}},5854(t,e,r){var n=r(2777),o=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw new o("Can't convert number to bigint");return BigInt(e)}},7696(t,e,r){var n=r(1291),o=r(8014),a=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=n(t),r=o(e);if(e!==r)throw new a("Wrong length or index");return r}},5397(t,e,r){var n=r(7055),o=r(7750);t.exports=function(t){return n(o(t))}},1291(t,e,r){var n=r(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},8014(t,e,r){var n=r(1291),o=Math.min;t.exports=function(t){var e=n(t);return e>0?o(e,9007199254740991):0}},8981(t,e,r){var n=r(7750),o=Object;t.exports=function(t){return o(n(t))}},2777(t,e,r){var n=r(9565),o=r(34),a=r(757),i=r(5966),s=r(4270),c=r(8227),u=TypeError,f=c("toPrimitive");t.exports=function(t,e){if(!o(t)||a(t))return t;var r,c=i(t,f);if(c){void 0===e&&(e="default");r=n(c,t,e);if(!o(r)||a(r))return r;throw new u("Can't convert object to primitive value")}void 0===e&&(e="number");return s(t,e)}},6969(t,e,r){var n=r(2777),o=r(757);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},2140(t,e,r){var n={};n[r(8227)("toStringTag")]="z";t.exports="[object z]"===String(n)},655(t,e,r){var n=r(6955),o=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},6823(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392(t,e,r){var n=r(9504),o=0,a=Math.random(),i=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+i(++o+a,36)}},9143(t,e,r){var n=r(4576),o=r(9504),a=r(3972),i=r(3463),s=r(9297),c=r(2804),u=r(944),f=r(5169),l=c.c2i,h=c.c2iUrl,p=n.SyntaxError,m=n.TypeError,g=o("".charAt),skipAsciiWhitespace=function(t,e){for(var r=t.length;e<r;e++){var n=g(t,e);if(" "!==n&&"\t"!==n&&"\n"!==n&&"\f"!==n&&"\r"!==n)break}return e},decodeBase64Chunk=function(t,e,r){var n=t.length;n<4&&(t+=2===n?"AA":"A");var o=(e[g(t,0)]<<18)+(e[g(t,1)]<<12)+(e[g(t,2)]<<6)+e[g(t,3)],a=[o>>16&255,o>>8&255,255&o];if(2===n){if(r&&0!==a[1])throw new p("Extra bits");return[a[0]]}if(3===n){if(r&&0!==a[2])throw new p("Extra bits");return[a[0],a[1]]}return a},writeBytes=function(t,e,r){for(var n=e.length,o=0;o<n;o++)t[r+o]=e[o];return r+n};t.exports=function(t,e,r,n){i(t);a(e);var o="base64"===u(e)?l:h,c=e?e.lastChunkHandling:void 0;void 0===c&&(c="loose");if("loose"!==c&&"strict"!==c&&"stop-before-partial"!==c)throw new m("Incorrect `lastChunkHandling` option");r&&f(r.buffer);var d=t.length,y=r||[],b=0,w=0,v="",_=0;if(n)for(;;){if((_=skipAsciiWhitespace(t,_))===d){if(v.length>0){if("stop-before-partial"===c)break;if("loose"!==c)throw new p("Missing padding");if(1===v.length)throw new p("Malformed padding: exactly one additional character");b=writeBytes(y,decodeBase64Chunk(v,o,!1),b)}w=d;break}var x=g(t,_);++_;if("="===x){if(v.length<2)throw new p("Padding is too early");_=skipAsciiWhitespace(t,_);if(2===v.length){if(_===d){if("stop-before-partial"===c)break;throw new p("Malformed padding: only one =")}if("="===g(t,_)){++_;_=skipAsciiWhitespace(t,_)}}if(_<d)throw new p("Unexpected character after padding");b=writeBytes(y,decodeBase64Chunk(v,o,"strict"===c),b);w=d;break}if(!s(o,x))throw new p("Unexpected character");var C=n-b;if(1===C&&2===v.length||2===C&&3===v.length)break;if(4===(v+=x).length){b=writeBytes(y,decodeBase64Chunk(v,o,!1),b);v="";w=_;if(b===n)break}}return{bytes:y,read:w,written:b}}},2303(t,e,r){var n=r(4576),o=r(9504),a=n.Uint8Array,i=n.SyntaxError,s=Math.min,c=o("".match);t.exports=function(t,e){var r=t.length;if(r%2!=0)throw new i("String should be an even number of characters");for(var n=e?s(e.length,r/2):r/2,o=e||new a(n),u=c(t,/.{2}/g),f=0;f<n;f++){var l=+("0x"+u[f]+"0");if(l!=l)throw new i("String should only contain hex characters");o[f]=l>>4}return{bytes:o,read:f<<1}}},7416(t,e,r){var n=r(9039),o=r(8227),a=r(3724),i=r(6395),s=o("iterator");t.exports=!n(function(){var t=new URL("b?a=1&b=2&c=3","https://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";t.pathname="c%20d";e.forEach(function(t,r){e.delete("b");n+=r+t});r.delete("a",2);r.delete("b",void 0);return i&&(!t.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!e.size&&(i||!a)||!e.sort||"https://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host})},7040(t,e,r){var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686(t,e,r){var n=r(3724),o=r(9039);t.exports=n&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},2812(t){var e=TypeError;t.exports=function(t,r){if(t<r)throw new e("Not enough arguments");return t}},8622(t,e,r){var n=r(4576),o=r(4901),a=n.WeakMap;t.exports=o(a)&&/native code/.test(String(a))},8227(t,e,r){var n=r(4576),o=r(5745),a=r(9297),i=r(3392),s=r(4495),c=r(7040),u=n.Symbol,f=o("wks"),l=c?u.for||u:u&&u.withoutSetter||i;t.exports=function(t){a(f,t)||(f[t]=s&&a(u,t)?u[t]:l("Symbol."+t));return f[t]}},6573(t,e,r){var n=r(3724),o=r(2106),a=r(3238),i=ArrayBuffer.prototype;n&&!("detached"in i)&&o(i,"detached",{configurable:!0,get:function detached(){return a(this)}})},7936(t,e,r){var n=r(6518),o=r(5636);o&&n({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function transferToFixedLength(){return o(this,arguments.length?arguments[0]:void 0,!1)}})},8100(t,e,r){var n=r(6518),o=r(5636);o&&n({target:"ArrayBuffer",proto:!0},{transfer:function transfer(){return o(this,arguments.length?arguments[0]:void 0,!0)}})},4423(t,e,r){var n=r(6518),o=r(9617).includes,a=r(9039),i=r(6469),s=a(function(){return!Array(1).includes()}),c=a(function(){return[,1].includes(void 0,1)});n({target:"Array",proto:!0,forced:s||c},{includes:function includes(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}});i("includes")},4114(t,e,r){var n=r(6518),o=r(8981),a=r(6198),i=r(4527),s=r(6837);n({target:"Array",proto:!0,arity:1,forced:r(9039)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function push(t){var e=o(this),r=a(e),n=arguments.length;s(r+n);for(var c=0;c<n;c++){e[r]=arguments[c];r++}i(e,r);return r}})},8111(t,e,r){var n=r(6518),o=r(4576),a=r(679),i=r(8551),s=r(4901),c=r(2787),u=r(2106),f=r(4659),l=r(9039),h=r(9297),p=r(8227),m=r(7657).IteratorPrototype,g=r(3724),d=r(6395),y="constructor",b="Iterator",w=p("toStringTag"),v=TypeError,_=o[b],x=d||!s(_)||_.prototype!==m||!l(function(){_({})}),C=function Iterator(){a(this,m);if(c(this)===m)throw new v("Abstract class Iterator not directly constructable")},defineIteratorPrototypeAccessor=function(t,e){g?u(m,t,{configurable:!0,get:function(){return e},set:function(e){i(this);if(this===m)throw new v("You can't redefine this property");h(this,t)?this[t]=e:f(this,t,e)}}):m[t]=e};h(m,w)||defineIteratorPrototypeAccessor(w,b);!x&&h(m,y)&&m[y]!==Object||defineIteratorPrototypeAccessor(y,C);C.prototype=m;n({global:!0,constructor:!0,forced:x},{Iterator:C})},1148(t,e,r){var n=r(6518),o=r(9565),a=r(2652),i=r(9306),s=r(8551),c=r(1767),u=r(9539),f=r(4549)("every",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:f},{every:function every(t){s(this);try{i(t)}catch(t){u(this,"throw",t)}if(f)return o(f,this,t);var e=c(this),r=0;return!a(e,function(e,n){if(!t(e,r++))return n()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},1701(t,e,r){var n=r(6518),o=r(9565),a=r(9306),i=r(8551),s=r(1767),c=r(9462),u=r(6319),f=r(9539),l=r(684),h=r(4549),p=r(6395),m=!p&&!l("map",function(){}),g=!p&&!m&&h("map",TypeError),d=p||m||g,y=c(function(){var t=this.iterator,e=i(o(this.next,t));if(!(this.done=!!e.done))return u(t,this.mapper,[e.value,this.counter++],!0)});n({target:"Iterator",proto:!0,real:!0,forced:d},{map:function map(t){i(this);try{a(t)}catch(t){f(this,"throw",t)}return g?o(g,this,t):new y(s(this),{mapper:t})}})},2731(t,e,r){var n=r(6518),o=r(9306),a=r(2248),i=r(6395),s=a.get,c=a.has,u=a.set;n({target:"Map",proto:!0,real:!0,forced:i},{getOrInsertComputed:function getOrInsertComputed(t,e){var r=c(this,t);o(e);if(r)return s(this,t);0===t&&1/t==-1/0&&(t=0);var n=e(t);u(this,t,n);return n}})},5367(t,e,r){var n=r(6518),o=r(2248),a=r(6395),i=o.get,s=o.has,c=o.set;n({target:"Map",proto:!0,real:!0,forced:a},{getOrInsert:function getOrInsert(t,e){if(s(this,t))return i(this,t);c(this,t,e);return e}})},4628(t,e,r){var n=r(6518),o=r(6043);n({target:"Promise",stat:!0},{withResolvers:function withResolvers(){var t=o.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}})},7642(t,e,r){var n=r(6518),o=r(3440),a=r(9039);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("difference",function(t){return 0===t.size})||a(function(){var t={size:1,has:function(){return!0},keys:function(){var t=0;return{next:function(){var r=t++>1;e.has(1)&&e.clear();return{done:r,value:2}}}}},e=new Set([1,2,3,4]);return 3!==e.difference(t).size})},{difference:o})},8004(t,e,r){var n=r(6518),o=r(9039),a=r(8750);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("intersection",function(t){return 2===t.size&&t.has(1)&&t.has(2)})||o(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:a})},3853(t,e,r){var n=r(6518),o=r(4449);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("isDisjointFrom",function(t){return!t})},{isDisjointFrom:o})},5876(t,e,r){var n=r(6518),o=r(3838);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("isSubsetOf",function(t){return t})},{isSubsetOf:o})},2475(t,e,r){var n=r(6518),o=r(8527);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("isSupersetOf",function(t){return!t})},{isSupersetOf:o})},5024(t,e,r){var n=r(6518),o=r(3650),a=r(9835);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("symmetricDifference")||!a("symmetricDifference")},{symmetricDifference:o})},1698(t,e,r){var n=r(6518),o=r(4204),a=r(9835);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("union")||!a("union")},{union:o})},9577(t,e,r){var n=r(4644),o=r(1108),a=r(6198),i=r(1291),s=r(5854),c=n.aTypedArray,u=n.getTypedArrayConstructor,f=n.exportTypedArrayMethod,l=RangeError,h=function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}(),p=h&&function(){try{new Int8Array(1).with(-.5,1)}catch(t){return!0}}();f("with",{with:function(t,e){var r=c(this),n=a(r),f=i(t),h=f<0?n+f:f,p=o(r)?s(e):+e;if(h>=n||h<0)throw new l("Incorrect index");for(var m=new(u(r))(n),g=0;g<n;g++)m[g]=g===h?p:r[g];return m}}.with,!h||p)},6632(t,e,r){var n=r(6518),o=r(4576),a=r(9143),i=r(4154),s=o.Uint8Array,c=!s||!s.prototype.setFromBase64||!function(){var t=new s([255,255,255,255,255]);try{t.setFromBase64("",null);return}catch(t){}try{t.setFromBase64("a");return}catch(t){}try{t.setFromBase64("MjYyZg===")}catch(e){return 50===t[0]&&54===t[1]&&50===t[2]&&255===t[3]&&255===t[4]}}();s&&n({target:"Uint8Array",proto:!0,forced:c},{setFromBase64:function setFromBase64(t){i(this);var e=a(t,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:e.read,written:e.written}}})},4226(t,e,r){var n=r(6518),o=r(4576),a=r(3463),i=r(4154),s=r(5169),c=r(2303);o.Uint8Array&&n({target:"Uint8Array",proto:!0,forced:function throwsOnLengthTrackingView(){try{var t=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(t).setFromHex("cafed00d")}catch(t){return!0}}()},{setFromHex:function setFromHex(t){i(this);a(t);s(this.buffer);var e=c(t,this).read;return{read:e,written:e/2}}})},9486(t,e,r){var n=r(6518),o=r(4576),a=r(9504),i=r(3972),s=r(4154),c=r(5169),u=r(2804),f=r(944),l=u.i2c,h=u.i2cUrl,p=a("".charAt),m=o.Uint8Array,g=!m||!m.prototype.toBase64||!function(){try{(new m).toBase64(null)}catch(t){return!0}}();m&&n({target:"Uint8Array",proto:!0,forced:g},{toBase64:function toBase64(){var t=s(this),e=arguments.length?i(arguments[0]):void 0,r="base64"===f(e)?l:h,n=!!e&&!!e.omitPadding;c(this.buffer);for(var o,a="",u=0,m=t.length,at=function(t){return p(r,o>>6*t&63)};u+2<m;u+=3){o=(t[u]<<16)+(t[u+1]<<8)+t[u+2];a+=at(3)+at(2)+at(1)+at(0)}if(u+2===m){o=(t[u]<<16)+(t[u+1]<<8);a+=at(3)+at(2)+at(1)+(n?"":"=")}else if(u+1===m){o=t[u]<<16;a+=at(3)+at(2)+(n?"":"==")}return a}})},456(t,e,r){var n=r(6518),o=r(4576),a=r(9504),i=r(4154),s=r(5169),c=a(1.1.toString),u=a([].join),f=Array,l=o.Uint8Array,h=!l||!l.prototype.toHex||!function(){try{return"ffffffffffffffff"===new l([255,255,255,255,255,255,255,255]).toHex()}catch(t){return!1}}();l&&n({target:"Uint8Array",proto:!0,forced:h},{toHex:function toHex(){i(this);s(this.buffer);for(var t=f(this.length),e=0,r=this.length;e<r;e++){var n=c(this[e],16);t[e]=1===n.length?"0"+n:n}return u(t,"")}})},4603(t,e,r){var n=r(6840),o=r(9504),a=r(655),i=r(2812),s=URLSearchParams,c=s.prototype,u=o(c.append),f=o(c.delete),l=o(c.forEach),h=o([].push),p=new s("a=1&a=2&b=3");p.delete("a",1);p.delete("b",void 0);p+""!="a=2"&&n(c,"delete",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return f(this,t);var n=[];l(this,function(t,e){h(n,{key:e,value:t})});i(e,1);for(var o,s=a(t),c=a(r),p=0,m=n.length;p<m;){f(this,(o=n[p]).key);p++}p=0;for(;p<m;)(o=n[p++]).key===s&&o.value===c||u(this,o.key,o.value)},{enumerable:!0,unsafe:!0})},7566(t,e,r){var n=r(6840),o=r(9504),a=r(655),i=r(2812),s=URLSearchParams,c=s.prototype,u=o(c.getAll),f=o(c.has),l=new s("a=1");!l.has("a",2)&&l.has("a",void 0)||n(c,"has",function has(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return f(this,t);var n=u(this,t);i(e,1);for(var o=a(r),s=0;s<n.length;)if(n[s++]===o)return!0;return!1},{enumerable:!0,unsafe:!0})},8721(t,e,r){var n=r(3724),o=r(9504),a=r(2106),i=URLSearchParams.prototype,s=o(i.forEach);n&&!("size"in i)&&a(i,"size",{get:function size(){var t=0;s(this,function(){t++});return t},configurable:!0,enumerable:!0})},5781(t,e,r){var n=r(6518),o=r(7751),a=r(2812),i=r(655),s=r(7416),c=o("URL");n({target:"URL",stat:!0,forced:!s},{parse:function parse(t){var e=a(arguments.length,1),r=i(t),n=e<2||void 0===arguments[1]?void 0:i(arguments[1]);try{return new c(r,n)}catch(t){return null}}})}},e={};function __webpack_require__(r){var n=e[r];if(void 0!==n)return n.exports;var o=e[r]={exports:{}};t[r].call(o.exports,o,o.exports,__webpack_require__);return o.exports}__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})};__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);__webpack_require__(4423),__webpack_require__(4114),__webpack_require__(6573),__webpack_require__(8100),__webpack_require__(7936),__webpack_require__(5367),__webpack_require__(2731),__webpack_require__(9577),__webpack_require__(6632),__webpack_require__(4226),__webpack_require__(9486),__webpack_require__(456),__webpack_require__(5781);"object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type;const r=[1/0,1/0,-1/0,-1/0],n=(new Float32Array(r),{ERRORS:0,WARNINGS:1,INFOS:5});let o=n.WARNINGS;function setVerbosityLevel(t){Number.isInteger(t)&&(o=t)}function getVerbosityLevel(){return o}function info(t){o>=n.INFOS&&console.info(`Info: ${t}`)}function warn(t){o>=n.WARNINGS&&console.warn(`Warning: ${t}`)}function unreachable(t){throw new Error(t)}function shadow(t,e,r,n=!1){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!0,writable:!1});return r}const a=function BaseExceptionClosure(){function BaseException(t,e){this.message=t;this.name=e}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();class FormatError extends a{constructor(t){super(t,"FormatError")}}function bytesToString(t){"object"==typeof t&&void 0!==t?.length||unreachable("Invalid argument for bytesToString");const e=t.length,r=8192;if(e<r)return String.fromCharCode.apply(null,t);const n=[];for(let o=0;o<e;o+=r){const a=Math.min(o+r,e),i=t.subarray(o,a);n.push(String.fromCharCode.apply(null,i))}return n.join("")}class FeatureTest{static get isLittleEndian(){return shadow(this,"isLittleEndian",function isLittleEndian(){const t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}static get isOffscreenCanvasSupported(){return shadow(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get isImageDecoderSupported(){return shadow(this,"isImageDecoderSupported","undefined"!=typeof ImageDecoder)}static get isFloat16ArraySupported(){return shadow(this,"isFloat16ArraySupported","undefined"!=typeof Float16Array)}static get isSanitizerSupported(){return shadow(this,"isSanitizerSupported","undefined"!=typeof Sanitizer)}static get platform(){const{platform:t,userAgent:e}=navigator;return shadow(this,"platform",{isAndroid:e.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:e.includes("Firefox")})}static get isCSSRoundSupported(){return shadow(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}static get isAlphaColorInputSupported(){return shadow(this,"isAlphaColorInputSupported",(()=>{if("undefined"==typeof document)return!1;const t=document.createElement("input");t.type="color";t.setAttribute("alpha","");t.value="#ff000080";return"#ff0000"!==t.value})())}}class Util{static get hexNums(){return shadow(this,"hexNums",Array.from(Array(256).keys(),t=>t.toString(16).padStart(2,"0")))}static makeHexColor(t,e,r){return`#${this.hexNums[t]}${this.hexNums[e]}${this.hexNums[r]}`}static domMatrixToTransform(t){return[t.a,t.b,t.c,t.d,t.e,t.f]}static scaleMinMax(t,e){let r;if(t[0]){if(t[0]<0){r=e[0];e[0]=e[2];e[2]=r}e[0]*=t[0];e[2]*=t[0];if(t[3]<0){r=e[1];e[1]=e[3];e[3]=r}e[1]*=t[3];e[3]*=t[3]}else{r=e[0];e[0]=e[1];e[1]=r;r=e[2];e[2]=e[3];e[3]=r;if(t[1]<0){r=e[1];e[1]=e[3];e[3]=r}e[1]*=t[1];e[3]*=t[1];if(t[2]<0){r=e[0];e[0]=e[2];e[2]=r}e[0]*=t[2];e[2]*=t[2]}e[0]+=t[4];e[1]+=t[5];e[2]+=t[4];e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static multiplyByDOMMatrix(t,e){return[t[0]*e.a+t[2]*e.b,t[1]*e.a+t[3]*e.b,t[0]*e.c+t[2]*e.d,t[1]*e.c+t[3]*e.d,t[0]*e.e+t[2]*e.f+t[4],t[1]*e.e+t[3]*e.f+t[5]]}static applyTransform(t,e,r=0){const n=t[r],o=t[r+1];t[r]=n*e[0]+o*e[2]+e[4];t[r+1]=n*e[1]+o*e[3]+e[5]}static applyTransformToBezier(t,e,r=0){const n=e[0],o=e[1],a=e[2],i=e[3],s=e[4],c=e[5];for(let e=0;e<6;e+=2){const u=t[r+e],f=t[r+e+1];t[r+e]=u*n+f*a+s;t[r+e+1]=u*o+f*i+c}}static applyInverseTransform(t,e){const r=t[0],n=t[1],o=e[0]*e[3]-e[1]*e[2];t[0]=(r*e[3]-n*e[2]+e[2]*e[5]-e[4]*e[3])/o;t[1]=(-r*e[1]+n*e[0]+e[4]*e[1]-e[5]*e[0])/o}static axialAlignedBoundingBox(t,e,r){const n=e[0],o=e[1],a=e[2],i=e[3],s=e[4],c=e[5],u=t[0],f=t[1],l=t[2],h=t[3];let p=n*u+s,m=p,g=n*l+s,d=g,y=i*f+c,b=y,w=i*h+c,v=w;if(0!==o||0!==a){const t=o*u,e=o*l,r=a*f,n=a*h;p+=r;d+=r;g+=n;m+=n;y+=t;v+=t;w+=e;b+=e}r[0]=Math.min(r[0],p,g,m,d);r[1]=Math.min(r[1],y,w,b,v);r[2]=Math.max(r[2],p,g,m,d);r[3]=Math.max(r[3],y,w,b,v)}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t,e){const r=t[0],n=t[1],o=t[2],a=t[3],i=r**2+n**2,s=r*o+n*a,c=o**2+a**2,u=(i+c)/2,f=Math.sqrt(u**2-(i*c-s**2));e[0]=Math.sqrt(u+f||1);e[1]=Math.sqrt(u-f||1)}static normalizeRect(t){const e=t.slice(0);if(t[0]>t[2]){e[0]=t[2];e[2]=t[0]}if(t[1]>t[3]){e[1]=t[3];e[3]=t[1]}return e}static intersect(t,e){const r=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),n=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(r>n)return null;const o=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),a=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return o>a?null:[r,o,n,a]}static pointBoundingBox(t,e,r){r[0]=Math.min(r[0],t);r[1]=Math.min(r[1],e);r[2]=Math.max(r[2],t);r[3]=Math.max(r[3],e)}static rectBoundingBox(t,e,r,n,o){o[0]=Math.min(o[0],t,r);o[1]=Math.min(o[1],e,n);o[2]=Math.max(o[2],t,r);o[3]=Math.max(o[3],e,n)}static#t(t,e,r,n,o,a,i,s,c,u){if(c<=0||c>=1)return;const f=1-c,l=c*c,h=l*c,p=f*(f*(f*t+3*c*e)+3*l*r)+h*n,m=f*(f*(f*o+3*c*a)+3*l*i)+h*s;u[0]=Math.min(u[0],p);u[1]=Math.min(u[1],m);u[2]=Math.max(u[2],p);u[3]=Math.max(u[3],m)}static#e(t,e,r,n,o,a,i,s,c,u,f,l){if(Math.abs(c)<1e-12){Math.abs(u)>=1e-12&&this.#t(t,e,r,n,o,a,i,s,-f/u,l);return}const h=u**2-4*f*c;if(h<0)return;const p=Math.sqrt(h),m=2*c;this.#t(t,e,r,n,o,a,i,s,(-u+p)/m,l);this.#t(t,e,r,n,o,a,i,s,(-u-p)/m,l)}static bezierBoundingBox(t,e,r,n,o,a,i,s,c){c[0]=Math.min(c[0],t,i);c[1]=Math.min(c[1],e,s);c[2]=Math.max(c[2],t,i);c[3]=Math.max(c[3],e,s);this.#e(t,r,o,i,e,n,a,s,3*(3*(r-o)-t+i),6*(t-2*r+o),3*(r-t),c);this.#e(t,r,o,i,e,n,a,s,3*(3*(n-a)-e+s),6*(e-2*n+a),3*(n-e),c)}}"function"!=typeof Blob.prototype.bytes&&(Blob.prototype.bytes=async function(){return new Uint8Array(await this.arrayBuffer())});"function"!=typeof Response.prototype.bytes&&(Response.prototype.bytes=async function(){return new Uint8Array(await this.arrayBuffer())});"function"!=typeof AbortSignal.any&&(AbortSignal.any=function(t){const e=new AbortController,{signal:r}=e;for(const n of t)if(n.aborted){e.abort(n.reason);return r}for(const n of t)n.addEventListener("abort",()=>{e.abort(n.reason)},{signal:r});return r});__webpack_require__(4628),__webpack_require__(8111),__webpack_require__(1148),__webpack_require__(1701),__webpack_require__(7642),__webpack_require__(8004),__webpack_require__(3853),__webpack_require__(5876),__webpack_require__(2475),__webpack_require__(5024),__webpack_require__(1698);Symbol("CIRCULAR_REF"),Symbol("EOF");Object.create(null);let i=Object.create(null),s=Object.create(null);class Name{constructor(t){this.name=t}static get(t){return i[t]||=new Name(t)}}const c=function nonSerializableClosure(){return c};class Dict{__nonSerializable__=c;#r=new Map;objId=null;suppressEncryption=!1;xref;constructor(t=null){this.xref=t}assignXref(t){this.xref=t}get size(){return this.#r.size}#n(t,e,r,n){let o=this.#r.get(e);if(void 0===o&&void 0!==r){o=this.#r.get(r);void 0===o&&void 0!==n&&(o=this.#r.get(n))}return o instanceof Ref&&this.xref?t?this.xref.fetchAsync(o,this.suppressEncryption):this.xref.fetch(o,this.suppressEncryption):o}get(t,e,r){return this.#n(!1,t,e,r)}async getAsync(t,e,r){return this.#n(!0,t,e,r)}getArray(t,e,r){let n=this.#n(!1,t,e,r);if(Array.isArray(n)){n=n.slice();for(let t=0,e=n.length;t<e;t++)n[t]instanceof Ref&&this.xref&&(n[t]=this.xref.fetch(n[t],this.suppressEncryption))}return n}getRaw(t){return this.#r.get(t)}getKeys(){return this.#r.keys()}getRawValues(){return this.#r.values()}getRawEntries(){return this.#r.entries()}set(t,e){this.#r.set(t,e)}setIfNotExists(t,e){this.has(t)||this.set(t,e)}setIfNumber(t,e){"number"==typeof e&&this.set(t,e)}setIfArray(t,e){(Array.isArray(e)||ArrayBuffer.isView(e))&&this.set(t,e)}setIfDefined(t,e){null!=e&&this.set(t,e)}setIfName(t,e){"string"==typeof e?this.set(t,Name.get(e)):e instanceof Name&&this.set(t,e)}setIfDict(t,e){e instanceof Dict&&this.set(t,e)}has(t){return this.#r.has(t)}*[Symbol.iterator](){for(const[t,e]of this.#r)yield[t,e instanceof Ref&&this.xref?this.xref.fetch(e,this.suppressEncryption):e]}static get empty(){const t=new Dict(null);t.set=(t,e)=>{unreachable("Should not call `set` on the empty dictionary.")};return shadow(this,"empty",t)}static merge({xref:t,dictArray:e,mergeSubDicts:r=!1}){const n=new Dict(t),o=new Map;for(const t of e)if(t instanceof Dict)for(const[e,n]of t.getRawEntries()){let t=o.get(e);if(void 0===t){t=[];o.set(e,t)}else if(!(r&&n instanceof Dict))continue;t.push(n)}for(const[e,r]of o){if(1===r.length||!(r[0]instanceof Dict)){n.set(e,r[0]);continue}const o=new Dict(t);for(const t of r)for(const[e,r]of t.getRawEntries())o.setIfNotExists(e,r);o.size>0&&n.set(e,o)}o.clear();return n.size>0?n:Dict.empty}clone(){const t=new Dict(this.xref);for(const[e,r]of this.#r)t.set(e,r);return t}delete(t){this.#r.delete(t)}}class Ref{constructor(t,e){this.num=t;this.gen=e}toString(){return 0===this.gen?`${this.num}R`:`${this.num}R${this.gen}`}static fromString(t){const e=s[t];if(e)return e;const r=/^(\d+)R(\d*)$/.exec(t);return r&&"0"!==r[1]?s[t]=new Ref(parseInt(r[1],10),r[2]?parseInt(r[2],10):0):null}static get(t,e){const r=0===e?`${t}R`:`${t}R${e}`;return s[r]||=new Ref(t,e)}}Symbol.iterator;Symbol.iterator;class BaseStream{get length(){unreachable("Abstract getter `length` accessed")}get isEmpty(){unreachable("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return shadow(this,"isDataLoaded",!0)}getByte(){unreachable("Abstract method `getByte` called")}getBytes(t){unreachable("Abstract method `getBytes` called")}async getImageData(t,e){return this.getBytes(t,e)}async asyncGetBytes(){unreachable("Abstract method `asyncGetBytes` called")}get isAsync(){return!1}get isAsyncDecoder(){return!1}get isImageStream(){return!1}get canAsyncDecodeImageFromBuffer(){return!1}async getTransferableImage(){return null}peekByte(){const t=this.getByte();-1!==t&&this.pos--;return t}peekBytes(t){const e=this.getBytes(t);this.pos-=e.length;return e}getUint16(){const t=this.getByte(),e=this.getByte();return-1===t||-1===e?-1:(t<<8)+e}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(t,e){unreachable("Abstract method `getByteRange` called")}getString(t){return bytesToString(this.getBytes(t))}skip(t){this.pos+=t||1}reset(){unreachable("Abstract method `reset` called")}moveStart(){unreachable("Abstract method `moveStart` called")}makeSubStream(t,e,r=null){unreachable("Abstract method `makeSubStream` called")}getBaseStreams(){return null}getOriginalStream(){return this.stream?.getOriginalStream()||this}}class MissingDataException extends a{constructor(t,e){super(`Missing data [${t}, ${e})`,"MissingDataException");this.begin=t;this.end=e}}async function fetchBinaryData(t){const e=await fetch(t);if(!e.ok)throw new Error(`Failed to fetch file "${t}" with "${e.statusText}".`);return e.bytes()}__webpack_require__(4603),__webpack_require__(7566),__webpack_require__(8721);const u=async function JBig2(t={}){var e=t,quit_=(t,e)=>{throw e},r=import.meta.url;try{new URL(".",r).href}catch{}0;console.log.bind(console);var n,o,a,i,s,c=console.error.bind(console),u=!1,f=!1;function updateMemoryViews(){var t=h.buffer;i=new Int8Array(t);new Int16Array(t);s=new Uint8Array(t);new Uint16Array(t);new Int32Array(t);new Uint32Array(t);new Float32Array(t);new Float64Array(t);new BigInt64Array(t);new BigUint64Array(t)}class ExitStatus{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`;this.status=t}}var l,h,callRuntimeCallbacks=t=>{for(;t.length>0;)t.shift()(e)},p=[],addOnPostRun=t=>p.push(t),m=[],addOnPreRun=t=>m.push(t),g=!0,d=0,y={},handleException=t=>{if(t instanceof ExitStatus||"unwind"==t)return n;quit_(0,t)},keepRuntimeAlive=()=>g||d>0,_proc_exit=t=>{n=t;if(!keepRuntimeAlive()){e.onExit?.(t);u=!0}quit_(0,new ExitStatus(t))},_exit=(t,e)=>{n=t;_proc_exit(t)},callUserCallback=t=>{if(!u)try{return t()}catch(t){handleException(t)}finally{(()=>{if(!keepRuntimeAlive())try{_exit(n)}catch(t){handleException(t)}})()}},alignMemory=(t,e)=>Math.ceil(t/e)*e,growMemory=t=>{var e=(t-h.buffer.byteLength+65535)/65536|0;try{h.grow(e);updateMemoryViews();return 1}catch(t){}};e.noExitRuntime&&(g=e.noExitRuntime);e.print&&e.print;e.printErr&&(c=e.printErr);e.wasmBinary&&e.wasmBinary;e.arguments&&e.arguments;e.thisProgram&&e.thisProgram;if(e.preInit){"function"==typeof e.preInit&&(e.preInit=[e.preInit]);for(;e.preInit.length>0;)e.preInit.shift()()}e.writeArrayToMemory=(t,e)=>{i.set(t,e)};var b,w={e:()=>function abort(t){e.onAbort?.(t);c(t="Aborted("+t+")");u=!0;t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);a?.(r);throw r}(""),b:()=>{g=!1;d=0},c:(t,e)=>{if(y[t]){clearTimeout(y[t].id);delete y[t]}if(!e)return 0;var r=setTimeout(()=>{delete y[t];callUserCallback(()=>l(t,performance.now()))},e);y[t]={id:r,timeout_ms:e};return 0},g:function _createImageData(t){e.imageData=new Uint8Array(t)},d:t=>{var e=s.length,r=2147483648;if((t>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var o=e*(1+.2/n);o=Math.min(o,t+100663296);var a=Math.min(r,alignMemory(Math.max(t,o),65536));if(growMemory(a))return!0}return!1},a:_proc_exit,h:function _setImageData(t,r,n,o){if(n===r){e.imageData=new Uint8ClampedArray(s.subarray(t,t+n*o));return}const a=r*o,i=e.imageData=new Uint8ClampedArray(a);for(let e=t,o=0;o<a;e+=n,o+=r)i.set(s.subarray(e,e+r),o)},f:function _setLineData(t,r,n){e.imageData.set(s.subarray(t,t+r),n)}};b=await async function createWasm(){function receiveInstance(t,r){!function assignWasmExports(t){e._malloc=t.k;e._free=t.l;e._jbig2_decode=t.m;e._ccitt_decode=t.n;l=t.o;h=t.i;t.__indirect_function_table}(b=t.exports);updateMemoryViews();return b}var t=function getWasmImports(){return{a:w}}();return new Promise((r,n)=>{e.instantiateWasm(t,(t,e)=>{r(receiveInstance(t))})})}();!function run(){!function preRun(){if(e.preRun){"function"==typeof e.preRun&&(e.preRun=[e.preRun]);for(;e.preRun.length;)addOnPreRun(e.preRun.shift())}callRuntimeCallbacks(m)}();function doRun(){e.calledRun=!0;if(!u){!function initRuntime(){f=!0;b.j()}();o?.(e);e.onRuntimeInitialized?.();!function postRun(){if(e.postRun){"function"==typeof e.postRun&&(e.postRun=[e.postRun]);for(;e.postRun.length;)addOnPostRun(e.postRun.shift())}callRuntimeCallbacks(p)}()}}if(e.setStatus){e.setStatus("Running...");setTimeout(()=>{setTimeout(()=>e.setStatus(""),1);doRun()},1)}else doRun()}();return f?e:new Promise((t,e)=>{o=t;a=e})};class Jbig2Error extends a{constructor(t){super(t,"Jbig2Error")}}class JBig2CCITTFaxImage{static#o=null;static#a=null;static#i=null;static#s=!0;static#c=!0;static#u=null;static setOptions({handler:t,useWasm:e,useWorkerFetch:r,wasmUrl:n}){this.#s=e;this.#c=r;this.#u=n;r||(this.#a=t)}static async#f(t){const e=`${this.#u}jbig2_nowasm_fallback.js`;let r=null;try{r=(await import(
|
||
/*webpackIgnore: true*/
|
||
/*@vite-ignore*/
|
||
e)).default()}catch(t){warn(`JBig2CCITTFaxImage#getJsModule: ${t}`)}t(r)}static async#l(t,e,r){const n="jbig2.wasm";try{this.#o||(this.#c?this.#o=await fetchBinaryData(`${this.#u}${n}`):this.#o=await this.#a.sendWithPromise("FetchBinaryData",{kind:"wasmUrl",filename:n}));return r((await WebAssembly.instantiate(this.#o,e)).instance)}catch(e){warn(`JBig2CCITTFaxImage#instantiateWasm: ${e}`);this.#f(t);return null}finally{this.#a=null}}static async decode(t,e,r,n,o){if(!this.#i){const{promise:t,resolve:e}=Promise.withResolvers(),r=[t];this.#s?r.push(u({warn,instantiateWasm:this.#l.bind(this,e)})):this.#f(e);this.#i=Promise.race(r)}const a=await this.#i;if(!a)throw new Jbig2Error("JBig2 failed to initialize");let i,s;try{const c=t.length;i=a._malloc(c);a.writeArrayToMemory(t,i);if(o)a._ccitt_decode(i,c,e,r,o.K,o.EndOfLine?1:0,o.EncodedByteAlign?1:0,o.BlackIs1?1:0,o.Columns,o.Rows);else{const t=n?n.length:0;if(t>0){s=a._malloc(t);a.writeArrayToMemory(n,s)}a._jbig2_decode(i,c,e,r,s,t)}if(!a.imageData)throw new Jbig2Error("Unknown error");const{imageData:u}=a;a.imageData=null;return u}finally{i&&a._free(i);s&&a._free(s)}}static cleanup(){this.#i=null}}function MathClamp(t,e,r){return Math.min(Math.max(t,e),r)}function isDefaultDecodeHelper(t,e){if(!Array.isArray(t))return!0;const r=t.length;if(r<e){warn("Decode map length is too short.");return!0}if(r>e){info("Truncating too long decode map.");t.length=e}return!1}class ColorSpace{static#h=new Uint8ClampedArray(3);constructor(t,e){this.name=t;this.numComps=e}getRgb(t,e,r=new Uint8ClampedArray(3)){this.getRgbItem(t,e,r,0);return r}getRgbHex(t,e){const r=this.getRgb(t,e,ColorSpace.#h);return Util.makeHexColor(r[0],r[1],r[2])}getRgbItem(t,e,r,n){unreachable("Should not call ColorSpace.getRgbItem")}getRgbBuffer(t,e,r,n,o,a,i){unreachable("Should not call ColorSpace.getRgbBuffer")}getOutputLength(t,e){unreachable("Should not call ColorSpace.getOutputLength")}isPassthrough(t){return!1}isDefaultDecode(t,e){return ColorSpace.isDefaultDecode(t,this.numComps)}fillRgb(t,e,r,n,o,a,i,s,c){const u=e*r;let f=null;const l=1<<i,h=r!==o||e!==n;if(this.isPassthrough(i))f=s;else if(1===this.numComps&&u>l&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){const e=i<=8?new Uint8Array(l):new Uint16Array(l);for(let t=0;t<l;t++)e[t]=t;const r=new Uint8ClampedArray(3*l);this.getRgbBuffer(e,0,l,r,0,i,0);if(h){f=new Uint8Array(3*u);let t=0;for(let e=0;e<u;++e){const n=3*s[e];f[t++]=r[n];f[t++]=r[n+1];f[t++]=r[n+2]}}else{let e=0;for(let n=0;n<u;++n){const o=3*s[n];t[e++]=r[o];t[e++]=r[o+1];t[e++]=r[o+2];e+=c}}}else if(h){f=new Uint8ClampedArray(3*u);this.getRgbBuffer(s,0,u,f,0,i,0)}else this.getRgbBuffer(s,0,n*a,t,0,i,c);if(f)if(h)!function resizeRgbImage(t,e,r,n,o,a,i){i=1!==i?0:i;const s=r/o,c=n/a;let u,f=0;const l=new Uint16Array(o),h=3*r;for(let t=0;t<o;t++)l[t]=3*Math.floor(t*s);for(let r=0;r<a;r++){const n=Math.floor(r*c)*h;for(let r=0;r<o;r++){u=n+l[r];e[f++]=t[u++];e[f++]=t[u++];e[f++]=t[u++];f+=i}}}(f,t,e,r,n,o,c);else{let e=0,r=0;for(let o=0,i=n*a;o<i;o++){t[e++]=f[r++];t[e++]=f[r++];t[e++]=f[r++];e+=c}}}get usesZeroToOneRange(){return shadow(this,"usesZeroToOneRange",!0)}static isDefaultDecode(t,e){if(isDefaultDecodeHelper(t,2*e))return!0;for(let e=0,r=t.length;e<r;e+=2)if(0!==t[e]||1!==t[e+1])return!1;return!0}}class AlternateCS extends ColorSpace{constructor(t,e,r){super("Alternate",t);this.base=e;this.tintFn=r;this.tmpBuf=new Float32Array(e.numComps)}getRgbItem(t,e,r,n){const o=this.tmpBuf;this.tintFn(t,e,o,0);this.base.getRgbItem(o,0,r,n)}getRgbBuffer(t,e,r,n,o,a,i){const s=this.tintFn,c=this.base,u=1/((1<<a)-1),f=c.numComps,l=c.usesZeroToOneRange,h=(c.isPassthrough(8)||!l)&&0===i;let p=h?o:0;const m=h?n:new Uint8ClampedArray(f*r),g=this.numComps,d=new Float32Array(g),y=new Float32Array(f);let b,w;for(b=0;b<r;b++){for(w=0;w<g;w++)d[w]=t[e++]*u;s(d,0,y,0);if(l)for(w=0;w<f;w++)m[p++]=255*y[w];else{c.getRgbItem(y,0,m,p);p+=f}}h||c.getRgbBuffer(m,0,r,n,o,8,i)}getOutputLength(t,e){return this.base.getOutputLength(t*this.base.numComps/this.numComps,e)}}class PatternCS extends ColorSpace{constructor(t){super("Pattern",null);this.base=t}isDefaultDecode(t,e){unreachable("Should not call PatternCS.isDefaultDecode")}}class IndexedCS extends ColorSpace{constructor(t,e,r){super("Indexed",1);this.base=t;this.highVal=e;const n=t.numComps*(e+1);this.lookup=new Uint8Array(n);if(r instanceof BaseStream){const t=r.getBytes(n);this.lookup.set(t)}else{if("string"!=typeof r)throw new FormatError(`IndexedCS - unrecognized lookup table: ${r}`);for(let t=0;t<n;++t)this.lookup[t]=255&r.charCodeAt(t)}}getRgbItem(t,e,r,n){const{base:o,highVal:a,lookup:i}=this,s=MathClamp(Math.round(t[e]),0,a)*o.numComps;o.getRgbBuffer(i,s,1,r,n,8,0)}getRgbBuffer(t,e,r,n,o,a,i){const{base:s,highVal:c,lookup:u}=this,{numComps:f}=s,l=s.getOutputLength(f,i);for(let a=0;a<r;++a){const r=MathClamp(Math.round(t[e++]),0,c)*f;s.getRgbBuffer(u,r,1,n,o,8,i);o+=l}}getOutputLength(t,e){return this.base.getOutputLength(t*this.base.numComps,e)}isDefaultDecode(t,e){if(isDefaultDecodeHelper(t,2))return!0;if(!Number.isInteger(e)||e<1){warn("Bits per component is not correct");return!0}return 0===t[0]&&t[1]===(1<<e)-1}}class DeviceGrayCS extends ColorSpace{constructor(){super("DeviceGray",1)}getRgbItem(t,e,r,n){const o=255*t[e];r[n]=r[n+1]=r[n+2]=o}getRgbBuffer(t,e,r,n,o,a,i){const s=255/((1<<a)-1);let c=e,u=o;for(let e=0;e<r;++e){const e=s*t[c++];n[u++]=e;n[u++]=e;n[u++]=e;u+=i}}getOutputLength(t,e){return t*(3+e)}}class DeviceRgbCS extends ColorSpace{constructor(){super("DeviceRGB",3)}getRgbItem(t,e,r,n){r[n]=255*t[e];r[n+1]=255*t[e+1];r[n+2]=255*t[e+2]}getRgbBuffer(t,e,r,n,o,a,i){if(8===a&&0===i){n.set(t.subarray(e,e+3*r),o);return}const s=255/((1<<a)-1);let c=e,u=o;for(let e=0;e<r;++e){n[u++]=s*t[c++];n[u++]=s*t[c++];n[u++]=s*t[c++];u+=i}}getOutputLength(t,e){return t*(3+e)/3|0}isPassthrough(t){return 8===t}}class DeviceRgbaCS extends ColorSpace{constructor(){super("DeviceRGBA",4)}getOutputLength(t,e){return 4*t}isPassthrough(t){return 8===t}fillRgb(t,e,r,n,o,a,i,s,c){r!==o||e!==n?function resizeRgbaImage(t,e,r,n,o,a,i){const s=r/o,c=n/a;let u=0;const f=new Uint16Array(o);if(1===i){for(let t=0;t<o;t++)f[t]=Math.floor(t*s);const n=new Uint32Array(t.buffer),i=new Uint32Array(e.buffer),l=FeatureTest.isLittleEndian?16777215:4294967040;for(let t=0;t<a;t++){const e=n.subarray(Math.floor(t*c)*r);for(let t=0;t<o;t++)i[u++]|=e[f[t]]&l}}else{const n=4,i=r*n;for(let t=0;t<o;t++)f[t]=Math.floor(t*s)*n;for(let r=0;r<a;r++){const n=t.subarray(Math.floor(r*c)*i);for(let t=0;t<o;t++){const r=f[t];e[u++]=n[r];e[u++]=n[r+1];e[u++]=n[r+2]}}}}(s,t,e,r,n,o,c):function copyRgbaImage(t,e,r){if(1===r){const r=new Uint32Array(t.buffer),n=new Uint32Array(e.buffer),o=FeatureTest.isLittleEndian?16777215:4294967040;for(let t=0,e=r.length;t<e;t++)n[t]|=r[t]&o}else{let r=0;for(let n=0,o=t.length;n<o;n+=4){e[r++]=t[n];e[r++]=t[n+1];e[r++]=t[n+2]}}}(s,t,c)}}class DeviceCmykCS extends ColorSpace{constructor(){super("DeviceCMYK",4)}#p(t,e,r,n,o){const a=t[e]*r,i=t[e+1]*r,s=t[e+2]*r,c=t[e+3]*r;n[o]=255+a*(-4.387332384609988*a+54.48615194189176*i+18.82290502165302*s+212.25662451639585*c-285.2331026137004)+i*(1.7149763477362134*i-5.6096736904047315*s+-17.873870861415444*c-5.497006427196366)+s*(-2.5217340131683033*s-21.248923337353073*c+17.5119270841813)+c*(-21.86122147463605*c-189.48180835922747);n[o+1]=255+a*(8.841041422036149*a+60.118027045597366*i+6.871425592049007*s+31.159100130055922*c-79.2970844816548)+i*(-15.310361306967817*i+17.575251261109482*s+131.35250912493976*c-190.9453302588951)+s*(4.444339102852739*s+9.8632861493405*c-24.86741582555878)+c*(-20.737325471181034*c-187.80453709719578);n[o+2]=255+a*(.8842522430003296*a+8.078677503112928*i+30.89978309703729*s-.23883238689178934*c-14.183576799673286)+i*(10.49593273432072*i+63.02378494754052*s+50.606957656360734*c-112.23884253719248)+s*(.03296041114873217*s+115.60384449646641*c-193.58209356861505)+c*(-22.33816807309886*c-180.12613974708367)}getRgbItem(t,e,r,n){this.#p(t,e,1,r,n)}getRgbBuffer(t,e,r,n,o,a,i){const s=1/((1<<a)-1);for(let a=0;a<r;a++){this.#p(t,e,s,n,o);e+=4;o+=3+i}}getOutputLength(t,e){return t/4*(3+e)|0}}class CalGrayCS extends ColorSpace{constructor(t,e,r){super("CalGray",1);if(!t)throw new FormatError("WhitePoint missing - required for color space CalGray");[this.XW,this.YW,this.ZW]=t;[this.XB,this.YB,this.ZB]=e||[0,0,0];this.G=r||1;if(this.XW<0||this.ZW<0||1!==this.YW)throw new FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);if(this.XB<0||this.YB<0||this.ZB<0){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||warn(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`);if(this.G<1){info(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`);this.G=1}}#p(t,e,r,n,o){const a=(t[e]*o)**this.G,i=this.YW*a,s=Math.max(295.8*i**.3333333333333333-40.8,0);r[n]=s;r[n+1]=s;r[n+2]=s}getRgbItem(t,e,r,n){this.#p(t,e,r,n,1)}getRgbBuffer(t,e,r,n,o,a,i){const s=1/((1<<a)-1);for(let a=0;a<r;++a){this.#p(t,e,n,o,s);e+=1;o+=3+i}}getOutputLength(t,e){return t*(3+e)}}class CalRGBCS extends ColorSpace{static#m=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]);static#g=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]);static#d=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]);static#y=new Float32Array([1,1,1]);static#b=new Float32Array(3);static#w=new Float32Array(3);static#v=new Float32Array(3);static#_=(24/116)**3/8;constructor(t,e,r,n){super("CalRGB",3);if(!t)throw new FormatError("WhitePoint missing - required for color space CalRGB");const[o,a,i]=this.whitePoint=t,[s,c,u]=this.blackPoint=e||new Float32Array(3);[this.GR,this.GG,this.GB]=r||new Float32Array([1,1,1]);[this.MXA,this.MYA,this.MZA,this.MXB,this.MYB,this.MZB,this.MXC,this.MYC,this.MZC]=n||new Float32Array([1,0,0,0,1,0,0,0,1]);if(o<0||i<0||1!==a)throw new FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);if(s<0||c<0||u<0){info(`Invalid BlackPoint for ${this.name} [${s}, ${c}, ${u}], falling back to default.`);this.blackPoint=new Float32Array(3)}if(this.GR<0||this.GG<0||this.GB<0){info(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`);this.GR=this.GG=this.GB=1}}#x(t,e,r){r[0]=t[0]*e[0]+t[1]*e[1]+t[2]*e[2];r[1]=t[3]*e[0]+t[4]*e[1]+t[5]*e[2];r[2]=t[6]*e[0]+t[7]*e[1]+t[8]*e[2]}#C(t,e,r){r[0]=1*e[0]/t[0];r[1]=1*e[1]/t[1];r[2]=1*e[2]/t[2]}#A(t,e,r){r[0]=.95047*e[0]/t[0];r[1]=1*e[1]/t[1];r[2]=1.08883*e[2]/t[2]}#S(t){return t<=.0031308?MathClamp(12.92*t,0,1):t>=.99554525?1:MathClamp(1.055*t**(1/2.4)-.055,0,1)}#R(t){return t<0?-this.#R(-t):t>8?((t+16)/116)**3:t*CalRGBCS.#_}#B(t,e,r){if(0===t[0]&&0===t[1]&&0===t[2]){r[0]=e[0];r[1]=e[1];r[2]=e[2];return}const n=this.#R(0),o=(1-n)/(1-this.#R(t[0])),a=1-o,i=(1-n)/(1-this.#R(t[1])),s=1-i,c=(1-n)/(1-this.#R(t[2])),u=1-c;r[0]=e[0]*o+a;r[1]=e[1]*i+s;r[2]=e[2]*c+u}#I(t,e,r){if(1===t[0]&&1===t[2]){r[0]=e[0];r[1]=e[1];r[2]=e[2];return}const n=r;this.#x(CalRGBCS.#m,e,n);const o=CalRGBCS.#b;this.#C(t,n,o);this.#x(CalRGBCS.#g,o,r)}#k(t,e,r){const n=r;this.#x(CalRGBCS.#m,e,n);const o=CalRGBCS.#b;this.#A(t,n,o);this.#x(CalRGBCS.#g,o,r)}#p(t,e,r,n,o){const a=MathClamp(t[e]*o,0,1),i=MathClamp(t[e+1]*o,0,1),s=MathClamp(t[e+2]*o,0,1),c=1===a?1:a**this.GR,u=1===i?1:i**this.GG,f=1===s?1:s**this.GB,l=this.MXA*c+this.MXB*u+this.MXC*f,h=this.MYA*c+this.MYB*u+this.MYC*f,p=this.MZA*c+this.MZB*u+this.MZC*f,m=CalRGBCS.#w;m[0]=l;m[1]=h;m[2]=p;const g=CalRGBCS.#v;this.#I(this.whitePoint,m,g);const d=CalRGBCS.#w;this.#B(this.blackPoint,g,d);const y=CalRGBCS.#v;this.#k(CalRGBCS.#y,d,y);const b=CalRGBCS.#w;this.#x(CalRGBCS.#d,y,b);r[n]=255*this.#S(b[0]);r[n+1]=255*this.#S(b[1]);r[n+2]=255*this.#S(b[2])}getRgbItem(t,e,r,n){this.#p(t,e,r,n,1)}getRgbBuffer(t,e,r,n,o,a,i){const s=1/((1<<a)-1);for(let a=0;a<r;++a){this.#p(t,e,n,o,s);e+=3;o+=3+i}}getOutputLength(t,e){return t*(3+e)/3|0}}class LabCS extends ColorSpace{constructor(t,e,r){super("Lab",3);if(!t)throw new FormatError("WhitePoint missing - required for color space Lab");[this.XW,this.YW,this.ZW]=t;[this.amin,this.amax,this.bmin,this.bmax]=r||[-100,100,-100,100];[this.XB,this.YB,this.ZB]=e||[0,0,0];if(this.XW<0||this.ZW<0||1!==this.YW)throw new FormatError("Invalid WhitePoint components, no fallback available");if(this.XB<0||this.YB<0||this.ZB<0){info("Invalid BlackPoint, falling back to default");this.XB=this.YB=this.ZB=0}if(this.amin>this.amax||this.bmin>this.bmax){info("Invalid Range, falling back to defaults");this.amin=-100;this.amax=100;this.bmin=-100;this.bmax=100}}#E(t){return t>=6/29?t**3:108/841*(t-4/29)}#M(t,e,r,n){return r+t*(n-r)/e}#p(t,e,r,n,o){let a=t[e],i=t[e+1],s=t[e+2];if(!1!==r){a=this.#M(a,r,0,100);i=this.#M(i,r,this.amin,this.amax);s=this.#M(s,r,this.bmin,this.bmax)}i>this.amax?i=this.amax:i<this.amin&&(i=this.amin);s>this.bmax?s=this.bmax:s<this.bmin&&(s=this.bmin);const c=(a+16)/116,u=c+i/500,f=c-s/200,l=this.XW*this.#E(u),h=this.YW*this.#E(c),p=this.ZW*this.#E(f);let m,g,d;if(this.ZW<1){m=3.1339*l+-1.617*h+-.4906*p;g=-.9785*l+1.916*h+.0333*p;d=.072*l+-.229*h+1.4057*p}else{m=3.2406*l+-1.5372*h+-.4986*p;g=-.9689*l+1.8758*h+.0415*p;d=.0557*l+-.204*h+1.057*p}n[o]=255*Math.sqrt(m);n[o+1]=255*Math.sqrt(g);n[o+2]=255*Math.sqrt(d)}getRgbItem(t,e,r,n){this.#p(t,e,!1,r,n)}getRgbBuffer(t,e,r,n,o,a,i){const s=(1<<a)-1;for(let a=0;a<r;a++){this.#p(t,e,s,n,o);e+=3;o+=3+i}}getOutputLength(t,e){return t*(3+e)/3|0}isDefaultDecode(t,e){return!0}get usesZeroToOneRange(){return shadow(this,"usesZeroToOneRange",!1)}}class QCMS{static#D=null;static _memory=null;static _mustAddAlpha=!1;static _destBuffer=null;static _destOffset=0;static _destLength=0;static _cssColor="";static _makeHexColor=null;static get _memoryArray(){const t=this.#D;return t?.byteLength?t:this.#D=new Uint8Array(this._memory.buffer)}}const f=Object.freeze({RGB8:0,0:"RGB8",RGBA8:1,1:"RGBA8",BGRA8:2,2:"BGRA8",Gray8:3,3:"Gray8",GrayA8:4,4:"GrayA8",CMYK:5,5:"CMYK"}),l=Object.freeze({Perceptual:0,0:"Perceptual",RelativeColorimetric:1,1:"RelativeColorimetric",Saturation:2,2:"Saturation",AbsoluteColorimetric:3,3:"AbsoluteColorimetric"});function __wbg_get_imports(){return{__proto__:null,"./qcms_bg.js":{__proto__:null,__wbg___wbindgen_throw_6b64449b9b9ed33c:function(t,e){throw new Error(function getStringFromWasm0(t,e){return function decodeText(t,e){g+=e;if(g>=m){p=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});p.decode();g=e}return p.decode(getUint8ArrayMemory0().subarray(t,t+e))}(t>>>=0,e)}(t,e))},__wbg_copy_result_0d15f3bf9d9012ae:function(t,e){!function copy_result(t,e){const{_mustAddAlpha:r,_destBuffer:n,_destOffset:o,_destLength:a,_memoryArray:i}=QCMS;if(e!==a)if(r)for(let r=t,a=t+e,s=o;r<a;r+=3,s+=4){n[s]=i[r];n[s+1]=i[r+1];n[s+2]=i[r+2];n[s+3]=255}else for(let r=t,a=t+e,s=o;r<a;r+=3,s+=4){n[s]=i[r];n[s+1]=i[r+1];n[s+2]=i[r+2]}else n.set(i.subarray(t,t+e),o)}(t>>>0,e>>>0)},__wbg_copy_rgb_0106d9d9464fce43:function(t){!function copy_rgb(t){const{_destBuffer:e,_destOffset:r,_memoryArray:n}=QCMS;e[r]=n[t];e[r+1]=n[t+1];e[r+2]=n[t+2]}(t>>>0)},__wbg_make_cssRGB_8e24b34f71f5363e:function(t){!function make_cssRGB(t){const{_memoryArray:e}=QCMS;QCMS._cssColor=QCMS._makeHexColor(e[t],e[t+1],e[t+2])}(t>>>0)},__wbindgen_init_externref_table:function(){const t=y.__wbindgen_externrefs,e=t.grow(4);t.set(0,void 0);t.set(e+0,void 0);t.set(e+1,null);t.set(e+2,!0);t.set(e+3,!1)}}}}let h=null;function getUint8ArrayMemory0(){null!==h&&0!==h.byteLength||(h=new Uint8Array(y.memory.buffer));return h}function passArray8ToWasm0(t,e){const r=e(1*t.length,1)>>>0;getUint8ArrayMemory0().set(t,r/1);b=t.length;return r}let p=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});p.decode();const m=2146435072;let g=0;let d,y,b=0;function __wbg_finalize_init(t,e){y=t.exports;d=e;h=null;y.__wbindgen_start();return y}function fetchSync(t){const e=new XMLHttpRequest;e.open("GET",t,!1);e.responseType="arraybuffer";e.send(null);return e.response}class IccColorSpace extends ColorSpace{#T;#O;static#s=!0;static#u=null;static#P=null;constructor(t,e,r){if(!IccColorSpace.isUsable)throw new Error("No ICC color space support");super(e,r);let n;switch(r){case 1:n=f.Gray8;this.#O=(t,e,r)=>function qcms_convert_one(t,e,r){y.qcms_convert_one(t,e,r)}(this.#T,255*t[e],r);break;case 3:n=f.RGB8;this.#O=(t,e,r)=>function qcms_convert_three(t,e,r,n,o){y.qcms_convert_three(t,e,r,n,o)}(this.#T,255*t[e],255*t[e+1],255*t[e+2],r);break;case 4:n=f.CMYK;this.#O=(t,e,r)=>function qcms_convert_four(t,e,r,n,o,a){y.qcms_convert_four(t,e,r,n,o,a)}(this.#T,255*t[e],255*t[e+1],255*t[e+2],255*t[e+3],r);break;default:throw new Error(`Unsupported number of components: ${r}`)}this.#T=function qcms_transformer_from_memory(t,e,r){const n=passArray8ToWasm0(t,y.__wbindgen_malloc),o=b;return y.qcms_transformer_from_memory(n,o,e,r)>>>0}(t,n,l.Perceptual);if(!this.#T)throw new Error("Failed to create ICC color space");IccColorSpace.#P||=new FinalizationRegistry(t=>{!function qcms_drop_transformer(t){y.qcms_drop_transformer(t)}(t)});IccColorSpace.#P.register(this,this.#T)}getRgbHex(t,e){this.#O(t,e,!0);return QCMS._cssColor}getRgbItem(t,e,r,n){QCMS._destBuffer=r;QCMS._destOffset=n;QCMS._destLength=3;this.#O(t,e,!1);QCMS._destBuffer=null}getRgbBuffer(t,e,r,n,o,a,i){t=t.subarray(e,e+r*this.numComps);if(8!==a){const e=255/((1<<a)-1);for(let r=0,n=t.length;r<n;r++)t[r]*=e}QCMS._mustAddAlpha=i&&n.buffer===t.buffer;QCMS._destBuffer=n;QCMS._destOffset=o;QCMS._destLength=r*(3+i);!function qcms_convert_array(t,e){const r=passArray8ToWasm0(e,y.__wbindgen_malloc),n=b;y.qcms_convert_array(t,r,n)}(this.#T,t);QCMS._mustAddAlpha=!1;QCMS._destBuffer=null}getOutputLength(t,e){return t/this.numComps*(3+e)|0}static setOptions({useWasm:t,useWorkerFetch:e,wasmUrl:r}){if(e){this.#s=t;this.#u=r}else this.#s=!1}static get isUsable(){let t=!1;if(this.#s)if(this.#u)try{this._module=function initSync(t){if(void 0!==y)return y;void 0!==t&&(Object.getPrototypeOf(t)===Object.prototype?({module:t}=t):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const e=__wbg_get_imports();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));return __wbg_finalize_init(new WebAssembly.Instance(t,e),t)}({module:fetchSync(`${this.#u}qcms_bg.wasm`)});t=!!this._module;QCMS._memory=this._module.memory;QCMS._makeHexColor=Util.makeHexColor.bind(Util)}catch(t){warn(`ICCBased color space: "${t}".`)}else warn("No ICC color space support due to missing `wasmUrl` API option");return shadow(this,"isUsable",t)}}class CmykICCBasedCS extends IccColorSpace{static#U;constructor(){super(new Uint8Array(fetchSync(`${CmykICCBasedCS.#U}CGATS001Compat-v2-micro.icc`)),"DeviceCMYK",4)}static setOptions({iccUrl:t}){this.#U=t}static get isUsable(){let t=!1;IccColorSpace.isUsable&&(this.#U?t=!0:warn("No CMYK ICC profile support due to missing `iccUrl` API option"));return shadow(this,"isUsable",t)}}class ColorSpaceUtils{static parse({cs:t,xref:e,resources:r=null,pdfFunctionFactory:n,globalColorSpaceCache:o,localColorSpaceCache:a,asyncIfNotCached:i=!1}){const s={xref:e,resources:r,pdfFunctionFactory:n,globalColorSpaceCache:o,localColorSpaceCache:a};let c,u,f;if(t instanceof Ref){u=t;const r=o.getByRef(u)||a.getByRef(u);if(r)return r;t=e.fetch(t)}if(t instanceof Name){c=t.name;const e=a.getByName(c);if(e)return e}try{f=this.#F(t,s)}catch(t){if(i&&!(t instanceof MissingDataException))return Promise.reject(t);throw t}if(c||u){a.set(c,u,f);u&&o.set(null,u,f)}return i?Promise.resolve(f):f}static#L(t,e){const{globalColorSpaceCache:r}=e;let n;if(t instanceof Ref){n=t;const e=r.getByRef(n);if(e)return e}const o=this.#F(t,e);n&&r.set(null,n,o);return o}static#F(t,e){const{xref:r,resources:n,pdfFunctionFactory:o,globalColorSpaceCache:a}=e;if((t=r.fetchIfRef(t))instanceof Name)switch(t.name){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"DeviceRGBA":return this.rgba;case"CMYK":case"DeviceCMYK":return this.cmyk;case"Pattern":return new PatternCS(null);default:if(n instanceof Dict){const r=n.get("ColorSpace");if(r instanceof Dict){const n=r.get(t.name);if(n){if(n instanceof Name)return this.#F(n,e);t=n;break}}}warn(`Unrecognized ColorSpace: ${t.name}`);return this.gray}if(Array.isArray(t)){const n=r.fetchIfRef(t[0]).name;let i,s,c,u,f,l;switch(n){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"CMYK":case"DeviceCMYK":return this.cmyk;case"CalGray":i=r.fetchIfRef(t[1]);u=i.getArray("WhitePoint");f=i.getArray("BlackPoint");l=i.get("Gamma");return new CalGrayCS(u,f,l);case"CalRGB":i=r.fetchIfRef(t[1]);u=i.getArray("WhitePoint");f=i.getArray("BlackPoint");l=i.getArray("Gamma");const h=i.getArray("Matrix");return new CalRGBCS(u,f,l,h);case"ICCBased":const p=t[1]instanceof Ref;if(p){const e=a.getByRef(t[1]);if(e)return e}const m=r.fetchIfRef(t[1]),g=m.dict;s=g.get("N");if(IccColorSpace.isUsable)try{const e=new IccColorSpace(m.getBytes(),"ICCBased",s);p&&a.set(null,t[1],e);return e}catch(e){if(e instanceof MissingDataException)throw e;warn(`ICCBased color space (${t[1]}): "${e}".`)}const d=g.getRaw("Alternate");if(d){const t=this.#L(d,e);if(t.numComps===s)return t;warn("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===s)return this.gray;if(3===s)return this.rgb;if(4===s)return this.cmyk;break;case"Pattern":c=t[1]||null;c&&(c=this.#L(c,e));return new PatternCS(c);case"I":case"Indexed":c=this.#L(t[1],e);const y=MathClamp(r.fetchIfRef(t[2]),0,255),b=r.fetchIfRef(t[3]);return new IndexedCS(c,y,b);case"Separation":case"DeviceN":const w=r.fetchIfRef(t[1]);s=Array.isArray(w)?w.length:1;c=this.#L(t[2],e);const v=o.create(t[3]);return new AlternateCS(s,c,v);case"Lab":i=r.fetchIfRef(t[1]);u=i.getArray("WhitePoint");f=i.getArray("BlackPoint");const _=i.getArray("Range");return new LabCS(u,f,_);default:warn(`Unimplemented ColorSpace object: ${n}`);return this.gray}}warn(`Unrecognized ColorSpace object: ${t}`);return this.gray}static get gray(){return shadow(this,"gray",new DeviceGrayCS)}static get rgb(){return shadow(this,"rgb",new DeviceRgbCS)}static get rgba(){return shadow(this,"rgba",new DeviceRgbaCS)}static get cmyk(){if(CmykICCBasedCS.isUsable)try{return shadow(this,"cmyk",new CmykICCBasedCS)}catch{warn("CMYK fallback: DeviceCMYK")}return shadow(this,"cmyk",new DeviceCmykCS)}}class JpegError extends a{constructor(t){super(t,"JpegError")}}class DNLMarkerError extends a{constructor(t,e){super(t,"DNLMarkerError");this.scanLines=e}}class EOIMarkerError extends a{constructor(t){super(t,"EOIMarkerError")}}const w=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]),v=4017,_=799,x=3406,C=2276,A=1567,S=3784,R=5793,B=2896;function buildHuffmanTable(t,e){let r,n,o=0,a=16;for(;a>0&&!t[a-1];)a--;const i=[{children:[],index:0}];let s,c=i[0];for(r=0;r<a;r++){for(n=0;n<t[r];n++){c=i.pop();c.children[c.index]=e[o];for(;c.index>0;)c=i.pop();c.index++;i.push(c);for(;i.length<=r;){i.push(s={children:[],index:0});c.children[c.index]=s.children;c=s}o++}if(r+1<a){i.push(s={children:[],index:0});c.children[c.index]=s.children;c=s}}return i[0].children}function getBlockBufferOffset(t,e,r){return 64*((t.blocksPerLine+1)*e+r)}function decodeScan(t,e,r,n,o,a,i,s,c,u,f=!1){const l=n.mcusPerLine,h=n.progressive,p=r;let m=0,g=0;function readBit(){if(g>0){g--;return m>>g&1}m=t[r++];if(255===m){const o=t[r++];if(o){if(220===o&&f){r+=2;const t=e.getUint16(r);r+=2;if(t>0&&t!==n.scanLines)throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data",t)}else if(217===o){if(f){const t=v*(8===n.precision?8:0);if(t>0&&Math.round(n.scanLines/t)>=5)throw new DNLMarkerError("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",t)}throw new EOIMarkerError("Found EOI marker (0xFFD9) while parsing scan data")}throw new JpegError(`unexpected marker ${(m<<8|o).toString(16)}`)}}g=7;return m>>>7}function decodeHuffman(t){let e=t;for(;;){e=e[readBit()];switch(typeof e){case"number":return e;case"object":continue}throw new JpegError("invalid huffman sequence")}}function receive(t){let e=0;for(;t>0;){e=e<<1|readBit();t--}return e}function receiveAndExtend(t){if(1===t)return 1===readBit()?1:-1;const e=receive(t);return e>=1<<t-1?e:e+(-1<<t)+1}let d=0;let y,b=0;let v=0;function decodeMcu(t,e,r,n,o){const a=r%l;v=(r/l|0)*t.v+n;const i=a*t.h+o;e(t,getBlockBufferOffset(t,v,i))}function decodeBlock(t,e,r){v=r/t.blocksPerLine|0;const n=r%t.blocksPerLine;e(t,getBlockBufferOffset(t,v,n))}const _=o.length;let x,C,A,S,R,B;B=h?0===i?0===c?function decodeDCFirst(t,e){const r=decodeHuffman(t.huffmanTableDC),n=0===r?0:receiveAndExtend(r)<<u;t.blockData[e]=t.pred+=n}:function decodeDCSuccessive(t,e){t.blockData[e]|=readBit()<<u}:0===c?function decodeACFirst(t,e){if(d>0){d--;return}let r=i;const n=s;for(;r<=n;){const n=decodeHuffman(t.huffmanTableAC),o=15&n,a=n>>4;if(0===o){if(a<15){d=receive(a)+(1<<a)-1;break}r+=16;continue}r+=a;const i=w[r];t.blockData[e+i]=receiveAndExtend(o)*(1<<u);r++}}:function decodeACSuccessive(t,e){let r=i;const n=s;let o,a,c=0;for(;r<=n;){const n=e+w[r],i=t.blockData[n]<0?-1:1;switch(b){case 0:a=decodeHuffman(t.huffmanTableAC);o=15&a;c=a>>4;if(0===o)if(c<15){d=receive(c)+(1<<c);b=4}else{c=16;b=1}else{if(1!==o)throw new JpegError("invalid ACn encoding");y=receiveAndExtend(o);b=c?2:3}continue;case 1:case 2:if(t.blockData[n])t.blockData[n]+=i*(readBit()<<u);else{c--;0===c&&(b=2===b?3:0)}break;case 3:if(t.blockData[n])t.blockData[n]+=i*(readBit()<<u);else{t.blockData[n]=y<<u;b=0}break;case 4:t.blockData[n]&&(t.blockData[n]+=i*(readBit()<<u))}r++}if(4===b){d--;0===d&&(b=0)}}:function decodeBaseline(t,e){const r=decodeHuffman(t.huffmanTableDC),n=0===r?0:receiveAndExtend(r);t.blockData[e]=t.pred+=n;let o=1;for(;o<64;){const r=decodeHuffman(t.huffmanTableAC),n=15&r,a=r>>4;if(0===n){if(a<15)break;o+=16;continue}o+=a;const i=w[o];t.blockData[e+i]=receiveAndExtend(n);o++}};let I,k=0;const E=1===_?o[0].blocksPerLine*o[0].blocksPerColumn:l*n.mcusPerColumn;let M,D;for(;k<=E;){const n=a?Math.min(E-k,a):E;if(n>0){for(C=0;C<_;C++)o[C].pred=0;d=0;if(1===_){x=o[0];for(R=0;R<n;R++){decodeBlock(x,B,k);k++}}else for(R=0;R<n;R++){for(C=0;C<_;C++){x=o[C];M=x.h;D=x.v;for(A=0;A<D;A++)for(S=0;S<M;S++)decodeMcu(x,B,k,A,S)}k++}}g=0;I=findNextFileMarker(t,e,r);if(!I)break;if(I.invalid){warn(`decodeScan - ${n>0?"unexpected":"excessive"} MCU data, current marker is: ${I.invalid}`);r=I.offset}if(!(I.marker>=65488&&I.marker<=65495))break;r+=2}return r-p}function quantizeAndInverse(t,e,r){const n=t.quantizationTable,o=t.blockData;let a,i,s,c,u,f,l,h,p,m,g,d,y,b,w,I,k;if(!n)throw new JpegError("missing required Quantization Table.");for(let t=0;t<64;t+=8){p=o[e+t];m=o[e+t+1];g=o[e+t+2];d=o[e+t+3];y=o[e+t+4];b=o[e+t+5];w=o[e+t+6];I=o[e+t+7];p*=n[t];if(0!==(m|g|d|y|b|w|I)){m*=n[t+1];g*=n[t+2];d*=n[t+3];y*=n[t+4];b*=n[t+5];w*=n[t+6];I*=n[t+7];a=R*p+128>>8;i=R*y+128>>8;s=g;c=w;u=B*(m-I)+128>>8;h=B*(m+I)+128>>8;f=d<<4;l=b<<4;a=a+i+1>>1;i=a-i;k=s*S+c*A+128>>8;s=s*A-c*S+128>>8;c=k;u=u+l+1>>1;l=u-l;h=h+f+1>>1;f=h-f;a=a+c+1>>1;c=a-c;i=i+s+1>>1;s=i-s;k=u*C+h*x+2048>>12;u=u*x-h*C+2048>>12;h=k;k=f*_+l*v+2048>>12;f=f*v-l*_+2048>>12;l=k;r[t]=a+h;r[t+7]=a-h;r[t+1]=i+l;r[t+6]=i-l;r[t+2]=s+f;r[t+5]=s-f;r[t+3]=c+u;r[t+4]=c-u}else{k=R*p+512>>10;r[t]=k;r[t+1]=k;r[t+2]=k;r[t+3]=k;r[t+4]=k;r[t+5]=k;r[t+6]=k;r[t+7]=k}}for(let t=0;t<8;++t){p=r[t];m=r[t+8];g=r[t+16];d=r[t+24];y=r[t+32];b=r[t+40];w=r[t+48];I=r[t+56];if(0!==(m|g|d|y|b|w|I)){a=R*p+2048>>12;i=R*y+2048>>12;s=g;c=w;u=B*(m-I)+2048>>12;h=B*(m+I)+2048>>12;f=d;l=b;a=4112+(a+i+1>>1);i=a-i;k=s*S+c*A+2048>>12;s=s*A-c*S+2048>>12;c=k;u=u+l+1>>1;l=u-l;h=h+f+1>>1;f=h-f;a=a+c+1>>1;c=a-c;i=i+s+1>>1;s=i-s;k=u*C+h*x+2048>>12;u=u*x-h*C+2048>>12;h=k;k=f*_+l*v+2048>>12;f=f*v-l*_+2048>>12;l=k;p=a+h;I=a-h;m=i+l;w=i-l;g=s+f;b=s-f;d=c+u;y=c-u;p<16?p=0:p>=4080?p=255:p>>=4;m<16?m=0:m>=4080?m=255:m>>=4;g<16?g=0:g>=4080?g=255:g>>=4;d<16?d=0:d>=4080?d=255:d>>=4;y<16?y=0:y>=4080?y=255:y>>=4;b<16?b=0:b>=4080?b=255:b>>=4;w<16?w=0:w>=4080?w=255:w>>=4;I<16?I=0:I>=4080?I=255:I>>=4;o[e+t]=p;o[e+t+8]=m;o[e+t+16]=g;o[e+t+24]=d;o[e+t+32]=y;o[e+t+40]=b;o[e+t+48]=w;o[e+t+56]=I}else{k=R*p+8192>>14;k=k<-2040?0:k>=2024?255:k+2056>>4;o[e+t]=k;o[e+t+8]=k;o[e+t+16]=k;o[e+t+24]=k;o[e+t+32]=k;o[e+t+40]=k;o[e+t+48]=k;o[e+t+56]=k}}}function buildComponentData(t,e){const r=e.blocksPerLine,n=e.blocksPerColumn,o=new Int16Array(64);for(let t=0;t<n;t++)for(let n=0;n<r;n++){quantizeAndInverse(e,getBlockBufferOffset(e,t,n),o)}return e.blockData}function findNextFileMarker(t,e,r,n=r){const o=t.length-1;let a=n<r?n:r;if(r>=o)return null;const i=e.getUint16(r);if(i>=65472&&i<=65534)return{invalid:null,marker:i,offset:r};let s=e.getUint16(a);for(;!(s>=65472&&s<=65534);){if(++a>=o)return null;s=e.getUint16(a)}return{invalid:i.toString(16),marker:s,offset:a}}function prepareComponents(t){const e=Math.ceil(t.samplesPerLine/8/t.maxH),r=Math.ceil(t.scanLines/8/t.maxV);for(const n of t.components){const o=Math.ceil(Math.ceil(t.samplesPerLine/8)*n.h/t.maxH),a=Math.ceil(Math.ceil(t.scanLines/8)*n.v/t.maxV),i=e*n.h,s=64*(r*n.v)*(i+1);n.blockData=new Int16Array(s);n.blocksPerLine=o;n.blocksPerColumn=a}t.mcusPerLine=e;t.mcusPerColumn=r}function readDataBlock(t,e,r){const n=e.getUint16(r);let o=(r+=2)+n-2;const a=findNextFileMarker(t,e,o,r);if(a?.invalid){warn("readDataBlock - incorrect length, current marker is: "+a.invalid);o=a.offset}const i=t.subarray(r,o);return{appData:i,oldOffset:r,newOffset:r+i.length}}function skipData(t,e,r){const n=e.getUint16(r),o=(r+=2)+n-2,a=findNextFileMarker(t,e,o,r);return a?.invalid?a.offset:o}class JpegImage{constructor({decodeTransform:t=null,colorTransform:e=-1}={}){this._decodeTransform=t;this._colorTransform=e}static canUseImageDecoder(t,e=-1){const r=new DataView(t.buffer,t.byteOffset,t.byteLength);let n=null,o=0,a=null,i=r.getUint16(o);o+=2;if(65496!==i)throw new JpegError("SOI not found");i=r.getUint16(o);o+=2;t:for(;65497!==i;){switch(i){case 65505:const{appData:e,oldOffset:s,newOffset:c}=readDataBlock(t,r,o);o=c;if(69===e[0]&&120===e[1]&&105===e[2]&&102===e[3]&&0===e[4]&&0===e[5]){if(n)throw new JpegError("Duplicate EXIF-blocks found.");n={exifStart:s+6,exifEnd:c}}i=r.getUint16(o);o+=2;continue;case 65472:case 65473:case 65474:a=t[o+7];break t;case 65535:255!==t[o]&&o--}o=skipData(t,r,o);i=r.getUint16(o);o+=2}return 4===a||3===a&&0===e?null:n||{}}parse(t,{dnlScanLines:e=null}={}){const r=new DataView(t.buffer,t.byteOffset,t.byteLength),n=t.length-1;let o,a,i=0,s=null,c=null,u=0;const f=[],l=[],h=[];let p=r.getUint16(i);i+=2;if(65496!==p)throw new JpegError("SOI not found");p=r.getUint16(i);i+=2;t:for(;65497!==p;){let m,g,d;switch(p){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{appData:y,newOffset:b}=readDataBlock(t,r,i);i=b;65504===p&&74===y[0]&&70===y[1]&&73===y[2]&&70===y[3]&&0===y[4]&&(s={version:{major:y[5],minor:y[6]},densityUnits:y[7],xDensity:y[8]<<8|y[9],yDensity:y[10]<<8|y[11],thumbWidth:y[12],thumbHeight:y[13],thumbData:y.subarray(14,14+3*y[12]*y[13])});65518===p&&65===y[0]&&100===y[1]&&111===y[2]&&98===y[3]&&101===y[4]&&(c={version:y[5]<<8|y[6],flags0:y[7]<<8|y[8],flags1:y[9]<<8|y[10],transformCode:y[11]});break;case 65499:const v=r.getUint16(i);i+=2;const _=v+i-2;let x;for(;i<_;){const e=t[i++],n=new Uint16Array(64);if(e>>4){if(e>>4!=1)throw new JpegError("DQT - invalid table spec");for(g=0;g<64;g++){x=w[g];n[x]=r.getUint16(i);i+=2}}else for(g=0;g<64;g++){x=w[g];n[x]=t[i++]}f[15&e]=n}break;case 65472:case 65473:case 65474:if(o)throw new JpegError("Only single frame JPEGs supported");i+=2;o={};o.extended=65473===p;o.progressive=65474===p;o.precision=t[i++];const C=r.getUint16(i);i+=2;o.scanLines=e||C;o.samplesPerLine=r.getUint16(i);i+=2;o.components=[];o.componentIds={};const A=t[i++];let S=0,R=0;for(m=0;m<A;m++){const e=t[i],r=t[i+1]>>4,n=15&t[i+1];S<r&&(S=r);R<n&&(R=n);const a=t[i+2];d=o.components.push({h:r,v:n,quantizationId:a,quantizationTable:null});o.componentIds[e]=d-1;i+=3}o.maxH=S;o.maxV=R;prepareComponents(o);break;case 65476:const B=r.getUint16(i);i+=2;for(m=2;m<B;){const e=t[i++],r=new Uint8Array(16);let n=0;for(g=0;g<16;g++,i++)n+=r[g]=t[i];const o=new Uint8Array(n);for(g=0;g<n;g++,i++)o[g]=t[i];m+=17+n;(e>>4?l:h)[15&e]=buildHuffmanTable(r,o)}break;case 65501:i+=2;a=r.getUint16(i);i+=2;break;case 65498:const I=1===++u&&!e;i+=2;const k=t[i++],E=[];for(m=0;m<k;m++){const e=t[i++],r=o.componentIds[e],n=o.components[r];n.index=e;const a=t[i++];n.huffmanTableDC=h[a>>4];n.huffmanTableAC=l[15&a];E.push(n)}const M=t[i++],D=t[i++],T=t[i++];try{i+=decodeScan(t,r,i,o,E,a,M,D,T>>4,15&T,I)}catch(e){if(e instanceof DNLMarkerError){warn(`${e.message} -- attempting to re-parse the JPEG image.`);return this.parse(t,{dnlScanLines:e.scanLines})}if(e instanceof EOIMarkerError){warn(`${e.message} -- ignoring the rest of the image data.`);break t}throw e}break;case 65500:i+=4;break;case 65535:255!==t[i]&&i--;break;default:const O=findNextFileMarker(t,r,i-2,i-3);if(O?.invalid){warn("JpegImage.parse - unexpected data, current marker is: "+O.invalid);i=O.offset;break}if(!O||i>=n){warn("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break t}throw new JpegError("JpegImage.parse - unknown marker: "+p.toString(16))}if(i<n){p=r.getUint16(i);i+=2}else p=0}if(!o)throw new JpegError("JpegImage.parse - no frame data found.");this.width=o.samplesPerLine;this.height=o.scanLines;this.jfif=s;this.adobe=c;this.components=[];for(const t of o.components){const e=f[t.quantizationId];e&&(t.quantizationTable=e);this.components.push({index:t.index,output:buildComponentData(0,t),scaleX:t.h/o.maxH,scaleY:t.v/o.maxV,blocksPerLine:t.blocksPerLine,blocksPerColumn:t.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(t,e,r=!1){const n=this.width/t,o=this.height/e;let a,i,s,c,u,f,l,h,p,m,g,d=0;const y=this.components.length,b=t*e*y,w=new Uint8ClampedArray(b),v=new Uint32Array(t),_=4294967288;let x;for(l=0;l<y;l++){a=this.components[l];i=a.scaleX*n;s=a.scaleY*o;d=l;g=a.output;c=a.blocksPerLine+1<<3;if(i!==x){for(u=0;u<t;u++){h=0|u*i;v[u]=(h&_)<<3|7&h}x=i}for(f=0;f<e;f++){h=0|f*s;m=c*(h&_)|(7&h)<<3;for(u=0;u<t;u++){w[d]=g[m+v[u]];d+=y}}}let C=this._decodeTransform;r||4!==y||C||(C=new Int32Array([-256,255,-256,255,-256,255,-256,255]));if(C)for(l=0;l<b;)for(h=0,p=0;h<y;h++,l++,p+=2)w[l]=(w[l]*C[p]>>8)+C[p+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(t){let e,r,n;for(let o=0,a=t.length;o<a;o+=3){e=t[o];r=t[o+1];n=t[o+2];t[o]=e-179.456+1.402*n;t[o+1]=e+135.459-.344*r-.714*n;t[o+2]=e-226.816+1.772*r}return t}_convertYccToRgba(t,e){for(let r=0,n=0,o=t.length;r<o;r+=3,n+=4){const o=t[r],a=t[r+1],i=t[r+2];e[n]=o-179.456+1.402*i;e[n+1]=o+135.459-.344*a-.714*i;e[n+2]=o-226.816+1.772*a;e[n+3]=255}return e}_convertYcckToRgb(t){this._convertYcckToCmyk(t);return this._convertCmykToRgb(t)}_convertYcckToRgba(t){this._convertYcckToCmyk(t);return this._convertCmykToRgba(t)}_convertYcckToCmyk(t){let e,r,n;for(let o=0,a=t.length;o<a;o+=4){e=t[o];r=t[o+1];n=t[o+2];t[o]=434.456-e-1.402*n;t[o+1]=119.541-e+.344*r+.714*n;t[o+2]=481.816-e-1.772*r}return t}_convertCmykToRgb(t){const e=t.length/4;ColorSpaceUtils.cmyk.getRgbBuffer(t,0,e,t,0,8,0);return t.subarray(0,3*e)}_convertCmykToRgba(t){ColorSpaceUtils.cmyk.getRgbBuffer(t,0,t.length/4,t,0,8,1);if(ColorSpaceUtils.cmyk instanceof DeviceCmykCS)for(let e=3,r=t.length;e<r;e+=4)t[e]=255;return t}getData({width:t,height:e,forceRGBA:r=!1,forceRGB:n=!1,isSourcePDF:o=!1}){if(this.numComponents>4)throw new JpegError("Unsupported color mode");const a=this._getLinearizedBlockData(t,e,o);if(1===this.numComponents&&(r||n)){const t=a.length*(r?4:3),e=new Uint8ClampedArray(t);let n=0;if(r)!function grayToRGBA(t,e){if(FeatureTest.isLittleEndian)for(let r=0,n=t.length;r<n;r++)e[r]=65793*t[r]|4278190080;else for(let r=0,n=t.length;r<n;r++)e[r]=16843008*t[r]|255}(a,new Uint32Array(e.buffer));else for(const t of a){e[n++]=t;e[n++]=t;e[n++]=t}return e}if(3===this.numComponents&&this._isColorConversionNeeded){if(r){const t=new Uint8ClampedArray(a.length/3*4);return this._convertYccToRgba(a,t)}return this._convertYccToRgb(a)}if(4===this.numComponents){if(this._isColorConversionNeeded)return r?this._convertYcckToRgba(a):n?this._convertYcckToRgb(a):this._convertYcckToCmyk(a);if(r)return this._convertCmykToRgba(a);if(n)return this._convertCmykToRgb(a)}return a}}const I=async function OpenJPEG(t={}){var e=t,r="./this.program",quit_=(t,e)=>{throw e},n=import.meta.url;try{new URL(".",n).href}catch{}0;var o,a,i,s,c,u,f,l=console.log.bind(console),h=console.error.bind(console),p=!1,m=!1;function updateMemoryViews(){var t=d.buffer;c=new Int8Array(t);new Int16Array(t);f=new Uint8Array(t);new Uint16Array(t);s=new Int32Array(t);u=new Uint32Array(t);new Float32Array(t);new Float64Array(t);new BigInt64Array(t);new BigUint64Array(t)}class ExitStatus{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`;this.status=t}}var g,d,callRuntimeCallbacks=t=>{for(;t.length>0;)t.shift()(e)},y=[],addOnPostRun=t=>y.push(t),b=[],addOnPreRun=t=>b.push(t),w=!0,v=0,_={},handleException=t=>{if(t instanceof ExitStatus||"unwind"==t)return o;quit_(0,t)},keepRuntimeAlive=()=>w||v>0,_proc_exit=t=>{o=t;if(!keepRuntimeAlive()){e.onExit?.(t);p=!0}quit_(0,new ExitStatus(t))},_exit=(t,e)=>{o=t;_proc_exit(t)},callUserCallback=t=>{if(!p)try{return t()}catch(t){handleException(t)}finally{(()=>{if(!keepRuntimeAlive())try{_exit(o)}catch(t){handleException(t)}})()}},alignMemory=(t,e)=>Math.ceil(t/e)*e,growMemory=t=>{var e=(t-d.buffer.byteLength+65535)/65536|0;try{d.grow(e);updateMemoryViews();return 1}catch(t){}},x={},getEnvStrings=()=>{if(!getEnvStrings.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:r||"./this.program"};for(var e in x)void 0===x[e]?delete t[e]:t[e]=x[e];var n=[];for(var e in t)n.push(`${e}=${t[e]}`);getEnvStrings.strings=n}return getEnvStrings.strings},stringToUTF8=(t,e,r)=>((t,e,r,n)=>{if(!(n>0))return 0;for(var o=r,a=r+n-1,i=0;i<t.length;++i){var s=t.codePointAt(i);if(s<=127){if(r>=a)break;e[r++]=s}else if(s<=2047){if(r+1>=a)break;e[r++]=192|s>>6;e[r++]=128|63&s}else if(s<=65535){if(r+2>=a)break;e[r++]=224|s>>12;e[r++]=128|s>>6&63;e[r++]=128|63&s}else{if(r+3>=a)break;e[r++]=240|s>>18;e[r++]=128|s>>12&63;e[r++]=128|s>>6&63;e[r++]=128|63&s;i++}}e[r]=0;return r-o})(t,f,e,r),lengthBytesUTF8=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);if(n<=127)e++;else if(n<=2047)e+=2;else if(n>=55296&&n<=57343){e+=4;++r}else e+=3}return e},C=[null,[],[]],A=globalThis.TextDecoder&&new TextDecoder,UTF8ArrayToString=(t,e=0,r,n)=>{var o=((t,e,r,n)=>{var o=e+r;if(n)return o;for(;t[e]&&!(e>=o);)++e;return e})(t,e,r,n);if(o-e>16&&t.buffer&&A)return A.decode(t.subarray(e,o));for(var a="";e<o;){var i=t[e++];if(128&i){var s=63&t[e++];if(192!=(224&i)){var c=63&t[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|c:(7&i)<<18|s<<12|c<<6|63&t[e++])<65536)a+=String.fromCharCode(i);else{var u=i-65536;a+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},printChar=(t,e)=>{var r=C[t];if(0===e||10===e){(1===t?l:h)(UTF8ArrayToString(r));r.length=0}else r.push(e)},UTF8ToString=(t,e,r)=>t?UTF8ArrayToString(f,t,e,r):"";e.noExitRuntime&&(w=e.noExitRuntime);e.print&&(l=e.print);e.printErr&&(h=e.printErr);e.wasmBinary&&e.wasmBinary;e.arguments&&e.arguments;e.thisProgram&&(r=e.thisProgram);if(e.preInit){"function"==typeof e.preInit&&(e.preInit=[e.preInit]);for(;e.preInit.length>0;)e.preInit.shift()()}e.writeArrayToMemory=(t,e)=>{c.set(t,e)};var S,R={m:()=>function abort(t){e.onAbort?.(t);h(t=`Aborted(${t})`);p=!0;t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);i?.(r);throw r}(""),l:()=>{w=!1;v=0},i:(t,e)=>{if(_[t]){clearTimeout(_[t].id);delete _[t]}if(!e)return 0;var r=setTimeout(()=>{delete _[t];callUserCallback(()=>g(t,performance.now()))},e);_[t]={id:r,timeout_ms:e};return 0},f:function _copy_pixels_1(t,r){t>>=2;const n=e.imageData=new Uint8ClampedArray(r),o=s.subarray(t,t+r);n.set(o)},e:function _copy_pixels_3(t,r,n,o){t>>=2;r>>=2;n>>=2;const a=e.imageData=new Uint8ClampedArray(3*o),i=s.subarray(t,t+o),c=s.subarray(r,r+o),u=s.subarray(n,n+o);for(let t=0;t<o;t++){a[3*t]=i[t];a[3*t+1]=c[t];a[3*t+2]=u[t]}},d:function _copy_pixels_4(t,r,n,o,a){t>>=2;r>>=2;n>>=2;o>>=2;const i=e.imageData=new Uint8ClampedArray(4*a),c=s.subarray(t,t+a),u=s.subarray(r,r+a),f=s.subarray(n,n+a),l=s.subarray(o,o+a);for(let t=0;t<a;t++){i[4*t]=c[t];i[4*t+1]=u[t];i[4*t+2]=f[t];i[4*t+3]=l[t]}},j:t=>{var e=f.length,r=2147483648;if((t>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var o=e*(1+.2/n);o=Math.min(o,t+100663296);var a=Math.min(r,alignMemory(Math.max(t,o),65536));if(growMemory(a))return!0}return!1},o:(t,e)=>{var r=0,n=0;for(var o of getEnvStrings()){var a=e+r;u[t+n>>2]=a;r+=stringToUTF8(o,a,1/0)+1;n+=4}return 0},p:(t,e)=>{var r=getEnvStrings();u[t>>2]=r.length;var n=0;for(var o of r)n+=lengthBytesUTF8(o)+1;u[e>>2]=n;return 0},n:function _fd_seek(t,e,r,n){e=(o=e)<-9007199254740992||o>9007199254740992?NaN:Number(o);var o;return 70},b:(t,e,r,n)=>{for(var o=0,a=0;a<r;a++){var i=u[e>>2],s=u[e+4>>2];e+=8;for(var c=0;c<s;c++)printChar(t,f[i+c]);o+=s}u[n>>2]=o;return 0},q:function _gray_to_rgba(t,r){t>>=2;const n=e.imageData=new Uint8ClampedArray(4*r),o=s.subarray(t,t+r);for(let t=0;t<r;t++){n[4*t]=n[4*t+1]=n[4*t+2]=o[t];n[4*t+3]=255}},h:function _graya_to_rgba(t,r,n){t>>=2;r>>=2;const o=e.imageData=new Uint8ClampedArray(4*n),a=s.subarray(t,t+n),i=s.subarray(r,r+n);for(let t=0;t<n;t++){o[4*t]=o[4*t+1]=o[4*t+2]=a[t];o[4*t+3]=i[t]}},c:function _jsPrintWarning(t){const r=UTF8ToString(t);(e.warn||console.warn)(`OpenJPEG: ${r}`)},k:_proc_exit,g:function _rgb_to_rgba(t,r,n,o){t>>=2;r>>=2;n>>=2;const a=e.imageData=new Uint8ClampedArray(4*o),i=s.subarray(t,t+o),c=s.subarray(r,r+o),u=s.subarray(n,n+o);for(let t=0;t<o;t++){a[4*t]=i[t];a[4*t+1]=c[t];a[4*t+2]=u[t];a[4*t+3]=255}},a:function _storeErrorMessage(t){const r=UTF8ToString(t);e.errorMessages?e.errorMessages+="\n"+r:e.errorMessages=r}};S=await async function createWasm(){function receiveInstance(t,r){!function assignWasmExports(t){e._malloc=t.t;e._free=t.u;e._jp2_decode=t.v;g=t.w;d=t.r;t.__indirect_function_table}(S=t.exports);updateMemoryViews();return S}var t=function getWasmImports(){return{a:R}}();return new Promise((r,n)=>{e.instantiateWasm(t,(t,e)=>{r(receiveInstance(t))})})}();!function run(){!function preRun(){if(e.preRun){"function"==typeof e.preRun&&(e.preRun=[e.preRun]);for(;e.preRun.length;)addOnPreRun(e.preRun.shift())}callRuntimeCallbacks(b)}();function doRun(){e.calledRun=!0;if(!p){!function initRuntime(){m=!0;S.s()}();a?.(e);e.onRuntimeInitialized?.();!function postRun(){if(e.postRun){"function"==typeof e.postRun&&(e.postRun=[e.postRun]);for(;e.postRun.length;)addOnPostRun(e.postRun.shift())}callRuntimeCallbacks(y)}()}}if(e.setStatus){e.setStatus("Running...");setTimeout(()=>{setTimeout(()=>e.setStatus(""),1);doRun()},1)}else doRun()}();return m?e:new Promise((t,e)=>{a=t;i=e})};class Stream extends BaseStream{constructor(t,e,r,n){super();this.bytes=t instanceof Uint8Array?t:new Uint8Array(t);this.start=e||0;this.pos=this.start;this.end=e+r||this.bytes.length;this.dict=n}get length(){return this.end-this.start}get isEmpty(){return 0===this.length}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(t){const e=this.bytes,r=this.pos,n=this.end;if(!t){this.pos=n;return e.subarray(r,n)}let o=r+t;o>n&&(o=n);this.pos=o;return e.subarray(r,o)}getByteRange(t,e){t<0&&(t=0);e>this.end&&(e=this.end);return this.bytes.subarray(t,e)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(t,e,r=null){return new Stream(this.bytes.buffer,t,e,r)}clone(){return new Stream(this.bytes.buffer,this.start,this.end-this.start,this.dict.clone())}}class JpxError extends a{constructor(t){super(t,"JpxError")}}class JpxImage{static#o=null;static#a=null;static#i=null;static#s=!0;static#c=!0;static#u=null;static setOptions({handler:t,useWasm:e,useWorkerFetch:r,wasmUrl:n}){this.#s=e;this.#c=r;this.#u=n;r||(this.#a=t)}static async#f(t){const e=`${this.#u}openjpeg_nowasm_fallback.js`;let r=null;try{r=(await import(
|
||
/*webpackIgnore: true*/
|
||
/*@vite-ignore*/
|
||
e)).default()}catch(t){warn(`JpxImage#getJsModule: ${t}`)}t(r)}static async#l(t,e,r){const n="openjpeg.wasm";try{this.#o||(this.#c?this.#o=await fetchBinaryData(`${this.#u}${n}`):this.#o=await this.#a.sendWithPromise("FetchBinaryData",{kind:"wasmUrl",filename:n}));return r((await WebAssembly.instantiate(this.#o,e)).instance)}catch(e){warn(`JpxImage#instantiateWasm: ${e}`);this.#f(t);return null}finally{this.#a=null}}static async decode(t,{numComponents:e=4,isIndexedColormap:r=!1,smaskInData:n=!1,reducePower:o=0}={}){if(!this.#i){const{promise:t,resolve:e}=Promise.withResolvers(),r=[t];this.#s?r.push(I({warn,instantiateWasm:this.#l.bind(this,e)})):this.#f(e);this.#i=Promise.race(r)}const a=await this.#i;if(!a)throw new JpxError("OpenJPEG failed to initialize");let i;try{const s=t.length;i=a._malloc(s);a.writeArrayToMemory(t,i);if(a._jp2_decode(i,s,e>0?e:0,!!r,!!n,o)){const{errorMessages:t}=a;if(t){delete a.errorMessages;throw new JpxError(t)}throw new JpxError("Unknown error")}const{imageData:c}=a;a.imageData=null;return c}finally{i&&a._free(i)}}static cleanup(){this.#i=null}static parseImageProperties(t){if(!(t instanceof ArrayBuffer||ArrayBuffer.isView(t)))throw new JpxError("Invalid data format, must be a TypedArray.");let e=(t=new Stream(t)).getByte();for(;e>=0;){const r=e;e=t.getByte();if(65361===(r<<8|e)){t.skip(4);const e=t.getInt32()>>>0,r=t.getInt32()>>>0,n=t.getInt32()>>>0,o=t.getInt32()>>>0;t.skip(16);return{width:e-n,height:r-o,bitsPerComponent:8,componentsCount:t.getUint16()}}}throw new JpxError("No size marker found in JPX stream")}}globalThis.pdfjsImageDecoders={getVerbosityLevel,Jbig2Error,Jbig2Image:JBig2CCITTFaxImage,JpegError,JpegImage,JpxError,JpxImage,setVerbosityLevel,VerbosityLevel:n};export{Jbig2Error,JBig2CCITTFaxImage as Jbig2Image,JpegError,JpegImage,JpxError,JpxImage,n as VerbosityLevel,getVerbosityLevel,setVerbosityLevel}; |