@compdfkit_pdf_sdk/webviewer 2.9.1 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -9
- package/dist/assets/CloseA-DlNP-cuj.js +1 -0
- package/dist/assets/CustomModal-Ch2Wefy4.js +1 -0
- package/dist/assets/RightPanelPageMode-BIjlk7Gw.js +1 -0
- package/dist/assets/StampPanel--iZcsv3K.js +1 -0
- package/dist/assets/index-CbQxGwNm.css +1 -0
- package/dist/assets/index-qDC4-eGu.js +2508 -0
- package/dist/assets/{viewer-Bx-vwNpl.js → viewer-DpBaiFAc.js} +9 -9
- package/dist/index.html +4 -4
- package/dist/lib/ComPDFKit.wasm +0 -0
- package/dist/lib/PDFWorker.js +1 -1
- package/dist/locales/translation-en.json +1 -0
- package/dist/locales/translation-fr.json +1 -0
- package/dist/locales/translation-ja.json +1 -0
- package/dist/locales/translation-th.json +1 -0
- package/dist/locales/translation-zh-CN.json +1 -0
- package/dist/locales/translation-zh-TW.json +1 -0
- package/package.json +1 -1
- package/webviewer.global.js +1 -1
- package/webviewer.js +1 -1
- package/dist/assets/CloseA-CEkvif0J.js +0 -1
- package/dist/assets/CustomModal--dtM3B7m.js +0 -1
- package/dist/assets/RightPanelPageMode-tZ9uq8fS.js +0 -1
- package/dist/assets/StampPanel-Dtg2zCwL.js +0 -1
- package/dist/assets/index-BWvsaYab.js +0 -2508
- package/dist/assets/index-D01qv-cy.css +0 -1
package/dist/lib/PDFWorker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(){n=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof _?t:_,i=Object.create(o.prototype),u=new R(r||[]);return a(i,"_invoke",{value:b(e,n,u)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",g="suspendedYield",h="executing",v="completed",A={};function _(){}function P(){}function m(){}var y={};s(y,u,(function(){return this}));var M=Object.getPrototypeOf,I=M&&M(M(G([])));I&&I!==r&&o.call(I,u)&&(y=I);var w=m.prototype=_.prototype=Object.create(y);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(r,a,i,u){var c=d(e[r],e,a);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==typeof s&&o.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,u)}),(function(e){n("throw",e,i,u)})):t.resolve(s).then((function(e){l.value=e,i(l)}),(function(e){return n("throw",e,i,u)}))}u(c.arg)}var r;a(this,"_invoke",{value:function(e,o){function a(){return new t((function(t,r){n(e,o,t,r)}))}return r=r?r.then(a,a):a()}})}function b(t,n,r){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var u=r.delegate;if(u){var c=C(u,r);if(c){if(c===A)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=d(t,n,r);if("normal"===l.type){if(o=r.done?v:g,l.arg===A)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=v,r.method="throw",r.arg=l.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),A;var a=d(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,A;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,A):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,A)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function G(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r<t.length;)if(o.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return P.prototype=m,a(w,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:P,configurable:!0}),P.displayName=s(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===P||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},x(S.prototype),s(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(f(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(w),s(w,l,"Generator"),s(w,u,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=G,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,A):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:G(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),A}},t}function r(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t,n,r,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function u(e){a(i,r,o,u,c,"next",e)}function c(e){a(i,r,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,u=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw a}}}}var v,A=new Uint8Array(16);function _(){if(!v&&!(v="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return v(A)}for(var P=[],m=0;m<256;++m)P.push((m+256).toString(16).slice(1));var y={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function M(e,t,n){if(y.randomUUID&&!t&&!e)return y.randomUUID();var r=(e=e||{}).random||(e.rng||_)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return P[e[t+0]]+P[e[t+1]]+P[e[t+2]]+P[e[t+3]]+"-"+P[e[t+4]]+P[e[t+5]]+"-"+P[e[t+6]]+P[e[t+7]]+"-"+P[e[t+8]]+P[e[t+9]]+"-"+P[e[t+10]]+P[e[t+11]]+P[e[t+12]]+P[e[t+13]]+P[e[t+14]]+P[e[t+15]]}(r)}var I,w,x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},S={};function b(e){var t=t instanceof Date?e:new Date(e),n=t.getTimezoneOffset(),r=n<0?"+":"-",o=("00"+Math.abs(n/60)).slice(-2),a=("00"+Math.abs(n%60)).slice(-2),i="".concat(r).concat(o,"'").concat(a,"'"),u=t.getFullYear(),c=("00"+(t.getMonth()+1)).slice(-2),l=("00"+t.getDate()).slice(-2),s=("00"+t.getHours()).slice(-2),f=("00"+t.getMinutes()).slice(-2),d=("00"+t.getSeconds()).slice(-2);return"D:".concat(u).concat(c).concat(l).concat(s).concat(f).concat(d).concat(i)}function C(e){if(!e)return new Date;var t=e.match(/D:(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})([-+]\d{2}'\d{2}')?/);if(t){var n=f(t,8),r=n[1],o=n[2],a=n[3],i=n[4],u=n[5],c=n[6];return n[7],new Date(parseInt(r),parseInt(o)-1,parseInt(a),parseInt(i),parseInt(u),parseInt(c))}throw new Error("Invalid timestamp format")}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=Math.pow(10,t);return Math.round(e*n)/n}I={get exports(){return S},set exports(e){S=e}},w=S,function(){var e,t="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",a=16,i=32,u=64,c=128,l=256,s=1/0,f=9007199254740991,d=NaN,p=4294967295,g=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",i],["partialRight",u],["rearg",l]],h="[object Arguments]",v="[object Array]",A="[object Boolean]",_="[object Date]",P="[object Error]",m="[object Function]",y="[object GeneratorFunction]",M="[object Map]",S="[object Number]",b="[object Object]",C="[object Promise]",T="[object RegExp]",E="[object Set]",R="[object String]",G="[object Symbol]",F="[object WeakMap]",D="[object ArrayBuffer]",L="[object DataView]",B="[object Float32Array]",N="[object Float64Array]",U="[object Int8Array]",k="[object Int16Array]",O="[object Int32Array]",W="[object Uint8Array]",j="[object Uint8ClampedArray]",H="[object Uint16Array]",Y="[object Uint32Array]",z=/\b__p \+= '';/g,Z=/\b(__p \+=) '' \+/g,Q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,J=RegExp(q.source),X=RegExp(K.source),V=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(oe.source),ie=/^\s+/,ue=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,ge=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,ve=/^[-+]0x[0-9a-f]+$/i,Ae=/^0b[01]+$/i,_e=/^\[object .+?Constructor\]$/,Pe=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Me=/($^)/,Ie=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",be="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Re="['’]",Ge="["+we+"]",Fe="["+Ee+"]",De="["+xe+"]",Le="\\d+",Be="["+Se+"]",Ne="["+be+"]",Ue="[^"+we+Ee+Le+Se+be+Ce+"]",ke="\\ud83c[\\udffb-\\udfff]",Oe="[^"+we+"]",We="(?:\\ud83c[\\udde6-\\uddff]){2}",je="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ce+"]",Ye="\\u200d",ze="(?:"+Ne+"|"+Ue+")",Ze="(?:"+He+"|"+Ue+")",Qe="(?:['’](?:d|ll|m|re|s|t|ve))?",qe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+De+"|"+ke+")?",Je="["+Te+"]?",Xe=Je+Ke+"(?:"+Ye+"(?:"+[Oe,We,je].join("|")+")"+Je+Ke+")*",Ve="(?:"+[Be,We,je].join("|")+")"+Xe,$e="(?:"+[Oe+De+"?",De,We,je,Ge].join("|")+")",et=RegExp(Re,"g"),tt=RegExp(De,"g"),nt=RegExp(ke+"(?="+ke+")|"+$e+Xe,"g"),rt=RegExp([He+"?"+Ne+"+"+Qe+"(?="+[Fe,He,"$"].join("|")+")",Ze+"+"+qe+"(?="+[Fe,He+ze,"$"].join("|")+")",He+"?"+ze+"+"+Qe,He+"+"+qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Ve].join("|"),"g"),ot=RegExp("["+Ye+we+xe+Te+"]"),at=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ut=-1,ct={};ct[B]=ct[N]=ct[U]=ct[k]=ct[O]=ct[W]=ct[j]=ct[H]=ct[Y]=!0,ct[h]=ct[v]=ct[D]=ct[A]=ct[L]=ct[_]=ct[P]=ct[m]=ct[M]=ct[S]=ct[b]=ct[T]=ct[E]=ct[R]=ct[F]=!1;var lt={};lt[h]=lt[v]=lt[D]=lt[L]=lt[A]=lt[_]=lt[B]=lt[N]=lt[U]=lt[k]=lt[O]=lt[M]=lt[S]=lt[b]=lt[T]=lt[E]=lt[R]=lt[G]=lt[W]=lt[j]=lt[H]=lt[Y]=!0,lt[P]=lt[m]=lt[F]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ft=parseFloat,dt=parseInt,pt="object"==o(x)&&x&&x.Object===Object&&x,gt="object"==("undefined"==typeof self?"undefined":o(self))&&self&&self.Object===Object&&self,ht=pt||gt||Function("return this")(),vt=w&&!w.nodeType&&w,At=vt&&I&&!I.nodeType&&I,_t=At&&At.exports===vt,Pt=_t&&pt.process,mt=function(){try{var e=At&&At.require&&At.require("util").types;return e||Pt&&Pt.binding&&Pt.binding("util")}catch(e){}}(),yt=mt&&mt.isArrayBuffer,Mt=mt&&mt.isDate,It=mt&&mt.isMap,wt=mt&&mt.isRegExp,xt=mt&&mt.isSet,St=mt&&mt.isTypedArray;function bt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,r){for(var o=-1,a=null==e?0:e.length;++o<a;){var i=e[o];t(r,i,n(i),e)}return r}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Gt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function Ft(e,t){return!(null==e||!e.length)&&Ht(e,t,0)>-1}function Dt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Lt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Bt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Nt(e,t,n,r){var o=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n}function Ut(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ot=Qt("length");function Wt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function jt(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function Ht(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):jt(e,zt,n)}function Yt(e,t,n,r){for(var o=n-1,a=e.length;++o<a;)if(r(e[o],t))return o;return-1}function zt(e){return e!=e}function Zt(e,t){var n=null==e?0:e.length;return n?Jt(e,t)/n:d}function Qt(t){return function(n){return null==n?e:n[t]}}function qt(t){return function(n){return null==t?e:t[n]}}function Kt(e,t,n,r,o){return o(e,(function(e,o,a){n=r?(r=!1,e):t(n,e,o,a)})),n}function Jt(t,n){for(var r,o=-1,a=t.length;++o<a;){var i=n(t[o]);i!==e&&(r=r===e?i:r+i)}return r}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Vt(e){return e?e.slice(0,vn(e)+1).replace(ie,""):e}function $t(e){return function(t){return e(t)}}function en(e,t){return Lt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Ht(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ht(t,e[n],0)>-1;);return n}var on=qt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),an=qt({"&":"&","<":"<",">":">",'"':""","'":"'"});function un(e){return"\\"+st[e]}function cn(e){return ot.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function sn(e,t){return function(n){return e(t(n))}}function fn(e,t){for(var n=-1,o=e.length,a=0,i=[];++n<o;){var u=e[n];u!==t&&u!==r||(e[n]=r,i[a++]=n)}return i}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function pn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function gn(e){return cn(e)?function(e){for(var t=nt.lastIndex=0;nt.test(e);)++t;return t}(e):Ot(e)}function hn(e){return cn(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function vn(e){for(var t=e.length;t--&&ue.test(e.charAt(t)););return t}var An=qt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),_n=function I(w){var x,ue=(w=null==w?ht:_n.defaults(ht.Object(),w,_n.pick(ht,it))).Array,we=w.Date,xe=w.Error,Se=w.Function,be=w.Math,Ce=w.Object,Te=w.RegExp,Ee=w.String,Re=w.TypeError,Ge=ue.prototype,Fe=Se.prototype,De=Ce.prototype,Le=w["__core-js_shared__"],Be=Fe.toString,Ne=De.hasOwnProperty,Ue=0,ke=(x=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+x:"",Oe=De.toString,We=Be.call(Ce),je=ht._,He=Te("^"+Be.call(Ne).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ye=_t?w.Buffer:e,ze=w.Symbol,Ze=w.Uint8Array,Qe=Ye?Ye.allocUnsafe:e,qe=sn(Ce.getPrototypeOf,Ce),Ke=Ce.create,Je=De.propertyIsEnumerable,Xe=Ge.splice,Ve=ze?ze.isConcatSpreadable:e,$e=ze?ze.iterator:e,nt=ze?ze.toStringTag:e,ot=function(){try{var e=ga(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=w.clearTimeout!==ht.clearTimeout&&w.clearTimeout,pt=we&&we.now!==ht.Date.now&&we.now,gt=w.setTimeout!==ht.setTimeout&&w.setTimeout,vt=be.ceil,At=be.floor,Pt=Ce.getOwnPropertySymbols,mt=Ye?Ye.isBuffer:e,Ot=w.isFinite,qt=Ge.join,Pn=sn(Ce.keys,Ce),mn=be.max,yn=be.min,Mn=we.now,In=w.parseInt,wn=be.random,xn=Ge.reverse,Sn=ga(w,"DataView"),bn=ga(w,"Map"),Cn=ga(w,"Promise"),Tn=ga(w,"Set"),En=ga(w,"WeakMap"),Rn=ga(Ce,"create"),Gn=En&&new En,Fn={},Dn=Oa(Sn),Ln=Oa(bn),Bn=Oa(Cn),Nn=Oa(Tn),Un=Oa(En),kn=ze?ze.prototype:e,On=kn?kn.valueOf:e,Wn=kn?kn.toString:e;function jn(e){if(ru(e)&&!Zi(e)&&!(e instanceof Zn)){if(e instanceof zn)return e;if(Ne.call(e,"__wrapped__"))return Wa(e)}return new zn(e)}var Hn=function(){function t(){}return function(n){if(!nu(n))return{};if(Ke)return Ke(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function Yn(){}function zn(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function Zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Kn;++t<n;)this.add(e[t])}function Xn(e){var t=this.__data__=new qn(e);this.size=t.size}function Vn(e,t){var n=Zi(e),r=!n&&zi(e),o=!n&&!r&&Ji(e),a=!n&&!r&&!o&&fu(e),i=n||r||o||a,u=i?Xt(e.length,Ee):[],c=u.length;for(var l in e)!t&&!Ne.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ya(l,c))||u.push(l);return u}function $n(t){var n=t.length;return n?t[Jr(0,n-1)]:e}function er(e,t){return Na(Go(e),lr(t,0,e.length))}function tr(e){return Na(Go(e))}function nr(t,n,r){(r!==e&&!ji(t[n],r)||r===e&&!(n in t))&&ur(t,n,r)}function rr(t,n,r){var o=t[n];Ne.call(t,n)&&ji(o,r)&&(r!==e||n in t)||ur(t,n,r)}function or(e,t){for(var n=e.length;n--;)if(ji(e[n][0],t))return n;return-1}function ar(e,t,n,r){return gr(e,(function(e,o,a){t(r,e,n(e),a)})),r}function ir(e,t){return e&&Fo(t,Fu(t),e)}function ur(e,t,n){"__proto__"==t&&ot?ot(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function cr(t,n){for(var r=-1,o=n.length,a=ue(o),i=null==t;++r<o;)a[r]=i?e:Cu(t,n[r]);return a}function lr(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function sr(t,n,r,o,a,i){var u,c=1&n,l=2&n,s=4&n;if(r&&(u=a?r(t,o,a,i):r(t)),u!==e)return u;if(!nu(t))return t;var f=Zi(t);if(f){if(u=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!c)return Go(t,u)}else{var d=Aa(t),p=d==m||d==y;if(Ji(t))return So(t,c);if(d==b||d==h||p&&!a){if(u=l||p?{}:Pa(t),!c)return l?function(e,t){return Fo(e,va(e),t)}(t,function(e,t){return e&&Fo(t,Du(t),e)}(u,t)):function(e,t){return Fo(e,ha(e),t)}(t,ir(u,t))}else{if(!lt[d])return a?t:{};u=function(e,t,n){var r,o=e.constructor;switch(t){case D:return bo(e);case A:case _:return new o(+e);case L:return function(e,t){var n=t?bo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case B:case N:case U:case k:case O:case W:case j:case H:case Y:return Co(e,n);case M:return new o;case S:case R:return new o(e);case T:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new o;case G:return r=e,On?Ce(On.call(r)):{}}}(t,d,c)}}i||(i=new Xn);var g=i.get(t);if(g)return g;i.set(t,u),cu(t)?t.forEach((function(e){u.add(sr(e,n,r,e,t,i))})):ou(t)&&t.forEach((function(e,o){u.set(o,sr(e,n,r,o,t,i))}));var v=f?e:(s?l?ua:ia:l?Du:Fu)(t);return Tt(v||t,(function(e,o){v&&(e=t[o=e]),rr(u,o,sr(e,n,r,o,t,i))})),u}function fr(t,n,r){var o=r.length;if(null==t)return!o;for(t=Ce(t);o--;){var a=r[o],i=n[a],u=t[a];if(u===e&&!(a in t)||!i(u))return!1}return!0}function dr(n,r,o){if("function"!=typeof n)throw new Re(t);return Fa((function(){n.apply(e,o)}),r)}function pr(e,t,n,r){var o=-1,a=Ft,i=!0,u=e.length,c=[],l=t.length;if(!u)return c;n&&(t=Lt(t,$t(n))),r?(a=Dt,i=!1):t.length>=200&&(a=tn,i=!1,t=new Jn(t));e:for(;++o<u;){var s=e[o],f=null==n?s:n(s);if(s=r||0!==s?s:0,i&&f==f){for(var d=l;d--;)if(t[d]===f)continue e;c.push(s)}else a(t,f,r)||c.push(s)}return c}jn.templateSettings={escape:V,evaluate:$,interpolate:ee,variable:"",imports:{_:jn}},jn.prototype=Yn.prototype,jn.prototype.constructor=jn,zn.prototype=Hn(Yn.prototype),zn.prototype.constructor=zn,Zn.prototype=Hn(Yn.prototype),Zn.prototype.constructor=Zn,Qn.prototype.clear=function(){this.__data__=Rn?Rn(null):{},this.size=0},Qn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Qn.prototype.get=function(t){var r=this.__data__;if(Rn){var o=r[t];return o===n?e:o}return Ne.call(r,t)?r[t]:e},Qn.prototype.has=function(t){var n=this.__data__;return Rn?n[t]!==e:Ne.call(n,t)},Qn.prototype.set=function(t,r){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=Rn&&r===e?n:r,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=or(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},qn.prototype.get=function(t){var n=this.__data__,r=or(n,t);return r<0?e:n[r][1]},qn.prototype.has=function(e){return or(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,r=or(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Kn.prototype.clear=function(){this.size=0,this.__data__={hash:new Qn,map:new(bn||qn),string:new Qn}},Kn.prototype.delete=function(e){var t=da(this,e).delete(e);return this.size-=t?1:0,t},Kn.prototype.get=function(e){return da(this,e).get(e)},Kn.prototype.has=function(e){return da(this,e).has(e)},Kn.prototype.set=function(e,t){var n=da(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(e){return this.__data__.set(e,n),this},Jn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.clear=function(){this.__data__=new qn,this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Xn.prototype.get=function(e){return this.__data__.get(e)},Xn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!bn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Kn(r)}return n.set(e,t),this.size=n.size,this};var gr=Bo(Mr),hr=Bo(Ir,!0);function vr(e,t){var n=!0;return gr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function Ar(t,n,r){for(var o=-1,a=t.length;++o<a;){var i=t[o],u=n(i);if(null!=u&&(c===e?u==u&&!su(u):r(u,c)))var c=u,l=i}return l}function _r(e,t){var n=[];return gr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function Pr(e,t,n,r,o){var a=-1,i=e.length;for(n||(n=ma),o||(o=[]);++a<i;){var u=e[a];t>0&&n(u)?t>1?Pr(u,t-1,n,r,o):Bt(o,u):r||(o[o.length]=u)}return o}var mr=No(),yr=No(!0);function Mr(e,t){return e&&mr(e,t,Fu)}function Ir(e,t){return e&&yr(e,t,Fu)}function wr(e,t){return Gt(t,(function(t){return $i(e[t])}))}function xr(t,n){for(var r=0,o=(n=Mo(n,t)).length;null!=t&&r<o;)t=t[ka(n[r++])];return r&&r==o?t:e}function Sr(e,t,n){var r=t(e);return Zi(e)?r:Bt(r,n(e))}function br(t){return null==t?t===e?"[object Undefined]":"[object Null]":nt&&nt in Ce(t)?function(t){var n=Ne.call(t,nt),r=t[nt];try{t[nt]=e;var o=!0}catch(e){}var a=Oe.call(t);return o&&(n?t[nt]=r:delete t[nt]),a}(t):function(e){return Oe.call(e)}(t)}function Cr(e,t){return e>t}function Tr(e,t){return null!=e&&Ne.call(e,t)}function Er(e,t){return null!=e&&t in Ce(e)}function Rr(t,n,r){for(var o=r?Dt:Ft,a=t[0].length,i=t.length,u=i,c=ue(i),l=1/0,s=[];u--;){var f=t[u];u&&n&&(f=Lt(f,$t(n))),l=yn(f.length,l),c[u]=!r&&(n||a>=120&&f.length>=120)?new Jn(u&&f):e}f=t[0];var d=-1,p=c[0];e:for(;++d<a&&s.length<l;){var g=f[d],h=n?n(g):g;if(g=r||0!==g?g:0,!(p?tn(p,h):o(s,h,r))){for(u=i;--u;){var v=c[u];if(!(v?tn(v,h):o(t[u],h,r)))continue e}p&&p.push(h),s.push(g)}}return s}function Gr(t,n,r){var o=null==(t=Ea(t,n=Mo(n,t)))?t:t[ka(Va(n))];return null==o?e:bt(o,t,r)}function Fr(e){return ru(e)&&br(e)==h}function Dr(t,n,r,o,a){return t===n||(null==t||null==n||!ru(t)&&!ru(n)?t!=t&&n!=n:function(t,n,r,o,a,i){var u=Zi(t),c=Zi(n),l=u?v:Aa(t),s=c?v:Aa(n),f=(l=l==h?b:l)==b,d=(s=s==h?b:s)==b,p=l==s;if(p&&Ji(t)){if(!Ji(n))return!1;u=!0,f=!1}if(p&&!f)return i||(i=new Xn),u||fu(t)?oa(t,n,r,o,a,i):function(e,t,n,r,o,a,i){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case D:return!(e.byteLength!=t.byteLength||!a(new Ze(e),new Ze(t)));case A:case _:case S:return ji(+e,+t);case P:return e.name==t.name&&e.message==t.message;case T:case R:return e==t+"";case M:var u=ln;case E:var c=1&r;if(u||(u=dn),e.size!=t.size&&!c)return!1;var l=i.get(e);if(l)return l==t;r|=2,i.set(e,t);var s=oa(u(e),u(t),r,o,a,i);return i.delete(e),s;case G:if(On)return On.call(e)==On.call(t)}return!1}(t,n,l,r,o,a,i);if(!(1&r)){var g=f&&Ne.call(t,"__wrapped__"),m=d&&Ne.call(n,"__wrapped__");if(g||m){var y=g?t.value():t,I=m?n.value():n;return i||(i=new Xn),a(y,I,r,o,i)}}return!!p&&(i||(i=new Xn),function(t,n,r,o,a,i){var u=1&r,c=ia(t),l=c.length,s=ia(n),f=s.length;if(l!=f&&!u)return!1;for(var d=l;d--;){var p=c[d];if(!(u?p in n:Ne.call(n,p)))return!1}var g=i.get(t),h=i.get(n);if(g&&h)return g==n&&h==t;var v=!0;i.set(t,n),i.set(n,t);for(var A=u;++d<l;){var _=t[p=c[d]],P=n[p];if(o)var m=u?o(P,_,p,n,t,i):o(_,P,p,t,n,i);if(!(m===e?_===P||a(_,P,r,o,i):m)){v=!1;break}A||(A="constructor"==p)}if(v&&!A){var y=t.constructor,M=n.constructor;y==M||!("constructor"in t)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof M&&M instanceof M||(v=!1)}return i.delete(t),i.delete(n),v}(t,n,r,o,a,i))}(t,n,r,o,Dr,a))}function Lr(t,n,r,o){var a=r.length,i=a,u=!o;if(null==t)return!i;for(t=Ce(t);a--;){var c=r[a];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<i;){var l=(c=r[a])[0],s=t[l],f=c[1];if(u&&c[2]){if(s===e&&!(l in t))return!1}else{var d=new Xn;if(o)var p=o(s,f,l,t,n,d);if(!(p===e?Dr(f,s,3,o,d):p))return!1}}return!0}function Br(e){return!(!nu(e)||(t=e,ke&&ke in t))&&($i(e)?He:_e).test(Oa(e));var t}function Nr(e){return"function"==typeof e?e:null==e?ac:"object"==o(e)?Zi(e)?Hr(e[0],e[1]):jr(e):gc(e)}function Ur(e){if(!Sa(e))return Pn(e);var t=[];for(var n in Ce(e))Ne.call(e,n)&&"constructor"!=n&&t.push(n);return t}function kr(e){if(!nu(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=Sa(e),n=[];for(var r in e)("constructor"!=r||!t&&Ne.call(e,r))&&n.push(r);return n}function Or(e,t){return e<t}function Wr(e,t){var n=-1,r=qi(e)?ue(e.length):[];return gr(e,(function(e,o,a){r[++n]=t(e,o,a)})),r}function jr(e){var t=pa(e);return 1==t.length&&t[0][2]?Ca(t[0][0],t[0][1]):function(n){return n===e||Lr(n,e,t)}}function Hr(t,n){return Ia(t)&&ba(n)?Ca(ka(t),n):function(r){var o=Cu(r,t);return o===e&&o===n?Tu(r,t):Dr(n,o,3)}}function Yr(t,n,r,o,a){t!==n&&mr(n,(function(i,u){if(a||(a=new Xn),nu(i))!function(t,n,r,o,a,i,u){var c=Ra(t,r),l=Ra(n,r),s=u.get(l);if(s)nr(t,r,s);else{var f=i?i(c,l,r+"",t,n,u):e,d=f===e;if(d){var p=Zi(l),g=!p&&Ji(l),h=!p&&!g&&fu(l);f=l,p||g||h?Zi(c)?f=c:Ki(c)?f=Go(c):g?(d=!1,f=So(l,!0)):h?(d=!1,f=Co(l,!0)):f=[]:iu(l)||zi(l)?(f=c,zi(c)?f=Pu(c):nu(c)&&!$i(c)||(f=Pa(l))):d=!1}d&&(u.set(l,f),a(f,l,o,i,u),u.delete(l)),nr(t,r,f)}}(t,n,u,r,Yr,o,a);else{var c=o?o(Ra(t,u),i,u+"",t,n,a):e;c===e&&(c=i),nr(t,u,c)}}),Du)}function zr(t,n){var r=t.length;if(r)return ya(n+=n<0?r:0,r)?t[n]:e}function Zr(e,t,n){t=t.length?Lt(t,(function(e){return Zi(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e})):[ac];var r=-1;t=Lt(t,$t(fa()));var o=Wr(e,(function(e,n,o){var a=Lt(t,(function(t){return t(e)}));return{criteria:a,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(o,(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,a=t.criteria,i=o.length,u=n.length;++r<i;){var c=To(o[r],a[r]);if(c)return r>=u?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Qr(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],u=xr(e,i);n(u,i)&&to(a,Mo(i,e),u)}return a}function qr(e,t,n,r){var o=r?Yt:Ht,a=-1,i=t.length,u=e;for(e===t&&(t=Go(t)),n&&(u=Lt(e,$t(n)));++a<i;)for(var c=0,l=t[a],s=n?n(l):l;(c=o(u,s,c,r))>-1;)u!==e&&Xe.call(u,c,1),Xe.call(e,c,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==a){var a=o;ya(o)?Xe.call(e,o,1):go(e,o)}}return e}function Jr(e,t){return e+At(wn()*(t-e+1))}function Xr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=At(t/2))&&(e+=e)}while(t);return n}function Vr(e,t){return Da(Ta(e,t,ac),e+"")}function $r(e){return $n(ju(e))}function eo(e,t){var n=ju(e);return Na(n,lr(t,0,n.length))}function to(t,n,r,o){if(!nu(t))return t;for(var a=-1,i=(n=Mo(n,t)).length,u=i-1,c=t;null!=c&&++a<i;){var l=ka(n[a]),s=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(a!=u){var f=c[l];(s=o?o(f,l,c):e)===e&&(s=nu(f)?f:ya(n[a+1])?[]:{})}rr(c,l,s),c=c[l]}return t}var no=Gn?function(e,t){return Gn.set(e,t),e}:ac,ro=ot?function(e,t){return ot(e,"toString",{configurable:!0,enumerable:!1,value:nc(t),writable:!0})}:ac;function oo(e){return Na(ju(e))}function ao(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=ue(o);++r<o;)a[r]=e[r+t];return a}function io(e,t){var n;return gr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function uo(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var a=r+o>>>1,i=e[a];null!==i&&!su(i)&&(n?i<=t:i<t)?r=a+1:o=a}return o}return co(e,t,ac,n)}function co(t,n,r,o){var a=0,i=null==t?0:t.length;if(0===i)return 0;for(var u=(n=r(n))!=n,c=null===n,l=su(n),s=n===e;a<i;){var f=At((a+i)/2),d=r(t[f]),p=d!==e,g=null===d,h=d==d,v=su(d);if(u)var A=o||h;else A=s?h&&(o||p):c?h&&p&&(o||!g):l?h&&p&&!g&&(o||!v):!g&&!v&&(o?d<=n:d<n);A?a=f+1:i=f}return yn(i,4294967294)}function lo(e,t){for(var n=-1,r=e.length,o=0,a=[];++n<r;){var i=e[n],u=t?t(i):i;if(!n||!ji(u,c)){var c=u;a[o++]=0===i?0:i}}return a}function so(e){return"number"==typeof e?e:su(e)?d:+e}function fo(e){if("string"==typeof e)return e;if(Zi(e))return Lt(e,fo)+"";if(su(e))return Wn?Wn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function po(e,t,n){var r=-1,o=Ft,a=e.length,i=!0,u=[],c=u;if(n)i=!1,o=Dt;else if(a>=200){var l=t?null:Vo(e);if(l)return dn(l);i=!1,o=tn,c=new Jn}else c=t?[]:u;e:for(;++r<a;){var s=e[r],f=t?t(s):s;if(s=n||0!==s?s:0,i&&f==f){for(var d=c.length;d--;)if(c[d]===f)continue e;t&&c.push(f),u.push(s)}else o(c,f,n)||(c!==u&&c.push(f),u.push(s))}return u}function go(e,t){return null==(e=Ea(e,t=Mo(t,e)))||delete e[ka(Va(t))]}function ho(e,t,n,r){return to(e,t,n(xr(e,t)),r)}function vo(e,t,n,r){for(var o=e.length,a=r?o:-1;(r?a--:++a<o)&&t(e[a],a,e););return n?ao(e,r?0:a,r?a+1:o):ao(e,r?a+1:0,r?o:a)}function Ao(e,t){var n=e;return n instanceof Zn&&(n=n.value()),Nt(t,(function(e,t){return t.func.apply(t.thisArg,Bt([e],t.args))}),n)}function _o(e,t,n){var r=e.length;if(r<2)return r?po(e[0]):[];for(var o=-1,a=ue(r);++o<r;)for(var i=e[o],u=-1;++u<r;)u!=o&&(a[o]=pr(a[o]||i,e[u],t,n));return po(Pr(a,1),t,n)}function Po(t,n,r){for(var o=-1,a=t.length,i=n.length,u={};++o<a;){var c=o<i?n[o]:e;r(u,t[o],c)}return u}function mo(e){return Ki(e)?e:[]}function yo(e){return"function"==typeof e?e:ac}function Mo(e,t){return Zi(e)?e:Ia(e,t)?[e]:Ua(mu(e))}var Io=Vr;function wo(t,n,r){var o=t.length;return r=r===e?o:r,!n&&r>=o?t:ao(t,n,r)}var xo=st||function(e){return ht.clearTimeout(e)};function So(e,t){if(t)return e.slice();var n=e.length,r=Qe?Qe(n):new e.constructor(n);return e.copy(r),r}function bo(e){var t=new e.constructor(e.byteLength);return new Ze(t).set(new Ze(e)),t}function Co(e,t){var n=t?bo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function To(t,n){if(t!==n){var r=t!==e,o=null===t,a=t==t,i=su(t),u=n!==e,c=null===n,l=n==n,s=su(n);if(!c&&!s&&!i&&t>n||i&&u&&l&&!c&&!s||o&&u&&l||!r&&l||!a)return 1;if(!o&&!i&&!s&&t<n||s&&r&&a&&!o&&!i||c&&r&&a||!u&&a||!l)return-1}return 0}function Eo(e,t,n,r){for(var o=-1,a=e.length,i=n.length,u=-1,c=t.length,l=mn(a-i,0),s=ue(c+l),f=!r;++u<c;)s[u]=t[u];for(;++o<i;)(f||o<a)&&(s[n[o]]=e[o]);for(;l--;)s[u++]=e[o++];return s}function Ro(e,t,n,r){for(var o=-1,a=e.length,i=-1,u=n.length,c=-1,l=t.length,s=mn(a-u,0),f=ue(s+l),d=!r;++o<s;)f[o]=e[o];for(var p=o;++c<l;)f[p+c]=t[c];for(;++i<u;)(d||o<a)&&(f[p+n[i]]=e[o++]);return f}function Go(e,t){var n=-1,r=e.length;for(t||(t=ue(r));++n<r;)t[n]=e[n];return t}function Fo(t,n,r,o){var a=!r;r||(r={});for(var i=-1,u=n.length;++i<u;){var c=n[i],l=o?o(r[c],t[c],c,r,t):e;l===e&&(l=t[c]),a?ur(r,c,l):rr(r,c,l)}return r}function Do(e,t){return function(n,r){var o=Zi(n)?Ct:ar,a=t?t():{};return o(n,e,fa(r,2),a)}}function Lo(t){return Vr((function(n,r){var o=-1,a=r.length,i=a>1?r[a-1]:e,u=a>2?r[2]:e;for(i=t.length>3&&"function"==typeof i?(a--,i):e,u&&Ma(r[0],r[1],u)&&(i=a<3?e:i,a=1),n=Ce(n);++o<a;){var c=r[o];c&&t(n,c,o,i)}return n}))}function Bo(e,t){return function(n,r){if(null==n)return n;if(!qi(n))return e(n,r);for(var o=n.length,a=t?o:-1,i=Ce(n);(t?a--:++a<o)&&!1!==r(i[a],a,i););return n}}function No(e){return function(t,n,r){for(var o=-1,a=Ce(t),i=r(t),u=i.length;u--;){var c=i[e?u:++o];if(!1===n(a[c],c,a))break}return t}}function Uo(t){return function(n){var r=cn(n=mu(n))?hn(n):e,o=r?r[0]:n.charAt(0),a=r?wo(r,1).join(""):n.slice(1);return o[t]()+a}}function ko(e){return function(t){return Nt($u(zu(t).replace(et,"")),e,"")}}function Oo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Hn(e.prototype),r=e.apply(n,t);return nu(r)?r:n}}function Wo(t){return function(n,r,o){var a=Ce(n);if(!qi(n)){var i=fa(r,3);n=Fu(n),r=function(e){return i(a[e],e,a)}}var u=t(n,r,o);return u>-1?a[i?n[u]:u]:e}}function jo(n){return aa((function(r){var o=r.length,a=o,i=zn.prototype.thru;for(n&&r.reverse();a--;){var u=r[a];if("function"!=typeof u)throw new Re(t);if(i&&!c&&"wrapper"==la(u))var c=new zn([],!0)}for(a=c?a:o;++a<o;){var l=la(u=r[a]),s="wrapper"==l?ca(u):e;c=s&&wa(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?c[la(s[0])].apply(c,s[3]):1==u.length&&wa(u)?c[l]():c.thru(u)}return function(){var e=arguments,t=e[0];if(c&&1==e.length&&Zi(t))return c.plant(t).value();for(var n=0,a=o?r[n].apply(this,e):t;++n<o;)a=r[n].call(this,a);return a}}))}function Ho(t,n,r,o,a,i,u,l,s,f){var d=n&c,p=1&n,g=2&n,h=24&n,v=512&n,A=g?e:Oo(t);return function c(){for(var _=arguments.length,P=ue(_),m=_;m--;)P[m]=arguments[m];if(h)var y=sa(c),M=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(P,y);if(o&&(P=Eo(P,o,a,h)),i&&(P=Ro(P,i,u,h)),_-=M,h&&_<f){var I=fn(P,y);return Jo(t,n,Ho,c.placeholder,r,P,I,l,s,f-_)}var w=p?r:this,x=g?w[t]:t;return _=P.length,l?P=function(t,n){for(var r=t.length,o=yn(n.length,r),a=Go(t);o--;){var i=n[o];t[o]=ya(i,r)?a[i]:e}return t}(P,l):v&&_>1&&P.reverse(),d&&s<_&&(P.length=s),this&&this!==ht&&this instanceof c&&(x=A||Oo(x)),x.apply(w,P)}}function Yo(e,t){return function(n,r){return function(e,t,n,r){return Mr(e,(function(e,o,a){t(r,n(e),o,a)})),r}(n,e,t(r),{})}}function zo(t,n){return function(r,o){var a;if(r===e&&o===e)return n;if(r!==e&&(a=r),o!==e){if(a===e)return o;"string"==typeof r||"string"==typeof o?(r=fo(r),o=fo(o)):(r=so(r),o=so(o)),a=t(r,o)}return a}}function Zo(e){return aa((function(t){return t=Lt(t,$t(fa())),Vr((function(n){var r=this;return e(t,(function(e){return bt(e,r,n)}))}))}))}function Qo(t,n){var r=(n=n===e?" ":fo(n)).length;if(r<2)return r?Xr(n,t):n;var o=Xr(n,vt(t/gn(n)));return cn(n)?wo(hn(o),0,t).join(""):o.slice(0,t)}function qo(t){return function(n,r,o){return o&&"number"!=typeof o&&Ma(n,r,o)&&(r=o=e),n=hu(n),r===e?(r=n,n=0):r=hu(r),function(e,t,n,r){for(var o=-1,a=mn(vt((t-e)/(n||1)),0),i=ue(a);a--;)i[r?a:++o]=e,e+=n;return i}(n,r,o=o===e?n<r?1:-1:hu(o),t)}}function Ko(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=_u(t),n=_u(n)),e(t,n)}}function Jo(t,n,r,o,a,c,l,s,f,d){var p=8&n;n|=p?i:u,4&(n&=~(p?u:i))||(n&=-4);var g=[t,n,a,p?c:e,p?l:e,p?e:c,p?e:l,s,f,d],h=r.apply(e,g);return wa(t)&&Ga(h,g),h.placeholder=o,La(h,t,n)}function Xo(e){var t=be[e];return function(e,n){if(e=_u(e),(n=null==n?0:yn(vu(n),292))&&Ot(e)){var r=(mu(e)+"e").split("e");return+((r=(mu(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Vo=Tn&&1/dn(new Tn([,-0]))[1]==s?function(e){return new Tn(e)}:sc;function $o(e){return function(t){var n=Aa(t);return n==M?ln(t):n==E?pn(t):function(e,t){return Lt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function ea(n,o,s,f,d,p,g,h){var v=2&o;if(!v&&"function"!=typeof n)throw new Re(t);var A=f?f.length:0;if(A||(o&=-97,f=d=e),g=g===e?g:mn(vu(g),0),h=h===e?h:vu(h),A-=d?d.length:0,o&u){var _=f,P=d;f=d=e}var m=v?e:ca(n),y=[n,o,s,f,d,_,P,p,g,h];if(m&&function(e,t){var n=e[1],o=t[1],a=n|o,i=a<131,u=o==c&&8==n||o==c&&n==l&&e[7].length<=t[8]||384==o&&t[7].length<=t[8]&&8==n;if(!i&&!u)return e;1&o&&(e[2]=t[2],a|=1&n?0:4);var s=t[3];if(s){var f=e[3];e[3]=f?Eo(f,s,t[4]):s,e[4]=f?fn(e[3],r):t[4]}(s=t[5])&&(f=e[5],e[5]=f?Ro(f,s,t[6]):s,e[6]=f?fn(e[5],r):t[6]),(s=t[7])&&(e[7]=s),o&c&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=a}(y,m),n=y[0],o=y[1],s=y[2],f=y[3],d=y[4],!(h=y[9]=y[9]===e?v?0:n.length:mn(y[9]-A,0))&&24&o&&(o&=-25),o&&1!=o)M=8==o||o==a?function(t,n,r){var o=Oo(t);return function a(){for(var i=arguments.length,u=ue(i),c=i,l=sa(a);c--;)u[c]=arguments[c];var s=i<3&&u[0]!==l&&u[i-1]!==l?[]:fn(u,l);return(i-=s.length)<r?Jo(t,n,Ho,a.placeholder,e,u,s,e,e,r-i):bt(this&&this!==ht&&this instanceof a?o:t,this,u)}}(n,o,h):o!=i&&33!=o||d.length?Ho.apply(e,y):function(e,t,n,r){var o=1&t,a=Oo(e);return function t(){for(var i=-1,u=arguments.length,c=-1,l=r.length,s=ue(l+u),f=this&&this!==ht&&this instanceof t?a:e;++c<l;)s[c]=r[c];for(;u--;)s[c++]=arguments[++i];return bt(f,o?n:this,s)}}(n,o,s,f);else var M=function(e,t,n){var r=1&t,o=Oo(e);return function t(){return(this&&this!==ht&&this instanceof t?o:e).apply(r?n:this,arguments)}}(n,o,s);return La((m?no:Ga)(M,y),n,o)}function ta(t,n,r,o){return t===e||ji(t,De[r])&&!Ne.call(o,r)?n:t}function na(t,n,r,o,a,i){return nu(t)&&nu(n)&&(i.set(n,t),Yr(t,n,e,na,i),i.delete(n)),t}function ra(t){return iu(t)?e:t}function oa(t,n,r,o,a,i){var u=1&r,c=t.length,l=n.length;if(c!=l&&!(u&&l>c))return!1;var s=i.get(t),f=i.get(n);if(s&&f)return s==n&&f==t;var d=-1,p=!0,g=2&r?new Jn:e;for(i.set(t,n),i.set(n,t);++d<c;){var h=t[d],v=n[d];if(o)var A=u?o(v,h,d,n,t,i):o(h,v,d,t,n,i);if(A!==e){if(A)continue;p=!1;break}if(g){if(!kt(n,(function(e,t){if(!tn(g,t)&&(h===e||a(h,e,r,o,i)))return g.push(t)}))){p=!1;break}}else if(h!==v&&!a(h,v,r,o,i)){p=!1;break}}return i.delete(t),i.delete(n),p}function aa(t){return Da(Ta(t,e,Qa),t+"")}function ia(e){return Sr(e,Fu,ha)}function ua(e){return Sr(e,Du,va)}var ca=Gn?function(e){return Gn.get(e)}:sc;function la(e){for(var t=e.name+"",n=Fn[t],r=Ne.call(Fn,t)?n.length:0;r--;){var o=n[r],a=o.func;if(null==a||a==e)return o.name}return t}function sa(e){return(Ne.call(jn,"placeholder")?jn:e).placeholder}function fa(){var e=jn.iteratee||ic;return e=e===ic?Nr:e,arguments.length?e(arguments[0],arguments[1]):e}function da(e,t){var n,r,a=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function pa(e){for(var t=Fu(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ba(o)]}return t}function ga(t,n){var r=function(t,n){return null==t?e:t[n]}(t,n);return Br(r)?r:e}var ha=Pt?function(e){return null==e?[]:(e=Ce(e),Gt(Pt(e),(function(t){return Je.call(e,t)})))}:Ac,va=Pt?function(e){for(var t=[];e;)Bt(t,ha(e)),e=qe(e);return t}:Ac,Aa=br;function _a(e,t,n){for(var r=-1,o=(t=Mo(t,e)).length,a=!1;++r<o;){var i=ka(t[r]);if(!(a=null!=e&&n(e,i)))break;e=e[i]}return a||++r!=o?a:!!(o=null==e?0:e.length)&&tu(o)&&ya(i,o)&&(Zi(e)||zi(e))}function Pa(e){return"function"!=typeof e.constructor||Sa(e)?{}:Hn(qe(e))}function ma(e){return Zi(e)||zi(e)||!!(Ve&&e&&e[Ve])}function ya(e,t){var n=o(e);return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function Ma(e,t,n){if(!nu(n))return!1;var r=o(t);return!!("number"==r?qi(n)&&ya(t,n.length):"string"==r&&t in n)&&ji(n[t],e)}function Ia(e,t){if(Zi(e))return!1;var n=o(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!su(e))||ne.test(e)||!te.test(e)||null!=t&&e in Ce(t)}function wa(e){var t=la(e),n=jn[t];if("function"!=typeof n||!(t in Zn.prototype))return!1;if(e===n)return!0;var r=ca(n);return!!r&&e===r[0]}(Sn&&Aa(new Sn(new ArrayBuffer(1)))!=L||bn&&Aa(new bn)!=M||Cn&&Aa(Cn.resolve())!=C||Tn&&Aa(new Tn)!=E||En&&Aa(new En)!=F)&&(Aa=function(t){var n=br(t),r=n==b?t.constructor:e,o=r?Oa(r):"";if(o)switch(o){case Dn:return L;case Ln:return M;case Bn:return C;case Nn:return E;case Un:return F}return n});var xa=Le?$i:_c;function Sa(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||De)}function ba(e){return e==e&&!nu(e)}function Ca(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in Ce(r))}}function Ta(t,n,r){return n=mn(n===e?t.length-1:n,0),function(){for(var e=arguments,o=-1,a=mn(e.length-n,0),i=ue(a);++o<a;)i[o]=e[n+o];o=-1;for(var u=ue(n+1);++o<n;)u[o]=e[o];return u[n]=r(i),bt(t,this,u)}}function Ea(e,t){return t.length<2?e:xr(e,ao(t,0,-1))}function Ra(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ga=Ba(no),Fa=gt||function(e,t){return ht.setTimeout(e,t)},Da=Ba(ro);function La(e,t,n){var r=t+"";return Da(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Tt(g,(function(n){var r="_."+n[0];t&n[1]&&!Ft(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(se):[]}(r),n)))}function Ba(t){var n=0,r=0;return function(){var o=Mn(),a=16-(o-r);if(r=o,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Na(t,n){var r=-1,o=t.length,a=o-1;for(n=n===e?o:n;++r<n;){var i=Jr(r,a),u=t[i];t[i]=t[r],t[r]=u}return t.length=n,t}var Ua=function(e){var t=Bi(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,o){t.push(r?o.replace(pe,"$1"):n||e)})),t}));function ka(e){if("string"==typeof e||su(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Oa(e){if(null!=e){try{return Be.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Wa(e){if(e instanceof Zn)return e.clone();var t=new zn(e.__wrapped__,e.__chain__);return t.__actions__=Go(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var ja=Vr((function(e,t){return Ki(e)?pr(e,Pr(t,1,Ki,!0)):[]})),Ha=Vr((function(t,n){var r=Va(n);return Ki(r)&&(r=e),Ki(t)?pr(t,Pr(n,1,Ki,!0),fa(r,2)):[]})),Ya=Vr((function(t,n){var r=Va(n);return Ki(r)&&(r=e),Ki(t)?pr(t,Pr(n,1,Ki,!0),e,r):[]}));function za(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vu(n);return o<0&&(o=mn(r+o,0)),jt(e,fa(t,3),o)}function Za(t,n,r){var o=null==t?0:t.length;if(!o)return-1;var a=o-1;return r!==e&&(a=vu(r),a=r<0?mn(o+a,0):yn(a,o-1)),jt(t,fa(n,3),a,!0)}function Qa(e){return null!=e&&e.length?Pr(e,1):[]}function qa(t){return t&&t.length?t[0]:e}var Ka=Vr((function(e){var t=Lt(e,mo);return t.length&&t[0]===e[0]?Rr(t):[]})),Ja=Vr((function(t){var n=Va(t),r=Lt(t,mo);return n===Va(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Rr(r,fa(n,2)):[]})),Xa=Vr((function(t){var n=Va(t),r=Lt(t,mo);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Rr(r,e,n):[]}));function Va(t){var n=null==t?0:t.length;return n?t[n-1]:e}var $a=Vr(ei);function ei(e,t){return e&&e.length&&t&&t.length?qr(e,t):e}var ti=aa((function(e,t){var n=null==e?0:e.length,r=cr(e,t);return Kr(e,Lt(t,(function(e){return ya(e,n)?+e:e})).sort(To)),r}));function ni(e){return null==e?e:xn.call(e)}var ri=Vr((function(e){return po(Pr(e,1,Ki,!0))})),oi=Vr((function(t){var n=Va(t);return Ki(n)&&(n=e),po(Pr(t,1,Ki,!0),fa(n,2))})),ai=Vr((function(t){var n=Va(t);return n="function"==typeof n?n:e,po(Pr(t,1,Ki,!0),e,n)}));function ii(e){if(!e||!e.length)return[];var t=0;return e=Gt(e,(function(e){if(Ki(e))return t=mn(e.length,t),!0})),Xt(t,(function(t){return Lt(e,Qt(t))}))}function ui(t,n){if(!t||!t.length)return[];var r=ii(t);return null==n?r:Lt(r,(function(t){return bt(n,e,t)}))}var ci=Vr((function(e,t){return Ki(e)?pr(e,t):[]})),li=Vr((function(e){return _o(Gt(e,Ki))})),si=Vr((function(t){var n=Va(t);return Ki(n)&&(n=e),_o(Gt(t,Ki),fa(n,2))})),fi=Vr((function(t){var n=Va(t);return n="function"==typeof n?n:e,_o(Gt(t,Ki),e,n)})),di=Vr(ii),pi=Vr((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,ui(t,r)}));function gi(e){var t=jn(e);return t.__chain__=!0,t}function hi(e,t){return t(e)}var vi=aa((function(t){var n=t.length,r=n?t[0]:0,o=this.__wrapped__,a=function(e){return cr(e,t)};return!(n>1||this.__actions__.length)&&o instanceof Zn&&ya(r)?((o=o.slice(r,+r+(n?1:0))).__actions__.push({func:hi,args:[a],thisArg:e}),new zn(o,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(a)})),Ai=Do((function(e,t,n){Ne.call(e,n)?++e[n]:ur(e,n,1)})),_i=Wo(za),Pi=Wo(Za);function mi(e,t){return(Zi(e)?Tt:gr)(e,fa(t,3))}function yi(e,t){return(Zi(e)?Et:hr)(e,fa(t,3))}var Mi=Do((function(e,t,n){Ne.call(e,n)?e[n].push(t):ur(e,n,[t])})),Ii=Vr((function(e,t,n){var r=-1,o="function"==typeof t,a=qi(e)?ue(e.length):[];return gr(e,(function(e){a[++r]=o?bt(t,e,n):Gr(e,t,n)})),a})),wi=Do((function(e,t,n){ur(e,n,t)}));function xi(e,t){return(Zi(e)?Lt:Wr)(e,fa(t,3))}var Si=Do((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),bi=Vr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Ma(e,t[0],t[1])?t=[]:n>2&&Ma(t[0],t[1],t[2])&&(t=[t[0]]),Zr(e,Pr(t,1),[])})),Ci=pt||function(){return ht.Date.now()};function Ti(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,ea(t,c,e,e,e,e,n)}function Ei(n,r){var o;if("function"!=typeof r)throw new Re(t);return n=vu(n),function(){return--n>0&&(o=r.apply(this,arguments)),n<=1&&(r=e),o}}var Ri=Vr((function(e,t,n){var r=1;if(n.length){var o=fn(n,sa(Ri));r|=i}return ea(e,r,t,n,o)})),Gi=Vr((function(e,t,n){var r=3;if(n.length){var o=fn(n,sa(Gi));r|=i}return ea(t,r,e,n,o)}));function Fi(n,r,o){var a,i,u,c,l,s,f=0,d=!1,p=!1,g=!0;if("function"!=typeof n)throw new Re(t);function h(t){var r=a,o=i;return a=i=e,f=t,c=n.apply(o,r)}function v(t){var n=t-s;return s===e||n>=r||n<0||p&&t-f>=u}function A(){var e=Ci();if(v(e))return _(e);l=Fa(A,function(e){var t=r-(e-s);return p?yn(t,u-(e-f)):t}(e))}function _(t){return l=e,g&&a?h(t):(a=i=e,c)}function P(){var t=Ci(),n=v(t);if(a=arguments,i=this,s=t,n){if(l===e)return function(e){return f=e,l=Fa(A,r),d?h(e):c}(s);if(p)return xo(l),l=Fa(A,r),h(s)}return l===e&&(l=Fa(A,r)),c}return r=_u(r)||0,nu(o)&&(d=!!o.leading,u=(p="maxWait"in o)?mn(_u(o.maxWait)||0,r):u,g="trailing"in o?!!o.trailing:g),P.cancel=function(){l!==e&&xo(l),f=0,a=s=i=l=e},P.flush=function(){return l===e?c:_(Ci())},P}var Di=Vr((function(e,t){return dr(e,1,t)})),Li=Vr((function(e,t,n){return dr(e,_u(t)||0,n)}));function Bi(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new Re(t);var r=function t(){var r=arguments,o=n?n.apply(this,r):r[0],a=t.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return t.cache=a.set(o,i)||a,i};return r.cache=new(Bi.Cache||Kn),r}function Ni(e){if("function"!=typeof e)throw new Re(t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Bi.Cache=Kn;var Ui=Io((function(e,t){var n=(t=1==t.length&&Zi(t[0])?Lt(t[0],$t(fa())):Lt(Pr(t,1),$t(fa()))).length;return Vr((function(r){for(var o=-1,a=yn(r.length,n);++o<a;)r[o]=t[o].call(this,r[o]);return bt(e,this,r)}))})),ki=Vr((function(t,n){var r=fn(n,sa(ki));return ea(t,i,e,n,r)})),Oi=Vr((function(t,n){var r=fn(n,sa(Oi));return ea(t,u,e,n,r)})),Wi=aa((function(t,n){return ea(t,l,e,e,e,n)}));function ji(e,t){return e===t||e!=e&&t!=t}var Hi=Ko(Cr),Yi=Ko((function(e,t){return e>=t})),zi=Fr(function(){return arguments}())?Fr:function(e){return ru(e)&&Ne.call(e,"callee")&&!Je.call(e,"callee")},Zi=ue.isArray,Qi=yt?$t(yt):function(e){return ru(e)&&br(e)==D};function qi(e){return null!=e&&tu(e.length)&&!$i(e)}function Ki(e){return ru(e)&&qi(e)}var Ji=mt||_c,Xi=Mt?$t(Mt):function(e){return ru(e)&&br(e)==_};function Vi(e){if(!ru(e))return!1;var t=br(e);return t==P||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!iu(e)}function $i(e){if(!nu(e))return!1;var t=br(e);return t==m||t==y||"[object AsyncFunction]"==t||"[object Proxy]"==t}function eu(e){return"number"==typeof e&&e==vu(e)}function tu(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function nu(e){var t=o(e);return null!=e&&("object"==t||"function"==t)}function ru(e){return null!=e&&"object"==o(e)}var ou=It?$t(It):function(e){return ru(e)&&Aa(e)==M};function au(e){return"number"==typeof e||ru(e)&&br(e)==S}function iu(e){if(!ru(e)||br(e)!=b)return!1;var t=qe(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Be.call(n)==We}var uu=wt?$t(wt):function(e){return ru(e)&&br(e)==T},cu=xt?$t(xt):function(e){return ru(e)&&Aa(e)==E};function lu(e){return"string"==typeof e||!Zi(e)&&ru(e)&&br(e)==R}function su(e){return"symbol"==o(e)||ru(e)&&br(e)==G}var fu=St?$t(St):function(e){return ru(e)&&tu(e.length)&&!!ct[br(e)]},du=Ko(Or),pu=Ko((function(e,t){return e<=t}));function gu(e){if(!e)return[];if(qi(e))return lu(e)?hn(e):Go(e);if($e&&e[$e])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[$e]());var t=Aa(e);return(t==M?ln:t==E?dn:ju)(e)}function hu(e){return e?(e=_u(e))===s||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function vu(e){var t=hu(e),n=t%1;return t==t?n?t-n:t:0}function Au(e){return e?lr(vu(e),0,p):0}function _u(e){if("number"==typeof e)return e;if(su(e))return d;if(nu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=nu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Vt(e);var n=Ae.test(e);return n||Pe.test(e)?dt(e.slice(2),n?2:8):ve.test(e)?d:+e}function Pu(e){return Fo(e,Du(e))}function mu(e){return null==e?"":fo(e)}var yu=Lo((function(e,t){if(Sa(t)||qi(t))Fo(t,Fu(t),e);else for(var n in t)Ne.call(t,n)&&rr(e,n,t[n])})),Mu=Lo((function(e,t){Fo(t,Du(t),e)})),Iu=Lo((function(e,t,n,r){Fo(t,Du(t),e,r)})),wu=Lo((function(e,t,n,r){Fo(t,Fu(t),e,r)})),xu=aa(cr),Su=Vr((function(t,n){t=Ce(t);var r=-1,o=n.length,a=o>2?n[2]:e;for(a&&Ma(n[0],n[1],a)&&(o=1);++r<o;)for(var i=n[r],u=Du(i),c=-1,l=u.length;++c<l;){var s=u[c],f=t[s];(f===e||ji(f,De[s])&&!Ne.call(t,s))&&(t[s]=i[s])}return t})),bu=Vr((function(t){return t.push(e,na),bt(Bu,e,t)}));function Cu(t,n,r){var o=null==t?e:xr(t,n);return o===e?r:o}function Tu(e,t){return null!=e&&_a(e,t,Er)}var Eu=Yo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Oe.call(t)),e[t]=n}),nc(ac)),Ru=Yo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Oe.call(t)),Ne.call(e,t)?e[t].push(n):e[t]=[n]}),fa),Gu=Vr(Gr);function Fu(e){return qi(e)?Vn(e):Ur(e)}function Du(e){return qi(e)?Vn(e,!0):kr(e)}var Lu=Lo((function(e,t,n){Yr(e,t,n)})),Bu=Lo((function(e,t,n,r){Yr(e,t,n,r)})),Nu=aa((function(e,t){var n={};if(null==e)return n;var r=!1;t=Lt(t,(function(t){return t=Mo(t,e),r||(r=t.length>1),t})),Fo(e,ua(e),n),r&&(n=sr(n,7,ra));for(var o=t.length;o--;)go(n,t[o]);return n})),Uu=aa((function(e,t){return null==e?{}:function(e,t){return Qr(e,t,(function(t,n){return Tu(e,n)}))}(e,t)}));function ku(e,t){if(null==e)return{};var n=Lt(ua(e),(function(e){return[e]}));return t=fa(t),Qr(e,n,(function(e,n){return t(e,n[0])}))}var Ou=$o(Fu),Wu=$o(Du);function ju(e){return null==e?[]:en(e,Fu(e))}var Hu=ko((function(e,t,n){return t=t.toLowerCase(),e+(n?Yu(t):t)}));function Yu(e){return Vu(mu(e).toLowerCase())}function zu(e){return(e=mu(e))&&e.replace(ye,on).replace(tt,"")}var Zu=ko((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Qu=ko((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qu=Uo("toLowerCase"),Ku=ko((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ju=ko((function(e,t,n){return e+(n?" ":"")+Vu(t)})),Xu=ko((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Vu=Uo("toUpperCase");function $u(t,n,r){return t=mu(t),(n=r?e:n)===e?function(e){return at.test(e)}(t)?function(e){return e.match(rt)||[]}(t):function(e){return e.match(fe)||[]}(t):t.match(n)||[]}var ec=Vr((function(t,n){try{return bt(t,e,n)}catch(e){return Vi(e)?e:new xe(e)}})),tc=aa((function(e,t){return Tt(t,(function(t){t=ka(t),ur(e,t,Ri(e[t],e))})),e}));function nc(e){return function(){return e}}var rc=jo(),oc=jo(!0);function ac(e){return e}function ic(e){return Nr("function"==typeof e?e:sr(e,1))}var uc=Vr((function(e,t){return function(n){return Gr(n,e,t)}})),cc=Vr((function(e,t){return function(n){return Gr(e,n,t)}}));function lc(e,t,n){var r=Fu(t),o=wr(t,r);null!=n||nu(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=wr(t,Fu(t)));var a=!(nu(n)&&"chain"in n&&!n.chain),i=$i(e);return Tt(o,(function(n){var r=t[n];e[n]=r,i&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=Go(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Bt([this.value()],arguments))})})),e}function sc(){}var fc=Zo(Lt),dc=Zo(Rt),pc=Zo(kt);function gc(e){return Ia(e)?Qt(ka(e)):function(e){return function(t){return xr(t,e)}}(e)}var hc=qo(),vc=qo(!0);function Ac(){return[]}function _c(){return!1}var Pc,mc=zo((function(e,t){return e+t}),0),yc=Xo("ceil"),Mc=zo((function(e,t){return e/t}),1),Ic=Xo("floor"),wc=zo((function(e,t){return e*t}),1),xc=Xo("round"),Sc=zo((function(e,t){return e-t}),0);return jn.after=function(e,n){if("function"!=typeof n)throw new Re(t);return e=vu(e),function(){if(--e<1)return n.apply(this,arguments)}},jn.ary=Ti,jn.assign=yu,jn.assignIn=Mu,jn.assignInWith=Iu,jn.assignWith=wu,jn.at=xu,jn.before=Ei,jn.bind=Ri,jn.bindAll=tc,jn.bindKey=Gi,jn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Zi(e)?e:[e]},jn.chain=gi,jn.chunk=function(t,n,r){n=(r?Ma(t,n,r):n===e)?1:mn(vu(n),0);var o=null==t?0:t.length;if(!o||n<1)return[];for(var a=0,i=0,u=ue(vt(o/n));a<o;)u[i++]=ao(t,a,a+=n);return u},jn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var a=e[t];a&&(o[r++]=a)}return o},jn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ue(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Bt(Zi(n)?Go(n):[n],Pr(t,1))},jn.cond=function(e){var n=null==e?0:e.length,r=fa();return e=n?Lt(e,(function(e){if("function"!=typeof e[1])throw new Re(t);return[r(e[0]),e[1]]})):[],Vr((function(t){for(var r=-1;++r<n;){var o=e[r];if(bt(o[0],this,t))return bt(o[1],this,t)}}))},jn.conforms=function(e){return function(e){var t=Fu(e);return function(n){return fr(n,e,t)}}(sr(e,1))},jn.constant=nc,jn.countBy=Ai,jn.create=function(e,t){var n=Hn(e);return null==t?n:ir(n,t)},jn.curry=function t(n,r,o){var a=ea(n,8,e,e,e,e,e,r=o?e:r);return a.placeholder=t.placeholder,a},jn.curryRight=function t(n,r,o){var i=ea(n,a,e,e,e,e,e,r=o?e:r);return i.placeholder=t.placeholder,i},jn.debounce=Fi,jn.defaults=Su,jn.defaultsDeep=bu,jn.defer=Di,jn.delay=Li,jn.difference=ja,jn.differenceBy=Ha,jn.differenceWith=Ya,jn.drop=function(t,n,r){var o=null==t?0:t.length;return o?ao(t,(n=r||n===e?1:vu(n))<0?0:n,o):[]},jn.dropRight=function(t,n,r){var o=null==t?0:t.length;return o?ao(t,0,(n=o-(n=r||n===e?1:vu(n)))<0?0:n):[]},jn.dropRightWhile=function(e,t){return e&&e.length?vo(e,fa(t,3),!0,!0):[]},jn.dropWhile=function(e,t){return e&&e.length?vo(e,fa(t,3),!0):[]},jn.fill=function(t,n,r,o){var a=null==t?0:t.length;return a?(r&&"number"!=typeof r&&Ma(t,n,r)&&(r=0,o=a),function(t,n,r,o){var a=t.length;for((r=vu(r))<0&&(r=-r>a?0:a+r),(o=o===e||o>a?a:vu(o))<0&&(o+=a),o=r>o?0:Au(o);r<o;)t[r++]=n;return t}(t,n,r,o)):[]},jn.filter=function(e,t){return(Zi(e)?Gt:_r)(e,fa(t,3))},jn.flatMap=function(e,t){return Pr(xi(e,t),1)},jn.flatMapDeep=function(e,t){return Pr(xi(e,t),s)},jn.flatMapDepth=function(t,n,r){return r=r===e?1:vu(r),Pr(xi(t,n),r)},jn.flatten=Qa,jn.flattenDeep=function(e){return null!=e&&e.length?Pr(e,s):[]},jn.flattenDepth=function(t,n){return null!=t&&t.length?Pr(t,n=n===e?1:vu(n)):[]},jn.flip=function(e){return ea(e,512)},jn.flow=rc,jn.flowRight=oc,jn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},jn.functions=function(e){return null==e?[]:wr(e,Fu(e))},jn.functionsIn=function(e){return null==e?[]:wr(e,Du(e))},jn.groupBy=Mi,jn.initial=function(e){return null!=e&&e.length?ao(e,0,-1):[]},jn.intersection=Ka,jn.intersectionBy=Ja,jn.intersectionWith=Xa,jn.invert=Eu,jn.invertBy=Ru,jn.invokeMap=Ii,jn.iteratee=ic,jn.keyBy=wi,jn.keys=Fu,jn.keysIn=Du,jn.map=xi,jn.mapKeys=function(e,t){var n={};return t=fa(t,3),Mr(e,(function(e,r,o){ur(n,t(e,r,o),e)})),n},jn.mapValues=function(e,t){var n={};return t=fa(t,3),Mr(e,(function(e,r,o){ur(n,r,t(e,r,o))})),n},jn.matches=function(e){return jr(sr(e,1))},jn.matchesProperty=function(e,t){return Hr(e,sr(t,1))},jn.memoize=Bi,jn.merge=Lu,jn.mergeWith=Bu,jn.method=uc,jn.methodOf=cc,jn.mixin=lc,jn.negate=Ni,jn.nthArg=function(e){return e=vu(e),Vr((function(t){return zr(t,e)}))},jn.omit=Nu,jn.omitBy=function(e,t){return ku(e,Ni(fa(t)))},jn.once=function(e){return Ei(2,e)},jn.orderBy=function(t,n,r,o){return null==t?[]:(Zi(n)||(n=null==n?[]:[n]),Zi(r=o?e:r)||(r=null==r?[]:[r]),Zr(t,n,r))},jn.over=fc,jn.overArgs=Ui,jn.overEvery=dc,jn.overSome=pc,jn.partial=ki,jn.partialRight=Oi,jn.partition=Si,jn.pick=Uu,jn.pickBy=ku,jn.property=gc,jn.propertyOf=function(t){return function(n){return null==t?e:xr(t,n)}},jn.pull=$a,jn.pullAll=ei,jn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,fa(n,2)):e},jn.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?qr(t,n,e,r):t},jn.pullAt=ti,jn.range=hc,jn.rangeRight=vc,jn.rearg=Wi,jn.reject=function(e,t){return(Zi(e)?Gt:_r)(e,Ni(fa(t,3)))},jn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],a=e.length;for(t=fa(t,3);++r<a;){var i=e[r];t(i,r,e)&&(n.push(i),o.push(r))}return Kr(e,o),n},jn.rest=function(n,r){if("function"!=typeof n)throw new Re(t);return Vr(n,r=r===e?r:vu(r))},jn.reverse=ni,jn.sampleSize=function(t,n,r){return n=(r?Ma(t,n,r):n===e)?1:vu(n),(Zi(t)?er:eo)(t,n)},jn.set=function(e,t,n){return null==e?e:to(e,t,n)},jn.setWith=function(t,n,r,o){return o="function"==typeof o?o:e,null==t?t:to(t,n,r,o)},jn.shuffle=function(e){return(Zi(e)?tr:oo)(e)},jn.slice=function(t,n,r){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&Ma(t,n,r)?(n=0,r=o):(n=null==n?0:vu(n),r=r===e?o:vu(r)),ao(t,n,r)):[]},jn.sortBy=bi,jn.sortedUniq=function(e){return e&&e.length?lo(e):[]},jn.sortedUniqBy=function(e,t){return e&&e.length?lo(e,fa(t,2)):[]},jn.split=function(t,n,r){return r&&"number"!=typeof r&&Ma(t,n,r)&&(n=r=e),(r=r===e?p:r>>>0)?(t=mu(t))&&("string"==typeof n||null!=n&&!uu(n))&&!(n=fo(n))&&cn(t)?wo(hn(t),0,r):t.split(n,r):[]},jn.spread=function(e,n){if("function"!=typeof e)throw new Re(t);return n=null==n?0:mn(vu(n),0),Vr((function(t){var r=t[n],o=wo(t,0,n);return r&&Bt(o,r),bt(e,this,o)}))},jn.tail=function(e){var t=null==e?0:e.length;return t?ao(e,1,t):[]},jn.take=function(t,n,r){return t&&t.length?ao(t,0,(n=r||n===e?1:vu(n))<0?0:n):[]},jn.takeRight=function(t,n,r){var o=null==t?0:t.length;return o?ao(t,(n=o-(n=r||n===e?1:vu(n)))<0?0:n,o):[]},jn.takeRightWhile=function(e,t){return e&&e.length?vo(e,fa(t,3),!1,!0):[]},jn.takeWhile=function(e,t){return e&&e.length?vo(e,fa(t,3)):[]},jn.tap=function(e,t){return t(e),e},jn.throttle=function(e,n,r){var o=!0,a=!0;if("function"!=typeof e)throw new Re(t);return nu(r)&&(o="leading"in r?!!r.leading:o,a="trailing"in r?!!r.trailing:a),Fi(e,n,{leading:o,maxWait:n,trailing:a})},jn.thru=hi,jn.toArray=gu,jn.toPairs=Ou,jn.toPairsIn=Wu,jn.toPath=function(e){return Zi(e)?Lt(e,ka):su(e)?[e]:Go(Ua(mu(e)))},jn.toPlainObject=Pu,jn.transform=function(e,t,n){var r=Zi(e),o=r||Ji(e)||fu(e);if(t=fa(t,4),null==n){var a=e&&e.constructor;n=o?r?new a:[]:nu(e)&&$i(a)?Hn(qe(e)):{}}return(o?Tt:Mr)(e,(function(e,r,o){return t(n,e,r,o)})),n},jn.unary=function(e){return Ti(e,1)},jn.union=ri,jn.unionBy=oi,jn.unionWith=ai,jn.uniq=function(e){return e&&e.length?po(e):[]},jn.uniqBy=function(e,t){return e&&e.length?po(e,fa(t,2)):[]},jn.uniqWith=function(t,n){return n="function"==typeof n?n:e,t&&t.length?po(t,e,n):[]},jn.unset=function(e,t){return null==e||go(e,t)},jn.unzip=ii,jn.unzipWith=ui,jn.update=function(e,t,n){return null==e?e:ho(e,t,yo(n))},jn.updateWith=function(t,n,r,o){return o="function"==typeof o?o:e,null==t?t:ho(t,n,yo(r),o)},jn.values=ju,jn.valuesIn=function(e){return null==e?[]:en(e,Du(e))},jn.without=ci,jn.words=$u,jn.wrap=function(e,t){return ki(yo(t),e)},jn.xor=li,jn.xorBy=si,jn.xorWith=fi,jn.zip=di,jn.zipObject=function(e,t){return Po(e||[],t||[],rr)},jn.zipObjectDeep=function(e,t){return Po(e||[],t||[],to)},jn.zipWith=pi,jn.entries=Ou,jn.entriesIn=Wu,jn.extend=Mu,jn.extendWith=Iu,lc(jn,jn),jn.add=mc,jn.attempt=ec,jn.camelCase=Hu,jn.capitalize=Yu,jn.ceil=yc,jn.clamp=function(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=_u(r))==r?r:0),n!==e&&(n=(n=_u(n))==n?n:0),lr(_u(t),n,r)},jn.clone=function(e){return sr(e,4)},jn.cloneDeep=function(e){return sr(e,5)},jn.cloneDeepWith=function(t,n){return sr(t,5,n="function"==typeof n?n:e)},jn.cloneWith=function(t,n){return sr(t,4,n="function"==typeof n?n:e)},jn.conformsTo=function(e,t){return null==t||fr(e,t,Fu(t))},jn.deburr=zu,jn.defaultTo=function(e,t){return null==e||e!=e?t:e},jn.divide=Mc,jn.endsWith=function(t,n,r){t=mu(t),n=fo(n);var o=t.length,a=r=r===e?o:lr(vu(r),0,o);return(r-=n.length)>=0&&t.slice(r,a)==n},jn.eq=ji,jn.escape=function(e){return(e=mu(e))&&X.test(e)?e.replace(K,an):e},jn.escapeRegExp=function(e){return(e=mu(e))&&ae.test(e)?e.replace(oe,"\\$&"):e},jn.every=function(t,n,r){var o=Zi(t)?Rt:vr;return r&&Ma(t,n,r)&&(n=e),o(t,fa(n,3))},jn.find=_i,jn.findIndex=za,jn.findKey=function(e,t){return Wt(e,fa(t,3),Mr)},jn.findLast=Pi,jn.findLastIndex=Za,jn.findLastKey=function(e,t){return Wt(e,fa(t,3),Ir)},jn.floor=Ic,jn.forEach=mi,jn.forEachRight=yi,jn.forIn=function(e,t){return null==e?e:mr(e,fa(t,3),Du)},jn.forInRight=function(e,t){return null==e?e:yr(e,fa(t,3),Du)},jn.forOwn=function(e,t){return e&&Mr(e,fa(t,3))},jn.forOwnRight=function(e,t){return e&&Ir(e,fa(t,3))},jn.get=Cu,jn.gt=Hi,jn.gte=Yi,jn.has=function(e,t){return null!=e&&_a(e,t,Tr)},jn.hasIn=Tu,jn.head=qa,jn.identity=ac,jn.includes=function(e,t,n,r){e=qi(e)?e:ju(e),n=n&&!r?vu(n):0;var o=e.length;return n<0&&(n=mn(o+n,0)),lu(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ht(e,t,n)>-1},jn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vu(n);return o<0&&(o=mn(r+o,0)),Ht(e,t,o)},jn.inRange=function(t,n,r){return n=hu(n),r===e?(r=n,n=0):r=hu(r),function(e,t,n){return e>=yn(t,n)&&e<mn(t,n)}(t=_u(t),n,r)},jn.invoke=Gu,jn.isArguments=zi,jn.isArray=Zi,jn.isArrayBuffer=Qi,jn.isArrayLike=qi,jn.isArrayLikeObject=Ki,jn.isBoolean=function(e){return!0===e||!1===e||ru(e)&&br(e)==A},jn.isBuffer=Ji,jn.isDate=Xi,jn.isElement=function(e){return ru(e)&&1===e.nodeType&&!iu(e)},jn.isEmpty=function(e){if(null==e)return!0;if(qi(e)&&(Zi(e)||"string"==typeof e||"function"==typeof e.splice||Ji(e)||fu(e)||zi(e)))return!e.length;var t=Aa(e);if(t==M||t==E)return!e.size;if(Sa(e))return!Ur(e).length;for(var n in e)if(Ne.call(e,n))return!1;return!0},jn.isEqual=function(e,t){return Dr(e,t)},jn.isEqualWith=function(t,n,r){var o=(r="function"==typeof r?r:e)?r(t,n):e;return o===e?Dr(t,n,e,r):!!o},jn.isError=Vi,jn.isFinite=function(e){return"number"==typeof e&&Ot(e)},jn.isFunction=$i,jn.isInteger=eu,jn.isLength=tu,jn.isMap=ou,jn.isMatch=function(e,t){return e===t||Lr(e,t,pa(t))},jn.isMatchWith=function(t,n,r){return r="function"==typeof r?r:e,Lr(t,n,pa(n),r)},jn.isNaN=function(e){return au(e)&&e!=+e},jn.isNative=function(e){if(xa(e))throw new xe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Br(e)},jn.isNil=function(e){return null==e},jn.isNull=function(e){return null===e},jn.isNumber=au,jn.isObject=nu,jn.isObjectLike=ru,jn.isPlainObject=iu,jn.isRegExp=uu,jn.isSafeInteger=function(e){return eu(e)&&e>=-9007199254740991&&e<=f},jn.isSet=cu,jn.isString=lu,jn.isSymbol=su,jn.isTypedArray=fu,jn.isUndefined=function(t){return t===e},jn.isWeakMap=function(e){return ru(e)&&Aa(e)==F},jn.isWeakSet=function(e){return ru(e)&&"[object WeakSet]"==br(e)},jn.join=function(e,t){return null==e?"":qt.call(e,t)},jn.kebabCase=Zu,jn.last=Va,jn.lastIndexOf=function(t,n,r){var o=null==t?0:t.length;if(!o)return-1;var a=o;return r!==e&&(a=(a=vu(r))<0?mn(o+a,0):yn(a,o-1)),n==n?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(t,n,a):jt(t,zt,a,!0)},jn.lowerCase=Qu,jn.lowerFirst=qu,jn.lt=du,jn.lte=pu,jn.max=function(t){return t&&t.length?Ar(t,ac,Cr):e},jn.maxBy=function(t,n){return t&&t.length?Ar(t,fa(n,2),Cr):e},jn.mean=function(e){return Zt(e,ac)},jn.meanBy=function(e,t){return Zt(e,fa(t,2))},jn.min=function(t){return t&&t.length?Ar(t,ac,Or):e},jn.minBy=function(t,n){return t&&t.length?Ar(t,fa(n,2),Or):e},jn.stubArray=Ac,jn.stubFalse=_c,jn.stubObject=function(){return{}},jn.stubString=function(){return""},jn.stubTrue=function(){return!0},jn.multiply=wc,jn.nth=function(t,n){return t&&t.length?zr(t,vu(n)):e},jn.noConflict=function(){return ht._===this&&(ht._=je),this},jn.noop=sc,jn.now=Ci,jn.pad=function(e,t,n){e=mu(e);var r=(t=vu(t))?gn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Qo(At(o),n)+e+Qo(vt(o),n)},jn.padEnd=function(e,t,n){e=mu(e);var r=(t=vu(t))?gn(e):0;return t&&r<t?e+Qo(t-r,n):e},jn.padStart=function(e,t,n){e=mu(e);var r=(t=vu(t))?gn(e):0;return t&&r<t?Qo(t-r,n)+e:e},jn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),In(mu(e).replace(ie,""),t||0)},jn.random=function(t,n,r){if(r&&"boolean"!=typeof r&&Ma(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=hu(t),n===e?(n=t,t=0):n=hu(n)),t>n){var o=t;t=n,n=o}if(r||t%1||n%1){var a=wn();return yn(t+a*(n-t+ft("1e-"+((a+"").length-1))),n)}return Jr(t,n)},jn.reduce=function(e,t,n){var r=Zi(e)?Nt:Kt,o=arguments.length<3;return r(e,fa(t,4),n,o,gr)},jn.reduceRight=function(e,t,n){var r=Zi(e)?Ut:Kt,o=arguments.length<3;return r(e,fa(t,4),n,o,hr)},jn.repeat=function(t,n,r){return n=(r?Ma(t,n,r):n===e)?1:vu(n),Xr(mu(t),n)},jn.replace=function(){var e=arguments,t=mu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},jn.result=function(t,n,r){var o=-1,a=(n=Mo(n,t)).length;for(a||(a=1,t=e);++o<a;){var i=null==t?e:t[ka(n[o])];i===e&&(o=a,i=r),t=$i(i)?i.call(t):i}return t},jn.round=xc,jn.runInContext=I,jn.sample=function(e){return(Zi(e)?$n:$r)(e)},jn.size=function(e){if(null==e)return 0;if(qi(e))return lu(e)?gn(e):e.length;var t=Aa(e);return t==M||t==E?e.size:Ur(e).length},jn.snakeCase=Ku,jn.some=function(t,n,r){var o=Zi(t)?kt:io;return r&&Ma(t,n,r)&&(n=e),o(t,fa(n,3))},jn.sortedIndex=function(e,t){return uo(e,t)},jn.sortedIndexBy=function(e,t,n){return co(e,t,fa(n,2))},jn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=uo(e,t);if(r<n&&ji(e[r],t))return r}return-1},jn.sortedLastIndex=function(e,t){return uo(e,t,!0)},jn.sortedLastIndexBy=function(e,t,n){return co(e,t,fa(n,2),!0)},jn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=uo(e,t,!0)-1;if(ji(e[n],t))return n}return-1},jn.startCase=Ju,jn.startsWith=function(e,t,n){return e=mu(e),n=null==n?0:lr(vu(n),0,e.length),t=fo(t),e.slice(n,n+t.length)==t},jn.subtract=Sc,jn.sum=function(e){return e&&e.length?Jt(e,ac):0},jn.sumBy=function(e,t){return e&&e.length?Jt(e,fa(t,2)):0},jn.template=function(t,n,r){var o=jn.templateSettings;r&&Ma(t,n,r)&&(n=e),t=mu(t),n=Iu({},n,o,ta);var a,i,u=Iu({},n.imports,o.imports,ta),c=Fu(u),l=en(u,c),s=0,f=n.interpolate||Me,d="__p += '",p=Te((n.escape||Me).source+"|"+f.source+"|"+(f===ee?ge:Me).source+"|"+(n.evaluate||Me).source+"|$","g"),g="//# sourceURL="+(Ne.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ut+"]")+"\n";t.replace(p,(function(e,n,r,o,u,c){return r||(r=o),d+=t.slice(s,c).replace(Ie,un),n&&(a=!0,d+="' +\n__e("+n+") +\n'"),u&&(i=!0,d+="';\n"+u+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),s=c+e.length,e})),d+="';\n";var h=Ne.call(n,"variable")&&n.variable;if(h){if(de.test(h))throw new xe("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(i?d.replace(z,""):d).replace(Z,"$1").replace(Q,"$1;"),d="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=ec((function(){return Se(c,g+"return "+d).apply(e,l)}));if(v.source=d,Vi(v))throw v;return v},jn.times=function(e,t){if((e=vu(e))<1||e>f)return[];var n=p,r=yn(e,p);t=fa(t),e-=p;for(var o=Xt(r,t);++n<e;)t(n);return o},jn.toFinite=hu,jn.toInteger=vu,jn.toLength=Au,jn.toLower=function(e){return mu(e).toLowerCase()},jn.toNumber=_u,jn.toSafeInteger=function(e){return e?lr(vu(e),-9007199254740991,f):0===e?e:0},jn.toString=mu,jn.toUpper=function(e){return mu(e).toUpperCase()},jn.trim=function(t,n,r){if((t=mu(t))&&(r||n===e))return Vt(t);if(!t||!(n=fo(n)))return t;var o=hn(t),a=hn(n);return wo(o,nn(o,a),rn(o,a)+1).join("")},jn.trimEnd=function(t,n,r){if((t=mu(t))&&(r||n===e))return t.slice(0,vn(t)+1);if(!t||!(n=fo(n)))return t;var o=hn(t);return wo(o,0,rn(o,hn(n))+1).join("")},jn.trimStart=function(t,n,r){if((t=mu(t))&&(r||n===e))return t.replace(ie,"");if(!t||!(n=fo(n)))return t;var o=hn(t);return wo(o,nn(o,hn(n))).join("")},jn.truncate=function(t,n){var r=30,o="...";if(nu(n)){var a="separator"in n?n.separator:a;r="length"in n?vu(n.length):r,o="omission"in n?fo(n.omission):o}var i=(t=mu(t)).length;if(cn(t)){var u=hn(t);i=u.length}if(r>=i)return t;var c=r-gn(o);if(c<1)return o;var l=u?wo(u,0,c).join(""):t.slice(0,c);if(a===e)return l+o;if(u&&(c+=l.length-c),uu(a)){if(t.slice(c).search(a)){var s,f=l;for(a.global||(a=Te(a.source,mu(he.exec(a))+"g")),a.lastIndex=0;s=a.exec(f);)var d=s.index;l=l.slice(0,d===e?c:d)}}else if(t.indexOf(fo(a),c)!=c){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+o},jn.unescape=function(e){return(e=mu(e))&&J.test(e)?e.replace(q,An):e},jn.uniqueId=function(e){var t=++Ue;return mu(e)+t},jn.upperCase=Xu,jn.upperFirst=Vu,jn.each=mi,jn.eachRight=yi,jn.first=qa,lc(jn,(Pc={},Mr(jn,(function(e,t){Ne.call(jn.prototype,t)||(Pc[t]=e)})),Pc),{chain:!1}),jn.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){jn[e].placeholder=jn})),Tt(["drop","take"],(function(t,n){Zn.prototype[t]=function(r){r=r===e?1:mn(vu(r),0);var o=this.__filtered__&&!n?new Zn(this):this.clone();return o.__filtered__?o.__takeCount__=yn(r,o.__takeCount__):o.__views__.push({size:yn(r,p),type:t+(o.__dir__<0?"Right":"")}),o},Zn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Zn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:fa(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Tt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Zn.prototype[e]=function(){return this[n](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Zn.prototype[e]=function(){return this.__filtered__?new Zn(this):this[n](1)}})),Zn.prototype.compact=function(){return this.filter(ac)},Zn.prototype.find=function(e){return this.filter(e).head()},Zn.prototype.findLast=function(e){return this.reverse().find(e)},Zn.prototype.invokeMap=Vr((function(e,t){return"function"==typeof e?new Zn(this):this.map((function(n){return Gr(n,e,t)}))})),Zn.prototype.reject=function(e){return this.filter(Ni(fa(e)))},Zn.prototype.slice=function(t,n){t=vu(t);var r=this;return r.__filtered__&&(t>0||n<0)?new Zn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=vu(n))<0?r.dropRight(-n):r.take(n-t)),r)},Zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Zn.prototype.toArray=function(){return this.take(p)},Mr(Zn.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),a=jn[o?"take"+("last"==n?"Right":""):n],i=o||/^find/.test(n);a&&(jn.prototype[n]=function(){var n=this.__wrapped__,u=o?[1]:arguments,c=n instanceof Zn,l=u[0],s=c||Zi(n),f=function(e){var t=a.apply(jn,Bt([e],u));return o&&d?t[0]:t};s&&r&&"function"==typeof l&&1!=l.length&&(c=s=!1);var d=this.__chain__,p=!!this.__actions__.length,g=i&&!d,h=c&&!p;if(!i&&s){n=h?n:new Zn(this);var v=t.apply(n,u);return v.__actions__.push({func:hi,args:[f],thisArg:e}),new zn(v,d)}return g&&h?t.apply(this,u):(v=this.thru(f),g?o?v.value()[0]:v.value():v)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ge[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);jn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Zi(o)?o:[],e)}return this[n]((function(n){return t.apply(Zi(n)?n:[],e)}))}})),Mr(Zn.prototype,(function(e,t){var n=jn[t];if(n){var r=n.name+"";Ne.call(Fn,r)||(Fn[r]=[]),Fn[r].push({name:t,func:n})}})),Fn[Ho(e,2).name]=[{name:"wrapper",func:e}],Zn.prototype.clone=function(){var e=new Zn(this.__wrapped__);return e.__actions__=Go(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Go(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Go(this.__views__),e},Zn.prototype.reverse=function(){if(this.__filtered__){var e=new Zn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Zn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Zi(e),r=t<0,o=n?e.length:0,a=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var a=n[r],i=a.size;switch(a.type){case"drop":e+=i;break;case"dropRight":t-=i;break;case"take":t=yn(t,e+i);break;case"takeRight":e=mn(e,t-i)}}return{start:e,end:t}}(0,o,this.__views__),i=a.start,u=a.end,c=u-i,l=r?u:i-1,s=this.__iteratees__,f=s.length,d=0,p=yn(c,this.__takeCount__);if(!n||!r&&o==c&&p==c)return Ao(e,this.__actions__);var g=[];e:for(;c--&&d<p;){for(var h=-1,v=e[l+=t];++h<f;){var A=s[h],_=A.iteratee,P=A.type,m=_(v);if(2==P)v=m;else if(!m){if(1==P)continue e;break e}}g[d++]=v}return g},jn.prototype.at=vi,jn.prototype.chain=function(){return gi(this)},jn.prototype.commit=function(){return new zn(this.value(),this.__chain__)},jn.prototype.next=function(){this.__values__===e&&(this.__values__=gu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},jn.prototype.plant=function(t){for(var n,r=this;r instanceof Yn;){var o=Wa(r);o.__index__=0,o.__values__=e,n?a.__wrapped__=o:n=o;var a=o;r=r.__wrapped__}return a.__wrapped__=t,n},jn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Zn){var n=t;return this.__actions__.length&&(n=new Zn(this)),(n=n.reverse()).__actions__.push({func:hi,args:[ni],thisArg:e}),new zn(n,this.__chain__)}return this.thru(ni)},jn.prototype.toJSON=jn.prototype.valueOf=jn.prototype.value=function(){return Ao(this.__wrapped__,this.__actions__)},jn.prototype.first=jn.prototype.head,$e&&(jn.prototype[$e]=function(){return this}),jn}();At?((At.exports=_n)._=_n,vt._=_n):ht._=_n}.call(x),navigator.appVersion.indexOf("Mac");var E=l((function e(){var t=this;u(this,e),this.promise=new Promise((function(e,n){t.resolve=function(t){e(t)},t.reject=function(e){n(e)}}))}));function R(e,t){this.constructor===R&&function(e){throw new Error(e)}("Cannot initialize BaseException."),this.message=e,this.name=t}function G(e){return e.startsWith("#")?"hex":e.startsWith("rgb(")?"rgb":e.startsWith("hsl")?"hsl":"unknown"}function F(e){var t=G(e);if("hex"===t){var n=B(e),r=n.R,o=n.G,a=n.B;return{R:T(r/255),G:T(o/255),B:T(a/255)}}if("rgb"===t){var i=e.match(/(\d+),\s*(\d+),\s*(\d+)/);return{R:T(parseInt(i[1])/255),G:T(parseInt(i[2])/255),B:T(parseInt(i[3])/255)}}if("hsl"===t){var u=e.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);if(!u)return{error:"Invalid HSL format"};var c=parseInt(u[1]),l=parseInt(u[2])/100,s=parseInt(u[3])/100,f=N(c,l,s),d=f.R,p=f.G,g=f.B;return{R:T(d/255),G:T(p/255),B:T(g/255)}}console.error({message:"Invalid color value"})}function D(e){var t=G(e);if("hex"===t)return B(e);if("rgb"===t){var n=e.match(/(\d+),\s*(\d+),\s*(\d+)/);return n?{R:parseInt(n[1]),G:parseInt(n[2]),B:parseInt(n[3])}:{error:"Invalid RGB format"}}if("hsl"===t){var r=e.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);if(!r)return{error:"Invalid HSL format"};var o=parseInt(r[1]),a=parseInt(r[2])/100,i=parseInt(r[3])/100;return N(o,a,i)}console.error({message:"Invalid color value"})}function L(e,t,n){return function(e,t,n){var r=(1<<24|e<<16|t<<8|n).toString(16).slice(1).toUpperCase();return"#".concat(r)}(Math.round(255*e),Math.round(255*t),Math.round(255*n))}function B(e){var t=e.slice(1),n=parseInt(t,16);return{R:n>>16&255,G:n>>8&255,B:255&n}}R.prototype=new Error,R.constructor=R,"undefined"!=typeof document&&document.documentElement.style;var N=function(e,t,n){var r,o,a;if(e/=360,0===t)r=o=a=Math.round(255*n);else{var i=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},u=n<.5?n*(1+t):n+t-n*t,c=2*n-u;r=Math.round(255*i(c,u,e+1/3)),o=Math.round(255*i(c,u,e)),a=Math.round(255*i(c,u,e-1/3))}return{R:r,G:o,B:a}},U={0:"left",1:"center",2:"right"},k={LEFT:0,CENTER:1,CENTERED:1,RIGHT:2},O={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,RICHMEDIA:26,REDACT:27,INTERCHANGE:28,ARC:29},W={1:"text",2:"link",3:"freetext",4:"line",5:"square",6:"circle",7:"polygon",8:"polyline",9:"highlight",10:"underline",11:"squiggly",12:"strikeout",13:"stamp",14:"caret",15:"ink",16:"popup",17:"fileattachment",18:"sound",19:"movie",20:"widget",21:"screen",22:"printermark",23:"trapnet",24:"watermark",25:"threed",26:"richmedia",27:"redact",28:"interchange",29:"arc"},j={PUSHBUTTON:0,CHECKBOX:1,RADIOBUTTON:2,TEXTFIELD:3,COMBOBOX:4,LISTBOX:5,SIGNATUREFIELDS:6,UNKNOWN:255},H={0:"pushbutton",1:"checkbox",2:"radiobutton",3:"textfield",4:"combobox",5:"listbox",6:"signatureFields",255:"unknown"},Y=1,z=2,Z=32,Q={UNKNOWN:-1,NONE:0,OPENARROW:1,CLOSEDARROW:2,SQUARE:3,CIRCLE:4,DIAMOND:5,BUTT:6,ROPENARROW:7,RCLOSEDARROW:8,SLASH:9},q={"-1":"unknown",0:"none",1:"openarrow",2:"closedarrow",3:"square",4:"circle",5:"diamond",6:"butt",7:"ropenarrow",8:"rclosedarrow",9:"slash"};s(s(s(s(s({1:"none",0:"check"},"1","circle"),2,"cross"),3,"diamond"),4,"square"),5,"star");var K={0:"unknown",1:"standard",2:"image",3:"text",4:"digital"},J={0:"unknown",1:"goto",2:"gotor",3:"gotoe",4:"launch",5:"thread",6:"uri",7:"sound",8:"movie",9:"hide",10:"named",11:"submitform",12:"resetform",13:"importdata",14:"javascript",15:"setocgstate",16:"rendition",17:"trans",18:"goto3dview",19:"uop",255:"error"},X={solid:0,dashed:1,beveled:2,inset:3,underline:4},V={0:"solid",1:"dashed",2:"beveled",3:"inset",4:"underline"},$={0:"rect",1:"leftTriangle",2:"rightTriangle",3:"none"},ee=l((function e(){u(this,e)}));s(ee,"CSS",96),s(ee,"PDF",72),s(ee,"PDF_TO_CSS_UNITS",1);var te={MARKED:0,UNMARKED:1,ACCEPTED:2,REJECTED:3,CANCELLED:4,COMPLETED:5,NONE:6,ERROR:7},ne={0:"MARKED",1:"UNMARKED",2:"ACCEPTED",3:"REJECTED",4:"CANCELLED",5:"COMPLETED",6:"NONE",7:"ERROR"},re={DISTANCE:0,PERIMETER:1,AREA:2,ANGLE:3,COUNT:4,ARC:5},oe={0:"distance",1:"perimeter",2:"area",3:"angle",4:"count",5:"arc"},ae={AREA:1,LENGTH:2,RADIUS:4,DIAMETER:8,ANGLE:16,COUNT:32,ARCLENGTH:64,GENERIC:128},ie={1:"area",2:"length",4:"radius",8:"diameter",16:"angle",32:"count",64:"arclength",128:"generic"},ue={OPTIMIZE_FLAG_RMNOTUSE:1,OPTIMIZE_FLAG_RMEPTOBJ:2,OPTIMIZE_FLAG_RMSPEATTR:4,OPTIMIZE_FLAG_RMEMBFONT:8,OPTIMIZE_FLAG_RMINVALINK:16,OPTIMIZE_FLAG_RMINVABK:32,OPTIMIZE_FLAG_BCOMPRESSIMAGE:64,OPTIMIZE_FLAG_RMBK:128,OPTIMIZE_FLAG_RMANNOT:256,OPTIMIZE_FLAG_RMFORM:512,OPTIMIZE_FLAG_RMMULMEDIA:1024,OPTIMIZE_FLAG_RMDOCINFO:2048,OPTIMIZE_FLAG_RMMEDTADATA:4096,OPTIMIZE_FLAG_RMOBJDATA:8192,OPTIMIZE_FLAG_RMFILEATTACHMENT:16384,OPTIMIZE_FLAG_RMEXTERNCROSSREF:32768,OPTIMIZE_FLAG_RMOTHERAPPDATA:65536,OPTIMIZE_FLAG_RMHIDERLAYER:1<<17,OPTIMIZE_FLAG_MERGEVISIBLELAYER:1<<18,OPTIMIZE_FLAG_USEFLATE:1<<19,OPTIMIZE_FLAG_FLAT_REPLACELZW:1<<20,OPTIMIZE_FLAG_RMUNUSEDTARGET:1<<21,OPTIMIZE_FLAG_OPTIMIZEPAGECONTENT:1<<22,OPTIMIZE_FLAG_OPTIMIZEPDFFASTWEBVIEW:1<<23,OPTIMIZE_FLAG_RMFORMCOMMITIMPORTRESETACTION:1<<24,OPTIMIZE_FLAG_RMJSACTION:1<<25,OPTIMIZE_FLAG_RMPAGETHUMBNAIL:1<<26,OPTIMIZE_FLAG_RMREPLACEIMAGE:1<<27,OPTIMIZE_FLAG_RMLABEL:1<<28,OPTIMIZE_FLAG_RMPRINTSETTINGS:1<<29,OPTIMIZE_FLAG_RMSEARCHINDEX:1<<30},ce=function(){return l((function e(t,n,r,o){var a=this;u(this,e),this.sourceName=t,this.targetName=n,this.comObj=r,this._eventBus=o,this.callbackId=1,this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===a.sourceName)if(t.callback){var n=t.callbackId,o=a.callbackCapabilities[n];if(!o)throw new Error("Cannot resolve callback ".concat(n));if(delete a.callbackCapabilities[n],"resolve"!==t.callback)throw console.log({data:{action:t.data.action,data:t.data.data},message:t.reason&&t.reason.message}),o.reject(t.reason),a._eventBus&&a._eventBus.dispatch("message",{type:"ERROR",message:t.reason.message||t.reason}),new Error("Unexpected callback case");o.resolve(t.data)}else{var i=a.actionHandler[t.action];if(!i)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){var u=a.sourceName,c=t.sourceName;new Promise((function(e){e(i(t.data))})).then((function(e){r.postMessage({sourceName:u,targetName:c,callback:"resolve",callbackId:t.callbackId,data:e})}),(function(e){r.postMessage({data:t,sourceName:u,targetName:c,callback:"reject",callbackId:t.callbackId,reason:e})}))}else i(t.data)}},r.addEventListener("message",this._onComObjOnMessage)}),[{key:"on",value:function(e,t){var n=this.actionHandler;if(n[e])throw new Error('There is already an actionName called "'.concat(e,'"'));n[e]=t}},{key:"send",value:function(e,t){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t})}},{key:"sendWithPromise",value:function(e,t){var n=this.callbackId++,r=new E;this.callbackCapabilities[n]=r;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t})}catch(e){r.reject(e)}return r.promise}},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}])}();function le(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){var e=new Uint8Array(r.result);t(e)},r.onerror=function(){n(r.error)},r.readAsArrayBuffer(e)}))}function se(e){for(var t=e.split(";base64,")[1],n=atob(t),r=new Uint8Array(n.length),o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r}importScripts("./ComPDFKit.js");var ComPDFKitJS={opened_Font:[],opened_DefFont:[],ComPDFKitDownloadFont:function(e){if(ComPDFKitJS.opened_Font[e])return ComPDFKitJS.opened_Font[e];return!1},ComPDFKitDownloadFontA:function(e){if(ComPDFKitJS.opened_Font[e])return ComPDFKitJS.opened_Font[e];var t=fontsJson[e-1];if(!t)return!1;var fontFile=Ae(fe+t.filePath);return Pe.MessageHandler.send("LoadFont",{fontFamily:t.family}),ComPDFKitJS.opened_Font[e]=fontFile,fontFile},FontNameList:[],FontCount:1,opened_image:[],opened_files:[],opened_cert:[]},DataArray=[],FloatPointArray=[],BorderEffect={},LineType={},BorderStyle={},PageSize={},Rect={},RGBColor={},FontDa={},PDFDestination={},WidgetItem={},WidgetItemsArray={},TextFindItemArray=[],EditCharPlace={},EndEditCharPlace={},RectArray=[],CursorPoints={},EditTextStyle={},U8StringData="",PDFRange={},TextRectArray=[],ImageAreaInfo={},SignerArray=[],CertArray=[],AccessInfoArray=[],PolicyArray=[],CRLPointArray=[],OCSPUrlArray=[],DiffInfoArray=[],AnnotArray=[],fontsJson=null,fe="https://www.compdf.com/fonts/",LayerPrintData={},LayerZoomData={},SepColorsArray=[],SelectPointColorArray=[],MeasureVerticesArray=[],PermissionsInfo={},ImagePPI={},de=new Set,pe=null;function ge(e){var t=e.license,n=e.appId,r=e.version,o=stringToNewUTF8(t),a=stringToNewUTF8(""),i=stringToNewUTF8(n),u=stringToNewUTF8(r);Module._InitComPDFkit(o,!1,a,i,0,u)}function he(e){return ve.apply(this,arguments)}function ve(){return(ve=i(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,t)}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ae(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new XMLHttpRequest;n.open("GET",e,t),n.responseType="arraybuffer";var r=function(){return(200===n.status||206===n.status)&&new Uint8Array(n.response)};if(t)return new Promise((function(e,t){n.onload=function(){return e(r())},n.onerror=function(){return t(new Error("Network error"))},n.send()}));try{return n.send(),r()}catch(e){return!1}}function _e(e){var t=parseInt(e.slice(1),16),n=t>>8&255,r=255&t;return{R:T((t>>16&255)/255),G:T(n/255),B:T(r/255)}}var Pe=function(){function e(){u(this,e)}return l(e,null,[{key:"setUp",value:(r=i(n().mark((function t(){var r,o;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=new ce("worker","main",self),this.MessageHandler=r,o=!1,r.on("test",(function(e){o||(o=!0,r.send("test",e instanceof Uint8Array))})),r.send("ready",null),r.on("Ready",(function(t){return e.createDocumentHandler(self)}));case 6:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"createDocumentHandler",value:function(){var e=this.MessageHandler;e.on("InitConfig",(function(e){var t=e.license,n=e.appId,r=e.version;return ge(pe={license:t,appId:n,version:r}),We()})),e.on("LoadFile",function(){var e=i(n().mark((function e(t){var fontFile,r,o,a,i,u,c,l,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ComPDFKitJS.opened_files=[],ComPDFKitJS.opened_files[0]=t.buffer,t.pagesPtr&&t.pagesPtr.length>0&&t.pagesPtr.forEach((function(e){Module._ClearPage(e.pagePtr)})),t.doc&&Module._ClearDocument(t.doc),t.fileList&&(ComPDFKitJS.opened_Font[0]=t.fileList),"https://www.compdf.com/fonts/"!==t.webFontURL&&(fe=t.webFontURL),t.enableDefaultFont&&!ComPDFKitJS.opened_DefFont[0]&&(fontFile=Ae("./DroidSansFallbackFull.ttf"),ComPDFKitJS.opened_DefFont[0]=fontFile,ComPDFKitJS.opened_Font[0]=fontFile),!t.fontsJson||fontsJson){e.next=26;break}if(fontsJson=t.fontsJson,r=!!t.fileList){e.next=25;break}for(o=[],a=0;a<t.fontsJson.length;a++)o.push(Ae(fe+t.fontsJson[a].filePath,!0));if(!o.length){e.next=25;break}return i=null,e.prev=15,e.next=18,Promise.all(o);case 18:i=e.sent,e.next=24;break;case 21:e.prev=21,e.t0=e.catch(15),console.log(e.t0);case 24:if(i&&i.length)for(u=0;u<o.length;u++)c=ComPDFKitJS.opened_Font.length,i[u]&&(ComPDFKitJS.opened_Font[c]=i[u]);case 25:Module._InitComPDFkitFont(r);case 26:return ComPDFKitJS.opened_Font.length>0&&(l=!!t.fileList,ComPDFKitJS.FontCount=l?t.fontsJson.length+1:ComPDFKitJS.opened_Font.length,Module._InitComPDFkitFont(l)),s=Module._InitDocument(),e.abrupt("return",s);case 29:case"end":return e.stop()}}),e,null,[[15,21]])})));return function(t){return e.apply(this,arguments)}}()),e.on("GetWebFontNameList",(function(){var e=ComPDFKitJS.FontNameList;return e.length?e:null})),e.on("LoadDocumentByStream",ye),e.on("GetPageCount",(function(e){var t=e.doc;return Module._GetPageCount(t)})),e.on("GetPageSize",(function(e){var t=e.doc,n=e.pageIndex;PageSize.Width=0,PageSize.Height=0,Module._GetPageSizeForIndex(t,n);var r=Module._GetPage(t,n),o=Module._GetPageRotation(r);return{pagePtr:r,width:PageSize.Width,height:PageSize.Height,rotation:90*o}})),e.on("InitAnnot",(function(e){for(var t=e.doc,n=e.pagesPtr,r=Fe({doc:t}),o=r.signatures,a=r.signaturePtrList,i=[],u=0;u<n.length;u++)for(var c=n[u].pagePtr,l=Module._GetAnnotCount(c),s=0;s<l;s++){var f=Module._InitAnnot(c,s);if(f)if(!Module._IsReplyAnnot(f)){var d=Module._GetAnnotType(f),p=W[d],g=null;(g="widget"===p?Ce({doc:t,pagePtr:c,annotPtr:f,signatures:o,pageIndex:u}):be({doc:t,pagePtr:c,annotPtr:f,type:p,pageIndex:u}))&&i.push(g)}}return{annotations:i,signatures:o,signaturePtrList:a}})),e.on("GetAnnotation",(function(e){return be({doc:e.doc,pagePtr:e.pagePtr,annotPtr:e.annotPtr,typeInt:e.typeInt,scale:e.scale})})),e.on("GetPermissionsInfo",(function(e){PermissionsInfo={};var t=e.doc;return Module._GetPermissionsInfo(t),PermissionsInfo})),e.on("CheckOwnerPassword",(function(e){var t=e.doc,n=e.pwd,r=stringToNewUTF8(n);return!!Module._CheckOwnerPassword(t,r)})),e.on("GetDynamicStampPreview",(function(e){var t=e.contents,n=e.time,r=e.stampShape,o=e.stampColor,a=Module._InitDocument();Module._CreateDocument(a),Module._InsertPage(a,0,595,842);var i=Module._GetPage(a,0),u=Module._CreateAnnot(a,i,13),c=stringToNewUTF8(t),l=stringToNewUTF8(n);Module._SetTextStamp(u,c,l,r,o,0),Module._UpdateAnnotAp(u,0),Rect={},Module._GetAnnotRect(i,u);for(var s=Rect,f=s.Left,d=s.Top,p=s.Right,g=s.Bottom,h=Math.ceil(p-f),v=Math.ceil(g-d),A=h*v,_=4*A,P=_malloc(_),m=0;m<A;m++)Module.HEAP32[P/4+m]=0;Module._RenderAnnot(u,h,v,P,0);var y=new Uint8Array(_);for(m=0;m<_;m+=4)y[m]=Module.HEAPU8[P+m+2],y[m+1]=Module.HEAPU8[P+m+1],y[m+2]=Module.HEAPU8[P+m],y[m+3]=Module.HEAPU8[P+m+3];return _free(P),{width:h,height:v,imageArray:y}})),e.on("GetRenderAnnot",(function(e){for(var t=e.pagePtr,n=e.annotPtr,r=e.width,o=e.height,a=r*o,i=_malloc(4*a),u=0;u<a;u++)Module.HEAP32[i/4+u]=0;var c=function(e,t,n,r,o){var a,i;1===o||3===o?(a=r,i=n):(a=n,i=r);Module._RenderAnnot(e,a,i,t,0);for(var u=new Uint8Array(a*i*4),c=0;c<i;c++)for(var l=0;l<a;l++){var s=4*(c*a+l),f=void 0,d=void 0;switch(o){case 1:f=i-1-c,d=l;break;case 2:f=a-1-l,d=i-1-c;break;case 3:f=c,d=a-1-l;break;default:f=l,d=c}var p=4*(d*n+f);u[p]=Module.HEAPU8[t+s+2],u[p+1]=Module.HEAPU8[t+s+1],u[p+2]=Module.HEAPU8[t+s],u[p+3]=Module.HEAPU8[t+s+3]}return{imageArray:u,width:a,height:i}}(n,i,r,o,Module._GetPageRotation(t)),l=c.imageArray;return _free(i),l})),e.on("GetWidgetAnnotation",(function(e){return Ce({doc:e.doc,pagePtr:e.pagePtr,annotPtr:e.annotPtr,typeInt:e.typeInt,signaturePtrList:e.signaturePtrList})})),e.on("GetSignatures",(function(e){return Fe(e)})),e.on("GetCurrentID2",(function(e){var t=e.doc;U8StringData="",Module._GetCurrentID2(t);var n=U8StringData;return"<>"===n&&(U8StringData="",Module._GetTrailerID2(t),n=U8StringData),n.startsWith("<")&&(n=n.substring(1)),n.endsWith(">")&&(n=n.substring(0,n.length-1)),n})),e.on("SetTrailerID2",(function(e){var t=e.doc,n=e.id,r=stringToNewUTF8(n);return Module._SetTrailerID2(t,r)})),e.on("UpdateDigitalSignAp",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v,A,_,P;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for("data:image/png;base64,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",r=se("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAEYCAYAAACHjumMAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA9kSURBVHgB7d1vbJXlGcfx635KpUWqJWgiZGgxg2ZG52k1pmqmJdYl6kZwW8S5F4hlKvGFmG3RZWYU4wuX7QUsMdpsSn3j3LJMo3FLJobqMmMWpDUuS4BkdpKAyWAFi4JAz737Oj2Hlv45PX+e+/x57u8nOZ4/Lbw4nvPjuq77fp7HSAy67x9tPSWyzhhJpSNzhbGSsmJa3fNWAeqBtSNiZMSk7YfWyLCkZfD9gSUjgrIYKVEmVKLoUTG22/013QIkjBE7bK3dQdiUruiAyQWLFdlChYJgWBmQdHobQVOcogKm64HjWwkWBM1K3/svXrxNUJCCAqbr/tE20xC96sIlJUDorIy4amYN1cz8ovl+oav3sw02ioYIFyDLSJttiIZu7B1dJ8grb8BoS+TieoCWCDifK/1brUSvTnxHMJc5W6TMG2ekTwDkx1xmTrMGjJZ+ms4CoEDm/vdfuOglwXlmBIwOdHXmQlsEFM7NKI+Z8XQHg9/zzZzBRNFuwgUojs5kdKVVcJ7zAiY7d2kTAEXTldauB0b7BOeca5G0NZKG6GMBUDJtlZrH0ysHB5YcE0ypYFgxAsqmrdKpSLYIMjIVDNULEB+qmElR9r/dAiAWVDGTMgFjTPSoAIiPabhVIIb2CPCjaTy9JPQ2KaI9AvxwbVLwB0NGenpLARA7vlsuYGxkrhUAsUtHUZsELnJraisFQOxcBRP8P96RW0K6QgDEznJM3/xntANQGt0PI4EjYAB4Q8AA8IaAAeANAQPAGwIGgDcEDABvCBgA3hAwALwhYAB4Q8AA8IaAAeANAQPAGwIGgDcEDABvCBgA3hAwALwhYAB4Q8AA8IaAAeANAQPAGwIGgDcEDABvCBgA3hAwALwhYAB4Q8AA8IaAAeANAQPAmwUCFGjZUiOXXRLJMr0tjTLPFy8y0uJu+ppa3DzxHBM6v/+8lTpgjYyIdbe0fOieDcu4DA7fsXlEykTAYAYNiK+uiGTVigZZ7e5XX94gl7lAITiSy1hpc3dtrqfpds8yvU1qV/+wpNM7ygkbAgaZ4PhGxwIXJg1yi7vX6gQwYlMSmZ0TYfP8gJyx24oNGtPVe7wuSjjEq6O9QW7taJROd6+VCvzofLtfksQa0zd820PbCv19AiYguVC586ZG2p0KSVrAZI3YM3ZNIdUMLVLCESrwoM00ypCb0Wwc7nnotXy/SMAkkAbJHS5QbnXzlM52/hfDB9PqZjSvpt7uz9sy8elLEA2We3oaZX3PQqoVVISxts+FjMwVMgRMAugelN61C+UuV7UAlZYJmV39I65demn6z1iPrGMaLM/+ZJH86ZnFhAuqykh6e+ovz7VNf50Kpg5RsaD2uJlMo3nVPeiY+ioVTB3RuUrv2gvkpZ9fSLigBtlU6q3n+qa+QsDUCd1h+9LWC2XT2iYGuKhZxsijqd07W3PPaZFqnLZDT25sYrkZdcK0ytlTW9yDPn1GBVPD1vdMtEOEC+rJ1CqGT24NompBfZusYvgE1xitWnSFiDkL6pkx5la9J2BqRG6FSHfhAgnQrW0SAVMDchvmOA8LEuXMqXUETJXp8vOTG5tpiZA8kUkRMFW0aa3OW5oESCJjbRsBUyVb7l3IvAXJZsy1BEyFaSv0zCPNLEEjAJYhbyXpMPcXLlw4By7CYAiYSmGlCCHi014BhAtCxSfeM8IFIeNT7xHhgtDxyfdEV4t0oEu4IGR8+j352cYmVosQPALGA91Epxc7A0JHwMRsE0dEA+cQMDHSAxc5tgiYRMDEZOIsdM0CYBIBEwNdMdLlaE65AJyPgImBnomO5WhgJr4VZbrz5kaGusAcCJgy6Nxly3qGusBcCJgy6KVFmLsAcyNgSqT7XThpFJAfAVMCbY3uYe4CzIuAKQEXRgMKQ8AUSVeN7rqJ44yAQhAwRdCqZdNaWiOgUARMEdb3NLKhDigC35YC6WCXAxmB4hAwBeqlNQKKRsAUQKsXBrtA8QiYAlC9AKUhYOZB9QKUjoCZB9ULUDoCJg+qF6A8BEweVC9AeQiYPDrbua4RUA4CZg56zBG7doHy8A2aw709FwiA8nDGpFmsXtHAZV8LdPjUmOz53yHZd+Jo5vEhdxs7czpzDxAws7jndqqXfD4YPSS7/zsig+5GkCAfAmYWDHdnGjv7pbx88J/y8icfZR4DhSBgptFwYbg7iWBBOQiYae68mfYoR0Ol/+MPCBaUjICZhvZIMnOVvn8Nyh43awHKQcBMQXtE1YJ4ETBT3NIR9nFHvzrwXiZggLgQMFOE3B5tdS3RG4f3CRAnAiZLj5wOdXPdvf/4o+wfOypA3FiPzVq1Isy3QisXwgW+EDBZIc5f+v+9h7YIXhEwWasDq2Byq0WATwSMTFyxMaT5i+5zIVxQCQSMhDd/+eHeN9jngoogYESCql5edzOXwyc5AhqVQcCI7n8JY7We1giVRsCI7oExEoKXD35E9YKKImAkjBZJq5c3Du0XoJKCDxjdwRsCPTKawS4qjYBZGkZ7xOwF1RB8wFx2SfLbIz2HLrMXVAMVTAAVzOuHmb2gOgiYAGYwe45xZjpUR/AB09Kc7ApGV49oj1AtwQfM4kWSaPvHjghQLVQwi5JdwezjXC+oIiqYRcl+C/SSrkC1EDDNkmiHubQrqogWKeEt0mdnTgtQLRyLlHBUMKgmAgaANwQMAG8IGADeEDAJt6ypRYBqCT5gxr6wkmQXNV4gQLUEHzAnTkqiUcGgmmiREm45AYMqCj5gDh8ZlyRbvXipANVCi/SFJNr1S5YLUC0MeU8me8i7vLmFOQyqhhbpSFqSbs2lbQJUAwFzNNkVjOomYFAlwQfMpwkf8iqdw7QsWChApVHBBFDBqPtWXC1ApREwbgaT9N286r7Lr6GKQcWx0c759GjyB70aLlQxqDQCxtl/MPkBo6hiUGkEjHPgk+QPepWGy4MrOwWoFALGOXAwjIBRP7j863Jd6zIBKoGAEQ2YMFqknG1XraFVQkUQMDJxTphQlquVHj5Aq4RKIGCy3h06IyHRVum+FdcI4BMBkxXKStJUP159k3xrWbsAvhAwWX8LrILJeeqqblndwjlj4AcBk6VzmJBWk6Z65YbvUcnACwJmir37wgwYpZXMgyuvEyBOBMwUoQ16p3v4yuvlR6tuZAkbsSFgptAKJoQDH/PR1aXf3fBdzoKHWBAw0/z5vbCrGKX7ZN68+T7p+1o3QYOyEDDThN4mTbV2ebv8pvPbmf0ytE0ohenqPR52TzCLv/66RVoWGcGkQyfHZM/oIen/+AM5fGpMgEI0fKXzp32C8yy9OJKrr2wQTGppXCjtLZe4Gc01cl32UihjZ0/LCXcD5rJAMIO2Set7uKbzXPQcv7nrLWlls+/EEdk/dtTdH8081+ChyoEiYGahq0l7952VznbenvnoQFhvay5dKZip8+1+CRlD3jm8O3RWAJSHgJmDLleHvicGKBcBMwcNlz/sYoAJlIOAyeP3BAxQFgImD61i3mRnL1AyAmYeL7z+pQAoDQEzD73yoy5ZAygeAVOAp3eeEgDFI2AKoFUMsxigeARMgXQWw74YoDgETIG0imFfDFAcAqYIui/m8NHwLm8ClIqAKYK2SNtfYeALFIqAKZIeBMmyNVAYAqYEumzNwBeYHwFTAh34vsgOX2BeBEyJXnEDX1olID8Cpgy0SkB+BEwZaJWA/AiYMmmrxHljgNkRMDHQwwjYgAfMRMDEQOcwj/zyC+YxwDQETEx0HvP0zpMCYBIBEyPd5csZ8IBJBEzMfusChqEvMIGA8UAPiGQTHkDAePPEsyflwMFxAUJGwHiiK0qPu5Bh+RohI2A80pUlXb4mZBAqAsYzQgYhI2AqgJBBqAiYCsmFDINfhCSyIscEFZELmXeGuMYSwhAZa48LKkZXl3QJm814CEFkjB0WVJxuxuOwAiRdJGkZEVSFHlbw+LMchY3kiqwRKpgq0gMkNzz1OStMSKSoKS2vCapKh78btn3OXAaJEw0OLHGrSGZQUFW5q0bqOWVomZAUE/tg7Pg7gprw5t/PZFomjsZGEmQCxrVJ29kPUzty+2V0lYlqBvUsEzDaJhmb3iGoKbrKpNXMm++xMQ/16dyhAlQxtSlzrt8XT2ZmM6w0od6cCxiqmNqWmc24lSY256GemOkv3Nh7fMhVMilBzVp2SSS9axfKXTc1Cmpb59v9ErIZR1PbxvTdtEq1Ldc2feeJE8xnUNPMbC92PTB6v5hop6AuUNHUrtArGDPXD7o2He8TK1sFdSMXNJ3tDbJsKaf6qQUETB6ETP266+ZGWd+zUFatIGiqiYCZx429o+vSEu10v9gqqDurVjTI+tsvoKqpEgKmAF0Pj7bJmWi3e9gmqFud7QvkTlfZEDaVQ8AUgZYpOTRsbulYkLmnjfKHgClStprpcw83CBJBh8PaSmngrHb3BE58CJgSZYLmtHS7v2KLGHOtIDFaFplM4GjQdLgKZ3kmgAidUhAwMciFjTFRylqru4DbXOhcIUgUndtotXOZuy1bajLPF7swasne9PHi5omAwgQCJnAdu57nfAiAJ9S9ALwhYAB4Q8AA8IaAAeANAQPAGwIGgDcEDABvCBgA3hAwALwhYAB4Q8AA8IaAAeANAQPAGwIGgDcEDABvCBgA3hAwALwhYAB4Q8AA8IaAAeANAQPAGwIGgDcEDABvCBgA3hAwALwhYAB4Q8AA8IaAAeANASP2mADwgoAROS4AfBgJPmCsNcMCIH7W/ocKxsiIAIidNWaYgDGWCgbwwX23CJio6TUBEL9IBoMPmOE1G3UVaVAAxGl4eM1mhrzKWvuOAIiNNXaH3hMwakHTdvbDADGKJroCAkYm2iRrZYcAKJsxMqDtkT4mYHKoYoBYpCO7LfeYgMmiigHKZ6zdlqteMs8F5+nY1T/kKpmUACiOkZGh2x5eOfUlKphpbEP6bloloEjGHrORXTP9ZQJmGi3vrJHHBEDBrI02Tm2NcgiYWQzftnlAe0kBMK/M3KXnoVl3xDODyaPzref6rDFbBcCsNFz23r65b86fC/JK7epfZyS9071VrQJggpu5mHF5bO83Nw/k/TXBvFK7n2szabNbrLQJEDwzrIshs81cZvymoGC0TAiaVi1p2ZGvJZrxRwRFyVQz49Ln3roNAoQgGyzpBU3bs2cfKPyPCkqiQSNp6TbWbHFPrxUgaax9xwXEYCnBkkPAxCAXNpE1KWttyr2rbe6tvUKAeuAqFDdfPO5uw8aYkbSe5TFqeq3UUJnq/zPmsRQ9GquGAAAAAElFTkSuQmCC"),ComPDFKitJS.opened_image=[],ComPDFKitJS.opened_image[0]=r,t.imageBase64&&"image"===t.appearance?gn(t):vn(t),o=t.pkcs12Buffer,a=t.password,i=t.annotPtr,u=t.doc,ComPDFKitJS.opened_cert[0]=o,c=stringToNewUTF8(a),l=Module._GetPKCS12Cert(c,0,o.length),(DataArray=[]).push(ComPDFKitJS.opened_files[0]),s=Module._InitSignature2(i),Module._AddSignSaveDocument(u,s,l),f=[],d=0;d<DataArray.length;d++)p=new Uint8Array(DataArray[d]),f.push(p);return g=new Blob(f,{type:"application/pdf"}),e.next=18,le(g);case 18:for(h=e.sent,v=ComPDFKitJS.opened_files.length,ComPDFKitJS.opened_files[v]=h,DataArray=[],Module._AddSignModifyDocument(s,l,v,h.length),f=[],A=0;A<DataArray.length;A++)_=new Uint8Array(DataArray[A]),f.push(_);return ComPDFKitJS.opened_files[0]=f,ComPDFKitJS.opened_files.splice(v,1),P=new Blob(f,{type:"application/pdf"}),e.abrupt("return",P);case 29:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("CreateSignatureAP",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=t.rect,o=Module._InitDocument(),Module._CreateDocument(o),Module._InsertPage(o,0,595,842),Module._GetPageCount(o),a=Module._GetPage(o,0),He({annotPtr:i=Module._CreateWidget(o,a,6),date:new Date}),Ye({pagePtr:a,annotPtr:i,rect:r}),Module._UpdateFormAp(i),t.annotPtr=i,vn(t),u=r.width,c=r.height,s=4*(l=u*c),f=_malloc(s),d=0;d<l;d++)Module.HEAP32[f/4+d]=0;for(Module._RenderAnnot(i,u,c,f,0),p=new Uint8Array(s),d=0;d<s;d+=4)p[d]=Module.HEAPU8[f+d+2],p[d+1]=Module.HEAPU8[f+d+1],p[d+2]=Module.HEAPU8[f+d],p[d+3]=Module.HEAPU8[f+d+3];return _free(f),e.abrupt("return",p);case 22:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("UpdateSignatureAP",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.doc,o=t.annotPtr,a=t.rect,i=t.pagePtr,u=t.imageBase64,c=t.imageArray,Ye({pagePtr:i,annotPtr:o,rect:a}),l=c||u&&se(u),ComPDFKitJS.opened_image=[],ComPDFKitJS.opened_image[0]=l,Module._RemoveAP(o),Module._SetImageStampByStream(o,0,l.length,0),Module._SetStampSignature(o,!0),Module._WidgetRemoveFromFields(r,o);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("TestAddSignature",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.doc,e.next=3,le(t.certFile);case 3:for(o=e.sent,ComPDFKitJS.opened_cert[0]=o,a=stringToNewUTF8("ComPDF"),i=Module._GetX509ByPKCS12Cert(0,o.length,a),u=Module._InitSignature2(annotPtr),DataArray=[],c=!!fontsJson||!!ComPDFKitJS.opened_DefFont[0],Module._SaveDocumentByStream(r,2,c),Module._AddSignSaveDocument(r,u,i),l=[],s=0;s<DataArray.length;s++)f=new Uint8Array(DataArray[s]),l.push(f);return d=new Blob(l,{type:"application/pdf"}),e.next=17,le(d);case 17:p=e.sent,g=ComPDFKitJS.opened_files.length,ComPDFKitJS.opened_files[g]=p,h=Module._InitDocument(),v=stringToNewUTF8(""),Module._LoadDocumentByStream(h,g,p.length,v);case 23:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("LoadCertificates",function(){var e=i(n().mark((function e(t){var r,o,a,i,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.pkcs12Buffer,o=t.password,ComPDFKitJS.opened_cert[0]=r,a=stringToNewUTF8(o),0!==(i=Module._GetX509ByPKCS12Cert(0,r.length,a))){e.next=6;break}return e.abrupt("return",!1);case 6:return e.next=8,pn(i);case 8:return u=e.sent,e.abrupt("return",u);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("BringForward",(function(e){var t=e.editAreaPtr;return Module._MoveEditAreaForward(t,!0)})),e.on("BringBackward",(function(e){var t=e.editAreaPtr;return Module._MoveEditAreaBackward(t,!0)})),e.on("BringToFront",(function(e){var t=e.editAreaPtr;return Module._MoveEditAreaToTop(t,!0)})),e.on("BringToBack",(function(e){var t=e.editAreaPtr;return Module._MoveEditAreaToBottom(t,!0)})),e.on("GetEditAreaLevel",(function(e){var t=e.editAreaPtr;return Module._GetEditAreaLevel(t)})),e.on("AddSignature",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v,A,_,P;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.doc,o=t.pagePtr.pagePtr,e.next=4,le(t.certFile);case 4:for(a=e.sent,ComPDFKitJS.opened_cert[0]=a,i=stringToNewUTF8("ComPDF"),u=Module._GetPKCS12Cert(i,0,a.length),c={left:50,top:442,right:100,bottom:642},(DataArray=[]).push(ComPDFKitJS.opened_files[0]),He({annotPtr:l=Module._CreateWidget(r,o,6),date:new Date}),ft({annotPtr:l,fieldName:"signatureField1"}),Ye({pagePtr:o,annotPtr:l,rect:c}),s=Module._InitSignature2(l),Module._AddSignSaveDocument(r,s,u),f=[],d=0;d<DataArray.length;d++)p=new Uint8Array(DataArray[d]),f.push(p);return g=new Blob(f,{type:"application/pdf"}),e.next=22,le(g);case 22:for(h=e.sent,v=ComPDFKitJS.opened_files.length,ComPDFKitJS.opened_files[v]=h,DataArray=[],Module._AddSignModifyDocument(s,u,1,ComPDFKitJS.opened_files[1].length),f=[],A=0;A<DataArray.length;A++)_=new Uint8Array(DataArray[A]),f.push(_);return P=new Blob(f,{type:"application/pdf"}),e.abrupt("return",P);case 31:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("PushRenderTask",(function(e){return Ie(e)})),e.on("RenderContentEdit",(function(e){return we(e)})),e.on("RenderContentEditAndEndEdit",(function(e){return function(e){var n=e.editPagePtr,r=we(e);return r.code?r:(Module._EndEdit(n),de.delete(n),t(t({},r),$t(n)))}(e)})),e.on("RenderPageBitmap",(function(e){var t=function(e){for(var t=e.pagePtr,n=e.x,r=e.y,o=e.width,a=e.height,i=e.mode,u=e.flag,c=e.form,l=parseInt(o)*parseInt(a),s=4*l,f=_malloc(s),d=0;d<l;d++)Module.HEAP32[f/4+d]=0;Module._RenderPageBitmap(t,n,r,o,a,i,f,u,c);var p=We("PDF VIEWER RENDER");if(p.code)return _free(f),p;var g=new Uint8Array(s);for(d=0;d<s;d+=4)g[d]=Module.HEAPU8[f+d+2],g[d+1]=Module.HEAPU8[f+d+1],g[d+2]=Module.HEAPU8[f+d],g[d+3]=Module.HEAPU8[f+d+3];return _free(f),{imageArray:g}}({pagePtr:e.pagePtr,x:e.x,y:e.y,width:e.width,height:e.height,mode:-1,flag:1,form:1});return t})),e.on("EditAnnotation",(function(e){var t=e.annotation;(t.rect&&Ye(t),t.color&&(t.type&&"freetext"===t.type&&_t(t),t.type&&["highlight","underline","squiggly","strikeout"].includes(t.type)&&qe({annotPtr:t.annotPtr,borderColor:t.color})),"customData"in t&&Ve(t),"name"in t)&&("string"==typeof t.name&&Module._SetAnnotDictName(t.annotPtr,stringToNewUTF8("NM"),stringToNewUTF8(t.name)));if(isFinite(t.opacity)&&$e(t),"contents"in t&&"mod-form"===t.operate){var n=vt(t);if(n)return n}if("state"in t){var r=te[t.state.toUpperCase()];Module._SetState(t.annotPtr,r)}if("contents"in t&&"mod-annot"===t.operate&&(t.type&&"freetext"===t.type?_t(t):Qe(t)),"fillColor"in t&&"mod-annot"===t.operate&&(t.type&&"freetext"===t.type?Je(t):Xe({annotPtr:t.annotPtr,fillColor:t.fillColor})),"borderWidth"in t&&et({annotPtr:t.annotPtr,borderWidth:t.borderWidth}),t.borderColor&&"mod-annot"===t.operate&&(t.type&&"freetext"===t.type?Ke(t):qe({annotPtr:t.annotPtr,borderColor:t.borderColor})),t.borderColor&&"mod-form"===t.operate&&function(e){var t=e.annotPtr,n=e.borderColor,r=F(n);Module._SetWidgetBorderRGBColor(t,r.R,r.G,r.B)}(t),"arcPoints"in t&&yn({pagePtr:t.pagePtr,annotPtr:t.annotPtr,vertices:t.arcPoints}),t.indicatorText&&Module._SetAnnotDictName(t.annotPtr,stringToNewUTF8("trn-form-field-indicator-text"),stringToNewUTF8(t.indicatorText)),"indicator"in t&&Module._SetAnnotDictName(t.annotPtr,stringToNewUTF8("trn-form-field-indicator"),stringToNewUTF8(t.indicator.toString())),t.linePoints&&rt(t),t.inkPointes&&ot(t),t.destPage&&"mod-annot"===t.operate&&at(t),t.destPage&&"mod-form"===t.operate&>(t),t.url&&"mod-annot"===t.operate&&it(t),t.url&&"mod-form"===t.operate&&ht(t),(t.isHidden||0===t.isHidden)&&function(e){var t=e.annotPtr,n=e.isHidden,r=0;r=1==n?32:4;var o=Module._SetAnnotFlag(t,r)}(t),"required"in t&&function(e){var t=e.annotPtr,n=e.required;Module._SetRequiredFlag(t,n)}(t),"isChecked"in t)if("checkbox"===t.type){var o=ut(t);if(o)return o}else if("radiobutton"===t.type){var a=ct(t);if(a)return a}if("checkStyle"in t&<(t),t.fillColor&&"mod-form"===t.operate&&st(t),t.title&&"mod-form"===t.operate){var i=t.annotPtr,u=t.title,c=stringToNewUTF8(u);Module._SetButtonTitle(i,c)}if(t.fieldName&&ft(t),t.fontName&&"freetext"!==t.type&&dt({annotPtr:t.annotPtr,fontName:t.fontName,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,color:t.color}),t.item&&At(t),t.items){t.clearOption&&function(e){for(var t=Module._GetItemsCount(e)-1;t>=0;t--)Module._RemoveOptionItem(e,t)}(t.annotPtr);for(var l=t.items,s=0;s<l.length;s++)At({annotPtr:t.annotPtr,item:{string:l[s].String,value:l[s].Value,index:s}})}if(t.moveOption&&function(e){var t=e.annotPtr,n=e.moveOption,r=n.fromIndex,o=n.toIndex,a=n.item;(function(e){var t=e.annotPtr,n=e.index;Module._RemoveOptionItem(t,n)})({annotPtr:t,index:r}),At({annotPtr:t,item:{string:a.String,value:a.Value,index:o}})}(t),t.hasOwnProperty("deleteItemIndex")&&function(e){var t=e.annotPtr,n=e.deleteItemIndex;if(Module._RemoveOptionItem(t,n),0===Module._GetItemsCount(t))return;pt({annotPtr:t,selected:0})}(t),t.textAlignment&&"mod-form"===t.operate){var f=t.annotPtr,d=t.textAlignment,p=k[d.toUpperCase()];Module._SetWidgetTextJustification(f,p)}if("selected"in t){var g=pt(t);if(g)return g}if(t.hasOwnProperty("isMultiLine")){var h=t.annotPtr,v=t.isMultiLine;Module._SetMultiLine(h,v)}t.author&&ze(t),t.fillTransparency&&tt(t),t.quadPoints&&nt(t),(t.borderStyle||t.dashes)&&("mod-annot"===t.operate?wn(t):function(e){var t=e.annotPtr,n=e.borderStyle,r=X[n];Module._SetWidgetBorderStyle(t,r)}(t)),t.vertices&&yn(t),null==t.head&&null==t.tail||Module._SetLineType(t.annotPtr,Q[t.head.toUpperCase()],Q[t.tail.toUpperCase()]),t.floatPoint&&Mn(t),t.rectDiff&&In(t);var A=Module._GetPageRotation(t.pagePtr);"mod-annot"===t.operate?Module._UpdateAnnotAp(t.annotPtr,A):"mod-form"===t.operate&&"signatureFields"!==t.type&&Module._UpdateFormAp(t.annotPtr,A)})),e.on("FlattenPage",(function(e){var t=function(e){return je.apply(this,arguments)}({doc:e.doc,saveType:e.saveType,password:e.password,oldPassword:e.oldPassword});return t}));var r=["textfield","checkbox","radiobutton","listbox","combobox","pushbutton","signatureFields"];e.on("CreateAnnotation",(function(e){var t=e.doc,n=e.pagePtr,o=e.annotation;return o.name=o.name||M(),"add-form"===o.operate||o.type&&r.includes(o.type)?function(e,t,n){var r=n.type,o=n.date,a=n.fieldName,i=n.fillColor,u=n.checkStyle,c=n.rect,l=j[r.toUpperCase()],s=Module._CreateWidget(e,t,l),f=We("PDF FORM");if(f.code)return f;n.annotPtr=s,"customData"in n&&Ve(n);n.name&&Module._SetAnnotDictName(s,stringToNewUTF8("NM"),stringToNewUTF8(n.name));"author"in n&&ze({annotPtr:s,author:n.author});o&&He({annotPtr:s,date:o});i&&st({annotPtr:s,fillColor:i});u&<({annotPtr:s,checkStyle:u});a&&ft({annotPtr:s,fieldName:a});var d=n.borderColor,p=n.borderWidth,g=n.borderStyle,h=n.isChecked,v=n.color,A=n.fontName,_=n.fontSize;(d||g||"borderWidth"in n)&&function(e){var t=e.annotPtr,n=e.borderColor,r=e.borderWidth,o=e.borderStyle;if(n){var a=F(n);Module._SetWidgetBorderRGBColor(t,a.R,a.G,a.B)}if(o){var i=X[o];Module._SetWidgetBorderStyle(t,i)}(0===r||r)&&et({annotPtr:t,borderWidth:r})}({annotPtr:s,borderColor:d,borderWidth:p,borderStyle:g});switch(r){case"checkbox":(h||0===h)&&ut({annotPtr:s,isChecked:h});break;case"radiobutton":(h||0===h)&&ct({annotPtr:s,isChecked:h});break;case"listbox":case"combobox":for(var P=n.items,m=n.selected,y=0;y<P.length;y++)At({annotPtr:s,item:{string:P[y].String,value:P[y].Value,index:y}});dt({annotPtr:s,fontName:A,fontSize:_,color:v}),(m||0===m)&&pt({annotPtr:s,selected:m});break;case"pushbutton":dt({annotPtr:s,fontName:A,fontSize:_,color:v});var M=n.title,I=stringToNewUTF8(M);Module._SetButtonTitle(s,I),n.destPage&>(n),n.url&&ht(n);break;case"textfield":var w=n.isMultiLine,x=n.textAlignment,S=k[x.toUpperCase()];Module._SetMultiLine(s,w),Module._SetWidgetTextJustification(s,S),Module._SetTextFieldSpe(s,0),"contents"in n&&vt({annotPtr:s,contents:n.contents}),dt({annotPtr:s,fontName:A,fontSize:_,color:v})}if(Ye({pagePtr:t,annotPtr:s,rect:c}),Module._UpdateFormAp(s),"signatureFields"===r){var b=n.imageBase64;if(b){var C=se(b);ComPDFKitJS.opened_image=[],ComPDFKitJS.opened_image[0]=C,Module._RemoveAP(s),Module._SetImageStampByStream(s,0,C.length,0),Module._SignWithName(s)}}return{annotPtr:s}}(t,n,o):function(e,t,n){var r=n.type,o=O[r.toUpperCase()],a=Module._CreateAnnot(e,t,o),i=We("PDF Annotation");if(i.code)return i;n.annotPtr=a;var u=n.color,c=n.fontName,l=n.fontWeight,s=n.fontStyle,f=n.borderColor,d=n.borderWidth,p=n.contents,g=n.date,h=n.opacity,v=n.fillTransparency,A=n.rect,_=n.author,P=n.fillColor,m=n.quadPoints,y=n.vertices,M=n.borderStyle,I=n.dashes;u&&c&&l&&s&&dt(n);n.name&&Module._SetAnnotDictName(a,stringToNewUTF8("NM"),stringToNewUTF8(n.name));"customData"in n&&Ve(n);f&&"freetext"!==r&&qe({annotPtr:a,borderColor:f});P&&"freetext"!==r&&Xe({annotPtr:a,fillColor:P});p&&"freetext"!==r&&Qe({annotPtr:a,contents:p});He({annotPtr:a,date:g}),isFinite(h)&&$e({annotPtr:a,opacity:h});"fillTransparency"in n?tt({annotPtr:a,fillTransparency:v}):P&&tt({annotPtr:a,fillTransparency:1});A&&Ye({pagePtr:t,annotPtr:a,rect:A});_&&ze({annotPtr:a,author:_});m&&nt({pagePtr:t,annotPtr:a,quadPoints:m});"borderWidth"in n&&et({annotPtr:a,borderWidth:d});(M||I)&&wn({annotPtr:a,borderWidth:d,borderStyle:M,dashes:I,intensity:n.intensity});switch(o){case O.TEXT:n.color&&qe({annotPtr:n.annotPtr,borderColor:n.color}),Module._SetAnnotDictName(n.annotPtr,stringToNewUTF8("Name"),stringToNewUTF8("Comment"));break;case O.LINK:n.destPage&&at(n),n.url&&it(n);break;case O.FREETEXT:var w=n.intent,x=void 0===w?"FreText":w,S=n.color,b=void 0===S?"rgb(0, 0, 0":S,C=n.fontSize,T=void 0===C?16:C,E=n.fontName,R=void 0===E?"Helvetica":E,G=n.fontStyle,D=void 0===G?"normal":G,L=n.fontWeight,B=void 0===L?"normal":L,N=n.textAlignment,U=void 0===N?"left":N;n.borderWidth;var W=n.borderColor,j=void 0===W?"rgb(0, 0, 0)":W,H=n.fillColor,Y=void 0===H?"":H,z=n.contents;!function(e){var t=e.annotPtr,n=e.intent,r=e.fontName,o=e.fontWeight,a=e.fontStyle,i=e.fontSize,u=e.color,c=e.textAlignment,l=e.contents,s=Re({fontName:r,fontWeight:o,fontStyle:a}),f=k[c.toUpperCase()],d=stringToNewUTF8(s),p=stringToNewUTF8(l),g=F(u);Module._SetFreeText(t,d,i,g.R,g.G,g.B,f,p);var h=0;"FreeTextCallout"===n&&(h=1,Module._SetFreetextLineEnding(t,1));Module._SetFreeTextType(t,h),Qe(e)}({annotPtr:a,color:b,fontName:R,fontSize:T,fontStyle:D,fontWeight:B,textAlignment:U,contents:void 0===z?"":z,intent:x}),"fillColor"in n&&Je({annotPtr:a,fillColor:Y}),"borderColor"in n&&Ke({annotPtr:a,borderColor:j}),"floatPoint"in n&&Mn({doc:e,annotPtr:a,pageIndex:n.pageIndex,floatPoint:n.floatPoint}),"rectDiff"in n&&In({doc:e,annotPtr:a,pageIndex:n.pageIndex,rectDiff:n.rectDiff});break;case O.POLYLINE:case O.POLYGON:y&&yn({pagePtr:t,annotPtr:a,vertices:y});break;case O.LINE:var Z=n.head,q=n.tail,K=n.linePoints;null==Z&&null==q||Module._SetLineType(a,Q[Z.toUpperCase()],Q[q.toUpperCase()]),rt({pagePtr:t,annotPtr:a,linePoints:K});break;case O.SQUARE:case O.CIRCLE:!function(e){var t=e.annotPtr,n=e.borderWidth;et({annotPtr:t,borderWidth:n})}({annotPtr:a,borderWidth:d});break;case O.HIGHLIGHT:case O.UNDERLINE:case O.SQUIGGLY:case O.STRIKEOUT:var J=n.quadPoints;!function(e){var t=e.pagePtr,n=e.annotPtr,r=e.color,o=e.quadPoints;qe({annotPtr:n,borderColor:r}),nt({pagePtr:t,annotPtr:n,quadPoints:o})}({pagePtr:t,annotPtr:a,color:n.color,quadPoints:J});break;case O.STAMP:var X=n.stampType,V=Module._GetPageRotation(t);if("standard"===X){var $=function(e,t){var n=e.annotPtr,r=e.contents,o=stringToNewUTF8(r.replace(/ /g,""));Module._SetStandardStamp(n,o,t);var a=We("PDF Annotation STAMPS");if(a.code)return a}({annotPtr:a,contents:p},V);if($)return $}else if("text"===X){n.annotPtr=a;var ee=function(e,t){var n=e.annotPtr,r=e.contents,o=e.time,a=e.stampShape,i=e.stampColor,u=stringToNewUTF8(r),c=stringToNewUTF8(o);Module._SetTextStamp(n,u,c,a,i,t);var l=We("PDF Annotation STAMPS");if(l.code)return l}(n,V);if(ee)return ee}else if("image"===X){n.annotPtr=a,n.doc=e;var te=function(e,t){var n=e.annotPtr,r=e.imageBase64;e.stampShape,e.rect,e.doc;var o=se(r);Qe({annotPtr:n,contents:"image"}),ComPDFKitJS.opened_image=[],ComPDFKitJS.opened_image[0]=o,Module._SetImageStampByStream(n,0,o.length,t);var a=We("PDF Annotation STAMPS");if(a.code)return a}(n,V);if(te)return te}break;case O.INK:var ne=n.inkPointes,re=n.borderColor;re&&qe({annotPtr:a,borderColor:re}),ot({pagePtr:t,annotPtr:a,inkPointes:ne});break;case O.ARC:yn({pagePtr:t,annotPtr:a,vertices:n.arcPoints})}A&&Ye({pagePtr:t,annotPtr:a,rect:A});var oe=Module._GetPageRotation(t);return Module._UpdateAnnotAp(n.annotPtr,oe),{annotPtr:a}}(t,n,o)})),e.on("GetAnnotRect",(function(e){var t=e.pagePtr,n=e.annotPtr;return Rect={},Module._GetAnnotRect(t,n),{left:Rect.Left,top:Rect.Top,right:Rect.Right,bottom:Rect.Bottom}})),e.on("SetAnnotRect",(function(e){var t=e.pagePtr,n=e.annotPtr,r=e.rect;Module._SetAnnotRect(t,n,r.left,r.right,r.bottom,r.top)})),e.on("RemoveAnnot",(function(e){var t=e.annotPtr;Module._RemoveAnnot(t);var n=We("PDF Annotation");if(n.code)return n})),e.on("RemoveFromPageIncludeReplyAnnot",(function(e){var t=e.pagePtr,n=e.annotPtr;Module._RemoveFromPageIncludeReplyAnnot(t,n);var r=We("PDF Annotation");if(r.code)return r})),e.on("GetCharIndexAtPos",(function(e){var t=e.pagePtr,n=e.textPtr,r=e.point,o=r.x,a=r.y;return-1!==Module._GetCharIndexAtPos(t,n,o,a,5,5)})),e.on("GetCharsRangeAtPos",(function(e){var t=e.pagePtr,n=e.start,r=e.end,o=e.textPtr;return o||(o=Module._InitText(t)),PDFRange={},Module._GetCharsRangeAtPos(t,o,n.x,n.y,r.x,r.y,5,5),U8StringData="",Module._GetTextContent(o,PDFRange.Location,PDFRange.Length),TextRectArray=[],Module._GetRects(t,o,PDFRange.Location,PDFRange.Length),{textContent:U8StringData,textRects:TextRectArray}})),e.on("GetSelectionForWordAtPos",(function(e){var t=e.pagePtr,n=e.textPtr,r=e.start;return e.end,Rect={},PDFRange={},U8StringData="",Module._GetSelectionForWordAtPos(t,n,r.x,r.y,5,5),TextRectArray=[],Module._GetRects(t,n,PDFRange.Location,PDFRange.Length),{textContent:U8StringData,textRects:TextRectArray}})),e.on("SelectWordAtPos",(function(e){return kt(e)})),e.on("XFDFExportAnnotations",(function(e){var t=function(e){XFDFData={},Module._XFDFExportAnnotations(e);var t=We("PDF Annotation XFDF");if(t.code)return t;return XFDFData}(e.doc);return t})),e.on("XFDFImportAnnotations",(function(e){var t=e.doc,n=e.xfdfBuffer,r=_malloc(n.length);Module.HEAPU8.set(n,r),Module._XFDFImportAnnotaitons(t,r,n.length),_free(r);var o=We("PDF Annotation XFDF");if(o.code)return o})),e.on("XFDFExportFormAnnotations",(function(e){var t=function(e){XFDFData={},Module._ExportCustomWidgets(e);var t=We("PDF XFDF");if(t.code)return t;return XFDFData.Content}(e.doc);return t})),e.on("SaveDocumentByStream",(function(e){return Ue(e)})),e.on("ExportPDF",(function(e){return function(e){return Oe.apply(this,arguments)}(e)})),e.on("SetPassword",(function(e){var t=e.doc,n=e.password,r=stringToNewUTF8(n);Module._SetPassword(t,r,"","","","","","")})),e.on("CompareDocument",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v,A,_,P,m,y,M,I,w,x,S,b,C,T,E,R,G,F,D,L,B,N,U,k,O,W,j,H,Y,z,Z,Q,q,K,J;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.data,o=r.leftFile,a=r.rightFile,i=r.leftFilePassword,u=void 0===i?"":i,c=r.rightFilePassword,l=void 0===c?"":c,e.next=4,le(o);case 4:return s=e.sent,f=Module._InitDocument(),ComPDFKitJS.opened_files[1]=s,d=stringToNewUTF8(u),Module._LoadDocumentByStream(f,1,s.length,d),p=Module._GetPageCount(f),e.next=12,le(a);case 12:if(g=e.sent,h=Module._InitDocument(),ComPDFKitJS.opened_files[2]=g,v=stringToNewUTF8(l),Module._LoadDocumentByStream(h,2,g.length,v),A=Module._GetPageCount(h),_=Math.min(p,A),1!==r.type){e.next=58;break}P=r.replaceColor,m=r.insertColor,y=r.deleteColor,M=r.textCompare,I=r.imgCompare,w=Module._InitCompare(f,h),x=0,M&&I?x=2:I&&(x=1),S=_e(P),b=_e(m),C=_e(y),Module._SetReplaceResColor(w,255*S.R,255*S.G,255*S.B),Module._SetInsertResColor(w,255*b.R,255*b.G,255*b.B),Module._SetDeleteResColor(w,255*C.R,255*C.G,255*C.B),Module._SetReplaceResTransparency(w,127.5),Module._SetInsertResTransparency(w,127.5),Module._SetDeleteResTransparency(w,127.5),T=0;case 34:if(!(T<_)){e.next=47;break}if(E=Module._DoCompare(w,T,T,x,1),!(R=We("PDF COMPARE"))||!R.code){e.next=39;break}return e.abrupt("return",R);case 39:Module._GetCompareResultsCount(E,1),CompareResultArray=[],Module._GetCompareResults(f,h,E,1),ResultsCountParams={},Module._GetResultsCountParams(E);case 44:T++,e.next=34;break;case 47:for(DataArray=[],Module._GenerateNewDoc(w),G=[],F=0;F<DataArray.length;F++)D=new Uint8Array(DataArray[F]),G.push(D);return DataArray=[],L=new Blob(G,{type:"application/pdf"}),B=Be(f,2),N=Be(h,2),e.abrupt("return",{oldDocument:B,newDocument:N,blobData:L});case 58:if(2!==r.type){e.next=82;break}if(U=r.inColor,k=r.newColor,O=r.inTransparency,W=r.newTransparency,j=r.coverType,H=Module._InitCompareDrawing(f,h),Module._SetBlendMode(H,j),Module._SetNoFill(H,1),Y=O/100,z=W/100,Module._SetStrokeAlphaCompare(H,Y),Module._SetStrokeAlphaCompared(H,z),Module._SetFillAlphaCompare(H,Y),Module._SetFillAlphaCompared(H,z),Z=_e(U),Q=_e(k),Module._SetColorCompare(H,255*Z.R,255*Z.G,255*Z.B),Module._SetColorCompared(H,255*Q.R,255*Q.G,255*Q.B),Module._CompareContent(H),!(q=We("PDF COMPARE"))||!q.code){e.next=77;break}return e.abrupt("return",q);case 77:return K=Module._GetDocGenerate(H),e.next=80,Ue({doc:K});case 80:return J=e.sent,e.abrupt("return",{blobData:J});case 82:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("GetOutlines",(function(e){var t=e.doc,n=[];return xe(t,Module._GetOutlineRoot(t),n,-1),n})),e.on("InitText",(function(e){var t=e.pagePtr;return Module._InitText(t)})),e.on("ClearText",(function(e){var t=e.textPtr;Module._ClearText(t)})),e.on("ClearPage",(function(e){var t=e.pagePtr;Module._ClearPage(t)})),e.on("Search",(function(e){for(var t=e.pagesPtr,n=e.value,r=stringToNewUTF8(n),o=null,a=[],i=0;i<t.length;i++){var u=t[i],c=u.pageNumber,l=u.pagePtr,s=u.textPtr,f=s;f||(f=Module._InitText(l));var d=Module._InitTextFind();if(Module._FindStart(f,d,r,0,0),(o=We("PDF VIEWER SEARCH")).code)return o;var p=1,g=0;do{if(TextFindItemArray=[],p=Module._FindNext(l,f,d)){for(var h=TextFindItemArray.length,v=[],A=0;A<h;A++){var _=TextFindItemArray[A],P=_.Left,m=_.Top,y=_.Right,M=_.Bottom;v.push({left:P,top:m,right:y,bottom:M})}a.push({pageNum:c,quads:v,content:TextFindItemArray[0].Content.replace(/\r?\n/gm," "),pageSearchIndex:g,searchValue:n}),g++}}while(p);!s&&Module._ClearText(f),Module._ClearTextFind(d)}return{searchResults:a}})),e.on("InitEditPage",(function(e){var t=e.pagePtr;return{editPagePtr:Module._InitEditPage(t),pagePtr:t}})),e.on("ClearEditPage",(function(e){return function(e){en(e),Module._ClearEditPage(e),de.delete(e)}(e)})),e.on("BeginEdit",(function(e){var t=e.editPagePtr,n=e.type;return Module._BeginEdit(t,n),de.add(t),We("PDF CONTENT EDIT")})),e.on("EndEdit",(function(e){return en(e)})),e.on("GetEditAreaCount",(function(e){return Module._GetEditAreaCount(e)})),e.on("GetEditArea",(function(e){var t=e.editPagePtr,n=e.index;return Module._GetEditArea(t,n)})),e.on("GetEditAreaInfoList",(function(e){return wt(e)})),e.on("GetEditAreaRenderInfoList",(function(e){return function(e){return xt.apply(this,arguments)}(e)})),e.on("IsTextArea",(function(e){return Module._IsTextArea(e)})),e.on("IsImageArea",(function(e){return Module._IsImageArea(e)})),e.on("GetEditAreaType",(function(e){return It(e)})),e.on("SetFrame",(function(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.rect;Module._SetFrame(t,n,r.left,r.right,r.bottom,r.top,!0)})),e.on("GetFrame",(function(e){return Dt(e)})),e.on("GetBeginAndEndCharPlace",(function(e){return Zt(e)})),e.on("GetTextByRange",(function(e){return Ht(e)})),e.on("GetText",(function(e){return Wt(e)})),e.on("SelectCharsRangeAtPos",(function(e){return Nt(e)})),e.on("GetTextClickInfo",(function(e){return function(e){var n=e.pagePtr,r=e.editAreaPtr,o=Nt(e),a=o.end;return t(t({},o),{},{activeCharPlace:a,cursorPoints:Bt({pagePtr:n,editAreaPtr:r,char:a}),textStyleData:tn({editAreaPtr:r,char:a})})}(e)})),e.on("GetTextDragSelectionInfo",(function(e){return function(e){var n=e.pagePtr,r=e.editAreaPtr,o=Nt(e),a=an(o.start,o.end)?[]:zt({pagePtr:n,editAreaPtr:r,start:o.start,end:o.end});return t(t({},o),{},{selectedCharRange:o,selectedRects:a,cursorPoints:a.length?Bt({pagePtr:n,editAreaPtr:r,char:o.end}):null})}(e)})),e.on("GetTextSelectionContentInfo",(function(e){return function(e){return Ot.apply(this,arguments)}(e)})),e.on("GetSectionAtPos",(function(e){return Ut(e)})),e.on("GetTextRangeSelectionInfo",(function(e){return function(e){return on.apply(this,arguments)}(e)})),e.on("GetTextCursorPoints",(function(e){return Bt(e)})),e.on("GetPrevCharPlace",(function(e){var t=e.editAreaPtr,n=e.char;return EditCharPlace={},EndEditCharPlace={},Module._GetPrevCharPlace(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex),{start:EditCharPlace,end:EndEditCharPlace}})),e.on("GetNextCharPlace",(function(e){var t=e.editAreaPtr,n=e.char;return EditCharPlace={},EndEditCharPlace={},Module._GetNextCharPlace(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex),{start:EditCharPlace,end:EndEditCharPlace}})),e.on("GetUpCharPlace",(function(e){var t=e.editAreaPtr,n=e.char;return EditCharPlace={},EndEditCharPlace={},Module._GetUpCharPlace(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex),{start:EditCharPlace,end:EndEditCharPlace}})),e.on("GetDownCharPlace",(function(e){var t=e.editAreaPtr,n=e.char;return EditCharPlace={},EndEditCharPlace={},Module._GetDownCharPlace(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex),{start:EditCharPlace,end:EndEditCharPlace}})),e.on("InsertText",(function(e){return Qt(e)})),e.on("InsertTextAndGetInfo",(function(e){return function(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.includeTextStyle,o=void 0!==r&&r,a=Qt(e),i={activeCharPlace:a,frame:Dt({pagePtr:t,editAreaPtr:n}),cursorPoints:Bt({pagePtr:t,editAreaPtr:n,char:a})};o&&(i.textStyleData=tn({editAreaPtr:n,char:a}));return i}(e)})),e.on("BackSpaceChar",(function(e){return qt(e)})),e.on("DeleteChar",(function(e){return Kt(e)})),e.on("ReplaceText",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=e.text;EditCharPlace={},Module._DeleteChars(t,n.SectionIndex||0,n.LineIndex||0,n.RunIndex||0,n.CharIndex||0,r.SectionIndex||0,r.LineIndex||0,r.RunIndex||0,r.CharIndex||0,!0);var a=stringToNewUTF8(o);Module._InsertText(t,EditCharPlace.SectionIndex||0,EditCharPlace.LineIndex||0,EditCharPlace.RunIndex||0,EditCharPlace.CharIndex||0,a,!0)})),e.on("ReplaceAll",(function(e){var t=e.editAreaPtr,n=e.text;EditCharPlace={},EndEditCharPlace={},Module._GetBeginAndEndCharPlace(t),Module._DeleteChars(t,EditCharPlace.SectionIndex||0,EditCharPlace.LineIndex||0,EditCharPlace.RunIndex||0,EditCharPlace.CharIndex||0,EndEditCharPlace.SectionIndex||0,EndEditCharPlace.LineIndex||0,EndEditCharPlace.RunIndex||0,EndEditCharPlace.CharIndex||0,!0);var r=stringToNewUTF8(n);Module._InsertText(t,EditCharPlace.SectionIndex||0,EditCharPlace.LineIndex||0,EditCharPlace.RunIndex||0,EditCharPlace.CharIndex||0,r,!0)})),e.on("DeleteChars",(function(e){return Jt(e)})),e.on("DeleteTextAndGetInfo",(function(e){return function(e){return Xt.apply(this,arguments)}(e)})),e.on("GetSelectLineRectsCounts",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end;return Module._GetSelectLineRectsCounts(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex)})),e.on("GetSelectLineRects",(function(e){return zt(e)})),e.on("SetCharsFontColor",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=D(e.color);Module._SetCharsFontColor(t,n.SectionIndex||0,n.LineIndex||0,n.RunIndex||0,n.CharIndex||0,r.SectionIndex||0,r.LineIndex||0,r.RunIndex||0,r.CharIndex||0,o.R,o.G,o.B,!0)})),e.on("SetCharsFontTransparency",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=e.opacity;Module._SetCharsFontTransparency(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex,o,!0)})),e.on("SetTextAligningSection",(function(e){var t=e.editAreaPtr,n=e.char,r=e.alignType;Module._SetTextAligningSection(t,r,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,!0)})),e.on("SetTextAligningRange",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=e.alignType;Module._SetTextAligningRange(t,o,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex,!0)})),e.on("SetCharsFontSize",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=e.fontSize;Module._SetCharsFontSize(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex,o,!0,!0)})),e.on("SetFontFromNativeTrueTypeFont",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=e.fontFamily,a=stringToNewUTF8(o);Module._SetFontFromNativeTrueTypeFont(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex,a,!0)})),e.on("RefreshRange",(function(e){return sn(e.editAreaPtr,{start:e.start,end:e.end})})),e.on("SetCharsFontStyle",function(){var e=i(n().mark((function e(t){var r,o,a,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.editAreaPtr,o=t.start,a=t.end,i=t.fontStyle,un(r,{start:o,end:a},i);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("CreateNewTextArea",(function(e){return Vt(e)})),e.on("CreateNewTextAreaWithInfo",(function(e){return function(e){var t=e.pagePtr,n=e.editPagePtr,r=e.text,o=Vt(e);if(!o)return{editAreaPtr:o};var a={SectionIndex:0,LineIndex:0,RunIndex:0,CharIndex:-1},i="";r&&(a=Qt({editAreaPtr:o,char:a,text:r}),i=r);return{editAreaPtr:o,frame:Dt({pagePtr:t,editAreaPtr:o}),text:i,activeCharPlace:a,cursorPoints:Bt({pagePtr:t,editAreaPtr:o,char:a}),editState:$t(n)}}(e)})),e.on("RemoveEditAreaByIndex",(function(e){var t=e.editPagePtr,n=e.editAreaIndex;Module._RemoveEditAreaByIndex(t,n,!0)})),e.on("RemoveEditArea",(function(e){var t=e.editPagePtr,n=e.editAreaPtr;Module._RemoveEditArea(t,n,!0)})),e.on("CopyArea",(function(e){var t=e.editPagePtr,n=e.editAreaPtr;return Module._CopyArea(t,n)})),e.on("PasteArea",(function(e){var t=e.pagePtr,n=e.editPagePtr,r=e.editAreaInfoPtr,o=e.rect,a=n;n||(a=Module._InitEditPage(t),Module._BeginEdit(a,3));var i=Module._PasteArea(t,a,r,o.left+5,o.top+5,!0);return n||(Module._EndEdit(a),Module._ClearEditPage(a)),i})),e.on("GetCopyAreaContent",(function(e){var t=e.editPagePtr,n=e.editAreaInfoPtr;return Module._GetCopyAreaContent(t,n),U8StringData})),e.on("GetTextStyle",(function(e){var t=e.editAreaPtr,n=e.char;return EditTextStyle={},Module._GetTextStyle(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex),EditTextStyle})),e.on("GetTextStyleData",(function(e){return tn(e)})),e.on("GetTextAreaSelectionInfo",(function(e){return nn(e)})),e.on("SetTextProperties",(function(e){return function(e){return ln.apply(this,arguments)}(e)})),e.on("GetBaseFontName",(function(e){var t=e.editAreaPtr,n=e.char;return Module._GetBaseFontName(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex),U8StringData})),e.on("createEditorDoc",function(){var e=i(n().mark((function e(t){var r,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.doc,o=t.password,e.next=3,De(r,o);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("GetTextSectionAlignType",function(){var e=i(n().mark((function e(t){var r,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.editAreaPtr,o=t.char,e.abrupt("return",Module._GetTextSectionAlignType(r,o.SectionIndex,o.LineIndex,o.RunIndex,o.CharIndex));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("InsertPage",(function(e){var t=e.doc,n=e.index,r=e.width,o=e.height,a=Module._InsertPage(t,n,r,o),i=We("PDF EDITOR PAGE");return i.code?i:{status:a}})),e.on("ImportPagesAtIndex",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,d,p,g,h,v,A,_,P,m,y;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.doc,o=t.file,a=t.range,i=t.index,u=t.password,e.next=3,le(o);case 3:if(c=e.sent,l=Module._InitDocument(),s=ComPDFKitJS.opened_files.length||0,ComPDFKitJS.opened_files[s]=c,d=stringToNewUTF8(u),Module._LoadDocumentByStream(l,s,c.length,d),p=Module._GetPageCount(l),h=!1,"all"===a?g="1-"+p:"odd"===a?g=Array.from({length:p},(function(e,t){return t+1})).filter((function(e){return e%2!=0})).join(","):"even"===a?g=Array.from({length:p},(function(e,t){return t+1})).filter((function(e){return e%2==0})).join(","):(v=p,A=a.replace(/\s/g,""),_=A.split(","),P=[],_.forEach((function(e){if(e.includes("-")){var t=e.split("-").map((function(e){return parseInt(e)})),n=f(t,2),r=n[0],o=n[1];if(r<=0&&(h=!0),r>v)return;o>v&&(o=v),P.push(r===v?r.toString():"".concat(r,"-").concat(o))}else{var a=parseInt(e);a<=0&&(h=!0),a<=v&&P.push(a.toString())}})),g=P.join(",")),g&&!h){e.next=14;break}return e.abrupt("return",0);case 14:if(g=stringToNewUTF8(g),m=Module._ImportPagesAtIndex(r,l,g,i),!(y=We("PDF EDITOR PAGE")).code){e.next=19;break}return e.abrupt("return",y);case 19:return ComPDFKitJS.opened_files.pop(),e.abrupt("return",{status:m});case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("RemovePage",(function(e){var t=e.doc,n=e.index,r=Module._RemovePage(t,n),o=We("PDF EDITOR PAGE");return o.code?o:{status:r}})),e.on("RotatePage",(function(e){var t=e.pagePtr,n=e.rotation;Module._RotatePage(t,n);var r=We("PDF EDITOR PAGE");if(r.code)return r})),e.on("GetPageWithoutParse",(function(e){var t=e.doc,n=e.index;return Module._GetPageWithoutParse(t,n)})),e.on("CopyPage",(function(e){var t=e.doc,n=e.index,r=stringToNewUTF8(n+1+""),o=Module._ImportPagesAtIndex(t,t,r,n+1),a=We("PDF EDITOR PAGE");return a.code?a:{status:o}})),e.on("GetPageRotation",(function(e){return Module._GetPageRotation(e)})),e.on("ClearDocument",(function(e){Module._ClearDocument(e),ComPDFKitJS.opened_files.pop()})),e.on("ExtractPage",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.doc,o=t.range,a=t.separateFile,i=[],!a){e.next=20;break}u=0;case 4:if(!(u<o.length)){e.next=18;break}if(c=o[u]+1+"",l=stringToNewUTF8(c),s=Module._InitDocument(),Module._CreateDocument(s),Module._ImportPagesAtIndex(s,r,l,0),!(f=We("PDF EDITOR PAGE")).code){e.next=13;break}return e.abrupt("return",f);case 13:d=Be(s,2),i.push({name:c,blobData:d});case 15:u++,e.next=4;break;case 18:e.next=29;break;case 20:if(p=stringToNewUTF8(o),g=Module._InitDocument(),Module._CreateDocument(g),Module._ImportPagesAtIndex(g,r,p,0),!(h=We("PDF EDITOR PAGE")).code){e.next=27;break}return e.abrupt("return",h);case 27:v=Be(g,2),i.push(v);case 29:return e.abrupt("return",{blobDataList:i});case 30:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("MovePage",(function(e){var t=e.doc,n=e.index,r=e.targetIndex,o=Module._MovePage(t,n,r),a=We("PDF EDITOR PAGE");return a.code?a:{status:o}})),e.on("CreateNewImageAreaByStream",(function(e){return Mt(e)})),e.on("CreateNewImageAreaWithInfo",(function(e){return function(e){var t=e.pagePtr,n=e.editPagePtr,r=Mt(e);return{editAreaPtr:r,frame:Dt({pagePtr:t,editAreaPtr:r}),clipRect:Lt({pagePtr:t,editAreaPtr:r}),opacity:Module._GetImageTransparency(r),image:mt(r),editState:$t(n)}}(e)})),e.on("ReplaceImageAreaByStream",(function(e){return yt(e)})),e.on("ReplaceImageAreaAndGetInfo",(function(e){return function(e){var t=e.pagePtr,n=yt(e);return{editAreaPtr:n,frame:Dt({pagePtr:t,editAreaPtr:n}),clipRect:Lt({pagePtr:t,editAreaPtr:n}),opacity:Module._GetImageTransparency(n),image:mt(n)}}(e)})),e.on("RotateImage",(function(e){var t=e.editAreaPtr,n=e.angle;return Module._RotateImage(t,n,!0)})),e.on("HorizontalMirrorImage",(function(e){return Module._HorizontalMirrorImage(e,!0)})),e.on("VerticalMirrorImage",(function(e){return Module._VerticalMirrorImage(e,!0)})),e.on("TransformImageAndExtract",(function(e){return function(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.transform,o=e.angle;"rotate"===r&&Module._RotateImage(n,o,!0);"horizontalMirror"===r&&Module._HorizontalMirrorImage(n,!0);"verticalMirror"===r&&Module._VerticalMirrorImage(n,!0);return{frame:Dt({pagePtr:t,editAreaPtr:n}),clipRect:Lt({pagePtr:t,editAreaPtr:n}),image:mt(n)}}(e)})),e.on("SetImageTransparency",(function(e){var t=e.editAreaPtr,n=e.opacity;return Module._SetImageTransparency(t,n,!0)})),e.on("GetImageTransparency",(function(e){return Module._GetImageTransparency(e)})),e.on("ExtractOriginalImage",(function(e){return mt(e)})),e.on("CutWithRect",(function(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.rect;Module._CutWithRect(t,n,r.left,r.right,r.bottom,r.top,!0)})),e.on("GetClipRect",(function(e){return Lt(e)})),e.on("SetClipRect",(function(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.rect;Module._SetClipRect(t,n,r.left,r.right,r.bottom,r.top,!0)})),e.on("RemoveSignature",(function(e){var t=e.doc,n=e.signaturePtr;return Module._RemoveSignature(t,n,!0)})),e.on("AddToTrustedCertificates",(function(e){return function(e){var t=e.signerPtr,n=Module._GetSignCert(t);if(n){return CertArray=[],!!Module._ExportToFilePath(n,0)&&CertArray[0]}return!1}(e)})),e.on("CreateReplyAnnotation",(function(e){return function(e,t,n){var r=n.author,o=n.date,a=n.dateCreated,i=n.contents,u=n.title,c=Module._CreateReplyAnnotation(e,t);r&&ze({annotPtr:c,author:r});n.name&&Module._SetAnnotDictName(c,stringToNewUTF8("NM"),stringToNewUTF8(n.name));i&&Qe({annotPtr:c,contents:i});(o||a)&&He({annotPtr:c,date:o||a});u&&Ze({annotPtr:c,title:u});if(n.state){var l=te[n.state.toUpperCase()];Module._SetState(c,l)}return c}(e.pagePtr,e.annotPtr,e.replyAnnotation)})),e.on("CreateReplyStateAnnotation",(function(e){var t=e.pagePtr,n=e.annotPtr,r=e.state,o=te[r],a=Module._CreateReplyStateAnnotation(t,n,o);return newStateInt=Module._GetState(a),{annotPtr:a,state:ne[newStateInt]}})),e.on("GetReplyAnnotation",(function(e){return An(e.pagePtr,e.annotPtr)})),e.on("EditReplyAnnotation",(function(e){var t=e.reply;t.author&&ze(t),t.contents&&Qe(t),t.date&&He(t),t.title&&Ze(t)})),e.on("SetState",(function(e){var t=e.reviewAnnotState,n=e.markedAnnotState;if(n){var r=te[n.state.toUpperCase()];Module._SetState(n.annotPtr,r);var o=Module._GetState(n.annotPtr);return{annotPtr:n.annotPtr,state:ne[o]}}if(t){var a=te[t.state.toUpperCase()];Module._SetState(t.annotPtr,a);var i=Module._GetState(t.annotPtr);return{annotPtr:t.annotPtr,state:ne[i]}}})),e.on("CanRedo",(function(e){return Module._CanRedo(e)})),e.on("CanUndo",(function(e){return Module._CanUndo(e)})),e.on("Redo",(function(e){return t(t({},fn("Redo",e)),{},{canUndo:!!Module._CanUndo(e),canRedo:!!Module._CanRedo(e)})})),e.on("RedoBatch",(function(e){return dn("Redo",e)})),e.on("Undo",(function(e){return t(t({},fn("Undo",e)),{},{canUndo:!!Module._CanUndo(e),canRedo:!!Module._CanRedo(e)})})),e.on("UndoBatch",(function(e){return dn("Undo",e)})),e.on("GetLineLeading",(function(e){var t=e.editAreaPtr,n=e.char;return Module._GetLineLeading(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex)})),e.on("SetLineLeading",(function(e){var t=e.editAreaPtr,n=e.char,r=e.spacing;Module._SetLineLeading(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r)})),e.on("GetSectionAfterLeading",(function(e){var t=e.editAreaPtr,n=e.char;return Module._GetSectionAfterLeading(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex)})),e.on("SetSectionAfterLeading",(function(e){var t=e.editAreaPtr,n=e.char,r=e.spacing;Module._SetSectionAfterLeading(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r)})),e.on("GetCharacterSpacing",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end;return Module._GetCharacterSpacing(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex)})),e.on("SetCharacterSpacing",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=e.spacing;Module._SetCharacterSpacing(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex,o)})),e.on("ApplyRedaction",(function(e){var t=e.annotPtr;return Xe({annotPtr:t,fillColor:e.fillColor}),Module._ApplyRedaction(t)})),e.on("ApplyRedactionPage",(function(e){var t=e.pagePtr;return Module._ApplyRedactionPage(t)})),e.on("ErasureRedactionFromRect",(function(e){var t=e.pagePtr,n=e.rect;return Module._ErasureRedactionFromRect(t,n.left,n.right,n.bottom,n.top)})),e.on("GetOverLayText",(function(e){var t=e.annotPtr;return U8StringData="",Module._GetOverLayText(t),U8StringData})),e.on("SetOverLayText",(function(e){var t=e.annotPtr,n=e.overlayText,r=e.color,o=e.fontName,a=e.fontSize,i=e.fontStyle,u=e.fontWeight,c=e.textAlignment;dt({annotPtr:t,fontName:o,fontSize:a,fontStyle:i,fontWeight:u,color:r});var l=k[c.toUpperCase()];return Module._SetTextAlignment(t,l),Module._SetOverLayText(t,stringToNewUTF8(n))})),e.on("GetStampRect",(function(e){var t=e.doc,n=e.pagePtr,r=e.annotation,o=r.contents,a=r.time,i=r.stampShape,u=r.stampColor,c=O[r.type.toUpperCase()],l=Module._CreateAnnot(t,n,c),s=stringToNewUTF8(o),f=stringToNewUTF8(a);Module._SetTextStamp(l,s,f,i,u,0);var d=We("PDF Annotation STAMPS");return d.code?d:(Module._UpdateAnnotAp(l,0),Module._GetAnnotRect(n,l),Module._RemoveAnnot(l),{left:Rect.Left,top:Rect.Top,right:Rect.Right,bottom:Rect.Bottom})})),e.on("GetLayers",(function(e){var t=Module._getLayerTree(e),n=Module._getRootNode(t),r=[],o=[],a=Module._getChildrenCount(n);return r.push.apply(r,d(function e(t,n){for(var r=[],a=0;a<n;a++){var i=Module._getChild(t,a);Module._getName(i);var u=Module._isLocked(i),c=Module._getLayerNodeDict(i),l=Module._getViewUsage(i),s=1!==l?1:0;s&&c&&o.push(c);var f=Module._getExportUsage(i);LayerPrintData={},Module._getPrintUsage(i),LayerZoomData={},Module._getZoomUsage(i);var p=Module._getChildrenCount(i),g=[];p>0&&g.push.apply(g,d(e(i,p))),r.push({node:i,ocg:c,name:U8StringData,isLocked:u,visible:s,defaultVisible:s,children:g,viewState:l,exportState:0===f?0:1===f?1:2,printState:0===LayerPrintData.print_state?0:1===LayerPrintData.print_state?1:2,zoom:LayerZoomData})}return r}(n,a))),{layers:r,ocgsPtr:o}})),e.on("SetLayer",(function(e){var t=e.node,n=e.name,r=e.defaultVisible,o=e.isLocked,a=e.printState,i=e.exportState;n&&Module._setName(t,stringToNewUTF8(n)),e.hasOwnProperty("defaultVisible")&&Module._setViewUsage(t,!r),e.hasOwnProperty("isLocked")&&Module._setLocked(t,o),e.hasOwnProperty("printState")&&Module._setPrintUsage(t,stringToNewUTF8(""),0===a?0:1===a?1:3),e.hasOwnProperty("exportState")&&Module._setExportUsage(t,0===i?0:1===i?1:3)})),e.on("RenderLayerBitmap",(function(e){var t=function(e){for(var t=e.pagePtr,n=e.x,r=e.y,o=e.width,a=e.height,i=e.mode,u=e.flag,c=e.ocgsPtr,l=e.form,s=parseInt(o)*parseInt(a),f=4*s,d=_malloc(f),p=0;p<s;p++)Module.HEAP32[d/4+p]=0;var g=c.length,h=_malloc(4*g);for(p=0;p<g;p++)Module.HEAP32[h/4+p]=c[p];Module._RenderLayerBitmap(t,n,r,o,a,i,d,u,h,g,l);var v=We("PDF VIEWER RENDER");if(v.code)return _free(d),v;var A=new Uint8Array(f);for(p=0;p<f;p+=4)A[p]=Module.HEAPU8[d+p+2],A[p+1]=Module.HEAPU8[d+p+1],A[p+2]=Module.HEAPU8[d+p],A[p+3]=Module.HEAPU8[d+p+3];return _free(d),{imageArray:A}}({pagePtr:e.pagePtr,x:e.x,y:e.y,width:e.width,height:e.height,ocgsPtr:e.ocgsPtr,mode:-1,flag:1,form:1});return t})),e.on("RenderLayerBitmapWithMatrix",(function(e){var t=e.pagePtr,n=e.scale,r=e.left,o=e.right,a=e.bottom,i=e.top,u=e.mode,c=void 0===u?-1:u,l=e.flag,s=void 0===l?0:l,f=e.ocgsPtr,d=e.form;return _n({pagePtr:t,scale:n,left:r,right:o,bottom:a,top:i,mode:c,flag:s,ocgsPtr:f,form:void 0===d?0:d})})),e.on("ExportLayers",(function(e){for(var t=e.doc,n=e.ocgsPtr,r=n.length,o=4*n.length,a=_malloc(o),i=0;i<n.length;i++)Module.HEAP32[a/4+i]=n[i];return Be(Module._exportDocumentLayer(t,a,r),2)})),e.on("InitColorList",(function(e){return Module._initColorList(e)})),e.on("GetPDFSeparationColor",function(){var e=i(n().mark((function e(t){var r,o,a,i,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.pagePtr,o=t.fileData,a=o instanceof ArrayBuffer?new Uint8Array(o):o,i=_malloc(a.length),Module.HEAPU8.set(a,i),u=Module._getPDFSeparationColor(r,i,a.length),_free(i),e.abrupt("return",u);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("GetColorsList",(function(e){SepColorsArray=[],Module._getColorsList(e);for(var t=[],n=0;n<SepColorsArray.length;n++){var r=SepColorsArray[n];t.push({index:n,name:r.ColorName,color:"rgb(".concat(r.R,", ").concat(r.G,", ").concat(r.B,")")})}return t})),e.on("GetSelectPointColor",(function(e){var t=e.pagePtr,n=e.sepColorPtr,r=e.point;return SelectPointColorArray=[],Module._getSelectPointColor(t,n,r.x,r.y),SelectPointColorArray})),e.on("RenderPageAndIgnoreColorByIndex",(function(e){var t=e.sepColorPtr,n=e.x,r=e.y,o=e.width,a=e.height,i=e.indexs,u=e.flag,c=void 0===u?0:u,l=e.rotate,s=function(e){for(var t=e.sepColorPtr,n=e.x,r=e.y,o=e.width,a=e.height,i=e.rotate,u=e.flag,c=e.indexs,l=parseInt(o)*parseInt(a),s=4*l,f=_malloc(s),d=0;d<l;d++)Module.HEAP32[f/4+d]=0;var p=c.length,g=_malloc(4*p);for(d=0;d<p;d++)Module.HEAP32[g/4+d]=c[d];Module._renderPageAndIgnoreColorByIndex(t,f,n,r,o,a,i,u,g,p);var h=We("PDF VIEWER COLOR RENDER");if(h.code)return _free(f),h;var v=new Uint8Array(s);for(d=0;d<s;d+=4)v[d]=Module.HEAPU8[f+d+2],v[d+1]=Module.HEAPU8[f+d+1],v[d+2]=Module.HEAPU8[f+d],v[d+3]=Module.HEAPU8[f+d+3];return _free(f),{imageArray:v}}({sepColorPtr:t,x:n,y:r,width:o,height:a,rotate:void 0===l?0:l,flag:c,indexs:i});return s})),e.on("CreateMeasurementAnnotation",(function(e){return function(e,t,n){var r="RECTANGLE"===n.type.toUpperCase()?"POLYGON":n.type.toUpperCase(),o=O[r],a=re[n.measureType.toUpperCase()],i=Module._CreateAnnot(e,t,o),u=Module._initRuler(e,i,a);n.captionType&&(MeasureInfo={},Module._getMeasureInfo(u),Module._SetMeasureInfo(u,MeasureInfo.factor,stringToNewUTF8(MeasureInfo.unit),stringToNewUTF8(MeasureInfo.decimalSymbol),stringToNewUTF8(MeasureInfo.thousandSymbol),stringToNewUTF8(MeasureInfo.display),MeasureInfo.precision,stringToNewUTF8(MeasureInfo.unitPrefix),stringToNewUTF8(MeasureInfo.unitSuffix),stringToNewUTF8(MeasureInfo.unitPosition),MeasureInfo.RulerBase,stringToNewUTF8(MeasureInfo.RulerBaseUnit),MeasureInfo.RulerTranslate,stringToNewUTF8(MeasureInfo.RulerTranslateUnit),ae[n.captionType.toUpperCase()]));var c=We("PDF Annotation");if(c.code)return c;return n.pagePtr=t,n.annotPtr=i,n.rulerPtr=u,Pn(e,n),{annotPtr:i,rulerPtr:u}}(e.doc,e.pagePtr,e.annotation)})),e.on("EditMeasurementAnnotation",(function(e){return Pn(e.doc,e.annotation)})),e.on("GetMeasurementData",(function(e){return mn(e.annotPtr,e.rulerPtr,e.type)})),e.on("GetMeasurementResult",(function(e){var t=e.annotPtr,n=e.rulerPtr,r=e.captionType,o=r?ae[r.toUpperCase()]:Module._getCaptionTypes(t);return Module._getMeasurementResults(n,o)})),e.on("GetFactor",(function(e){return Module._getFactor(e)})),e.on("GetOptimizeOption",(function(e){var t=function(e){for(var t={},n=0,r=Object.entries(ue);n<r.length;n++){var o=f(r[n],2),a=o[0],i=o[1];t[a.replace("OPTIMIZE_FLAG_","")]=!!(e&i)}return t}(Module._GetOptimizeFlag(e)),n={flags:t,quality:Module._GetOptimizeQuality(e),libVersion:Module._GetLibVersion(e)};return ImagePPI={},Module._GetOptimizeColImagePPI(e),n.colImagePPI=ImagePPI,ImagePPI={},Module._GetOptimizeGrayImagePPI(e),n.grayImagePPI=ImagePPI,ImagePPI={},Module._GetOptimizeMonImagePPI(e),n.monImagePPI=ImagePPI,n})),e.on("OptimizeDocumentByStream",function(){var e=i(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sn(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("IsImageDoc",function(){var e=i(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Module._IsImageDoc(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}}]);var r}();function me(){return(me=i(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(runtimeInitialized){e.next=5;break}return e.next=3,he(100);case 3:e.next=0;break;case 5:return e.abrupt("return",new Promise((function(e,t){e()})));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ye(e){var t=e.doc,n=e.fileId,r=e.length,o=e.password,a=stringToNewUTF8(o);return Module._LoadDocumentByStream(t,n,r,a),PermissionsInfo={},Module._GetPermissionsInfo(t),PermissionsInfo}function Me(e){var t=e.doc,n=e.password,r=e.permissionPassword,o=void 0===r?"":r,a=e.permissions,i=void 0===a?"":a,u=stringToNewUTF8(n),c=o?stringToNewUTF8(o):"",l=i.allowsPrinting,s=i.allowsCopying,f=i.allowsDocumentChanges,d=i.allowsDocumentAssembly,p=i.allowsCommenting,g=i.allowsFormFieldEntry;return l=void 0===l||l,s=void 0===s||s,f=void 0===f||f,d=void 0===d||d,p=void 0===p||p,g=void 0===g||g,Module._SetPassword(t,u,c,l,1,s,f,d,p,g),We("PDF SECURITY ENCRYPT")}function Ie(e){var t=e.pagePtr,n=e.scale,r=e.left,o=e.right,a=e.bottom,i=e.top,u=e.mode,c=void 0===u?-1:u,l=e.flag,s=void 0===l?0:l,f=e.form,d=void 0===f?0:f,p=4*(parseInt(o-r)*parseInt(a-i)),g=_malloc(p);Module._RenderPageBitmapWithMatrix(t,n,r,o,a,i,c,g,s,d);var h=We("PDF VIEWER RENDER");if(h.code)return _free(g),h;for(var v=new Uint8Array(p),A=0;A<p;A+=4)v[A]=Module.HEAPU8[g+A+2],v[A+1]=Module.HEAPU8[g+A+1],v[A+2]=Module.HEAPU8[g+A],v[A+3]=Module.HEAPU8[g+A+3];return _free(g),{imageArray:v}}function we(e){var n=e.editPagePtr,r=e.ocgsPtr,o=null!=r&&r.length?_n(t({mode:-1,flag:0,form:0},e)):Ie(e);return o.code?o:t(t({},o),$t(n))}function xe(e,t,n,r){++r;var o=[];if(!Module._IsValid(t))return n;var a=Module._GetFirst(t);if(!Module._IsValid(a))return n;for(var i=Se(e,o,a,n,r);Module._IsValid(i);)i=Se(e,o,i,n,r);for(var u=0;u<o.length;u++)xe(e,o[u],n[u].children,r)}function Se(e,t,n,r,o){t.push(n),Module._GetTitle(n);var a={title:U8StringData,children:[],level:o};return function(e,t,n,r){1===n?(PDFDestination={},Module._GetOutlineDestination(e,t),r.pageNumber=PDFDestination.PageIndex+1,r.posX=PDFDestination.PosX<0?0:PDFDestination.PosX,r.posY=PDFDestination.PosY<0?0:PDFDestination.PosY):6===n&&(Module._GetUri(t),r.url=U8StringData)}(e,n,Module._GetOutlineActionType(e,n),a),r.push(a),Module._GetNext(n)}function be(e){var t=e.doc,n=e.pagePtr,r=e.annotPtr,o=e.type,a=e.pageIndex,i=null;Rect={},Module._GetAnnotRect(n,r);var u={left:T(Rect.Left),top:T(Rect.Top),right:T(Rect.Right),bottom:T(Rect.Bottom)};Module._GetAnnotCreationDate(r);var c=C(U8StringData);Module._GetAnnotContent(r);var l=U8StringData;Module._GetAnnotTitle(r);var s=U8StringData;Module._GetAnnotAuthor(r);var d=U8StringData,p=T(Module._GetAnnotTransparency(r));U8StringData="",Module._GetAnnotDictName(r,stringToNewUTF8("NM"));var g=U8StringData;g||(g=M(),Module._SetAnnotDictName(r,stringToNewUTF8("NM"),stringToNewUTF8(g)));var h={type:o,date:c,contents:l,rect:u,opacity:p,name:g,pagePtr:n,annotPtr:r,title:s,author:d,color:null,borderColor:null,borderStyle:"solid",borderWidth:Module._GetAnnotBorderWidth(r),fillColor:null,fillTransparency:1,pageIndex:a};U8StringData="",Module._GetAnnotDictName(r,stringToNewUTF8("trn-custom-data"));var v=U8StringData;try{v=JSON.parse(v),h.customData=v}catch(e){}var A=An(n,r,g);A&&(h.replies=A),RGBColor={},Module._GetAnnotRGBColor(r)&&(h.borderColor=L(RGBColor.R,RGBColor.G,RGBColor.B)),RGBColor={},Module._GetAnnotFilledRGBColor(r)&&(h.fillColor=L(RGBColor.R,RGBColor.G,RGBColor.B));var _=Module._GetAnnotBorderStyle2(r);"dashed"===V[_]?((BorderStyle={}).DashArray=[],Module._GetAnnotBorderStyle(r)&&(h.borderStyle=V[BorderStyle.Style],h.dashes=BorderStyle.DashArray.toString())):(BorderEffect={},Module._GetBorderEffect(r),BorderEffect.isCloudy&&(h.borderStyle="cloudy",h.intensity=BorderEffect.intensity));switch(o){case"text":return h.color=h.borderColor,delete h.borderColor,h;case"link":var P=Module._GetLinkActionType(r);return h.actionType=J[P],1===P?(PDFDestination={},Module._GetLinkDestination(t,r),h.destPage=PDFDestination.PageIndex+1,h.url=""):6===P&&(Module._GetLinkUri(r),h.url=U8StringData,h.destPage=""),h;case"freetext":FontDa={},Module._GetFreeTextFont(r);var m=U8StringData,y=/bold/i.test(m)?"bold":"normal",I=/(oblique|italic)/i.test(m)?"oblique":"normal";h.fontName=m.split("-")[0],h.fontStyle=I,h.fontWeight=y,h.fontSize=FontDa.fontSize,h.color=L(FontDa.R,FontDa.G,FontDa.B),RGBColor={},Module._GetFreeTextBorderColor(r)&&(h.borderColor=L(RGBColor.R,RGBColor.G,RGBColor.B)),h.fillTransparency=Module._GetAnnotFilledTransparency(r);var w=Module._GetTextAlignment(r);if(h.textAlignment=U[w],h.contents||(Module._GetFreeTextContent(r),h.contents=U8StringData),RGBColor={},Module._GetFreeTextBgColor(r)&&(h.fillColor=L(RGBColor.R,RGBColor.G,RGBColor.B)),h.intent="FreeText",1===Module._GetFreeTextType(r)){FloatPointArray=[],Module._GetFreetextCallout(r),PageSize.Width=0,PageSize.Height=0,Module._GetPageSizeForIndex(t,a);for(var x=[],S=0;S<FloatPointArray.length;S++){var b=FloatPointArray[S];x.push({x:b.PointX,y:PageSize.Height-b.PointY})}h.floatPoint=x,h.intent="FreeTextCallout",Rect={},Module._GetFreetextRectDiff(r),h.rectDiff={left:Math.abs(T(Rect.Left)),top:Math.abs(T(Rect.Top)),right:Math.abs(T(Rect.Right)),bottom:Math.abs(T(Rect.Bottom))}}return h;case"line":LinePoint={},Module._GetLinePoint(n,r);var E=[LinePoint.StartPointX,LinePoint.StartPointY,LinePoint.EndPointX,LinePoint.EndPointY];if(h.linePoints=E,LineType={},Module._GetLineType(r),h.tail=q[LineType.Tail],h.head=q[LineType.Head],Module._isMeasured(r)){h.measure=1,h.rulerPtr=Module._initRuler(t,r,re.DISTANCE);var R=mn(r,h.rulerPtr,o);Object.assign(h,R)}return h;case"arc":case"square":case"polygon":var G=xn({pagePtr:n,annotPtr:r});if(G.length&&(h.vertices=G),h.vertices&&4===h.vertices.length){var F=f(h.vertices,4),D=F[0],B=F[1],N=F[2],k=F[3];D.y===B.y&&B.x===N.x&&N.y===k.y&&k.x===D.x&&(h.type="rectangle")}if(h.fillTransparency=Module._GetAnnotFilledTransparency(r),Module._isMeasured(r)){h.measure=1,h.rulerPtr=Module._initRuler(t,r,re.AREA);var O=mn(r,h.rulerPtr,o);Object.assign(h,O)}return h;case"polyline":if(h.vertices=xn({pagePtr:n,annotPtr:r}),Module._isMeasured(r)){h.measure=1,h.rulerPtr=Module._initRuler(t,r,re.PERIMETER);var W=mn(r,h.rulerPtr,o);Object.assign(h,W)}return h;case"circle":if(h.fillTransparency=Module._GetAnnotFilledTransparency(r),Module._isMeasured(r)){h.measure=1,h.rulerPtr=Module._initRuler(t,r,re.DISTANCE);var j=mn(r,h.rulerPtr,o);Object.assign(h,j)}return h;case"highlight":case"underline":case"squiggly":case"strikeout":return i=function(e){var t=e.pagePtr,n=e.annotPtr;RGBColor={};var r={};return Module._GetAnnotRGBColor(n)&&(r.color=L(RGBColor.R,RGBColor.G,RGBColor.B)),InkPointArray=[],Module._GetQuadPoints(t,n),r.quadPoints=InkPointArray,r}({pagePtr:n,annotPtr:r}),Object.assign(h,i),h;case"stamp":var H=Module._GetStampType(r);return h.stampType=K[H],0===H?h.stampType="image":(TextStamp={},Module._GetTextStamp(r),h.stampColor=TextStamp.StampColor,h.stampShape=$[TextStamp.StampType],TextStamp.Date&&(h.time=TextStamp.Date)),h;case"ink":if(i=function(e){for(var t=e.pagePtr,n=e.annotPtr,r=Module._GetInkPathCount(n),o=[],a=0;a<r;a++)InkPointArray=[],Module._GetInkPoints(t,n,a),o.push(InkPointArray);return{borderWidth:Module._GetAnnotBorderWidth(n),inkPointes:o}}({pagePtr:n,annotPtr:r}),Object.assign(h,i),1===i.inkPointes.length&&3===i.inkPointes[0].length&&(h.arcPoints=i.inkPointes[0].map((function(e){return{x:e.PointX,y:e.PointY}}))),Module._isMeasured(r)){h.measure=1,h.rulerPtr=Module._initRuler(t,r,re.ARC);var Y=mn(r,h.rulerPtr,o);Object.assign(h,Y)}return h}}function Ce(e){var n=e.doc,r=e.pagePtr,o=e.annotPtr,a=e.signatures,i=e.pageIndex;Rect={},Module._GetAnnotRect(r,o);var u={left:T(Rect.Left),top:T(Rect.Top),right:T(Rect.Right),bottom:T(Rect.Bottom)};Module._GetAnnotCreationDate(o);var c=C(U8StringData);Module._GetAnnotContent(o);var l=U8StringData;Module._GetAnnotAuthor(o);var s=U8StringData,f=T(Module._GetAnnotTransparency(o)),d=Module._GetWidgetType(o),p=Module._GetRequiredFlag(o);U8StringData="",Module._GetAnnotDictName(o,stringToNewUTF8("NM"));var g=U8StringData;g||(g=M(),Module._SetAnnotDictName(o,stringToNewUTF8("NM"),stringToNewUTF8(g))),U8StringData="",Module._GetAnnotDictName(o,stringToNewUTF8("trn-custom-data"));var h=U8StringData;try{h=JSON.parse(h)}catch(e){h={}}U8StringData="",Module._GetAnnotDictName(o,stringToNewUTF8("trn-form-field-indicator-text"));var v=U8StringData;U8StringData="",Module._GetAnnotDictName(o,stringToNewUTF8("trn-form-field-indicator"));var A=U8StringData;try{A=JSON.parse(A.toLowerCase())}catch(e){A=!1}var _=Module._GetAnnotBorderWidth(o),P={type:H[d],name:g,pagePtr:r,annotPtr:o,date:c,contents:l,rect:u,opacity:f,required:p,author:s,borderColor:null,borderWidth:_,borderStyle:"solid",fillColor:null,fillTransparency:1,pageIndex:i,customData:h,indicator:A,indicatorText:v};RGBColor={},Module._GetAnnotRGBColor(o)&&(P.borderColor=L(RGBColor.R,RGBColor.G,RGBColor.B)),RGBColor={},Module._GetWidgetBackgroundRGBColor(o)&&(P.fillColor=L(RGBColor.R,RGBColor.G,RGBColor.B));var m=Module._GetWidgetBorderStyle(o);P.borderStyle=V[m],Module._GetWidgetFieldName(o),P.fieldName=U8StringData;var y=Module._GetAnnotFlag(o);if(P.flag=y,0===y)P.isHidden=0;else{var I=!(y&Y),w=!(y&Z),x=!(y&z);P.isHidden=I&&w&&x?0:1}switch(d){case j.PUSHBUTTON:Module._GetButtonTitle(o),P.title=U8StringData,Module._GetBtnActionNamedAction(o),P.actionName=U8StringData;var S=Module._GetBtnActionType(o);if(1===S){var b=Module._GetBtnActionDestPage(n,o);P.destPage=b+1}else 6===S&&(Module._GetBtnActionURI(o),P.url=U8StringData);P.actionType=S,FontDa={},Te(P,o,Module._GetAnnotFontDa(o));var E=Ee(U8StringData),R=t({fontSize:FontDa.fontSize||12},E);Object.assign(P,R);break;case j.CHECKBOX:var G=Module._GetWidgetCheckStyle(o);P.checkStyle=G;var F=Module._GetCheckBoxIsChecked(o);P.isChecked=F;break;case j.RADIOBUTTON:var D=Module._GetWidgetCheckStyle(o);P.checkStyle=D;var B=Module._GetRadioButtonIsChecked(o);P.isChecked=B;break;case j.TEXTFIELD:if(1===Module._GetTextFieldSpe(o))return null;Module._GetTextFieldContent(o),P.contents=U8StringData,U8StringData="",Module._GetDateFormat(o),U8StringData&&(P.dateFormat=U8StringData);var N=Module._IsMultiLine(o);P.isMultiLine=N;var k=Module._GetWidgetTextJustification(o);P.textAlignment=U[k],FontDa={},Te(P,o,Module._GetAnnotFontDa(o));var O=Ee(U8StringData),W=t({fontSize:FontDa.fontSize||12},O);Object.assign(P,W);break;case j.COMBOBOX:case j.LISTBOX:WidgetItem={},Module._GetItemsSelectedItem(o),P.selectedItem={values:WidgetItem.Values,strings:WidgetItem.Strings};var Q=Module._GetItemsCount(o);P.itemsCount=Q,WidgetItemsArray=[],Module._GetWidgetItems(o),P.items=WidgetItemsArray,Module._GetItemsSelectedValue(o);var q=U8StringData;if(q){for(var K=0;K<WidgetItemsArray.length;K++)if(WidgetItemsArray[K].Value===q){P.selected=K;break}}else P.selected=null;FontDa={},Te(P,o,Module._GetAnnotFontDa(o));var J=Ee(U8StringData),X=t({fontSize:FontDa.fontSize||12},J);Object.assign(P,X);break;case j.SIGNATUREFIELDS:for(var $=0;$<a.length;$++){var ee=a[$].signaturePtr;Module._IsSameAnnotDict(ee,o)&&(SignerArray=[],Module._GetSigner(ee),SignerArray.length&&(P.isSignedDigitally=!0),P.signature=a[$])}P.isSigned=Module._IsStampSignature(o)}return P}function Te(e,t,n){if(RGBColor={},n){var r=FontDa,o=L(r.R,r.G,r.B);e.color=o}else if(Module._GetAnnotRGBColor(t)){var a=RGBColor,i=L(a.R,a.G,a.B);e.color=i}else e.color="#000000"}function Ee(e){var t=e.split("-")[0],n=/bold/i.test(e)?"bold":"normal";return{fontName:t,fontStyle:/(oblique|italic)/i.test(e)?"oblique":"normal",fontWeight:n}}function Re(e){var t=e.fontName,n=e.fontWeight,r=void 0===n?"normal":n,o=e.fontStyle,a=void 0===o?"normal":o;return["Helvetica","Courier","Times"].includes(t)?"bold"!==r||"italic"!==a&&"oblique"!==a?"bold"===r?t+"-"+Ge(r):"italic"===a||"oblique"===a?t+"-"+Ge("Times"===t?"italic":a):t:t+"-"+Ge(r)+Ge("Times"===t?"italic":a):t}function Ge(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Fe(e){for(var n=e.doc,r=[],o=[],a=Module._GetSignatureCount(n),i=0;i<a;i++){var u=Module._InitSignature(n,i);if(u){o.push(u);var c=[],l={signaturePtr:u,signerList:c};SignerArray=[],Module._GetSigner(u);for(var s=[],f=0;f<SignerArray.length;f++){var d=SignerArray[f];if(d){var p={signerPtr:d,isSignVerified:!1,isCertTrusted:!1,certificateList:s},g=Module._GetSignCert(d);if(g){CertArray=[],Module._ExportToFilePath(g,1),ComPDFKitJS.opened_cert[0]=CertArray[0],CertArray=[],Module._GetSignCertChain(g),CertArray.push(g);for(var h=0;h<CertArray.length;h++){var v=CertArray[h],A=t({certPtr:v},pn(v));s.push(A)}var _=ComPDFKitJS.opened_cert[0].length,P=Module._VerifyGetChain(u,g,0,_),m=void 0;if(m=P?null:Module._bEqualCert(g,0,_),P||m){p.isCertTrusted=!0;for(var y=0;y<p.certificateList.length;y++)p.certificateList[y].isTrusted=!0}var M=ComPDFKitJS.opened_files[0].length;if(1===Module._VerifySigner(u,d,0,M)){var I=Module._VerifyDocument(n,u,0,M);p.isSignVerified=1===I}DiffInfoArray=[],Module._GetSignatureDiffInfo(u),p.diffInfo=DiffInfoArray}Module._GetTimeStampSignature(d),c.push(p)}}if(SignerArray.length){Rect={},Module._GetSignatureRect(n,u),l.rect={left:T(Rect.Left),top:T(Rect.Top),right:T(Rect.Right),bottom:T(Rect.Bottom)},Module._GetSignatureFieldName(u),l.fieldName=U8StringData,Module._GetSignatureName(u),l.name=U8StringData||s[0].subject[5]||"",Module._GetSignatureTime(u);var w=U8StringData;l.date=C(w),Module._GetSignatureReason(u),l.reason=U8StringData,Module._GetSignatureLocation(u),l.location=U8StringData,l.pageIndex=Module._GetSignaturePageIndex(n,u),l.isDigital=1}else l.isDigital=0;r.push(l)}}return{signatures:r,signaturePtrList:o}}function De(e,t){return Le.apply(this,arguments)}function Le(){return Le=i(n().mark((function e(t,r){var o,a,i,u,c,l,s,f,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(DataArray=[],o=!!fontsJson||!!ComPDFKitJS.opened_DefFont[0],Module._SaveDocumentByStream(t,2,o),a=[],i=0;i<DataArray.length;i++)u=new Uint8Array(DataArray[i]),a.push(u);return DataArray=[],c=new Blob(a,{type:"application/pdf"}),e.next=9,le(c);case 9:return l=e.sent,s=Module._InitDocument(),f=ComPDFKitJS.opened_files.length,ComPDFKitJS.opened_files[f]=l,d=stringToNewUTF8(r),Module._LoadDocumentByStream(s,f,l.length,d),e.abrupt("return",s);case 16:case"end":return e.stop()}}),e)}))),Le.apply(this,arguments)}function Be(e,t){var n=Ne(e,t);return new Blob([n],{type:"application/pdf"})}function Ne(e,t){DataArray=[],1===t&&DataArray.push(ComPDFKitJS.opened_files[0]);var n=!!fontsJson||!!ComPDFKitJS.opened_DefFont[0];Module._SaveDocumentByStream(e,t,n);var r=DataArray.reduce((function(e,t){return e+t.length}),0),o=new Uint8Array(r),a=0;return DataArray.forEach((function(e){o.set(e,a),a+=e.length})),DataArray=[],o}function Ue(e){return ke.apply(this,arguments)}function ke(){return(ke=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.doc,o=t.saveType,a=void 0===o?2:o,i=t.password,u=t.oldPassword,c=t.permissionPassword,l=void 0===c?"":c,s=t.permissions,f=void 0===s?"":s,d=null,2!==a){e.next=21;break}if(u!==i&&i||f){e.next=7;break}d=Be(r,a),e.next=19;break;case 7:if(!i&&!f){e.next=18;break}return e.next=10,De(r,u);case 10:if(p=e.sent,!(g=Me({doc:p,password:i,permissionPassword:l,permissions:f}))||!g.code){e.next=14;break}return e.abrupt("return",g);case 14:d=Be(p,a),ComPDFKitJS.opened_files.pop(),e.next=19;break;case 18:d=Be(r,a);case 19:e.next=22;break;case 21:d=Be(r,a);case 22:return e.abrupt("return",d);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oe(){return(Oe=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.doc,o=t.saveType,a=void 0===o?2:o,i=t.password,u=t.oldPassword,c=t.permissionPassword,l=void 0===c?"":c,s=t.permissions,f=void 0===s?"":s,d=null,2!==a){e.next=21;break}if(u!==i&&i||f){e.next=7;break}d=Ne(r,a),e.next=19;break;case 7:if(!i&&!f){e.next=18;break}return e.next=10,De(r,u);case 10:if(p=e.sent,!(g=Me({doc:p,password:i,permissionPassword:l,permissions:f}))||!g.code){e.next=14;break}return e.abrupt("return",g);case 14:d=Ne(p,a),ComPDFKitJS.opened_files.pop(),e.next=19;break;case 18:d=Ne(r,a);case 19:e.next=22;break;case 21:d=Ne(r,a);case 22:return e.abrupt("return",d);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function We(e){var t=Module._GetComPDFkitLicenseErrorcode(),n={code:t};if(-105===t&&pe&&ge(pe),t)switch(t){case-100:n.message="The license is invalid";break;case-101:n.message="The license is expired";break;case-102:n.message="The license does not support the current platform";break;case-103:case-104:n.message="The license does not support your domain";break;case-105:n.message="The license does not support the "+e;break;case-106:n.message="License has not been initialized";break;case-107:n.message="The license does not support the current version";break;case-1e3:n.message="Illegal access to the API interface";break;case-1001:n.message="Failed to read license file"}return n}function je(){return je=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v,A,_;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.doc,o=t.saveType,a=void 0===o?2:o,i=t.password,u=void 0===i?"":i,c=t.oldPassword,l=void 0===c?"":c,e.next=3,De(r,l);case 3:for(s=e.sent,f=Module._GetPageCount(s),d=[],p=0;p<f;p++)g=Module._GetPage(s,p),d.push(g);h=0;case 8:if(!(h<d.length)){e.next=17;break}if(Module._FlattenPage(d[h]),!(v=We("PDF Annotation FLATTEN")).code){e.next=14;break}return ComPDFKitJS.opened_files.pop(),e.abrupt("return",v);case 14:h++,e.next=8;break;case 17:if(A=null,!u||u===l){e.next=26;break}if(!(_=Me({doc:s,password:u}))||!_.code){e.next=23;break}return ComPDFKitJS.opened_files.pop(),e.abrupt("return",_);case 23:A=Be(s,a),e.next=27;break;case 26:A=Be(s,a);case 27:return ComPDFKitJS.opened_files.pop(),e.abrupt("return",{blobData:A});case 29:case"end":return e.stop()}}),e)}))),je.apply(this,arguments)}function He(e){var t=e.annotPtr,n=e.date;n=n||new Date;var r=stringToNewUTF8(b(n));Module._SetAnnotCreationDate(t,r),function(e){var t=e.annotPtr,n=e.date;n=n||new Date;var r=stringToNewUTF8(b(n));Module._SetAnnotRecentlyModifyDate(t,r)}({annotPtr:t,date:n})}function Ye(e){var t=e.pagePtr,n=e.annotPtr,r=e.rect,o=r.left,a=r.right,i=r.bottom,u=r.top;return Module._SetAnnotRect(t,n,o,a,i,u)}function ze(e){var t=e.annotPtr,n=e.author,r=stringToNewUTF8(n);return Module._SetAnnotAuthor(t,r)}function Ze(e){var t=e.annotPtr,n=e.title,r=stringToNewUTF8(n);return Module._SetAnnotTitle(t,r)}function Qe(e){var t=e.annotPtr,n=e.contents,r=stringToNewUTF8(n),o=Module._SetAnnotContent(t,r);return _free(r),o}function qe(e){var t=e.annotPtr,n=F(e.borderColor);return!!Module._SetAnnotRGBColor(t,n.R,n.G,n.B)}function Ke(e){var t=e.annotPtr,n=F(e.borderColor);return!!Module._SetFreeTextBorderColor(t,n.R,n.G,n.B)}function Je(e){var t=e.annotPtr,n=e.fillColor;if(n){var r=F(n);return!!Module._SetFreeTextBgColor(t,r.R,r.G,r.B)}Module._ClearFreeTextBgColor(t)}function Xe(e){var t=e.annotPtr,n=e.fillColor;if(!n)return Module._ClearAnnotFilledRGBColor(t);var r=F(n);return!!Module._SetAnnotFilledRGBColor(t,r.R,r.G,r.B)}function Ve(e){var t=e.annotPtr,n=e.customData;"string"==typeof n&&Module._SetAnnotDictName(t,stringToNewUTF8("trn-custom-data"),stringToNewUTF8(n))}function $e(e){var t=e.annotPtr,n=e.opacity,r=void 0===n?1:n;return Module._SetAnnotTransparency(t,r)}function et(e){var t=e.annotPtr,n=e.borderWidth;Module._SetAnnotBorderWidth(t,n)}function tt(e){var t=e.annotPtr,n=e.fillTransparency,r=void 0===n?1:n;return Module._SetAnnotFilledTransparency(t,r)}function nt(e){for(var t=e.pagePtr,n=e.annotPtr,r=e.quadPoints,o=[],a=0;a<r.length;a++){var i=r[a];o.push(i.PointX,i.PointY)}for(var u=o.length,c=_malloc(4*u),l=0;l<u;l++)Module.HEAPF32[c/4+l]=o[l];var s=Module._SetQuadPoints(t,n,c,u);return _free(c),s}function rt(e){var t=e.pagePtr,n=e.annotPtr,r=e.linePoints;return Module._SetLinePoint(t,n,r[0],r[1],r[2],r[3])}function ot(e){for(var t=e.pagePtr,n=e.annotPtr,r=e.inkPointes,o=[],a=[],i=r.length,u=0;u<i;u++){for(var c=r[u].length,l=0;l<c;l++)o.push(r[u][l].PointX,r[u][l].PointY);a.push(c)}for(var s=a.length,f=_malloc(4*s),d=0;d<s;d++)Module.HEAP32[f/4+d]=a[d];var p=o.length,g=_malloc(4*p);for(d=0;d<p;d++)Module.HEAPF32[g/4+d]=o[d];Module._SetInkPath(t,n,f,i,g),_free(g)}function at(e){var t=e.doc,n=e.annotPtr,r=e.destPage,o=e.pageHeight;Module._SetLinkDestination(t,n,r-1,0,o,0)}function it(e){var t=e.annotPtr,n=e.url,r=stringToNewUTF8(n);Module._SetLinkUri(t,r)}function ut(e){var t=e.annotPtr,n=e.isChecked;Module._SetCheckBoxIsChecked(t,n);var r=We("PDF FORM FILL");if(r.code)return r}function ct(e){var t=e.annotPtr,n=e.isChecked;Module._SetRadioButtonIsChecked(t,n);var r=We("PDF FORM FILL");if(r.code)return r}function lt(e){var t=e.annotPtr,n=e.checkStyle;Module._SetWidgetCheckStyle(t,n)}function st(e){var t=e.annotPtr,n=F(e.fillColor);Module._SetWidgetBackgroundRGBColor(t,n.R,n.G,n.B)}function ft(e){var t=e.annotPtr,n=e.fieldName,r=stringToNewUTF8(n);Module._SetWidgetFieldName(t,r)}function dt(e){var t=e.annotPtr,n=e.fontName,r=e.fontWeight,o=e.fontStyle,a=e.fontSize,i=F(e.color||e.textColor||"#000000"),u=Re({fontName:n,fontWeight:r,fontStyle:o}),c=stringToNewUTF8(u);return Module._SetAnnotFontDa(t,c,a,i.R,i.G,i.B)}function pt(e){var t=e.annotPtr,n=e.selected;Module._SetItemsSelectedIndex(t,n);var r=We("PDF FORM FILL");if(r.code)return r}function gt(e){var t=e.doc,n=e.annotPtr,r=e.destPage,o=e.pageHeight,a=e.actionType,i=Module._InitAction();Module._SetActionType(i,a),r&&1==a&&(Module._SetDestination(i,t,r-1,0,o,0),Module._SetButtonAction(n,i),Module._ClearAction(i))}function ht(e){var t=e.annotPtr,n=e.url,r=e.actionType,o=Module._InitAction();if(Module._SetActionType(o,r),n&&6==r){var a=stringToNewUTF8(n);Module._SetUriPath(o,a),Module._SetButtonAction(t,o),Module._ClearAction(o)}}function vt(e){var t=e.annotPtr,n=e.contents,r=stringToNewUTF8(n);Module._SetTextFieldContent(t,r);var o=We("PDF FORM FILL");if(o.code)return o}function At(e){var t=e.annotPtr,n=e.item,r=n.index,o=n.value,a=n.string,i=stringToNewUTF8(o),u=stringToNewUTF8(a);Module._AddOptionItem(t,r,i,u)}function _t(e){var t=e.annotPtr,n=e.fontName,r=e.fontWeight,o=e.fontStyle,a=e.fontSize,i=e.color,u=e.textAlignment,c=e.contents,l=Re({fontName:n,fontWeight:r,fontStyle:o}),s=k[u.toUpperCase()],f=stringToNewUTF8(l),d=stringToNewUTF8(c),p=F(i);Module._SetFreeText(t,f,a,p.R,p.G,p.B,s,d),Module._SetAnnotContent(t,d),_free(d)}function Pt(e){var t=e&&"object"===o(e),n=t?e.editAreaPtr:e,r=t&&e.width&&e.height&&e.stride?e:function(e){return ImageAreaInfo={},Module._GetImageAreaSize(e),{width:ImageAreaInfo.Width,height:ImageAreaInfo.Height,stride:ImageAreaInfo.Stride}}(n);return{editAreaPtr:n,width:r.width,height:r.height,stride:r.stride}}function mt(e){var t=Pt(e),n=function(e){var t=e.editAreaPtr,n=e.width,r=e.height,o=e.stride,a=parseInt(n),i=parseInt(r),u=parseInt(o),c=u*i,l=a*i*4;if(!Number.isFinite(c)||!Number.isFinite(l)||c<l||c<=0)return new Uint8Array;var s=_malloc(c);if(!s)return new Uint8Array;if(Module.HEAPU8.fill(0,s,s+c),!Module._GetImageAreaData(t,s,c))return _free(s),new Uint8Array;for(var f=new Uint8Array(l),d=0;d<i;d++)for(var p=0;p<a;p++){var g=d*u+4*p,h=d*a*4+4*p;f[h]=Module.HEAPU8[s+g+2],f[h+1]=Module.HEAPU8[s+g+1],f[h+2]=Module.HEAPU8[s+g],f[h+3]=Module.HEAPU8[s+g+3]}return _free(s),f}(t);return{imageArray:n,width:t.width,height:t.height,stride:t.stride}}function yt(e){var t=e.pagePtr,n=e.editPagePtr,r=e.editAreaPtr,o=e.rect,a=se(e.imageBase64);return ComPDFKitJS.opened_image=[],ComPDFKitJS.opened_image[0]=a,Module._ReplaceImageAreaByStream(t,n,r,o.left,o.right,o.bottom,o.top,0,a.length,!0)}function Mt(e){var t=e.pagePtr,n=e.editPagePtr,r=e.rect,o=se(e.imageBase64);ComPDFKitJS.opened_image=[],ComPDFKitJS.opened_image[0]=o;var a=Module._CreateNewImageAreaByStream(t,n,r.left,r.right,r.bottom,r.top,0,o.length,!0),i=Module._GetPageRotation(t);if(i%4!=0){var u=90*i;Module._RotateImage(a,u,!1)}return a}function It(e){return Module._IsTextArea(e)?"text":Module._IsImageArea(e)?"image":null}function wt(e){for(var t=Module._GetEditAreaCount(e),n=[],r=0;r<t;r++){var o=Module._GetEditArea(e,r);o&&n.push({editAreaPtr:o,editAreaIndex:r,type:It(o)})}return n}function xt(){return(xt=i(n().mark((function e(t){var r,o,a,i,u,c,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.pagePtr,o=t.editPagePtr,a=wt(o),i=[],u=h(a),e.prev=4,u.s();case 6:if((c=u.n()).done){e.next=15;break}return l=c.value,e.t0=i,e.next=11,St(r,l);case 11:e.t1=e.sent,e.t0.push.call(e.t0,e.t1);case 13:e.next=6;break;case 15:e.next=20;break;case 17:e.prev=17,e.t2=e.catch(4),u.e(e.t2);case 20:return e.prev=20,u.f(),e.finish(20);case 23:return e.abrupt("return",i);case 24:case"end":return e.stop()}}),e,null,[[4,17,20,23]])})))).apply(this,arguments)}function St(e,t){return bt.apply(this,arguments)}function bt(){return(bt=i(n().mark((function e(r,o){var a,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=o.editAreaPtr,"text"!==(i=o.type)){e.next=11;break}return e.t0=t,e.t1=t({},o),e.t2={},e.t3=Dt({pagePtr:r,editAreaPtr:a}),e.next=8,Wt(a);case 8:return e.t4=e.sent,e.t5={frame:e.t3,text:e.t4},e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t5));case 11:if("image"!==i){e.next=13;break}return e.abrupt("return",t(t({},o),{},{frame:Dt({pagePtr:r,editAreaPtr:a}),clipRect:Lt({pagePtr:r,editAreaPtr:a}),opacity:Module._GetImageTransparency(a)}));case 13:return e.abrupt("return",o);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ct(e){return Rect={},e(),{left:Rect.Left,top:Rect.Top,right:Rect.Right,bottom:Rect.Bottom}}function Tt(){EditCharPlace={}}function Et(){Tt(),EndEditCharPlace={}}function Rt(){return{start:t({},EditCharPlace),end:t({},EndEditCharPlace)}}function Gt(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?[e.SectionIndex||0,e.LineIndex||0,e.RunIndex||0,e.CharIndex||0]:[e.SectionIndex,e.LineIndex,e.RunIndex,e.CharIndex]}function Ft(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return[].concat(d(Gt(e.start,t)),d(Gt(e.end,t)))}function Dt(e){var t=e.pagePtr,n=e.editAreaPtr;return Ct((function(){return Module._GetFrame(t,n)}))}function Lt(e){var t=e.pagePtr,n=e.editAreaPtr;return Ct((function(){return Module._GetClipRect(t,n)}))}function Bt(e){var n,r=e.pagePtr,o=e.editAreaPtr,a=e.char;return CursorPoints={},(n=Module)._GetTextCursorPoints.apply(n,[r,o].concat(d(Gt(a)))),t({},CursorPoints)}function Nt(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.startPoint,o=e.endPoint;return Et(),Module._SelectCharsRangeAtPos(t,n,r.x,r.y,o.x,o.y),Rt()}function Ut(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.pointX,o=e.pointY;return Et(),Module._GetSectionAtPos(t,n,r,o),Rt()}function kt(e){var n=e.pagePtr,r=e.editAreaPtr,o=e.point,a=Module._InitText(n);if(PDFRange={},U8StringData="",Module._GetSelectionForWordAtPos(n,a,o.x,o.y,5,5),!U8StringData)return Module._ClearText(a),null;if(TextRectArray=[],Module._GetRects(n,a,PDFRange.Location,PDFRange.Length),Module._ClearText(a),!TextRectArray.length)return null;var i=TextRectArray[0],u=TextRectArray[TextRectArray.length-1];return t(t({},Nt({pagePtr:n,editAreaPtr:r,startPoint:{x:i.Left,y:(i.Top+i.Bottom)/2},endPoint:{x:u.Right,y:(u.Top+u.Bottom)/2}})),{},{textContent:U8StringData})}function Ot(){return(Ot=i(n().mark((function e(r){var o,a,i,u,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=r.editAreaPtr,a=r.char,i=r.selectedCharRange,u=tn({editAreaPtr:o,char:a,selectedCharRange:i}),!i){e.next=8;break}return e.next=5,Ht({editAreaPtr:o,start:i.start,end:i.end});case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0="";case 9:return c=e.t0,e.abrupt("return",t(t({},u),{},{selectedText:c,selectedCharRange:i}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wt(e){return jt.apply(this,arguments)}function jt(){return(jt=i(n().mark((function e(t){var r,o,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Zt(t),o=r.start,a=r.end,e.next=3,Ht({editAreaPtr:t,start:o,end:a});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ht(e){return Yt.apply(this,arguments)}function Yt(){return(Yt=i(n().mark((function e(t){var r,o,a,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.editAreaPtr,a=t.start,i=t.end,U8StringData="",e.next=4,(r=Module)._GetTextByRange.apply(r,[o].concat(d(Ft({start:a,end:i}))));case 4:return e.abrupt("return",U8StringData);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zt(e){var t,n=e.pagePtr,r=e.editAreaPtr,o=e.start,a=e.end;return RectArray=[],(t=Module)._GetSelectLineRects.apply(t,[n,r].concat(d(Ft({start:o,end:a})))),RectArray}function Zt(e){return Et(),Module._GetBeginAndEndCharPlace(e),Rt()}function Qt(e){var n,r=e.editAreaPtr,o=e.char,a=e.text;Tt();var i=stringToNewUTF8(a);return(n=Module)._InsertText.apply(n,[r].concat(d(Gt(o,!0)),[i,!0])),t({},EditCharPlace)}function qt(e){var n,r=e.editAreaPtr,o=e.char;return Tt(),(n=Module)._BackSpaceChar.apply(n,[r].concat(d(Gt(o)),[!0])),t({},EditCharPlace)}function Kt(e){var n,r=e.editAreaPtr,o=e.char;return Tt(),(n=Module)._DeleteChar.apply(n,[r].concat(d(Gt(o)),[!0])),t({},EditCharPlace)}function Jt(e){var n,r=e.editAreaPtr,o=e.start,a=e.end;return Tt(),(n=Module)._DeleteChars.apply(n,[r].concat(d(Ft({start:o,end:a},!0)),[!0])),t({},EditCharPlace)}function Xt(){return(Xt=i(n().mark((function e(t){var r,o,a,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.action,o=t.pagePtr,a=t.editAreaPtr,i="BackSpaceChar"===r?qt(t):"DeleteChar"===r?Kt(t):"DeleteChars"===r?Jt(t):t.char,e.t0=i,e.t1=Dt({pagePtr:o,editAreaPtr:a}),e.t2=Bt({pagePtr:o,editAreaPtr:a,char:i}),e.next=7,Wt(a);case 7:return e.t3=e.sent,e.abrupt("return",{activeCharPlace:e.t0,frame:e.t1,cursorPoints:e.t2,text:e.t3});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vt(e){var t=e.pagePtr,n=e.editPagePtr,r=e.rect,o=e.fontData,a=e.alignType;return Module._CreateNewTextArea(t,n,r.left,r.right,r.bottom,r.top,stringToNewUTF8(o.fontName),o.fontSize,o.r,o.g,o.b,o.opacity,o.isBold,o.italic,a,!0)}function $t(e){return{canUndo:!!Module._CanUndo(e)}}function en(e){return de.has(e)&&(Module._EndEdit(e),de.delete(e)),$t(e)}function tn(e){var n,r,o,a,i,u,c=e.editAreaPtr,l=e.char,s=e.selectedCharRange,f=Zt(c),p=s||f;EditTextStyle={},(n=Module)._GetTextStyle.apply(n,[c].concat(d(Gt(l))));var g=t({},EditTextStyle);return U8StringData="",(r=Module)._GetBaseFontName.apply(r,[c].concat(d(Gt(l)))),{textStyle:g,fontFamily:U8StringData,lineSpacing:(o=Module)._GetLineLeading.apply(o,[c].concat(d(Gt(l)))),paragraphSpacing:(a=Module)._GetSectionAfterLeading.apply(a,[c].concat(d(Gt(l)))),characterSpacing:(i=Module)._GetCharacterSpacing.apply(i,[c].concat(d(Ft(p)))),alignType:(u=Module)._GetTextSectionAlignType.apply(u,[c].concat(d(Gt(l)))),entireCharRange:f}}function nn(e){return rn.apply(this,arguments)}function rn(){return(rn=i(n().mark((function e(r){var o,a,i,u,c,l,s,f;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=r.pagePtr,a=r.editAreaPtr,i=r.char,u=r.selectedCharRange,c=tn({editAreaPtr:a,char:i,selectedCharRange:u}),l=u||c.entireCharRange,s=zt({pagePtr:o,editAreaPtr:a,start:l.start,end:l.end}),e.next=6,Ht({editAreaPtr:a,start:l.start,end:l.end});case 6:return f=e.sent,e.abrupt("return",t(t({},c),{},{selectedRects:s,selectedText:f,selectedCharRange:l}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function on(){return(on=i(n().mark((function e(r){var o,a,i,u,c,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=r.pagePtr,a=r.editAreaPtr,i=r.point,u=r.type,null!=(c="paragraph"===u?Ut({pagePtr:o,editAreaPtr:a,pointX:i.x,pointY:i.y}):kt({pagePtr:o,editAreaPtr:a,point:i}))&&c.start&&null!=c&&c.end&&!an(c.start,c.end)){e.next=4;break}return e.abrupt("return",{selected:!1});case 4:return e.next=6,nn({pagePtr:o,editAreaPtr:a,char:c.end,selectedCharRange:c});case 6:return l=e.sent,e.abrupt("return",t(t({selected:!0},l),{},{cursorPoints:Bt({pagePtr:o,editAreaPtr:a,char:c.end})}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function an(e,t){return e.SectionIndex===t.SectionIndex&&e.LineIndex===t.LineIndex&&e.RunIndex===t.RunIndex&&e.CharIndex===t.CharIndex}function un(e,t,n){var r;(r=Module)["_"+n].apply(r,[e].concat(d(Ft(t)),[!0]))}function cn(e,t){return e.CharIndex===t.start.CharIndex?t.start:t.end}function ln(){return(ln=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,p,g,h,v,A,_,P,m,y,M,I,w,x,S,b,C;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(p in r=t.pagePtr,o=t.editAreaPtr,a=t.props,i=t.char,u=t.selectedCharRange,c=t.state,l=i,s=u||Zt(o),f=0,a)"alignType"!==p&&"textAlign"!==p||(g="alignType"===p?a[p]:(n=a[p],void 0,{LEFT:2,CENTER:5,RIGHT:3},{LEFT:2,CENTER:5,RIGHT:3}[String(n).toUpperCase()]||2),u||2!==c?(v=Module)._SetTextAligningRange.apply(v,[o,g].concat(d(Ft(s)),[!0])):(h=Module)._SetTextAligningSection.apply(h,[o,g].concat(d(Gt(i)),[!0])),f++),"color"===p&&(_=D(a.color),(A=Module)._SetCharsFontColor.apply(A,[o].concat(d(Ft(s,!0)),[_.R,_.G,_.B,!0])),f++),"opacity"===p&&((P=Module)._SetCharsFontTransparency.apply(P,[o].concat(d(Ft(s)),[a.opacity/100,!0])),f++),"fontSize"===p&&((m=Module)._SetCharsFontSize.apply(m,[o].concat(d(Ft(s)),[a.fontSize,!0,!0])),f++),"fontFamily"===p&&(M=stringToNewUTF8(a.fontFamily),(y=Module)._SetFontFromNativeTrueTypeFont.apply(y,[o].concat(d(Ft(s)),[M,!0])),f++),"fontStyle"===p&&(I=a.fontStyle,(w=function(e){un(o,s,e),f++})("ClearCharsFontBold"),s=sn(o,s),l=cn(l,s),w("ClearCharsFontItalic"),s=sn(o,s),l=cn(l,s),1===I||"bold"===I?w("SetCharsFontBold"):2===I||"italic"===I?w("SetCharsFontItalic"):3!==I&&"boldItalic"!==I||(w("SetCharsFontBold"),s=sn(o,s),l=cn(l,s),w("SetCharsFontItalic"))),"lineSpacing"===p&&((x=Module)._SetLineLeading.apply(x,[o].concat(d(Gt(i)),[a.lineSpacing])),f++),"paragraphSpacing"===p&&((S=Module)._SetSectionAfterLeading.apply(S,[o].concat(d(Gt(i)),[a.paragraphSpacing])),f++),"characterSpacing"===p&&((b=Module)._SetCharacterSpacing.apply(b,[o].concat(d(Ft(s)),[a.characterSpacing])),f++);return u&&2===c&&(s=sn(o,s),l=cn(i,s)),e.next=8,nn({pagePtr:r,editAreaPtr:o,char:l,selectedCharRange:u?s:u});case 8:return(C=e.sent).cursorPoints=Bt({pagePtr:r,editAreaPtr:o,char:l}),e.abrupt("return",{frame:Dt({pagePtr:r,editAreaPtr:o}),selectionInfo:C,selectedCharRange:C.selectedCharRange,activeCharPlace:l,undoBatchCount:f});case 11:case"end":return e.stop()}var n}),e)})))).apply(this,arguments)}function sn(e,t){var n;return Et(),(n=Module)._RefreshRange.apply(n,[e].concat(d(Ft(t)))),Rt()}function fn(e,n){return Tt(),{editAreaPtr:"Redo"===e?Module._Redo(n):Module._Undo(n),editCharPlace:t({},EditCharPlace)}}function dn(e,t){for(var n=t.editPagePtr,r=t.count,o=void 0===r?1:r,a=[],i=0;i<o;i++)a.push(fn(e,n));return{results:a,canUndo:!!Module._CanUndo(n),canRedo:!!Module._CanRedo(n)}}function pn(e){var t=["C","ST","L","O","OU","CN","email"],n=Module._GetSignVersion(e);Module._GetSignAlgOid(e);for(var r=U8StringData,o=function(e){switch(e){case"1.2.840.113549.1.1.1":default:return"RSA_RSA";case"1.2.840.113549.1.1.2":return"MD2RSA";case"1.2.840.113549.1.1.3":return"MD4RSA";case"1.2.840.113549.1.1.4":return"MD5RSA";case"1.2.840.113549.1.1.5":return"SHA1RSA";case"1.2.840.113549.1.1.11":return"SHA256RSA";case"1.2.156.10197.1.501":return"SM3SM2"}}(r),a={},i=0;i<7;i++)Module._GetSignSubject(e,i),a[t[i]]=U8StringData;for(var u=[],c=0;c<7;c++)Module._GetSignIssuer(e,c),u[t[c]]=U8StringData;Module._GetSignSerialNumber(e);var l=U8StringData;Module._GetSignValidDate(e,0);var s=U8StringData;Module._GetSignValidDate(e,1);var f=U8StringData;AccessInfoArray=[],Module._GetAuthorityInfoAccess(e);var d=AccessInfoArray;Module._GetSubjectKeyIdentifier(e);var p=U8StringData,g=Module._GetKeyUsage(e);PolicyArray=[],Module._GetCertificatePolicies(e);var h=PolicyArray;Module._GetAuthorityKeyIdentifier(e);var v=U8StringData;CRLPointArray=[],Module._GetCRLDistributionPoints(e);var A=CRLPointArray;Module._GetBasicConstraints(e);var _=U8StringData;Module._GetPublicKey(e);var P=U8StringData;Module._GetX509Data(e);var m=U8StringData;Module._GetSHA1Digest(e);var y=U8StringData;Module._GetMD5Digest(e);var M=U8StringData;return OCSPUrlArray=[],Module._GetOCSPUrl(e),{version:n,signAlgOid:r,signAlgOidType:o,subject:a,issuer:u,serialNumber:l,validDateStart:s,validDateEnd:f,sccessInfo:d,subjectKeyIdentifier:p,keyUsage:g,certificatePolicies:h,authorityKeyIdentifier:v,CRLDistributionPoints:A,basicConstraints:_,publicKey:P,X509Data:m,SHA1Digest:y,MD5Digest:M,ocspURL:OCSPUrlArray}}function gn(e){return hn.apply(this,arguments)}function hn(){return(hn=i(n().mark((function e(t){var r,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=se(t.imageBase64),o=ComPDFKitJS.opened_image.length,ComPDFKitJS.opened_image[o]=r,Module._UpdateAPWithImage(t.annotPtr,o,r.length,1,0);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vn(e){var t=e.annotPtr,n=e.content,r=void 0===n?"":n,o=e.isDrawOnlyContent,a=void 0!==o&&o,i=e.isDrawLogo,u=void 0!==i&&i,c=e.isContentAlginLeft,l=void 0!==c&&c,s=e.text,f=void 0===s?"":s,d=e.logoBase64,p=void 0===d?"":d,g=e.imageBase64,h=void 0===g?"":g,v=stringToNewUTF8(r),A=stringToNewUTF8(f);ComPDFKitJS.opened_image=[];var _=ComPDFKitJS.opened_image.length,P=0;if(p){var m=se(p);ComPDFKitJS.opened_image[_]=m,P=m.length}var y=ComPDFKitJS.opened_image.length,M=0;if(h){var I=se(h);ComPDFKitJS.opened_image[y]=I,M=I.length,""!==r||""!==f||p||(ComPDFKitJS.opened_image[_]=I,P=I.length,M=0,u=!0)}Module._UpdateApWithDigitalSigConfig(t,v,a,u,l,A,_,P,y,M,0,0,0,0,0,0)}function An(e,t,n){AnnotArray=[];var r=[];Module._GetReplies(e,t);for(var o=0;o<AnnotArray.length;o++){var a=AnnotArray[o];Rect={},Module._GetAnnotRect(e,a);var i={left:T(Rect.Left),top:T(Rect.Top),right:T(Rect.Right),bottom:T(Rect.Bottom)};Module._GetAnnotCreationDate(a);var u=C(U8StringData);Module._GetAnnotContent(a);var c=U8StringData;Module._GetAnnotTitle(a);var l=U8StringData;Module._GetAnnotAuthor(a);var f=U8StringData,d=T(Module._GetAnnotTransparency(a));U8StringData="",Module._GetAnnotDictName(a,stringToNewUTF8("NM"));var p=U8StringData;p||(p=M(),Module._SetAnnotDictName(a,stringToNewUTF8("NM"),stringToNewUTF8(p)));var g=Module._GetAnnotBorderWidth(a),h=s(s(s(s({inReplyTo:n,date:u,contents:c,rect:i,opacity:d,name:p,pagePtr:e,annotPtr:a,title:l,author:f},"date",u),"opacity",d),"borderWidth",g),"fillTransparency",1);if(Module._IsReviewStateAnnot(a)){var v=Module._GetState(a);h.state=ne[v],h.stateModel="Review"}if(Module._IsMarkedStateAnnot(a)){var A=Module._GetState(a);h.state=ne[A],h.stateModel="Marked"}r.push(h)}return r}function _n(e){for(var t=e.pagePtr,n=e.scale,r=e.left,o=e.right,a=e.bottom,i=e.top,u=e.mode,c=e.flag,l=e.ocgsPtr,s=e.form,f=4*(parseInt(o-r)*parseInt(a-i)),d=_malloc(f),p=l.length,g=_malloc(4*p),h=0;h<p;h++)Module.HEAP32[g/4+h]=l[h];Module._RenderPageBitmapWithMatrix2(t,n,r,o,a,i,u,d,c,g,p,s);var v=We("PDF VIEWER RENDER");if(v.code)return _free(g),_free(d),v;var A=new Uint8Array(f);for(h=0;h<f;h+=4)A[h]=Module.HEAPU8[d+h+2],A[h+1]=Module.HEAPU8[d+h+1],A[h+2]=Module.HEAPU8[d+h],A[h+3]=Module.HEAPU8[d+h+3];return _free(g),_free(d),{imageArray:A}}function Pn(e,t){var n=t.pagePtr,r=t.annotPtr,o=t.rulerPtr,a=t.color,i=t.borderColor,u=t.borderWidth,c=t.contents,l=t.date,s=t.opacity,f=t.fillTransparency,d=t.rect,p=t.author,g=t.fillColor,h=t.quadPoints,v=t.fontName,A=t.fontSize,_=t.vertices,P=t.borderStyle,m=t.dashes,y=t.head,M=t.tail,I=t.linePoints,w=t.inkPointes,x=t.arcPoints;i&&qe({annotPtr:r,borderColor:i}),i&&function(e){var t=e.annotPtr,n=F(e.borderColor);Module._SetAnnotBorderRGBColor(t,n.R,n.G,n.B)}({annotPtr:r,borderColor:i}),Object.hasOwn(t,"fillColor")&&Xe({annotPtr:r,fillColor:g}),l&&He({annotPtr:r,date:l}),isFinite(s)&&(!function(e){var t=e.annotPtr,n=e.opacity,r=void 0===n?1:n;Module._setMeasureTextTransparency(t,r)}({annotPtr:r,opacity:s}),$e({annotPtr:r,opacity:s})),f&&tt({annotPtr:r,fillTransparency:f}),d&&Ye({pagePtr:n,annotPtr:r,rect:d}),p&&ze({annotPtr:r,author:p}),h&&nt({pagePtr:n,annotPtr:r,quadPoints:h}),u&&et({annotPtr:r,borderWidth:u}),(P||m)&&wn({annotPtr:r,borderWidth:u,borderStyle:P,dashes:m}),v&&A&&a&&dt(t),_&&yn({pagePtr:n,annotPtr:r,vertices:_}),null==y&&null==M||Module._SetLineType(r,Q[y.toUpperCase()],Q[M.toUpperCase()]),I&&rt({pagePtr:n,annotPtr:r,linePoints:I}),w&&ot({pagePtr:n,annotPtr:r,inkPointes:w});var S=t.precision,b=t.scale,C=t.labelPosition,E=t.leadLength,R=t.leadOffset,G=t.leadExtension;(S&&function(e){var t=e.rulerPtr,n=e.precision;Module._setPrecision(t,Math.pow(10,-Math.floor(Math.log10(n))))}({rulerPtr:o,precision:S}),b&&function(e){var t=e.rulerPtr,n=e.scale,r=n.base,o=n.baseUnit,a=n.translate,i=n.translateUnit;Module._setMeasureScale(t,r,stringToNewUTF8(o),a,stringToNewUTF8(i))}({rulerPtr:o,scale:b}),C&&function(e){var t=e.rulerPtr,n=e.labelPosition;if("top"===n)return Module._setLabelTop(t);if("inside"===n)Module._setLabelInside(t)}({rulerPtr:o,labelPosition:C}),E&&function(e){var t=e.rulerPtr,n=e.leadLength;Module._setLeadLength(t,n)}({rulerPtr:o,leadLength:E}),R&&function(e){var t=e.rulerPtr,n=e.leadOffset;Module._setLeadOffset(t,n)}({rulerPtr:o,leadOffset:R}),G&&function(e){var t=e.rulerPtr,n=e.leadExtension;Module._setLeadExtension(t,n)}({rulerPtr:o,leadExtension:G}),x)&&(PageSize.Width=0,PageSize.Height=0,Module._GetPageSizeForIndex(e,t.pageIndex),function(e){e.annotPtr;for(var t=e.rulerPtr,n=e.arcPoints,r=e.pageHeight,o=function(e,t){var n=e.map((function(e){return{x:e.x,y:t-e.y}}));return n}(n,r),a=[],i=0;i<o.length;i++){var u=o[i];a.push(u.x,u.y)}for(var c=a.length,l=_malloc(4*c),s=0;s<c;s++)Module.HEAPF32[l/4+s]=a[s];var f=Module._SetArcPoints(t,l);_free(l)}({annotPtr:r,rulerPtr:o,arcPoints:x,pageHeight:PageSize.Height}),Rect={},Module._GetArcRectScreen(o,n),Ye({pagePtr:n,annotPtr:r,rect:{left:T(Rect.Left),top:T(Rect.Top),right:T(Rect.Right),bottom:T(Rect.Bottom)}}));Module._UpdateAnnotMeasure(o),t.hasOwnProperty("contents")&&Qe({annotPtr:r,contents:c}),Module._UpdateAnnotAp(r,0),w&&u&&i&&s&&function(e){for(var t=e.pagePtr,n=e.annotPtr,r=e.inkPointes,o=e.borderWidth,a=e.borderColor,i=e.opacity,u=e.isArc,c=[],l=[],s=r.length,f=0;f<s;f++){for(var d=r[f].length,p=0;p<d;p++)c.push(r[f][p].PointX,r[f][p].PointY);l.push(d)}for(var g=l.length,h=_malloc(4*g),v=0;v<g;v++)Module.HEAP32[h/4+v]=l[v];var A=c.length,_=_malloc(4*A);for(v=0;v<A;v++)Module.HEAPF32[_/4+v]=c[v];var P=F(a);u?Module._UpdateApWithInkArc(t,n,h,s,_,o,P.R,P.G,P.B,i):Module._UpdateAnnotApWithInk(t,n,h,s,_,o,P.R,P.G,P.B,i);_free(_)}({pagePtr:n,annotPtr:r,inkPointes:w,borderWidth:u,borderColor:i,opacity:s,isArc:!!x})}function mn(e,t,n){MeasureInfo={},Module._getMeasureInfo(t);var r=Module._getCaptionTypes(e),o=Module._GetMeasureType(t);Module._setLabelInside(t);var a={captionType:ie[r],measureType:oe[o],scale:{base:MeasureInfo.RulerBase,baseUnit:MeasureInfo.RulerBaseUnit,translate:MeasureInfo.RulerTranslate,translateUnit:MeasureInfo.RulerTranslateUnit},precision:MeasureInfo.precision,factor:MeasureInfo.factor};FontDa={},Module._GetAnnotFontDa(e);var i=U8StringData;switch(a.fontName=i,a.fontSize=FontDa.fontSize,a.color=L(FontDa.R,FontDa.G,FontDa.B),RGBColor={},hasColor=Module._GetAnnotRGBColor(e),hasColor&&(a.borderColor=L(RGBColor.R,RGBColor.G,RGBColor.B)),n){case"line":a.length=Module._getMeasurementResults(t,ae.LENGTH),a.leadOffset=Module._getLeadOffset(t);var u=Module._getLeadLength(t),c=Module._getLeadExtension(t);u<0&&(c-=u,u=0),c<0&&(u-=c,c=0),a.leadLength=u,a.leadExtension=c,a.labelPosition="inside";break;case"rectangle":case"circle":case"polygon":a.area=Module._getMeasurementResults(t,ae.AREA),a.perimeter=Module._getMeasurementResults(t,ae.LENGTH),a.labelPosition="inside";break;case"polyline":a.perimeter=Module._getMeasurementResults(t,ae.LENGTH);break;case"ink":"generic"===a.captionType&&(a.perimeter=Module._getMeasurementResults(t,ae.GENERIC)),"arclength"===a.captionType&&(a.arcLength=Module._getMeasurementResults(t,ae.ARCLENGTH))}return a}function yn(e){for(var t=e.pagePtr,n=e.annotPtr,r=e.vertices,o=[],a=0;a<r.length;a++){var i=r[a];o.push(i.x,i.y)}for(var u=o.length,c=_malloc(4*u),l=0;l<u;l++)Module.HEAPF32[c/4+l]=o[l];var s=Module._setVertices(t,n,c,u);return _free(c),s}function Mn(e){var t=e.doc,n=e.pageIndex,r=e.annotPtr,o=e.floatPoint;PageSize.Width=0,PageSize.Height=0,Module._GetPageSizeForIndex(t,n);for(var a=[],i=0;i<o.length;i++){var u=o[i];a.push(u.x,PageSize.Height-u.y)}for(var c=a.length,l=_malloc(4*c),s=0;s<c;s++)Module.HEAPF32[l/4+s]=a[s];Module._SetFreetextCallout(r,l,c),_free(l)}function In(e){var t=e.annotPtr,n=e.rectDiff;Module._SetFreetextRectDiff(t,n.left,n.top,n.right,n.bottom)}function wn(e){var t=e.annotPtr,n=e.dashes,r=void 0===n?"":n,o=e.borderStyle,a=e.borderWidth,i=void 0===a?1:a,u=X[o];if("cloudy"===o)Module._SetAnnotBorderStyle2(t,0),Module._SetBorderEffect(t,e.intensity,1);else if("dashed"===o){Module._SetBorderEffect(t,0,0);for(var c=(r=r.split(",")).length,l=_malloc(4*c),s=0;s<c;s++)Module.HEAPF32[l/4+s]=r[s];Module._SetAnnotBorderStyle(t,u,i,l,c),_free(l)}else Module._SetAnnotBorderStyle2(t,u)}function xn(e){var t=e.pagePtr,n=e.annotPtr;MeasureVerticesArray=[],Module._getVertices(t,n);for(var r=[],o=0;o<MeasureVerticesArray.length;o++){var a=MeasureVerticesArray[o];a&&r.push({x:a.PointX,y:a.PointY})}if(r.length>2){var i=r[r.length-1];r[0].x===i.x&&r[0].y===i.y&&r.pop()}return r}function Sn(e){return bn.apply(this,arguments)}function bn(){return bn=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v,A,_,P,m;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.doc,o=t.password,a=void 0===o?"":o,i=t.oldPassword,u=void 0===i?"":i,c=t.flags,l=t.quality,s=t.colImagePPI,f=t.grayImagePPI,d=t.monImagePPI,e.next=3,De(r,u);case 3:if(p=e.sent,!(g=We("PDF Optimization")).code){e.next=8;break}return ComPDFKitJS.opened_files.pop(),e.abrupt("return",g);case 8:if(!a||a===u){e.next=13;break}if(!(h=Me({doc:p,password:a}))||!h.code){e.next=13;break}return ComPDFKitJS.opened_files.pop(),e.abrupt("return",h);case 13:for(v=Cn(c),A=!!fontsJson||!!ComPDFKitJS.opened_DefFont[0],DataArray=[],Module._SetOptimizeOption(p,v,l),Module._SetOptimizeOptionPPI(p,v,l,s.uperPPI,s.targetPPI,f.uperPPI,f.targetPPI,d.uperPPI,d.targetPPI),Module._OptimizeDocumentByStream(p,A),_=[],P=0;P<DataArray.length;P++)m=new Uint8Array(DataArray[P]),_.push(m);return ComPDFKitJS.opened_files.pop(),e.abrupt("return",new Blob(_,{type:"application/pdf"}));case 23:case"end":return e.stop()}}),e)}))),bn.apply(this,arguments)}function Cn(e){for(var t=0,n=0,r=Object.entries(ue);n<r.length;n++){var o=f(r[n],2),a=o[0],i=o[1];e[a.replace("OPTIMIZE_FLAG_","")]&&(t|=i)}return t}(function(){return me.apply(this,arguments)})().then((function(){Pe.setUp()}));
|
|
1
|
+
function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(){n=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof _?t:_,i=Object.create(o.prototype),u=new R(r||[]);return a(i,"_invoke",{value:b(e,n,u)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",g="suspendedYield",h="executing",v="completed",A={};function _(){}function P(){}function m(){}var y={};s(y,u,(function(){return this}));var M=Object.getPrototypeOf,I=M&&M(M(G([])));I&&I!==r&&o.call(I,u)&&(y=I);var w=m.prototype=_.prototype=Object.create(y);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(r,a,i,u){var c=d(e[r],e,a);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==typeof s&&o.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,u)}),(function(e){n("throw",e,i,u)})):t.resolve(s).then((function(e){l.value=e,i(l)}),(function(e){return n("throw",e,i,u)}))}u(c.arg)}var r;a(this,"_invoke",{value:function(e,o){function a(){return new t((function(t,r){n(e,o,t,r)}))}return r=r?r.then(a,a):a()}})}function b(t,n,r){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var u=r.delegate;if(u){var c=C(u,r);if(c){if(c===A)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=d(t,n,r);if("normal"===l.type){if(o=r.done?v:g,l.arg===A)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=v,r.method="throw",r.arg=l.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),A;var a=d(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,A;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,A):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,A)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function G(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r<t.length;)if(o.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return P.prototype=m,a(w,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:P,configurable:!0}),P.displayName=s(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===P||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},x(S.prototype),s(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(f(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(w),s(w,l,"Generator"),s(w,u,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=G,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,A):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:G(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),A}},t}function r(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t,n,r,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function u(e){a(i,r,o,u,c,"next",e)}function c(e){a(i,r,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,u=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw a}}}}var v,A=new Uint8Array(16);function _(){if(!v&&!(v="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return v(A)}for(var P=[],m=0;m<256;++m)P.push((m+256).toString(16).slice(1));var y={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function M(e,t,n){if(y.randomUUID&&!t&&!e)return y.randomUUID();var r=(e=e||{}).random||(e.rng||_)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return P[e[t+0]]+P[e[t+1]]+P[e[t+2]]+P[e[t+3]]+"-"+P[e[t+4]]+P[e[t+5]]+"-"+P[e[t+6]]+P[e[t+7]]+"-"+P[e[t+8]]+P[e[t+9]]+"-"+P[e[t+10]]+P[e[t+11]]+P[e[t+12]]+P[e[t+13]]+P[e[t+14]]+P[e[t+15]]}(r)}var I,w,x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},S={};function b(e){var t=t instanceof Date?e:new Date(e),n=t.getTimezoneOffset(),r=n<0?"+":"-",o=("00"+Math.abs(n/60)).slice(-2),a=("00"+Math.abs(n%60)).slice(-2),i="".concat(r).concat(o,"'").concat(a,"'"),u=t.getFullYear(),c=("00"+(t.getMonth()+1)).slice(-2),l=("00"+t.getDate()).slice(-2),s=("00"+t.getHours()).slice(-2),f=("00"+t.getMinutes()).slice(-2),d=("00"+t.getSeconds()).slice(-2);return"D:".concat(u).concat(c).concat(l).concat(s).concat(f).concat(d).concat(i)}function C(e){if(!e)return new Date;var t=e.match(/D:(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})([-+]\d{2}'\d{2}')?/);if(t){var n=f(t,8),r=n[1],o=n[2],a=n[3],i=n[4],u=n[5],c=n[6];return n[7],new Date(parseInt(r),parseInt(o)-1,parseInt(a),parseInt(i),parseInt(u),parseInt(c))}throw new Error("Invalid timestamp format")}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=Math.pow(10,t);return Math.round(e*n)/n}I={get exports(){return S},set exports(e){S=e}},w=S,function(){var e,t="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",a=16,i=32,u=64,c=128,l=256,s=1/0,f=9007199254740991,d=NaN,p=4294967295,g=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",i],["partialRight",u],["rearg",l]],h="[object Arguments]",v="[object Array]",A="[object Boolean]",_="[object Date]",P="[object Error]",m="[object Function]",y="[object GeneratorFunction]",M="[object Map]",S="[object Number]",b="[object Object]",C="[object Promise]",T="[object RegExp]",E="[object Set]",R="[object String]",G="[object Symbol]",F="[object WeakMap]",D="[object ArrayBuffer]",L="[object DataView]",B="[object Float32Array]",N="[object Float64Array]",U="[object Int8Array]",k="[object Int16Array]",O="[object Int32Array]",W="[object Uint8Array]",j="[object Uint8ClampedArray]",H="[object Uint16Array]",Y="[object Uint32Array]",z=/\b__p \+= '';/g,Z=/\b(__p \+=) '' \+/g,Q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,J=RegExp(q.source),X=RegExp(K.source),V=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(oe.source),ie=/^\s+/,ue=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,ge=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,ve=/^[-+]0x[0-9a-f]+$/i,Ae=/^0b[01]+$/i,_e=/^\[object .+?Constructor\]$/,Pe=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Me=/($^)/,Ie=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",be="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Re="['’]",Ge="["+we+"]",Fe="["+Ee+"]",De="["+xe+"]",Le="\\d+",Be="["+Se+"]",Ne="["+be+"]",Ue="[^"+we+Ee+Le+Se+be+Ce+"]",ke="\\ud83c[\\udffb-\\udfff]",Oe="[^"+we+"]",We="(?:\\ud83c[\\udde6-\\uddff]){2}",je="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ce+"]",Ye="\\u200d",ze="(?:"+Ne+"|"+Ue+")",Ze="(?:"+He+"|"+Ue+")",Qe="(?:['’](?:d|ll|m|re|s|t|ve))?",qe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+De+"|"+ke+")?",Je="["+Te+"]?",Xe=Je+Ke+"(?:"+Ye+"(?:"+[Oe,We,je].join("|")+")"+Je+Ke+")*",Ve="(?:"+[Be,We,je].join("|")+")"+Xe,$e="(?:"+[Oe+De+"?",De,We,je,Ge].join("|")+")",et=RegExp(Re,"g"),tt=RegExp(De,"g"),nt=RegExp(ke+"(?="+ke+")|"+$e+Xe,"g"),rt=RegExp([He+"?"+Ne+"+"+Qe+"(?="+[Fe,He,"$"].join("|")+")",Ze+"+"+qe+"(?="+[Fe,He+ze,"$"].join("|")+")",He+"?"+ze+"+"+Qe,He+"+"+qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Ve].join("|"),"g"),ot=RegExp("["+Ye+we+xe+Te+"]"),at=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ut=-1,ct={};ct[B]=ct[N]=ct[U]=ct[k]=ct[O]=ct[W]=ct[j]=ct[H]=ct[Y]=!0,ct[h]=ct[v]=ct[D]=ct[A]=ct[L]=ct[_]=ct[P]=ct[m]=ct[M]=ct[S]=ct[b]=ct[T]=ct[E]=ct[R]=ct[F]=!1;var lt={};lt[h]=lt[v]=lt[D]=lt[L]=lt[A]=lt[_]=lt[B]=lt[N]=lt[U]=lt[k]=lt[O]=lt[M]=lt[S]=lt[b]=lt[T]=lt[E]=lt[R]=lt[G]=lt[W]=lt[j]=lt[H]=lt[Y]=!0,lt[P]=lt[m]=lt[F]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ft=parseFloat,dt=parseInt,pt="object"==o(x)&&x&&x.Object===Object&&x,gt="object"==("undefined"==typeof self?"undefined":o(self))&&self&&self.Object===Object&&self,ht=pt||gt||Function("return this")(),vt=w&&!w.nodeType&&w,At=vt&&I&&!I.nodeType&&I,_t=At&&At.exports===vt,Pt=_t&&pt.process,mt=function(){try{var e=At&&At.require&&At.require("util").types;return e||Pt&&Pt.binding&&Pt.binding("util")}catch(e){}}(),yt=mt&&mt.isArrayBuffer,Mt=mt&&mt.isDate,It=mt&&mt.isMap,wt=mt&&mt.isRegExp,xt=mt&&mt.isSet,St=mt&&mt.isTypedArray;function bt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,r){for(var o=-1,a=null==e?0:e.length;++o<a;){var i=e[o];t(r,i,n(i),e)}return r}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Gt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function Ft(e,t){return!(null==e||!e.length)&&Ht(e,t,0)>-1}function Dt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Lt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Bt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Nt(e,t,n,r){var o=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n}function Ut(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ot=Qt("length");function Wt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function jt(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function Ht(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):jt(e,zt,n)}function Yt(e,t,n,r){for(var o=n-1,a=e.length;++o<a;)if(r(e[o],t))return o;return-1}function zt(e){return e!=e}function Zt(e,t){var n=null==e?0:e.length;return n?Jt(e,t)/n:d}function Qt(t){return function(n){return null==n?e:n[t]}}function qt(t){return function(n){return null==t?e:t[n]}}function Kt(e,t,n,r,o){return o(e,(function(e,o,a){n=r?(r=!1,e):t(n,e,o,a)})),n}function Jt(t,n){for(var r,o=-1,a=t.length;++o<a;){var i=n(t[o]);i!==e&&(r=r===e?i:r+i)}return r}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Vt(e){return e?e.slice(0,vn(e)+1).replace(ie,""):e}function $t(e){return function(t){return e(t)}}function en(e,t){return Lt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Ht(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ht(t,e[n],0)>-1;);return n}var on=qt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),an=qt({"&":"&","<":"<",">":">",'"':""","'":"'"});function un(e){return"\\"+st[e]}function cn(e){return ot.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function sn(e,t){return function(n){return e(t(n))}}function fn(e,t){for(var n=-1,o=e.length,a=0,i=[];++n<o;){var u=e[n];u!==t&&u!==r||(e[n]=r,i[a++]=n)}return i}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function pn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function gn(e){return cn(e)?function(e){for(var t=nt.lastIndex=0;nt.test(e);)++t;return t}(e):Ot(e)}function hn(e){return cn(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function vn(e){for(var t=e.length;t--&&ue.test(e.charAt(t)););return t}var An=qt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),_n=function I(w){var x,ue=(w=null==w?ht:_n.defaults(ht.Object(),w,_n.pick(ht,it))).Array,we=w.Date,xe=w.Error,Se=w.Function,be=w.Math,Ce=w.Object,Te=w.RegExp,Ee=w.String,Re=w.TypeError,Ge=ue.prototype,Fe=Se.prototype,De=Ce.prototype,Le=w["__core-js_shared__"],Be=Fe.toString,Ne=De.hasOwnProperty,Ue=0,ke=(x=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+x:"",Oe=De.toString,We=Be.call(Ce),je=ht._,He=Te("^"+Be.call(Ne).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ye=_t?w.Buffer:e,ze=w.Symbol,Ze=w.Uint8Array,Qe=Ye?Ye.allocUnsafe:e,qe=sn(Ce.getPrototypeOf,Ce),Ke=Ce.create,Je=De.propertyIsEnumerable,Xe=Ge.splice,Ve=ze?ze.isConcatSpreadable:e,$e=ze?ze.iterator:e,nt=ze?ze.toStringTag:e,ot=function(){try{var e=ga(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=w.clearTimeout!==ht.clearTimeout&&w.clearTimeout,pt=we&&we.now!==ht.Date.now&&we.now,gt=w.setTimeout!==ht.setTimeout&&w.setTimeout,vt=be.ceil,At=be.floor,Pt=Ce.getOwnPropertySymbols,mt=Ye?Ye.isBuffer:e,Ot=w.isFinite,qt=Ge.join,Pn=sn(Ce.keys,Ce),mn=be.max,yn=be.min,Mn=we.now,In=w.parseInt,wn=be.random,xn=Ge.reverse,Sn=ga(w,"DataView"),bn=ga(w,"Map"),Cn=ga(w,"Promise"),Tn=ga(w,"Set"),En=ga(w,"WeakMap"),Rn=ga(Ce,"create"),Gn=En&&new En,Fn={},Dn=Oa(Sn),Ln=Oa(bn),Bn=Oa(Cn),Nn=Oa(Tn),Un=Oa(En),kn=ze?ze.prototype:e,On=kn?kn.valueOf:e,Wn=kn?kn.toString:e;function jn(e){if(ru(e)&&!Zi(e)&&!(e instanceof Zn)){if(e instanceof zn)return e;if(Ne.call(e,"__wrapped__"))return Wa(e)}return new zn(e)}var Hn=function(){function t(){}return function(n){if(!nu(n))return{};if(Ke)return Ke(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function Yn(){}function zn(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function Zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Kn;++t<n;)this.add(e[t])}function Xn(e){var t=this.__data__=new qn(e);this.size=t.size}function Vn(e,t){var n=Zi(e),r=!n&&zi(e),o=!n&&!r&&Ji(e),a=!n&&!r&&!o&&fu(e),i=n||r||o||a,u=i?Xt(e.length,Ee):[],c=u.length;for(var l in e)!t&&!Ne.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ya(l,c))||u.push(l);return u}function $n(t){var n=t.length;return n?t[Jr(0,n-1)]:e}function er(e,t){return Na(Go(e),lr(t,0,e.length))}function tr(e){return Na(Go(e))}function nr(t,n,r){(r!==e&&!ji(t[n],r)||r===e&&!(n in t))&&ur(t,n,r)}function rr(t,n,r){var o=t[n];Ne.call(t,n)&&ji(o,r)&&(r!==e||n in t)||ur(t,n,r)}function or(e,t){for(var n=e.length;n--;)if(ji(e[n][0],t))return n;return-1}function ar(e,t,n,r){return gr(e,(function(e,o,a){t(r,e,n(e),a)})),r}function ir(e,t){return e&&Fo(t,Fu(t),e)}function ur(e,t,n){"__proto__"==t&&ot?ot(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function cr(t,n){for(var r=-1,o=n.length,a=ue(o),i=null==t;++r<o;)a[r]=i?e:Cu(t,n[r]);return a}function lr(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function sr(t,n,r,o,a,i){var u,c=1&n,l=2&n,s=4&n;if(r&&(u=a?r(t,o,a,i):r(t)),u!==e)return u;if(!nu(t))return t;var f=Zi(t);if(f){if(u=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!c)return Go(t,u)}else{var d=Aa(t),p=d==m||d==y;if(Ji(t))return So(t,c);if(d==b||d==h||p&&!a){if(u=l||p?{}:Pa(t),!c)return l?function(e,t){return Fo(e,va(e),t)}(t,function(e,t){return e&&Fo(t,Du(t),e)}(u,t)):function(e,t){return Fo(e,ha(e),t)}(t,ir(u,t))}else{if(!lt[d])return a?t:{};u=function(e,t,n){var r,o=e.constructor;switch(t){case D:return bo(e);case A:case _:return new o(+e);case L:return function(e,t){var n=t?bo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case B:case N:case U:case k:case O:case W:case j:case H:case Y:return Co(e,n);case M:return new o;case S:case R:return new o(e);case T:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new o;case G:return r=e,On?Ce(On.call(r)):{}}}(t,d,c)}}i||(i=new Xn);var g=i.get(t);if(g)return g;i.set(t,u),cu(t)?t.forEach((function(e){u.add(sr(e,n,r,e,t,i))})):ou(t)&&t.forEach((function(e,o){u.set(o,sr(e,n,r,o,t,i))}));var v=f?e:(s?l?ua:ia:l?Du:Fu)(t);return Tt(v||t,(function(e,o){v&&(e=t[o=e]),rr(u,o,sr(e,n,r,o,t,i))})),u}function fr(t,n,r){var o=r.length;if(null==t)return!o;for(t=Ce(t);o--;){var a=r[o],i=n[a],u=t[a];if(u===e&&!(a in t)||!i(u))return!1}return!0}function dr(n,r,o){if("function"!=typeof n)throw new Re(t);return Fa((function(){n.apply(e,o)}),r)}function pr(e,t,n,r){var o=-1,a=Ft,i=!0,u=e.length,c=[],l=t.length;if(!u)return c;n&&(t=Lt(t,$t(n))),r?(a=Dt,i=!1):t.length>=200&&(a=tn,i=!1,t=new Jn(t));e:for(;++o<u;){var s=e[o],f=null==n?s:n(s);if(s=r||0!==s?s:0,i&&f==f){for(var d=l;d--;)if(t[d]===f)continue e;c.push(s)}else a(t,f,r)||c.push(s)}return c}jn.templateSettings={escape:V,evaluate:$,interpolate:ee,variable:"",imports:{_:jn}},jn.prototype=Yn.prototype,jn.prototype.constructor=jn,zn.prototype=Hn(Yn.prototype),zn.prototype.constructor=zn,Zn.prototype=Hn(Yn.prototype),Zn.prototype.constructor=Zn,Qn.prototype.clear=function(){this.__data__=Rn?Rn(null):{},this.size=0},Qn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Qn.prototype.get=function(t){var r=this.__data__;if(Rn){var o=r[t];return o===n?e:o}return Ne.call(r,t)?r[t]:e},Qn.prototype.has=function(t){var n=this.__data__;return Rn?n[t]!==e:Ne.call(n,t)},Qn.prototype.set=function(t,r){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=Rn&&r===e?n:r,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=or(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},qn.prototype.get=function(t){var n=this.__data__,r=or(n,t);return r<0?e:n[r][1]},qn.prototype.has=function(e){return or(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,r=or(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Kn.prototype.clear=function(){this.size=0,this.__data__={hash:new Qn,map:new(bn||qn),string:new Qn}},Kn.prototype.delete=function(e){var t=da(this,e).delete(e);return this.size-=t?1:0,t},Kn.prototype.get=function(e){return da(this,e).get(e)},Kn.prototype.has=function(e){return da(this,e).has(e)},Kn.prototype.set=function(e,t){var n=da(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(e){return this.__data__.set(e,n),this},Jn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.clear=function(){this.__data__=new qn,this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Xn.prototype.get=function(e){return this.__data__.get(e)},Xn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!bn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Kn(r)}return n.set(e,t),this.size=n.size,this};var gr=Bo(Mr),hr=Bo(Ir,!0);function vr(e,t){var n=!0;return gr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function Ar(t,n,r){for(var o=-1,a=t.length;++o<a;){var i=t[o],u=n(i);if(null!=u&&(c===e?u==u&&!su(u):r(u,c)))var c=u,l=i}return l}function _r(e,t){var n=[];return gr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function Pr(e,t,n,r,o){var a=-1,i=e.length;for(n||(n=ma),o||(o=[]);++a<i;){var u=e[a];t>0&&n(u)?t>1?Pr(u,t-1,n,r,o):Bt(o,u):r||(o[o.length]=u)}return o}var mr=No(),yr=No(!0);function Mr(e,t){return e&&mr(e,t,Fu)}function Ir(e,t){return e&&yr(e,t,Fu)}function wr(e,t){return Gt(t,(function(t){return $i(e[t])}))}function xr(t,n){for(var r=0,o=(n=Mo(n,t)).length;null!=t&&r<o;)t=t[ka(n[r++])];return r&&r==o?t:e}function Sr(e,t,n){var r=t(e);return Zi(e)?r:Bt(r,n(e))}function br(t){return null==t?t===e?"[object Undefined]":"[object Null]":nt&&nt in Ce(t)?function(t){var n=Ne.call(t,nt),r=t[nt];try{t[nt]=e;var o=!0}catch(e){}var a=Oe.call(t);return o&&(n?t[nt]=r:delete t[nt]),a}(t):function(e){return Oe.call(e)}(t)}function Cr(e,t){return e>t}function Tr(e,t){return null!=e&&Ne.call(e,t)}function Er(e,t){return null!=e&&t in Ce(e)}function Rr(t,n,r){for(var o=r?Dt:Ft,a=t[0].length,i=t.length,u=i,c=ue(i),l=1/0,s=[];u--;){var f=t[u];u&&n&&(f=Lt(f,$t(n))),l=yn(f.length,l),c[u]=!r&&(n||a>=120&&f.length>=120)?new Jn(u&&f):e}f=t[0];var d=-1,p=c[0];e:for(;++d<a&&s.length<l;){var g=f[d],h=n?n(g):g;if(g=r||0!==g?g:0,!(p?tn(p,h):o(s,h,r))){for(u=i;--u;){var v=c[u];if(!(v?tn(v,h):o(t[u],h,r)))continue e}p&&p.push(h),s.push(g)}}return s}function Gr(t,n,r){var o=null==(t=Ea(t,n=Mo(n,t)))?t:t[ka(Va(n))];return null==o?e:bt(o,t,r)}function Fr(e){return ru(e)&&br(e)==h}function Dr(t,n,r,o,a){return t===n||(null==t||null==n||!ru(t)&&!ru(n)?t!=t&&n!=n:function(t,n,r,o,a,i){var u=Zi(t),c=Zi(n),l=u?v:Aa(t),s=c?v:Aa(n),f=(l=l==h?b:l)==b,d=(s=s==h?b:s)==b,p=l==s;if(p&&Ji(t)){if(!Ji(n))return!1;u=!0,f=!1}if(p&&!f)return i||(i=new Xn),u||fu(t)?oa(t,n,r,o,a,i):function(e,t,n,r,o,a,i){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case D:return!(e.byteLength!=t.byteLength||!a(new Ze(e),new Ze(t)));case A:case _:case S:return ji(+e,+t);case P:return e.name==t.name&&e.message==t.message;case T:case R:return e==t+"";case M:var u=ln;case E:var c=1&r;if(u||(u=dn),e.size!=t.size&&!c)return!1;var l=i.get(e);if(l)return l==t;r|=2,i.set(e,t);var s=oa(u(e),u(t),r,o,a,i);return i.delete(e),s;case G:if(On)return On.call(e)==On.call(t)}return!1}(t,n,l,r,o,a,i);if(!(1&r)){var g=f&&Ne.call(t,"__wrapped__"),m=d&&Ne.call(n,"__wrapped__");if(g||m){var y=g?t.value():t,I=m?n.value():n;return i||(i=new Xn),a(y,I,r,o,i)}}return!!p&&(i||(i=new Xn),function(t,n,r,o,a,i){var u=1&r,c=ia(t),l=c.length,s=ia(n),f=s.length;if(l!=f&&!u)return!1;for(var d=l;d--;){var p=c[d];if(!(u?p in n:Ne.call(n,p)))return!1}var g=i.get(t),h=i.get(n);if(g&&h)return g==n&&h==t;var v=!0;i.set(t,n),i.set(n,t);for(var A=u;++d<l;){var _=t[p=c[d]],P=n[p];if(o)var m=u?o(P,_,p,n,t,i):o(_,P,p,t,n,i);if(!(m===e?_===P||a(_,P,r,o,i):m)){v=!1;break}A||(A="constructor"==p)}if(v&&!A){var y=t.constructor,M=n.constructor;y==M||!("constructor"in t)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof M&&M instanceof M||(v=!1)}return i.delete(t),i.delete(n),v}(t,n,r,o,a,i))}(t,n,r,o,Dr,a))}function Lr(t,n,r,o){var a=r.length,i=a,u=!o;if(null==t)return!i;for(t=Ce(t);a--;){var c=r[a];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<i;){var l=(c=r[a])[0],s=t[l],f=c[1];if(u&&c[2]){if(s===e&&!(l in t))return!1}else{var d=new Xn;if(o)var p=o(s,f,l,t,n,d);if(!(p===e?Dr(f,s,3,o,d):p))return!1}}return!0}function Br(e){return!(!nu(e)||(t=e,ke&&ke in t))&&($i(e)?He:_e).test(Oa(e));var t}function Nr(e){return"function"==typeof e?e:null==e?ac:"object"==o(e)?Zi(e)?Hr(e[0],e[1]):jr(e):gc(e)}function Ur(e){if(!Sa(e))return Pn(e);var t=[];for(var n in Ce(e))Ne.call(e,n)&&"constructor"!=n&&t.push(n);return t}function kr(e){if(!nu(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=Sa(e),n=[];for(var r in e)("constructor"!=r||!t&&Ne.call(e,r))&&n.push(r);return n}function Or(e,t){return e<t}function Wr(e,t){var n=-1,r=qi(e)?ue(e.length):[];return gr(e,(function(e,o,a){r[++n]=t(e,o,a)})),r}function jr(e){var t=pa(e);return 1==t.length&&t[0][2]?Ca(t[0][0],t[0][1]):function(n){return n===e||Lr(n,e,t)}}function Hr(t,n){return Ia(t)&&ba(n)?Ca(ka(t),n):function(r){var o=Cu(r,t);return o===e&&o===n?Tu(r,t):Dr(n,o,3)}}function Yr(t,n,r,o,a){t!==n&&mr(n,(function(i,u){if(a||(a=new Xn),nu(i))!function(t,n,r,o,a,i,u){var c=Ra(t,r),l=Ra(n,r),s=u.get(l);if(s)nr(t,r,s);else{var f=i?i(c,l,r+"",t,n,u):e,d=f===e;if(d){var p=Zi(l),g=!p&&Ji(l),h=!p&&!g&&fu(l);f=l,p||g||h?Zi(c)?f=c:Ki(c)?f=Go(c):g?(d=!1,f=So(l,!0)):h?(d=!1,f=Co(l,!0)):f=[]:iu(l)||zi(l)?(f=c,zi(c)?f=Pu(c):nu(c)&&!$i(c)||(f=Pa(l))):d=!1}d&&(u.set(l,f),a(f,l,o,i,u),u.delete(l)),nr(t,r,f)}}(t,n,u,r,Yr,o,a);else{var c=o?o(Ra(t,u),i,u+"",t,n,a):e;c===e&&(c=i),nr(t,u,c)}}),Du)}function zr(t,n){var r=t.length;if(r)return ya(n+=n<0?r:0,r)?t[n]:e}function Zr(e,t,n){t=t.length?Lt(t,(function(e){return Zi(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e})):[ac];var r=-1;t=Lt(t,$t(fa()));var o=Wr(e,(function(e,n,o){var a=Lt(t,(function(t){return t(e)}));return{criteria:a,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(o,(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,a=t.criteria,i=o.length,u=n.length;++r<i;){var c=To(o[r],a[r]);if(c)return r>=u?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Qr(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],u=xr(e,i);n(u,i)&&to(a,Mo(i,e),u)}return a}function qr(e,t,n,r){var o=r?Yt:Ht,a=-1,i=t.length,u=e;for(e===t&&(t=Go(t)),n&&(u=Lt(e,$t(n)));++a<i;)for(var c=0,l=t[a],s=n?n(l):l;(c=o(u,s,c,r))>-1;)u!==e&&Xe.call(u,c,1),Xe.call(e,c,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==a){var a=o;ya(o)?Xe.call(e,o,1):go(e,o)}}return e}function Jr(e,t){return e+At(wn()*(t-e+1))}function Xr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=At(t/2))&&(e+=e)}while(t);return n}function Vr(e,t){return Da(Ta(e,t,ac),e+"")}function $r(e){return $n(ju(e))}function eo(e,t){var n=ju(e);return Na(n,lr(t,0,n.length))}function to(t,n,r,o){if(!nu(t))return t;for(var a=-1,i=(n=Mo(n,t)).length,u=i-1,c=t;null!=c&&++a<i;){var l=ka(n[a]),s=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(a!=u){var f=c[l];(s=o?o(f,l,c):e)===e&&(s=nu(f)?f:ya(n[a+1])?[]:{})}rr(c,l,s),c=c[l]}return t}var no=Gn?function(e,t){return Gn.set(e,t),e}:ac,ro=ot?function(e,t){return ot(e,"toString",{configurable:!0,enumerable:!1,value:nc(t),writable:!0})}:ac;function oo(e){return Na(ju(e))}function ao(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=ue(o);++r<o;)a[r]=e[r+t];return a}function io(e,t){var n;return gr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function uo(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var a=r+o>>>1,i=e[a];null!==i&&!su(i)&&(n?i<=t:i<t)?r=a+1:o=a}return o}return co(e,t,ac,n)}function co(t,n,r,o){var a=0,i=null==t?0:t.length;if(0===i)return 0;for(var u=(n=r(n))!=n,c=null===n,l=su(n),s=n===e;a<i;){var f=At((a+i)/2),d=r(t[f]),p=d!==e,g=null===d,h=d==d,v=su(d);if(u)var A=o||h;else A=s?h&&(o||p):c?h&&p&&(o||!g):l?h&&p&&!g&&(o||!v):!g&&!v&&(o?d<=n:d<n);A?a=f+1:i=f}return yn(i,4294967294)}function lo(e,t){for(var n=-1,r=e.length,o=0,a=[];++n<r;){var i=e[n],u=t?t(i):i;if(!n||!ji(u,c)){var c=u;a[o++]=0===i?0:i}}return a}function so(e){return"number"==typeof e?e:su(e)?d:+e}function fo(e){if("string"==typeof e)return e;if(Zi(e))return Lt(e,fo)+"";if(su(e))return Wn?Wn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function po(e,t,n){var r=-1,o=Ft,a=e.length,i=!0,u=[],c=u;if(n)i=!1,o=Dt;else if(a>=200){var l=t?null:Vo(e);if(l)return dn(l);i=!1,o=tn,c=new Jn}else c=t?[]:u;e:for(;++r<a;){var s=e[r],f=t?t(s):s;if(s=n||0!==s?s:0,i&&f==f){for(var d=c.length;d--;)if(c[d]===f)continue e;t&&c.push(f),u.push(s)}else o(c,f,n)||(c!==u&&c.push(f),u.push(s))}return u}function go(e,t){return null==(e=Ea(e,t=Mo(t,e)))||delete e[ka(Va(t))]}function ho(e,t,n,r){return to(e,t,n(xr(e,t)),r)}function vo(e,t,n,r){for(var o=e.length,a=r?o:-1;(r?a--:++a<o)&&t(e[a],a,e););return n?ao(e,r?0:a,r?a+1:o):ao(e,r?a+1:0,r?o:a)}function Ao(e,t){var n=e;return n instanceof Zn&&(n=n.value()),Nt(t,(function(e,t){return t.func.apply(t.thisArg,Bt([e],t.args))}),n)}function _o(e,t,n){var r=e.length;if(r<2)return r?po(e[0]):[];for(var o=-1,a=ue(r);++o<r;)for(var i=e[o],u=-1;++u<r;)u!=o&&(a[o]=pr(a[o]||i,e[u],t,n));return po(Pr(a,1),t,n)}function Po(t,n,r){for(var o=-1,a=t.length,i=n.length,u={};++o<a;){var c=o<i?n[o]:e;r(u,t[o],c)}return u}function mo(e){return Ki(e)?e:[]}function yo(e){return"function"==typeof e?e:ac}function Mo(e,t){return Zi(e)?e:Ia(e,t)?[e]:Ua(mu(e))}var Io=Vr;function wo(t,n,r){var o=t.length;return r=r===e?o:r,!n&&r>=o?t:ao(t,n,r)}var xo=st||function(e){return ht.clearTimeout(e)};function So(e,t){if(t)return e.slice();var n=e.length,r=Qe?Qe(n):new e.constructor(n);return e.copy(r),r}function bo(e){var t=new e.constructor(e.byteLength);return new Ze(t).set(new Ze(e)),t}function Co(e,t){var n=t?bo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function To(t,n){if(t!==n){var r=t!==e,o=null===t,a=t==t,i=su(t),u=n!==e,c=null===n,l=n==n,s=su(n);if(!c&&!s&&!i&&t>n||i&&u&&l&&!c&&!s||o&&u&&l||!r&&l||!a)return 1;if(!o&&!i&&!s&&t<n||s&&r&&a&&!o&&!i||c&&r&&a||!u&&a||!l)return-1}return 0}function Eo(e,t,n,r){for(var o=-1,a=e.length,i=n.length,u=-1,c=t.length,l=mn(a-i,0),s=ue(c+l),f=!r;++u<c;)s[u]=t[u];for(;++o<i;)(f||o<a)&&(s[n[o]]=e[o]);for(;l--;)s[u++]=e[o++];return s}function Ro(e,t,n,r){for(var o=-1,a=e.length,i=-1,u=n.length,c=-1,l=t.length,s=mn(a-u,0),f=ue(s+l),d=!r;++o<s;)f[o]=e[o];for(var p=o;++c<l;)f[p+c]=t[c];for(;++i<u;)(d||o<a)&&(f[p+n[i]]=e[o++]);return f}function Go(e,t){var n=-1,r=e.length;for(t||(t=ue(r));++n<r;)t[n]=e[n];return t}function Fo(t,n,r,o){var a=!r;r||(r={});for(var i=-1,u=n.length;++i<u;){var c=n[i],l=o?o(r[c],t[c],c,r,t):e;l===e&&(l=t[c]),a?ur(r,c,l):rr(r,c,l)}return r}function Do(e,t){return function(n,r){var o=Zi(n)?Ct:ar,a=t?t():{};return o(n,e,fa(r,2),a)}}function Lo(t){return Vr((function(n,r){var o=-1,a=r.length,i=a>1?r[a-1]:e,u=a>2?r[2]:e;for(i=t.length>3&&"function"==typeof i?(a--,i):e,u&&Ma(r[0],r[1],u)&&(i=a<3?e:i,a=1),n=Ce(n);++o<a;){var c=r[o];c&&t(n,c,o,i)}return n}))}function Bo(e,t){return function(n,r){if(null==n)return n;if(!qi(n))return e(n,r);for(var o=n.length,a=t?o:-1,i=Ce(n);(t?a--:++a<o)&&!1!==r(i[a],a,i););return n}}function No(e){return function(t,n,r){for(var o=-1,a=Ce(t),i=r(t),u=i.length;u--;){var c=i[e?u:++o];if(!1===n(a[c],c,a))break}return t}}function Uo(t){return function(n){var r=cn(n=mu(n))?hn(n):e,o=r?r[0]:n.charAt(0),a=r?wo(r,1).join(""):n.slice(1);return o[t]()+a}}function ko(e){return function(t){return Nt($u(zu(t).replace(et,"")),e,"")}}function Oo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Hn(e.prototype),r=e.apply(n,t);return nu(r)?r:n}}function Wo(t){return function(n,r,o){var a=Ce(n);if(!qi(n)){var i=fa(r,3);n=Fu(n),r=function(e){return i(a[e],e,a)}}var u=t(n,r,o);return u>-1?a[i?n[u]:u]:e}}function jo(n){return aa((function(r){var o=r.length,a=o,i=zn.prototype.thru;for(n&&r.reverse();a--;){var u=r[a];if("function"!=typeof u)throw new Re(t);if(i&&!c&&"wrapper"==la(u))var c=new zn([],!0)}for(a=c?a:o;++a<o;){var l=la(u=r[a]),s="wrapper"==l?ca(u):e;c=s&&wa(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?c[la(s[0])].apply(c,s[3]):1==u.length&&wa(u)?c[l]():c.thru(u)}return function(){var e=arguments,t=e[0];if(c&&1==e.length&&Zi(t))return c.plant(t).value();for(var n=0,a=o?r[n].apply(this,e):t;++n<o;)a=r[n].call(this,a);return a}}))}function Ho(t,n,r,o,a,i,u,l,s,f){var d=n&c,p=1&n,g=2&n,h=24&n,v=512&n,A=g?e:Oo(t);return function c(){for(var _=arguments.length,P=ue(_),m=_;m--;)P[m]=arguments[m];if(h)var y=sa(c),M=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(P,y);if(o&&(P=Eo(P,o,a,h)),i&&(P=Ro(P,i,u,h)),_-=M,h&&_<f){var I=fn(P,y);return Jo(t,n,Ho,c.placeholder,r,P,I,l,s,f-_)}var w=p?r:this,x=g?w[t]:t;return _=P.length,l?P=function(t,n){for(var r=t.length,o=yn(n.length,r),a=Go(t);o--;){var i=n[o];t[o]=ya(i,r)?a[i]:e}return t}(P,l):v&&_>1&&P.reverse(),d&&s<_&&(P.length=s),this&&this!==ht&&this instanceof c&&(x=A||Oo(x)),x.apply(w,P)}}function Yo(e,t){return function(n,r){return function(e,t,n,r){return Mr(e,(function(e,o,a){t(r,n(e),o,a)})),r}(n,e,t(r),{})}}function zo(t,n){return function(r,o){var a;if(r===e&&o===e)return n;if(r!==e&&(a=r),o!==e){if(a===e)return o;"string"==typeof r||"string"==typeof o?(r=fo(r),o=fo(o)):(r=so(r),o=so(o)),a=t(r,o)}return a}}function Zo(e){return aa((function(t){return t=Lt(t,$t(fa())),Vr((function(n){var r=this;return e(t,(function(e){return bt(e,r,n)}))}))}))}function Qo(t,n){var r=(n=n===e?" ":fo(n)).length;if(r<2)return r?Xr(n,t):n;var o=Xr(n,vt(t/gn(n)));return cn(n)?wo(hn(o),0,t).join(""):o.slice(0,t)}function qo(t){return function(n,r,o){return o&&"number"!=typeof o&&Ma(n,r,o)&&(r=o=e),n=hu(n),r===e?(r=n,n=0):r=hu(r),function(e,t,n,r){for(var o=-1,a=mn(vt((t-e)/(n||1)),0),i=ue(a);a--;)i[r?a:++o]=e,e+=n;return i}(n,r,o=o===e?n<r?1:-1:hu(o),t)}}function Ko(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=_u(t),n=_u(n)),e(t,n)}}function Jo(t,n,r,o,a,c,l,s,f,d){var p=8&n;n|=p?i:u,4&(n&=~(p?u:i))||(n&=-4);var g=[t,n,a,p?c:e,p?l:e,p?e:c,p?e:l,s,f,d],h=r.apply(e,g);return wa(t)&&Ga(h,g),h.placeholder=o,La(h,t,n)}function Xo(e){var t=be[e];return function(e,n){if(e=_u(e),(n=null==n?0:yn(vu(n),292))&&Ot(e)){var r=(mu(e)+"e").split("e");return+((r=(mu(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Vo=Tn&&1/dn(new Tn([,-0]))[1]==s?function(e){return new Tn(e)}:sc;function $o(e){return function(t){var n=Aa(t);return n==M?ln(t):n==E?pn(t):function(e,t){return Lt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function ea(n,o,s,f,d,p,g,h){var v=2&o;if(!v&&"function"!=typeof n)throw new Re(t);var A=f?f.length:0;if(A||(o&=-97,f=d=e),g=g===e?g:mn(vu(g),0),h=h===e?h:vu(h),A-=d?d.length:0,o&u){var _=f,P=d;f=d=e}var m=v?e:ca(n),y=[n,o,s,f,d,_,P,p,g,h];if(m&&function(e,t){var n=e[1],o=t[1],a=n|o,i=a<131,u=o==c&&8==n||o==c&&n==l&&e[7].length<=t[8]||384==o&&t[7].length<=t[8]&&8==n;if(!i&&!u)return e;1&o&&(e[2]=t[2],a|=1&n?0:4);var s=t[3];if(s){var f=e[3];e[3]=f?Eo(f,s,t[4]):s,e[4]=f?fn(e[3],r):t[4]}(s=t[5])&&(f=e[5],e[5]=f?Ro(f,s,t[6]):s,e[6]=f?fn(e[5],r):t[6]),(s=t[7])&&(e[7]=s),o&c&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=a}(y,m),n=y[0],o=y[1],s=y[2],f=y[3],d=y[4],!(h=y[9]=y[9]===e?v?0:n.length:mn(y[9]-A,0))&&24&o&&(o&=-25),o&&1!=o)M=8==o||o==a?function(t,n,r){var o=Oo(t);return function a(){for(var i=arguments.length,u=ue(i),c=i,l=sa(a);c--;)u[c]=arguments[c];var s=i<3&&u[0]!==l&&u[i-1]!==l?[]:fn(u,l);return(i-=s.length)<r?Jo(t,n,Ho,a.placeholder,e,u,s,e,e,r-i):bt(this&&this!==ht&&this instanceof a?o:t,this,u)}}(n,o,h):o!=i&&33!=o||d.length?Ho.apply(e,y):function(e,t,n,r){var o=1&t,a=Oo(e);return function t(){for(var i=-1,u=arguments.length,c=-1,l=r.length,s=ue(l+u),f=this&&this!==ht&&this instanceof t?a:e;++c<l;)s[c]=r[c];for(;u--;)s[c++]=arguments[++i];return bt(f,o?n:this,s)}}(n,o,s,f);else var M=function(e,t,n){var r=1&t,o=Oo(e);return function t(){return(this&&this!==ht&&this instanceof t?o:e).apply(r?n:this,arguments)}}(n,o,s);return La((m?no:Ga)(M,y),n,o)}function ta(t,n,r,o){return t===e||ji(t,De[r])&&!Ne.call(o,r)?n:t}function na(t,n,r,o,a,i){return nu(t)&&nu(n)&&(i.set(n,t),Yr(t,n,e,na,i),i.delete(n)),t}function ra(t){return iu(t)?e:t}function oa(t,n,r,o,a,i){var u=1&r,c=t.length,l=n.length;if(c!=l&&!(u&&l>c))return!1;var s=i.get(t),f=i.get(n);if(s&&f)return s==n&&f==t;var d=-1,p=!0,g=2&r?new Jn:e;for(i.set(t,n),i.set(n,t);++d<c;){var h=t[d],v=n[d];if(o)var A=u?o(v,h,d,n,t,i):o(h,v,d,t,n,i);if(A!==e){if(A)continue;p=!1;break}if(g){if(!kt(n,(function(e,t){if(!tn(g,t)&&(h===e||a(h,e,r,o,i)))return g.push(t)}))){p=!1;break}}else if(h!==v&&!a(h,v,r,o,i)){p=!1;break}}return i.delete(t),i.delete(n),p}function aa(t){return Da(Ta(t,e,Qa),t+"")}function ia(e){return Sr(e,Fu,ha)}function ua(e){return Sr(e,Du,va)}var ca=Gn?function(e){return Gn.get(e)}:sc;function la(e){for(var t=e.name+"",n=Fn[t],r=Ne.call(Fn,t)?n.length:0;r--;){var o=n[r],a=o.func;if(null==a||a==e)return o.name}return t}function sa(e){return(Ne.call(jn,"placeholder")?jn:e).placeholder}function fa(){var e=jn.iteratee||ic;return e=e===ic?Nr:e,arguments.length?e(arguments[0],arguments[1]):e}function da(e,t){var n,r,a=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function pa(e){for(var t=Fu(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ba(o)]}return t}function ga(t,n){var r=function(t,n){return null==t?e:t[n]}(t,n);return Br(r)?r:e}var ha=Pt?function(e){return null==e?[]:(e=Ce(e),Gt(Pt(e),(function(t){return Je.call(e,t)})))}:Ac,va=Pt?function(e){for(var t=[];e;)Bt(t,ha(e)),e=qe(e);return t}:Ac,Aa=br;function _a(e,t,n){for(var r=-1,o=(t=Mo(t,e)).length,a=!1;++r<o;){var i=ka(t[r]);if(!(a=null!=e&&n(e,i)))break;e=e[i]}return a||++r!=o?a:!!(o=null==e?0:e.length)&&tu(o)&&ya(i,o)&&(Zi(e)||zi(e))}function Pa(e){return"function"!=typeof e.constructor||Sa(e)?{}:Hn(qe(e))}function ma(e){return Zi(e)||zi(e)||!!(Ve&&e&&e[Ve])}function ya(e,t){var n=o(e);return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function Ma(e,t,n){if(!nu(n))return!1;var r=o(t);return!!("number"==r?qi(n)&&ya(t,n.length):"string"==r&&t in n)&&ji(n[t],e)}function Ia(e,t){if(Zi(e))return!1;var n=o(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!su(e))||ne.test(e)||!te.test(e)||null!=t&&e in Ce(t)}function wa(e){var t=la(e),n=jn[t];if("function"!=typeof n||!(t in Zn.prototype))return!1;if(e===n)return!0;var r=ca(n);return!!r&&e===r[0]}(Sn&&Aa(new Sn(new ArrayBuffer(1)))!=L||bn&&Aa(new bn)!=M||Cn&&Aa(Cn.resolve())!=C||Tn&&Aa(new Tn)!=E||En&&Aa(new En)!=F)&&(Aa=function(t){var n=br(t),r=n==b?t.constructor:e,o=r?Oa(r):"";if(o)switch(o){case Dn:return L;case Ln:return M;case Bn:return C;case Nn:return E;case Un:return F}return n});var xa=Le?$i:_c;function Sa(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||De)}function ba(e){return e==e&&!nu(e)}function Ca(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in Ce(r))}}function Ta(t,n,r){return n=mn(n===e?t.length-1:n,0),function(){for(var e=arguments,o=-1,a=mn(e.length-n,0),i=ue(a);++o<a;)i[o]=e[n+o];o=-1;for(var u=ue(n+1);++o<n;)u[o]=e[o];return u[n]=r(i),bt(t,this,u)}}function Ea(e,t){return t.length<2?e:xr(e,ao(t,0,-1))}function Ra(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ga=Ba(no),Fa=gt||function(e,t){return ht.setTimeout(e,t)},Da=Ba(ro);function La(e,t,n){var r=t+"";return Da(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Tt(g,(function(n){var r="_."+n[0];t&n[1]&&!Ft(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(se):[]}(r),n)))}function Ba(t){var n=0,r=0;return function(){var o=Mn(),a=16-(o-r);if(r=o,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Na(t,n){var r=-1,o=t.length,a=o-1;for(n=n===e?o:n;++r<n;){var i=Jr(r,a),u=t[i];t[i]=t[r],t[r]=u}return t.length=n,t}var Ua=function(e){var t=Bi(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,o){t.push(r?o.replace(pe,"$1"):n||e)})),t}));function ka(e){if("string"==typeof e||su(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Oa(e){if(null!=e){try{return Be.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Wa(e){if(e instanceof Zn)return e.clone();var t=new zn(e.__wrapped__,e.__chain__);return t.__actions__=Go(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var ja=Vr((function(e,t){return Ki(e)?pr(e,Pr(t,1,Ki,!0)):[]})),Ha=Vr((function(t,n){var r=Va(n);return Ki(r)&&(r=e),Ki(t)?pr(t,Pr(n,1,Ki,!0),fa(r,2)):[]})),Ya=Vr((function(t,n){var r=Va(n);return Ki(r)&&(r=e),Ki(t)?pr(t,Pr(n,1,Ki,!0),e,r):[]}));function za(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vu(n);return o<0&&(o=mn(r+o,0)),jt(e,fa(t,3),o)}function Za(t,n,r){var o=null==t?0:t.length;if(!o)return-1;var a=o-1;return r!==e&&(a=vu(r),a=r<0?mn(o+a,0):yn(a,o-1)),jt(t,fa(n,3),a,!0)}function Qa(e){return null!=e&&e.length?Pr(e,1):[]}function qa(t){return t&&t.length?t[0]:e}var Ka=Vr((function(e){var t=Lt(e,mo);return t.length&&t[0]===e[0]?Rr(t):[]})),Ja=Vr((function(t){var n=Va(t),r=Lt(t,mo);return n===Va(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Rr(r,fa(n,2)):[]})),Xa=Vr((function(t){var n=Va(t),r=Lt(t,mo);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Rr(r,e,n):[]}));function Va(t){var n=null==t?0:t.length;return n?t[n-1]:e}var $a=Vr(ei);function ei(e,t){return e&&e.length&&t&&t.length?qr(e,t):e}var ti=aa((function(e,t){var n=null==e?0:e.length,r=cr(e,t);return Kr(e,Lt(t,(function(e){return ya(e,n)?+e:e})).sort(To)),r}));function ni(e){return null==e?e:xn.call(e)}var ri=Vr((function(e){return po(Pr(e,1,Ki,!0))})),oi=Vr((function(t){var n=Va(t);return Ki(n)&&(n=e),po(Pr(t,1,Ki,!0),fa(n,2))})),ai=Vr((function(t){var n=Va(t);return n="function"==typeof n?n:e,po(Pr(t,1,Ki,!0),e,n)}));function ii(e){if(!e||!e.length)return[];var t=0;return e=Gt(e,(function(e){if(Ki(e))return t=mn(e.length,t),!0})),Xt(t,(function(t){return Lt(e,Qt(t))}))}function ui(t,n){if(!t||!t.length)return[];var r=ii(t);return null==n?r:Lt(r,(function(t){return bt(n,e,t)}))}var ci=Vr((function(e,t){return Ki(e)?pr(e,t):[]})),li=Vr((function(e){return _o(Gt(e,Ki))})),si=Vr((function(t){var n=Va(t);return Ki(n)&&(n=e),_o(Gt(t,Ki),fa(n,2))})),fi=Vr((function(t){var n=Va(t);return n="function"==typeof n?n:e,_o(Gt(t,Ki),e,n)})),di=Vr(ii),pi=Vr((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,ui(t,r)}));function gi(e){var t=jn(e);return t.__chain__=!0,t}function hi(e,t){return t(e)}var vi=aa((function(t){var n=t.length,r=n?t[0]:0,o=this.__wrapped__,a=function(e){return cr(e,t)};return!(n>1||this.__actions__.length)&&o instanceof Zn&&ya(r)?((o=o.slice(r,+r+(n?1:0))).__actions__.push({func:hi,args:[a],thisArg:e}),new zn(o,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(a)})),Ai=Do((function(e,t,n){Ne.call(e,n)?++e[n]:ur(e,n,1)})),_i=Wo(za),Pi=Wo(Za);function mi(e,t){return(Zi(e)?Tt:gr)(e,fa(t,3))}function yi(e,t){return(Zi(e)?Et:hr)(e,fa(t,3))}var Mi=Do((function(e,t,n){Ne.call(e,n)?e[n].push(t):ur(e,n,[t])})),Ii=Vr((function(e,t,n){var r=-1,o="function"==typeof t,a=qi(e)?ue(e.length):[];return gr(e,(function(e){a[++r]=o?bt(t,e,n):Gr(e,t,n)})),a})),wi=Do((function(e,t,n){ur(e,n,t)}));function xi(e,t){return(Zi(e)?Lt:Wr)(e,fa(t,3))}var Si=Do((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),bi=Vr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Ma(e,t[0],t[1])?t=[]:n>2&&Ma(t[0],t[1],t[2])&&(t=[t[0]]),Zr(e,Pr(t,1),[])})),Ci=pt||function(){return ht.Date.now()};function Ti(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,ea(t,c,e,e,e,e,n)}function Ei(n,r){var o;if("function"!=typeof r)throw new Re(t);return n=vu(n),function(){return--n>0&&(o=r.apply(this,arguments)),n<=1&&(r=e),o}}var Ri=Vr((function(e,t,n){var r=1;if(n.length){var o=fn(n,sa(Ri));r|=i}return ea(e,r,t,n,o)})),Gi=Vr((function(e,t,n){var r=3;if(n.length){var o=fn(n,sa(Gi));r|=i}return ea(t,r,e,n,o)}));function Fi(n,r,o){var a,i,u,c,l,s,f=0,d=!1,p=!1,g=!0;if("function"!=typeof n)throw new Re(t);function h(t){var r=a,o=i;return a=i=e,f=t,c=n.apply(o,r)}function v(t){var n=t-s;return s===e||n>=r||n<0||p&&t-f>=u}function A(){var e=Ci();if(v(e))return _(e);l=Fa(A,function(e){var t=r-(e-s);return p?yn(t,u-(e-f)):t}(e))}function _(t){return l=e,g&&a?h(t):(a=i=e,c)}function P(){var t=Ci(),n=v(t);if(a=arguments,i=this,s=t,n){if(l===e)return function(e){return f=e,l=Fa(A,r),d?h(e):c}(s);if(p)return xo(l),l=Fa(A,r),h(s)}return l===e&&(l=Fa(A,r)),c}return r=_u(r)||0,nu(o)&&(d=!!o.leading,u=(p="maxWait"in o)?mn(_u(o.maxWait)||0,r):u,g="trailing"in o?!!o.trailing:g),P.cancel=function(){l!==e&&xo(l),f=0,a=s=i=l=e},P.flush=function(){return l===e?c:_(Ci())},P}var Di=Vr((function(e,t){return dr(e,1,t)})),Li=Vr((function(e,t,n){return dr(e,_u(t)||0,n)}));function Bi(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new Re(t);var r=function t(){var r=arguments,o=n?n.apply(this,r):r[0],a=t.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return t.cache=a.set(o,i)||a,i};return r.cache=new(Bi.Cache||Kn),r}function Ni(e){if("function"!=typeof e)throw new Re(t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Bi.Cache=Kn;var Ui=Io((function(e,t){var n=(t=1==t.length&&Zi(t[0])?Lt(t[0],$t(fa())):Lt(Pr(t,1),$t(fa()))).length;return Vr((function(r){for(var o=-1,a=yn(r.length,n);++o<a;)r[o]=t[o].call(this,r[o]);return bt(e,this,r)}))})),ki=Vr((function(t,n){var r=fn(n,sa(ki));return ea(t,i,e,n,r)})),Oi=Vr((function(t,n){var r=fn(n,sa(Oi));return ea(t,u,e,n,r)})),Wi=aa((function(t,n){return ea(t,l,e,e,e,n)}));function ji(e,t){return e===t||e!=e&&t!=t}var Hi=Ko(Cr),Yi=Ko((function(e,t){return e>=t})),zi=Fr(function(){return arguments}())?Fr:function(e){return ru(e)&&Ne.call(e,"callee")&&!Je.call(e,"callee")},Zi=ue.isArray,Qi=yt?$t(yt):function(e){return ru(e)&&br(e)==D};function qi(e){return null!=e&&tu(e.length)&&!$i(e)}function Ki(e){return ru(e)&&qi(e)}var Ji=mt||_c,Xi=Mt?$t(Mt):function(e){return ru(e)&&br(e)==_};function Vi(e){if(!ru(e))return!1;var t=br(e);return t==P||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!iu(e)}function $i(e){if(!nu(e))return!1;var t=br(e);return t==m||t==y||"[object AsyncFunction]"==t||"[object Proxy]"==t}function eu(e){return"number"==typeof e&&e==vu(e)}function tu(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function nu(e){var t=o(e);return null!=e&&("object"==t||"function"==t)}function ru(e){return null!=e&&"object"==o(e)}var ou=It?$t(It):function(e){return ru(e)&&Aa(e)==M};function au(e){return"number"==typeof e||ru(e)&&br(e)==S}function iu(e){if(!ru(e)||br(e)!=b)return!1;var t=qe(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Be.call(n)==We}var uu=wt?$t(wt):function(e){return ru(e)&&br(e)==T},cu=xt?$t(xt):function(e){return ru(e)&&Aa(e)==E};function lu(e){return"string"==typeof e||!Zi(e)&&ru(e)&&br(e)==R}function su(e){return"symbol"==o(e)||ru(e)&&br(e)==G}var fu=St?$t(St):function(e){return ru(e)&&tu(e.length)&&!!ct[br(e)]},du=Ko(Or),pu=Ko((function(e,t){return e<=t}));function gu(e){if(!e)return[];if(qi(e))return lu(e)?hn(e):Go(e);if($e&&e[$e])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[$e]());var t=Aa(e);return(t==M?ln:t==E?dn:ju)(e)}function hu(e){return e?(e=_u(e))===s||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function vu(e){var t=hu(e),n=t%1;return t==t?n?t-n:t:0}function Au(e){return e?lr(vu(e),0,p):0}function _u(e){if("number"==typeof e)return e;if(su(e))return d;if(nu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=nu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Vt(e);var n=Ae.test(e);return n||Pe.test(e)?dt(e.slice(2),n?2:8):ve.test(e)?d:+e}function Pu(e){return Fo(e,Du(e))}function mu(e){return null==e?"":fo(e)}var yu=Lo((function(e,t){if(Sa(t)||qi(t))Fo(t,Fu(t),e);else for(var n in t)Ne.call(t,n)&&rr(e,n,t[n])})),Mu=Lo((function(e,t){Fo(t,Du(t),e)})),Iu=Lo((function(e,t,n,r){Fo(t,Du(t),e,r)})),wu=Lo((function(e,t,n,r){Fo(t,Fu(t),e,r)})),xu=aa(cr),Su=Vr((function(t,n){t=Ce(t);var r=-1,o=n.length,a=o>2?n[2]:e;for(a&&Ma(n[0],n[1],a)&&(o=1);++r<o;)for(var i=n[r],u=Du(i),c=-1,l=u.length;++c<l;){var s=u[c],f=t[s];(f===e||ji(f,De[s])&&!Ne.call(t,s))&&(t[s]=i[s])}return t})),bu=Vr((function(t){return t.push(e,na),bt(Bu,e,t)}));function Cu(t,n,r){var o=null==t?e:xr(t,n);return o===e?r:o}function Tu(e,t){return null!=e&&_a(e,t,Er)}var Eu=Yo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Oe.call(t)),e[t]=n}),nc(ac)),Ru=Yo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Oe.call(t)),Ne.call(e,t)?e[t].push(n):e[t]=[n]}),fa),Gu=Vr(Gr);function Fu(e){return qi(e)?Vn(e):Ur(e)}function Du(e){return qi(e)?Vn(e,!0):kr(e)}var Lu=Lo((function(e,t,n){Yr(e,t,n)})),Bu=Lo((function(e,t,n,r){Yr(e,t,n,r)})),Nu=aa((function(e,t){var n={};if(null==e)return n;var r=!1;t=Lt(t,(function(t){return t=Mo(t,e),r||(r=t.length>1),t})),Fo(e,ua(e),n),r&&(n=sr(n,7,ra));for(var o=t.length;o--;)go(n,t[o]);return n})),Uu=aa((function(e,t){return null==e?{}:function(e,t){return Qr(e,t,(function(t,n){return Tu(e,n)}))}(e,t)}));function ku(e,t){if(null==e)return{};var n=Lt(ua(e),(function(e){return[e]}));return t=fa(t),Qr(e,n,(function(e,n){return t(e,n[0])}))}var Ou=$o(Fu),Wu=$o(Du);function ju(e){return null==e?[]:en(e,Fu(e))}var Hu=ko((function(e,t,n){return t=t.toLowerCase(),e+(n?Yu(t):t)}));function Yu(e){return Vu(mu(e).toLowerCase())}function zu(e){return(e=mu(e))&&e.replace(ye,on).replace(tt,"")}var Zu=ko((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Qu=ko((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qu=Uo("toLowerCase"),Ku=ko((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ju=ko((function(e,t,n){return e+(n?" ":"")+Vu(t)})),Xu=ko((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Vu=Uo("toUpperCase");function $u(t,n,r){return t=mu(t),(n=r?e:n)===e?function(e){return at.test(e)}(t)?function(e){return e.match(rt)||[]}(t):function(e){return e.match(fe)||[]}(t):t.match(n)||[]}var ec=Vr((function(t,n){try{return bt(t,e,n)}catch(e){return Vi(e)?e:new xe(e)}})),tc=aa((function(e,t){return Tt(t,(function(t){t=ka(t),ur(e,t,Ri(e[t],e))})),e}));function nc(e){return function(){return e}}var rc=jo(),oc=jo(!0);function ac(e){return e}function ic(e){return Nr("function"==typeof e?e:sr(e,1))}var uc=Vr((function(e,t){return function(n){return Gr(n,e,t)}})),cc=Vr((function(e,t){return function(n){return Gr(e,n,t)}}));function lc(e,t,n){var r=Fu(t),o=wr(t,r);null!=n||nu(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=wr(t,Fu(t)));var a=!(nu(n)&&"chain"in n&&!n.chain),i=$i(e);return Tt(o,(function(n){var r=t[n];e[n]=r,i&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=Go(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Bt([this.value()],arguments))})})),e}function sc(){}var fc=Zo(Lt),dc=Zo(Rt),pc=Zo(kt);function gc(e){return Ia(e)?Qt(ka(e)):function(e){return function(t){return xr(t,e)}}(e)}var hc=qo(),vc=qo(!0);function Ac(){return[]}function _c(){return!1}var Pc,mc=zo((function(e,t){return e+t}),0),yc=Xo("ceil"),Mc=zo((function(e,t){return e/t}),1),Ic=Xo("floor"),wc=zo((function(e,t){return e*t}),1),xc=Xo("round"),Sc=zo((function(e,t){return e-t}),0);return jn.after=function(e,n){if("function"!=typeof n)throw new Re(t);return e=vu(e),function(){if(--e<1)return n.apply(this,arguments)}},jn.ary=Ti,jn.assign=yu,jn.assignIn=Mu,jn.assignInWith=Iu,jn.assignWith=wu,jn.at=xu,jn.before=Ei,jn.bind=Ri,jn.bindAll=tc,jn.bindKey=Gi,jn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Zi(e)?e:[e]},jn.chain=gi,jn.chunk=function(t,n,r){n=(r?Ma(t,n,r):n===e)?1:mn(vu(n),0);var o=null==t?0:t.length;if(!o||n<1)return[];for(var a=0,i=0,u=ue(vt(o/n));a<o;)u[i++]=ao(t,a,a+=n);return u},jn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var a=e[t];a&&(o[r++]=a)}return o},jn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ue(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Bt(Zi(n)?Go(n):[n],Pr(t,1))},jn.cond=function(e){var n=null==e?0:e.length,r=fa();return e=n?Lt(e,(function(e){if("function"!=typeof e[1])throw new Re(t);return[r(e[0]),e[1]]})):[],Vr((function(t){for(var r=-1;++r<n;){var o=e[r];if(bt(o[0],this,t))return bt(o[1],this,t)}}))},jn.conforms=function(e){return function(e){var t=Fu(e);return function(n){return fr(n,e,t)}}(sr(e,1))},jn.constant=nc,jn.countBy=Ai,jn.create=function(e,t){var n=Hn(e);return null==t?n:ir(n,t)},jn.curry=function t(n,r,o){var a=ea(n,8,e,e,e,e,e,r=o?e:r);return a.placeholder=t.placeholder,a},jn.curryRight=function t(n,r,o){var i=ea(n,a,e,e,e,e,e,r=o?e:r);return i.placeholder=t.placeholder,i},jn.debounce=Fi,jn.defaults=Su,jn.defaultsDeep=bu,jn.defer=Di,jn.delay=Li,jn.difference=ja,jn.differenceBy=Ha,jn.differenceWith=Ya,jn.drop=function(t,n,r){var o=null==t?0:t.length;return o?ao(t,(n=r||n===e?1:vu(n))<0?0:n,o):[]},jn.dropRight=function(t,n,r){var o=null==t?0:t.length;return o?ao(t,0,(n=o-(n=r||n===e?1:vu(n)))<0?0:n):[]},jn.dropRightWhile=function(e,t){return e&&e.length?vo(e,fa(t,3),!0,!0):[]},jn.dropWhile=function(e,t){return e&&e.length?vo(e,fa(t,3),!0):[]},jn.fill=function(t,n,r,o){var a=null==t?0:t.length;return a?(r&&"number"!=typeof r&&Ma(t,n,r)&&(r=0,o=a),function(t,n,r,o){var a=t.length;for((r=vu(r))<0&&(r=-r>a?0:a+r),(o=o===e||o>a?a:vu(o))<0&&(o+=a),o=r>o?0:Au(o);r<o;)t[r++]=n;return t}(t,n,r,o)):[]},jn.filter=function(e,t){return(Zi(e)?Gt:_r)(e,fa(t,3))},jn.flatMap=function(e,t){return Pr(xi(e,t),1)},jn.flatMapDeep=function(e,t){return Pr(xi(e,t),s)},jn.flatMapDepth=function(t,n,r){return r=r===e?1:vu(r),Pr(xi(t,n),r)},jn.flatten=Qa,jn.flattenDeep=function(e){return null!=e&&e.length?Pr(e,s):[]},jn.flattenDepth=function(t,n){return null!=t&&t.length?Pr(t,n=n===e?1:vu(n)):[]},jn.flip=function(e){return ea(e,512)},jn.flow=rc,jn.flowRight=oc,jn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},jn.functions=function(e){return null==e?[]:wr(e,Fu(e))},jn.functionsIn=function(e){return null==e?[]:wr(e,Du(e))},jn.groupBy=Mi,jn.initial=function(e){return null!=e&&e.length?ao(e,0,-1):[]},jn.intersection=Ka,jn.intersectionBy=Ja,jn.intersectionWith=Xa,jn.invert=Eu,jn.invertBy=Ru,jn.invokeMap=Ii,jn.iteratee=ic,jn.keyBy=wi,jn.keys=Fu,jn.keysIn=Du,jn.map=xi,jn.mapKeys=function(e,t){var n={};return t=fa(t,3),Mr(e,(function(e,r,o){ur(n,t(e,r,o),e)})),n},jn.mapValues=function(e,t){var n={};return t=fa(t,3),Mr(e,(function(e,r,o){ur(n,r,t(e,r,o))})),n},jn.matches=function(e){return jr(sr(e,1))},jn.matchesProperty=function(e,t){return Hr(e,sr(t,1))},jn.memoize=Bi,jn.merge=Lu,jn.mergeWith=Bu,jn.method=uc,jn.methodOf=cc,jn.mixin=lc,jn.negate=Ni,jn.nthArg=function(e){return e=vu(e),Vr((function(t){return zr(t,e)}))},jn.omit=Nu,jn.omitBy=function(e,t){return ku(e,Ni(fa(t)))},jn.once=function(e){return Ei(2,e)},jn.orderBy=function(t,n,r,o){return null==t?[]:(Zi(n)||(n=null==n?[]:[n]),Zi(r=o?e:r)||(r=null==r?[]:[r]),Zr(t,n,r))},jn.over=fc,jn.overArgs=Ui,jn.overEvery=dc,jn.overSome=pc,jn.partial=ki,jn.partialRight=Oi,jn.partition=Si,jn.pick=Uu,jn.pickBy=ku,jn.property=gc,jn.propertyOf=function(t){return function(n){return null==t?e:xr(t,n)}},jn.pull=$a,jn.pullAll=ei,jn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,fa(n,2)):e},jn.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?qr(t,n,e,r):t},jn.pullAt=ti,jn.range=hc,jn.rangeRight=vc,jn.rearg=Wi,jn.reject=function(e,t){return(Zi(e)?Gt:_r)(e,Ni(fa(t,3)))},jn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],a=e.length;for(t=fa(t,3);++r<a;){var i=e[r];t(i,r,e)&&(n.push(i),o.push(r))}return Kr(e,o),n},jn.rest=function(n,r){if("function"!=typeof n)throw new Re(t);return Vr(n,r=r===e?r:vu(r))},jn.reverse=ni,jn.sampleSize=function(t,n,r){return n=(r?Ma(t,n,r):n===e)?1:vu(n),(Zi(t)?er:eo)(t,n)},jn.set=function(e,t,n){return null==e?e:to(e,t,n)},jn.setWith=function(t,n,r,o){return o="function"==typeof o?o:e,null==t?t:to(t,n,r,o)},jn.shuffle=function(e){return(Zi(e)?tr:oo)(e)},jn.slice=function(t,n,r){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&Ma(t,n,r)?(n=0,r=o):(n=null==n?0:vu(n),r=r===e?o:vu(r)),ao(t,n,r)):[]},jn.sortBy=bi,jn.sortedUniq=function(e){return e&&e.length?lo(e):[]},jn.sortedUniqBy=function(e,t){return e&&e.length?lo(e,fa(t,2)):[]},jn.split=function(t,n,r){return r&&"number"!=typeof r&&Ma(t,n,r)&&(n=r=e),(r=r===e?p:r>>>0)?(t=mu(t))&&("string"==typeof n||null!=n&&!uu(n))&&!(n=fo(n))&&cn(t)?wo(hn(t),0,r):t.split(n,r):[]},jn.spread=function(e,n){if("function"!=typeof e)throw new Re(t);return n=null==n?0:mn(vu(n),0),Vr((function(t){var r=t[n],o=wo(t,0,n);return r&&Bt(o,r),bt(e,this,o)}))},jn.tail=function(e){var t=null==e?0:e.length;return t?ao(e,1,t):[]},jn.take=function(t,n,r){return t&&t.length?ao(t,0,(n=r||n===e?1:vu(n))<0?0:n):[]},jn.takeRight=function(t,n,r){var o=null==t?0:t.length;return o?ao(t,(n=o-(n=r||n===e?1:vu(n)))<0?0:n,o):[]},jn.takeRightWhile=function(e,t){return e&&e.length?vo(e,fa(t,3),!1,!0):[]},jn.takeWhile=function(e,t){return e&&e.length?vo(e,fa(t,3)):[]},jn.tap=function(e,t){return t(e),e},jn.throttle=function(e,n,r){var o=!0,a=!0;if("function"!=typeof e)throw new Re(t);return nu(r)&&(o="leading"in r?!!r.leading:o,a="trailing"in r?!!r.trailing:a),Fi(e,n,{leading:o,maxWait:n,trailing:a})},jn.thru=hi,jn.toArray=gu,jn.toPairs=Ou,jn.toPairsIn=Wu,jn.toPath=function(e){return Zi(e)?Lt(e,ka):su(e)?[e]:Go(Ua(mu(e)))},jn.toPlainObject=Pu,jn.transform=function(e,t,n){var r=Zi(e),o=r||Ji(e)||fu(e);if(t=fa(t,4),null==n){var a=e&&e.constructor;n=o?r?new a:[]:nu(e)&&$i(a)?Hn(qe(e)):{}}return(o?Tt:Mr)(e,(function(e,r,o){return t(n,e,r,o)})),n},jn.unary=function(e){return Ti(e,1)},jn.union=ri,jn.unionBy=oi,jn.unionWith=ai,jn.uniq=function(e){return e&&e.length?po(e):[]},jn.uniqBy=function(e,t){return e&&e.length?po(e,fa(t,2)):[]},jn.uniqWith=function(t,n){return n="function"==typeof n?n:e,t&&t.length?po(t,e,n):[]},jn.unset=function(e,t){return null==e||go(e,t)},jn.unzip=ii,jn.unzipWith=ui,jn.update=function(e,t,n){return null==e?e:ho(e,t,yo(n))},jn.updateWith=function(t,n,r,o){return o="function"==typeof o?o:e,null==t?t:ho(t,n,yo(r),o)},jn.values=ju,jn.valuesIn=function(e){return null==e?[]:en(e,Du(e))},jn.without=ci,jn.words=$u,jn.wrap=function(e,t){return ki(yo(t),e)},jn.xor=li,jn.xorBy=si,jn.xorWith=fi,jn.zip=di,jn.zipObject=function(e,t){return Po(e||[],t||[],rr)},jn.zipObjectDeep=function(e,t){return Po(e||[],t||[],to)},jn.zipWith=pi,jn.entries=Ou,jn.entriesIn=Wu,jn.extend=Mu,jn.extendWith=Iu,lc(jn,jn),jn.add=mc,jn.attempt=ec,jn.camelCase=Hu,jn.capitalize=Yu,jn.ceil=yc,jn.clamp=function(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=_u(r))==r?r:0),n!==e&&(n=(n=_u(n))==n?n:0),lr(_u(t),n,r)},jn.clone=function(e){return sr(e,4)},jn.cloneDeep=function(e){return sr(e,5)},jn.cloneDeepWith=function(t,n){return sr(t,5,n="function"==typeof n?n:e)},jn.cloneWith=function(t,n){return sr(t,4,n="function"==typeof n?n:e)},jn.conformsTo=function(e,t){return null==t||fr(e,t,Fu(t))},jn.deburr=zu,jn.defaultTo=function(e,t){return null==e||e!=e?t:e},jn.divide=Mc,jn.endsWith=function(t,n,r){t=mu(t),n=fo(n);var o=t.length,a=r=r===e?o:lr(vu(r),0,o);return(r-=n.length)>=0&&t.slice(r,a)==n},jn.eq=ji,jn.escape=function(e){return(e=mu(e))&&X.test(e)?e.replace(K,an):e},jn.escapeRegExp=function(e){return(e=mu(e))&&ae.test(e)?e.replace(oe,"\\$&"):e},jn.every=function(t,n,r){var o=Zi(t)?Rt:vr;return r&&Ma(t,n,r)&&(n=e),o(t,fa(n,3))},jn.find=_i,jn.findIndex=za,jn.findKey=function(e,t){return Wt(e,fa(t,3),Mr)},jn.findLast=Pi,jn.findLastIndex=Za,jn.findLastKey=function(e,t){return Wt(e,fa(t,3),Ir)},jn.floor=Ic,jn.forEach=mi,jn.forEachRight=yi,jn.forIn=function(e,t){return null==e?e:mr(e,fa(t,3),Du)},jn.forInRight=function(e,t){return null==e?e:yr(e,fa(t,3),Du)},jn.forOwn=function(e,t){return e&&Mr(e,fa(t,3))},jn.forOwnRight=function(e,t){return e&&Ir(e,fa(t,3))},jn.get=Cu,jn.gt=Hi,jn.gte=Yi,jn.has=function(e,t){return null!=e&&_a(e,t,Tr)},jn.hasIn=Tu,jn.head=qa,jn.identity=ac,jn.includes=function(e,t,n,r){e=qi(e)?e:ju(e),n=n&&!r?vu(n):0;var o=e.length;return n<0&&(n=mn(o+n,0)),lu(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ht(e,t,n)>-1},jn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vu(n);return o<0&&(o=mn(r+o,0)),Ht(e,t,o)},jn.inRange=function(t,n,r){return n=hu(n),r===e?(r=n,n=0):r=hu(r),function(e,t,n){return e>=yn(t,n)&&e<mn(t,n)}(t=_u(t),n,r)},jn.invoke=Gu,jn.isArguments=zi,jn.isArray=Zi,jn.isArrayBuffer=Qi,jn.isArrayLike=qi,jn.isArrayLikeObject=Ki,jn.isBoolean=function(e){return!0===e||!1===e||ru(e)&&br(e)==A},jn.isBuffer=Ji,jn.isDate=Xi,jn.isElement=function(e){return ru(e)&&1===e.nodeType&&!iu(e)},jn.isEmpty=function(e){if(null==e)return!0;if(qi(e)&&(Zi(e)||"string"==typeof e||"function"==typeof e.splice||Ji(e)||fu(e)||zi(e)))return!e.length;var t=Aa(e);if(t==M||t==E)return!e.size;if(Sa(e))return!Ur(e).length;for(var n in e)if(Ne.call(e,n))return!1;return!0},jn.isEqual=function(e,t){return Dr(e,t)},jn.isEqualWith=function(t,n,r){var o=(r="function"==typeof r?r:e)?r(t,n):e;return o===e?Dr(t,n,e,r):!!o},jn.isError=Vi,jn.isFinite=function(e){return"number"==typeof e&&Ot(e)},jn.isFunction=$i,jn.isInteger=eu,jn.isLength=tu,jn.isMap=ou,jn.isMatch=function(e,t){return e===t||Lr(e,t,pa(t))},jn.isMatchWith=function(t,n,r){return r="function"==typeof r?r:e,Lr(t,n,pa(n),r)},jn.isNaN=function(e){return au(e)&&e!=+e},jn.isNative=function(e){if(xa(e))throw new xe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Br(e)},jn.isNil=function(e){return null==e},jn.isNull=function(e){return null===e},jn.isNumber=au,jn.isObject=nu,jn.isObjectLike=ru,jn.isPlainObject=iu,jn.isRegExp=uu,jn.isSafeInteger=function(e){return eu(e)&&e>=-9007199254740991&&e<=f},jn.isSet=cu,jn.isString=lu,jn.isSymbol=su,jn.isTypedArray=fu,jn.isUndefined=function(t){return t===e},jn.isWeakMap=function(e){return ru(e)&&Aa(e)==F},jn.isWeakSet=function(e){return ru(e)&&"[object WeakSet]"==br(e)},jn.join=function(e,t){return null==e?"":qt.call(e,t)},jn.kebabCase=Zu,jn.last=Va,jn.lastIndexOf=function(t,n,r){var o=null==t?0:t.length;if(!o)return-1;var a=o;return r!==e&&(a=(a=vu(r))<0?mn(o+a,0):yn(a,o-1)),n==n?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(t,n,a):jt(t,zt,a,!0)},jn.lowerCase=Qu,jn.lowerFirst=qu,jn.lt=du,jn.lte=pu,jn.max=function(t){return t&&t.length?Ar(t,ac,Cr):e},jn.maxBy=function(t,n){return t&&t.length?Ar(t,fa(n,2),Cr):e},jn.mean=function(e){return Zt(e,ac)},jn.meanBy=function(e,t){return Zt(e,fa(t,2))},jn.min=function(t){return t&&t.length?Ar(t,ac,Or):e},jn.minBy=function(t,n){return t&&t.length?Ar(t,fa(n,2),Or):e},jn.stubArray=Ac,jn.stubFalse=_c,jn.stubObject=function(){return{}},jn.stubString=function(){return""},jn.stubTrue=function(){return!0},jn.multiply=wc,jn.nth=function(t,n){return t&&t.length?zr(t,vu(n)):e},jn.noConflict=function(){return ht._===this&&(ht._=je),this},jn.noop=sc,jn.now=Ci,jn.pad=function(e,t,n){e=mu(e);var r=(t=vu(t))?gn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Qo(At(o),n)+e+Qo(vt(o),n)},jn.padEnd=function(e,t,n){e=mu(e);var r=(t=vu(t))?gn(e):0;return t&&r<t?e+Qo(t-r,n):e},jn.padStart=function(e,t,n){e=mu(e);var r=(t=vu(t))?gn(e):0;return t&&r<t?Qo(t-r,n)+e:e},jn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),In(mu(e).replace(ie,""),t||0)},jn.random=function(t,n,r){if(r&&"boolean"!=typeof r&&Ma(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=hu(t),n===e?(n=t,t=0):n=hu(n)),t>n){var o=t;t=n,n=o}if(r||t%1||n%1){var a=wn();return yn(t+a*(n-t+ft("1e-"+((a+"").length-1))),n)}return Jr(t,n)},jn.reduce=function(e,t,n){var r=Zi(e)?Nt:Kt,o=arguments.length<3;return r(e,fa(t,4),n,o,gr)},jn.reduceRight=function(e,t,n){var r=Zi(e)?Ut:Kt,o=arguments.length<3;return r(e,fa(t,4),n,o,hr)},jn.repeat=function(t,n,r){return n=(r?Ma(t,n,r):n===e)?1:vu(n),Xr(mu(t),n)},jn.replace=function(){var e=arguments,t=mu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},jn.result=function(t,n,r){var o=-1,a=(n=Mo(n,t)).length;for(a||(a=1,t=e);++o<a;){var i=null==t?e:t[ka(n[o])];i===e&&(o=a,i=r),t=$i(i)?i.call(t):i}return t},jn.round=xc,jn.runInContext=I,jn.sample=function(e){return(Zi(e)?$n:$r)(e)},jn.size=function(e){if(null==e)return 0;if(qi(e))return lu(e)?gn(e):e.length;var t=Aa(e);return t==M||t==E?e.size:Ur(e).length},jn.snakeCase=Ku,jn.some=function(t,n,r){var o=Zi(t)?kt:io;return r&&Ma(t,n,r)&&(n=e),o(t,fa(n,3))},jn.sortedIndex=function(e,t){return uo(e,t)},jn.sortedIndexBy=function(e,t,n){return co(e,t,fa(n,2))},jn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=uo(e,t);if(r<n&&ji(e[r],t))return r}return-1},jn.sortedLastIndex=function(e,t){return uo(e,t,!0)},jn.sortedLastIndexBy=function(e,t,n){return co(e,t,fa(n,2),!0)},jn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=uo(e,t,!0)-1;if(ji(e[n],t))return n}return-1},jn.startCase=Ju,jn.startsWith=function(e,t,n){return e=mu(e),n=null==n?0:lr(vu(n),0,e.length),t=fo(t),e.slice(n,n+t.length)==t},jn.subtract=Sc,jn.sum=function(e){return e&&e.length?Jt(e,ac):0},jn.sumBy=function(e,t){return e&&e.length?Jt(e,fa(t,2)):0},jn.template=function(t,n,r){var o=jn.templateSettings;r&&Ma(t,n,r)&&(n=e),t=mu(t),n=Iu({},n,o,ta);var a,i,u=Iu({},n.imports,o.imports,ta),c=Fu(u),l=en(u,c),s=0,f=n.interpolate||Me,d="__p += '",p=Te((n.escape||Me).source+"|"+f.source+"|"+(f===ee?ge:Me).source+"|"+(n.evaluate||Me).source+"|$","g"),g="//# sourceURL="+(Ne.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ut+"]")+"\n";t.replace(p,(function(e,n,r,o,u,c){return r||(r=o),d+=t.slice(s,c).replace(Ie,un),n&&(a=!0,d+="' +\n__e("+n+") +\n'"),u&&(i=!0,d+="';\n"+u+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),s=c+e.length,e})),d+="';\n";var h=Ne.call(n,"variable")&&n.variable;if(h){if(de.test(h))throw new xe("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(i?d.replace(z,""):d).replace(Z,"$1").replace(Q,"$1;"),d="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=ec((function(){return Se(c,g+"return "+d).apply(e,l)}));if(v.source=d,Vi(v))throw v;return v},jn.times=function(e,t){if((e=vu(e))<1||e>f)return[];var n=p,r=yn(e,p);t=fa(t),e-=p;for(var o=Xt(r,t);++n<e;)t(n);return o},jn.toFinite=hu,jn.toInteger=vu,jn.toLength=Au,jn.toLower=function(e){return mu(e).toLowerCase()},jn.toNumber=_u,jn.toSafeInteger=function(e){return e?lr(vu(e),-9007199254740991,f):0===e?e:0},jn.toString=mu,jn.toUpper=function(e){return mu(e).toUpperCase()},jn.trim=function(t,n,r){if((t=mu(t))&&(r||n===e))return Vt(t);if(!t||!(n=fo(n)))return t;var o=hn(t),a=hn(n);return wo(o,nn(o,a),rn(o,a)+1).join("")},jn.trimEnd=function(t,n,r){if((t=mu(t))&&(r||n===e))return t.slice(0,vn(t)+1);if(!t||!(n=fo(n)))return t;var o=hn(t);return wo(o,0,rn(o,hn(n))+1).join("")},jn.trimStart=function(t,n,r){if((t=mu(t))&&(r||n===e))return t.replace(ie,"");if(!t||!(n=fo(n)))return t;var o=hn(t);return wo(o,nn(o,hn(n))).join("")},jn.truncate=function(t,n){var r=30,o="...";if(nu(n)){var a="separator"in n?n.separator:a;r="length"in n?vu(n.length):r,o="omission"in n?fo(n.omission):o}var i=(t=mu(t)).length;if(cn(t)){var u=hn(t);i=u.length}if(r>=i)return t;var c=r-gn(o);if(c<1)return o;var l=u?wo(u,0,c).join(""):t.slice(0,c);if(a===e)return l+o;if(u&&(c+=l.length-c),uu(a)){if(t.slice(c).search(a)){var s,f=l;for(a.global||(a=Te(a.source,mu(he.exec(a))+"g")),a.lastIndex=0;s=a.exec(f);)var d=s.index;l=l.slice(0,d===e?c:d)}}else if(t.indexOf(fo(a),c)!=c){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+o},jn.unescape=function(e){return(e=mu(e))&&J.test(e)?e.replace(q,An):e},jn.uniqueId=function(e){var t=++Ue;return mu(e)+t},jn.upperCase=Xu,jn.upperFirst=Vu,jn.each=mi,jn.eachRight=yi,jn.first=qa,lc(jn,(Pc={},Mr(jn,(function(e,t){Ne.call(jn.prototype,t)||(Pc[t]=e)})),Pc),{chain:!1}),jn.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){jn[e].placeholder=jn})),Tt(["drop","take"],(function(t,n){Zn.prototype[t]=function(r){r=r===e?1:mn(vu(r),0);var o=this.__filtered__&&!n?new Zn(this):this.clone();return o.__filtered__?o.__takeCount__=yn(r,o.__takeCount__):o.__views__.push({size:yn(r,p),type:t+(o.__dir__<0?"Right":"")}),o},Zn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Zn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:fa(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Tt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Zn.prototype[e]=function(){return this[n](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Zn.prototype[e]=function(){return this.__filtered__?new Zn(this):this[n](1)}})),Zn.prototype.compact=function(){return this.filter(ac)},Zn.prototype.find=function(e){return this.filter(e).head()},Zn.prototype.findLast=function(e){return this.reverse().find(e)},Zn.prototype.invokeMap=Vr((function(e,t){return"function"==typeof e?new Zn(this):this.map((function(n){return Gr(n,e,t)}))})),Zn.prototype.reject=function(e){return this.filter(Ni(fa(e)))},Zn.prototype.slice=function(t,n){t=vu(t);var r=this;return r.__filtered__&&(t>0||n<0)?new Zn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=vu(n))<0?r.dropRight(-n):r.take(n-t)),r)},Zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Zn.prototype.toArray=function(){return this.take(p)},Mr(Zn.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),a=jn[o?"take"+("last"==n?"Right":""):n],i=o||/^find/.test(n);a&&(jn.prototype[n]=function(){var n=this.__wrapped__,u=o?[1]:arguments,c=n instanceof Zn,l=u[0],s=c||Zi(n),f=function(e){var t=a.apply(jn,Bt([e],u));return o&&d?t[0]:t};s&&r&&"function"==typeof l&&1!=l.length&&(c=s=!1);var d=this.__chain__,p=!!this.__actions__.length,g=i&&!d,h=c&&!p;if(!i&&s){n=h?n:new Zn(this);var v=t.apply(n,u);return v.__actions__.push({func:hi,args:[f],thisArg:e}),new zn(v,d)}return g&&h?t.apply(this,u):(v=this.thru(f),g?o?v.value()[0]:v.value():v)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ge[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);jn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Zi(o)?o:[],e)}return this[n]((function(n){return t.apply(Zi(n)?n:[],e)}))}})),Mr(Zn.prototype,(function(e,t){var n=jn[t];if(n){var r=n.name+"";Ne.call(Fn,r)||(Fn[r]=[]),Fn[r].push({name:t,func:n})}})),Fn[Ho(e,2).name]=[{name:"wrapper",func:e}],Zn.prototype.clone=function(){var e=new Zn(this.__wrapped__);return e.__actions__=Go(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Go(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Go(this.__views__),e},Zn.prototype.reverse=function(){if(this.__filtered__){var e=new Zn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Zn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Zi(e),r=t<0,o=n?e.length:0,a=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var a=n[r],i=a.size;switch(a.type){case"drop":e+=i;break;case"dropRight":t-=i;break;case"take":t=yn(t,e+i);break;case"takeRight":e=mn(e,t-i)}}return{start:e,end:t}}(0,o,this.__views__),i=a.start,u=a.end,c=u-i,l=r?u:i-1,s=this.__iteratees__,f=s.length,d=0,p=yn(c,this.__takeCount__);if(!n||!r&&o==c&&p==c)return Ao(e,this.__actions__);var g=[];e:for(;c--&&d<p;){for(var h=-1,v=e[l+=t];++h<f;){var A=s[h],_=A.iteratee,P=A.type,m=_(v);if(2==P)v=m;else if(!m){if(1==P)continue e;break e}}g[d++]=v}return g},jn.prototype.at=vi,jn.prototype.chain=function(){return gi(this)},jn.prototype.commit=function(){return new zn(this.value(),this.__chain__)},jn.prototype.next=function(){this.__values__===e&&(this.__values__=gu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},jn.prototype.plant=function(t){for(var n,r=this;r instanceof Yn;){var o=Wa(r);o.__index__=0,o.__values__=e,n?a.__wrapped__=o:n=o;var a=o;r=r.__wrapped__}return a.__wrapped__=t,n},jn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Zn){var n=t;return this.__actions__.length&&(n=new Zn(this)),(n=n.reverse()).__actions__.push({func:hi,args:[ni],thisArg:e}),new zn(n,this.__chain__)}return this.thru(ni)},jn.prototype.toJSON=jn.prototype.valueOf=jn.prototype.value=function(){return Ao(this.__wrapped__,this.__actions__)},jn.prototype.first=jn.prototype.head,$e&&(jn.prototype[$e]=function(){return this}),jn}();At?((At.exports=_n)._=_n,vt._=_n):ht._=_n}.call(x),navigator.appVersion.indexOf("Mac");var E=l((function e(){var t=this;u(this,e),this.promise=new Promise((function(e,n){t.resolve=function(t){e(t)},t.reject=function(e){n(e)}}))}));function R(e,t){this.constructor===R&&function(e){throw new Error(e)}("Cannot initialize BaseException."),this.message=e,this.name=t}function G(e){return e.startsWith("#")?"hex":e.startsWith("rgb(")?"rgb":e.startsWith("hsl")?"hsl":"unknown"}function F(e){var t=G(e);if("hex"===t){var n=B(e),r=n.R,o=n.G,a=n.B;return{R:T(r/255),G:T(o/255),B:T(a/255)}}if("rgb"===t){var i=e.match(/(\d+),\s*(\d+),\s*(\d+)/);return{R:T(parseInt(i[1])/255),G:T(parseInt(i[2])/255),B:T(parseInt(i[3])/255)}}if("hsl"===t){var u=e.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);if(!u)return{error:"Invalid HSL format"};var c=parseInt(u[1]),l=parseInt(u[2])/100,s=parseInt(u[3])/100,f=N(c,l,s),d=f.R,p=f.G,g=f.B;return{R:T(d/255),G:T(p/255),B:T(g/255)}}console.error({message:"Invalid color value"})}function D(e){var t=G(e);if("hex"===t)return B(e);if("rgb"===t){var n=e.match(/(\d+),\s*(\d+),\s*(\d+)/);return n?{R:parseInt(n[1]),G:parseInt(n[2]),B:parseInt(n[3])}:{error:"Invalid RGB format"}}if("hsl"===t){var r=e.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);if(!r)return{error:"Invalid HSL format"};var o=parseInt(r[1]),a=parseInt(r[2])/100,i=parseInt(r[3])/100;return N(o,a,i)}console.error({message:"Invalid color value"})}function L(e,t,n){return function(e,t,n){var r=(1<<24|e<<16|t<<8|n).toString(16).slice(1).toUpperCase();return"#".concat(r)}(Math.round(255*e),Math.round(255*t),Math.round(255*n))}function B(e){var t=e.slice(1),n=parseInt(t,16);return{R:n>>16&255,G:n>>8&255,B:255&n}}R.prototype=new Error,R.constructor=R,"undefined"!=typeof document&&document.documentElement.style;var N=function(e,t,n){var r,o,a;if(e/=360,0===t)r=o=a=Math.round(255*n);else{var i=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},u=n<.5?n*(1+t):n+t-n*t,c=2*n-u;r=Math.round(255*i(c,u,e+1/3)),o=Math.round(255*i(c,u,e)),a=Math.round(255*i(c,u,e-1/3))}return{R:r,G:o,B:a}},U={0:"left",1:"center",2:"right"},k={LEFT:0,CENTER:1,CENTERED:1,RIGHT:2},O={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,RICHMEDIA:26,REDACT:27,INTERCHANGE:28,ARC:29},W={1:"text",2:"link",3:"freetext",4:"line",5:"square",6:"circle",7:"polygon",8:"polyline",9:"highlight",10:"underline",11:"squiggly",12:"strikeout",13:"stamp",14:"caret",15:"ink",16:"popup",17:"fileattachment",18:"sound",19:"movie",20:"widget",21:"screen",22:"printermark",23:"trapnet",24:"watermark",25:"threed",26:"richmedia",27:"redact",28:"interchange",29:"arc"},j={PUSHBUTTON:0,CHECKBOX:1,RADIOBUTTON:2,TEXTFIELD:3,COMBOBOX:4,LISTBOX:5,SIGNATUREFIELDS:6,UNKNOWN:255},H={0:"pushbutton",1:"checkbox",2:"radiobutton",3:"textfield",4:"combobox",5:"listbox",6:"signatureFields",255:"unknown"},Y=1,z=2,Z=32,Q={UNKNOWN:-1,NONE:0,OPENARROW:1,CLOSEDARROW:2,SQUARE:3,CIRCLE:4,DIAMOND:5,BUTT:6,ROPENARROW:7,RCLOSEDARROW:8,SLASH:9},q={"-1":"unknown",0:"none",1:"openarrow",2:"closedarrow",3:"square",4:"circle",5:"diamond",6:"butt",7:"ropenarrow",8:"rclosedarrow",9:"slash"};s(s(s(s(s({1:"none",0:"check"},"1","circle"),2,"cross"),3,"diamond"),4,"square"),5,"star");var K={0:"unknown",1:"standard",2:"image",3:"text",4:"digital"},J={0:"unknown",1:"goto",2:"gotor",3:"gotoe",4:"launch",5:"thread",6:"uri",7:"sound",8:"movie",9:"hide",10:"named",11:"submitform",12:"resetform",13:"importdata",14:"javascript",15:"setocgstate",16:"rendition",17:"trans",18:"goto3dview",19:"uop",255:"error"},X={solid:0,dashed:1,beveled:2,inset:3,underline:4},V={0:"solid",1:"dashed",2:"beveled",3:"inset",4:"underline"},$={0:"rect",1:"leftTriangle",2:"rightTriangle",3:"none"},ee=l((function e(){u(this,e)}));s(ee,"CSS",96),s(ee,"PDF",72),s(ee,"PDF_TO_CSS_UNITS",1);var te={MARKED:0,UNMARKED:1,ACCEPTED:2,REJECTED:3,CANCELLED:4,COMPLETED:5,NONE:6,ERROR:7},ne={0:"MARKED",1:"UNMARKED",2:"ACCEPTED",3:"REJECTED",4:"CANCELLED",5:"COMPLETED",6:"NONE",7:"ERROR"},re={DISTANCE:0,PERIMETER:1,AREA:2,ANGLE:3,COUNT:4,ARC:5},oe={0:"distance",1:"perimeter",2:"area",3:"angle",4:"count",5:"arc"},ae={AREA:1,LENGTH:2,RADIUS:4,DIAMETER:8,ANGLE:16,COUNT:32,ARCLENGTH:64,GENERIC:128},ie={1:"area",2:"length",4:"radius",8:"diameter",16:"angle",32:"count",64:"arclength",128:"generic"},ue={OPTIMIZE_FLAG_RMNOTUSE:1,OPTIMIZE_FLAG_RMEPTOBJ:2,OPTIMIZE_FLAG_RMSPEATTR:4,OPTIMIZE_FLAG_RMEMBFONT:8,OPTIMIZE_FLAG_RMINVALINK:16,OPTIMIZE_FLAG_RMINVABK:32,OPTIMIZE_FLAG_BCOMPRESSIMAGE:64,OPTIMIZE_FLAG_RMBK:128,OPTIMIZE_FLAG_RMANNOT:256,OPTIMIZE_FLAG_RMFORM:512,OPTIMIZE_FLAG_RMMULMEDIA:1024,OPTIMIZE_FLAG_RMDOCINFO:2048,OPTIMIZE_FLAG_RMMEDTADATA:4096,OPTIMIZE_FLAG_RMOBJDATA:8192,OPTIMIZE_FLAG_RMFILEATTACHMENT:16384,OPTIMIZE_FLAG_RMEXTERNCROSSREF:32768,OPTIMIZE_FLAG_RMOTHERAPPDATA:65536,OPTIMIZE_FLAG_RMHIDERLAYER:1<<17,OPTIMIZE_FLAG_MERGEVISIBLELAYER:1<<18,OPTIMIZE_FLAG_USEFLATE:1<<19,OPTIMIZE_FLAG_FLAT_REPLACELZW:1<<20,OPTIMIZE_FLAG_RMUNUSEDTARGET:1<<21,OPTIMIZE_FLAG_OPTIMIZEPAGECONTENT:1<<22,OPTIMIZE_FLAG_OPTIMIZEPDFFASTWEBVIEW:1<<23,OPTIMIZE_FLAG_RMFORMCOMMITIMPORTRESETACTION:1<<24,OPTIMIZE_FLAG_RMJSACTION:1<<25,OPTIMIZE_FLAG_RMPAGETHUMBNAIL:1<<26,OPTIMIZE_FLAG_RMREPLACEIMAGE:1<<27,OPTIMIZE_FLAG_RMLABEL:1<<28,OPTIMIZE_FLAG_RMPRINTSETTINGS:1<<29,OPTIMIZE_FLAG_RMSEARCHINDEX:1<<30},ce=function(){return l((function e(t,n,r,o){var a=this;u(this,e),this.sourceName=t,this.targetName=n,this.comObj=r,this._eventBus=o,this.callbackId=1,this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===a.sourceName)if(t.callback){var n=t.callbackId,o=a.callbackCapabilities[n];if(!o)throw new Error("Cannot resolve callback ".concat(n));if(delete a.callbackCapabilities[n],"resolve"!==t.callback)throw console.log({data:{action:t.data.action,data:t.data.data},message:t.reason&&t.reason.message}),o.reject(t.reason),a._eventBus&&a._eventBus.dispatch("message",{type:"ERROR",message:t.reason.message||t.reason}),new Error("Unexpected callback case");o.resolve(t.data)}else{var i=a.actionHandler[t.action];if(!i)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){var u=a.sourceName,c=t.sourceName;new Promise((function(e){e(i(t.data))})).then((function(e){r.postMessage({sourceName:u,targetName:c,callback:"resolve",callbackId:t.callbackId,data:e})}),(function(e){r.postMessage({data:t,sourceName:u,targetName:c,callback:"reject",callbackId:t.callbackId,reason:e})}))}else i(t.data)}},r.addEventListener("message",this._onComObjOnMessage)}),[{key:"on",value:function(e,t){var n=this.actionHandler;if(n[e])throw new Error('There is already an actionName called "'.concat(e,'"'));n[e]=t}},{key:"send",value:function(e,t){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t})}},{key:"sendWithPromise",value:function(e,t){var n=this.callbackId++,r=new E;this.callbackCapabilities[n]=r;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t})}catch(e){r.reject(e)}return r.promise}},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}])}();function le(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){var e=new Uint8Array(r.result);t(e)},r.onerror=function(){n(r.error)},r.readAsArrayBuffer(e)}))}function se(e){for(var t=e.split(";base64,")[1],n=atob(t),r=new Uint8Array(n.length),o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r}importScripts("./ComPDFKit.js");var ComPDFKitJS={opened_Font:[],opened_DefFont:[],ComPDFKitDownloadFont:function(e){if(ComPDFKitJS.opened_Font[e])return ComPDFKitJS.opened_Font[e];return!1},ComPDFKitDownloadFontA:function(e){if(ComPDFKitJS.opened_Font[e])return ComPDFKitJS.opened_Font[e];var t=fontsJson[e-1];if(!t)return!1;var fontFile=Ae(fe+t.filePath);return Pe.MessageHandler.send("LoadFont",{fontFamily:t.family}),ComPDFKitJS.opened_Font[e]=fontFile,fontFile},FontNameList:[],FontCount:1,opened_image:[],opened_files:[],opened_cert:[]},DataArray=[],FloatPointArray=[],BorderEffect={},LineType={},BorderStyle={},PageSize={},Rect={},RGBColor={},FontDa={},PDFDestination={},WidgetItem={},WidgetItemsArray={},TextFindItemArray=[],EditCharPlace={},EndEditCharPlace={},RectArray=[],CursorPoints={},EditTextStyle={},U8StringData="",PDFRange={},TextRectArray=[],ImageAreaInfo={},SignerArray=[],CertArray=[],AccessInfoArray=[],PolicyArray=[],CRLPointArray=[],OCSPUrlArray=[],DiffInfoArray=[],AnnotArray=[],fontsJson=null,fe="https://www.compdf.com/fonts/",LayerPrintData={},LayerZoomData={},SepColorsArray=[],SelectPointColorArray=[],MeasureVerticesArray=[],PermissionsInfo={},ImagePPI={},de=new Set,pe=null;function ge(e){var t=e.license,n=e.appId,r=e.version,o=stringToNewUTF8(t),a=stringToNewUTF8(""),i=stringToNewUTF8(n),u=stringToNewUTF8(r);Module._InitComPDFkit(o,!1,a,i,0,u)}function he(e){return ve.apply(this,arguments)}function ve(){return(ve=i(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,t)}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ae(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new XMLHttpRequest;n.open("GET",e,t),n.responseType="arraybuffer";var r=function(){return(200===n.status||206===n.status)&&new Uint8Array(n.response)};if(t)return new Promise((function(e,t){n.onload=function(){return e(r())},n.onerror=function(){return t(new Error("Network error"))},n.send()}));try{return n.send(),r()}catch(e){return!1}}function _e(e){var t=parseInt(e.slice(1),16),n=t>>8&255,r=255&t;return{R:T((t>>16&255)/255),G:T(n/255),B:T(r/255)}}var Pe=function(){function e(){u(this,e)}return l(e,null,[{key:"setUp",value:(r=i(n().mark((function t(){var r,o;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=new ce("worker","main",self),this.MessageHandler=r,o=!1,r.on("test",(function(e){o||(o=!0,r.send("test",e instanceof Uint8Array))})),r.send("ready",null),r.on("Ready",(function(t){return e.createDocumentHandler(self)}));case 6:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"createDocumentHandler",value:function(){var e=this.MessageHandler;e.on("InitConfig",(function(e){var t=e.license,n=e.appId,r=e.version;return ge(pe={license:t,appId:n,version:r}),We()})),e.on("LoadFile",function(){var e=i(n().mark((function e(t){var fontFile,r,o,a,i,u,c,l,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ComPDFKitJS.opened_files=[],ComPDFKitJS.opened_files[0]=t.buffer,t.pagesPtr&&t.pagesPtr.length>0&&t.pagesPtr.forEach((function(e){Module._ClearPage(e.pagePtr)})),t.doc&&Module._ClearDocument(t.doc),t.fileList&&(ComPDFKitJS.opened_Font[0]=t.fileList),"https://www.compdf.com/fonts/"!==t.webFontURL&&(fe=t.webFontURL),t.enableDefaultFont&&!ComPDFKitJS.opened_DefFont[0]&&(fontFile=Ae("./DroidSansFallbackFull.ttf"),ComPDFKitJS.opened_DefFont[0]=fontFile,ComPDFKitJS.opened_Font[0]=fontFile),!t.fontsJson||fontsJson){e.next=26;break}if(fontsJson=t.fontsJson,r=!!t.fileList){e.next=25;break}for(o=[],a=0;a<t.fontsJson.length;a++)o.push(Ae(fe+t.fontsJson[a].filePath,!0));if(!o.length){e.next=25;break}return i=null,e.prev=15,e.next=18,Promise.all(o);case 18:i=e.sent,e.next=24;break;case 21:e.prev=21,e.t0=e.catch(15),console.log(e.t0);case 24:if(i&&i.length)for(u=0;u<o.length;u++)c=ComPDFKitJS.opened_Font.length,i[u]&&(ComPDFKitJS.opened_Font[c]=i[u]);case 25:Module._InitComPDFkitFont(r);case 26:return ComPDFKitJS.opened_Font.length>0&&(l=!!t.fileList,ComPDFKitJS.FontCount=l?t.fontsJson.length+1:ComPDFKitJS.opened_Font.length,Module._InitComPDFkitFont(l)),s=Module._InitDocument(),e.abrupt("return",s);case 29:case"end":return e.stop()}}),e,null,[[15,21]])})));return function(t){return e.apply(this,arguments)}}()),e.on("GetWebFontNameList",(function(){var e=ComPDFKitJS.FontNameList;return e.length?e:null})),e.on("LoadDocumentByStream",ye),e.on("GetPageCount",(function(e){var t=e.doc;return Module._GetPageCount(t)})),e.on("GetPageSize",(function(e){var t=e.doc,n=e.pageIndex;PageSize.Width=0,PageSize.Height=0,Module._GetPageSizeForIndex(t,n);var r=Module._GetPage(t,n),o=Module._GetPageRotation(r);return{pagePtr:r,width:PageSize.Width,height:PageSize.Height,rotation:90*o}})),e.on("InitAnnot",(function(e){for(var t=e.doc,n=e.pagesPtr,r=Fe({doc:t}),o=r.signatures,a=r.signaturePtrList,i=[],u=0;u<n.length;u++)for(var c=n[u].pagePtr,l=Module._GetAnnotCount(c),s=0;s<l;s++){var f=Module._InitAnnot(c,s);if(f)if(!Module._IsReplyAnnot(f)){var d=Module._GetAnnotType(f),p=W[d],g=null;(g="widget"===p?Ce({doc:t,pagePtr:c,annotPtr:f,signatures:o,pageIndex:u}):be({doc:t,pagePtr:c,annotPtr:f,type:p,pageIndex:u}))&&i.push(g)}}return{annotations:i,signatures:o,signaturePtrList:a}})),e.on("GetAnnotation",(function(e){return be({doc:e.doc,pagePtr:e.pagePtr,annotPtr:e.annotPtr,typeInt:e.typeInt,scale:e.scale})})),e.on("GetPermissionsInfo",(function(e){PermissionsInfo={};var t=e.doc;return Module._GetPermissionsInfo(t),PermissionsInfo})),e.on("CheckOwnerPassword",(function(e){var t=e.doc,n=e.pwd,r=stringToNewUTF8(n);return!!Module._CheckOwnerPassword(t,r)})),e.on("GetDynamicStampPreview",(function(e){var t=e.contents,n=e.time,r=e.stampShape,o=e.stampColor,a=Module._InitDocument();Module._CreateDocument(a),Module._InsertPage(a,0,595,842);var i=Module._GetPage(a,0),u=Module._CreateAnnot(a,i,13),c=stringToNewUTF8(t),l=stringToNewUTF8(n);Module._SetTextStamp(u,c,l,r,o,0),Module._UpdateAnnotAp(u,0),Rect={},Module._GetAnnotRect(i,u);for(var s=Rect,f=s.Left,d=s.Top,p=s.Right,g=s.Bottom,h=Math.ceil(p-f),v=Math.ceil(g-d),A=h*v,_=4*A,P=_malloc(_),m=0;m<A;m++)Module.HEAP32[P/4+m]=0;Module._RenderAnnot(u,h,v,P,0);var y=new Uint8Array(_);for(m=0;m<_;m+=4)y[m]=Module.HEAPU8[P+m+2],y[m+1]=Module.HEAPU8[P+m+1],y[m+2]=Module.HEAPU8[P+m],y[m+3]=Module.HEAPU8[P+m+3];return _free(P),{width:h,height:v,imageArray:y}})),e.on("GetRenderAnnot",(function(e){for(var t=e.pagePtr,n=e.annotPtr,r=e.width,o=e.height,a=r*o,i=_malloc(4*a),u=0;u<a;u++)Module.HEAP32[i/4+u]=0;var c=function(e,t,n,r,o){var a,i;1===o||3===o?(a=r,i=n):(a=n,i=r);Module._RenderAnnot(e,a,i,t,0);for(var u=new Uint8Array(a*i*4),c=0;c<i;c++)for(var l=0;l<a;l++){var s=4*(c*a+l),f=void 0,d=void 0;switch(o){case 1:f=i-1-c,d=l;break;case 2:f=a-1-l,d=i-1-c;break;case 3:f=c,d=a-1-l;break;default:f=l,d=c}var p=4*(d*n+f);u[p]=Module.HEAPU8[t+s+2],u[p+1]=Module.HEAPU8[t+s+1],u[p+2]=Module.HEAPU8[t+s],u[p+3]=Module.HEAPU8[t+s+3]}return{imageArray:u,width:a,height:i}}(n,i,r,o,Module._GetPageRotation(t)),l=c.imageArray;return _free(i),l})),e.on("GetWidgetAnnotation",(function(e){return Ce({doc:e.doc,pagePtr:e.pagePtr,annotPtr:e.annotPtr,typeInt:e.typeInt,signaturePtrList:e.signaturePtrList})})),e.on("GetSignatures",(function(e){return Fe(e)})),e.on("GetCurrentID2",(function(e){var t=e.doc;U8StringData="",Module._GetCurrentID2(t);var n=U8StringData;return"<>"===n&&(U8StringData="",Module._GetTrailerID2(t),n=U8StringData),n.startsWith("<")&&(n=n.substring(1)),n.endsWith(">")&&(n=n.substring(0,n.length-1)),n})),e.on("SetTrailerID2",(function(e){var t=e.doc,n=e.id,r=stringToNewUTF8(n);return Module._SetTrailerID2(t,r)})),e.on("UpdateDigitalSignAp",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v,A,_,P;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for("data:image/png;base64,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",r=se("data:image/png;base64,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"),ComPDFKitJS.opened_image=[],ComPDFKitJS.opened_image[0]=r,t.imageBase64&&"image"===t.appearance?pn(t):hn(t),o=t.pkcs12Buffer,a=t.password,i=t.annotPtr,u=t.doc,ComPDFKitJS.opened_cert[0]=o,c=stringToNewUTF8(a),l=Module._GetPKCS12Cert(c,0,o.length),(DataArray=[]).push(ComPDFKitJS.opened_files[0]),s=Module._InitSignature2(i),Module._AddSignSaveDocument(u,s,l),f=[],d=0;d<DataArray.length;d++)p=new Uint8Array(DataArray[d]),f.push(p);return g=new Blob(f,{type:"application/pdf"}),e.next=18,le(g);case 18:for(h=e.sent,v=ComPDFKitJS.opened_files.length,ComPDFKitJS.opened_files[v]=h,DataArray=[],Module._AddSignModifyDocument(s,l,v,h.length),f=[],A=0;A<DataArray.length;A++)_=new Uint8Array(DataArray[A]),f.push(_);return ComPDFKitJS.opened_files[0]=f,ComPDFKitJS.opened_files.splice(v,1),P=new Blob(f,{type:"application/pdf"}),e.abrupt("return",P);case 29:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("CreateSignatureAP",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=t.rect,o=Module._InitDocument(),Module._CreateDocument(o),Module._InsertPage(o,0,595,842),Module._GetPageCount(o),a=Module._GetPage(o,0),He({annotPtr:i=Module._CreateWidget(o,a,6),date:new Date}),Ye({pagePtr:a,annotPtr:i,rect:r}),Module._UpdateFormAp(i),t.annotPtr=i,hn(t),u=r.width,c=r.height,s=4*(l=u*c),f=_malloc(s),d=0;d<l;d++)Module.HEAP32[f/4+d]=0;for(Module._RenderAnnot(i,u,c,f,0),p=new Uint8Array(s),d=0;d<s;d+=4)p[d]=Module.HEAPU8[f+d+2],p[d+1]=Module.HEAPU8[f+d+1],p[d+2]=Module.HEAPU8[f+d],p[d+3]=Module.HEAPU8[f+d+3];return _free(f),e.abrupt("return",p);case 22:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("UpdateSignatureAP",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.doc,o=t.annotPtr,a=t.rect,i=t.pagePtr,u=t.imageBase64,c=t.imageArray,Ye({pagePtr:i,annotPtr:o,rect:a}),l=c||u&&se(u),ComPDFKitJS.opened_image=[],ComPDFKitJS.opened_image[0]=l,Module._RemoveAP(o),Module._SetImageStampByStream(o,0,l.length,0),Module._SetStampSignature(o,!0),Module._WidgetRemoveFromFields(r,o);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("TestAddSignature",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.doc,e.next=3,le(t.certFile);case 3:for(o=e.sent,ComPDFKitJS.opened_cert[0]=o,a=stringToNewUTF8("ComPDF"),i=Module._GetX509ByPKCS12Cert(0,o.length,a),u=Module._InitSignature2(annotPtr),DataArray=[],c=!!fontsJson||!!ComPDFKitJS.opened_DefFont[0],Module._SaveDocumentByStream(r,2,c),Module._AddSignSaveDocument(r,u,i),l=[],s=0;s<DataArray.length;s++)f=new Uint8Array(DataArray[s]),l.push(f);return d=new Blob(l,{type:"application/pdf"}),e.next=17,le(d);case 17:p=e.sent,g=ComPDFKitJS.opened_files.length,ComPDFKitJS.opened_files[g]=p,h=Module._InitDocument(),v=stringToNewUTF8(""),Module._LoadDocumentByStream(h,g,p.length,v);case 23:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("LoadCertificates",function(){var e=i(n().mark((function e(t){var r,o,a,i,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.pkcs12Buffer,o=t.password,ComPDFKitJS.opened_cert[0]=r,a=stringToNewUTF8(o),0!==(i=Module._GetX509ByPKCS12Cert(0,r.length,a))){e.next=6;break}return e.abrupt("return",!1);case 6:return e.next=8,dn(i);case 8:return u=e.sent,e.abrupt("return",u);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("BringForward",(function(e){var t=e.editAreaPtr;return Module._MoveEditAreaForward(t,!0)})),e.on("BringBackward",(function(e){var t=e.editAreaPtr;return Module._MoveEditAreaBackward(t,!0)})),e.on("BringToFront",(function(e){var t=e.editAreaPtr;return Module._MoveEditAreaToTop(t,!0)})),e.on("BringToBack",(function(e){var t=e.editAreaPtr;return Module._MoveEditAreaToBottom(t,!0)})),e.on("GetEditAreaLevel",(function(e){var t=e.editAreaPtr;return Module._GetEditAreaLevel(t)})),e.on("AddSignature",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v,A,_,P;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.doc,o=t.pagePtr.pagePtr,e.next=4,le(t.certFile);case 4:for(a=e.sent,ComPDFKitJS.opened_cert[0]=a,i=stringToNewUTF8("ComPDF"),u=Module._GetPKCS12Cert(i,0,a.length),c={left:50,top:442,right:100,bottom:642},(DataArray=[]).push(ComPDFKitJS.opened_files[0]),He({annotPtr:l=Module._CreateWidget(r,o,6),date:new Date}),ft({annotPtr:l,fieldName:"signatureField1"}),Ye({pagePtr:o,annotPtr:l,rect:c}),s=Module._InitSignature2(l),Module._AddSignSaveDocument(r,s,u),f=[],d=0;d<DataArray.length;d++)p=new Uint8Array(DataArray[d]),f.push(p);return g=new Blob(f,{type:"application/pdf"}),e.next=22,le(g);case 22:for(h=e.sent,v=ComPDFKitJS.opened_files.length,ComPDFKitJS.opened_files[v]=h,DataArray=[],Module._AddSignModifyDocument(s,u,1,ComPDFKitJS.opened_files[1].length),f=[],A=0;A<DataArray.length;A++)_=new Uint8Array(DataArray[A]),f.push(_);return P=new Blob(f,{type:"application/pdf"}),e.abrupt("return",P);case 31:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("PushRenderTask",(function(e){return Ie(e)})),e.on("RenderContentEdit",(function(e){return we(e)})),e.on("RenderContentEditAndEndEdit",(function(e){return function(e){var n=e.editPagePtr,r=we(e);return r.code?r:(Module._EndEdit(n),de.delete(n),t(t({},r),$t(n)))}(e)})),e.on("RenderPageBitmap",(function(e){var t=function(e){for(var t=e.pagePtr,n=e.x,r=e.y,o=e.width,a=e.height,i=e.mode,u=e.flag,c=e.form,l=parseInt(o)*parseInt(a),s=4*l,f=_malloc(s),d=0;d<l;d++)Module.HEAP32[f/4+d]=0;Module._RenderPageBitmap(t,n,r,o,a,i,f,u,c);var p=We("PDF VIEWER RENDER");if(p.code)return _free(f),p;var g=new Uint8Array(s);for(d=0;d<s;d+=4)g[d]=Module.HEAPU8[f+d+2],g[d+1]=Module.HEAPU8[f+d+1],g[d+2]=Module.HEAPU8[f+d],g[d+3]=Module.HEAPU8[f+d+3];return _free(f),{imageArray:g}}({pagePtr:e.pagePtr,x:e.x,y:e.y,width:e.width,height:e.height,mode:-1,flag:1,form:1});return t})),e.on("EditAnnotation",(function(e){var t=e.annotation;(t.rect&&Ye(t),t.color&&(t.type&&"freetext"===t.type&&_t(t),t.type&&["highlight","underline","squiggly","strikeout"].includes(t.type)&&qe({annotPtr:t.annotPtr,borderColor:t.color})),"customData"in t&&Ve(t),"name"in t)&&("string"==typeof t.name&&Module._SetAnnotDictName(t.annotPtr,stringToNewUTF8("NM"),stringToNewUTF8(t.name)));if(isFinite(t.opacity)&&$e(t),"contents"in t&&"mod-form"===t.operate){var n=vt(t);if(n)return n}if("state"in t){var r=te[t.state.toUpperCase()];Module._SetState(t.annotPtr,r)}if("contents"in t&&"mod-annot"===t.operate&&(t.type&&"freetext"===t.type?_t(t):Qe(t)),"fillColor"in t&&"mod-annot"===t.operate&&(t.type&&"freetext"===t.type?Je(t):Xe({annotPtr:t.annotPtr,fillColor:t.fillColor})),"borderWidth"in t&&et({annotPtr:t.annotPtr,borderWidth:t.borderWidth}),t.borderColor&&"mod-annot"===t.operate&&(t.type&&"freetext"===t.type?Ke(t):qe({annotPtr:t.annotPtr,borderColor:t.borderColor})),t.borderColor&&"mod-form"===t.operate&&function(e){var t=e.annotPtr,n=e.borderColor,r=F(n);Module._SetWidgetBorderRGBColor(t,r.R,r.G,r.B)}(t),"arcPoints"in t&&mn({pagePtr:t.pagePtr,annotPtr:t.annotPtr,vertices:t.arcPoints}),t.indicatorText&&Module._SetAnnotDictName(t.annotPtr,stringToNewUTF8("trn-form-field-indicator-text"),stringToNewUTF8(t.indicatorText)),"indicator"in t&&Module._SetAnnotDictName(t.annotPtr,stringToNewUTF8("trn-form-field-indicator"),stringToNewUTF8(t.indicator.toString())),t.linePoints&&rt(t),t.inkPointes&&ot(t),t.destPage&&"mod-annot"===t.operate&&at(t),t.destPage&&"mod-form"===t.operate&>(t),t.url&&"mod-annot"===t.operate&&it(t),t.url&&"mod-form"===t.operate&&ht(t),(t.isHidden||0===t.isHidden)&&function(e){var t=e.annotPtr,n=e.isHidden,r=0;r=1==n?32:4;var o=Module._SetAnnotFlag(t,r)}(t),"required"in t&&function(e){var t=e.annotPtr,n=e.required;Module._SetRequiredFlag(t,n)}(t),"isChecked"in t)if("checkbox"===t.type){var o=ut(t);if(o)return o}else if("radiobutton"===t.type){var a=ct(t);if(a)return a}if("checkStyle"in t&<(t),t.fillColor&&"mod-form"===t.operate&&st(t),t.title&&"mod-form"===t.operate){var i=t.annotPtr,u=t.title,c=stringToNewUTF8(u);Module._SetButtonTitle(i,c)}if(t.fieldName&&ft(t),t.fontName&&"freetext"!==t.type&&dt({annotPtr:t.annotPtr,fontName:t.fontName,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,color:t.color}),t.item&&At(t),t.items){t.clearOption&&function(e){for(var t=Module._GetItemsCount(e)-1;t>=0;t--)Module._RemoveOptionItem(e,t)}(t.annotPtr);for(var l=t.items,s=0;s<l.length;s++)At({annotPtr:t.annotPtr,item:{string:l[s].String,value:l[s].Value,index:s}})}if(t.moveOption&&function(e){var t=e.annotPtr,n=e.moveOption,r=n.fromIndex,o=n.toIndex,a=n.item;(function(e){var t=e.annotPtr,n=e.index;Module._RemoveOptionItem(t,n)})({annotPtr:t,index:r}),At({annotPtr:t,item:{string:a.String,value:a.Value,index:o}})}(t),t.hasOwnProperty("deleteItemIndex")&&function(e){var t=e.annotPtr,n=e.deleteItemIndex;if(Module._RemoveOptionItem(t,n),0===Module._GetItemsCount(t))return;pt({annotPtr:t,selected:0})}(t),t.textAlignment&&"mod-form"===t.operate){var f=t.annotPtr,d=t.textAlignment,p=k[d.toUpperCase()];Module._SetWidgetTextJustification(f,p)}if("selected"in t){var g=pt(t);if(g)return g}if(t.hasOwnProperty("isMultiLine")){var h=t.annotPtr,v=t.isMultiLine;Module._SetMultiLine(h,v)}t.author&&ze(t),t.fillTransparency&&tt(t),t.quadPoints&&nt(t),(t.borderStyle||t.dashes)&&("mod-annot"===t.operate?In(t):function(e){var t=e.annotPtr,n=e.borderStyle,r=X[n];Module._SetWidgetBorderStyle(t,r)}(t)),t.vertices&&mn(t),null==t.head&&null==t.tail||Module._SetLineType(t.annotPtr,Q[t.head.toUpperCase()],Q[t.tail.toUpperCase()]),t.floatPoint&&yn(t),t.rectDiff&&Mn(t);var A=Module._GetPageRotation(t.pagePtr);"mod-annot"===t.operate?Module._UpdateAnnotAp(t.annotPtr,A):"mod-form"===t.operate&&"signatureFields"!==t.type&&Module._UpdateFormAp(t.annotPtr,A)})),e.on("FlattenPage",(function(e){var t=function(e){return je.apply(this,arguments)}({doc:e.doc,saveType:e.saveType,password:e.password,oldPassword:e.oldPassword});return t}));var r=["textfield","checkbox","radiobutton","listbox","combobox","pushbutton","signatureFields"];e.on("CreateAnnotation",(function(e){var t=e.doc,n=e.pagePtr,o=e.annotation;return o.name=o.name||M(),"add-form"===o.operate||o.type&&r.includes(o.type)?function(e,t,n){var r=n.type,o=n.date,a=n.fieldName,i=n.fillColor,u=n.checkStyle,c=n.rect,l=j[r.toUpperCase()],s=Module._CreateWidget(e,t,l),f=We("PDF FORM");if(f.code)return f;n.annotPtr=s,"customData"in n&&Ve(n);n.name&&Module._SetAnnotDictName(s,stringToNewUTF8("NM"),stringToNewUTF8(n.name));"author"in n&&ze({annotPtr:s,author:n.author});o&&He({annotPtr:s,date:o});i&&st({annotPtr:s,fillColor:i});u&<({annotPtr:s,checkStyle:u});a&&ft({annotPtr:s,fieldName:a});var d=n.borderColor,p=n.borderWidth,g=n.borderStyle,h=n.isChecked,v=n.color,A=n.fontName,_=n.fontSize;(d||g||"borderWidth"in n)&&function(e){var t=e.annotPtr,n=e.borderColor,r=e.borderWidth,o=e.borderStyle;if(n){var a=F(n);Module._SetWidgetBorderRGBColor(t,a.R,a.G,a.B)}if(o){var i=X[o];Module._SetWidgetBorderStyle(t,i)}(0===r||r)&&et({annotPtr:t,borderWidth:r})}({annotPtr:s,borderColor:d,borderWidth:p,borderStyle:g});switch(r){case"checkbox":(h||0===h)&&ut({annotPtr:s,isChecked:h});break;case"radiobutton":(h||0===h)&&ct({annotPtr:s,isChecked:h});break;case"listbox":case"combobox":for(var P=n.items,m=n.selected,y=0;y<P.length;y++)At({annotPtr:s,item:{string:P[y].String,value:P[y].Value,index:y}});dt({annotPtr:s,fontName:A,fontSize:_,color:v}),(m||0===m)&&pt({annotPtr:s,selected:m});break;case"pushbutton":dt({annotPtr:s,fontName:A,fontSize:_,color:v});var M=n.title,I=stringToNewUTF8(M);Module._SetButtonTitle(s,I),n.destPage&>(n),n.url&&ht(n);break;case"textfield":var w=n.isMultiLine,x=n.textAlignment,S=k[x.toUpperCase()];Module._SetMultiLine(s,w),Module._SetWidgetTextJustification(s,S),Module._SetTextFieldSpe(s,0),"contents"in n&&vt({annotPtr:s,contents:n.contents}),dt({annotPtr:s,fontName:A,fontSize:_,color:v})}if(Ye({pagePtr:t,annotPtr:s,rect:c}),Module._UpdateFormAp(s),"signatureFields"===r){var b=n.imageBase64;if(b){var C=se(b);ComPDFKitJS.opened_image=[],ComPDFKitJS.opened_image[0]=C,Module._RemoveAP(s),Module._SetImageStampByStream(s,0,C.length,0),Module._SignWithName(s)}}return{annotPtr:s}}(t,n,o):function(e,t,n){var r=n.type,o=O[r.toUpperCase()],a=Module._CreateAnnot(e,t,o),i=We("PDF Annotation");if(i.code)return i;n.annotPtr=a;var u=n.color,c=n.fontName,l=n.fontWeight,s=n.fontStyle,f=n.borderColor,d=n.borderWidth,p=n.contents,g=n.date,h=n.opacity,v=n.fillTransparency,A=n.rect,_=n.author,P=n.fillColor,m=n.quadPoints,y=n.vertices,M=n.borderStyle,I=n.dashes;u&&c&&l&&s&&dt(n);n.name&&Module._SetAnnotDictName(a,stringToNewUTF8("NM"),stringToNewUTF8(n.name));"customData"in n&&Ve(n);f&&"freetext"!==r&&qe({annotPtr:a,borderColor:f});P&&"freetext"!==r&&Xe({annotPtr:a,fillColor:P});p&&"freetext"!==r&&Qe({annotPtr:a,contents:p});He({annotPtr:a,date:g}),isFinite(h)&&$e({annotPtr:a,opacity:h});"fillTransparency"in n?tt({annotPtr:a,fillTransparency:v}):P&&tt({annotPtr:a,fillTransparency:1});A&&Ye({pagePtr:t,annotPtr:a,rect:A});_&&ze({annotPtr:a,author:_});m&&nt({pagePtr:t,annotPtr:a,quadPoints:m});"borderWidth"in n&&et({annotPtr:a,borderWidth:d});(M||I)&&In({annotPtr:a,borderWidth:d,borderStyle:M,dashes:I,intensity:n.intensity});switch(o){case O.TEXT:n.color&&qe({annotPtr:n.annotPtr,borderColor:n.color}),Module._SetAnnotDictName(n.annotPtr,stringToNewUTF8("Name"),stringToNewUTF8("Comment"));break;case O.LINK:n.destPage&&at(n),n.url&&it(n);break;case O.FREETEXT:var w=n.intent,x=void 0===w?"FreText":w,S=n.color,b=void 0===S?"rgb(0, 0, 0":S,C=n.fontSize,T=void 0===C?16:C,E=n.fontName,R=void 0===E?"Helvetica":E,G=n.fontStyle,D=void 0===G?"normal":G,L=n.fontWeight,B=void 0===L?"normal":L,N=n.textAlignment,U=void 0===N?"left":N;n.borderWidth;var W=n.borderColor,j=void 0===W?"rgb(0, 0, 0)":W,H=n.fillColor,Y=void 0===H?"":H,z=n.contents;!function(e){var t=e.annotPtr,n=e.intent,r=e.fontName,o=e.fontWeight,a=e.fontStyle,i=e.fontSize,u=e.color,c=e.textAlignment,l=e.contents,s=Re({fontName:r,fontWeight:o,fontStyle:a}),f=k[c.toUpperCase()],d=stringToNewUTF8(s),p=stringToNewUTF8(l),g=F(u);Module._SetFreeText(t,d,i,g.R,g.G,g.B,f,p);var h=0;"FreeTextCallout"===n&&(h=1,Module._SetFreetextLineEnding(t,1));Module._SetFreeTextType(t,h),Qe(e)}({annotPtr:a,color:b,fontName:R,fontSize:T,fontStyle:D,fontWeight:B,textAlignment:U,contents:void 0===z?"":z,intent:x}),"fillColor"in n&&Je({annotPtr:a,fillColor:Y}),"borderColor"in n&&Ke({annotPtr:a,borderColor:j}),"floatPoint"in n&&yn({doc:e,annotPtr:a,pageIndex:n.pageIndex,floatPoint:n.floatPoint}),"rectDiff"in n&&Mn({doc:e,annotPtr:a,pageIndex:n.pageIndex,rectDiff:n.rectDiff});break;case O.POLYLINE:case O.POLYGON:y&&mn({pagePtr:t,annotPtr:a,vertices:y});break;case O.LINE:var Z=n.head,q=n.tail,K=n.linePoints;null==Z&&null==q||Module._SetLineType(a,Q[Z.toUpperCase()],Q[q.toUpperCase()]),rt({pagePtr:t,annotPtr:a,linePoints:K});break;case O.SQUARE:case O.CIRCLE:!function(e){var t=e.annotPtr,n=e.borderWidth;et({annotPtr:t,borderWidth:n})}({annotPtr:a,borderWidth:d});break;case O.HIGHLIGHT:case O.UNDERLINE:case O.SQUIGGLY:case O.STRIKEOUT:var J=n.quadPoints;!function(e){var t=e.pagePtr,n=e.annotPtr,r=e.color,o=e.quadPoints;qe({annotPtr:n,borderColor:r}),nt({pagePtr:t,annotPtr:n,quadPoints:o})}({pagePtr:t,annotPtr:a,color:n.color,quadPoints:J});break;case O.STAMP:var X=n.stampType,V=Module._GetPageRotation(t);if("standard"===X){var $=function(e,t){var n=e.annotPtr,r=e.contents,o=stringToNewUTF8(r.replace(/ /g,""));Module._SetStandardStamp(n,o,t);var a=We("PDF Annotation STAMPS");if(a.code)return a}({annotPtr:a,contents:p},V);if($)return $}else if("text"===X){n.annotPtr=a;var ee=function(e,t){var n=e.annotPtr,r=e.contents,o=e.time,a=e.stampShape,i=e.stampColor,u=stringToNewUTF8(r),c=stringToNewUTF8(o);Module._SetTextStamp(n,u,c,a,i,t);var l=We("PDF Annotation STAMPS");if(l.code)return l}(n,V);if(ee)return ee}else if("image"===X){n.annotPtr=a,n.doc=e;var te=function(e,t){var n=e.annotPtr,r=e.imageBase64;e.stampShape,e.rect,e.doc;var o=se(r);Qe({annotPtr:n,contents:"image"}),ComPDFKitJS.opened_image=[],ComPDFKitJS.opened_image[0]=o,Module._SetImageStampByStream(n,0,o.length,t);var a=We("PDF Annotation STAMPS");if(a.code)return a}(n,V);if(te)return te}break;case O.INK:var ne=n.inkPointes,re=n.borderColor;re&&qe({annotPtr:a,borderColor:re}),ot({pagePtr:t,annotPtr:a,inkPointes:ne});break;case O.ARC:mn({pagePtr:t,annotPtr:a,vertices:n.arcPoints})}A&&Ye({pagePtr:t,annotPtr:a,rect:A});var oe=Module._GetPageRotation(t);return Module._UpdateAnnotAp(n.annotPtr,oe),{annotPtr:a}}(t,n,o)})),e.on("GetAnnotRect",(function(e){var t=e.pagePtr,n=e.annotPtr;return Rect={},Module._GetAnnotRect(t,n),{left:Rect.Left,top:Rect.Top,right:Rect.Right,bottom:Rect.Bottom}})),e.on("SetAnnotRect",(function(e){var t=e.pagePtr,n=e.annotPtr,r=e.rect;Module._SetAnnotRect(t,n,r.left,r.right,r.bottom,r.top)})),e.on("RemoveAnnot",(function(e){var t=e.annotPtr;Module._RemoveAnnot(t);var n=We("PDF Annotation");if(n.code)return n})),e.on("RemoveFromPageIncludeReplyAnnot",(function(e){var t=e.pagePtr,n=e.annotPtr;Module._RemoveFromPageIncludeReplyAnnot(t,n);var r=We("PDF Annotation");if(r.code)return r})),e.on("GetCharIndexAtPos",(function(e){var t=e.pagePtr,n=e.textPtr,r=e.point,o=r.x,a=r.y;return-1!==Module._GetCharIndexAtPos(t,n,o,a,5,5)})),e.on("GetCharsRangeAtPos",(function(e){var t=e.pagePtr,n=e.start,r=e.end,o=e.textPtr;return o||(o=Module._InitText(t)),PDFRange={},Module._GetCharsRangeAtPos(t,o,n.x,n.y,r.x,r.y,5,5),U8StringData="",Module._GetTextContent(o,PDFRange.Location,PDFRange.Length),TextRectArray=[],Module._GetRects(t,o,PDFRange.Location,PDFRange.Length),{textContent:U8StringData,textRects:TextRectArray}})),e.on("GetSelectionForWordAtPos",(function(e){var t=e.pagePtr,n=e.textPtr,r=e.start;return e.end,Rect={},PDFRange={},U8StringData="",Module._GetSelectionForWordAtPos(t,n,r.x,r.y,5,5),TextRectArray=[],Module._GetRects(t,n,PDFRange.Location,PDFRange.Length),{textContent:U8StringData,textRects:TextRectArray}})),e.on("SelectWordAtPos",(function(e){return kt(e)})),e.on("XFDFExportAnnotations",(function(e){var t=function(e){XFDFData={},Module._XFDFExportAnnotations(e);var t=We("PDF Annotation XFDF");if(t.code)return t;return XFDFData}(e.doc);return t})),e.on("XFDFImportAnnotations",(function(e){var t=e.doc,n=e.xfdfBuffer,r=_malloc(n.length);Module.HEAPU8.set(n,r),Module._XFDFImportAnnotaitons(t,r,n.length),_free(r);var o=We("PDF Annotation XFDF");if(o.code)return o})),e.on("XFDFExportFormAnnotations",(function(e){var t=function(e){XFDFData={},Module._ExportCustomWidgets(e);var t=We("PDF XFDF");if(t.code)return t;return XFDFData.Content}(e.doc);return t})),e.on("SaveDocumentByStream",(function(e){return Ue(e)})),e.on("ExportPDF",(function(e){return function(e){return Oe.apply(this,arguments)}(e)})),e.on("SetPassword",(function(e){var t=e.doc,n=e.password,r=stringToNewUTF8(n);Module._SetPassword(t,r,"","","","","","")})),e.on("CompareDocument",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v,A,_,P,m,y,M,I,w,x,S,b,C,T,E,R,G,F,D,L,B,N,U,k,O,W,j,H,Y,z,Z,Q,q,K,J;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.data,o=r.leftFile,a=r.rightFile,i=r.leftFilePassword,u=void 0===i?"":i,c=r.rightFilePassword,l=void 0===c?"":c,e.next=4,le(o);case 4:return s=e.sent,f=Module._InitDocument(),ComPDFKitJS.opened_files[1]=s,d=stringToNewUTF8(u),Module._LoadDocumentByStream(f,1,s.length,d),p=Module._GetPageCount(f),e.next=12,le(a);case 12:if(g=e.sent,h=Module._InitDocument(),ComPDFKitJS.opened_files[2]=g,v=stringToNewUTF8(l),Module._LoadDocumentByStream(h,2,g.length,v),A=Module._GetPageCount(h),_=Math.min(p,A),1!==r.type){e.next=58;break}P=r.replaceColor,m=r.insertColor,y=r.deleteColor,M=r.textCompare,I=r.imgCompare,w=Module._InitCompare(f,h),x=0,M&&I?x=2:I&&(x=1),S=_e(P),b=_e(m),C=_e(y),Module._SetReplaceResColor(w,255*S.R,255*S.G,255*S.B),Module._SetInsertResColor(w,255*b.R,255*b.G,255*b.B),Module._SetDeleteResColor(w,255*C.R,255*C.G,255*C.B),Module._SetReplaceResTransparency(w,127.5),Module._SetInsertResTransparency(w,127.5),Module._SetDeleteResTransparency(w,127.5),T=0;case 34:if(!(T<_)){e.next=47;break}if(E=Module._DoCompare(w,T,T,x,1),!(R=We("PDF COMPARE"))||!R.code){e.next=39;break}return e.abrupt("return",R);case 39:Module._GetCompareResultsCount(E,1),CompareResultArray=[],Module._GetCompareResults(f,h,E,1),ResultsCountParams={},Module._GetResultsCountParams(E);case 44:T++,e.next=34;break;case 47:for(DataArray=[],Module._GenerateNewDoc(w),G=[],F=0;F<DataArray.length;F++)D=new Uint8Array(DataArray[F]),G.push(D);return DataArray=[],L=new Blob(G,{type:"application/pdf"}),B=Be(f,2),N=Be(h,2),e.abrupt("return",{oldDocument:B,newDocument:N,blobData:L});case 58:if(2!==r.type){e.next=82;break}if(U=r.inColor,k=r.newColor,O=r.inTransparency,W=r.newTransparency,j=r.coverType,H=Module._InitCompareDrawing(f,h),Module._SetBlendMode(H,j),Module._SetNoFill(H,1),Y=O/100,z=W/100,Module._SetStrokeAlphaCompare(H,Y),Module._SetStrokeAlphaCompared(H,z),Module._SetFillAlphaCompare(H,Y),Module._SetFillAlphaCompared(H,z),Z=_e(U),Q=_e(k),Module._SetColorCompare(H,255*Z.R,255*Z.G,255*Z.B),Module._SetColorCompared(H,255*Q.R,255*Q.G,255*Q.B),Module._CompareContent(H),!(q=We("PDF COMPARE"))||!q.code){e.next=77;break}return e.abrupt("return",q);case 77:return K=Module._GetDocGenerate(H),e.next=80,Ue({doc:K});case 80:return J=e.sent,e.abrupt("return",{blobData:J});case 82:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("GetOutlines",(function(e){var t=e.doc,n=[];return xe(t,Module._GetOutlineRoot(t),n,-1),n})),e.on("InitText",(function(e){var t=e.pagePtr;return Module._InitText(t)})),e.on("ClearText",(function(e){var t=e.textPtr;Module._ClearText(t)})),e.on("ClearPage",(function(e){var t=e.pagePtr;Module._ClearPage(t)})),e.on("Search",(function(e){for(var t=e.pagesPtr,n=e.value,r=stringToNewUTF8(n),o=null,a=[],i=0;i<t.length;i++){var u=t[i],c=u.pageNumber,l=u.pagePtr,s=u.textPtr,f=s;f||(f=Module._InitText(l));var d=Module._InitTextFind();if(Module._FindStart(f,d,r,0,0),(o=We("PDF VIEWER SEARCH")).code)return o;var p=1,g=0;do{if(TextFindItemArray=[],p=Module._FindNext(l,f,d)){for(var h=TextFindItemArray.length,v=[],A=0;A<h;A++){var _=TextFindItemArray[A],P=_.Left,m=_.Top,y=_.Right,M=_.Bottom;v.push({left:P,top:m,right:y,bottom:M})}a.push({pageNum:c,quads:v,content:TextFindItemArray[0].Content.replace(/\r?\n/gm," "),pageSearchIndex:g,searchValue:n}),g++}}while(p);!s&&Module._ClearText(f),Module._ClearTextFind(d)}return{searchResults:a}})),e.on("InitEditPage",(function(e){var t=e.pagePtr;return{editPagePtr:Module._InitEditPage(t),pagePtr:t}})),e.on("ClearEditPage",(function(e){return function(e){(function(e){de.has(e)&&(Module._EndEdit(e),de.delete(e));$t(e)})(e),Module._ClearEditPage(e),de.delete(e)}(e)})),e.on("BeginEdit",(function(e){var t=e.editPagePtr,n=e.type;return Module._BeginEdit(t,n),de.add(t),We("PDF CONTENT EDIT")})),e.on("EndEdit",(function(e){var t=e.editPagePtr;return Module._EndEdit(t)})),e.on("GetEditAreaCount",(function(e){return Module._GetEditAreaCount(e)})),e.on("GetEditArea",(function(e){var t=e.editPagePtr,n=e.index;return Module._GetEditArea(t,n)})),e.on("GetEditAreaInfoList",(function(e){return wt(e)})),e.on("GetEditAreaRenderInfoList",(function(e){return function(e){return xt.apply(this,arguments)}(e)})),e.on("IsTextArea",(function(e){return Module._IsTextArea(e)})),e.on("IsImageArea",(function(e){return Module._IsImageArea(e)})),e.on("GetEditAreaType",(function(e){return It(e)})),e.on("SetFrame",(function(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.rect;Module._SetFrame(t,n,r.left,r.right,r.bottom,r.top,!0)})),e.on("GetFrame",(function(e){return Dt(e)})),e.on("GetBeginAndEndCharPlace",(function(e){return Zt(e)})),e.on("GetTextByRange",(function(e){return Ht(e)})),e.on("GetText",(function(e){return Wt(e)})),e.on("SelectCharsRangeAtPos",(function(e){return Nt(e)})),e.on("GetTextClickInfo",(function(e){return function(e){var n=e.pagePtr,r=e.editAreaPtr,o=Nt(e),a=o.end;return t(t({},o),{},{activeCharPlace:a,cursorPoints:Bt({pagePtr:n,editAreaPtr:r,char:a}),textStyleData:en({editAreaPtr:r,char:a})})}(e)})),e.on("GetTextDragSelectionInfo",(function(e){return function(e){var n=e.pagePtr,r=e.editAreaPtr,o=Nt(e),a=on(o.start,o.end)?[]:zt({pagePtr:n,editAreaPtr:r,start:o.start,end:o.end});return t(t({},o),{},{selectedCharRange:o,selectedRects:a,cursorPoints:a.length?Bt({pagePtr:n,editAreaPtr:r,char:o.end}):null})}(e)})),e.on("GetTextSelectionContentInfo",(function(e){return function(e){return Ot.apply(this,arguments)}(e)})),e.on("GetSectionAtPos",(function(e){return Ut(e)})),e.on("GetTextRangeSelectionInfo",(function(e){return function(e){return rn.apply(this,arguments)}(e)})),e.on("GetTextCursorPoints",(function(e){return Bt(e)})),e.on("GetPrevCharPlace",(function(e){var t=e.editAreaPtr,n=e.char;return EditCharPlace={},EndEditCharPlace={},Module._GetPrevCharPlace(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex),{start:EditCharPlace,end:EndEditCharPlace}})),e.on("GetNextCharPlace",(function(e){var t=e.editAreaPtr,n=e.char;return EditCharPlace={},EndEditCharPlace={},Module._GetNextCharPlace(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex),{start:EditCharPlace,end:EndEditCharPlace}})),e.on("GetUpCharPlace",(function(e){var t=e.editAreaPtr,n=e.char;return EditCharPlace={},EndEditCharPlace={},Module._GetUpCharPlace(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex),{start:EditCharPlace,end:EndEditCharPlace}})),e.on("GetDownCharPlace",(function(e){var t=e.editAreaPtr,n=e.char;return EditCharPlace={},EndEditCharPlace={},Module._GetDownCharPlace(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex),{start:EditCharPlace,end:EndEditCharPlace}})),e.on("InsertText",(function(e){return Qt(e)})),e.on("InsertTextAndGetInfo",(function(e){return function(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.includeTextStyle,o=void 0!==r&&r,a=Qt(e),i={activeCharPlace:a,frame:Dt({pagePtr:t,editAreaPtr:n}),cursorPoints:Bt({pagePtr:t,editAreaPtr:n,char:a})};o&&(i.textStyleData=en({editAreaPtr:n,char:a}));return i}(e)})),e.on("BackSpaceChar",(function(e){return qt(e)})),e.on("DeleteChar",(function(e){return Kt(e)})),e.on("ReplaceText",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=e.text;EditCharPlace={},Module._DeleteChars(t,n.SectionIndex||0,n.LineIndex||0,n.RunIndex||0,n.CharIndex||0,r.SectionIndex||0,r.LineIndex||0,r.RunIndex||0,r.CharIndex||0,!0);var a=stringToNewUTF8(o);Module._InsertText(t,EditCharPlace.SectionIndex||0,EditCharPlace.LineIndex||0,EditCharPlace.RunIndex||0,EditCharPlace.CharIndex||0,a,!0)})),e.on("ReplaceAll",(function(e){var t=e.editAreaPtr,n=e.text;EditCharPlace={},EndEditCharPlace={},Module._GetBeginAndEndCharPlace(t),Module._DeleteChars(t,EditCharPlace.SectionIndex||0,EditCharPlace.LineIndex||0,EditCharPlace.RunIndex||0,EditCharPlace.CharIndex||0,EndEditCharPlace.SectionIndex||0,EndEditCharPlace.LineIndex||0,EndEditCharPlace.RunIndex||0,EndEditCharPlace.CharIndex||0,!0);var r=stringToNewUTF8(n);Module._InsertText(t,EditCharPlace.SectionIndex||0,EditCharPlace.LineIndex||0,EditCharPlace.RunIndex||0,EditCharPlace.CharIndex||0,r,!0)})),e.on("DeleteChars",(function(e){return Jt(e)})),e.on("DeleteTextAndGetInfo",(function(e){return function(e){return Xt.apply(this,arguments)}(e)})),e.on("GetSelectLineRectsCounts",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end;return Module._GetSelectLineRectsCounts(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex)})),e.on("GetSelectLineRects",(function(e){return zt(e)})),e.on("SetCharsFontColor",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=D(e.color);Module._SetCharsFontColor(t,n.SectionIndex||0,n.LineIndex||0,n.RunIndex||0,n.CharIndex||0,r.SectionIndex||0,r.LineIndex||0,r.RunIndex||0,r.CharIndex||0,o.R,o.G,o.B,!0)})),e.on("SetCharsFontTransparency",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=e.opacity;Module._SetCharsFontTransparency(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex,o,!0)})),e.on("SetTextAligningSection",(function(e){var t=e.editAreaPtr,n=e.char,r=e.alignType;Module._SetTextAligningSection(t,r,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,!0)})),e.on("SetTextAligningRange",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=e.alignType;Module._SetTextAligningRange(t,o,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex,!0)})),e.on("SetCharsFontSize",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=e.fontSize;Module._SetCharsFontSize(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex,o,!0,!0)})),e.on("SetFontFromNativeTrueTypeFont",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=e.fontFamily,a=stringToNewUTF8(o);Module._SetFontFromNativeTrueTypeFont(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex,a,!0)})),e.on("RefreshRange",(function(e){return ln(e.editAreaPtr,{start:e.start,end:e.end})})),e.on("SetCharsFontStyle",function(){var e=i(n().mark((function e(t){var r,o,a,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.editAreaPtr,o=t.start,a=t.end,i=t.fontStyle,an(r,{start:o,end:a},i);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("CreateNewTextArea",(function(e){return Vt(e)})),e.on("CreateNewTextAreaWithInfo",(function(e){return function(e){var t=e.pagePtr,n=e.editPagePtr,r=e.text,o=Vt(e);if(!o)return{editAreaPtr:o};var a={SectionIndex:0,LineIndex:0,RunIndex:0,CharIndex:-1},i="";r&&(a=Qt({editAreaPtr:o,char:a,text:r}),i=r);return{editAreaPtr:o,frame:Dt({pagePtr:t,editAreaPtr:o}),text:i,activeCharPlace:a,cursorPoints:Bt({pagePtr:t,editAreaPtr:o,char:a}),editState:$t(n)}}(e)})),e.on("RemoveEditAreaByIndex",(function(e){var t=e.editPagePtr,n=e.editAreaIndex;Module._RemoveEditAreaByIndex(t,n,!0)})),e.on("RemoveEditArea",(function(e){var t=e.editPagePtr,n=e.editAreaPtr;Module._RemoveEditArea(t,n,!0)})),e.on("CopyArea",(function(e){var t=e.editPagePtr,n=e.editAreaPtr;return Module._CopyArea(t,n)})),e.on("PasteArea",(function(e){var t=e.pagePtr,n=e.editPagePtr,r=e.editAreaInfoPtr,o=e.rect,a=n;n||(a=Module._InitEditPage(t),Module._BeginEdit(a,3));var i=Module._PasteArea(t,a,r,o.left+5,o.top+5,!0);return n||(Module._EndEdit(a),Module._ClearEditPage(a)),i})),e.on("GetCopyAreaContent",(function(e){var t=e.editPagePtr,n=e.editAreaInfoPtr;return Module._GetCopyAreaContent(t,n),U8StringData})),e.on("GetTextStyle",(function(e){var t=e.editAreaPtr,n=e.char;return EditTextStyle={},Module._GetTextStyle(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex),EditTextStyle})),e.on("GetTextStyleData",(function(e){return en(e)})),e.on("GetTextAreaSelectionInfo",(function(e){return tn(e)})),e.on("SetTextProperties",(function(e){return function(e){return cn.apply(this,arguments)}(e)})),e.on("GetBaseFontName",(function(e){var t=e.editAreaPtr,n=e.char;return Module._GetBaseFontName(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex),U8StringData})),e.on("createEditorDoc",function(){var e=i(n().mark((function e(t){var r,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.doc,o=t.password,e.next=3,De(r,o);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("GetTextSectionAlignType",function(){var e=i(n().mark((function e(t){var r,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.editAreaPtr,o=t.char,e.abrupt("return",Module._GetTextSectionAlignType(r,o.SectionIndex,o.LineIndex,o.RunIndex,o.CharIndex));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("InsertPage",(function(e){var t=e.doc,n=e.index,r=e.width,o=e.height,a=Module._InsertPage(t,n,r,o),i=We("PDF EDITOR PAGE");return i.code?i:{status:a}})),e.on("ImportPagesAtIndex",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,d,p,g,h,v,A,_,P,m,y;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.doc,o=t.file,a=t.range,i=t.index,u=t.password,e.next=3,le(o);case 3:if(c=e.sent,l=Module._InitDocument(),s=ComPDFKitJS.opened_files.length||0,ComPDFKitJS.opened_files[s]=c,d=stringToNewUTF8(u),Module._LoadDocumentByStream(l,s,c.length,d),p=Module._GetPageCount(l),h=!1,"all"===a?g="1-"+p:"odd"===a?g=Array.from({length:p},(function(e,t){return t+1})).filter((function(e){return e%2!=0})).join(","):"even"===a?g=Array.from({length:p},(function(e,t){return t+1})).filter((function(e){return e%2==0})).join(","):(v=p,A=a.replace(/\s/g,""),_=A.split(","),P=[],_.forEach((function(e){if(e.includes("-")){var t=e.split("-").map((function(e){return parseInt(e)})),n=f(t,2),r=n[0],o=n[1];if(r<=0&&(h=!0),r>v)return;o>v&&(o=v),P.push(r===v?r.toString():"".concat(r,"-").concat(o))}else{var a=parseInt(e);a<=0&&(h=!0),a<=v&&P.push(a.toString())}})),g=P.join(",")),g&&!h){e.next=14;break}return e.abrupt("return",0);case 14:if(g=stringToNewUTF8(g),m=Module._ImportPagesAtIndex(r,l,g,i),!(y=We("PDF EDITOR PAGE")).code){e.next=19;break}return e.abrupt("return",y);case 19:return ComPDFKitJS.opened_files.pop(),e.abrupt("return",{status:m});case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("RemovePage",(function(e){var t=e.doc,n=e.index,r=Module._RemovePage(t,n),o=We("PDF EDITOR PAGE");return o.code?o:{status:r}})),e.on("RotatePage",(function(e){var t=e.pagePtr,n=e.rotation;Module._RotatePage(t,n);var r=We("PDF EDITOR PAGE");if(r.code)return r})),e.on("GetPageWithoutParse",(function(e){var t=e.doc,n=e.index;return Module._GetPageWithoutParse(t,n)})),e.on("CopyPage",(function(e){var t=e.doc,n=e.index,r=stringToNewUTF8(n+1+""),o=Module._ImportPagesAtIndex(t,t,r,n+1),a=We("PDF EDITOR PAGE");return a.code?a:{status:o}})),e.on("GetPageRotation",(function(e){return Module._GetPageRotation(e)})),e.on("ClearDocument",(function(e){Module._ClearDocument(e),ComPDFKitJS.opened_files.pop()})),e.on("ExtractPage",function(){var e=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.doc,o=t.range,a=t.separateFile,i=[],!a){e.next=20;break}u=0;case 4:if(!(u<o.length)){e.next=18;break}if(c=o[u]+1+"",l=stringToNewUTF8(c),s=Module._InitDocument(),Module._CreateDocument(s),Module._ImportPagesAtIndex(s,r,l,0),!(f=We("PDF EDITOR PAGE")).code){e.next=13;break}return e.abrupt("return",f);case 13:d=Be(s,2),i.push({name:c,blobData:d});case 15:u++,e.next=4;break;case 18:e.next=29;break;case 20:if(p=stringToNewUTF8(o),g=Module._InitDocument(),Module._CreateDocument(g),Module._ImportPagesAtIndex(g,r,p,0),!(h=We("PDF EDITOR PAGE")).code){e.next=27;break}return e.abrupt("return",h);case 27:v=Be(g,2),i.push(v);case 29:return e.abrupt("return",{blobDataList:i});case 30:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("MovePage",(function(e){var t=e.doc,n=e.index,r=e.targetIndex,o=Module._MovePage(t,n,r),a=We("PDF EDITOR PAGE");return a.code?a:{status:o}})),e.on("CreateNewImageAreaByStream",(function(e){return Mt(e)})),e.on("CreateNewImageAreaWithInfo",(function(e){return function(e){var t=e.pagePtr,n=e.editPagePtr,r=Mt(e);return{editAreaPtr:r,frame:Dt({pagePtr:t,editAreaPtr:r}),clipRect:Lt({pagePtr:t,editAreaPtr:r}),opacity:Module._GetImageTransparency(r),image:mt(r),editState:$t(n)}}(e)})),e.on("ReplaceImageAreaByStream",(function(e){return yt(e)})),e.on("ReplaceImageAreaAndGetInfo",(function(e){return function(e){var t=e.pagePtr,n=yt(e);return{editAreaPtr:n,frame:Dt({pagePtr:t,editAreaPtr:n}),clipRect:Lt({pagePtr:t,editAreaPtr:n}),opacity:Module._GetImageTransparency(n),image:mt(n)}}(e)})),e.on("RotateImage",(function(e){var t=e.editAreaPtr,n=e.angle;return Module._RotateImage(t,n,!0)})),e.on("HorizontalMirrorImage",(function(e){return Module._HorizontalMirrorImage(e,!0)})),e.on("VerticalMirrorImage",(function(e){return Module._VerticalMirrorImage(e,!0)})),e.on("TransformImageAndExtract",(function(e){return function(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.transform,o=e.angle;"rotate"===r&&Module._RotateImage(n,o,!0);"horizontalMirror"===r&&Module._HorizontalMirrorImage(n,!0);"verticalMirror"===r&&Module._VerticalMirrorImage(n,!0);return{frame:Dt({pagePtr:t,editAreaPtr:n}),clipRect:Lt({pagePtr:t,editAreaPtr:n}),image:mt(n)}}(e)})),e.on("SetImageTransparency",(function(e){var t=e.editAreaPtr,n=e.opacity;return Module._SetImageTransparency(t,n,!0)})),e.on("GetImageTransparency",(function(e){return Module._GetImageTransparency(e)})),e.on("ExtractOriginalImage",(function(e){return mt(e)})),e.on("CutWithRect",(function(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.rect;Module._CutWithRect(t,n,r.left,r.right,r.bottom,r.top,!0)})),e.on("GetClipRect",(function(e){return Lt(e)})),e.on("SetClipRect",(function(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.rect;Module._SetClipRect(t,n,r.left,r.right,r.bottom,r.top,!0)})),e.on("RemoveSignature",(function(e){var t=e.doc,n=e.signaturePtr;return Module._RemoveSignature(t,n,!0)})),e.on("AddToTrustedCertificates",(function(e){return function(e){var t=e.signerPtr,n=Module._GetSignCert(t);if(n){return CertArray=[],!!Module._ExportToFilePath(n,0)&&CertArray[0]}return!1}(e)})),e.on("CreateReplyAnnotation",(function(e){return function(e,t,n){var r=n.author,o=n.date,a=n.dateCreated,i=n.contents,u=n.title,c=Module._CreateReplyAnnotation(e,t);r&&ze({annotPtr:c,author:r});n.name&&Module._SetAnnotDictName(c,stringToNewUTF8("NM"),stringToNewUTF8(n.name));i&&Qe({annotPtr:c,contents:i});(o||a)&&He({annotPtr:c,date:o||a});u&&Ze({annotPtr:c,title:u});if(n.state){var l=te[n.state.toUpperCase()];Module._SetState(c,l)}return c}(e.pagePtr,e.annotPtr,e.replyAnnotation)})),e.on("CreateReplyStateAnnotation",(function(e){var t=e.pagePtr,n=e.annotPtr,r=e.state,o=te[r],a=Module._CreateReplyStateAnnotation(t,n,o);return newStateInt=Module._GetState(a),{annotPtr:a,state:ne[newStateInt]}})),e.on("GetReplyAnnotation",(function(e){return vn(e.pagePtr,e.annotPtr)})),e.on("EditReplyAnnotation",(function(e){var t=e.reply;t.author&&ze(t),t.contents&&Qe(t),t.date&&He(t),t.title&&Ze(t)})),e.on("SetState",(function(e){var t=e.reviewAnnotState,n=e.markedAnnotState;if(n){var r=te[n.state.toUpperCase()];Module._SetState(n.annotPtr,r);var o=Module._GetState(n.annotPtr);return{annotPtr:n.annotPtr,state:ne[o]}}if(t){var a=te[t.state.toUpperCase()];Module._SetState(t.annotPtr,a);var i=Module._GetState(t.annotPtr);return{annotPtr:t.annotPtr,state:ne[i]}}})),e.on("CanRedo",(function(e){return Module._CanRedo(e)})),e.on("CanUndo",(function(e){return Module._CanUndo(e)})),e.on("Redo",(function(e){return t(t({},sn("Redo",e)),{},{canUndo:!!Module._CanUndo(e),canRedo:!!Module._CanRedo(e)})})),e.on("RedoBatch",(function(e){return fn("Redo",e)})),e.on("Undo",(function(e){return t(t({},sn("Undo",e)),{},{canUndo:!!Module._CanUndo(e),canRedo:!!Module._CanRedo(e)})})),e.on("UndoBatch",(function(e){return fn("Undo",e)})),e.on("GetLineLeading",(function(e){var t=e.editAreaPtr,n=e.char;return Module._GetLineLeading(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex)})),e.on("SetLineLeading",(function(e){var t=e.editAreaPtr,n=e.char,r=e.spacing;Module._SetLineLeading(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r)})),e.on("GetSectionAfterLeading",(function(e){var t=e.editAreaPtr,n=e.char;return Module._GetSectionAfterLeading(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex)})),e.on("SetSectionAfterLeading",(function(e){var t=e.editAreaPtr,n=e.char,r=e.spacing;Module._SetSectionAfterLeading(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r)})),e.on("GetCharacterSpacing",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end;return Module._GetCharacterSpacing(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex)})),e.on("SetCharacterSpacing",(function(e){var t=e.editAreaPtr,n=e.start,r=e.end,o=e.spacing;Module._SetCharacterSpacing(t,n.SectionIndex,n.LineIndex,n.RunIndex,n.CharIndex,r.SectionIndex,r.LineIndex,r.RunIndex,r.CharIndex,o)})),e.on("ApplyRedaction",(function(e){var t=e.annotPtr;return Xe({annotPtr:t,fillColor:e.fillColor}),Module._ApplyRedaction(t)})),e.on("ApplyRedactionPage",(function(e){var t=e.pagePtr;return Module._ApplyRedactionPage(t)})),e.on("ErasureRedactionFromRect",(function(e){var t=e.pagePtr,n=e.rect;return Module._ErasureRedactionFromRect(t,n.left,n.right,n.bottom,n.top)})),e.on("GetOverLayText",(function(e){var t=e.annotPtr;return U8StringData="",Module._GetOverLayText(t),U8StringData})),e.on("SetOverLayText",(function(e){var t=e.annotPtr,n=e.overlayText,r=e.color,o=e.fontName,a=e.fontSize,i=e.fontStyle,u=e.fontWeight,c=e.textAlignment;dt({annotPtr:t,fontName:o,fontSize:a,fontStyle:i,fontWeight:u,color:r});var l=k[c.toUpperCase()];return Module._SetTextAlignment(t,l),Module._SetOverLayText(t,stringToNewUTF8(n))})),e.on("GetStampRect",(function(e){var t=e.doc,n=e.pagePtr,r=e.annotation,o=r.contents,a=r.time,i=r.stampShape,u=r.stampColor,c=O[r.type.toUpperCase()],l=Module._CreateAnnot(t,n,c),s=stringToNewUTF8(o),f=stringToNewUTF8(a);Module._SetTextStamp(l,s,f,i,u,0);var d=We("PDF Annotation STAMPS");return d.code?d:(Module._UpdateAnnotAp(l,0),Module._GetAnnotRect(n,l),Module._RemoveAnnot(l),{left:Rect.Left,top:Rect.Top,right:Rect.Right,bottom:Rect.Bottom})})),e.on("GetLayers",(function(e){var t=Module._getLayerTree(e),n=Module._getRootNode(t),r=[],o=[],a=Module._getChildrenCount(n);return r.push.apply(r,d(function e(t,n){for(var r=[],a=0;a<n;a++){var i=Module._getChild(t,a);Module._getName(i);var u=Module._isLocked(i),c=Module._getLayerNodeDict(i),l=Module._getViewUsage(i),s=1!==l?1:0;s&&c&&o.push(c);var f=Module._getExportUsage(i);LayerPrintData={},Module._getPrintUsage(i),LayerZoomData={},Module._getZoomUsage(i);var p=Module._getChildrenCount(i),g=[];p>0&&g.push.apply(g,d(e(i,p))),r.push({node:i,ocg:c,name:U8StringData,isLocked:u,visible:s,defaultVisible:s,children:g,viewState:l,exportState:0===f?0:1===f?1:2,printState:0===LayerPrintData.print_state?0:1===LayerPrintData.print_state?1:2,zoom:LayerZoomData})}return r}(n,a))),{layers:r,ocgsPtr:o}})),e.on("SetLayer",(function(e){var t=e.node,n=e.name,r=e.defaultVisible,o=e.isLocked,a=e.printState,i=e.exportState;n&&Module._setName(t,stringToNewUTF8(n)),e.hasOwnProperty("defaultVisible")&&Module._setViewUsage(t,!r),e.hasOwnProperty("isLocked")&&Module._setLocked(t,o),e.hasOwnProperty("printState")&&Module._setPrintUsage(t,stringToNewUTF8(""),0===a?0:1===a?1:3),e.hasOwnProperty("exportState")&&Module._setExportUsage(t,0===i?0:1===i?1:3)})),e.on("RenderLayerBitmap",(function(e){var t=function(e){for(var t=e.pagePtr,n=e.x,r=e.y,o=e.width,a=e.height,i=e.mode,u=e.flag,c=e.ocgsPtr,l=e.form,s=parseInt(o)*parseInt(a),f=4*s,d=_malloc(f),p=0;p<s;p++)Module.HEAP32[d/4+p]=0;var g=c.length,h=_malloc(4*g);for(p=0;p<g;p++)Module.HEAP32[h/4+p]=c[p];Module._RenderLayerBitmap(t,n,r,o,a,i,d,u,h,g,l);var v=We("PDF VIEWER RENDER");if(v.code)return _free(d),v;var A=new Uint8Array(f);for(p=0;p<f;p+=4)A[p]=Module.HEAPU8[d+p+2],A[p+1]=Module.HEAPU8[d+p+1],A[p+2]=Module.HEAPU8[d+p],A[p+3]=Module.HEAPU8[d+p+3];return _free(d),{imageArray:A}}({pagePtr:e.pagePtr,x:e.x,y:e.y,width:e.width,height:e.height,ocgsPtr:e.ocgsPtr,mode:-1,flag:1,form:1});return t})),e.on("RenderLayerBitmapWithMatrix",(function(e){var t=e.pagePtr,n=e.scale,r=e.left,o=e.right,a=e.bottom,i=e.top,u=e.mode,c=void 0===u?-1:u,l=e.flag,s=void 0===l?0:l,f=e.ocgsPtr,d=e.form;return An({pagePtr:t,scale:n,left:r,right:o,bottom:a,top:i,mode:c,flag:s,ocgsPtr:f,form:void 0===d?0:d})})),e.on("ExportLayers",(function(e){for(var t=e.doc,n=e.ocgsPtr,r=n.length,o=4*n.length,a=_malloc(o),i=0;i<n.length;i++)Module.HEAP32[a/4+i]=n[i];return Be(Module._exportDocumentLayer(t,a,r),2)})),e.on("InitColorList",(function(e){return Module._initColorList(e)})),e.on("GetPDFSeparationColor",function(){var e=i(n().mark((function e(t){var r,o,a,i,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.pagePtr,o=t.fileData,a=o instanceof ArrayBuffer?new Uint8Array(o):o,i=_malloc(a.length),Module.HEAPU8.set(a,i),u=Module._getPDFSeparationColor(r,i,a.length),_free(i),e.abrupt("return",u);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("GetColorsList",(function(e){SepColorsArray=[],Module._getColorsList(e);for(var t=[],n=0;n<SepColorsArray.length;n++){var r=SepColorsArray[n];t.push({index:n,name:r.ColorName,color:"rgb(".concat(r.R,", ").concat(r.G,", ").concat(r.B,")")})}return t})),e.on("GetSelectPointColor",(function(e){var t=e.pagePtr,n=e.sepColorPtr,r=e.point;return SelectPointColorArray=[],Module._getSelectPointColor(t,n,r.x,r.y),SelectPointColorArray})),e.on("RenderPageAndIgnoreColorByIndex",(function(e){var t=e.sepColorPtr,n=e.x,r=e.y,o=e.width,a=e.height,i=e.indexs,u=e.flag,c=void 0===u?0:u,l=e.rotate,s=function(e){for(var t=e.sepColorPtr,n=e.x,r=e.y,o=e.width,a=e.height,i=e.rotate,u=e.flag,c=e.indexs,l=parseInt(o)*parseInt(a),s=4*l,f=_malloc(s),d=0;d<l;d++)Module.HEAP32[f/4+d]=0;var p=c.length,g=_malloc(4*p);for(d=0;d<p;d++)Module.HEAP32[g/4+d]=c[d];Module._renderPageAndIgnoreColorByIndex(t,f,n,r,o,a,i,u,g,p);var h=We("PDF VIEWER COLOR RENDER");if(h.code)return _free(f),h;var v=new Uint8Array(s);for(d=0;d<s;d+=4)v[d]=Module.HEAPU8[f+d+2],v[d+1]=Module.HEAPU8[f+d+1],v[d+2]=Module.HEAPU8[f+d],v[d+3]=Module.HEAPU8[f+d+3];return _free(f),{imageArray:v}}({sepColorPtr:t,x:n,y:r,width:o,height:a,rotate:void 0===l?0:l,flag:c,indexs:i});return s})),e.on("CreateMeasurementAnnotation",(function(e){return function(e,t,n){var r="RECTANGLE"===n.type.toUpperCase()?"POLYGON":n.type.toUpperCase(),o=O[r],a=re[n.measureType.toUpperCase()],i=Module._CreateAnnot(e,t,o),u=Module._initRuler(e,i,a);n.captionType&&(MeasureInfo={},Module._getMeasureInfo(u),Module._SetMeasureInfo(u,MeasureInfo.factor,stringToNewUTF8(MeasureInfo.unit),stringToNewUTF8(MeasureInfo.decimalSymbol),stringToNewUTF8(MeasureInfo.thousandSymbol),stringToNewUTF8(MeasureInfo.display),MeasureInfo.precision,stringToNewUTF8(MeasureInfo.unitPrefix),stringToNewUTF8(MeasureInfo.unitSuffix),stringToNewUTF8(MeasureInfo.unitPosition),MeasureInfo.RulerBase,stringToNewUTF8(MeasureInfo.RulerBaseUnit),MeasureInfo.RulerTranslate,stringToNewUTF8(MeasureInfo.RulerTranslateUnit),ae[n.captionType.toUpperCase()]));var c=We("PDF Annotation");if(c.code)return c;return n.pagePtr=t,n.annotPtr=i,n.rulerPtr=u,_n(e,n),{annotPtr:i,rulerPtr:u}}(e.doc,e.pagePtr,e.annotation)})),e.on("EditMeasurementAnnotation",(function(e){return _n(e.doc,e.annotation)})),e.on("GetMeasurementData",(function(e){return Pn(e.annotPtr,e.rulerPtr,e.type)})),e.on("GetMeasurementResult",(function(e){var t=e.annotPtr,n=e.rulerPtr,r=e.captionType,o=r?ae[r.toUpperCase()]:Module._getCaptionTypes(t);return Module._getMeasurementResults(n,o)})),e.on("GetFactor",(function(e){return Module._getFactor(e)})),e.on("GetOptimizeOption",(function(e){var t=function(e){for(var t={},n=0,r=Object.entries(ue);n<r.length;n++){var o=f(r[n],2),a=o[0],i=o[1];t[a.replace("OPTIMIZE_FLAG_","")]=!!(e&i)}return t}(Module._GetOptimizeFlag(e)),n={flags:t,quality:Module._GetOptimizeQuality(e),libVersion:Module._GetLibVersion(e)};return ImagePPI={},Module._GetOptimizeColImagePPI(e),n.colImagePPI=ImagePPI,ImagePPI={},Module._GetOptimizeGrayImagePPI(e),n.grayImagePPI=ImagePPI,ImagePPI={},Module._GetOptimizeMonImagePPI(e),n.monImagePPI=ImagePPI,n})),e.on("OptimizeDocumentByStream",function(){var e=i(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xn(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on("IsImageDoc",function(){var e=i(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Module._IsImageDoc(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}}]);var r}();function me(){return(me=i(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(runtimeInitialized){e.next=5;break}return e.next=3,he(100);case 3:e.next=0;break;case 5:return e.abrupt("return",new Promise((function(e,t){e()})));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ye(e){var t=e.doc,n=e.fileId,r=e.length,o=e.password,a=stringToNewUTF8(o);return Module._LoadDocumentByStream(t,n,r,a),PermissionsInfo={},Module._GetPermissionsInfo(t),PermissionsInfo}function Me(e){var t=e.doc,n=e.password,r=e.permissionPassword,o=void 0===r?"":r,a=e.permissions,i=void 0===a?"":a,u=stringToNewUTF8(n),c=o?stringToNewUTF8(o):"",l=i.allowsPrinting,s=i.allowsCopying,f=i.allowsDocumentChanges,d=i.allowsDocumentAssembly,p=i.allowsCommenting,g=i.allowsFormFieldEntry;return l=void 0===l||l,s=void 0===s||s,f=void 0===f||f,d=void 0===d||d,p=void 0===p||p,g=void 0===g||g,Module._SetPassword(t,u,c,l,1,s,f,d,p,g),We("PDF SECURITY ENCRYPT")}function Ie(e){var t=e.pagePtr,n=e.scale,r=e.left,o=e.right,a=e.bottom,i=e.top,u=e.mode,c=void 0===u?-1:u,l=e.flag,s=void 0===l?0:l,f=e.form,d=void 0===f?0:f,p=4*(parseInt(o-r)*parseInt(a-i)),g=_malloc(p);Module._RenderPageBitmapWithMatrix(t,n,r,o,a,i,c,g,s,d);var h=We("PDF VIEWER RENDER");if(h.code)return _free(g),h;for(var v=new Uint8Array(p),A=0;A<p;A+=4)v[A]=Module.HEAPU8[g+A+2],v[A+1]=Module.HEAPU8[g+A+1],v[A+2]=Module.HEAPU8[g+A],v[A+3]=Module.HEAPU8[g+A+3];return _free(g),{imageArray:v}}function we(e){var n=e.editPagePtr,r=e.ocgsPtr,o=null!=r&&r.length?An(t({mode:-1,flag:0,form:0},e)):Ie(e);return o.code?o:t(t({},o),$t(n))}function xe(e,t,n,r){++r;var o=[];if(!Module._IsValid(t))return n;var a=Module._GetFirst(t);if(!Module._IsValid(a))return n;for(var i=Se(e,o,a,n,r);Module._IsValid(i);)i=Se(e,o,i,n,r);for(var u=0;u<o.length;u++)xe(e,o[u],n[u].children,r)}function Se(e,t,n,r,o){t.push(n),Module._GetTitle(n);var a={title:U8StringData,children:[],level:o};return function(e,t,n,r){1===n?(PDFDestination={},Module._GetOutlineDestination(e,t),r.pageNumber=PDFDestination.PageIndex+1,r.posX=PDFDestination.PosX<0?0:PDFDestination.PosX,r.posY=PDFDestination.PosY<0?0:PDFDestination.PosY):6===n&&(Module._GetUri(t),r.url=U8StringData)}(e,n,Module._GetOutlineActionType(e,n),a),r.push(a),Module._GetNext(n)}function be(e){var t=e.doc,n=e.pagePtr,r=e.annotPtr,o=e.type,a=e.pageIndex,i=null;Rect={},Module._GetAnnotRect(n,r);var u={left:T(Rect.Left),top:T(Rect.Top),right:T(Rect.Right),bottom:T(Rect.Bottom)};Module._GetAnnotCreationDate(r);var c=C(U8StringData);Module._GetAnnotContent(r);var l=U8StringData;Module._GetAnnotTitle(r);var s=U8StringData;Module._GetAnnotAuthor(r);var d=U8StringData,p=T(Module._GetAnnotTransparency(r));U8StringData="",Module._GetAnnotDictName(r,stringToNewUTF8("NM"));var g=U8StringData;g||(g=M(),Module._SetAnnotDictName(r,stringToNewUTF8("NM"),stringToNewUTF8(g)));var h={type:o,date:c,contents:l,rect:u,opacity:p,name:g,pagePtr:n,annotPtr:r,title:s,author:d,color:null,borderColor:null,borderStyle:"solid",borderWidth:Module._GetAnnotBorderWidth(r),fillColor:null,fillTransparency:1,pageIndex:a};U8StringData="",Module._GetAnnotDictName(r,stringToNewUTF8("trn-custom-data"));var v=U8StringData;try{v=JSON.parse(v),h.customData=v}catch(e){}var A=vn(n,r,g);A&&(h.replies=A),RGBColor={},Module._GetAnnotRGBColor(r)&&(h.borderColor=L(RGBColor.R,RGBColor.G,RGBColor.B)),RGBColor={},Module._GetAnnotFilledRGBColor(r)&&(h.fillColor=L(RGBColor.R,RGBColor.G,RGBColor.B));var _=Module._GetAnnotBorderStyle2(r);"dashed"===V[_]?((BorderStyle={}).DashArray=[],Module._GetAnnotBorderStyle(r)&&(h.borderStyle=V[BorderStyle.Style],h.dashes=BorderStyle.DashArray.toString())):(BorderEffect={},Module._GetBorderEffect(r),BorderEffect.isCloudy&&(h.borderStyle="cloudy",h.intensity=BorderEffect.intensity));switch(o){case"text":return h.color=h.borderColor,delete h.borderColor,h;case"link":var P=Module._GetLinkActionType(r);return h.actionType=J[P],1===P?(PDFDestination={},Module._GetLinkDestination(t,r),h.destPage=PDFDestination.PageIndex+1,h.url=""):6===P&&(Module._GetLinkUri(r),h.url=U8StringData,h.destPage=""),h;case"freetext":FontDa={},Module._GetFreeTextFont(r);var m=U8StringData,y=/bold/i.test(m)?"bold":"normal",I=/(oblique|italic)/i.test(m)?"oblique":"normal";h.fontName=m.split("-")[0],h.fontStyle=I,h.fontWeight=y,h.fontSize=FontDa.fontSize,h.color=L(FontDa.R,FontDa.G,FontDa.B),RGBColor={},Module._GetFreeTextBorderColor(r)&&(h.borderColor=L(RGBColor.R,RGBColor.G,RGBColor.B)),h.fillTransparency=Module._GetAnnotFilledTransparency(r);var w=Module._GetTextAlignment(r);if(h.textAlignment=U[w],h.contents||(Module._GetFreeTextContent(r),h.contents=U8StringData),RGBColor={},Module._GetFreeTextBgColor(r)&&(h.fillColor=L(RGBColor.R,RGBColor.G,RGBColor.B)),h.intent="FreeText",1===Module._GetFreeTextType(r)){FloatPointArray=[],Module._GetFreetextCallout(r),PageSize.Width=0,PageSize.Height=0,Module._GetPageSizeForIndex(t,a);for(var x=[],S=0;S<FloatPointArray.length;S++){var b=FloatPointArray[S];x.push({x:b.PointX,y:PageSize.Height-b.PointY})}h.floatPoint=x,h.intent="FreeTextCallout",Rect={},Module._GetFreetextRectDiff(r),h.rectDiff={left:Math.abs(T(Rect.Left)),top:Math.abs(T(Rect.Top)),right:Math.abs(T(Rect.Right)),bottom:Math.abs(T(Rect.Bottom))}}return h;case"line":LinePoint={},Module._GetLinePoint(n,r);var E=[LinePoint.StartPointX,LinePoint.StartPointY,LinePoint.EndPointX,LinePoint.EndPointY];if(h.linePoints=E,LineType={},Module._GetLineType(r),h.tail=q[LineType.Tail],h.head=q[LineType.Head],Module._isMeasured(r)){h.measure=1,h.rulerPtr=Module._initRuler(t,r,re.DISTANCE);var R=Pn(r,h.rulerPtr,o);Object.assign(h,R)}return h;case"arc":case"square":case"polygon":var G=wn({pagePtr:n,annotPtr:r});if(G.length&&(h.vertices=G),h.vertices&&4===h.vertices.length){var F=f(h.vertices,4),D=F[0],B=F[1],N=F[2],k=F[3];D.y===B.y&&B.x===N.x&&N.y===k.y&&k.x===D.x&&(h.type="rectangle")}if(h.fillTransparency=Module._GetAnnotFilledTransparency(r),Module._isMeasured(r)){h.measure=1,h.rulerPtr=Module._initRuler(t,r,re.AREA);var O=Pn(r,h.rulerPtr,o);Object.assign(h,O)}return h;case"polyline":if(h.vertices=wn({pagePtr:n,annotPtr:r}),Module._isMeasured(r)){h.measure=1,h.rulerPtr=Module._initRuler(t,r,re.PERIMETER);var W=Pn(r,h.rulerPtr,o);Object.assign(h,W)}return h;case"circle":if(h.fillTransparency=Module._GetAnnotFilledTransparency(r),Module._isMeasured(r)){h.measure=1,h.rulerPtr=Module._initRuler(t,r,re.DISTANCE);var j=Pn(r,h.rulerPtr,o);Object.assign(h,j)}return h;case"highlight":case"underline":case"squiggly":case"strikeout":return i=function(e){var t=e.pagePtr,n=e.annotPtr;RGBColor={};var r={};return Module._GetAnnotRGBColor(n)&&(r.color=L(RGBColor.R,RGBColor.G,RGBColor.B)),InkPointArray=[],Module._GetQuadPoints(t,n),r.quadPoints=InkPointArray,r}({pagePtr:n,annotPtr:r}),Object.assign(h,i),h;case"stamp":var H=Module._GetStampType(r);return h.stampType=K[H],0===H?h.stampType="image":(TextStamp={},Module._GetTextStamp(r),h.stampColor=TextStamp.StampColor,h.stampShape=$[TextStamp.StampType],TextStamp.Date&&(h.time=TextStamp.Date)),h;case"ink":if(i=function(e){for(var t=e.pagePtr,n=e.annotPtr,r=Module._GetInkPathCount(n),o=[],a=0;a<r;a++)InkPointArray=[],Module._GetInkPoints(t,n,a),o.push(InkPointArray);return{borderWidth:Module._GetAnnotBorderWidth(n),inkPointes:o}}({pagePtr:n,annotPtr:r}),Object.assign(h,i),1===i.inkPointes.length&&3===i.inkPointes[0].length&&(h.arcPoints=i.inkPointes[0].map((function(e){return{x:e.PointX,y:e.PointY}}))),Module._isMeasured(r)){h.measure=1,h.rulerPtr=Module._initRuler(t,r,re.ARC);var Y=Pn(r,h.rulerPtr,o);Object.assign(h,Y)}return h}}function Ce(e){var n=e.doc,r=e.pagePtr,o=e.annotPtr,a=e.signatures,i=e.pageIndex;Rect={},Module._GetAnnotRect(r,o);var u={left:T(Rect.Left),top:T(Rect.Top),right:T(Rect.Right),bottom:T(Rect.Bottom)};Module._GetAnnotCreationDate(o);var c=C(U8StringData);Module._GetAnnotContent(o);var l=U8StringData;Module._GetAnnotAuthor(o);var s=U8StringData,f=T(Module._GetAnnotTransparency(o)),d=Module._GetWidgetType(o),p=Module._GetRequiredFlag(o);U8StringData="",Module._GetAnnotDictName(o,stringToNewUTF8("NM"));var g=U8StringData;g||(g=M(),Module._SetAnnotDictName(o,stringToNewUTF8("NM"),stringToNewUTF8(g))),U8StringData="",Module._GetAnnotDictName(o,stringToNewUTF8("trn-custom-data"));var h=U8StringData;try{h=JSON.parse(h)}catch(e){h={}}U8StringData="",Module._GetAnnotDictName(o,stringToNewUTF8("trn-form-field-indicator-text"));var v=U8StringData;U8StringData="",Module._GetAnnotDictName(o,stringToNewUTF8("trn-form-field-indicator"));var A=U8StringData;try{A=JSON.parse(A.toLowerCase())}catch(e){A=!1}var _=Module._GetAnnotBorderWidth(o),P={type:H[d],name:g,pagePtr:r,annotPtr:o,date:c,contents:l,rect:u,opacity:f,required:p,author:s,borderColor:null,borderWidth:_,borderStyle:"solid",fillColor:null,fillTransparency:1,pageIndex:i,customData:h,indicator:A,indicatorText:v};RGBColor={},Module._GetAnnotRGBColor(o)&&(P.borderColor=L(RGBColor.R,RGBColor.G,RGBColor.B)),RGBColor={},Module._GetWidgetBackgroundRGBColor(o)&&(P.fillColor=L(RGBColor.R,RGBColor.G,RGBColor.B));var m=Module._GetWidgetBorderStyle(o);P.borderStyle=V[m],Module._GetWidgetFieldName(o),P.fieldName=U8StringData;var y=Module._GetAnnotFlag(o);if(P.flag=y,0===y)P.isHidden=0;else{var I=!(y&Y),w=!(y&Z),x=!(y&z);P.isHidden=I&&w&&x?0:1}switch(d){case j.PUSHBUTTON:Module._GetButtonTitle(o),P.title=U8StringData,Module._GetBtnActionNamedAction(o),P.actionName=U8StringData;var S=Module._GetBtnActionType(o);if(1===S){var b=Module._GetBtnActionDestPage(n,o);P.destPage=b+1}else 6===S&&(Module._GetBtnActionURI(o),P.url=U8StringData);P.actionType=S,FontDa={},Te(P,o,Module._GetAnnotFontDa(o));var E=Ee(U8StringData),R=t({fontSize:FontDa.fontSize||12},E);Object.assign(P,R);break;case j.CHECKBOX:var G=Module._GetWidgetCheckStyle(o);P.checkStyle=G;var F=Module._GetCheckBoxIsChecked(o);P.isChecked=F;break;case j.RADIOBUTTON:var D=Module._GetWidgetCheckStyle(o);P.checkStyle=D;var B=Module._GetRadioButtonIsChecked(o);P.isChecked=B;break;case j.TEXTFIELD:if(1===Module._GetTextFieldSpe(o))return null;Module._GetTextFieldContent(o),P.contents=U8StringData,U8StringData="",Module._GetDateFormat(o),U8StringData&&(P.dateFormat=U8StringData);var N=Module._IsMultiLine(o);P.isMultiLine=N;var k=Module._GetWidgetTextJustification(o);P.textAlignment=U[k],FontDa={},Te(P,o,Module._GetAnnotFontDa(o));var O=Ee(U8StringData),W=t({fontSize:FontDa.fontSize||12},O);Object.assign(P,W);break;case j.COMBOBOX:case j.LISTBOX:WidgetItem={},Module._GetItemsSelectedItem(o),P.selectedItem={values:WidgetItem.Values,strings:WidgetItem.Strings};var Q=Module._GetItemsCount(o);P.itemsCount=Q,WidgetItemsArray=[],Module._GetWidgetItems(o),P.items=WidgetItemsArray,Module._GetItemsSelectedValue(o);var q=U8StringData;if(q){for(var K=0;K<WidgetItemsArray.length;K++)if(WidgetItemsArray[K].Value===q){P.selected=K;break}}else P.selected=null;FontDa={},Te(P,o,Module._GetAnnotFontDa(o));var J=Ee(U8StringData),X=t({fontSize:FontDa.fontSize||12},J);Object.assign(P,X);break;case j.SIGNATUREFIELDS:for(var $=0;$<a.length;$++){var ee=a[$].signaturePtr;Module._IsSameAnnotDict(ee,o)&&(SignerArray=[],Module._GetSigner(ee),SignerArray.length&&(P.isSignedDigitally=!0),P.signature=a[$])}P.isSigned=Module._IsStampSignature(o)}return P}function Te(e,t,n){if(RGBColor={},n){var r=FontDa,o=L(r.R,r.G,r.B);e.color=o}else if(Module._GetAnnotRGBColor(t)){var a=RGBColor,i=L(a.R,a.G,a.B);e.color=i}else e.color="#000000"}function Ee(e){var t=e.split("-")[0],n=/bold/i.test(e)?"bold":"normal";return{fontName:t,fontStyle:/(oblique|italic)/i.test(e)?"oblique":"normal",fontWeight:n}}function Re(e){var t=e.fontName,n=e.fontWeight,r=void 0===n?"normal":n,o=e.fontStyle,a=void 0===o?"normal":o;return["Helvetica","Courier","Times"].includes(t)?"bold"!==r||"italic"!==a&&"oblique"!==a?"bold"===r?t+"-"+Ge(r):"italic"===a||"oblique"===a?t+"-"+Ge("Times"===t?"italic":a):t:t+"-"+Ge(r)+Ge("Times"===t?"italic":a):t}function Ge(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Fe(e){for(var n=e.doc,r=[],o=[],a=Module._GetSignatureCount(n),i=0;i<a;i++){var u=Module._InitSignature(n,i);if(u){o.push(u);var c=[],l={signaturePtr:u,signerList:c};SignerArray=[],Module._GetSigner(u);for(var s=[],f=0;f<SignerArray.length;f++){var d=SignerArray[f];if(d){var p={signerPtr:d,isSignVerified:!1,isCertTrusted:!1,certificateList:s},g=Module._GetSignCert(d);if(g){CertArray=[],Module._ExportToFilePath(g,1),ComPDFKitJS.opened_cert[0]=CertArray[0],CertArray=[],Module._GetSignCertChain(g),CertArray.push(g);for(var h=0;h<CertArray.length;h++){var v=CertArray[h],A=t({certPtr:v},dn(v));s.push(A)}var _=ComPDFKitJS.opened_cert[0].length,P=Module._VerifyGetChain(u,g,0,_),m=void 0;if(m=P?null:Module._bEqualCert(g,0,_),P||m){p.isCertTrusted=!0;for(var y=0;y<p.certificateList.length;y++)p.certificateList[y].isTrusted=!0}var M=ComPDFKitJS.opened_files[0].length;if(1===Module._VerifySigner(u,d,0,M)){var I=Module._VerifyDocument(n,u,0,M);p.isSignVerified=1===I}DiffInfoArray=[],Module._GetSignatureDiffInfo(u),p.diffInfo=DiffInfoArray}Module._GetTimeStampSignature(d),c.push(p)}}if(SignerArray.length){Rect={},Module._GetSignatureRect(n,u),l.rect={left:T(Rect.Left),top:T(Rect.Top),right:T(Rect.Right),bottom:T(Rect.Bottom)},Module._GetSignatureFieldName(u),l.fieldName=U8StringData,Module._GetSignatureName(u),l.name=U8StringData||s[0].subject[5]||"",Module._GetSignatureTime(u);var w=U8StringData;l.date=C(w),Module._GetSignatureReason(u),l.reason=U8StringData,Module._GetSignatureLocation(u),l.location=U8StringData,l.pageIndex=Module._GetSignaturePageIndex(n,u),l.isDigital=1}else l.isDigital=0;r.push(l)}}return{signatures:r,signaturePtrList:o}}function De(e,t){return Le.apply(this,arguments)}function Le(){return Le=i(n().mark((function e(t,r){var o,a,i,u,c,l,s,f,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(DataArray=[],o=!!fontsJson||!!ComPDFKitJS.opened_DefFont[0],Module._SaveDocumentByStream(t,2,o),a=[],i=0;i<DataArray.length;i++)u=new Uint8Array(DataArray[i]),a.push(u);return DataArray=[],c=new Blob(a,{type:"application/pdf"}),e.next=9,le(c);case 9:return l=e.sent,s=Module._InitDocument(),f=ComPDFKitJS.opened_files.length,ComPDFKitJS.opened_files[f]=l,d=stringToNewUTF8(r),Module._LoadDocumentByStream(s,f,l.length,d),e.abrupt("return",s);case 16:case"end":return e.stop()}}),e)}))),Le.apply(this,arguments)}function Be(e,t){var n=Ne(e,t);return new Blob([n],{type:"application/pdf"})}function Ne(e,t){DataArray=[],1===t&&DataArray.push(ComPDFKitJS.opened_files[0]);var n=!!fontsJson||!!ComPDFKitJS.opened_DefFont[0];Module._SaveDocumentByStream(e,t,n);var r=DataArray.reduce((function(e,t){return e+t.length}),0),o=new Uint8Array(r),a=0;return DataArray.forEach((function(e){o.set(e,a),a+=e.length})),DataArray=[],o}function Ue(e){return ke.apply(this,arguments)}function ke(){return(ke=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.doc,o=t.saveType,a=void 0===o?2:o,i=t.password,u=t.oldPassword,c=t.permissionPassword,l=void 0===c?"":c,s=t.permissions,f=void 0===s?"":s,d=null,2!==a){e.next=21;break}if(u!==i&&i||f){e.next=7;break}d=Be(r,a),e.next=19;break;case 7:if(!i&&!f){e.next=18;break}return e.next=10,De(r,u);case 10:if(p=e.sent,!(g=Me({doc:p,password:i,permissionPassword:l,permissions:f}))||!g.code){e.next=14;break}return e.abrupt("return",g);case 14:d=Be(p,a),ComPDFKitJS.opened_files.pop(),e.next=19;break;case 18:d=Be(r,a);case 19:e.next=22;break;case 21:d=Be(r,a);case 22:return e.abrupt("return",d);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oe(){return(Oe=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.doc,o=t.saveType,a=void 0===o?2:o,i=t.password,u=t.oldPassword,c=t.permissionPassword,l=void 0===c?"":c,s=t.permissions,f=void 0===s?"":s,d=null,2!==a){e.next=21;break}if(u!==i&&i||f){e.next=7;break}d=Ne(r,a),e.next=19;break;case 7:if(!i&&!f){e.next=18;break}return e.next=10,De(r,u);case 10:if(p=e.sent,!(g=Me({doc:p,password:i,permissionPassword:l,permissions:f}))||!g.code){e.next=14;break}return e.abrupt("return",g);case 14:d=Ne(p,a),ComPDFKitJS.opened_files.pop(),e.next=19;break;case 18:d=Ne(r,a);case 19:e.next=22;break;case 21:d=Ne(r,a);case 22:return e.abrupt("return",d);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function We(e){var t=Module._GetComPDFkitLicenseErrorcode(),n={code:t};if(-105===t&&pe&&ge(pe),t)switch(t){case-100:n.message="The license is invalid";break;case-101:n.message="The license is expired";break;case-102:n.message="The license does not support the current platform";break;case-103:case-104:n.message="The license does not support your domain";break;case-105:n.message="The license does not support the "+e;break;case-106:n.message="License has not been initialized";break;case-107:n.message="The license does not support the current version";break;case-1e3:n.message="Illegal access to the API interface";break;case-1001:n.message="Failed to read license file"}return n}function je(){return je=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v,A,_;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.doc,o=t.saveType,a=void 0===o?2:o,i=t.password,u=void 0===i?"":i,c=t.oldPassword,l=void 0===c?"":c,e.next=3,De(r,l);case 3:for(s=e.sent,f=Module._GetPageCount(s),d=[],p=0;p<f;p++)g=Module._GetPage(s,p),d.push(g);h=0;case 8:if(!(h<d.length)){e.next=17;break}if(Module._FlattenPage(d[h]),!(v=We("PDF Annotation FLATTEN")).code){e.next=14;break}return ComPDFKitJS.opened_files.pop(),e.abrupt("return",v);case 14:h++,e.next=8;break;case 17:if(A=null,!u||u===l){e.next=26;break}if(!(_=Me({doc:s,password:u}))||!_.code){e.next=23;break}return ComPDFKitJS.opened_files.pop(),e.abrupt("return",_);case 23:A=Be(s,a),e.next=27;break;case 26:A=Be(s,a);case 27:return ComPDFKitJS.opened_files.pop(),e.abrupt("return",{blobData:A});case 29:case"end":return e.stop()}}),e)}))),je.apply(this,arguments)}function He(e){var t=e.annotPtr,n=e.date;n=n||new Date;var r=stringToNewUTF8(b(n));Module._SetAnnotCreationDate(t,r),function(e){var t=e.annotPtr,n=e.date;n=n||new Date;var r=stringToNewUTF8(b(n));Module._SetAnnotRecentlyModifyDate(t,r)}({annotPtr:t,date:n})}function Ye(e){var t=e.pagePtr,n=e.annotPtr,r=e.rect,o=r.left,a=r.right,i=r.bottom,u=r.top;return Module._SetAnnotRect(t,n,o,a,i,u)}function ze(e){var t=e.annotPtr,n=e.author,r=stringToNewUTF8(n);return Module._SetAnnotAuthor(t,r)}function Ze(e){var t=e.annotPtr,n=e.title,r=stringToNewUTF8(n);return Module._SetAnnotTitle(t,r)}function Qe(e){var t=e.annotPtr,n=e.contents,r=stringToNewUTF8(n),o=Module._SetAnnotContent(t,r);return _free(r),o}function qe(e){var t=e.annotPtr,n=F(e.borderColor);return!!Module._SetAnnotRGBColor(t,n.R,n.G,n.B)}function Ke(e){var t=e.annotPtr,n=F(e.borderColor);return!!Module._SetFreeTextBorderColor(t,n.R,n.G,n.B)}function Je(e){var t=e.annotPtr,n=e.fillColor;if(n){var r=F(n);return!!Module._SetFreeTextBgColor(t,r.R,r.G,r.B)}Module._ClearFreeTextBgColor(t)}function Xe(e){var t=e.annotPtr,n=e.fillColor;if(!n)return Module._ClearAnnotFilledRGBColor(t);var r=F(n);return!!Module._SetAnnotFilledRGBColor(t,r.R,r.G,r.B)}function Ve(e){var t=e.annotPtr,n=e.customData;"string"==typeof n&&Module._SetAnnotDictName(t,stringToNewUTF8("trn-custom-data"),stringToNewUTF8(n))}function $e(e){var t=e.annotPtr,n=e.opacity,r=void 0===n?1:n;return Module._SetAnnotTransparency(t,r)}function et(e){var t=e.annotPtr,n=e.borderWidth;Module._SetAnnotBorderWidth(t,n)}function tt(e){var t=e.annotPtr,n=e.fillTransparency,r=void 0===n?1:n;return Module._SetAnnotFilledTransparency(t,r)}function nt(e){for(var t=e.pagePtr,n=e.annotPtr,r=e.quadPoints,o=[],a=0;a<r.length;a++){var i=r[a];o.push(i.PointX,i.PointY)}for(var u=o.length,c=_malloc(4*u),l=0;l<u;l++)Module.HEAPF32[c/4+l]=o[l];var s=Module._SetQuadPoints(t,n,c,u);return _free(c),s}function rt(e){var t=e.pagePtr,n=e.annotPtr,r=e.linePoints;return Module._SetLinePoint(t,n,r[0],r[1],r[2],r[3])}function ot(e){for(var t=e.pagePtr,n=e.annotPtr,r=e.inkPointes,o=[],a=[],i=r.length,u=0;u<i;u++){for(var c=r[u].length,l=0;l<c;l++)o.push(r[u][l].PointX,r[u][l].PointY);a.push(c)}for(var s=a.length,f=_malloc(4*s),d=0;d<s;d++)Module.HEAP32[f/4+d]=a[d];var p=o.length,g=_malloc(4*p);for(d=0;d<p;d++)Module.HEAPF32[g/4+d]=o[d];Module._SetInkPath(t,n,f,i,g),_free(g)}function at(e){var t=e.doc,n=e.annotPtr,r=e.destPage,o=e.pageHeight;Module._SetLinkDestination(t,n,r-1,0,o,0)}function it(e){var t=e.annotPtr,n=e.url,r=stringToNewUTF8(n);Module._SetLinkUri(t,r)}function ut(e){var t=e.annotPtr,n=e.isChecked;Module._SetCheckBoxIsChecked(t,n);var r=We("PDF FORM FILL");if(r.code)return r}function ct(e){var t=e.annotPtr,n=e.isChecked;Module._SetRadioButtonIsChecked(t,n);var r=We("PDF FORM FILL");if(r.code)return r}function lt(e){var t=e.annotPtr,n=e.checkStyle;Module._SetWidgetCheckStyle(t,n)}function st(e){var t=e.annotPtr,n=F(e.fillColor);Module._SetWidgetBackgroundRGBColor(t,n.R,n.G,n.B)}function ft(e){var t=e.annotPtr,n=e.fieldName,r=stringToNewUTF8(n);Module._SetWidgetFieldName(t,r)}function dt(e){var t=e.annotPtr,n=e.fontName,r=e.fontWeight,o=e.fontStyle,a=e.fontSize,i=F(e.color||e.textColor||"#000000"),u=Re({fontName:n,fontWeight:r,fontStyle:o}),c=stringToNewUTF8(u);return Module._SetAnnotFontDa(t,c,a,i.R,i.G,i.B)}function pt(e){var t=e.annotPtr,n=e.selected;Module._SetItemsSelectedIndex(t,n);var r=We("PDF FORM FILL");if(r.code)return r}function gt(e){var t=e.doc,n=e.annotPtr,r=e.destPage,o=e.pageHeight,a=e.actionType,i=Module._InitAction();Module._SetActionType(i,a),r&&1==a&&(Module._SetDestination(i,t,r-1,0,o,0),Module._SetButtonAction(n,i),Module._ClearAction(i))}function ht(e){var t=e.annotPtr,n=e.url,r=e.actionType,o=Module._InitAction();if(Module._SetActionType(o,r),n&&6==r){var a=stringToNewUTF8(n);Module._SetUriPath(o,a),Module._SetButtonAction(t,o),Module._ClearAction(o)}}function vt(e){var t=e.annotPtr,n=e.contents,r=stringToNewUTF8(n);Module._SetTextFieldContent(t,r);var o=We("PDF FORM FILL");if(o.code)return o}function At(e){var t=e.annotPtr,n=e.item,r=n.index,o=n.value,a=n.string,i=stringToNewUTF8(o),u=stringToNewUTF8(a);Module._AddOptionItem(t,r,i,u)}function _t(e){var t=e.annotPtr,n=e.fontName,r=e.fontWeight,o=e.fontStyle,a=e.fontSize,i=e.color,u=e.textAlignment,c=e.contents,l=Re({fontName:n,fontWeight:r,fontStyle:o}),s=k[u.toUpperCase()],f=stringToNewUTF8(l),d=stringToNewUTF8(c),p=F(i);Module._SetFreeText(t,f,a,p.R,p.G,p.B,s,d),Module._SetAnnotContent(t,d),_free(d)}function Pt(e){var t=e&&"object"===o(e),n=t?e.editAreaPtr:e,r=t&&e.width&&e.height&&e.stride?e:function(e){return ImageAreaInfo={},Module._GetImageAreaSize(e),{width:ImageAreaInfo.Width,height:ImageAreaInfo.Height,stride:ImageAreaInfo.Stride}}(n);return{editAreaPtr:n,width:r.width,height:r.height,stride:r.stride}}function mt(e){var t=Pt(e),n=function(e){var t=e.editAreaPtr,n=e.width,r=e.height,o=e.stride,a=parseInt(n),i=parseInt(r),u=parseInt(o),c=u*i,l=a*i*4;if(!Number.isFinite(c)||!Number.isFinite(l)||c<l||c<=0)return new Uint8Array;var s=_malloc(c);if(!s)return new Uint8Array;if(Module.HEAPU8.fill(0,s,s+c),!Module._GetImageAreaData(t,s,c))return _free(s),new Uint8Array;for(var f=new Uint8Array(l),d=0;d<i;d++)for(var p=0;p<a;p++){var g=d*u+4*p,h=d*a*4+4*p;f[h]=Module.HEAPU8[s+g+2],f[h+1]=Module.HEAPU8[s+g+1],f[h+2]=Module.HEAPU8[s+g],f[h+3]=Module.HEAPU8[s+g+3]}return _free(s),f}(t);return{imageArray:n,width:t.width,height:t.height,stride:t.stride}}function yt(e){var t=e.pagePtr,n=e.editPagePtr,r=e.editAreaPtr,o=e.rect,a=se(e.imageBase64);return ComPDFKitJS.opened_image=[],ComPDFKitJS.opened_image[0]=a,Module._ReplaceImageAreaByStream(t,n,r,o.left,o.right,o.bottom,o.top,0,a.length,!0)}function Mt(e){var t=e.pagePtr,n=e.editPagePtr,r=e.rect,o=se(e.imageBase64);ComPDFKitJS.opened_image=[],ComPDFKitJS.opened_image[0]=o;var a=Module._CreateNewImageAreaByStream(t,n,r.left,r.right,r.bottom,r.top,0,o.length,!0),i=Module._GetPageRotation(t);if(i%4!=0){var u=90*i;Module._RotateImage(a,u,!1)}return a}function It(e){return Module._IsTextArea(e)?"text":Module._IsImageArea(e)?"image":null}function wt(e){for(var t=Module._GetEditAreaCount(e),n=[],r=0;r<t;r++){var o=Module._GetEditArea(e,r);o&&n.push({editAreaPtr:o,editAreaIndex:r,type:It(o)})}return n}function xt(){return(xt=i(n().mark((function e(t){var r,o,a,i,u,c,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.pagePtr,o=t.editPagePtr,a=wt(o),i=[],u=h(a),e.prev=4,u.s();case 6:if((c=u.n()).done){e.next=15;break}return l=c.value,e.t0=i,e.next=11,St(r,l);case 11:e.t1=e.sent,e.t0.push.call(e.t0,e.t1);case 13:e.next=6;break;case 15:e.next=20;break;case 17:e.prev=17,e.t2=e.catch(4),u.e(e.t2);case 20:return e.prev=20,u.f(),e.finish(20);case 23:return e.abrupt("return",i);case 24:case"end":return e.stop()}}),e,null,[[4,17,20,23]])})))).apply(this,arguments)}function St(e,t){return bt.apply(this,arguments)}function bt(){return(bt=i(n().mark((function e(r,o){var a,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=o.editAreaPtr,"text"!==(i=o.type)){e.next=11;break}return e.t0=t,e.t1=t({},o),e.t2={},e.t3=Dt({pagePtr:r,editAreaPtr:a}),e.next=8,Wt(a);case 8:return e.t4=e.sent,e.t5={frame:e.t3,text:e.t4},e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t5));case 11:if("image"!==i){e.next=13;break}return e.abrupt("return",t(t({},o),{},{frame:Dt({pagePtr:r,editAreaPtr:a}),clipRect:Lt({pagePtr:r,editAreaPtr:a}),opacity:Module._GetImageTransparency(a)}));case 13:return e.abrupt("return",o);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ct(e){return Rect={},e(),{left:Rect.Left,top:Rect.Top,right:Rect.Right,bottom:Rect.Bottom}}function Tt(){EditCharPlace={}}function Et(){Tt(),EndEditCharPlace={}}function Rt(){return{start:t({},EditCharPlace),end:t({},EndEditCharPlace)}}function Gt(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?[e.SectionIndex||0,e.LineIndex||0,e.RunIndex||0,e.CharIndex||0]:[e.SectionIndex,e.LineIndex,e.RunIndex,e.CharIndex]}function Ft(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return[].concat(d(Gt(e.start,t)),d(Gt(e.end,t)))}function Dt(e){var t=e.pagePtr,n=e.editAreaPtr;return Ct((function(){return Module._GetFrame(t,n)}))}function Lt(e){var t=e.pagePtr,n=e.editAreaPtr;return Ct((function(){return Module._GetClipRect(t,n)}))}function Bt(e){var n,r=e.pagePtr,o=e.editAreaPtr,a=e.char;return CursorPoints={},(n=Module)._GetTextCursorPoints.apply(n,[r,o].concat(d(Gt(a)))),t({},CursorPoints)}function Nt(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.startPoint,o=e.endPoint;return Et(),Module._SelectCharsRangeAtPos(t,n,r.x,r.y,o.x,o.y),Rt()}function Ut(e){var t=e.pagePtr,n=e.editAreaPtr,r=e.pointX,o=e.pointY;return Et(),Module._GetSectionAtPos(t,n,r,o),Rt()}function kt(e){var n=e.pagePtr,r=e.editAreaPtr,o=e.point,a=Module._InitText(n);if(PDFRange={},U8StringData="",Module._GetSelectionForWordAtPos(n,a,o.x,o.y,5,5),!U8StringData)return Module._ClearText(a),null;if(TextRectArray=[],Module._GetRects(n,a,PDFRange.Location,PDFRange.Length),Module._ClearText(a),!TextRectArray.length)return null;var i=TextRectArray[0],u=TextRectArray[TextRectArray.length-1];return t(t({},Nt({pagePtr:n,editAreaPtr:r,startPoint:{x:i.Left,y:(i.Top+i.Bottom)/2},endPoint:{x:u.Right,y:(u.Top+u.Bottom)/2}})),{},{textContent:U8StringData})}function Ot(){return(Ot=i(n().mark((function e(r){var o,a,i,u,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=r.editAreaPtr,a=r.char,i=r.selectedCharRange,u=en({editAreaPtr:o,char:a,selectedCharRange:i}),!i){e.next=8;break}return e.next=5,Ht({editAreaPtr:o,start:i.start,end:i.end});case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0="";case 9:return c=e.t0,e.abrupt("return",t(t({},u),{},{selectedText:c,selectedCharRange:i}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wt(e){return jt.apply(this,arguments)}function jt(){return(jt=i(n().mark((function e(t){var r,o,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Zt(t),o=r.start,a=r.end,e.next=3,Ht({editAreaPtr:t,start:o,end:a});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ht(e){return Yt.apply(this,arguments)}function Yt(){return(Yt=i(n().mark((function e(t){var r,o,a,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.editAreaPtr,a=t.start,i=t.end,U8StringData="",e.next=4,(r=Module)._GetTextByRange.apply(r,[o].concat(d(Ft({start:a,end:i}))));case 4:return e.abrupt("return",U8StringData);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zt(e){var t,n=e.pagePtr,r=e.editAreaPtr,o=e.start,a=e.end;return RectArray=[],(t=Module)._GetSelectLineRects.apply(t,[n,r].concat(d(Ft({start:o,end:a})))),RectArray}function Zt(e){return Et(),Module._GetBeginAndEndCharPlace(e),Rt()}function Qt(e){var n,r=e.editAreaPtr,o=e.char,a=e.text;Tt();var i=stringToNewUTF8(a);return(n=Module)._InsertText.apply(n,[r].concat(d(Gt(o,!0)),[i,!0])),t({},EditCharPlace)}function qt(e){var n,r=e.editAreaPtr,o=e.char;return Tt(),(n=Module)._BackSpaceChar.apply(n,[r].concat(d(Gt(o)),[!0])),t({},EditCharPlace)}function Kt(e){var n,r=e.editAreaPtr,o=e.char;return Tt(),(n=Module)._DeleteChar.apply(n,[r].concat(d(Gt(o)),[!0])),t({},EditCharPlace)}function Jt(e){var n,r=e.editAreaPtr,o=e.start,a=e.end;return Tt(),(n=Module)._DeleteChars.apply(n,[r].concat(d(Ft({start:o,end:a},!0)),[!0])),t({},EditCharPlace)}function Xt(){return(Xt=i(n().mark((function e(t){var r,o,a,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.action,o=t.pagePtr,a=t.editAreaPtr,i="BackSpaceChar"===r?qt(t):"DeleteChar"===r?Kt(t):"DeleteChars"===r?Jt(t):t.char,e.t0=i,e.t1=Dt({pagePtr:o,editAreaPtr:a}),e.t2=Bt({pagePtr:o,editAreaPtr:a,char:i}),e.next=7,Wt(a);case 7:return e.t3=e.sent,e.abrupt("return",{activeCharPlace:e.t0,frame:e.t1,cursorPoints:e.t2,text:e.t3});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vt(e){var t=e.pagePtr,n=e.editPagePtr,r=e.rect,o=e.fontData,a=e.alignType;return Module._CreateNewTextArea(t,n,r.left,r.right,r.bottom,r.top,stringToNewUTF8(o.fontName),o.fontSize,o.r,o.g,o.b,o.opacity,o.isBold,o.italic,a,!0)}function $t(e){return{canUndo:!!Module._CanUndo(e)}}function en(e){var n,r,o,a,i,u,c=e.editAreaPtr,l=e.char,s=e.selectedCharRange,f=Zt(c),p=s||f;EditTextStyle={},(n=Module)._GetTextStyle.apply(n,[c].concat(d(Gt(l))));var g=t({},EditTextStyle);return U8StringData="",(r=Module)._GetBaseFontName.apply(r,[c].concat(d(Gt(l)))),{textStyle:g,fontFamily:U8StringData,lineSpacing:(o=Module)._GetLineLeading.apply(o,[c].concat(d(Gt(l)))),paragraphSpacing:(a=Module)._GetSectionAfterLeading.apply(a,[c].concat(d(Gt(l)))),characterSpacing:(i=Module)._GetCharacterSpacing.apply(i,[c].concat(d(Ft(p)))),alignType:(u=Module)._GetTextSectionAlignType.apply(u,[c].concat(d(Gt(l)))),entireCharRange:f}}function tn(e){return nn.apply(this,arguments)}function nn(){return(nn=i(n().mark((function e(r){var o,a,i,u,c,l,s,f;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=r.pagePtr,a=r.editAreaPtr,i=r.char,u=r.selectedCharRange,c=en({editAreaPtr:a,char:i,selectedCharRange:u}),l=u||c.entireCharRange,s=zt({pagePtr:o,editAreaPtr:a,start:l.start,end:l.end}),e.next=6,Ht({editAreaPtr:a,start:l.start,end:l.end});case 6:return f=e.sent,e.abrupt("return",t(t({},c),{},{selectedRects:s,selectedText:f,selectedCharRange:l}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function rn(){return(rn=i(n().mark((function e(r){var o,a,i,u,c,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=r.pagePtr,a=r.editAreaPtr,i=r.point,u=r.type,null!=(c="paragraph"===u?Ut({pagePtr:o,editAreaPtr:a,pointX:i.x,pointY:i.y}):kt({pagePtr:o,editAreaPtr:a,point:i}))&&c.start&&null!=c&&c.end&&!on(c.start,c.end)){e.next=4;break}return e.abrupt("return",{selected:!1});case 4:return e.next=6,tn({pagePtr:o,editAreaPtr:a,char:c.end,selectedCharRange:c});case 6:return l=e.sent,e.abrupt("return",t(t({selected:!0},l),{},{cursorPoints:Bt({pagePtr:o,editAreaPtr:a,char:c.end})}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function on(e,t){return e.SectionIndex===t.SectionIndex&&e.LineIndex===t.LineIndex&&e.RunIndex===t.RunIndex&&e.CharIndex===t.CharIndex}function an(e,t,n){var r;(r=Module)["_"+n].apply(r,[e].concat(d(Ft(t)),[!0]))}function un(e,t){return e.CharIndex===t.start.CharIndex?t.start:t.end}function cn(){return(cn=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,p,g,h,v,A,_,P,m,y,M,I,w,x,S,b,C;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(p in r=t.pagePtr,o=t.editAreaPtr,a=t.props,i=t.char,u=t.selectedCharRange,c=t.state,l=i,s=u||Zt(o),f=0,a)"alignType"!==p&&"textAlign"!==p||(g="alignType"===p?a[p]:(n=a[p],void 0,{LEFT:2,CENTER:5,RIGHT:3},{LEFT:2,CENTER:5,RIGHT:3}[String(n).toUpperCase()]||2),u||2!==c?(v=Module)._SetTextAligningRange.apply(v,[o,g].concat(d(Ft(s)),[!0])):(h=Module)._SetTextAligningSection.apply(h,[o,g].concat(d(Gt(i)),[!0])),f++),"color"===p&&(_=D(a.color),(A=Module)._SetCharsFontColor.apply(A,[o].concat(d(Ft(s,!0)),[_.R,_.G,_.B,!0])),f++),"opacity"===p&&((P=Module)._SetCharsFontTransparency.apply(P,[o].concat(d(Ft(s)),[a.opacity/100,!0])),f++),"fontSize"===p&&((m=Module)._SetCharsFontSize.apply(m,[o].concat(d(Ft(s)),[a.fontSize,!0,!0])),f++),"fontFamily"===p&&(M=stringToNewUTF8(a.fontFamily),(y=Module)._SetFontFromNativeTrueTypeFont.apply(y,[o].concat(d(Ft(s)),[M,!0])),f++),"fontStyle"===p&&(I=a.fontStyle,(w=function(e){an(o,s,e),f++})("ClearCharsFontBold"),s=ln(o,s),l=un(l,s),w("ClearCharsFontItalic"),s=ln(o,s),l=un(l,s),1===I||"bold"===I?w("SetCharsFontBold"):2===I||"italic"===I?w("SetCharsFontItalic"):3!==I&&"boldItalic"!==I||(w("SetCharsFontBold"),s=ln(o,s),l=un(l,s),w("SetCharsFontItalic"))),"lineSpacing"===p&&((x=Module)._SetLineLeading.apply(x,[o].concat(d(Gt(i)),[a.lineSpacing])),f++),"paragraphSpacing"===p&&((S=Module)._SetSectionAfterLeading.apply(S,[o].concat(d(Gt(i)),[a.paragraphSpacing])),f++),"characterSpacing"===p&&((b=Module)._SetCharacterSpacing.apply(b,[o].concat(d(Ft(s)),[a.characterSpacing])),f++);return u&&2===c&&(s=ln(o,s),l=un(i,s)),e.next=8,tn({pagePtr:r,editAreaPtr:o,char:l,selectedCharRange:u?s:u});case 8:return(C=e.sent).cursorPoints=Bt({pagePtr:r,editAreaPtr:o,char:l}),e.abrupt("return",{frame:Dt({pagePtr:r,editAreaPtr:o}),selectionInfo:C,selectedCharRange:C.selectedCharRange,activeCharPlace:l,undoBatchCount:f});case 11:case"end":return e.stop()}var n}),e)})))).apply(this,arguments)}function ln(e,t){var n;return Et(),(n=Module)._RefreshRange.apply(n,[e].concat(d(Ft(t)))),Rt()}function sn(e,n){return Tt(),{editAreaPtr:"Redo"===e?Module._Redo(n):Module._Undo(n),editCharPlace:t({},EditCharPlace)}}function fn(e,t){for(var n=t.editPagePtr,r=t.count,o=void 0===r?1:r,a=[],i=0;i<o;i++)a.push(sn(e,n));return{results:a,canUndo:!!Module._CanUndo(n),canRedo:!!Module._CanRedo(n)}}function dn(e){var t=["C","ST","L","O","OU","CN","email"],n=Module._GetSignVersion(e);Module._GetSignAlgOid(e);for(var r=U8StringData,o=function(e){switch(e){case"1.2.840.113549.1.1.1":default:return"RSA_RSA";case"1.2.840.113549.1.1.2":return"MD2RSA";case"1.2.840.113549.1.1.3":return"MD4RSA";case"1.2.840.113549.1.1.4":return"MD5RSA";case"1.2.840.113549.1.1.5":return"SHA1RSA";case"1.2.840.113549.1.1.11":return"SHA256RSA";case"1.2.156.10197.1.501":return"SM3SM2"}}(r),a={},i=0;i<7;i++)Module._GetSignSubject(e,i),a[t[i]]=U8StringData;for(var u=[],c=0;c<7;c++)Module._GetSignIssuer(e,c),u[t[c]]=U8StringData;Module._GetSignSerialNumber(e);var l=U8StringData;Module._GetSignValidDate(e,0);var s=U8StringData;Module._GetSignValidDate(e,1);var f=U8StringData;AccessInfoArray=[],Module._GetAuthorityInfoAccess(e);var d=AccessInfoArray;Module._GetSubjectKeyIdentifier(e);var p=U8StringData,g=Module._GetKeyUsage(e);PolicyArray=[],Module._GetCertificatePolicies(e);var h=PolicyArray;Module._GetAuthorityKeyIdentifier(e);var v=U8StringData;CRLPointArray=[],Module._GetCRLDistributionPoints(e);var A=CRLPointArray;Module._GetBasicConstraints(e);var _=U8StringData;Module._GetPublicKey(e);var P=U8StringData;Module._GetX509Data(e);var m=U8StringData;Module._GetSHA1Digest(e);var y=U8StringData;Module._GetMD5Digest(e);var M=U8StringData;return OCSPUrlArray=[],Module._GetOCSPUrl(e),{version:n,signAlgOid:r,signAlgOidType:o,subject:a,issuer:u,serialNumber:l,validDateStart:s,validDateEnd:f,sccessInfo:d,subjectKeyIdentifier:p,keyUsage:g,certificatePolicies:h,authorityKeyIdentifier:v,CRLDistributionPoints:A,basicConstraints:_,publicKey:P,X509Data:m,SHA1Digest:y,MD5Digest:M,ocspURL:OCSPUrlArray}}function pn(e){return gn.apply(this,arguments)}function gn(){return(gn=i(n().mark((function e(t){var r,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=se(t.imageBase64),o=ComPDFKitJS.opened_image.length,ComPDFKitJS.opened_image[o]=r,Module._UpdateAPWithImage(t.annotPtr,o,r.length,1,0);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hn(e){var t=e.annotPtr,n=e.content,r=void 0===n?"":n,o=e.isDrawOnlyContent,a=void 0!==o&&o,i=e.isDrawLogo,u=void 0!==i&&i,c=e.isContentAlginLeft,l=void 0!==c&&c,s=e.text,f=void 0===s?"":s,d=e.logoBase64,p=void 0===d?"":d,g=e.imageBase64,h=void 0===g?"":g,v=stringToNewUTF8(r),A=stringToNewUTF8(f);ComPDFKitJS.opened_image=[];var _=ComPDFKitJS.opened_image.length,P=0;if(p){var m=se(p);ComPDFKitJS.opened_image[_]=m,P=m.length}var y=ComPDFKitJS.opened_image.length,M=0;if(h){var I=se(h);ComPDFKitJS.opened_image[y]=I,M=I.length,""!==r||""!==f||p||(ComPDFKitJS.opened_image[_]=I,P=I.length,M=0,u=!0)}Module._UpdateApWithDigitalSigConfig(t,v,a,u,l,A,_,P,y,M,0,0,0,0,0,0)}function vn(e,t,n){AnnotArray=[];var r=[];Module._GetReplies(e,t);for(var o=0;o<AnnotArray.length;o++){var a=AnnotArray[o];Rect={},Module._GetAnnotRect(e,a);var i={left:T(Rect.Left),top:T(Rect.Top),right:T(Rect.Right),bottom:T(Rect.Bottom)};Module._GetAnnotCreationDate(a);var u=C(U8StringData);Module._GetAnnotContent(a);var c=U8StringData;Module._GetAnnotTitle(a);var l=U8StringData;Module._GetAnnotAuthor(a);var f=U8StringData,d=T(Module._GetAnnotTransparency(a));U8StringData="",Module._GetAnnotDictName(a,stringToNewUTF8("NM"));var p=U8StringData;p||(p=M(),Module._SetAnnotDictName(a,stringToNewUTF8("NM"),stringToNewUTF8(p)));var g=Module._GetAnnotBorderWidth(a),h=s(s(s(s({inReplyTo:n,date:u,contents:c,rect:i,opacity:d,name:p,pagePtr:e,annotPtr:a,title:l,author:f},"date",u),"opacity",d),"borderWidth",g),"fillTransparency",1);if(Module._IsReviewStateAnnot(a)){var v=Module._GetState(a);h.state=ne[v],h.stateModel="Review"}if(Module._IsMarkedStateAnnot(a)){var A=Module._GetState(a);h.state=ne[A],h.stateModel="Marked"}r.push(h)}return r}function An(e){for(var t=e.pagePtr,n=e.scale,r=e.left,o=e.right,a=e.bottom,i=e.top,u=e.mode,c=e.flag,l=e.ocgsPtr,s=e.form,f=4*(parseInt(o-r)*parseInt(a-i)),d=_malloc(f),p=l.length,g=_malloc(4*p),h=0;h<p;h++)Module.HEAP32[g/4+h]=l[h];Module._RenderPageBitmapWithMatrix2(t,n,r,o,a,i,u,d,c,g,p,s);var v=We("PDF VIEWER RENDER");if(v.code)return _free(g),_free(d),v;var A=new Uint8Array(f);for(h=0;h<f;h+=4)A[h]=Module.HEAPU8[d+h+2],A[h+1]=Module.HEAPU8[d+h+1],A[h+2]=Module.HEAPU8[d+h],A[h+3]=Module.HEAPU8[d+h+3];return _free(g),_free(d),{imageArray:A}}function _n(e,t){var n=t.pagePtr,r=t.annotPtr,o=t.rulerPtr,a=t.color,i=t.borderColor,u=t.borderWidth,c=t.contents,l=t.date,s=t.opacity,f=t.fillTransparency,d=t.rect,p=t.author,g=t.fillColor,h=t.quadPoints,v=t.fontName,A=t.fontSize,_=t.vertices,P=t.borderStyle,m=t.dashes,y=t.head,M=t.tail,I=t.linePoints,w=t.inkPointes,x=t.arcPoints;i&&qe({annotPtr:r,borderColor:i}),i&&function(e){var t=e.annotPtr,n=F(e.borderColor);Module._SetAnnotBorderRGBColor(t,n.R,n.G,n.B)}({annotPtr:r,borderColor:i}),Object.hasOwn(t,"fillColor")&&Xe({annotPtr:r,fillColor:g}),l&&He({annotPtr:r,date:l}),isFinite(s)&&(!function(e){var t=e.annotPtr,n=e.opacity,r=void 0===n?1:n;Module._setMeasureTextTransparency(t,r)}({annotPtr:r,opacity:s}),$e({annotPtr:r,opacity:s})),f&&tt({annotPtr:r,fillTransparency:f}),d&&Ye({pagePtr:n,annotPtr:r,rect:d}),p&&ze({annotPtr:r,author:p}),h&&nt({pagePtr:n,annotPtr:r,quadPoints:h}),u&&et({annotPtr:r,borderWidth:u}),(P||m)&&In({annotPtr:r,borderWidth:u,borderStyle:P,dashes:m}),v&&A&&a&&dt(t),_&&mn({pagePtr:n,annotPtr:r,vertices:_}),null==y&&null==M||Module._SetLineType(r,Q[y.toUpperCase()],Q[M.toUpperCase()]),I&&rt({pagePtr:n,annotPtr:r,linePoints:I}),w&&ot({pagePtr:n,annotPtr:r,inkPointes:w});var S=t.precision,b=t.scale,C=t.labelPosition,E=t.leadLength,R=t.leadOffset,G=t.leadExtension;(S&&function(e){var t=e.rulerPtr,n=e.precision;Module._setPrecision(t,Math.pow(10,-Math.floor(Math.log10(n))))}({rulerPtr:o,precision:S}),b&&function(e){var t=e.rulerPtr,n=e.scale,r=n.base,o=n.baseUnit,a=n.translate,i=n.translateUnit;Module._setMeasureScale(t,r,stringToNewUTF8(o),a,stringToNewUTF8(i))}({rulerPtr:o,scale:b}),C&&function(e){var t=e.rulerPtr,n=e.labelPosition;if("top"===n)return Module._setLabelTop(t);if("inside"===n)Module._setLabelInside(t)}({rulerPtr:o,labelPosition:C}),E&&function(e){var t=e.rulerPtr,n=e.leadLength;Module._setLeadLength(t,n)}({rulerPtr:o,leadLength:E}),R&&function(e){var t=e.rulerPtr,n=e.leadOffset;Module._setLeadOffset(t,n)}({rulerPtr:o,leadOffset:R}),G&&function(e){var t=e.rulerPtr,n=e.leadExtension;Module._setLeadExtension(t,n)}({rulerPtr:o,leadExtension:G}),x)&&(PageSize.Width=0,PageSize.Height=0,Module._GetPageSizeForIndex(e,t.pageIndex),function(e){e.annotPtr;for(var t=e.rulerPtr,n=e.arcPoints,r=e.pageHeight,o=function(e,t){var n=e.map((function(e){return{x:e.x,y:t-e.y}}));return n}(n,r),a=[],i=0;i<o.length;i++){var u=o[i];a.push(u.x,u.y)}for(var c=a.length,l=_malloc(4*c),s=0;s<c;s++)Module.HEAPF32[l/4+s]=a[s];var f=Module._SetArcPoints(t,l);_free(l)}({annotPtr:r,rulerPtr:o,arcPoints:x,pageHeight:PageSize.Height}),Rect={},Module._GetArcRectScreen(o,n),Ye({pagePtr:n,annotPtr:r,rect:{left:T(Rect.Left),top:T(Rect.Top),right:T(Rect.Right),bottom:T(Rect.Bottom)}}));Module._UpdateAnnotMeasure(o),t.hasOwnProperty("contents")&&Qe({annotPtr:r,contents:c}),Module._UpdateAnnotAp(r,0),w&&u&&i&&s&&function(e){for(var t=e.pagePtr,n=e.annotPtr,r=e.inkPointes,o=e.borderWidth,a=e.borderColor,i=e.opacity,u=e.isArc,c=[],l=[],s=r.length,f=0;f<s;f++){for(var d=r[f].length,p=0;p<d;p++)c.push(r[f][p].PointX,r[f][p].PointY);l.push(d)}for(var g=l.length,h=_malloc(4*g),v=0;v<g;v++)Module.HEAP32[h/4+v]=l[v];var A=c.length,_=_malloc(4*A);for(v=0;v<A;v++)Module.HEAPF32[_/4+v]=c[v];var P=F(a);u?Module._UpdateApWithInkArc(t,n,h,s,_,o,P.R,P.G,P.B,i):Module._UpdateAnnotApWithInk(t,n,h,s,_,o,P.R,P.G,P.B,i);_free(_)}({pagePtr:n,annotPtr:r,inkPointes:w,borderWidth:u,borderColor:i,opacity:s,isArc:!!x})}function Pn(e,t,n){MeasureInfo={},Module._getMeasureInfo(t);var r=Module._getCaptionTypes(e),o=Module._GetMeasureType(t);Module._setLabelInside(t);var a={captionType:ie[r],measureType:oe[o],scale:{base:MeasureInfo.RulerBase,baseUnit:MeasureInfo.RulerBaseUnit,translate:MeasureInfo.RulerTranslate,translateUnit:MeasureInfo.RulerTranslateUnit},precision:MeasureInfo.precision,factor:MeasureInfo.factor};FontDa={},Module._GetAnnotFontDa(e);var i=U8StringData;switch(a.fontName=i,a.fontSize=FontDa.fontSize,a.color=L(FontDa.R,FontDa.G,FontDa.B),RGBColor={},hasColor=Module._GetAnnotRGBColor(e),hasColor&&(a.borderColor=L(RGBColor.R,RGBColor.G,RGBColor.B)),n){case"line":a.length=Module._getMeasurementResults(t,ae.LENGTH),a.leadOffset=Module._getLeadOffset(t);var u=Module._getLeadLength(t),c=Module._getLeadExtension(t);u<0&&(c-=u,u=0),c<0&&(u-=c,c=0),a.leadLength=u,a.leadExtension=c,a.labelPosition="inside";break;case"rectangle":case"circle":case"polygon":a.area=Module._getMeasurementResults(t,ae.AREA),a.perimeter=Module._getMeasurementResults(t,ae.LENGTH),a.labelPosition="inside";break;case"polyline":a.perimeter=Module._getMeasurementResults(t,ae.LENGTH);break;case"ink":"generic"===a.captionType&&(a.perimeter=Module._getMeasurementResults(t,ae.GENERIC)),"arclength"===a.captionType&&(a.arcLength=Module._getMeasurementResults(t,ae.ARCLENGTH))}return a}function mn(e){for(var t=e.pagePtr,n=e.annotPtr,r=e.vertices,o=[],a=0;a<r.length;a++){var i=r[a];o.push(i.x,i.y)}for(var u=o.length,c=_malloc(4*u),l=0;l<u;l++)Module.HEAPF32[c/4+l]=o[l];var s=Module._setVertices(t,n,c,u);return _free(c),s}function yn(e){var t=e.doc,n=e.pageIndex,r=e.annotPtr,o=e.floatPoint;PageSize.Width=0,PageSize.Height=0,Module._GetPageSizeForIndex(t,n);for(var a=[],i=0;i<o.length;i++){var u=o[i];a.push(u.x,PageSize.Height-u.y)}for(var c=a.length,l=_malloc(4*c),s=0;s<c;s++)Module.HEAPF32[l/4+s]=a[s];Module._SetFreetextCallout(r,l,c),_free(l)}function Mn(e){var t=e.annotPtr,n=e.rectDiff;Module._SetFreetextRectDiff(t,n.left,n.top,n.right,n.bottom)}function In(e){var t=e.annotPtr,n=e.dashes,r=void 0===n?"":n,o=e.borderStyle,a=e.borderWidth,i=void 0===a?1:a,u=X[o];if("cloudy"===o)Module._SetAnnotBorderStyle2(t,0),Module._SetBorderEffect(t,e.intensity,1);else if("dashed"===o){Module._SetBorderEffect(t,0,0);for(var c=(r=r.split(",")).length,l=_malloc(4*c),s=0;s<c;s++)Module.HEAPF32[l/4+s]=r[s];Module._SetAnnotBorderStyle(t,u,i,l,c),_free(l)}else Module._SetAnnotBorderStyle2(t,u)}function wn(e){var t=e.pagePtr,n=e.annotPtr;MeasureVerticesArray=[],Module._getVertices(t,n);for(var r=[],o=0;o<MeasureVerticesArray.length;o++){var a=MeasureVerticesArray[o];a&&r.push({x:a.PointX,y:a.PointY})}if(r.length>2){var i=r[r.length-1];r[0].x===i.x&&r[0].y===i.y&&r.pop()}return r}function xn(e){return Sn.apply(this,arguments)}function Sn(){return Sn=i(n().mark((function e(t){var r,o,a,i,u,c,l,s,f,d,p,g,h,v,A,_,P,m;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.doc,o=t.password,a=void 0===o?"":o,i=t.oldPassword,u=void 0===i?"":i,c=t.flags,l=t.quality,s=t.colImagePPI,f=t.grayImagePPI,d=t.monImagePPI,e.next=3,De(r,u);case 3:if(p=e.sent,!(g=We("PDF Optimization")).code){e.next=8;break}return ComPDFKitJS.opened_files.pop(),e.abrupt("return",g);case 8:if(!a||a===u){e.next=13;break}if(!(h=Me({doc:p,password:a}))||!h.code){e.next=13;break}return ComPDFKitJS.opened_files.pop(),e.abrupt("return",h);case 13:for(v=bn(c),A=!!fontsJson||!!ComPDFKitJS.opened_DefFont[0],DataArray=[],Module._SetOptimizeOption(p,v,l),Module._SetOptimizeOptionPPI(p,v,l,s.uperPPI,s.targetPPI,f.uperPPI,f.targetPPI,d.uperPPI,d.targetPPI),Module._OptimizeDocumentByStream(p,A),_=[],P=0;P<DataArray.length;P++)m=new Uint8Array(DataArray[P]),_.push(m);return ComPDFKitJS.opened_files.pop(),e.abrupt("return",new Blob(_,{type:"application/pdf"}));case 23:case"end":return e.stop()}}),e)}))),Sn.apply(this,arguments)}function bn(e){for(var t=0,n=0,r=Object.entries(ue);n<r.length;n++){var o=f(r[n],2),a=o[0],i=o[1];e[a.replace("OPTIMIZE_FLAG_","")]&&(t|=i)}return t}(function(){return me.apply(this,arguments)})().then((function(){Pe.setUp()}));
|