vendor: 4,550 bytes, lines 1-2
1/*! For license information please see main.2a4f252a.js.LICENSE.txt */ 2(()=>{"use strict";var e={730:(e,t,n)=>{var i=n(43),r=n(853);function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,o={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(o[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),h=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function g(e,t,n,i,r,s,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,i){var r=m.hasOwnProperty(t)?m[t]:null;(null!==r?0!==r.type:i||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,i){if(null===t||"undefined"===typeof t||function(e,t,n,i){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,r,i)&&(n=null),i||null===r?function(e){return!!h.call(p,e)||!h.call(f,e)&&(d.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=null===n?3!==r.type&&"":n:(t=r.attributeName,i=r.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(r=r.type)||4===r&&!0===n?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode
2-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),C=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),L=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var I=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var D=Symbol.iterator;function N(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=D&&e[D]||e["@@iterator"])?e:null}var F,O=Object.assign;function W(e){if(void 0===F)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);F=t&&t[1]||""}return"\n"+F+e}var j=!1;function B(e,t){if(!e||j)return"";j=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var i=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){i=c}e.call(t.prototype)}else{try{throw Error()}catch(c){i=c}e()}}catch(c){if(c&&i&&"string"===typeof c.stack){for(var r=c.stack.split("\n"),s=i.stack.split("\n"),a=r.length-1,o=s.length-1;1<=a&&0<=o&&r[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(r[a]!==s[o]){if(1!==a||1!==o)do{if(a--,0>--o||r[a]!==s[o]){var l="\n"+r[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=o);break}}}finally{j=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?W(e):""}function z(e){switch(e.tag){case 5:return W(e.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case x:return"Portal";case A:return"Profiler";case _:return"StrictMode";case P:return"Suspense";case T:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case C:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case M:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return U(e(t))}catch(n){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function V(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var r=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){i=""+e,s.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(e){i=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=q(e)?e.checked?"true":"false":e.value),(e=i)!==n&&(t.setValue(e),!0)}function Y(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function K(e,t){var n=t.checked;return O({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function $(e,t){var n=null==t.defaultValue?"":t.defaultValue,i=null!=t.checked?t.checked:t.defaultChecked;n=V(null!=t.value?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Q(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Z(e,t){Q(e,t);var n=V(t.value),i=t.type;if(null!=n)"number"===i?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===i||"reset"===i)return void e.removeAttribute("value");t.hasOwnProperty("value")?te(e,t.type,n):t.hasOwnProperty("defaultValue")&&te(e,t.type,V(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ee(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!("submit"!==i&&"reset"!==i||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function te(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ne=Array.isArray;function ie(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&i&&(e[n].defaultSelected=!0)}else{for(n=""+V(n),t=null,r=0;r<e.length;r++){if(e[r].value===n)return e[r].selected=!0,void(i&&(e[r].defaultSelected=!0));null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(s(91));return O({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function se(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(s(92));if(ne(n)){if(1<n.length)throw Error(s(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:V(n)}}function ae(e,t){var n=V(t.value),i=V(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=i&&(e.defaultValue=""+i)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ce(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?le(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,he,de=(he=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,i){MSApp.execUnsafeLocalFunction((function(){return he(e,t)}))}:he);function fe(e,t){if(t){var n=e.firstChild;
vendor: 22,600 bytes, line 2
2if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ge=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ve(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var i=0===n.indexOf("--"),r=me(n,t[n],i);"float"===n&&(n="cssFloat"),i?e.setProperty(n,r):e[n]=r}}Object.keys(pe).forEach((function(e){ge.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ye=O({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function be(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(s(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(s(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(s(62))}}function we(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ke=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,_e=null,Ae=null;function Ee(e){if(e=wr(e)){if("function"!==typeof Se)throw Error(s(280));var t=e.stateNode;t&&(t=xr(t),Se(e.stateNode,e.type,t))}}function Ce(e){_e?Ae?Ae.push(e):Ae=[e]:_e=e}function Me(){if(_e){var e=_e,t=Ae;if(Ae=_e=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Pe(e,t){return e(t)}function Te(){}var Re=!1;function Le(e,t,n){if(Re)return e(t,n);Re=!0;try{return Pe(e,t,n)}finally{Re=!1,(null!==_e||null!==Ae)&&(Te(),Me())}}function Ie(e,t){var n=e.stateNode;if(null===n)return null;var i=xr(n);if(null===i)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(s(231,t,typeof n));return n}var De=!1;if(u)try{var Ne={};Object.defineProperty(Ne,"passive",{get:function(){De=!0}}),window.addEventListener("test",Ne,Ne),window.removeEventListener("test",Ne,Ne)}catch(he){De=!1}function Fe(e,t,n,i,r,s,a,o,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(J){this.onError(J)}}var Oe=!1,We=null,je=!1,Be=null,ze={onError:function(e){Oe=!0,We=e}};function Ue(e,t,n,i,r,s,a,o,l){Oe=!1,We=null,Fe.apply(ze,arguments)}function He(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function qe(e){if(He(e)!==e)throw Error(s(188))}function Ge(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=He(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,i=t;;){var r=n.return;if(null===r)break;var a=r.alternate;if(null===a){if(null!==(i=r.return)){n=i;continue}break}if(r.child===a.child){for(a=r.child;a;){if(a===n)return qe(r),e;if(a===i)return qe(r),t;a=a.sibling}throw Error(s(188))}if(n.return!==i.return)n=r,i=a;else{for(var o=!1,l=r.child;l;){if(l===n){o=!0,n=r,i=a;break}if(l===i){o=!0,i=r,n=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===n){o=!0,n=a,i=r;break}if(l===i){o=!0,i=a,n=r;break}l=l.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==i)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(e))?Xe(e):null}function Xe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Xe(e);if(null!==t)return t;e=e.sibling}return null}var Ye=r.unstable_scheduleCallback,Ke=r.unstable_cancelCallback,$e=r.unstable_shouldYield,Qe=r.unstable_requestPaint,Je=r.unstable_now,Ze=r.unstable_getCurrentPriorityLevel,et=r.unstable_ImmediatePriority,tt=r.unstable_UserBlockingPriority,nt=r.unstable_NormalPriority,it=r.unstable_LowPriority,rt=r.unstable_IdlePriority,st=null,at=null;var ot=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(lt(e)/ct|0)|0},lt=Math.log,ct=Math.LN2;var ut=64,ht=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var i=0,r=e.suspendedLanes,s=e.pingedLanes,a=268435455&n;if(0!==a){var o=a&~r;0!==o?i=dt(o):0!==(s&=a)&&(i=dt(s))}else 0!==(a=n&~r)?i=dt(a):0!==s&&(i=dt(s));if(0===i)return 0;if(0!==t&&t!==i&&0===(t&r)&&((r=i&-i)>=(s=t&-t)||16===r&&0!==(4194240&s)))return t;if(0!==(4&i)&&(i|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=i;0<t;)r=1<<(n=31-ot(t)),i|=e[n],t&=~r;return i}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function gt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ut;return 0===(4194240&(ut<<=1))&&(ut=64),e}function vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-ot(n),r=1<<i;r&t|e[i]&t&&(e[i]|=t),n&=~r}}var wt=0;function kt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var xt,St,_t,At,Et,Ct=!1,Mt=[],Pt=null,Tt=null,Rt=null,Lt=new Map,It=new Map,Dt=[],Nt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ft(e,t){switch(e){case"focusin":case"focusout":Pt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":Lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":It.delete(t.pointerId)}}function Ot(e,t,n,i,r,s){return null===e||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:s,targetContainers:[r]},null!==t&&(null!==(t=wr(t))&&St(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,null!==r&&-1===t.indexOf(r)&&t.push(r),e)}function Wt(e){var t=br(e.target);if(null!==t){var n=He(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void Et(e.priority,(function(){_t(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function jt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=wr(n))&&St(t),e.blockedOn=n,!1;var i=new(n=e.nativeEvent).constructor(n.type,n);ke=i,n.target.dispatchEvent(i),ke=null,t.shift()}return!0}function Bt(e,t,n){jt(e)&&n.delete(t)}function zt(){Ct=!1,null!==Pt&&jt(Pt)&&(Pt=null),null!==Tt&&jt(Tt)&&(Tt=null),null!==Rt&&jt(Rt)&&(Rt=null),Lt.forEach(Bt),It.forEach(Bt)}function Ut(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,zt)))}function Ht(e){function t(t){return Ut(t,e)}if(0<Mt.length){Ut(Mt[0],e);for(var n=1;n<Mt.length;n++){var i=Mt[n];i.blockedOn===e&&(i.blockedOn=null)}}for(null!==Pt&&Ut(Pt,e),null!==Tt&&Ut(Tt,e),null!==Rt&&Ut(Rt,e),Lt.forEach(t),It.forEach(t),n=0;n<Dt.length;n++)(i=Dt[n]).blockedOn===e&&(i.blockedOn=null);for(;0<Dt.length&&null===(n=Dt[0]).blockedOn;)Wt(n),null===n.blockedOn&&Dt.shift()}var Vt=w.ReactCurrentBatchConfig,qt=!0;function Gt(e,t,n,i){var r=wt,s=Vt.transition;Vt.transition=null;try{wt=1,Yt(e,t,n,i)}finally{wt=r,Vt.transition=s}}function Xt(e,t,n,i){var r=wt,s=Vt.transition;Vt.transition=null;try{wt=4,Yt(e,t,n,i)}finally{wt=r,Vt.transition=s}}function Yt(e,t,n,i){if(qt){var r=$t(e,t,n,i);if(null===r)qi(e,t,i,Kt,n),Ft(e,i);else if(function(e,t,n,i,r){switch(t){case"focusin":return Pt=Ot(Pt,e,t,n,i,r),!0;case"dragenter":return Tt=Ot(Tt,e,t,n,i,r),!0;case"mouseover":return Rt=Ot(Rt,e,t,n,i,r),!0;case"pointerover":var s=r.pointerId;return Lt.set(s,Ot(Lt.get(s)||null,e,t,n,i,r)),!0;case"gotpointercapture":return s=r.pointerId,It.set(s,Ot(It.get(s)||null,e,t,n,i,r)),!0}return!1}(r,e,t,n,i))i.stopPropagation();else if(Ft(e,i),4&t&&-1<Nt.indexOf(e)){for(;null!==r;){var s=wr(r);if(null!==s&&xt(s),null===(s=$t(e,t,n,i))&&qi(e,t,i,Kt,n),s===r)break;r=s}null!==r&&i.stopPropagation()}else qi(e,t,i,null,n)}}var Kt=null;function $t(e,t,n,i){if(Kt=null,null!==(e=br(e=xe(i))))if(null===(t=He(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Kt=e,null}function Qt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ze()){case et:return 1;case tt:return 4;case nt:case it:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Jt=null,Zt=null,en=null;function tn(){if(en)return en;var e,t,n=Zt,i=n.length,r="value"in Jt?Jt.value:Jt.textContent,s=r.length;for(e=0;e<i&&n[e]===r[e];e++);var a=i-e;for(t=1;t<=a&&n[i-t]===r[s-t];t++);return en=r.slice(e,1<t?1-t:void 0)}function nn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rn(){return!0}function sn(){return!1}function an(e){function t(t,n,i,r,s){for(var a in this._reactName=t,this._targetInst=i,this.type=n,this.nativeEvent=r,this.target=s,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(r):r[a]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?rn:sn,this.isPropagationStopped=sn,this}return O(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var on,ln,cn,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hn=an(un),dn=O({},un,{view:0,detail:0}),fn=an(dn),pn=O({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cn&&(cn&&"mousemove"===e.type?(on=e.screenX-cn.screenX,ln=e.screenY-cn.screenY):ln=on=0,cn=e),on)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),gn=an(pn),mn=an(O({},pn,{dataTransfer:0})),vn=an(O({},dn,{relatedTarget:0})),yn=an(O({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=O({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wn=an(bn),kn=an(O({},un,{data:0})),xn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function An(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function En(){return An}var Cn=O({},dn,{key:function(e){if(e.key){var t=xn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return"keypress"===e.type?nn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Mn=an(Cn),Pn=an(O({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=an(O({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),Rn=an(O({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ln=O({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),In=an(Ln),Dn=[9,13,27,32],Nn=u&&"CompositionEvent"in window,Fn=null;u&&"documentMode"in document&&(Fn=document.documentMode);var On=u&&"TextEvent"in window&&!Fn,Wn=u&&(!Nn||Fn&&8<Fn&&11>=Fn),jn=String.fromCharCode(32),Bn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Un(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Hn=!1;var Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Gn(e,t,n,i){Ce(i),0<(t=Xi(t,"onChange")).length&&(n=new hn("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Xn=null,Yn=null;function Kn(e){ji(e,0)}function $n(e){if(X(kr(e)))return e}function Qn(e,t){if("change"===e)return t}var Jn=!1;if(u){var Zn;if(u){var ei="oninput"in document;if(!ei){var ti=document.createElement("div");ti.setAttribute("oninput","return;"),ei="function"===typeof ti.oninput}Zn=ei}else Zn=!1;Jn=Zn&&(!document.documentMode||9<document.documentMode)}function ni(){Xn&&(Xn.detachEvent("onpropertychange",ii),Yn=Xn=null)}function ii(e){if("value"===e.propertyName&&$n(Yn)){var t=[];Gn(t,Yn,e,xe(e)),Le(Kn,t)}}function ri(e,t,n){"focusin"===e?(ni(),Yn=n,(Xn=t).attachEvent("onpropertychange",ii)):"focusout"===e&&ni()}function si(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return $n(Yn)}function ai(e,t){if("click"===e)return $n(t)}function oi(e,t){if("input"===e||"change"===e)return $n(t)}var li="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function ci(e,t){if(li(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!h.call(t,r)||!li(e[r],t[r]))return!1}return!0}function ui(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hi(e,t){var n,i=ui(e);for(e=0;i;){if(3===i.nodeType){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ui(i)}}function di(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?di(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fi(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(i){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function pi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function gi(e){var t=fi(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&di(n.ownerDocument.documentElement,n)){if(null!==i&&pi(n))if(t=i.start,void 0===(e=i.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var r=n.textContent.length,s=Math.min(i.start,r);i=void 0===i.end?s:Math.min(i.end,r),!e.extend&&s>i&&(r=i,i=s,s=r),r=hi(n,s);var a=hi(n,i);r&&a&&(1!==e.rangeCount||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(r.node,r.offset),e.removeAllRanges(),s>i?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mi=u&&"documentMode"in document&&11>=document.documentMode,vi=null,yi=null,bi=null,wi=!1;function ki(e,t,n){var i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;wi||null==vi||vi!==Y(i)||("selectionStart"in(i=vi)&&pi(i)?i={start:i.selectionStart,end:i.selectionEnd}:i={anchorNode:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset},bi&&ci(bi,i)||(bi=i,0<(i=Xi(yi,"onSelect")).length&&(t=new hn("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=vi)))}function xi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Si={animationend:xi("Animation","AnimationEnd"),animationiteration:xi("Animation","AnimationIteration"),animationstart:xi("Animation","AnimationStart"),transitionend:xi("Transition","TransitionEnd")},_i={},Ai={};function Ei(e){if(_i[e])return _i[e];if(!Si[e])return e;var t,n=Si[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ai)return _i[e]=n[t];return e}u&&(Ai=document.createElement("div").style,"AnimationEvent"in window||(delete Si.animationend.animation,delete Si.animationiteration.animation,delete Si.animationstart.animation),"TransitionEvent"in window||delete Si.transitionend.transition);var Ci=Ei("animationend"),Mi=Ei("animationiteration"),Pi=Ei("animationstart"),Ti=Ei("transitionend"),Ri=new Map,Li="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ii(e,t){Ri.set(e,t),l(t,[e])}for(var Di=0;Di<Li.length;Di++){var Ni=Li[Di];Ii(Ni.toLowerCase(),"on"+(Ni[0].toUpperCase()+Ni.slice(1)))}Ii(Ci,"onAnimationEnd"),Ii(Mi,"onAnimationIteration"),Ii(Pi,"onAnimationStart"),Ii("dblclick","onDoubleClick"),Ii("focusin","onFocus"),Ii("focusout","onBlur"),Ii(Ti,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focu
2sin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Oi=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fi));function Wi(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,i,r,a,o,l,c){if(Ue.apply(this,arguments),Oe){if(!Oe)throw Error(s(198));var u=We;Oe=!1,We=null,je||(je=!0,Be=u)}}(i,t,void 0,e),e.currentTarget=null}function ji(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var i=e[n],r=i.event;i=i.listeners;e:{var s=void 0;if(t)for(var a=i.length-1;0<=a;a--){var o=i[a],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==s&&r.isPropagationStopped())break e;Wi(r,o,c),s=l}else for(a=0;a<i.length;a++){if(l=(o=i[a]).instance,c=o.currentTarget,o=o.listener,l!==s&&r.isPropagationStopped())break e;Wi(r,o,c),s=l}}}if(je)throw e=Be,je=!1,Be=null,e}function Bi(e,t){var n=t[mr];void 0===n&&(n=t[mr]=new Set);var i=e+"__bubble";n.has(i)||(Vi(t,e,2,!1),n.add(i))}function zi(e,t,n){var i=0;t&&(i|=4),Vi(n,e,i,t)}var Ui="_reactListening"+Math.random().toString(36).slice(2);function Hi(e){if(!e[Ui]){e[Ui]=!0,a.forEach((function(t){"selectionchange"!==t&&(Oi.has(t)||zi(t,!1,e),zi(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ui]||(t[Ui]=!0,zi("selectionchange",!1,t))}}function Vi(e,t,n,i){switch(Qt(t)){case 1:var r=Gt;break;case 4:r=Xt;break;default:r=Yt}n=r.bind(null,t,n,e),r=void 0,!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(r=!0),i?void 0!==r?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):void 0!==r?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function qi(e,t,n,i,r){var s=i;if(0===(1&t)&&0===(2&t)&&null!==i)e:for(;;){if(null===i)return;var a=i.tag;if(3===a||4===a){var o=i.stateNode.containerInfo;if(o===r||8===o.nodeType&&o.parentNode===r)break;if(4===a)for(a=i.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===r||8===l.nodeType&&l.parentNode===r))return;a=a.return}for(;null!==o;){if(null===(a=br(o)))return;if(5===(l=a.tag)||6===l){i=s=a;continue e}o=o.parentNode}}i=i.return}Le((function(){var i=s,r=xe(n),a=[];e:{var o=Ri.get(e);if(void 0!==o){var l=hn,c=e;switch(e){case"keypress":if(0===nn(n))break e;case"keydown":case"keyup":l=Mn;break;case"focusin":c="focus",l=vn;break;case"focusout":c="blur",l=vn;break;case"beforeblur":case"afterblur":l=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tn;break;case Ci:case Mi:case Pi:l=yn;break;case Ti:l=Rn;break;case"scroll":l=fn;break;case"wheel":l=In;break;case"copy":case"cut":case"paste":l=wn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Pn}var u=0!==(4&t),h=!u&&"scroll"===e,d=u?null!==o?o+"Capture":null:o;u=[];for(var f,p=i;null!==p;){var g=(f=p).stateNode;if(5===f.tag&&null!==g&&(f=g,null!==d&&(null!=(g=Ie(p,d))&&u.push(Gi(p,g,f)))),h)break;p=p.return}0<u.length&&(o=new l(o,c,null,n,r),a.push({event:o,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(o="mouseover"===e||"pointerover"===e)||n===ke||!(c=n.relatedTarget||n.fromElement)||!br(c)&&!c[gr])&&(l||o)&&(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,l?(l=i,null!==(c=(c=n.relatedTarget||n.toElement)?br(c):null)&&(c!==(h=He(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=i),l!==c)){if(u=gn,g="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=Pn,g="onPointerLeave",d="onPointerEnter",p="pointer"),h=null==l?o:kr(l),f=null==c?o:kr(c),(o=new u(g,p+"leave",l,n,r)).target=h,o.relatedTarget=f,g=null,br(r)===i&&((u=new u(d,p+"enter",c,n,r)).target=f,u.relatedTarget=h,g=u),h=g,l&&c)e:{for(d=c,p=0,f=u=l;f;f=Yi(f))p++;for(f=0,g=d;g;g=Yi(g))f++;for(;0<p-f;
vendor: 100,312 bytes, line 2
2)u=Yi(u),p--;for(;0<f-p;)d=Yi(d),f--;for(;p--;){if(u===d||null!==d&&u===d.alternate)break e;u=Yi(u),d=Yi(d)}u=null}else u=null;null!==l&&Ki(a,o,l,u,!1),null!==c&&null!==h&&Ki(a,h,c,u,!0)}if("select"===(l=(o=i?kr(i):window).nodeName&&o.nodeName.toLowerCase())||"input"===l&&"file"===o.type)var m=Qn;else if(qn(o))if(Jn)m=oi;else{m=si;var v=ri}else(l=o.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(m=ai);switch(m&&(m=m(e,i))?Gn(a,m,n,r):(v&&v(e,o,i),"focusout"===e&&(v=o._wrapperState)&&v.controlled&&"number"===o.type&&te(o,"number",o.value)),v=i?kr(i):window,e){case"focusin":(qn(v)||"true"===v.contentEditable)&&(vi=v,yi=i,bi=null);break;case"focusout":bi=yi=vi=null;break;case"mousedown":wi=!0;break;case"contextmenu":case"mouseup":case"dragend":wi=!1,ki(a,n,r);break;case"selectionchange":if(mi)break;case"keydown":case"keyup":ki(a,n,r)}var y;if(Nn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Hn?zn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Wn&&"ko"!==n.locale&&(Hn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Hn&&(y=tn()):(Zt="value"in(Jt=r)?Jt.value:Jt.textContent,Hn=!0)),0<(v=Xi(i,b)).length&&(b=new kn(b,e,null,n,r),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=Un(n))&&(b.data=y))),(y=On?function(e,t){switch(e){case"compositionend":return Un(t);case"keypress":return 32!==t.which?null:(Bn=!0,jn);case"textInput":return(e=t.data)===jn&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Hn)return"compositionend"===e||!Nn&&zn(e,t)?(e=tn(),en=Zt=Jt=null,Hn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Wn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(i=Xi(i,"onBeforeInput")).length&&(r=new kn("onBeforeInput","beforeinput",null,n,r),a.push({event:r,listeners:i}),r.data=y))}ji(a,t)}))}function Gi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xi(e,t){for(var n=t+"Capture",i=[];null!==e;){var r=e,s=r.stateNode;5===r.tag&&null!==s&&(r=s,null!=(s=Ie(e,n))&&i.unshift(Gi(e,s,r)),null!=(s=Ie(e,t))&&i.push(Gi(e,s,r))),e=e.return}return i}function Yi(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ki(e,t,n,i,r){for(var s=t._reactName,a=[];null!==n&&n!==i;){var o=n,l=o.alternate,c=o.stateNode;if(null!==l&&l===i)break;5===o.tag&&null!==c&&(o=c,r?null!=(l=Ie(n,s))&&a.unshift(Gi(n,l,o)):r||null!=(l=Ie(n,s))&&a.push(Gi(n,l,o))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var $i=/\r\n?/g,Qi=/\u0000|\uFFFD/g;function Ji(e){return("string"===typeof e?e:""+e).replace($i,"\n").replace(Qi,"")}function Zi(e,t,n){if(t=Ji(t),Ji(e)!==t&&n)throw Error(s(425))}function er(){}var tr=null,nr=null;function ir(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var rr="function"===typeof setTimeout?setTimeout:void 0,sr="function"===typeof clearTimeout?clearTimeout:void 0,ar="function"===typeof Promise?Promise:void 0,or="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof ar?function(e){return ar.resolve(null).then(e).catch(lr)}:rr;function lr(e){setTimeout((function(){throw e}))}function cr(e,t){var n=t,i=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===i)return e.removeChild(r),void Ht(t);i--}else"$"!==n&&"$?"!==n&&"$!"!==n||i++;n=r}while(n);Ht(t)}function ur(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function hr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var dr=Math.random().toString(36).slice(2),fr="__reactFiber$"+dr,pr="__reactProps$"+dr,gr="__reactContainer$"+dr,mr="__reactEvents$"+dr,vr="__reactListeners$"+dr,yr="__reactHandles$"+dr;function br(e){var t=e[fr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gr]||n[fr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=hr(e);null!==e;){if(n=e[fr])return n;e=hr(e)}return t}n=(e=n).parentNode}return null}function wr(e){return!(e=e[fr]||e[gr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function kr(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(s(33))}function xr(e){return e[pr]||null}var Sr=[],_r=-1;function Ar(e){return{current:e}}function Er(e){0>_r||(e.current=Sr[_r],Sr[_r]=null,_r--)}function Cr(e,t){_r++,Sr[_r]=e.current,e.current=t}var Mr={},Pr=Ar(Mr),Tr=Ar(!1),Rr=Mr;function Lr(e,t){var n=e.type.contextTypes;if(!n)return Mr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var r,s={};for(r in n)s[r]=t[r];return i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ir(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Dr(){Er(Tr),Er(Pr)}function Nr(e,t,n){if(Pr.current!==Mr)throw Error(s(168));Cr(Pr,t),Cr(Tr,n)}function Fr(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,"function"!==typeof i.getChildContext)return n;for(var r in i=i.getChildContext())if(!(r in t))throw Error(s(108,H(e)||"Unknown",r));return O({},n,i)}function Or(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Mr,Rr=Pr.current,Cr(Pr,e),Cr(Tr,Tr.current),!0}function Wr(e,t,n){var i=e.stateNode;if(!i)throw Error(s(169));n?(e=Fr(e,t,Rr),i.__reactInternalMemoizedMergedChildContext=e,Er(Tr),Er(Pr),Cr(Pr,e)):Er(Tr),Cr(Tr,n)}var jr=null,Br=!1,zr=!1;function Ur(e){null===jr?jr=[e]:jr.push(e)}function Hr(){if(!zr&&null!==jr){zr=!0;var e=0,t=wt;try{var n=jr;for(wt=1;e<n.length;e++){var i=n[e];do{i=i(!0)}while(null!==i)}jr=null,Br=!1}catch(r){throw null!==jr&&(jr=jr.slice(e+1)),Ye(et,Hr),r}finally{wt=t,zr=!1}}return null}var Vr=[],qr=0,Gr=null,Xr=0,Yr=[],Kr=0,$r=null,Qr=1,Jr="";function Zr(e,t){Vr[qr++]=Xr,Vr[qr++]=Gr,Gr=e,Xr=t}function es(e,t,n){Yr[Kr++]=Qr,Yr[Kr++]=Jr,Yr[Kr++]=$r,$r=e;var i=Qr;e=Jr;var r=32-ot(i)-1;i&=~(1<<r),n+=1;var s=32-ot(t)+r;if(30<s){var a=r-r%5;s=(i&(1<<a)-1).toString(32),i>>=a,r-=a,Qr=1<<32-ot(t)+r|n<<r|i,Jr=s+e}else Qr=1<<s|n<<r|i,Jr=e}function ts(e){null!==e.return&&(Zr(e,1),es(e,1,0))}function ns(e){for(;e===Gr;)Gr=Vr[--qr],Vr[qr]=null,Xr=Vr[--qr],Vr[qr]=null;for(;e===$r;)$r=Yr[--Kr],Yr[Kr]=null,Jr=Yr[--Kr],Yr[Kr]=null,Qr=Yr[--Kr],Yr[Kr]=null}var is=null,rs=null,ss=!1,as=null;function os(e,t){var n=Lc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ls(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,is=e,rs=ur(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,is=e,rs=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==$r?{id:Qr,overflow:Jr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Lc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,is=e,rs=null,!0);default:return!1}}function cs(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function us(e){if(ss){var t=rs;if(t){var n=t;if(!ls(e,t)){if(cs(e))throw Error(s(418));t=ur(n.nextSibling);var i=is;t&&ls(e,t)?os(i,n):(e.flags=-4097&e.flags|2,ss=!1,is=e)}}else{if(cs(e))throw Error(s(418));e.flags=-4097&e.flags|2,ss=!1,is=e}}}function hs(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;is=e}function ds(e){if(e!==is)return!1;if(!ss)return hs(e),ss=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ir(e.type,e.memoizedProps)),t&&(t=rs)){if(cs(e))throw fs(),Error(s(418));for(;t;)os(e,t),t=ur(t.nextSibling)}if(hs(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){rs=ur(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}rs=null}}else rs=is?ur(e.stateNode.nextSibling):null;return!0}function fs(){for(var e=rs;e;)e=ur(e.nextSibling)}function ps(){rs=is=null,ss=!1}function gs(e){null===as?as=[e]:as.push(e)}var ms=w.ReactCurrentBatchConfig;function vs(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var i=n.stateNode}if(!i)throw Error(s(147,e));var r=i,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=r.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function ys(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bs(e){return(0,e._init)(e._payload)}function ws(e){function t(t,n){if(e){var i=t.deletions;null===i?(t.deletions=[n],t.flags|=16):i.push(n)}}function n(n,i){if(!e)return null;for(;null!==i;)t(n,i),i=i.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function r(e,t){return(e=Dc(e,t)).index=0,e.sibling=null,e}function a(t,n,i){return t.index=i,e?null!==(i=t.alternate)?(i=i.index)<n?(t.flags|=2,n):i:(t.flags|=2,n):(t.flags|=1048576,n)}function o(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,i){return null===t||6!==t.tag?((t=Wc(n,e.mode,i)).return=e,t):((t=r(t,n)).return=e,t)}function c(e,t,n,i){var s=n.type;return s===S?h(e,t,n.props.children,i,n.key):null!==t&&(t.elementType===s||"object"===typeof s&&null!==s&&s.$$typeof===L&&bs(s)===t.type)?((i=r(t,n.props)).ref=vs(e,t,n),i.return=e,i):((i=Nc(n.type,n.key,n.props,null,e.mode,i)).ref=vs(e,t,n),i.return=e,i)}function u(e,t,n,i){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=jc(n,e.mode,i)).return=e,t):((t=r(t,n.children||[])).return=e,t)}function h(e,t,n,i,s){return null===t||7!==t.tag?((t=Fc(n,e.mode,i,s)).return=e,t):((t=r(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Wc(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case k:return(n=Nc(t.type,t.key,t.props,null,e.mode,n)).ref=vs(e,null,t),n.return=e,n;case x:return(t=jc(t,e.mode,n)).return=e,t;case L:return d(e,(0,t._init)(t._payload),n)}if(ne(t)||N(t))return(t=Fc(t,e.mode,n,null)).return=e,t;ys(e,t)}return null}function f(e,t,n,i){var r=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==r?null:l(e,t,""+n,i);if("object"===typeof n&&null!==n){switch(n.$$typeof){case k:return n.key===r?c(e,t,n,i):null;case x:return n.key===r?u(e,t,n,i):null;case L:return f(e,t,(r=n._init)(n._payload),i)}if(ne(n)||N(n))return null!==r?null:h(e,t,n,i,null);ys(e,n)}return null}function p(e,t,n,i,r){if("string"===typeof i&&""!==i||"number"===typeof i)return l(t,e=e.get(n)||null,""+i,r);if("object"===typeof i&&null!==i){switch(i.$$typeof){case k:return c(t,e=e.get(null===i.key?n:i.key)||null,i,r);case x:return u(t,e=e.get(null===i.key?n:i.key)||null,i,r);case L:return p(e,t,n,(0,i._init)(i._payload),r)}if(ne(i)||N(i))return h(t,e=e.get(n)||null,i,r,null);ys(t,i)}return null}function g(r,s,o,l){for(var c=null,u=null,h=s,g=s=0,m=null;null!==h&&g<o.length;g++){h.index>g?(m=h,h=null):m=h.sibling;var v=f(r,h,o[g],l);if(null===v){null===h&&(h=m);break}e&&h&&null===v.alternate&&t(r,h),s=a(v,s,g),null===u?c=v:u.sibling=v,u=v,h=m}if(g===o.length)return n(r,h),ss&&Zr(r,g),c;if(null===h){for(;g<o.length;g++)null!==(h=d(r,o[g],l))&&(s=a(h,s,g),null===u?c=h:u.sibling=h,u=h);return ss&&Zr(r,g),c}for(h=i(r,h);g<o.length;g++)null!==(m=p(h,r,g,o[g],l))&&(e&&null!==m.alternate&&h.delete(null===m.key?g:m.key),s=a(m,s,g),null===u?c=m:u.sibling=m,u=m);return e&&h.forEach((function(e){return t(r,e)})),ss&&Zr(r,g),c}function m(r,o,l,c){var u=N(l);if("function"!==typeof u)throw Error(s(150));if(null==(l=u.call(l)))throw Error(s(151));for(var h=u=null,g=o,m=o=0,v=null,y=l.next();null!==g&&!y.done;m++,y=l.next()){g.index>m?(v=g,g=null):v=g.sibling;var b=f(r,g,y.value,c);if(null===b){null===g&&(g=v);break}e&&g&&null===b.alternate&&t(r,g),o=a(b,o,m),null===h?u=b:h.sibling=b,h=b,g=v}if(y.done)return n(r,g),ss&&Zr(r,m),u;if(null===g){for(;!y.done;m++,y=l.next())null!==(y=d(r,y.value,c))&&(o=a(y,o,m),null===h?u=y:h.sibling=y,h=y);return ss&&Zr(r,m),u}for(g=i(r,g);!y.done;m++,y=l.next())null!==(y=p(g,r,m,y.value,c))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),o=a(y,o,m),null===h?u=y:h.sibling=y,h=y);return e&&g.forEach((function(e){return t(r,e)})),ss&&Zr(r,m),u}return function e(i,s,a,l){if("object"===typeof a&&null!==a&&a.type===S&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case k:e:{for(var c=a.key,u=s;null!==u;){if(u.key===c){if((c=a.type)===S){if(7===u.tag){n(i,u.sibling),(s=r(u,a.props.children)).return=i,i=s;break e}}else if(u.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===L&&bs(c)===u.type){n(i,u.sibling),(s=r(u,a.props)).ref=vs(i,u,a),s.return=i,i=s;break e}n(i,u);break}t(i,u),u=u.sibling}a.type===S?((s=Fc(a.props.children,i.mode,l,a.key)).return=i,i=s):((l=Nc(a.type,a.key,a.props,null,i.mode,l)).ref=vs(i,s,a),l.return=i,i=l)}return o(i);case x:e:{for(u=a.key;null!==s;){if(s.key===u){if(4===s.tag&&s.stateNode.containerInfo===a.containerInfo&&s.stateNode.implementation===a.implementation){n(i,s.sibling),(s=r(s,a.children||[])).return=i,i=s;break e}n(i,s);break}t(i,s),s=s.sibling}(s=jc(a,i.mode,l)).return=i,i=s}return o(i);case L:return e(i,s,(u=a._init)(a._payload),l)}if(ne(a))return g(i,s,a,l);if(N(a))return m(i,s,a,l);ys(i,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==s&&6===s.tag?(n(i,s.sibling),(s=r(s,a)).return=i,i=s):(n(i,s),(s=Wc(a,i.mode,l)).return=i,i=s),o(i)):n(i,s)}}var ks=ws(!0),xs=ws(!1),Ss=Ar(null),_s=null,As=null,Es=null;function Cs(){Es=As=_s=null}function Ms(e){var t=Ss.current;Er(Ss),e._currentValue=t}function Ps(e,t,n){for(;null!==e;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==i&&(i.childLanes|=t)):null!==i&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Ts(e,t){_s=e,Es=As=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(wo=!0),e.firstContext=null)}function Rs(e){var t=e._currentValue;if(Es!==e)if(e={context:e,memoizedValue:t,next:null},null===As){if(null===_s)throw Error(s(308));As=e,_s.dependencies={lanes:0,firstContext:e}}else As=As.next=e;return t}var Ls=null;function Is(e){null===Ls?Ls=[e]:Ls.push(e)}function Ds(e,t,n,i){var r=t.interleaved;return null===r?(n.next=n,Is(t)):(n.next=r.next,r.next=n),t.interleaved=n,Ns(e,i)}function Ns(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Fs=!1;function Os(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ws(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function js(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bs(e,t,n){var i=e.updateQueue;if(null===i)return null;if(i=i.shared,0!==(2&Pl)){var r=i.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),i.pending=t,Ns(e,n)}return null===(r=i.interleaved)?(t.next=t,Is(i)):(t.next=r.next,r.next=t),i.interleaved=t,Ns(e,n)}function zs(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,bt(e,n)}}function Us(e,t){var n=e.updateQueue,i=e.alternate;if(null!==i&&n===(i=i.updateQueue)){var r=null,s=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===s?r=s=a:s=s.next=a,n=n.next}while(null!==n);null===s?r=s=t:s=s.next=t}else r=s=t;return n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hs(e,t,n,i){var r=e.updateQueue;Fs=!1;var s=r.firstBaseUpdate,a=r.lastBaseUpdate,o=r.shared.pending;if(null!==o){r.shared.pending=null;var l=o,c=l.next;l.next=null,null===a?s=c:a.next=c,a=l;var u=e.alternate;null!==u&&((o=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===o?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l))}if(null!==s){var h=r.baseState;for(a=0,u=c=l=null,o=s;;){var d=o.lane,f=o.eventTime;if((i&d)===d){null!==u&&(u=u.next={eventTime:f,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=e,g=o;switch(d=t,f=n,g.tag){case 1:if("function"===typeof(p=g.payload)){h=p.call(f,h,d);break e}h=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(d="function"===typeof(p=g.payload)?p.call(f,h,d):p)||void 0===d)break e;h=O({},h,d);break e;case 2:Fs=!0}}null!==o.callback&&0!==o.lane&&(e.flags|=64,null===(d=r.effects)?r.effects=[o]:d.push(o))}else f={eventTime:f,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===u?(c=u=f,l=h):u=u.next=f,a|=d;if(null===(o=o.next)){if(null===(o=r.shared.pending))break;o=(d=o).next,d.next=null,r.lastBaseUpdate=d,r.shared.pending=null}}if(null===u&&(l=h),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=u,null!==(t=r.shared.interleaved)){r=t;do{a|=r.lane,r=r.next}while(r!==t)}else null===s&&(r.shared.lanes=0);Ol|=a,e.lanes=a,e.memoizedState=h}}function Vs(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],r=i.callback;if(null!==r){if(i.callback=null,i=n,"function"!==typeof r)throw Error(s(191,r));r.call(i)}}}var qs={},Gs=Ar(qs),Xs=Ar(qs),Ys=Ar(qs);function Ks(e){if(e===qs)throw Error(s(174));return e}function $s(e,t){switch(Cr(Ys,t),Cr(Xs,e),Cr(Gs,qs),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ce(null,"");break;default:t=ce(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Er(Gs),Cr(Gs,t)}function Qs(){Er(Gs),Er(Xs),Er(Ys)}function Js(e){Ks(Ys.current);var t=Ks(Gs.current),n=ce(t,e.type);t!==n&&(Cr(Xs,e),Cr(Gs,n))}function Zs(e){Xs.current===e&&(Er(Gs),Er(Xs))}var ea=Ar(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var na=[];function ia(){for(var e=0;e<na.length;e++)na[e]._workInProgressVersionPrimary=null;na.length=0}var ra=w.ReactCurrentDispatcher,sa=w.ReactCurrentBatchConfig,aa=0,oa=null,la=null,ca=null,ua=!1,ha=!1,da=0,fa=0;function pa(){throw Error(s(321))}function ga(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!li(e[n],t[n]))return!1;return!0}function ma(e,t,n,i,r,a){if(aa=a,oa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ra.current=null===e||null===e.memoizedState?Za:eo,e=n(i,r),ha){a=0;do{if(ha=!1,da=0,25<=a)throw Error(s(301));a+=1,ca=la=null,t.updateQueue=null,ra.current=to,e=n(i,r)}while(ha)}if(ra.current=Ja,t=null!==la&&null!==la.next,aa=0,ca=la=oa=null,ua=!1,t)throw Error(s(300));return e}function va(){var e=0!==da;return da=0,e}function ya(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?oa.memoizedState=ca=e:ca=ca.next=e,ca}function ba(){if(null===la){var e=oa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ca?oa.memoizedState:ca.next;if(null!==t)ca=t,la=e;else{if(null===e)throw Error(s(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ca?oa.memoizedState=ca=e:ca=ca.next=e}return ca}function wa(e,t){return"function"===typeof t?t(e):t}function ka(e){var t=ba(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var i=la,r=i.baseQueue,a=n.pending;if(null!==a){if(null!==r){var o=r.next;r.next=a.next,a.next=o}i.baseQueue=r=a,n.pending=null}if(null!==r){a=r.next,i=i.baseState;var l=o=null,c=null,u=a;do{var h=u.lane;if((aa&h)===h)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var d={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=d,o=i):c=c.next=d,oa.lanes|=h,Ol|=h}u=u.next}while(null!==u&&u!==a);null===c?o=i:c.next=l,li(i,t.memoizedState)||(wo=!0),t.memoizedState=i,t.baseState=o,t.baseQueue=c,n.lastRenderedState=i}if(null!==(e=n.interleaved)){r=e;do{a=r.lane,oa.lanes|=a,Ol|=a,r=r.next}while(r!==e)}else null===r&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function xa(e){var t=ba(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var i=n.dispatch,r=n.pending,a=t.memoizedState;if(null!==r){n.pending=null;var o=r=r.next;do{a=e(a,o.action),o=o.next}while(o!==r);li(a,t.memoizedState)||(wo=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,i]}function Sa(){}function _a(e,t){var n=oa,i=ba(),r=t(),a=!li(i.memoizedState,r);if(a&&(i.memoizedState=r,wo=!0),i=i.queue,Fa(Ca.bind(null,n,i,e),[e]),i.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(n.flags|=2048,Ra(9,Ea.bind(null,n,i,r,t),void 0,null),null===Tl)throw Error(s(349));0!==(30&aa)||Aa(n,t,r)}return r}function Aa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=oa.updateQueue)?(t={lastEffect:null,stores:null},oa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ea(e,t,n,i){t.value=n,t.getSnapshot=i,Ma(t)&&Pa(e)}function Ca(e,t,n){return n((function(){Ma(t)&&Pa(e)}))}function Ma(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!li(e,n)}catch(i){return!0}}function Pa(e){var t=Ns(e,1);null!==t&&ic(t,e,1,-1)}function Ta(e){var t=ya();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:e},t.queue=e,e=e.dispatch=Ya.bind(null,oa,e),[t.memoizedState,e]}function Ra(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},null===(t=oa.updateQueue)?(t={lastEffect:null,stores:null},oa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function La(){return ba().memoizedState}function Ia(e,t,n,i){var r=ya();oa.flags|=e,r.memoizedState=Ra(1|t,n,void 0,void 0===i?null:i)}function Da(e,t,n,i){var r=ba();i=void 0===i?null:i;var s=void 0;if(null!==la){var a=la.memoizedState;if(s=a.destroy,null!==i&&ga(i,a.deps))return void(r.memoizedState=Ra(t,n,s,i))}oa.flags|=e,r.memoizedState=Ra(1|t,n,s,i)}function Na(e,t){return Ia(8390656,8,e,t)}function Fa(e,t){return Da(2048,8,e,t)}function Oa(e,t){return Da(4,2,e,t)}function Wa(e,t){return Da(4,4,e,t)}function ja(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ba(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Da(4,4,ja.bind(null,t,e),n)}function za(){}function Ua(e,t){var n=ba();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&ga(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Ha(e,t){var n=ba();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&ga(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function Va(e,t,n){return 0===(21&aa)?(e.baseState&&(e.baseState=!1,wo=!0),e.memoizedState=n):(li(n,t)||(n=mt(),oa.lanes|=n,Ol|=n,e.baseState=!0),t)}function qa(e,t){var n=wt;wt=0!==n&&4>n?n:4,e(!0);var i=sa.transition;sa.transition={};try{e(!1),t()}finally{wt=n,sa.transition=i}}function Ga(){return ba().memoizedState}function Xa(e,t,n){var i=nc(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Ka(e))$a(t,n);else if(null!==(n=Ds(e,t,n,i))){ic(n,e,i,tc()),Qa(n,t,i)}}function Ya(e,t,n){var i=nc(e),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ka(e))$a(t,r);else{var s=e.alternate;if(0===e.lanes&&(null===s||0===s.lanes)&&null!==(s=t.lastRenderedReducer))try{var a=t.lastRenderedState,o=s(a,n);if(r.hasEagerState=!0,r.eagerState=o,li(o,a)){var l=t.interleaved;return null===l?(r.next=r,Is(t)):(r.next=l.next,l.next=r),void(t.interleaved=r)}}catch(c){}null!==(n=Ds(e,t,r,i))&&(ic(n,e,i,r=tc()),Qa(n,t,i))}}function Ka(e){var t=e.alternate;return e===oa||null!==t&&t===oa}function $a(e,t){ha=ua=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qa(e,t,n){if(0!==(4194240&n)){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,bt(e,n)}}var Ja={readContext:Rs,useCallback:pa,useContext:pa,useEffect:pa,useImperativeHandle:pa,useInsertionEffect:pa,useLayoutEffect:pa,useMemo:pa,useReducer:pa,useRef:pa,useState:pa,useDebugValue:pa,useDeferredValue:pa,useTransition:pa,useMutableSource:pa,useSyncExternalStore:pa,useId:pa,unstable_isNewReconciler:!1},Za={readContext:Rs,useCallback:function(e,t){return ya().memoizedState=[e,void 0===t?null:t],e},useContext:Rs,useEffect:Na,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ia(4194308,4,ja.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ia(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ia(4,2,e,t)},useMemo:function(e,t){var n=ya();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=ya();return t=void 0!==n?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Xa.bind(null,oa,e),[i.memoizedState,e]},useRef:function(e){return e={current:e},ya().memoizedState=e},useState:Ta,useDebugValue:za,useDeferredValue:function(e){return ya().memoizedState=e},useTransition:function(){var e=Ta(!1),t=e[0];return e=qa.bind(null,e[1]),ya().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=oa,r=ya();if(ss){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===Tl)throw Error(s(349));0!==(30&aa)||Aa(i,t,n)}r.memoizedState=n;var a={value:n,getSnapshot:t};return r.queue=a,Na(Ca.bind(null,i,a,e),[e]),i.flags|=2048,Ra(9,Ea.bind(null,i,a,n,t),void 0,null),n},useId:function(){var e=ya(),t=Tl.identifierPrefix;if(ss){var n=Jr;t=":"+t+"R"+(n=(Qr&~(1<<32-ot(Qr)-1)).toString(32)+n),0<(n=da++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},eo={readContext:Rs,useCallback:Ua,useContext:Rs,useEffect:Fa,useImperativeHandle:Ba,useInsertionEffect:Oa,useLayoutEffect:Wa,useMemo:Ha,useReducer:ka,useRef:La,useState:function(){return ka(wa)},useDebugValue:za,useDeferredValue:function(e){return Va(ba(),la.memoizedState,e)},useTransition:function(){return[ka(wa)[0],ba().memoizedState]},useMutableSource:Sa,useSyncExternalStore:_a,useId:Ga,unstable_isNewReconciler:!1},to={readContext:Rs,useCallback:Ua,useContext:Rs,useEffect:Fa,useImperativeHandle:Ba,useInsertionEffect:Oa,useLayoutEffect:Wa,useMemo:Ha,useReducer:xa,useRef:La,useState:function(){return xa(wa)},useDebugValue:za,useDeferredValue:function(e){var t=ba();return null===la?t.memoizedState=e:Va(t,la.memoizedState,e)},useTransition:function(){return[xa(wa)[0],ba().memoizedState]},useMutableSource:Sa,useSyncExternalStore:_a,useId:Ga,unstable_isNewReconciler:!1};function no(e,t){if(e&&e.defaultProps){for(var n in t=O({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function io(e,t,n,i){n=null===(n=n(i,t=e.memoizedState))||void 0===n?t:O({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ro={isMounted:function(e){return!!(e=e._reactInternals)&&He(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=tc(),r=nc(e),s=js(i,r);s.payload=t,void 0!==n&&null!==n&&(s.callback=n),null!==(t=Bs(e,s,r))&&(ic(t,e,r,i),zs(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=tc(),r=nc(e),s=js(i,r);s.tag=1,s.payload=t,void 0!==n&&null!==n&&(s.callback=n),null!==(t=Bs(e,s,r))&&(ic(t,e,r,i),zs(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tc(),i=nc(e),r=js(n,i);r.tag=2,void 0!==t&&null!==t&&(r.callback=t),null!==(t=Bs(e,r,i))&&(ic(t,e,i,n),zs(t,e,i))}};function so(e,t,n,i,r,s,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(i,s,a):!t.prototype||!t.prototype.isPureReactComponent||(!ci(n,i)||!ci(r,s))}function ao(e,t,n){var i=!1,r=Mr,s=t.contextType;return"object"===typeof s&&null!==s?s=Rs(s):(r=Ir(t)?Rr:Pr.current,s=(i=null!==(i=t.contextTypes)&&void 0!==i)?Lr(e,r):Mr),t=new t(n,s),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ro,e.stateNode=t,t._reactInternals=e,i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=s),t}function oo(e,t,n,i){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,i),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&ro.enqueueReplaceState(t,t.state,null)}function lo(e,t,n,i){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs={},Os(e);var s=t.contextType;"object"===typeof s&&null!==s?r.context=Rs(s):(s=Ir(t)?Rr:Pr.current,r.context=Lr(e,s)),r.state=e.memoizedState,"function"===typeof(s=t.getDerivedStateFromProps)&&(io(e,t,s,n),r.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(t=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),t!==r.state&&ro.enqueueReplaceState(r,r.state,null),Hs(e,n,r,i),r.state=e.memoizedState),"function"===typeof r.componentDidMount&&(e.flags|=4194308)}function co(e,t){try{var n="",i=t;do{n+=z(i),i=i.return}while(i);var r=n}catch(s){r="\nError generating stack: "+s.message+"\n"+s.stack}return{value:e,source:t,stack:r,digest:null}}function uo(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ho(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var fo="function"===typeof WeakMap?WeakMap:Map;function po(e,t,n){(n=js(-1,n)).tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){ql||(ql=!0,Gl=i),ho(0,t)},n}function go(e,t,n){(n=js(-1,n)).tag=3;var i=e.type.getDerivedStateFromError;if("function"===typeof i){var r=t.value;n.payload=function(){return i(r)},n.callback=function(){ho(0,t)}}var s=e.stateNode;return null!==s&&"function"===typeof s.componentDidCatch&&(n.callback=function(){ho(0,t),"function"!==typeof i&&(null===Xl?Xl=new Set([this]):Xl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function mo(e,t,n){var i=e.pingCache;if(null===i){i=e.pingCache=new fo;var r=new Set;i.set(t,r)}else void 0===(r=i.get(t))&&(r=new Set,i.set(t,r));r.has(n)||(r.add(n),e=Ec.bind(null,e,t,n),t.then(e,e))}function vo(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function yo(e,t,n,i,r){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=js(-1,1)).tag=2,Bs(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=r,e)}var bo=w.ReactCurrentOwner,wo=!1;function ko(e,t,n,i){t.child=null===e?xs(t,null,n,i):ks(t,e.child,n,i)}function xo(e,t,n,i,r){n=n.render;var s=t.ref;return Ts(t,r),i=ma(e,t,n,i,s,r),n=va(),null===e||wo?(ss&&n&&ts(t),t.flags|=1,ko(e,t,i,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,qo(e,t,r))}function So(e,t,n,i,r){if(null===e){var s=n.type;return"function"!==typeof s||Ic(s)||void 0!==s.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Nc(n.type,null,i,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=s,_o(e,t,s,i,r))}if(s=e.child,0===(e.lanes&r)){var a=s.memoizedProps;if((n=null!==(n=n.compare)?n:ci)(a,i)&&e.ref===t.ref)return qo(e,t,r)}return t.flags|=1,(e=Dc(s,i)).ref=t.ref,e.return=t,t.child=e}function _o(e,t,n,i,r){if(null!==e){var s=e.memoizedProps;if(ci(s,i)&&e.ref===t.ref){if(wo=!1,t.pendingProps=i=s,0===(e.lanes&r))return t.lanes=e.lanes,qo(e,t,r);0!==(131072&e.flags)&&(wo=!0)}}return Co(e,t,n,i,r)}function Ao(e,t,n){var i=t.pendingProps,r=i.children,s=null!==e?e.memoizedState:null;if("hidden"===i.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Cr(Dl,Il),Il|=n;else{if(0===(1073741824&n))return e=null!==s?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Cr(Dl,Il),Il|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=null!==s?s.baseLanes:n,Cr(Dl,Il),Il|=i}else null!==s?(i=s.baseLanes|n,t.memoizedState=null):i=n,Cr(Dl,Il),Il|=i;return ko(e,t,r,n),t.child}function Eo(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Co(e,t,n,i,r){var s=Ir(n)?Rr:Pr.current;return s=Lr(t,s),Ts(t,r),n=ma(e,t,n,i,s,r),i=va(),null===e||wo?(ss&&i&&ts(t),t.flags|=1,ko(e,t,n,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,qo(e,t,r))}function Mo(e,t,n,i,r){if(Ir(n)){var s=!0;Or(t)}else s=!1;if(Ts(t,r),null===t.stateNode)Vo(e,t),ao(t,n,i),lo(t,n,i,r),i=!0;else if(null===e){var a=t.stateNode,o=t.memoizedProps;a.props=o;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=Rs(c):c=Lr(t,c=Ir(n)?Rr:Pr.current);var u=n.getDerivedStateFromProps,h="function"===typeof u||"function"===typeof a.getSnapshotBeforeUpdate;h||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(o!==i||l!==c)&&oo(t,a,i,c),Fs=!1;var d=t.memoizedState;a.state=d,Hs(t,i,a,r),l=t.memoizedState,o!==i||d!==l||Tr.current||Fs?("function"===typeof u&&(io(t,n,u,i),l=t.memoizedState),(o=Fs||so(t,n,o,i,d,l,c))?(h||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=l),a.props=i,a.state=l,a.context=c,i=o):("function"===typeof a.componentDidMount&&(t.flags|=4194308),i=!1)}else{a=t.stateNode,Ws(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:no(t.type,o),a.props=c,h=t.pendingProps,d=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=Rs(l):l=Lr(t,l=Ir(n)?Rr:Pr.current);var f=n.getDerivedStateFromProps;(u="function"===typeof f||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(o!==h||d!==l)&&oo(t,a,i,l),Fs=!1,d=t.memoizedState,a.state=d,Hs(t,i,a,r);var p=t.memoizedState;o!==h||d!==p||Tr.current||Fs?("function"===typeof f&&(io(t,n,f,i),p=t.memoizedState),(c=Fs||so(t,n,c,i,d,p,l)||!1)?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(i,p,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(i,p,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=p),a.props=i,a.state=p,a.context=l,i=c):("function"!==typeof a.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),i=!1)}return Po(e,t,n,i,s,r)}function Po(e,t,n,i,r,s){Eo(e,t);var a=0!==(128&t.flags);if(!i&&!a)return r&&Wr(t,n,!1),qo(e,t,s);i=t.stateNode,bo.current=t;var o=a&&"function"!==typeof n.getDerivedStateFromError?null:i.render();return t.flags|=1,null!==e&&a?(t.child=ks(t,e.child,null,s),t.child=ks(t,null,o,s)):ko(e,t,o,s),t.memoizedState=i.state,r&&Wr(t,n,!0),t.child}function To(e){var t=e.stateNode;t.pendingContext?Nr(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Nr(0,t.context,!1),$s(e,t.containerInfo)}function Ro(e,t,n,i,r){return ps(),gs(r),t.flags|=256,ko(e,t,n,i),t.child}var Lo,Io,Do,No,Fo={dehydrated:null,treeContext:null,retryLane:0};function Oo(e){return{baseLanes:e,cachePool:null,transitions:null}}function Wo(e,t,n){var i,r=t.pendingProps,a=ea.current,o=!1,l=0!==(128&t.flags);if((i=l)||(i=(null===e||null!==e.memoizedState)&&0!==(2&a)),i?(o=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Cr(ea,1&a),null===e)return us(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=r.children,e=r.fallback,o?(r=t.mode,o=t.child,l={mode:"hidden",children:l},0===(1&r)&&null!==o?(o.childLanes=0,o.pendingProps=l):o=Oc(l,r,0,null),e=Fc(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Oo(n),t.memoizedState=Fo,e):jo(t,l));if(null!==(a=e.memoizedState)&&null!==(i=a.dehydrated))return function(e,t,n,i,r,a,o){if(n)return 256&t.flags?(t.flags&=-257,Bo(e,t,o,i=uo(Error(s(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=i.fallback,r=t.mode,i=Oc({mode:"visible",children:i.children},r,0,null),(a=Fc(a,r,o,null)).flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,0!==(1&t.mode)&&ks(t,e.child,null,o),t.child.memoizedState=Oo(o),t.memoizedState=Fo,a);if(0===(1&t.mode))return Bo(e,t,o,null);if("$!"===r.data){if(i=r.nextSibling&&r.nextSibling.dataset)var l=i.dgst;return i=l,Bo(e,t,o,i=uo(a=Error(s(419)),i,void 0))}if(l=0!==(o&e.childLanes),wo||l){if(null!==(i=Tl)){switch(o&-o){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}0!==(r=0!==(r&(i.suspendedLanes|o))?0:r)&&r!==a.retryLane&&(a.retryLane=r,Ns(e,r),ic(i,e,r,-1))}return mc(),Bo(e,t,o,i=uo(Error(s(421))))}return"$?"===r.data?(t.flags|=128,t.child=e.child,t=Mc.bind(null,e),r._reactRetry=t,null):(e=a.treeContext,rs=ur(r.nextSibling),is=t,ss=!0,as=null,null!==e&&(Yr[Kr++]=Qr,Yr[Kr++]=Jr,Yr[Kr++]=$r,Qr=e.id,Jr=e.overflow,$r=t),t=jo(t,i.children),t.flags|=4096,t)}(e,t,l,r,i,a,n);if(o){o=r.fallback,l=t.mode,i=(a=e.child).sibling;var c={mode:"hidden",children:r.children};return 0===(1&l)&&t.child!==a?((r=t.child).childLanes=0,r.pendingProps=c,t.deletions=null):(r=Dc(a,c)).subtreeFlags=14680064&a.subtreeFlags,null!==i?o=Dc(i,o):(o=Fc(o,l,n,null)).flags|=2,o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,l=null===(l=e.child.memoizedState)?Oo(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Fo,r}return e=(o=e.child).sibling,r=Dc(o,{mode:"visible",children:r.children}),0===(1&t.mode)&&(r.lanes=n),r.return=t,r.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function jo(e,t){return(t=Oc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bo(e,t,n,i){return null!==i&&gs(i),ks(t,e.child,null,n),(e=jo(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function zo(e,t,n){e.lanes|=t;var i=e.alternate;null!==i&&(i.lanes|=t),Ps(e.return,t,n)}function Uo(e,t,n,i,r){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=n,s.tailMode=r)}function Ho(e,t,n){var i=t.pendingProps,r=i.revealOrder,s=i.tail;if(ko(e,t,i.children,n),0!==(2&(i=ea.current)))i=1&i|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&zo(e,n,t);else if(19===e.tag)zo(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(Cr(ea,i),0===(1&t.mode))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;null!==n;)null!==(e=n.alternate)&&null===ta(e)&&(r=n),n=n.sibling;null===(n=r)?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Uo(t,!1,r,n,s);break;case"backwards":for(n=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===ta(e)){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Uo(t,!0,n,null,s);break;case"together":Uo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vo(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function qo(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ol|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=Dc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Dc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Go(e,t){if(!ss)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?t||null===e.tail?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Xo(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,i=0;if(t)for(var r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=14680064&r.subtreeFlags,i|=14680064&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Yo(e,t,n){var i=t.pendingProps;switch(ns(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xo(t),null;case 1:case 17:return Ir(t.type)&&Dr(),Xo(t),null;case 3:return i=t.stateNode,Qs(),Er(Tr),Er(Pr),ia(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(ds(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==as&&(oc(as),as=null))),Io(e,t),Xo(t),null;case 5:Zs(t);var r=Ks(Ys.current);if(n=t.type,null!==e&&null!=t.stateNode)Do(e,t,n,i,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(null===t.stateNode)throw Error(s(166));return Xo(t),null}if(e=Ks(Gs.current),ds(t)){i=t.stateNode,n=t.type;var a=t.memoizedProps;switch(i[fr]=t,i[pr]=a,e=0!==(1&t.mode),n){case"dialog":Bi("cancel",i),Bi("close",i);break;case"iframe":case"object":case"embed":Bi("load",i);break;case"video":case"audio":for(r=0;r<Fi.length;r++)Bi(Fi[r],i);break;case"source":Bi("error",i);break;case"img":case"image":case"link":Bi("error",i),Bi("load",i);break;case"details":Bi("toggle",i);break;case"input":$(i,a),Bi("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!a.multiple},Bi("invalid",i);break;case"textarea":se(i,a),Bi("invalid",i)}for(var l in be(n,a),r=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"===typeof c?i.textContent!==c&&(!0!==a.suppressHydrationWarning&&Zi(i.textContent,c,e),r=["children",c]):"number"===typeof c&&i.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Zi(i.textContent,c,e),r=["children",""+c]):o.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Bi("scroll",i)}switch(n){case"input":G(i),ee(i,a,!0);break;case"textarea":G(i),oe(i);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(i.onclick=er)}i=r,t.updateQueue=i,null!==i&&(t.flags|=4)}else{l=9===r.nodeType?r:r.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=le(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof i.is?e=l.createElement(n,{is:i.is}):(e=l.createElement(n),"select"===n&&(l=e,i.multiple?l.multiple=!0:i.size&&(l.size=i.size))):e=l.createElementNS(e,n),e[fr]=t,e[pr]=i,Lo(e,t,!1,!1),t.stateNode=e;e:{switch(l=we(n,i),n){case"dialog":Bi("cancel",e),Bi("close",e),r=i;break;case"iframe":case"object":case"embed":Bi("load",e),r=i;break;case"video":case"audio":for(r=0;r<Fi.length;r++)Bi(Fi[r],e);r=i;break;case"source":Bi("error",e),r=i;break;case"img":case"image":case"link":Bi("error",e),Bi("load",e),r=i;break;case"details":Bi("toggle",e),r=i;break;case"input":$(e,i),r=K(e,i),Bi("invalid",e);break;case"option":default:r=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},r=O({},i,{value:void 0}),Bi("invalid",e);break;case"textarea":se(e,i),r=re(e,i),Bi("invalid",e)}for(a in be(n,r),c=r)if(c.hasOwnProperty(a)){var u=c[a];"style"===a?ve(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===a?"string"===typeof u?("textarea"!==n||""!==u)&&fe(e,u):"number"===typeof u&&fe(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(o.hasOwnProperty(a)?null!=u&&"onScroll"===a&&Bi("scroll",e):null!=u&&b(e,a,u,l))}switch(n){case"input":G(e),ee(e,i,!1);break;case"textarea":G(e),oe(e);break;case"option":null!=i.value&&e.setAttribute("value",""+V(i.value));break;case"select":e.multiple=!!i.multiple,null!=(a=i.value)?ie(e,!!i.multiple,a,!1):null!=i.defaultValue&&ie(e,!!i.multiple,i.defaultValue,!0);break;default:"function"===typeof r.onClick&&(e.onclick=er)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Xo(t),null;case 6:if(e&&null!=t.stateNode)No(e,t,e.memoizedProps,i);else{if("string"!==typeof i&&null===t.stateNode)throw Error(s(166));if(n=Ks(Ys.current),Ks(Gs.current),ds(t)){if(i=t.stateNode,n=t.memoizedProps,i[fr]=t,(a=i.nodeValue!==n)&&null!==(e=is))switch(e.tag){case 3:Zi(i.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Zi(i.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(i=(9===n.nodeType?n:n.ownerDocument).createTextNode(i))[fr]=t,t.stateNode=i}return Xo(t),null;case 13:if(Er(ea),i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ss&&null!==rs&&0!==(1&t.mode)&&0===(128&t.flags))fs(),ps(),t.flags|=98560,a=!1;else if(a=ds(t),null!==i&&null!==i.dehydrated){if(null===e){if(!a)throw Error(s(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(s(317));a[fr]=t}else ps(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Xo(t),a=!1}else null!==as&&(oc(as),as=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((i=null!==i)!==(null!==e&&null!==e.memoizedState)&&i&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ea.current)?0===Nl&&(Nl=3):mc())),null!==t.updateQueue&&(t.flags|=4),Xo(t),null);case 4:return Qs(),Io(e,t),null===e&&Hi(t.stateNode.containerInfo),Xo(t),null;case 10:return Ms(t.type._context),Xo(t),null;case 19:if(Er(ea),null===(a=t.memoizedState))return Xo(t),null;if(i=0!==(128&t.flags),null===(l=a.rendering))if(i)Go(a,!1);else{if(0!==Nl||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Go(a,!1),null!==(i=l.updateQueue)&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;null!==n;)e=i,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Cr(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Je()>Hl&&(t.flags|=128,i=!0,Go(a,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=ta(l))){if(t.flags|=128,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Go(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!ss)return Xo(t),null}else 2*Je()-a.renderingStartTime>Hl&&1073741824!==n&&(t.flags|=128,i=!0,Go(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Je(),t.sibling=null,n=ea.current,Cr(ea,i?1&n|2:1&n),t):(Xo(t),null);case 22:case 23:return dc(),i=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==i&&(t.flags|=8192),i&&0!==(1&t.mode)?0!==(1073741824&Il)&&(Xo(t),6&t.subtreeFlags&&(t.flags|=8192)):Xo(t),null;case 24:case 25:return null}throw Error(s(156,t.tag))}function Ko(e,t){switch(ns(t),t.tag){case 1:return Ir(t.type)&&Dr(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Qs(),Er(Tr),Er(Pr),ia(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zs(t),null;case 13:if(Er(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));ps()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Er(ea),null;case 4:return Qs(),null;case 10:return Ms(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Lo=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Io=function(){},Do=function(e,t,n,i){var r=e.memoizedProps;if(r!==i){e=t.stateNode,Ks(Gs.current);var s,a=null;switch(n){case"input":r=K(e,r),i=K(e,i),a=[];break;case"select":r=O({},r,{value:void 0}),i=O({},i,{value:void 0}),a=[];break;case"textarea":r=re(e,r),i=re(e,i),a=[];break;default:"function"!==typeof r.onClick&&"function"===typeof i.onClick&&(e.onclick=er)}for(u in be(n,i),n=null,r)if(!i.hasOwnProperty(u)&&r.hasOwnProperty(u)&&null!=r[u])if("style"===u){var l=r[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(o.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in i){var c=i[u];if(l=null!=r?r[u]:void 0,i.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(s in l)!l.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&l[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(a||(a=[]),a.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(u,c)):"children"===u?"string"!==typeof c&&"number"!==typeof c||(a=a||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(o.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Bi("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},No=function(e,t,n,i){n!==i&&(t.flags|=4)};var $o=!1,Qo=!1,Jo="function"===typeof WeakSet?WeakSet:Set,Zo=null;function el(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(i){Ac(e,t,i)}else n.current=null}function tl(e,t,n){try{n()}catch(i){Ac(e,t,i)}}var nl=!1;function il(e,t,n){var i=t.updateQueue;if(null!==(i=null!==i?i.lastEffect:null)){var r=i=i.next;do{if((r.tag&e)===e){var s=r.destroy;r.destroy=void 0,void 0!==s&&tl(t,n,s)}r=r.next}while(r!==i)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function sl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function al(e){var t=e.alternate;null!==t&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fr],delete t[pr],delete t[mr],delete t[vr],delete t[yr])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ol(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function cl(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=er));else if(4!==i&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}function ul(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==i&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var hl=null,dl=!1;function fl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(at&&"function"===typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(st,n)}catch(o){}switch(n.tag){case 5:Qo||el(n,t);case 6:var i=hl,r=dl;hl=null,fl(e,t,n),dl=r,null!==(hl=i)&&(dl?(e=hl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):hl.removeChild(n.stateNode));break;case 18:null!==hl&&(dl?(e=hl,n=n.stateNode,8===e.nodeType?cr(e.parentNode,n):1===e.nodeType&&cr(e,n),Ht(e)):cr(hl,n.stateNode));break;case 4:i=hl,r=dl,hl=n.stateNode.containerInfo,dl=!0,fl(e,t,n),hl=i,dl=r;break;case 0:case 11:case 14:case 15:if(!Qo&&(null!==(i=n.updateQueue)&&null!==(i=i.lastEffect))){r=i=i.next;do{var s=r,a=s.destroy;s=s.tag,void 0!==a&&(0!==(2&s)||0!==(4&s))&&tl(n,t,a),r=r.next}while(r!==i)}fl(e,t,n);break;case 1:if(!Qo&&(el(n,t),"function"===typeof(i=n.stateNode).componentWillUnmount))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(o){Ac(n,t,o)}fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:1&n.mode?(Qo=(i=Qo)||null!==n.memoizedState,fl(e,t,n),Qo=i):fl(e,t,n);break;default:fl(e,t,n)}}function gl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Jo),t.forEach((function(t){var i=Pc.bind(null,e,t);n.has(t)||(n.add(t),t.then(i,i))}))}}function ml(e,t){var n=t.deletions;if(null!==n)for(var i=0;i<n.length;i++){var r=n[i];try{var a=e,o=t,l=o;e:for(;null!==l;){switch(l.tag){case 5:hl=l.stateNode,dl=!1;break e;case 3:case 4:hl=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===hl)throw Error(s(160));pl(a,o,r),hl=null,dl=!1;var c=r.alternate;null!==c&&(c.return=null),r.return=null}catch(u){Ac(r,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vl(t,e),t=t.sibling}function vl(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),yl(e),4&i){try{il(3,e,e.return),rl(3,e)}catch(m){Ac(e,e.return,m)}try{il(5,e,e.return)}catch(m){Ac(e,e.return,m)}}break;case 1:ml(t,e),yl(e),512&i&&null!==n&&el(n,n.return);break;case 5:if(ml(t,e),yl(e),512&i&&null!==n&&el(n,n.return),32&e.flags){var r=e.stateNode;try{fe(r,"")}catch(m){Ac(e,e.return,m)}}if(4&i&&null!=(r=e.stateNode)){var a=e.memoizedProps,o=null!==n?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&Q(r,a),we(l,o);var u=we(l,a);for(o=0;o<c.length;o+=2){var h=c[o],d=c[o+1];"style"===h?ve(r,d):"dangerouslySetInnerHTML"===h?de(r,d):"children"===h?fe(r,d):b(r,h,d,u)}switch(l){case"input":Z(r,a);break;case"textarea":ae(r,a);break;case"select":var f=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?ie(r,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?ie(r,!!a.multiple,a.defaultValue,!0):ie(r,!!a.multiple,a.multiple?[]:"",!1))}r[pr]=a}catch(m){Ac(e,e.return,m)}}break;case 6:if(ml(t,e),yl(e),4&i){if(null===e.stateNode)throw Error(s(162));r=e.stateNode,a=e.memoizedProps;try{r.nodeValue=a}catch(m){Ac(e,e.return,m)}}break;case 3:if(ml(t,e),yl(e),4&i&&null!==n&&n.memoizedState.isDehydrated)try{Ht(t.containerInfo)}catch(m){Ac(e,e.return,m)}break;case 4:default:ml(t,e),yl(e);break;case 13:ml(t,e),yl(e),8192&(r=e.child).flags&&(a=null!==r.memoizedState,r.stateNode.isHidden=a,!a||null!==r.alternate&&null!==r.alternate.memoizedState||(Ul=Je())),4&i&&gl(e);break;case 22:if(h=null!==n&&null!==n.memoizedState,1&e.mode?(Qo=(u=Qo)||h,ml(t,e),Qo=u):ml(t,e),yl(e),8192&i){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!h&&0!==(1&e.mode))for(Zo=e,h=e.child;null!==h;){for(d=Zo=h;null!==Zo;){switch(p=(f=Zo).child,f.tag){case 0:case 11:case 14:case 15:il(4,f,f.return);break;case 1:el(f,f.return);var g=f.stateNode;if("function"===typeof g.componentWillUnmount){i=f,n=f.return;try{t=i,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){Ac(i,n,m)}}break;case 5:el(f,f.return);break;case 22:if(null!==f.memoizedState){xl(d);continue}}null!==p?(p.return=f,Zo=p):xl(d)}h=h.sibling}e:for(h=null,d=e;;){if(5===d.tag){if(null===h){h=d;try{r=d.stateNode,u?"function"===typeof(a=r.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=d.stateNode,o=void 0!==(c=d.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",o))}catch(m){Ac(e,e.return,m)}}}else if(6===d.tag){if(null===h)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Ac(e,e.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ml(t,e),yl(e),4&i&&gl(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ol(n)){var i=n;break e}n=n.return}throw Error(s(160))}switch(i.tag){case 5:var r=i.stateNode;32&i.flags&&(fe(r,""),i.flags&=-33),ul(e,ll(e),r);break;case 3:case 4:var a=i.stateNode.containerInfo;cl(e,ll(e),a);break;default:throw Error(s(161))}}catch(o){Ac(e,e.return,o)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bl(e,t,n){Zo=e,wl(e,t,n)}function wl(e,t,n){for(var i=0!==(1&e.mode);null!==Zo;){var r=Zo,s=r.child;if(22===r.tag&&i){var a=null!==r.memoizedState||$o;if(!a){var o=r.alternate,l=null!==o&&null!==o.memoizedState||Qo;o=$o;var c=Qo;if($o=a,(Qo=l)&&!c)for(Zo=r;null!==Zo;)l=(a=Zo).child,22===a.tag&&null!==a.memoizedState?Sl(r):null!==l?(l.return=a,Zo=l):Sl(r);for(;null!==s;)Zo=s,wl(s,t,n),s=s.sibling;Zo=r,$o=o,Qo=c}kl(e)}else 0!==(8772&r.subtreeFlags)&&null!==s?(s.return=r,Zo=s):kl(e)}}function kl(e){for(;null!==Zo;){var t=Zo;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Qo||rl(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!Qo)if(null===n)i.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:no(t.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Vs(t,a,i);break;case 3:var o=t.updateQueue;if(null!==o){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Vs(t,o,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var h=u.memoizedState;if(null!==h){var d=h.dehydrated;null!==d&&Ht(d)}}}break;default:throw Error(s(163))}Qo||512&t.flags&&sl(t)}catch(f){Ac(t,t.return,f)}}if(t===e){Zo=null;break}if(null!==(n=t.sibling)){n.return=t.return,Zo=n;break}Zo=t.return}}function xl(e){for(;null!==Zo;){var t=Zo;if(t===e){Zo=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Zo=n;break}Zo=t.return}}function Sl(e){for(;null!==Zo;){var t=Zo;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){Ac(t,n,l)}break;case 1:var i=t.stateNode;if("function"===typeof i.componentDidMount){var r=t.return;try{i.componentDidMount()}catch(l){Ac(t,r,l)}}var s=t.return;try{sl(t)}catch(l){Ac(t,s,l)}break;case 5:var a=t.return;try{sl(t)}catch(l){Ac(t,a,l)}}}catch(l){Ac(t,t.return,l)}if(t===e){Zo=null;break}var o=t.sibling;if(null!==o){o.return=t.return,Zo=o;break}Zo=t.return}}var _l,Al=Math.ceil,El=w.ReactCurrentDispatcher,Cl=w.ReactCurrentOwner,Ml=w.ReactCurrentBatchConfig,Pl=0,Tl=null,Rl=null,Ll=0,Il=0,Dl=Ar(0),Nl=0,Fl=null,Ol=0,Wl=0,jl=0,Bl=null,zl=null,Ul=0,Hl=1/0,Vl=null,ql=!1,Gl=null,Xl=null,Yl=!1,Kl=null,$l=0,Ql=0,Jl=null,Zl=-1,ec=0;function tc(){return 0!==(6&Pl)?Je():-1!==Zl?Zl:Zl=Je()}function nc(e){return 0===(1&e.mode)?1:0!==(2&Pl)&&0!==Ll?Ll&-Ll:null!==ms.transition?(0===ec&&(ec=mt()),ec):0!==(e=wt)?e:e=void 0===(e=window.event)?16:Qt(e.type)}function ic(e,t,n,i){if(50<Ql)throw Ql=0,Jl=null,Error(s(185));yt(e,n,i),0!==(2&Pl)&&e===Tl||(e===Tl&&(0===(2&Pl)&&(Wl|=n),4===Nl&&lc(e,Ll)),rc(e,i),1===n&&0===Pl&&0===(1&t.mode)&&(Hl=Je()+500,Br&&Hr()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-ot(s),o=1<<a,l=r[a];-1===l?0!==(o&n)&&0===(o&i)||(r[a]=pt(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}}(e,t);var i=ft(e,e===Tl?Ll:0);if(0===i)null!==n&&Ke(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(null!=n&&Ke(n),1===t)0===e.tag?function(e){Br=!0,Ur(e)}(cc.bind(null,e)):Ur(cc.bind(null,e)),or((function(){0===(6&Pl)&&Hr()})),n=null;else{switch(kt(i)){case 1:n=et;break;case 4:n=tt;break;case 16:default:n=nt;break;case 536870912:n=rt}n=Tc(n,sc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function sc(e,t){if(Zl=-1,ec=0,0!==(6&Pl))throw Error(s(327));var n=e.callbackNode;if(Sc()&&e.callbackNode!==n)return null;var i=ft(e,e===Tl?Ll:0);if(0===i)return null;if(0!==(30&i)||0!==(i&e.expiredLanes)||t)t=vc(e,i);else{t=i;var r=Pl;Pl|=2;var a=gc();for(Tl===e&&Ll===t||(Vl=null,Hl=Je()+500,fc(e,t));;)try{bc();break}catch(l){pc(e,l)}Cs(),El.current=a,Pl=r,null!==Rl?t=0:(Tl=null,Ll=0,t=Nl)}if(0!==t){if(2===t&&(0!==(r=gt(e))&&(i=r,t=ac(e,r))),1===t)throw n=Fl,fc(e,0),lc(e,i),rc(e,Je()),n;if(6===t)lc(e,i);else{if(r=e.current.alternate,0===(30&i)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var r=n[i],s=r.getSnapshot;r=r.value;try{if(!li(s(),r))return!1}catch(o){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(r)&&(2===(t=vc(e,i))&&(0!==(a=gt(e))&&(i=a,t=ac(e,a))),1===t))throw n=Fl,fc(e,0),lc(e,i),rc(e,Je()),n;switch(e.finishedWork=r,e.finishedLanes=i,t){case 0:case 1:throw Error(s(345));case 2:case 5:xc(e,zl,Vl);break;case 3:if(lc(e,i),(130023424&i)===i&&10<(t=Ul+500-Je())){if(0!==ft(e,0))break;if(((r=e.suspendedLanes)&i)!==i){tc(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=rr(xc.bind(null,e,zl,Vl),t);break}xc(e,zl,Vl);break;case 4:if(lc(e,i),(4194240&i)===i)break;for(t=e.eventTimes,r=-1;0<i;){var o=31-ot(i);a=1<<o,(o=t[o])>r&&(r=o),i&=~a}if(i=r,10<(i=(120>(i=Je()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Al(i/1960))-i)){e.timeoutHandle=rr(xc.bind(null,e,zl,Vl),i);break}xc(e,zl,Vl);break;default:throw Error(s(329))}}}return rc(e,Je()),e.callbackNode===n?sc.bind(null,e):null}function ac(e,t){var n=Bl;return e.current.memoizedState.isDehydrated&&(fc(e,t).flags|=256),2!==(e=vc(e,t))&&(t=zl,zl=n,null!==t&&oc(t)),e}function oc(e){null===zl?zl=e:zl.push.apply(zl,e)}function lc(e,t){for(t&=~jl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),i=1<<n;e[n]=-1,t&=~i}}function cc(e){if(0!==(6&Pl))throw Error(s(327));Sc();var t=ft(e,0);if(0===(1&t))return rc(e,Je()),null;var n=vc(e,t);if(0!==e.tag&&2===n){var i=gt(e);0!==i&&(t=i,n=ac(e,i))}if(1===n)throw n=Fl,fc(e,0),lc(e,t),rc(e,Je()),n;if(6===n)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xc(e,zl,Vl),rc(e,Je()),null}function uc(e,t){var n=Pl;Pl|=1;try{return e(t)}finally{0===(Pl=n)&&(Hl=Je()+500,Br&&Hr())}}function hc(e){null!==Kl&&0===Kl.tag&&0===(6&Pl)&&Sc();var t=Pl;Pl|=1;var n=Ml.transition,i=wt;try{if(Ml.transition=null,wt=1,e)return e()}finally{wt=i,Ml.transition=n,0===(6&(Pl=t))&&Hr()}}function dc(){Il=Dl.current,Er(Dl)}function fc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,sr(n)),null!==Rl)for(n=Rl.return;null!==n;){var i=n;switch(ns(i),i.tag){case 1:null!==(i=i.type.childContextTypes)&&void 0!==i&&Dr();break;case 3:Qs(),Er(Tr),Er(Pr),ia();break;case 5:Zs(i);break;case 4:Qs();break;case 13:case 19:Er(ea);break;case 10:Ms(i.type._context);break;case 22:case 23:dc()}n=n.return}if(Tl=e,Rl=e=Dc(e.current,null),Ll=Il=t,Nl=0,Fl=null,jl=Wl=Ol=0,zl=Bl=null,null!==Ls){for(t=0;t<Ls.length;t++)if(null!==(i=(n=Ls[t]).interleaved)){n.interleaved=null;var r=i.next,s=n.pending;if(null!==s){var a=s.next;s.next=r,i.next=a}n.pending=i}Ls=null}return e}function pc(e,t){for(;;){var n=Rl;try{if(Cs(),ra.current=Ja,ua){for(var i=oa.memoizedState;null!==i;){var r=i.queue;null!==r&&(r.pending=null),i=i.next}ua=!1}if(aa=0,ca=la=oa=null,ha=!1,da=0,Cl.current=null,null===n||null===n.return){Nl=1,Fl=t,Rl=null;break}e:{var a=e,o=n.return,l=n,c=t;if(t=Ll,l.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var u=c,h=l,d=h.tag;if(0===(1&h.mode)&&(0===d||11===d||15===d)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=vo(o);if(null!==p){p.flags&=-257,yo(p,o,l,0,t),1&p.mode&&mo(a,u,t),c=u;var g=(t=p).updateQueue;if(null===g){var m=new Set;m.add(c),t.updateQueue=m}else g.add(c);break e}if(0===(1&t)){mo(a,u,t),mc();break e}c=Error(s(426))}else if(ss&&1&l.mode){var v=vo(o);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),yo(v,o,l,0,t),gs(co(c,l));break e}}a=c=co(c,l),4!==Nl&&(Nl=2),null===Bl?Bl=[a]:Bl.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Us(a,po(0,c,t));break e;case 1:l=c;var y=a.type,b=a.stateNode;if(0===(128&a.flags)&&("function"===typeof y.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===Xl||!Xl.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Us(a,go(a,l,t));break e}}a=a.return}while(null!==a)}kc(n)}catch(mw){t=mw,Rl===n&&null!==n&&(Rl=n=n.return);continue}break}}function gc(){var e=El.current;return El.current=Ja,null===e?Ja:e}function mc(){0!==Nl&&3!==Nl&&2!==Nl||(Nl=4),null===Tl||0===(268435455&Ol)&&0===(268435455&Wl)||lc(Tl,Ll)}function vc(e,t){var n=Pl;Pl|=2;var i=gc();for(Tl===e&&Ll===t||(Vl=null,fc(e,t));;)try{yc();break}catch(r){pc(e,r)}if(Cs(),Pl=n,El.current=i,null!==Rl)throw Error(s(261));return Tl=null,Ll=0,Nl}function yc(){for(;null!==Rl;)wc(Rl)}function bc(){for(;null!==Rl&&!$e();)wc(Rl)}function wc(e){var t=_l(e.alternate,e,Il);e.memoizedProps=e.pendingProps,null===t?kc(e):Rl=t,Cl.current=null}function kc(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Yo(n,t,Il)))return void(Rl=n)}else{if(null!==(n=Ko(n,t)))return n.flags&=32767,void(Rl=n);if(null===e)return Nl=6,void(Rl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Rl=t);Rl=t=e}while(null!==t);0===Nl&&(Nl=5)}function xc(e,t,n){var i=wt,r=Ml.transition;try{Ml.transition=null,wt=1,function(e,t,n,i){do{Sc()}while(null!==Kl);if(0!==(6&Pl))throw Error(s(327));n=e.finishedWork;var r=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-ot(n),s=1<<r;t[r]=0,i[r]=-1,e[r]=-1,n&=~s}}(e,a),e===Tl&&(Rl=Tl=null,Ll=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Yl||(Yl=!0,Tc(nt,(function(){return Sc(),null}))),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=Ml.transition,Ml.transition=null;var o=wt;wt=1;var l=Pl;Pl|=4,Cl.current=null,function(e,t){if(tr=qt,pi(e=fi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(i&&0!==i.rangeCount){n=i.anchorNode;var r=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{n.nodeType,a.nodeType}catch(k){n=null;break e}var o=0,l=-1,c=-1,u=0,h=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==r&&3!==d.nodeType||(l=o+r),d!==a||0!==i&&3!==d.nodeType||(c=o+i),3===d.nodeType&&(o+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===r&&(l=o),f===a&&++h===i&&(c=o),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(nr={focusedElem:e,selectionRange:n},qt=!1,Zo=t;null!==Zo;)if(e=(t=Zo).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Zo=e;else for(;null!==Zo;){t=Zo;try{var g=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,v=g.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:no(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(s(163))}}catch(k){Ac(t,t.return,k)}if(null!==(e=t.sibling)){e.return=t.return,Zo=e;break}Zo=t.return}g=nl,nl=!1}(e,n),vl(n,e),gi(nr),qt=!!tr,nr=tr=null,e.current=n,bl(n,e,r),Qe(),Pl=l,wt=o,Ml.transition=a}else e.current=n;if(Yl&&(Yl=!1,Kl=e,$l=r),a=e.pendingLanes,0===a&&(Xl=null),function(e){if(at&&"function"===typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(st,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),rc(e,Je()),null!==t)for(i=e.onRecoverableError,n=0;n<t.length;n++)r=t[n],i(r.value,{componentStack:r.stack,digest:r.digest});if(ql)throw ql=!1,e=Gl,Gl=null,e;0!==(1&$l)&&0!==e.tag&&Sc(),a=e.pendingLanes,0!==(1&a)?e===Jl?Ql++:(Ql=0,Jl=e):Ql=0,Hr()}(e,t,n,i)}finally{Ml.transition=r,wt=i}return null}function Sc(){if(null!==Kl){var e=kt($l),t=Ml.transition,n=wt;try{if(Ml.transition=null,wt=16>e?16:e,null===Kl)var i=!1;else{if(e=Kl,Kl=null,$l=0,0!==(6&Pl))throw Error(s(331));var r=Pl;for(Pl|=4,Zo=e.current;null!==Zo;){var a=Zo,o=a.child;if(0!==(16&Zo.flags)){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Zo=u;null!==Zo;){var h=Zo;switch(h.tag){case 0:case 11:case 15:il(8,h,a)}var d=h.child;if(null!==d)d.return=h,Zo=d;else for(;null!==Zo;){var f=(h=Zo).sibling,p=h.return;if(al(h),h===u){Zo=null;break}if(null!==f){f.return=p,Zo=f;break}Zo=p}}}var g=a.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(null!==m)}}Zo=a}}if(0!==(2064&a.subtreeFlags)&&null!==o)o.return=a,Zo=o;else e:for(;null!==Zo;){if(0!==(2048&(a=Zo).flags))switch(a.tag){case 0:case 11:case 15:il(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Zo=y;break e}Zo=a.return}}var b=e.current;for(Zo=b;null!==Zo;){var w=(o=Zo).child;if(0!==(2064&o.subtreeFlags)&&null!==w)w.return=o,Zo=w;else e:for(o=b;null!==Zo;){if(0!==(2048&(l=Zo).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(mw){Ac(l,l.return,mw)}if(l===o){Zo=null;break e}var k=l.sibling;if(null!==k){k.return=l.return,Zo=k;break e}Zo=l.return}}if(Pl=r,Hr(),at&&"function"===typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(st,e)}catch(mw){}i=!0}return i}finally{wt=n,Ml.transition=t}}return!1}function _c(e,t,n){e=Bs(e,t=po(0,t=co(n,t),1),1),t=tc(),null!==e&&(yt(e,1,t),rc(e,t))}function Ac(e,t,n){if(3===e.tag)_c(e,e,n);else for(;null!==t;){if(3===t.tag){_c(t,e,n);break}if(1===t.tag){var i=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof i.componentDidCatch&&(null===Xl||!Xl.has(i))){t=Bs(t,e=go(t,e=co(n,e),1),1),e=tc(),null!==t&&(yt(t,1,e),rc(t,e));break}}t=t.return}}function Ec(e,t,n){var i=e.pingCache;null!==i&&i.delete(t),t=tc(),e.pingedLanes|=e.suspendedLanes&n,Tl===e&&(Ll&n)===n&&(4===Nl||3===Nl&&(130023424&Ll)===Ll&&500>Je()-Ul?fc(e,0):jl|=n),rc(e,t)}function Cc(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ht,0===(130023424&(ht<<=1))&&(ht=4194304)));var n=tc();null!==(e=Ns(e,t))&&(yt(e,t,n),rc(e,n))}function Mc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cc(e,n)}function Pc(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,r=e.memoizedState;null!==r&&(n=r.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(s(314))}null!==i&&i.delete(t),Cc(e,n)}function Tc(e,t){return Ye(e,t)}function Rc(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lc(e,t,n,i){return new Rc(e,t,n,i)}function Ic(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Dc(e,t){var n=e.alternate;return null===n?((n=Lc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Nc(e,t,n,i,r,a){var o=2;if(i=e,"function"===typeof e)Ic(e)&&(o=1);else if("string"===typeof e)o=5;else e:switch(e){case S:return Fc(n.children,r,a,t);case _:o=8,r|=8;break;case A:return(e=Lc(12,n,t,2|r)).elementType=A,e.lanes=a,e;case P:return(e=Lc(13,n,t,r)).elementType=P,e.lanes=a,e;case T:return(e=Lc(19,n,t,r)).elementType=T,e.lanes=a,e;case I:return Oc(n,r,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case E:o=10;break e;case C:o=9;break e;case M:o=11;break e;case R:o=14;break e;case L:o=16,i=null;break e}throw Error(s(130,null==e?e:typeof e,""))}return(t=Lc(o,n,t,r)).elementType=e,t.type=i,t.lanes=a,t}function Fc(e,t,n,i){return(e=Lc(7,e,i,t)).lanes=n,e}function Oc(e,t,n,i){return(e=Lc(22,e,i,t)).elementType=I,e.lanes=n,e.stateNode={isHidden:!1},e}function Wc(e,t,n){return(e=Lc(6,e,null,t)).lanes=n,e}function jc(e,t,n){return(t=Lc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bc(e,t,n,i,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vt(0),this.expirationTimes=vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vt(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function zc(e,t,n,i,r,s,a,o,l){return e=new Bc(e,t,n,o,l),1===t?(t=1,!0===s&&(t|=8)):t=0,s=Lc(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Os(s),e}function Uc(e){if(!e)return Mr;e:{if(He(e=e._reactInternals)!==e||1!==e.tag)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ir(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(s(171))}if(1===e.tag){var n=e.type;if(Ir(n))return Fr(e,n,t)}return t}function Hc(e,t,n,i,r,s,a,o,l){return(e=zc(n,i,!0,e,0,s,0,o,l)).context=Uc(null),n=e.current,(s=js(i=tc(),r=nc(n))).callback=void 0!==t&&null!==t?t:null,Bs(n,s,r),e.current.lanes=r,yt(e,r,i),rc(e,i),e}function Vc(e,t,n,i){var r=t.current,s=tc(),a=nc(r);return n=Uc(n),null===t.context?t.context=n:t.pendingContext=n,(t=js(s,a)).payload={element:e},null!==(i=void 0===i?null:i)&&(t.callback=i),null!==(e=Bs(r,t,a))&&(ic(e,r,a,s),zs(e,r,a)),a}function qc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Gc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Xc(e,t){Gc(e,t),(e=e.alternate)&&Gc(e,t)}_l=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Tr.current)wo=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return wo=!1,function(e,t,n){switch(t.tag){case 3:To(t),ps();break;case 5:Js(t);break;case 1:Ir(t.type)&&Or(t);break;case 4:$s(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,r=t.memoizedProps.value;Cr(Ss,i._currentValue),i._currentValue=r;break;case 13:if(null!==(i=t.memoizedState))return null!==i.dehydrated?(Cr(ea,1&ea.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Wo(e,t,n):(Cr(ea,1&ea.current),null!==(e=qo(e,t,n))?e.sibling:null);Cr(ea,1&ea.current);break;case 19:if(i=0!==(n&t.childLanes),0!==(128&e.flags)){if(i)return Ho(e,t,n);t.flags|=128}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),Cr(ea,ea.current),i)break;return null;case 22:case 23:return t.lanes=0,Ao(e,t,n)}return qo(e,t,n)}(e,t,n);wo=0!==(131072&e.flags)}else wo=!1,ss&&0!==(1048576&t.flags)&&es(t,Xr,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Vo(e,t),e=t.pendingProps;var r=Lr(t,Pr.current);Ts(t,n),r=ma(null,t,i,e,r,n);var a=va();return t.flags|=1,"object"===typeof r&&null!==r&&"function"===typeof r.render&&void 0===r.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ir(i)?(a=!0,Or(t)):a=!1,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,Os(t),r.updater=ro,t.stateNode=r,r._reactInternals=t,lo(t,i,e,n),t=Po(null,t,i,!0,a,n)):(t.tag=0,ss&&a&&ts(t),ko(null,t,r,n),t=t.child),t;case 16:i=t.elementType;e:{switch(Vo(e,t),e=t.pendingProps,i=(r=i._init)(i._payload),t.type=i,r=t.tag=function(e){if("function"===typeof e)return Ic(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===M)return 11;if(e===R)return 14}return 2}(i),e=no(i,e),r){case 0:t=Co(null,t,i,e,n);break e;case 1:t=Mo(null,t,i,e,n);break e;case 11:t=xo(null,t,i,e,n);break e;case 14:t=So(null,t,i,no(i.type,e),n);break e}throw Error(s(306,i,""))}return t;case 0:return i=t.type,r=t.pendingProps,Co(e,t,i,r=t.elementType===i?r:no(i,r),n);case 1:return i=t.type,r=t.pendingProps,Mo(e,t,i,r=t.elementType===i?r:no(i,r),n);case 3:e:{if(To(t),null===e)throw Error(s(387));i=t.pendingProps,r=(a=t.memoizedState).element,Ws(e,t),Hs(t,i,null,n);var o=t.memoizedState;if(i=o.element,a.isDehydrated){if(a={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ro(e,t,i,n,r=co(Error(s(423)),t));break e}if(i!==r){t=Ro(e,t,i,n,r=co(Error(s(424)),t));break e}for(rs=ur(t.stateNode.containerInfo.firstChild),is=t,ss=!0,as=null,n=xs(t,null,i,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ps(),i===r){t=qo(e,t,n);break e}ko(e,t,i,n)}t=t.child}return t;case 5:return Js(t),null===e&&us(t),i=t.type,r=t.pendingProps,a=null!==e?e.memoizedProps:null,o=r.children,ir(i,r)?o=null:null!==a&&ir(i,a)&&(t.flags|=32),Eo(e,t),ko(e,t,o,n),t.child;case 6:return null===e&&us(t),null;case 13:return Wo(e,t,n);case 4:return $s(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=ks(t,null,i,n):ko(e,t,i,n),t.child;case 11:return i=t.type,r=t.pendingProps,xo(e,t,i,r=t.elementType===i?r:no(i,r),n);case 7:return ko(e,t,t.pendingProps,n),t.child;case 8:case 12:return ko(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,r=t.pendingProps,a=t.memoizedProps,o=r.value,Cr(Ss,i._currentValue),i._currentValue=o,null!==a)if(li(a.value,o)){if(a.children===r.children&&!Tr.current){t=qo(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){o=a.child;for(var c=l.firstContext;null!==c;){if(c.context===i){if(1===a.tag){(c=js(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var h=(u=u.shared).pending;null===h?c.next=c:(c.next=h.next,h.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),Ps(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)o=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(o=a.return))throw Error(s(341));o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Ps(o,n,t),o=a.sibling}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===t){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}ko(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,i=t.pendingProps.children,Ts(t,n),i=i(r=Rs(r)),t.flags|=1,ko(e,t,i,n),t.child;case 14:return r=no(i=t.type,t.pendingProps),So(e,t,i,r=no(i.type,r),n);case 15:return _o(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:no(i,r),Vo(e,t),t.tag=1,Ir(i)?(e=!0,Or(t)):e=!1,Ts(t,n),ao(t,i,r),lo(t,i,r,n),Po(null,t,i,!0,e,n);case 19:return Ho(e,t,n);case 22:return Ao(e,t,n)}throw Error(s(156,t.tag))};var Yc="function"===typeof reportError?reportError:function(e){console.error(e)};function Kc(e){this._internalRoot=e}function $c(e){this._internalRoot=e}function Qc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zc(){}function eu(e,t,n,i,r){var s=n._reactRootContainer;if(s){var a=s;if("function"===typeof r){var o=r;r=function(){var e=qc(a);o.call(e)}}Vc(t,a,e,r)}else a=function(e,t,n,i,r){if(r){if("function"===typeof i){var s=i;i=function(){var e=qc(a);s.call(e)}}var a=Hc(t,i,e,0,null,!1,0,"",Zc);return e._reactRootContainer=a,e[gr]=a.current,Hi(8===e.nodeType?e.parentNode:e),hc(),a}for(;r=e.lastChild;)e.removeChild(r);if("function"===typeof i){var o=i;i=function(){var e=qc(l);o.call(e)}}var l=zc(e,0,!1,null,0,!1,0,"",Zc);return e._reactRootContainer=l,e[gr]=l.current,Hi(8===e.nodeType?e.parentNode:e),hc((function(){Vc(t,l,n,i)})),l}(n,t,e,r,i);return qc(a)}$c.prototype.render=Kc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(s(409));Vc(e,t,null,null)},$c.prototype.unmount=Kc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;hc((function(){Vc(null,e,null,null)})),t[gr]=null}},$c.prototype.unstable_scheduleHydration=function(e){if(e){var t=At();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&0!==t&&t<Dt[n].priority;n++);Dt.splice(n,0,e),0===n&&Wt(e)}},xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(bt(t,1|n),rc(t,Je()),0===(6&Pl)&&(Hl=Je()+500,Hr()))}break;case 13:hc((function(){var t=Ns(e,1);if(null!==t){var n=tc();ic(t,e,1,n)}})),Xc(e,1)}},St=function(e){if(13===e.tag){var t=Ns(e,134217728);if(null!==t)ic(t,e,134217728,tc());Xc(e,134217728)}},_t=function(e){if(13===e.tag){var t=nc(e),n=Ns(e,t);if(null!==n)ic(n,e,t,tc());Xc(e,t)}},At=function(){return wt},Et=function(e,t){var n=wt;try{return wt=e,t()}finally{wt=n}},Se=function(e,t,n){switch(t){case"input":if(Z(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var r=xr(i);if(!r)throw Error(s(90));X(i),Z(i,r)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ie(e,!!n.multiple,t,!1)}},Pe=uc,Te=hc;var tu={usingClientEntryPoint:!1,Events:[wr,kr,xr,Ce,Me,uc]},nu={findFiberByHostInstance:br,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},iu={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ge(e))?null:e.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{st=ru.inject(iu),at=ru}catch(he){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Qc(t))throw Error(s(200));return function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Qc(e))throw Error(s(299));var n=!1,i="",r=Yc;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(r=t.onRecoverableError)),t=zc(e,1,!1,null,0,n,0,i,r),e[gr]=t.current,Hi(8===e.nodeType?e.parentNode:e),new Kc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return e=null===(e=Ge(t))?null:e.stateNode},t.flushSync=function(e){return hc(e)},t.hydrate=function(e,t,n){if(!Jc(t))throw Error(s(200));return eu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Qc(e))throw Error(s(405));var i=null!=n&&n.hydratedSources||null,r=!1,a="",o=Yc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(o=n.onRecoverableError)),t=Hc(t,null,e,1,null!=n?n:null,r,0,a,o),e[gr]=t.current,Hi(e),i)for(e=0;e<i.length;e++)r=(r=(n=i[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new $c(t)},t.render=function(e,t,n){if(!Jc(t))throw Error(s(200));return eu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Jc(e))throw Error(s(40));return!!e._reactRootContainer&&(hc((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[gr]=null}))})),!0)},t.unstable_batchedUpdates=uc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Jc(n))throw Error(s(200));if(null==e||void 0===e._reactInternals)throw Error(s(38));return eu(e,t,n,!1,i)},t.version="18.3.1-next-f1338f8080-20240426"},391:(e,t,n)=>{var i=n(950);t.createRoot=i.createRoot,t.hydrateRoot=i.hydrateRoot},950:(e,t,n)=>{!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(730)},153:(e,t,n)=>{var i=n(43),r=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,o=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var i,s={},c=null,u=null;for(i in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,i)&&!l.hasOwnProperty(i)&&(s[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===s[i]&&(s[i]=t[i]);return{$$typeof:r,type:e,key:c,ref:u,props:s,_owner:o.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},202:(e,t)=>{var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var w=b.prototype=new y;w.constructor=b,g(w,v.prototype),w.isPureReactComponent=!0;var k=Array.isArray,x=Object.prototype.hasOwnProperty,S={current:null},_={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,i){var r,s={},a=null,o=null;if(null!=t)for(r in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(a=""+t.key),t)x.call(t,r)&&!_.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(1===l)s.children=i;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===s[r]&&(s[r]=l[r]);return{$$typeof:n,type:e,key:a,ref:o,props:s,_owner:S.current}}function E(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var C=/\/+/g;function M(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function P(e,t,r,s,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l=!1;if(null===e)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case i:l=!0}}if(l)return a=a(l=e),e=""===s?"."+M(l,0):s,k(a)?(r="",null!=e&&(r=e.replace(C,"$&/")+"/"),P(a,t,r,"",(function(e){return e}))):null!=a&&(E(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,r+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(C,"$&/")+"/")+e)),t.push(a)),1;if(l=0,s=""===s?".":s+":",k(e))for(var c=0;c<e.length;c++){var u=s+M(o=e[c],c);l+=P(o,t,r,u,a)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),c=0;!(o=e.next()).done;)l+=P(o=o.value,t,r,u=s+M(o,c++),a);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function T(e,t,n){if(null==e)return e;var i=[],r=0;return P(e,i,"","",(function(e){return t.call(n,e,r++)})),i}function R(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L={current:null},I={transition:null},D={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:I,ReactCurrentOwner:S};function N(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:T,forEach:function(e,t,n){T(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=r,t.Profiler=a,t.PureComponent=b,t.StrictMode=s,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,t.act=N,t.cloneElement=function(e,t,i){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=g({},e.props),s=e.key,a=e.ref,o=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,o=S.current),void 0!==t.key&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)x.call(t,c)&&!_.hasOwnProperty(c)&&(r[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)r.children=i;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:n,type:e.type,key:s,ref:a,props:r,_owner:o}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=A,t.createFactory=function(e){var t=A.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:R}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=I.transition;I.transition={};try{e()}finally{I.transition=t}},t.unstable_act=N,t.useCallback=function(e,t){return L.current.useCallback(e,t)},t.useContext=function(e){return L.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return L.current.useDeferredValue(e)},t.useEffect=function(e,t){return L.current.useEffect(e,t)},t.useId=function(){return L.current.useId()},t.useImperativeHandle=function(e,t,n){return L.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return L.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return L.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return L.current.useMemo(e,t)},t.useReducer=function(e,t,n){return L.current.useReducer(e,t,n)},t.useRef=function(e){return L.current.useRef(e)},t.useState=function(e){return L.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return L.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return L.current.useTransition()},t.version="18.3.1"},43:(e,t,n)=>{e.exports=n(202)},579:(e,t,n)=>{e.exports=n(153)},234:(e,t)=>{function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,r=e[i];if(!(0<s(r,t)))break e;e[i]=t,e[n]=r,n=i}}function i(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var i=0,r=e.length,a=r>>>1;i<a;){var o=2*(i+1)-1,l=e[o],c=o+1,u=e[c];if(0>s(l,n))c<r&&0>s(u,l)?(e[i]=u,e[c]=n,i=c):(e[i]=l,e[o]=n,i=o);else{if(!(c<r&&0>s(u,n)))break e;e[i]=u,e[c]=n,i=c}}}return t}function s(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],u=[],h=1,d=null,f=3,p=!1,g=!1,m=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=i(u);null!==t;){if(null===t.callback)r(u);else{if(!(t.startTime<=e))break;r(u),t.sortIndex=t.expirationTime,n(c,t)}t=i(u)}}function k(e){if(m=!1,w(e),!g)if(null!==i(c))g=!0,I(x);else{var t=i(u);null!==t&&D(k,t.startTime-e)}}function x(e,n){g=!1,m&&(m=!1,y(E),E=-1),p=!0;var s=f;try{for(w(n),d=i(c);null!==d&&(!(d.expirationTime>n)||e&&!P());){var a=d.callback;if("function"===typeof a){d.callback=null,f=d.priorityLevel;var o=a(d.expirationTime<=n);n=t.unstable_now(),"function"===typeof o?d.callback=o:d===i(c)&&r(c),w(n)}else r(c);d=i(c)}if(null!==d)var l=!0;else{var h=i(u);null!==h&&D(k,h.startTime-n),l=!1}return l}finally{d=null,f=s,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,_=!1,A=null,E=-1,C=5,M=-1;function P(){return!(t.unstable_now()-M<C)}function T(){if(null!==A){var e=t.unstable_now();M=e;var n=!0;try{n=A(!0,e)}finally{n?S():(_=!1,A=null)}}else _=!1}if("function"===typeof b)S=function(){b(T)};else if("undefined"!==typeof MessageChannel){var R=new MessageChannel,L=R.port2;R.port1.onmessage=T,S=function(){L.postMessage(null)}}else S=function(){v(T,0)};function I(e){A=e,_||(_=!0,S())}function D(e,n){E=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||p||(g=!0,I(x))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return i(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,r,s){var a=t.unstable_now();switch("object"===typeof s&&null!==s?s="number"===typeof(s=s.delay)&&0<s?a+s:a:s=a,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:h++,callback:r,priorityLevel:e,startTime:s,expirationTime:o=s+o,sortIndex:-1},s>a?(e.sortIndex=s,n(u,e),null===i(c)&&e===i(u)&&(m?(y(E),E=-1):m=!0,D(k,s-a))):(e.sortIndex=o,n(c,e),g||p||(g=!0,I(x))),e},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},853:(e,t,n)=>{e.exports=n(234)},905:(e,t,n)=>{e.exports=n.p+"static/media/DemoPDF.9ac3d79aa5e8e010b74c.pdf"},201:(e,t,n)=>{e.exports=n.p+"static/media/Image.2fb24b1536baaa5edac7.png"}},t={};function n(i){var r=t[i];
2if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.m=e,n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,i)=>(n.f[i](e,t),t)),[])),n.u=e=>"static/js/"+e+".5e560239.chunk.js",n.miniCssF=e=>{},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="project:";n.l=(i,r,s,a)=>{if(e[i])e[i].push(r);else{var o,l;if(void 0!==s)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var h=c[u];if(h.getAttribute("src")==i||h.getAttribute("data-webpack")==t+s){o=h;break}}o||(l=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,n.nc&&o.setAttribute("nonce",n.nc),o.setAttribute("data-webpack",t+s),o.src=i),e[i]=[r];var d=(t,n)=>{o.onerror=o.onload=null,clearTimeout(f);var r=e[i];if(delete e[i],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach((e=>e(n))),t)return t(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=d.bind(null,o.onerror),o.onload=d.bind(null,o.onload),l&&document.head.appendChild(o)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",(()=>{var e={792:0};n.f.j=(t,i)=>{var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)i.push(r[2]);else{var s=new Promise(((n,i)=>r=e[t]=[n,i]));i.push(r[2]=s);var a=n.p+n.u(t),o=new Error;n.l(a,(i=>{if(n.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var s=i&&("load"===i.type?"missing":i.type),a=i&&i.target&&i.target.src;o.message="Loading chunk "+t+" failed.\n("+s+": "+a+")",o.name="ChunkLoadError",o.type=s,o.request=a,r[1](o)}}),"chunk-"+t,t)}};var t=(t,i)=>{var r,s,a=i[0],o=i[1],l=i[2],c=0;if(a.some((t=>0!==e[t]))){for(r in o)n.o(o,r)&&(n.m[r]=o[r]);if(l)l(n)}for(t&&t(i);c<a.length;c++)s=a[c],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0},i=self.webpackChunkproject=self.webpackChunkproject||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),n.nc=void 0;var i=n(43),r=n(391);function s(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var a,o,l,c,u,h,d,f,p,g,m,v,y,b,w,k,x,S,_,A,E,C,M,P,T,R,L,I,D,N,F,O,W,j,B,z,U,H,V,q,G,X=n(579),Y=Object.defineProperty,K=(e,t,n)=>(((e,t,n)=>{t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),$=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Q=(e,t,n)=>($(e,t,"read from private field"),n?n.call(e):t.get(e)),J=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Z=(e,t,n,i)=>($(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),ee=(e,t,n,i)=>({set _(i){Z(e,t,i,n)},get _(){return Q(e,t,i)}}),te=(e,t,n)=>($(e,t,"access private method"),n),ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var re=function(e){return e&&e.Math===Math&&e},se=re("object"==typeof globalThis&&globalThis)||re("object"==typeof window&&window)||re("object"==typeof self&&self)||re("object"==typeof ne&&ne)||re("object"==typeof ne&&ne)||function(){return this}()||Function("return this")(),ae={},oe=function(e){try{return!!e()}catch{return!0}},le=!oe((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ce=!oe((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ue=ce,he=Function.prototype.call,de=ue?he.bind(he):function(){return he.apply(he,arguments)},fe={},pe={}.propertyIsEnumerable,ge=Object.getOwnPropertyDescriptor,me=ge&&!pe.call({1:2},1);fe.f=me?function(e){var t=ge(this,e);return!!t&&t.enumerable}:pe;var ve,ye,be=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},we=ce,ke=Function.prototype,xe=ke.call,Se=we&&ke.bind.bind(xe,xe),_e=we?Se:function(e){return function(){return xe.apply(e,arguments)}},Ae=_e,Ee=Ae({}.toString),Ce=Ae("".slice),Me=oe,Pe=function(e){return Ce(Ee(e),8,-1)},Te=Object,Re=_e("".split),Le=Me((function(){return!Te("z").propertyIsEnumerable(0)}))?function(e){return"String"===Pe(e)?Re(e,""):Te(e)}:Te,Ie=function(e){return null==e},De=Ie,Ne=TypeError,Fe=function(e){if(De(e))throw new Ne("Can't call method on "+e);return e},Oe=Le,We=Fe,je=function(e){return Oe(We(e))},Be="object"==typeof document&&document.all,ze=typeof Be>"u"&&void 0!==Be?function(e){return"function"==typeof e||e===Be}:function(e){return"function"==typeof e},Ue=ze,He=function(e){return"object"==typeof e?null!==e:Ue(e)},Ve=se,qe=ze,Ge=function(e,t){return arguments.length<2?function(e){return qe(e)?e:void 0}(Ve[e]):Ve[e]&&Ve[e][t]},Xe=_e({}.isPrototypeOf),Ye=se,Ke=typeof navigator<"u"&&String(navigator.userAgent)||"",$e=Ye.process,Qe=Ye.Deno,Je=$e&&$e.versions||Qe&&Qe.version,Ze=Je&&Je.v8;Ze&&(ye=(ve=Ze.split("."))[0]>0&&ve[0]<4?1:+(ve[0]+ve[1])),!ye&&Ke&&((!(ve=Ke.match(/Edge\/(\d+)/))||ve[1]>
2=74)&&((ve=Ke.match(/Chrome\/(\d+)/))&&(ye=+ve[1])));var et=ye,tt=oe,nt=se.String,it=!!Object.getOwnPropertySymbols&&!tt((function(){var e=Symbol("symbol detection");return!nt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&et&&et<41})),rt=it&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,st=Ge,at=ze,ot=Xe,lt=Object,ct=rt?function(e){return"symbol"==typeof e}:function(e){var t=st("Symbol");return at(t)&&ot(t.prototype,lt(e))},ut=String,ht=ze,dt=function(e){try{return ut(e)}catch{return"Object"}},ft=TypeError,pt=function(e){if(ht(e))return e;throw new ft(dt(e)+" is not a function")},gt=pt,mt=Ie,vt=de,yt=ze,bt=He,wt=TypeError,kt={exports:{}},xt=se,St=Object.defineProperty,_t=function(e,t){try{St(xt,e,{value:t,configurable:!0,writable:!0})}catch{xt[e]=t}return t},At=se,Et=_t,Ct="__core-js_shared__",Mt=kt.exports=At[Ct]||Et(Ct,{});(Mt.versions||(Mt.versions=[])).push({version:"3.37.1",mode:"global",copyright:"\xa9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Pt=kt.exports,Tt=Pt,Rt=function(e,t){return Tt[e]||(Tt[e]=t||{})},Lt=Fe,It=Object,Dt=function(e){return It(Lt(e))},Nt=_e({}.hasOwnProperty),Ft=Object.hasOwn||function(e,t){return Nt(Dt(e),t)},Ot=_e,Wt=0,jt=Math.random(),Bt=Ot(1..toString),zt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Bt(++Wt+jt,36)},Ut=Rt,Ht=Ft,Vt=zt,qt=it,Gt=rt,Xt=se.Symbol,Yt=Ut("wks"),Kt=Gt?Xt.for||Xt:Xt&&Xt.withoutSetter||Vt,$t=de,Qt=He,Jt=ct,Zt=function(e,t){var n=e[t];return mt(n)?void 0:gt(n)},en=function(e,t){var n,i;if("string"===t&&yt(n=e.toString)&&!bt(i=vt(n,e))||yt(n=e.valueOf)&&!bt(i=vt(n,e))||"string"!==t&&yt(n=e.toString)&&!bt(i=vt(n,e)))return i;throw new wt("Can't convert object to primitive value")},tn=function(e){return Ht(Yt,e)||(Yt[e]=qt&&Ht(Xt,e)?Xt[e]:Kt("Symbol."+e)),Yt[e]},nn=TypeError,rn=tn("toPrimitive"),sn=function(e,t){if(!Qt(e)||Jt(e))return e;var n,i=Zt(e,rn);if(i){if(void 0===t&&(t="default"),n=$t(i,e,t),!Qt(n)||Jt(n))return n;throw new nn("Can't convert object to primitive value")}return void 0===t&&(t="number"),en(e,t)},an=ct,on=function(e){var t=sn(e,"string");return an(t)?t:t+""},ln=He,cn=se.document,un=ln(cn)&&ln(cn.createElement),hn=function(e){return un?cn.createElement(e):{}},dn=!le&&!oe((function(){return 7!==Object.defineProperty(hn("div"),"a",{get:function(){return 7}}).a})),fn=le,pn=de,gn=fe,mn=be,vn=je,yn=on,bn=Ft,wn=dn,kn=Object.getOwnPropertyDescriptor;ae.f=fn?kn:function(e,t){if(e=vn(e),t=yn(t),wn)try{return kn(e,t)}catch{}if(bn(e,t))return mn(!pn(gn.f,e,t),e[t])};var xn={},Sn=le&&oe((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),_n=He,An=String,En=TypeError,Cn=function(e){if(_n(e))return e;throw new En(An(e)+" is not an object")},Mn=le,Pn=dn,Tn=Sn,Rn=Cn,Ln=on,In=TypeError,Dn=Object.defineProperty,Nn=Object.getOwnPropertyDescriptor,Fn="enumerable",On="configurable",Wn="writable";xn.f=Mn?Tn?function(e,t,n){if(Rn(e),t=Ln(t),Rn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Wn in n&&!n[Wn]){var i=Nn(e,t);i&&i[Wn]&&(e[t]=n.value,n={configurable:On in n?n[On]:i[On],enumerable:Fn in n?n[Fn]:i[Fn],writable:!1})}return Dn(e,t,n)}:Dn:function(e,t,n){if(Rn(e),t=Ln(t),Rn(n),Pn)try{return Dn(e,t,n)}catch{}if("get"in n||"set"in n)throw new In("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var jn=xn,Bn=be,zn=le?function(e,t,n){return jn.f(e,t,Bn(1,n))}:function(e,t,n){return e[t]=n,e},Un={exports:{}},Hn=le,Vn=Ft,qn=Function.prototype,Gn=Hn&&Object.getOwnPropertyDescriptor,Xn=Vn(qn,"name"),Yn={EXISTS:Xn,PROPER:Xn&&"something"===function(){}.name,CONFIGURABLE:Xn&&(!Hn||Hn&&Gn(qn,"name").configurable)},Kn=ze,$n=Pt,Qn=_e(Function.toString);Kn($n.inspectSource)||($n.inspectSource=function(e){return Qn(e)});var Jn,Zn,ei,ti=$n.inspectSource,ni=ze,ii=se.WeakMap,ri=ni(ii)&&/native code/.test(String(ii)),si=zt,ai=Rt("keys"),oi={},li=ri,ci=se,ui=He,hi=zn,di=Ft,fi=Pt,pi=function(e){return ai[e]||(ai[e]=si(e))},gi=oi,mi="Object already initialized",vi=ci.TypeError,yi=ci.WeakMap;if(li||fi.state){var bi=fi.state||(fi.state=new yi);bi.get=bi.get,bi.has=bi.has,bi.set=bi.set,Jn=function(e,t){if(bi.has(e))throw new vi(mi);return t.facade=e,bi.set(e,t),t},Zn=function(e){return bi.get(e)||{}},ei=function(e){return bi.has(e)}}else{var wi=pi("state");gi[wi]=!0,Jn=function(e,t){if(di(e,wi))throw new vi(mi);return t.facade=e,hi(e,wi,t),t},Zn=function(e){return di(e,wi)?e[wi]:{}},ei=function(e){return di(e,wi)}}var ki={set:Jn,get:Zn,has:ei,enforce:function(e){return ei(e)?Zn(e):Jn(e,{})},getterFor:function(e){return function(t){var n;if(!ui(t)||(n=Zn(t)).type!==e)throw new vi("Incompatible receiver, "+e+" required");return n}}},xi=_e,Si=oe,_i=ze,Ai=Ft,Ei=le,Ci=Yn.CONFIGURABLE,Mi=ti,Pi=ki.enforce,Ti=ki.get,Ri=String,
2Li=Object.defineProperty,Ii=xi("".slice),Di=xi("".replace),Ni=xi([].join),Fi=Ei&&!Si((function(){return 8!==Li((function(){}),"length",{value:8}).length})),Oi=String(String).split("String"),Wi=Un.exports=function(e,t,n){"Symbol("===Ii(Ri(t),0,7)&&(t="["+Di(Ri(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Ai(e,"name")||Ci&&e.name!==t)&&(Ei?Li(e,"name",{value:t,configurable:!0}):e.name=t),Fi&&n&&Ai(n,"arity")&&e.length!==n.arity&&Li(e,"length",{value:n.arity});try{n&&Ai(n,"constructor")&&n.constructor?Ei&&Li(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var i=Pi(e);return Ai(i,"source")||(i.source=Ni(Oi,"string"==typeof t?t:"")),e};Function.prototype.toString=Wi((function(){return _i(this)&&Ti(this).source||Mi(this)}),"toString");var ji=Un.exports,Bi=ze,zi=xn,Ui=ji,Hi=_t,Vi={},qi=Math.ceil,Gi=Math.floor,Xi=Math.trunc||function(e){var t=+e;return(t>0?Gi:qi)(t)},Yi=function(e){var t=+e;return t!==t||0===t?0:Xi(t)},Ki=Yi,$i=Math.max,Qi=Math.min,Ji=Yi,Zi=Math.min,er=function(e){var t=Ji(e);return t>0?Zi(t,9007199254740991):0},tr=je,nr=function(e,t){var n=Ki(e);return n<0?$i(n+t,0):Qi(n,t)},ir=function(e){return er(e.length)},rr=function(e){return function(t,n,i){var r=tr(t),s=ir(r);if(0===s)return!e&&-1;var a,o=nr(i,s);if(e&&n!==n){for(;s>o;)if((a=r[o++])!==a)return!0}else for(;s>o;o++)if((e||o in r)&&r[o]===n)return e||o||0;return!e&&-1}},sr={includes:rr(!0),indexOf:rr(!1)},ar=Ft,or=je,lr=sr.indexOf,cr=oi,ur=_e([].push),hr=function(e,t){var n,i=or(e),r=0,s=[];for(n in i)!ar(cr,n)&&ar(i,n)&&ur(s,n);for(;t.length>r;)ar(i,n=t[r++])&&(~lr(s,n)||ur(s,n));return s},dr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");Vi.f=Object.getOwnPropertyNames||function(e){return hr(e,dr)};var fr={};fr.f=Object.getOwnPropertySymbols;var pr=Ge,gr=Vi,mr=fr,vr=Cn,yr=_e([].concat),br=pr("Reflect","ownKeys")||function(e){var t=gr.f(vr(e)),n=mr.f;return n?yr(t,n(e)):t},wr=Ft,kr=br,xr=ae,Sr=xn,_r=oe,Ar=ze,Er=/#|\.prototype\./,Cr=function(e,t){var n=Pr[Mr(e)];return n===Rr||n!==Tr&&(Ar(t)?_r(t):!!t)},Mr=Cr.normalize=function(e){return String(e).replace(Er,".").toLowerCase()},Pr=Cr.data={},Tr=Cr.NATIVE="N",Rr=Cr.POLYFILL="P",Lr=Cr,Ir=se,Dr=ae.f,Nr=zn,Fr=function(e,t,n,i){i||(i={});var r=i.enumerable,s=void 0!==i.name?i.name:t;if(Bi(n)&&Ui(n,s,i),i.global)r?e[t]=n:Hi(t,n);else{try{i.unsafe?e[t]&&(r=!0):delete e[t]}catch{}r?e[t]=n:zi.f(e,t,{value:n,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},Or=_t,Wr=function(e,t,n){for(var i=kr(t),r=Sr.f,s=xr.f,a=0;a<i.length;a++){var o=i[a];!wr(e,o)&&(!n||!wr(n,o))&&r(e,o,s(t,o))}},jr=Lr,Br={},zr=pt,Ur=TypeError,Hr=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw new Ur("Bad Promise constructor");t=e,n=i})),this.resolve=zr(t),this.reject=zr(n)};Br.f=function(e){return new Hr(e)};var Vr=function(e,t){var n,i,r,s,a,o=e.target,l=e.global,c=e.stat;if(n=l?Ir:c?Ir[o]||Or(o,{}):Ir[o]&&Ir[o].prototype)for(i in t){if(s=t[i],e.dontCallGetSet?r=(a=Dr(n,i))&&a.value:r=n[i],!jr(l?i:o+(c?".":"#")+i,e.forced)&&void 0!==r){if(typeof s==typeof r)continue;Wr(s,r)}(e.sham||r&&r.sham)&&Nr(s,"sham",!0),Fr(n,i,s,e)}},qr=Br;function Gr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Vr({target:"Promise",stat:!0},{withResolvers:function(){var e=qr.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}});var Xr,Yr,Kr={exports:{}},$r=Kr.exports={};function Qr(){throw new Error("setTimeout has not been defined")}function Jr(){throw new Error("clearTimeout has not been defined")}function Zr(e){if(Xr===setTimeout)return setTimeout(e,0);if((Xr===Qr||!Xr)&&setTimeout)return Xr=setTimeout,setTimeout(e,0);try{return Xr(e,0)}catch{try{return Xr.call(null,e,0)}catch{return Xr.call(this,e,0)}}}!function(){try{Xr="function"==typeof setTimeout?setTimeout:Qr}catch{Xr=Qr}try{Yr="function"==typeof clearTimeout?clearTimeout:Jr}catch{Yr=Jr}}();var es,ts=[],ns=!1,is=-1;function rs(){!ns||!es||(ns=!1,es.length?ts=es.concat(ts):is=-1,ts.length&&ss())}function ss(){if(!ns){var e=Zr(rs);ns=!0;for(var t=ts.length;t;){for(es=ts,ts=[];++is<t;)es&&es[is].run();is=-1,t=ts.length}es=null,ns=!1,function(e){if(Yr===clearTimeout)return clearTimeout(e);if((Yr===Jr||!Yr)&&clearTimeout)return Yr=clearTimeout,clearTimeout(e);try{return Yr(e)}catch{try{return Yr.call(null,e)}catch{return Yr.call(this,e)}}}(e)}}function as(e,t){this.fun=e,this.array=t}function os(){}$r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];ts.push(new as(e,t)),1===ts.length&&!ns&&Zr(ss)},as.prototype.run=function(){this.fun.apply(null,this.array)},$r.title="browser",$r.browser=!0,$r.env={},$r.argv=[],$r.version="",$r.versions={},$r.on=os,$r.addListener=os,$r.once=os,$r.off=os,$r.removeListener=os,$r.removeAllListeners=os,$r.emit=os,$r.prependListener=os,$r.prependOnceListener=os,$r.listeners=function(e){return[]},$r.binding=function(e){throw new Error("process.binding is not supported")},$r.cwd=function(){return"/"},$r.chdir=function(e){throw new Error("process.chdir is not supported")},$r.umask=function(){return 0};const ls=Gr(Kr.exports);var cs=function(){return cs=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},cs.apply(this,arguments)};
2function us(e,t,n){if(n||2===arguments.length)for(var i,r=0,s=t.length;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function hs(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var ds=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,fs=hs((function(e){return ds.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),ps="-ms-",gs="-moz-",ms="-webkit-",vs="comm",ys="rule",bs="decl",ws="@import",ks="@ke
2yframes",xs="@layer",Ss=Math.abs,_s=String.fromCharCode,As=Object.assign;function Es(e){return e.trim()}function Cs(e,t){return(e=t.exec(e))?e[0]:e}function Ms(e,t,n){return e.replace(t,n)}function Ps(e,t,n){return e.indexOf(t,n)}function Ts(e,t){return 0|e.charCodeAt(t)}function Rs(e,t,n){return e.slice(t,n)}function Ls(e){return e.length}function Is(e){return e.length}function Ds(e,t){return t.push(e),e}function Ns(e,t){return e.filter((function(e){return!Cs(e,t)}))}var Fs=1,Os=1,Ws=0,js=0,Bs=0,zs="";function Us(e,t,n,i,r,s,a,o){return{value:e,root:t,parent:n,type:i,props:r,children:s,line:Fs,column:Os,length:a,return:"",siblings:o}}function Hs(e,t){return As(Us("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Vs(e){for(;e.root;)e=Hs(e.root,{children:[e]});Ds(e,e.siblings)}function qs(){return Bs=js<Ws?Ts(zs,js++):0,Os++,10===Bs&&(Os=1,Fs++),Bs}function Gs(){return Ts(zs,js)}function Xs(){return js}function Ys(e,t){return Rs(zs,e,t)}function Ks(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $s(e){return Es(Ys(js-1,Zs(91===e?e+2:40===e?e+1:e)))}function Qs(e){for(;(Bs=Gs())&&Bs<33;)qs();return Ks(e)>2||Ks(Bs)>3?"":" "}function Js(e,t){for(;--t&&qs()&&!(Bs<48||Bs>102||Bs>57&&Bs<65||Bs>70&&Bs<97););return Ys(e,Xs()+(t<6&&32==Gs()&&32==qs()))}function Zs(e){for(;qs();)switch(Bs){case e:return js;case 34:case 39:34!==e&&39!==e&&Zs(Bs);break;case 40:41===e&&Zs(e);break;case 92:qs()}return js}function ea(e,t){for(;qs()&&e+Bs!==57&&(e+Bs!==84||47!==Gs()););return"/*"+Ys(t,js-1)+"*"+_s(47===e?e:qs())}function ta(e){for(;!Ks(Gs());)qs();return Ys(e,js)}function na(e){return function(e){return zs="",e}(ia("",null,null,null,[""],e=function(e){return Fs=Os=1,Ws=Ls(zs=e),js=0,[]}(e),0,[0],e))}function ia(e,t,n,i,r,s,a,o,l){for(var c=0,u=0,h=a,d=0,f=0,p=0,g=1,m=1,v=1,y=0,b="",w=r,k=s,x=i,S=b;m;)switch(p=y,y=qs()){case 40:if(108!=p&&58==Ts(S,h-1)){-1!=Ps(S+=Ms($s(y),"&","&\f"),"&\f",Ss(c?o[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:S+=$s(y);break;case 9:case 10:case 13:case 32:S+=Qs(p);break;case 92:S+=Js(Xs()-1,7);continue;case 47:switch(Gs()){case 42:case 47:Ds(sa(ea(qs(),Xs()),t,n,l),l);break;default:S+="/"}break;case 123*g:o[c++]=Ls(S)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+u:-1==v&&(S=Ms(S,/\f/g,"")),f>0&&Ls(S)-h&&Ds(f>32?aa(S+";",i,n,h-1,l):aa(Ms(S," ","")+";",i,n,h-2,l),l);break;case 59:S+=";";default:if(Ds(x=ra(S,t,n,c,u,r,o,b,w=[],k=[],h,s),s),123===y)if(0===u)ia(S,t,x,x,w,s,h,o,k);else switch(99===d&&110===Ts(S,3)?100:d){case 100:case 108:case 109:case 115:ia(e,x,x,i&&Ds(ra(e,x,x,0,0,r,o,b,r,w=[],h,k),k),r,k,h,o,i?w:k);break;default:ia(S,x,x,x,[""],k,0,o,k)}}c=u=f=0,g=v=1,b=S="",h=a;break;case 58:h=1+Ls(S),f=p;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==(Bs=js>0?Ts(zs,--js):0,Os--,10===Bs&&(Os=1,Fs--),Bs))continue;switch(S+=_s(y),y*g){case 38:v=u>0?1:(S+="\f",-1);break;case 44:o[c++]=(Ls(S)-1)*v,v=1;break;case 64:45===Gs()&&(S+=$s(qs())),d=Gs(),u=h=Ls(b=S+=ta(Xs())),y++;break;case 45:45===p&&2==Ls(S)&&(g=0)}}return s}function ra(e,t,n,i,r,s,a,o,l,c,u,h){for(var d=r-1,f=0===r?s:[""],p=Is(f),g=0,m=0,v=0;g<i;++g)for(var y=0,b=Rs(e,d+1,d=Ss(m=a[g])),w=e;y<p;++y)(w=Es(m>0?f[y]+" "+b:Ms(b,/&\f/g,f[y])))&&(l[v++]=w);return Us(e,t,n,0===r?ys:o,l,c,u,h)}function sa(e,t,n,i){return Us(e,t,n,vs,_s(Bs),Rs(e,2,-2),0,i)}function aa(e,t,n,i,r){return Us(e,t,n,bs,Rs(e,0,i),Rs(e,i+1,-1),i,r)}function oa(e,t,n){switch(function(e,t){return 45^Ts(e,0)?(((t<<2^Ts(e,0))<<2^Ts(e,1))<<2^Ts(e,2))<<2^Ts(e,3):0}(e,t)){case 5103:return ms+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ms+e+e;case 4789:return gs+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ms+e+gs+e+ps+e+e;case 5936:switch(Ts(e,t+11)){case 114:return ms+e+ps+Ms(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ms+e+ps+Ms(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ms+e+ps+Ms(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return ms+e+ps+e+e;case 6165:return ms+e+ps+"flex-"+e+e;case 5187:return ms+e+Ms(e,/(\w+).+(:[^]+)/,ms+"box-$1$2"+ps+"flex-$1$2")+e;case 5443:return ms+e+ps+"flex-item-"+Ms(e,/flex-|-self/g,"")+(Cs(e,/flex-|baseline/)?"":ps+"grid-row-"+Ms(e,/flex-|-self/g,""))+e;case 4675:return ms+e+ps+"flex-line-pack"+Ms(e,/align-content|flex-|-self/g,"")+e;case 5548:return ms+e+ps+Ms(e,"shrink","negative")+e;case 5292:return ms+e+ps+Ms(e,"basis","preferred-size")+e;case 6060:return ms+"box-"+Ms(e,"-grow","")+ms+e+ps+Ms(e,"grow","positive")+e;case 4554:return ms+Ms(e,/([^-])(transform)/g,"$1"+ms+"$2")+e;case 6187:return Ms(Ms(Ms(e,/(zoom-|grab)/,ms+"$1"),/(image-set)/,ms+"$1"),e,"")+e;case 5495:case 3959:return Ms(e,/(image-set\([^]*)/,ms+"$1$`$1");case 4968:return Ms(Ms(e,/(.+:)(flex-)?(.*)/,ms+"box-pack:$3"+ps+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ms+e+e;case 4200:if(!Cs(e,/flex-|baseline/))return ps+"grid-column-align"+Rs(e,t)+e;break;case 2592:case 3360:return ps+Ms(e,"template-","")+e;case 4384:case 3616:return n&&n.some((function(e,n){return t=n,Cs(e.props,/grid-\w+-end/)}))?~Ps(e+(n=n[t].value),"span",0)?e:ps+Ms(e,"-start","")+e+ps+"grid-row-span:"+(~Ps(n,"span",0)?Cs(n,/\d+/):+Cs(n,/\d+/)-+Cs(e,/\d+/))+";":ps+Ms(e,"-start","")+e;case 4896:case 4128:return n&&n.some((function(e){return Cs(e.props,/grid-\w+-start/)}))?e:ps+Ms(Ms(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ms(e,/(.+)-inline(.+)/,ms+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ls(e)-1-t>6)switch(Ts(e,t+1)){case 109:if(45!==Ts(e,t+4))break;case 102:return Ms(e,/(.+:)(.+)-([^]+)/,"$1"+ms+"$2-$3$1"+gs+(108==Ts(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ps(e,"stretch",0)?oa(Ms(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Ms(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,i,r,s,a,o){return ps+n+":"+i+o+(r?ps+n+"-span:"+(s?a:+a-+i)+o:"")+e}));case 4949:if(121===Ts(e,t+6))return Ms(e,":",":"+ms)+e;break;case 6444:switch(Ts(e,45===Ts(e,14)?18:11)){case 120:return Ms(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+ms+(45===Ts(e,14)?"inline-":"")+"box$3$1"+ms+"$2$3$1"+ps+"$2box$3")+e;case 100:return Ms(e,":",":"+ps)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ms(e,"scroll-","scroll-snap-")+e}return e}function la(e,t){for(var n="",i=0;i<e.length;i++)n+=t(e[i],i,e,t)||"";return n}function ca(e,t,n,i){switch(e.type){case xs:if(e.children.length)break;case ws:case bs:return e.return=e.return||e.value;case vs:return"";case ks:return e.return=e.value+"{"+la(e.children,i)+"}";case ys:if(!Ls(e.value=e.props.join(",")))return""}return Ls(n=la(e.children,i))?e.return=e.value+"{"+n+"}":""}function ua(e,t,n,i){if(e.length>-1&&!e.return)switch(e.type){case bs:return void(e.return=oa(e.value,e.length,n));case ks:return la([Hs(e,{value:Ms(e.value,"@","@"+ms)})],i);case ys:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(Cs(t,i=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Vs(Hs(e,{props:[Ms(t,/:(read-\w+)/,":"+gs+"$1")]})),Vs(Hs(e,{props:[t]})),As(e,{props:Ns(n,i)});break;case"::placeholder":Vs(Hs(e,{props:[Ms(t,/:(plac\w+)/,":"+ms+"input-$1")]})),Vs(Hs(e,{props:[Ms(t,/:(plac\w+)/,":"+gs+"$1")]})),Vs(Hs(e,{props:[Ms(t,/:(plac\w+)/,ps+"input-$1")]})),Vs(Hs(e,{props:[t]})),As(e,{props:Ns(n,i)})}return""}))}}var ha={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGr
2idRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},da=typeof ls<"u"&&void 0!==ls.env&&(ls.env.REACT_APP_SC_ATTR||ls.env.SC_ATTR)||"data-styled",fa="active",pa="data-styled-version",ga="6.1.11",ma="/*!sc*/\n",va=typeof window<"u"&&"HTMLElement"in window,ya=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:typeof ls<"u"&&void 0!==ls.env&&void 0!==ls.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==ls.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==ls.env.REACT_APP_SC_DISABLE_SPEEDY&&ls.env.REACT_APP_SC_DISABLE_SPEEDY:typeof ls<"u"&&void 0!==ls.env&&void 0!==ls.env.SC_DISABLE_SPEEDY&&""!==ls.env.SC_DISABLE_SPEEDY?"false"!==ls.env.SC_DISABLE_SPEEDY&&ls.env.SC_DISABLE_SPEEDY:"production"!==ls.env.NODE_ENV),ba=/invalid hook call/i,wa=new Set,ka=Object.freeze([]),xa=Object.freeze({});var Sa=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),_a=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Aa=/(^-|-$)/g;function Ea(e){return e.replace(_a,"-").replace(Aa,"")}var Ca=/(a)(d)/gi,Ma=52,Pa=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ta(e){var t,n="";for(t=Math.abs(e);t>Ma;t=t/Ma|0)n=Pa(t%Ma)+n;return(Pa(t%Ma)+n).replace(Ca,"$1-$2")}var Ra,La=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Ia=function(e){return La(5381,e)};function Da(e){return Ta(Ia(e)>>>0)}function Na(e){return"production"!==ls.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function Fa(e){return"string"==typeof e&&("production"===ls.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var Oa="function"==typeof Symbol&&Symbol.for,Wa=Oa?Symbol.for("react.memo"):60115,ja=Oa?Symbol.for("react.forward_ref"):60112,Ba={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},za={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ua={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ha=((Ra={})[ja]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ra[Wa]=Ua,Ra);function Va(e){return("type"in(t=e)&&t.type.$$typeof)===Wa?Ua:"$$typeof"in e?Ha[e.$$typeof]:Ba;var t}var qa=Object.defineProperty,Ga=Object.getOwnPropertyNames,Xa=Object.getOwnPropertySymbols,Ya=Object.getOwnPropertyDescriptor,Ka=Object.getPrototypeOf,$a=Object.prototype;function Qa(e,t,n){if("string"!=typeof t){if($a){var i=Ka(t);i&&i!==$a&&Qa(e,i,n)}var r=Ga(t);Xa&&(r=r.concat(Xa(t)));for(var s=Va(e),a=Va(t),o=0;o<r.length;++o){var l=r[o];if(!(l in za||n&&n[l]||a&&l in a||s&&l in s)){var c=Ya(t,l);try{qa(e,l,c)}catch{}}}}return e}function Ja(e){return"function"==typeof e}function Za(e){return"object"==typeof e&&"styledComponentId"in e}function eo(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function to(e,t){if(0===e.length)return"";for(var n=e[0],i=1;i<e.length;i++)n+=e[i];return n}function no(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function io(e,t,n){if(void 0===n&&(n=!1),!n&&!no(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var i=0;i<t.length;i++)e[i]=io(e[i],t[i]);else if(no(t))for(var i in t)e[i]=io(e[i],t[i]);return e}function ro(e,t){Object.defineProperty(e,"toString",{value:t})}var so="production"!==ls.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.c
2om/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function ao(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],i=[],r=1,s=e.length;r<s;r+=1)i.push(e[r]);return i.forEach((function(e){n=n.replace(/%[a-z]/,e)})),n}function oo(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return"production"===ls.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):"")):new Error(ao.apply(void 0,us([so[e]],t,!1)).trim())}var lo=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,i=n.length,r=i;e>=r;)if((r<<=1)<0)throw oo(16,"".concat(e));this.groupSizes=new Uint32Array(r),this.groupSizes.set(n),this.length=r;for(var s=i;s<r;s++)this.groupSizes[s]=0}for(var a=this.indexOfGroup(e+1),o=(s=0,t.length);s<o;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),i=n+t;this.groupSizes[e]=0;for(var r=n;r<i;r++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],i=this.indexOfGroup(e),r=i+n,s=i;s<r;s++)t+="".concat(this.tag.getRule(s)).concat(ma);return t},e}(),co=1<<30,uo=new Map,ho=new Map,fo=1,po=function(e){if(uo.has(e))return uo.get(e);for(;ho.has(fo);)fo++;var t=fo++;if("production"!==ls.env.NODE_ENV&&((0|t)<0||t>co))throw oo(16,"".concat(t));return uo.set(e,t),ho.set(t,e),t},go=function(e,t){fo=t+1,uo.set(e,t),ho.set(t,e)},mo="style[".concat(da,"][").concat(pa,'="').concat(ga,'"]'),vo=new RegExp("^".concat(da,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),yo=function(e,t,n){for(var i,r=n.split(","),s=0,a=r.length;s<a;s++)(i=r[s])&&e.registerName(t,i)},bo=function(e,t){for(var n,i=(null!==(n=t.textContent)&&void 0!==n?n:"").split(ma),r=[],s=0,a=i.length;s<a;s++){var o=i[s].trim();if(o){var l=o.match(vo);if(l){var c=0|parseInt(l[1],10),u=l[2];0!==c&&(go(u,c),yo(e,u,l[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(o)}}};var wo=function(e){var t=document.head,i=e||t,r=document.createElement("style"),s=function(e){var t=Array.from(e.querySelectorAll("style[".concat(da,"]")));return t[t.length-1]}(i),a=void 0!==s?s.nextSibling:null;r.setAttribute(da,fa),r.setAttribute(pa,ga);var o=n.nc;return o&&r.setAttribute("nonce",o),i.insertBefore(r,a),r},ko=function(){function e(e){this.element=wo(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,i=t.length;n<i;n++){var r=t[n];if(r.ownerNode===e)return r}throw oo(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),xo=function(){function e(e){this.element=wo(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),So=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),_o=va,Ao={isServer:!va,useCSSOMInjection:!ya},Eo=function(){function e(e,t,n){void 0===e&&(e=xa),void 0===t&&(t={});var i=this;this.options=cs(cs({},Ao),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&va&&_o&&(_o=!1,function(e){for(var t=document.querySelectorAll(mo),n=0,i=t.length;n<i;n++){var r=t[n];r&&r.getAttribute(da)!==fa&&(bo(e,r),r.parentNode&&r.parentNode.removeChild(r))}}(this)),ro(this,(function(){return function(e){for(var t=e.getTag(),n=t.length,i="",r=function(n){var r,s=(r=n,ho.get(r));if(void 0===s)return"continue";var a=e.names.get(s),o=t.getGroup(n);if(void 0===a||0===o.length)return"continue";var l="".concat(da,".g").concat(n,'[id="').concat(s,'"]'),c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+="".concat(e,","))}
2)),i+="".concat(o).concat(l,'{content:"').concat(c,'"}').concat(ma)},s=0;s<n;s++)r(s);return i}(i)}))}return e.registerId=function(e){return po(e)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(cs(cs({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new So(n):t?new ko(n):new xo(n)}(this.options),new lo(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(po(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(po(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(po(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),Co=/&/g,Mo=/^\s*\/\/.*$/gm;function Po(e,t){return e.map((function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map((function(e){return"".concat(t," ").concat(e)}))),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=Po(e.children,t)),e}))}var To=new Eo,Ro=function(){var e,t,n,i=xa,r=i.options,s=void 0===r?xa:r,a=i.plugins,o=void 0===a?ka:a,l=function(n,i,r){return r.startsWith(t)&&r.endsWith(t)&&r.replaceAll(t,"").length>0?".".concat(e):n},c=o.slice();c.push((function(e){e.type===ys&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Co,t).replace(n,l))})),s.prefix&&c.push(ua),c.push(ca);var u=function(i,r,a,o){void 0===r&&(r=""),void 0===a&&(a=""),void 0===o&&(o="&"),e=o,t=r,n=new RegExp("\\".concat(t,"\\b"),"g");var l=i.replace(Mo,""),u=na(a||r?"".concat(a," ").concat(r," { ").concat(l," }"):l);s.namespace&&(u=Po(u,s.namespace));var h=[];return la(u,function(e){var t=Is(e);return function(n,i,r,s){for(var a="",o=0;o<t;o++)a+=e[o](n,i,r,s)||"";return a}}(c.concat(function(e){return function(t){t.root||(t=t.return)&&e(t)}}((function(e){return h.push(e)}))))),h};return u.hash=o.length?o.reduce((function(e,t){return t.name||oo(15),La(e,t.name)}),5381).toString():"",u}(),Lo=i.createContext({shouldForwardProp:void 0,styleSheet:To,stylis:Ro});function Io(){return(0,i.useContext)(Lo)}Lo.Consumer,i.createContext(void 0);var Do=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Ro);var i=n.name+t.hash;e.hasNameForId(n.id,i)||e.insertRules(n.id,i,t(n.rules,i,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,ro(this,(function(){throw oo(12,String(n.name))}))}return e.prototype.getName=function(e){return void 0===e&&(e=Ro),this.name+e.hash},e}(),No=function(e){return e>="A"&&e<="Z"};function Fo(e){for(var t="",n=0;n<e.length;n++){var i=e[n];if(1===n&&"-"===i&&"-"===e[0])return e;No(i)?t+="-"+i.toLowerCase():t+=i}return t.startsWith("ms-")?"-"+t:t}var Oo=function(e){return null==e||!1===e||""===e},Wo=function(e){var t,n,i=[];for(var r in e){var s=e[r];e.hasOwnProperty(r)&&!Oo(s)&&(Array.isArray(s)&&s.isCss||Ja(s)?i.push("".concat(Fo(r),":"),s,";"):no(s)?i.push.apply(i,us(us(["".concat(r," {")],Wo(s),!1),["}"],!1)):i.push("".concat(Fo(r),": ").concat((t=r,null==(n=s)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in ha||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return i};function jo(e,t,n,i){if(Oo(e))return[];if(Za(e))return[".".concat(e.styledComponentId)];if(Ja(e)){if(!Ja(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var r=e(t);return"production"===ls.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof Do||no(r)||null===r||console.error("".concat(Na(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),jo(r,t,n,i)}var s;return e instanceof Do?n?(e.inject(n,i),[e.getName(i)]):[e]:no(e)?Wo(e):Array.isArray(e)?Array.prototype.concat.apply(ka,e.map((function(e){return jo(e,t,n,i)}))):[e.toString()]}var Bo=Ia(ga),zo=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===ls.env.NODE_ENV&&(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Ja(n)&&!Za(n))return!1}return!0}(e),this.componentId=t,this.baseHash=La(Bo,t),this.baseStyle=n,Eo.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var i=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n
2):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))i=eo(i,this.staticRulesId);else{var r=to(jo(this.rules,e,t,n)),s=Ta(La(this.baseHash,r)>>>0);if(!t.hasNameForId(this.componentId,s)){var a=n(r,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,a)}i=eo(i,s),this.staticRulesId=s}else{for(var o=La(this.baseHash,n.hash),l="",c=0;c<this.rules.length;c++){var u=this.rules[c];if("string"==typeof u)l+=u,"production"!==ls.env.NODE_ENV&&(o=La(o,u));else if(u){var h=to(jo(u,e,t,n));o=La(o,h+c),l+=h}}if(l){var d=Ta(o>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(l,".".concat(d),void 0,this.componentId)),i=eo(i,d)}}return i},e}(),Uo=i.createContext(void 0);function Ho(e){var t=i.useContext(Uo),n=(0,i.useMemo)((function(){return function(e,t){if(!e)throw oo(14);if(Ja(e)){var n=e(t);if("production"!==ls.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw oo(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw oo(8);return t?cs(cs({},t),e):e}(e.theme,t)}),[e.theme,t]);return e.children?i.createElement(Uo.Provider,{value:n},e.children):null}Uo.Consumer;var Vo={},qo=new Set;function Go(e,t,n){var r,s=Za(e),a=e,o=!Fa(e),l=t.attrs,c=void 0===l?ka:l,u=t.componentId,h=void 0===u?function(e,t){var n="string"!=typeof e?"sc":Ea(e);Vo[n]=(Vo[n]||0)+1;var i="".concat(n,"-").concat(Da(ga+n+Vo[n]));return t?"".concat(t,"-").concat(i):i}(t.displayName,t.parentComponentId):u,d=t.displayName,f=void 0===d?Fa(r=e)?"styled.".concat(r):"Styled(".concat(Na(r),")"):d,p=t.displayName&&t.componentId?"".concat(Ea(t.displayName),"-").concat(t.componentId):t.componentId||h,g=s&&a.attrs?a.attrs.concat(c).filter(Boolean):c,m=t.shouldForwardProp;if(s&&a.shouldForwardProp){var v=a.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;m=function(e,t){return v(e,t)&&y(e,t)}}else m=v}var b=new zo(n,p,s?a.componentStyle:void 0);function w(e,t){return function(e,t,n){var r=e.attrs,s=e.componentStyle,a=e.defaultProps,o=e.foldedComponentIds,l=e.styledComponentId,c=e.target,u=i.useContext(Uo),h=Io(),d=e.shouldForwardProp||h.shouldForwardProp;"production"!==ls.env.NODE_ENV&&(0,i.useDebugValue)(l);var f=function(e,t,n){return void 0===n&&(n=xa),e.theme!==n.theme&&e.theme||t||n.theme}(t,u,a)||xa,p=function(e,t,n){for(var i,r=cs(cs({},t),{className:void 0,theme:n}),s=0;s<e.length;s+=1){var a=Ja(i=e[s])?i(r):i;for(var o in a)r[o]="className"===o?eo(r[o],a[o]):"style"===o?cs(cs({},r[o]),a[o]):a[o]}return t.className&&(r.className=eo(r.className,t.className)),r}(r,t,f),g=p.as||c,m={};for(var v in p)void 0===p[v]||"$"===v[0]||"as"===v||"theme"===v&&p.theme===f||("forwardedAs"===v?m.as=p.forwardedAs:d&&!d(v,g)||(m[v]=p[v],d||"development"!==ls.env.NODE_ENV||fs(v)||qo.has(v)||!Sa.has(g)||(qo.add(v),console.warn('styled-components: it looks like an unknown prop "'.concat(v,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var y=function(e,t){var n=Io(),r=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return"production"!==ls.env.NODE_ENV&&(0,i.useDebugValue)(r),r}(s,p);"production"!==ls.env.NODE_ENV&&e.warnTooManyClasses&&e.warnTooManyClasses(y);var b=eo(o,l);return y&&(b+=" "+y),p.className&&(b+=" "+p.className),m[Fa(g)&&!Sa.has(g)?"class":"className"]=b,m.ref=n,(0,i.createElement)(g,m)}(k,e,t)}w.displayName=f;var k=i.forwardRef(w);return k.attrs=g,k.componentStyle=b,k.displayName=f,k.shouldForwardProp=m,k.foldedComponentIds=s?eo(a.foldedComponentIds,a.styledComponentId):"",k.styledComponentId=p,k.target=s?a.target:e,Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0,r=t;i<r.length;i++)io(e,r[i],!0);return e}({},a.defaultProps,e):e}}),"production"!==ls.env.NODE_ENV&&(function(e,t){if("production"!==ls.env.NODE_ENV){var n=t?' with the id of "'.concat(t,'"'):"",r="The component ".concat(e).concat(n," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",s=console.error;try{var a=!0;console.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];ba.test(e)?(a=!1,wa.delete(r)):s.apply(void 0,us([e],t,!1))},(0,i.useRef)(),a&&!wa.has(r)&&(console.warn(r),wa.add(r))}catch(l){ba.test(l.message)&&wa.delete(r)}finally{console.error=s}}}
2(f,p),k.warnTooManyClasses=function(e,t){var n={},i=!1;return function(r){if(!i&&(n[r]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),i=!0,n={}}}}(f,p)),ro(k,(function(){return".".concat(k.styledComponentId)})),o&&Qa(k,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),k}function Xo(e,t){for(var n=[e[0]],i=0,r=t.length;i<r;i+=1)n.push(t[i],e[i+1]);return n}var Yo=function(e){return Object.assign(e,{isCss:!0})};function Ko(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Ja(e)||no(e))return Yo(jo(Xo(ka,us([e],t,!0))));var i=e;return 0===t.length&&1===i.length&&"string"==typeof i[0]?jo(i):Yo(jo(Xo(i,t)))}function $o(e,t,n){if(void 0===n&&(n=xa),!t)throw oo(1,t);var i=function(i){for(var r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];return e(t,n,Ko.apply(void 0,us([i],r,!1)))};return i.attrs=function(i){return $o(e,t,cs(cs({},n),{attrs:Array.prototype.concat(n.attrs,i).filter(Boolean)}))},i.withConfig=function(i){return $o(e,t,cs(cs({},n),i))},i}var Qo=function(e){return $o(Go,e)},Jo=Qo;Sa.forEach((function(e){Jo[e]=Qo(e)})),"production"!==ls.env.NODE_ENV&&typeof navigator<"u"&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var Zo="__sc-".concat(da,"__");"production"!==ls.env.NODE_ENV&&"test"!==ls.env.NODE_ENV&&typeof window<"u"&&(window[Zo]||(window[Zo]=0),1===window[Zo]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window[Zo]+=1);const el={en:{documentNavInfo:"Document {{ currentFileNo }} of {{ allFilesCount }}",noRendererMessage:"No renderer for file type: {{{ fileType }}}",downloadButtonLabel:"Download file",brokenFile:"Your file is broken. Please check it on your machine.",msgPluginRecipients:"Recipients",msgPluginSender:"Sender",pdfPluginLoading:"Loading...",pdfPluginPageNumber:"Page {{ currentPage }}/{{ allPagesCount }}"},pl:{documentNavInfo:"Dokument {{ currentFileNo }} z {{ allFilesCount }}",noRendererMessage:"Brak funckji renderuj\u0105cej dla: {{{ fileType }}}",downloadButtonLabel:"Pobierz plik",brokenFile:"Tw\xf3j plik jest uszkodzony. Sprawd\u017a go na swoim komputerze.",msgPluginRecipients:"Odbiorcy",msgPluginSender:"Nadawca",pdfPluginLoading:"Wczytywanie...",pdfPluginPageNumber:"Strona {{ currentPage }}/{{ allPagesCount }}"},es:{documentNavInfo:"Documento {{ currentFileNo }} de {{ allFilesCount }}",noRendererMessage:"No hay procesador para el tipo de archivo: {{{ fileType }}}",downloadButtonLabel:"Descargar archivo",brokenFile:"Tu archivo est\xe1 roto. Compru\xe9balo en tu m\xe1quina.",msgPluginRecipients:"Destinatarios",msgPluginSender:"Remitente",pdfPluginLoading:"Cargando...",pdfPluginPageNumber:"P\xe1gina {{ currentPage }}/{{ allPagesCount }}"},de:{documentNavInfo:"Dokument {{ currentFileNo }} von {{ allFilesCount }}",noRendererMessage:"Kein Renderer f\xfcr Dateityp: {{{ fileType }}}",downloadButtonLabel:"Datei herunterladen",brokenFile:"Ihre Datei ist defekt. Bitte \xfcberpr\xfcfen Sie sie auf Ihrem Rechner.",msgPluginRecipients:"Empf\xe4nger",msgPluginSender:"Absender",pdfPluginLoading:"Wird geladen...",pdfPluginPageNumber:"Seite {{ currentPage }}/{{ allPagesCount }}"},it:{documentNavInfo:"Documento {{ currentFileNo }} di {{ allFilesCount }}",noRendererMessage:"Nessun renderer per il tipo di file: {{{ fileType }}}",downloadButtonLabel:"Scarica file",brokenFile:"Il tuo file \xe8 danneggiato. Controllalo sul tuo computer.",msgPluginRecipients:"Destinatari",msgPluginSender:"Mittente",pdfPluginLoading:"Caricamento in corso...",pdfPluginPageNumber:"Pagina {{ currentPage }}/{{ allPagesCount }}"},pt:{documentNavInfo:"Documento {{ currentFileNo }} de {{ allFilesCount }}",noRendererMessage:"Nenhum renderizador para o tipo de arquivo: {{{ fileType }}}",downloadButtonLabel:"Baixar arquivo",brokenFile:"Seu arquivo est\xe1 quebrado. Por favor, verifique-o em sua m\xe1quina.",msgPluginRecipients:"Destinat\xe1rios",msgPluginSender:"Remetente",pdfPluginLoading:"Carregando...",pdfPluginPageNumber:"P\xe1gina {{ currentPage }}/{{ allPagesCount }}"},fr:{documentNavInfo:"Document {{ currentFileNo }} de {{ allFilesCount }}",noRendererMessage:"Aucun moteur de rendu pour le type de fichier : {{{ fileType }}}",downloadButtonLabel:"T\xe9l\xe9charger le fichier",brokenFile:"Votre fichier est cass\xe9. Veuillez le v\xe9rifier sur votre machine.",msgPluginRecipients:"Destinataires",msgPluginSender:"Exp\xe9diteur",pdfPluginLoading:"Chargement...",pdfPluginPageNumber:"Page {{ currentPage }}/{{ allPagesCount }}"},ar:{documentNavInfo:"\u0645\u0633\u062a\u0646\u062f {{ currentFileNo }} \u0645\u0646 {{ allFilesCount }}",noRendererMessage:"{{{ fileType }}} : \u0644\u0627 \u064a\u0645\u0643\u0646\u0646\u0627 \u0639\u0631\u0636 \u0647\u0630\u0627 \u0627\u0644\u0646\u0648\u0639 \u0645\u0646 \u0627\u0644\u0645\u0644\u0641\u0627\u062a",downloadButtonLabel:"\u062a\u062d\u0645\u064a\u0644 \u0627\u0644\u0645\u0644\u0641",brokenFile:"\u0627\u0644\u0645\u0644\u0641 \u062a\u0627\u0644\u0641\u060c \u064a\u0631\u062c\u0649 \u0627\u0644\u062a\u062d\u0642\u0642 \u0645\u0646\u0647 \u0639\u0644\u0649 \u062c\u0647\u0627\u0632\u0643 \u0627\u0644\u062e\u0627\u0635.",msgPluginRecipients:"\u0627\u0644\u0645\u0633\u062a\u0644\u0645\u064a\u0646",msgPluginSender:"\u0627\u0644\u0645\u0631\u0633\u0644",pdfPluginLoading:"\u062a\u062d\u0645\u064a\u0644 ...",pdfPluginPageNumber:" {{ allPagesCount }} \\ {{ currentPage }} \u0635\u0641\u062d\u0629 "},sr:{documentNavInfo:"Dokument {{ currentFileNo }} od {{ allFilesCount }}",noRendererMessage:"Ne postoji pregleda\u010d za tip fajla: {{ fileType }}",downloadButtonLabel:"Preuzimanje fajla",brokenFile:"Va\u0161 fajl nije dobar. Molimo Vas da probate da ga otvorite na va\u0161em ra\u010dunaru.",msgPluginRecipients:"Primaoci",msgPluginSender:"Po\u0161iljalac",pdfPluginLoading:"U\u010ditavanje...",pdfPluginPageNumber:"Strana {{ currentPage }}/{{ allPagesCount }}"},sr_cyr:{documentNavInfo:"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442 {{ currentFileNo }} od {{ allFilesCount }}",noRendererMessage:"\u041d\u0435 \u043f\u043e\u0441\u0442\u043e\u0458\u0438 \u043f\u0440\u0435\u0433\u043b\u0435\u0434\u0430\u0447 \u0437\u0430 \u0442\u0438\u043f \u0444\u0430\u0458\u043b\u0430: {{ fileType }}",downloadButtonLabel:"\u041f\u0440\u0435\u0443\u0437\u0438\u043c\u0430\u045a\u0435 \u0444\u0430\u0458\u043b\u0430",brokenFile:"\u0412\u0430\u0448 \u0444\u0430\u0458\u043b \u043d\u0438\u0458\u0435 \u0434\u043e\u0431\u0430\u0440. \u041c\u043e\u043b\u0438\u043c\u043e \u0412\u0430\u0441 \u0434\u0430 \u043f\u0440\u043e\u0431\u0430\u0442\u0435 \u0434\u0430 \u0433\u0430 \u043e\u0442\u0432\u043e\u0440\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0447\u0443\u043d\u0430\u0440\u0443.",msgPluginRecipients:"\u041f\u0440\u0438\u043c\u0430\u043e\u0446\u0438",msgPluginSender:"\u041f\u043e\u0448\u0438\u0459\u0430\u043b\u0430\u0446",pdfPluginLoading:"\u0423\u0447\u0438\u0442\u0430\u0432\u0430\u045a\u0435...",pdfPluginPageNumber:"\u0421\u0442\u0440\u0430\u043d\u0430 {{ currentPage }}/{{ allPagesCount }}"},ja:{documentNavInfo:"\u30d5\u30a1\u30a4\u30eb {{ currentFileNo }} / {{ allFilesCount }}",noRendererMessage:"\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u306b\u5bfe\u5fdc\u3057\u305f\u30ec\u30f3\u30c0\u30e9\u30fc\u306f\u3042\u308a\u307e\u305b\u3093: {{ fileType }}",downloadButtonLabel:"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9",brokenFile:"\u30d5\u30a1\u30a4\u30eb\u304c\u58ca\u308c\u3066\u3044\u307e\u3059\u3002\u3042\u306a\u305f\u306e\u30de\u30b7\u30f3\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",msgPluginRecipients:"\u53d7\u4fe1\u8005",msgPluginSender:"\u9001\u4fe1\u8005",pdfPluginLoading:"\u30ed\u30fc\u30c6\u30a3\u30f3\u30b0\u4e2d...",pdfPluginPageNumber:"\u30da\u30fc\u30b8 {{ currentPage }}/{{ allPagesCount }}"},ru:{documentNavInfo:"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442 {{ currentFileNo }} \u0438\u0437 {{ allFilesCount }}",noRendererMessage:"\u0414\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u0444\u0430\u0439\u043b\u0430 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u043e\u043c: {{{ fileType }}}",downloadButtonLabel:"\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b",brokenFile:"\u0412\u0430\u0448 \u0444\u0430\u0439\u043b \u0441\u043b\u043e\u043c\u0430\u043d. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0435\u0433\u043e \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u043a\u043e\u043c\u044c\u044e\u0442\u0435\u0440\u0435.",msgPluginRecipients:"\u041f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u0438",msgPluginSender:"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c",pdfPluginLoading:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430...",pdfPluginPageNumber:"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 {{ currentPage }}/{{ allPagesCount }}"},se:{documentNavInfo:"Dokument {{ currentFileNo }} av {{ allFilesCount }}",noRendererMessage:"Ingen renderare f\xf6r filtypen: {{{ fileType }}}",downloadButtonLabel:"Ladda ner",brokenFile:"Filen \xe4r trasig. Var v\xe4nlig kontrollera den p\xe5 din maskin.",msgPluginRecipients:"Mottagare",msgPluginSender:"Avs\xe4ndare",pdfPluginLoading:"Laddar...",pdfPluginPageNumber:"Sida {{ currentPage }}/{{ allPagesCount }}"}},tl=(Object.keys(el),"en"),nl="SET_ALL_DOCUMENTS",il="SET_DOCUMENT_LOADING",rl="NEXT_DOCUMENT",sl="PREVIOUS_DOCUMENT",al="UPDATE_CURRENT_DOCUMENT",ol="SET_RENDERER_RECT",ll="SET_MAIN_CONFIG",cl=e=>({type:il,value:e}),ul=()=>({type:rl}),hl=()=>({type:sl}),dl=e=>({type:al,document:e}),fl={currentFileNo:0,documents:[],documentLoading:!0,currentDocument:void 0,rendererRect:void 0,config:{},pluginRenderers:[],language:tl},pl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fl,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case nl:{const{documents:n,initialActiveDocument:i}=t;return{...e,documents:n,currentDocument:i||n[0]||null,currentFileNo:i&&n.includes(i)?n.indexOf(i):fl.currentFileNo}}case il:{const{value:n}=t;return{...e,documentLoading:n}}case rl:{if(e.currentFileNo>=e.documents.length-1)return e;const t=e.currentFileNo+1;return e.onDocumentChange&&e.onDocumentChange(e.documents[t]),{...e,currentFileNo:t,currentDocument:e.documents[t],documentLoading:!0}}
2case sl:{if(e.currentFileNo<=0)return e;const t=e.currentFileNo-1;return e.onDocumentChange&&e.onDocumentChange(e.documents[t]),{...e,currentFileNo:e.currentFileNo-1,currentDocument:e.documents[t],documentLoading:!0}}case al:{const{document:n}=t;return{...e,currentDocument:n,currentFileNo:e.documents.findIndex((e=>e.uri===n.uri))}}case ol:{const{rect:n}=t;return{...e,rendererRect:n}}case ll:{const{config:n}=t;return{...e,config:n}}default:return e}},gl=(0,i.createContext)({state:fl,dispatch:()=>null}),ml=(0,i.forwardRef)(((e,t)=>{var n;const{children:r,documents:s,config:a,pluginRenderers:o,prefetchMethod:l,requestHeaders:c,initialActiveDocument:u,language:h,activeDocument:d,onDocumentChange:f}=e,[p,g]=(0,i.useReducer)(pl,{...fl,documents:s||[],currentDocument:s&&s.length?u||s[0]:void 0,config:a,pluginRenderers:o,prefetchMethod:l,requestHeaders:c,currentFileNo:u&&null!==(n=s.findIndex((e=>e===u)))&&void 0!==n?n:0,language:h&&el[h]?h:tl,activeDocument:d,onDocumentChange:f});return(0,i.useEffect)((()=>{g(((e,t)=>({type:nl,documents:e,initialActiveDocument:t}))(s,u)),a&&g((e=>({type:ll,config:e}))(a))}),[s,a,u]),(0,i.useEffect)((()=>{d&&g(dl(d))}),[d]),(0,i.useImperativeHandle)(t,(()=>({prev(){g(hl())},next(){g(ul())}})),[g]),(0,X.jsx)(gl.Provider,{value:{state:p,dispatch:g},children:r})})),vl=Ko(a||(a=s(["\n background-color: ",";\n color: ",";\n"])),(e=>e.theme.primary),(e=>e.theme.textPrimary)),yl=Ko(o||(o=s(["\n background-color: ",";\n color: ",";\n"])),(e=>e.theme.secondary),(e=>e.theme.textSecondary)),bl=Jo.button(l||(l=s(["\n ","\n display: flex;\n justify-content: center;\n align-items: center;\n width: 35px;\n height: 35px;\n padding: 0;\n margin: 0 0 0 5px;\n text-align: center;\n font-size: 18px;\n border: 0;\n outline: none;\n cursor: pointer;\n text-decoration: none;\n border-radius: 35px;\n opacity: ",";\n pointer-events: ",";\n box-shadow: 2px 2px 3px #00000033;\n\n @media (max-width: 768px) {\n width: 30px;\n height: 30px;\n font-size: 15px;\n }\n"])),vl,(e=>e.disabled?.4:1),(e=>e.disabled?"none":"all")),wl=Jo.a(c||(c=s(["\n display: flex;\n justify-content: center;\n align-items: center;\n border: 0;\n outline: none;\n cursor: pointer;\n text-decoration: none;\n border-radius: 35px;\n background-color: ",";\n color: ",";\n box-shadow: 2px 2px 3px #00000033;\n\n width: 35px;\n height: 35px;\n font-size: 18px;\n @media (max-width: 768px) {\n width: 30px;\n height: 30px;\n font-size: 15px;\n }\n"])),(e=>e.theme.primary),(e=>e.theme.textPrimary));Jo(bl)(u||(u=s([""])));const kl=Jo(bl)(h||(h=s(["\n ","\n"])),yl),xl=e=>(0,X.jsx)(_l,{...e}),Sl=e=>(0,X.jsx)(_l,{...e,reverse:!0}),_l=e=>{let{color:t,size:n,reverse:i}=e;return(0,X.jsx)("svg",{width:n||"100%",height:n||"100%",style:{transform:"".concat(i?"rotate(180deg)":"")},id:"arrow_left",version:"1.1",viewBox:"0 0 32 32",xmlSpace:"preserve",children:(0,X.jsx)("path",{clipRule:"evenodd",d:"M31.106,15H3.278l8.325-8.293 c0.391-0.391,0.391-1.024,0-1.414c-0.391-0.391-1.024-0.391-1.414,0l-9.9,9.899c-0.385,0.385-0.385,1.029,0,1.414l9.9,9.9 c0.391,0.391,1.024,0.391,1.414,0c0.391-0.391,0.391-1.024,0-1.414L3.278,17h27.828c0.552,0,1-0.448,1-1 C32.106,15.448,31.658,15,31.106,15z",fill:t||"#aaa",fillRule:"evenodd",id:"Arrow_Back"})})},Al=e=>{const{color:t,size:n}=e;return(0,X.jsx)("svg",{width:n||"100%",height:n||"100%",version:"1.1",id:"Icons",viewBox:"0 0 32 32",xmlSpace:"preserve",style:{alignSelf:"center",justifySelf:"center"},children:(0,X.jsxs)("g",{children:[(0,X.jsx)("path",{fill:t||"#aaa",d:"M16,2c-0.6,0-1,0.4-1,1v5c0,0.6,0.4,1,1,1s1-0.4,1-1V3C17,2.4,16.6,2,16,2z"}),(0,X.jsx)("path",{fill:t||"#aaa",d:"M7.5,6.1c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l3.5,3.5c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3c0.4-0.4,0.4-1,0-1.4L7.5,6.1\n\t\tz"}),(0,X.jsx)("path",{fill:t||"#aaa",d:"M9,16c0-0.6-0.4-1-1-1H3c-0.6,0-1,0.4-1,1s0.4,1,1,1h5C8.6,17,9,16.6,9,16z"}),(0,X.jsx)("path",{fill:t||"#aaa",d:"M9.6,20.9l-3.5,3.5c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3l3.5-3.5c0.4-0.4,0.4-1,0-1.4\n\t\tS10,20.6,9.6,20.9z"}),(0,X.jsx)("path",{fill:t||"#aaa",d:"M16,23c-0.6,0-1,0.4-1,1v5c0,0.6,0.4,1,1,1s1-0.4,1-1v-5C17,23.4,16.6,23,16,23z"}),(0,X.jsx)("path",{fill:t||"#aaa",d:"M22.4,20.9c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l3.5,3.5c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3c0.4-0.4,0.4-1,0-1.4\n\t\tL22.4,20.9z"}),(0,X.jsx)("path",{fill:t||"#aaa",d:"M29,15h-5c-0.6,0-1,0.4-1,1s0.4,1,1,1h5c0.6,0,1-0.4,1-1S29.6,15,29,15z"}),(0,X.jsx)("path",{fill:t||"#aaa",d:"M21.7,11.3c0.3,0,0.5-0.1,0.7-0.3l3.5-3.5c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0l-3.5,3.5c-0.4,0.4-0.4,1,0,1.4\n\t\tC21.1,11.2,21.4,11.3,21.7,11.3z"})]})})};var El=Object.prototype.toString,Cl=Array.isArray||function(e){return"[object Array]"===El.call(e)};function Ml(e){return"function"==typeof e}function Pl(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Tl(e,t){return null!=e&&"object"==typeof e&&t in e}function Rl(e,t){return null!=e&&"object"!=typeof e&&e.hasOwnProperty&&e.hasOwnProperty(t)}
vendor: 5,034 bytes, line 2
2var Ll=RegExp.prototype.test;var Il=/\S/;function Dl(e){return!function(e,t){return Ll.call(e,t)}(Il,e)}var Nl={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};var Fl=/\s*/,Ol=/\s+/,Wl=/\s*=/,jl=/\s*\}/,Bl=/#|\^|\/|>|\{|&|=|!/;function zl(e){this.string=e,this.tail=e,this.pos=0}function Ul(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function Hl(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}zl.prototype.eos=function(){return""===this.tail},zl.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},zl.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},Ul.prototype.push=function(e){return new Ul(e,this)},Ul.prototype.lookup=function(e){var t,n=this.cache;if(n.hasOwnProperty(e))t=n[e];else{for(var i,r,s,a=this,o=!1;a;){if(e.indexOf(".")>0)for(i=a.view,r=e.split("."),s=0;null!=i&&s<r.length;)s===r.length-1&&(o=Tl(i,r[s])||Rl(i,r[s])),i=i[r[s++]];else i=a.view[e],o=Tl(a.view,e);if(o){t=i;break}a=a.parent}n[e]=t}return Ml(t)&&(t=t.call(this.view)),t},Hl.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()},Hl.prototype.parse=function(e,t){var n=this.templateCache,i=e+":"+(t||Vl.tags).join(":"),r=typeof n<"u",s=r?n.get(i):void 0;return null==s&&(s=function(e,t){if(!e)return[];var n,i,r,s=!1,a=[],o=[],l=[],c=!1,u=!1,h="",d=0;function f(){if(c&&!u)for(;l.length;)delete o[l.pop()];else l=[];c=!1,u=!1}function p(e){if("string"==typeof e&&(e=e.split(Ol,2)),!Cl(e)||2!==e.length)throw new Error("Invalid tags: "+e);n=new RegExp(Pl(e[0])+"\\s*"),i=new RegExp("\\s*"+Pl(e[1])),r=new RegExp("\\s*"+Pl("}"+e[1]))}p(t||Vl.tags);for(var g,m,v,y,b,w,k=new zl(e);!k.eos();){if(g=k.pos,v=k.scanUntil(n))for(var x=0,S=v.length;x<S;++x)Dl(y=v.charAt(x))?(l.push(o.length),h+=y):(u=!0,s=!0,h+=" "),o.push(["text",y,g,g+1]),g+=1,"\n"===y&&(f(),h="",d=0,s=!1);if(!k.scan(n))break;if(c=!0,m=k.scan(Bl)||"name",k.scan(Fl),"="===m?(v=k.scanUntil(Wl),k.scan(Wl),k.scanUntil(i)):"{"===m?(v=k.scanUntil(r),k.scan(jl),k.scanUntil(i),m="&"):v=k.scanUntil(i),!k.scan(i))throw new Error("Unclosed tag at "+k.pos);if(b=">"==m?[m,v,g,k.pos,h,d,s]:[m,v,g,k.pos],d++,o.push(b),"#"===m||"^"===m)a.push(b);else if("/"===m){if(!(w=a.pop()))throw new Error('Unopened section "'+v+'" at '+g);if(w[1]!==v)throw new Error('Unclosed section "'+w[1]+'" at '+g)}else"name"===m||"{"===m||"&"===m?u=!0:"="===m&&p(v)}if(f(),w=a.pop())throw new Error('Unclosed section "'+w[1]+'" at '+k.pos);return function(e){for(var t,n=[],i=n,r=[],s=0,a=e.length;s<a;++s)switch(t=e[s],t[0]){case"#":case"^":i.push(t),r.push(t),i=t[4]=[];break;case"/":r.pop()[5]=t[2],i=r.length>0?r[r.length-1][4]:n;break;default:i.push(t)}return n}(function(e){for(var t,n,i=[],r=0,s=e.length;r<s;++r)(t=e[r])&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(i.push(t),n=t));return i}(o))}(e,t),r&&n.set(i,s)),s},Hl.prototype.render=function(e,t,n,i){var r=this.getConfigTags(i),s=this.parse(e,r),a=t instanceof Ul?t:new Ul(t,void 0);return this.renderTokens(s,a,n,e,i)},Hl.prototype.renderTokens=function(e,t,n,i,r){for(var s,a,o,l="",c=0,u=e.length;c<u;++c)o=void 0,"#"===(a=(s=e[c])[0])?o=this.renderSection(s,t,n,i,r):"^"===a?o=this.renderInverted(s,t,n,i,r):">"===a?o=this.renderPartial(s,t,n,r):"&"===a?o=this.unescapedValue(s,t):"name"===a?o=this.escapedValue(s,t,r):"text"===a&&(o=this.rawValue(s)),void 0!==o&&(l+=o);return l},Hl.prototype.renderSection=function(e,t,n,i,r){var s=this,a="",o=t.lookup(e[1]);if(o){if(Cl(o))for(var l=0,c=o.length;l<c;++l)a+=this.renderTokens(e[4],t.push(o[l]),n,i,r);else if("object"==typeof o||"string"==typeof o||"number"==typeof o)a+=this.renderTokens(e[4],t.push(o),n,i,r);else if(Ml(o)){if("string"!=typeof i)throw new Error("Cannot use higher-order sections without the original template");null!=(o=o.call(t.view,i.slice(e[3],e[5]),(function(e){return s.render(e,t,n,r)})))&&(a+=o)}else a+=this.renderTokens(e[4],t,n,i,r);return a}},Hl.prototype.renderInverted=function(e,t,n,i,r){var s=t.lookup(e[1]);if(!s||Cl(s)&&0===s.length)return this.renderTokens(e[4],t,n,i,r)},Hl.prototype.indentPartial=function(e,t,n){for(var i=t.replace(/[^ \t]/g,""),r=e.split("\n"),s=0;s<r.length;s++)r[s].length&&(s>0||!n)&&(r[s]=i+r[s]);return r.join("\n")},Hl.prototype.renderPartial=function(e,t,n,i){if(n){var r=this.getConfigTags(i),s=Ml(n)?n(e[1]):n[e[1]];if(null!=s){var a=e[6],o=e[5],l=e[4],c=s;0==o&&l&&(c=this.indentPartial(s,l,a));var u=this.parse(c,r);return this.renderTokens(u,t,n,c,i)}}},Hl.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},Hl.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||Vl.escape,r=t.lookup(e[1]);
2if(null!=r)return"number"==typeof r&&i===Vl.escape?String(r):i(r)},Hl.prototype.rawValue=function(e){return e[1]},Hl.prototype.getConfigTags=function(e){return Cl(e)?e:e&&"object"==typeof e?e.tags:void 0},Hl.prototype.getConfigEscape=function(e){if(e&&"object"==typeof e&&!Cl(e))return e.escape};var Vl={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){ql.templateCache=e},get templateCache(){return ql.templateCache}},ql=new Hl;Vl.clearCache=function(){return ql.clearCache()},Vl.parse=function(e,t){return ql.parse(e,t)},Vl.render=function(e,t,n,i){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+((Cl(r=e)?"array":typeof r)+'" was given as the first argument for mustache#render(template, view, partials)'));var r;return ql.render(e,t,n,i)},Vl.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return Nl[e]}))},Vl.Scanner=zl,Vl.Context=Ul,Vl.Writer=Hl;const Gl=()=>{const{state:{language:e}}=(0,i.useContext)(gl),t=el[tl];return{t:(0,i.useCallback)(((n,i)=>{const r=el[e];return r[n]?Vl.render(r[n],i):t[n]?Vl.render(t[n],i):n}),[e,t])}},Xl=()=>{const{state:{currentDocument:e,currentFileNo:t,documents:n},dispatch:r}=(0,i.useContext)(gl),{t:s}=Gl();if(n.length<=1||!e)return null;let a=e.uri||"";const o=null==a?void 0:a.split("/");return o.length&&(a=o[o.length-1]),(0,X.jsxs)(Yl,{id:"doc-nav",children:[(0,X.jsx)("p",{id:"doc-nav-info",children:s("documentNavInfo",{currentFileNo:t+1,allFilesCount:n.length})}),(0,X.jsx)(Kl,{id:"doc-nav-prev",onClick:()=>r(hl()),disabled:0===t,children:(0,X.jsx)(xl,{color:"#fff",size:"60%"})}),(0,X.jsx)($l,{id:"doc-nav-next",onClick:()=>r(ul()),disabled:t>=n.length-1,children:(0,X.jsx)(Sl,{color:"#fff",size:"60%"})})]})},Yl=Jo.div(d||(d=s(["\n min-width: 150px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n margin: 0 10px;\n color: ",";\n"])),(e=>e.theme.textPrimary)),Kl=Jo(kl)(f||(f=s(["\n width: 30px;\n height: 30px;\n margin: 0 5px 0 10px;\n\n @media (max-width: 768px) {\n width: 25px;\n height: 25px;\n }\n"]))),$l=Jo(Kl)(p||(p=s(["\n margin: 0 5px;\n"]))),Ql=(e,t)=>{var n;if(!e)return"";let i="";if(e.fileName)i=e.fileName;else{i=e.uri||"",i=decodeURI(i),t||(i=null==(n=null==i?void 0:i.split("?"))?void 0:n[0]);const r=null==i?void 0:i.split("/");r.length&&(i=r[r.length-1])}return i},Jl=()=>{var e,t;const{state:{config:n,currentDocument:r}}=(0,i.useContext)(gl);if(!r||null!=(e=null==n?void 0:n.header)&&e.disableFileName)return null;const s=Ql(r,(null==(t=null==n?void 0:n.header)?void 0:t.retainURLParams)||!1);return(0,X.jsx)(Zl,{id:"file-name","data-testid":"file-name",children:s})},Zl=Jo.div(g||(g=s(["\n flex: 1;\n text-align: left;\n color: ",";\n font-weight: bold;\n margin: 0 10px;\n overflow: hidden;\n"])),(e=>e.theme.textPrimary)),ec=()=>{var e,t,n;const{state:r,dispatch:s}=(0,i.useContext)(gl),{config:a}=r;if(null!=(e=null==a?void 0:a.header)&&e.disableHeader)return null;return(null==(n=null==(t=null==a?void 0:a.header)?void 0:t.overrideComponent)?void 0:n.call(t,r,(()=>s(hl())),(()=>s(ul()))))||(0,X.jsxs)(tc,{id:"header-bar","data-testid":"header-bar",children:[(0,X.jsx)(Jl,{}),(0,X.jsx)(Xl,{})]})},tc=Jo.div(m||(m=s(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n z-index: 1;\n padding: 0 10px;\n background-color: ",";\n font-size: 16px;\n min-height: 50px;\n\n @media (max-width: 768px) {\n min-height: 30px;\n padding: 5px;\n font-size: 10px;\n }\n"])),(e=>e.theme.primary)),nc=e=>{let{documentURI:t,signal:n,fileLoaderComplete:i,readerTypeFunction:r,headers:s}=e;return fetch(t,{signal:n,headers:s}).then((async e=>{const t=await e.blob(),n=new FileReader;switch(n.addEventListener("loadend",(()=>i(n))),r){case"arrayBuffer":n.readAsArrayBuffer(t);break;case"binaryString":n.readAsBinaryString(t);break;case"dataURL":n.readAsDataURL(t);break;case"text":n.readAsText(t)}})).catch((e=>e))},ic=e=>nc({...e,readerTypeFunction:"dataURL"}),rc=e=>nc({...e,readerTypeFunction:"text"}),sc=ic,ac=()=>{const{state:e,dispatch:t}=(0,i.useContext)(gl),{currentFileNo:n,currentDocument:r,prefetchMethod:s}=e,{CurrentRenderer:a}=(()=>{const{state:{currentDocument:e,pluginRenderers:t}}=(0,i.useContext)(gl),[n,r]=(0,i.useState)();return(0,i.useEffect)((()=>
2{if(!e)return;if(!e.fileType)return void r(void 0);const n=[];null==t||t.forEach((t=>{void 0!==e.fileType&&t.fileTypes.indexOf(e.fileType)>=0&&n.push(t)}));const[i]=n.sort(((e,t)=>t.weight-e.weight));r(i&&void 0!==i?()=>i:null)}),[e,t]),{CurrentRenderer:n}})(),o=(null==r?void 0:r.uri)||"";return(0,i.useEffect)((()=>{if(!r||void 0!==r.fileType)return;const n=new AbortController,{signal:i}=n;return fetch(o,{method:s||o.startsWith("blob:")?"GET":"HEAD",signal:i,headers:null==e?void 0:e.requestHeaders}).then((e=>{const n=e.headers.get("content-type"),i=(null==n?void 0:n.split(";"))||[],s=i.length?i[0]:void 0;t(dl({...r,fileType:s||void 0}))})).catch((e=>{if("AbortError"!==(null==e?void 0:e.name))throw e})),()=>{n.abort()}}),[n,o,r]),(0,i.useEffect)((()=>{var n;if(!r||void 0===a)return;const i=new AbortController,{signal:s}=i,l={documentURI:o,signal:s,fileLoaderComplete:e=>{if(!r||!e)return void t(cl(!1));const n={...r};null!==e.result&&(n.fileData=e.result),t(dl(n)),t(cl(!1))},headers:null==e?void 0:e.requestHeaders};return null===a?t(cl(!1)):void 0!==a.fileLoader?null==(n=a.fileLoader)||n.call(a,l):sc(l),()=>{i.abort()}}),[a,n]),{state:e,dispatch:t,CurrentRenderer:a}},oc=e=>{let{children:t}=e;var n,r;const{state:s}=(0,i.useContext)(gl),{config:a}=s,[o,l]=(0,i.useState)(!1===(null==(n=null==a?void 0:a.loadingRenderer)?void 0:n.showLoadingTimeout));return(0,i.useEffect)((()=>{var e;setTimeout((()=>{l(!0)}),"number"==typeof(null==(e=null==a?void 0:a.loadingRenderer)?void 0:e.showLoadingTimeout)?a.loadingRenderer.showLoadingTimeout:500)}),[null==(r=null==a?void 0:a.loadingRenderer)?void 0:r.showLoadingTimeout]),o?(0,X.jsx)(X.Fragment,{children:t}):null},lc=e=>{let{documents:t,documentLoading:n,config:i,currentDocument:r,fileName:s,CurrentRenderer:a,state:o,t:l}=e;var c,u;if(t.length){if(n){if(i&&null!=(c=null==i?void 0:i.loadingRenderer)&&c.overrideComponent){const e=i.loadingRenderer.overrideComponent;return(0,X.jsx)(oc,{children:(0,X.jsx)(e,{document:r,fileName:s})})}return(0,X.jsx)(oc,{children:(0,X.jsx)(hc,{id:"loading-renderer","data-testid":"loading-renderer",children:(0,X.jsx)(fc,{children:(0,X.jsx)(Al,{color:"#444",size:40})})})})}var h;if(a)return(0,X.jsx)(a,{mainState:o});if(void 0===a)return null;if(i&&null!=(u=null==i?void 0:i.noRenderer)&&u.overrideComponent){const e=i.noRenderer.overrideComponent;return(0,X.jsx)(e,{document:r,fileName:s})}return(0,X.jsxs)("div",{id:"no-renderer","data-testid":"no-renderer",children:[l("noRendererMessage",{fileType:null!==(h=null==r?void 0:r.fileType)&&void 0!==h?h:""}),(0,X.jsx)(pc,{id:"no-renderer-download",href:null==r?void 0:r.uri,download:null==r?void 0:r.uri,children:l("downloadButtonLabel")})]})}return(0,X.jsx)("div",{id:"no-documents"})},cc=()=>{var e;const{state:t,dispatch:n,CurrentRenderer:r}=ac(),{documents:s,documentLoading:a,currentDocument:o,config:l}=t,c=(()=>{const[e,t]=(0,i.useState)({width:void 0,height:void 0});return(0,i.useEffect)((()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)}),[]),e})(),{t:u}=Gl(),h=(0,i.useCallback)((e=>{e&&n((e=>({type:ol,rect:e}))(null==e?void 0:e.getBoundingClientRect()))}),[c,n]),d=Ql(o,(null==(e=null==l?void 0:l.header)?void 0:e.retainURLParams)||!1);return(0,X.jsx)(uc,{id:"proxy-renderer","data-testid":"proxy-renderer",ref:h,children:(0,X.jsx)(lc,{state:t,documents:s,documentLoading:a,config:l,currentDocument:o,fileName:d,CurrentRenderer:r,t:u})})},uc=Jo.div(v||(v=s(["\n display: flex;\n flex: 1;\n"]))),hc=Jo.div(y||(y=s(["\n display: flex;\n flex: 1;\n height: 75px;\n align-items: center;\n justify-content: center;
2\n"]))),dc=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"production"!==ls.env.NODE_ENV&&typeof navigator<"u"&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var i=to(Ko.apply(void 0,us([e],t,!1))),r=Da(i);return new Do(r,i)}(b||(b=s(["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"]))),fc=Jo.div(w||(w=s(["\n animation-name: ",";\n animation-duration: 4s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n"])),dc),pc=Jo(wl)(k||(k=s(["\n width: 130px;\n height: 30px;\n background-color: ",";\n @media (max-width: 768px) {\n width: 125px;\n height: 25px;\n }\n"])),(e=>e.theme.primary)),gc={primary:"#fff",secondary:"#000",tertiary:"#ffffff99",textPrimary:"#000",textSecondary:"#fff",textTertiary:"#00000044",disableThemeScrollbar:!1},mc=e=>{const{mainState:{currentDocument:t},children:n}=e;return t?(0,X.jsx)(vc,{id:"image-renderer",...e,children:n||(0,X.jsx)(yc,{id:"image-img",src:t.fileData})}):null};mc.fileTypes=[],mc.weight=0;const vc=Jo.div(x||(x=s(["\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n background-color: #fff;\n"]))),yc=Jo.img(S||(S=s(["\n max-width: 95%;\n max-height: 95%;\n"]))),bc=e=>(0,X.jsx)(mc,{...e});bc.fileTypes=["bmp","image/bmp"],bc.weight=0;const wc=e=>{let{mainState:{currentDocument:t}}=e;return(0,i.useEffect)((()=>{const e=null==t?void 0:t.fileData;let n="";const i=(null==e?void 0:e.replace(/^data:text\/html;(?:charset=([^;]*);)?base64,/,((e,t)=>(n=t,""))))||"";let r=window.atob(i);if(n){const e=new Uint8Array(r.length);for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);r=new TextDecoder(n).decode(e)}const s=document.getElementById("html-body"),a=(null==s?void 0:s.contentWindow)&&s.contentWindow;if(!a)return;const o=a.document;o.open(),o.write("".concat(r)),o.close()}),[t]),(0,X.jsx)(kc,{id:"html-renderer",children:(0,X.jsx)(xc,{id:"html-body",sandbox:"allow-same-origin"})})};wc.fileTypes=["htm","html","text/htm","text/html"],wc.weight=0,wc.fileLoader=ic;const kc=Jo.div(_||(_=s(["\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 0 30px;\n"]))),xc=Jo.iframe(A||(A=s(["\n height: 100%;\n padding: 15px;\n margin: 20px 0 20px 0;\n border: 1px solid ",";\n"])),(e=>e.theme.secondary)),Sc=e=>(0,X.jsx)(mc,{...e});Sc.fileTypes=["jpg","jpeg","image/jpg","image/jpeg"],Sc.weight=0;const _c=e=>{let{mainState:{currentDocument:t}}=e;return t?(0,X.jsx)(Ec,{id:"msdoc-renderer",children:(0,X.jsx)(Cc,{id:"msdoc-iframe",title:"msdoc-iframe",src:"https://view.officeapps.live.com/op/embed.aspx?src=".concat(encodeURIComponent(t.uri)),frameBorder:"0"})}):null},Ac={odt:["odt","application/vnd.oasis.opendocument.text"],doc:["doc","application/msword"],docx:["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/octet-stream"],xls:["xls","application/vnd.ms-excel"],xlsx:["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],ppt:["ppt","application/vnd.ms-powerpoint"],pptx:["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"]};_c.fileTypes=[...Ac.odt,...Ac.doc,...Ac.docx,...Ac.xls,...Ac.xlsx,...Ac.ppt,...Ac.pptx],_c.weight=0,_c.fileLoader=e=>{let{fileLoaderComplete:t}=e;return t()};const Ec=Jo.div(E||(E=s(["\n width: 100%;\n"]))),Cc=Jo.iframe(C||(C=s(["\n width: 100%;\n height: 100%;\n border: 0;\n"])));for(var Mc={},Pc={byteLength:function(e){var t=Nc(e),n=t[0],i=t[1];return 3*(n+i)/4-i},toByteArray:function(e){var t,n,i=Nc(e),r=i[0],s=i[1],a=new Lc(function(e,t,n){return 3*(t+n)/4-n}(0,r,s)),o=0,l=s>0?r-4:r;for(n=0;n<l;n+=4)t=Rc[e.charCodeAt(n)]<<18|Rc[e.charCodeAt(n+1)]<<12|Rc[e.charCodeAt(n+2)]<<6|Rc[e.charCodeAt(n+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=255&t;return 2===s&&(t=Rc[e.charCodeAt(n)]<<2|Rc[e.charCodeAt(n+1)]>>4,a[o++]=255&t),1===s&&(t=Rc[e.charCodeAt(n)]<<10|Rc[e.charCodeAt(n+1)]<<4|Rc[e.charCodeAt(n+2)]>>2,a[o++]=t>>8&255,a[o++]=255&t),a},fromByteArray:function(e){for(var t,n=e.length,i=n%3,r=[],s=16383,a=0,o=n-i;a<o;a+=s)r.push(Oc(e,a,a+s>o?o:a+s));return 1===i?(t=e[n-1],r.push(Tc[t>>2]+Tc[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],r.push(Tc[t>>10]+Tc[t>>
vendor: 10,946 bytes, line 2
24&63]+Tc[t<<2&63]+"=")),r.join("")}},Tc=[],Rc=[],Lc=typeof Uint8Array<"u"?Uint8Array:Array,Ic="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dc=0;Dc<64;++Dc)Tc[Dc]=Ic[Dc],Rc[Ic.charCodeAt(Dc)]=Dc;function Nc(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function Fc(e){return Tc[e>>18&63]+Tc[e>>12&63]+Tc[e>>6&63]+Tc[63&e]}function Oc(e,t,n){for(var i,r=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),r.push(Fc(i));return r.join("")}Rc[45]=62,Rc[95]=63;var Wc={read:function(e,t,n,i,r){var s,a,o=8*r-i-1,l=(1<<o)-1,c=l>>1,u=-7,h=n?r-1:0,d=n?-1:1,f=e[t+h];for(h+=d,s=f&(1<<-u)-1,f>>=-u,u+=o;u>0;s=256*s+e[t+h],h+=d,u-=8);for(a=s&(1<<-u)-1,s>>=-u,u+=i;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===s)s=1-c;else{if(s===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),s-=c}return(f?-1:1)*a*Math.pow(2,s-i)},write:function(e,t,n,i,r,s){var a,o,l,c=8*s-r-1,u=(1<<c)-1,h=u>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:s-1,p=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(o=0,a=u):a+h>=1?(o=(t*l-1)*Math.pow(2,r),a+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[n+f]=255&o,f+=p,o/=256,r-=8);for(a=a<<r|o,c+=r;c>0;e[n+f]=255&a,f+=p,a/=256,c-=8);e[n+f-p]|=128*g}};!function(e){const t=Pc,n=Wc,i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},e.INSPECT_MAX_BYTES=50;const r=2147483647;e.kMaxLength=r;const{Uint8Array:s,ArrayBuffer:a,SharedArrayBuffer:o}=globalThis;function l(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new s(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let i=l(n);const r=i.write(e,t);return r!==n&&(i=i.slice(0,r)),i}(e,t);if(a.isView(e))return function(e){if($(e,s)){const t=new s(e);return p(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if($(e,a)||e&&$(e.buffer,a)||typeof o<"u"&&($(e,o)||e&&$(e.buffer,o)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return c.from(i,t,n);const r=function(e){if(c.isBuffer(e)){const t=0|g(e.length),n=l(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||Q(e.length)?l(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(r)return r;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return h(e),l(e<0?0:0|g(e))}function f(e){const t=e.length<0?0:0|g(e.length),n=l(t);for(let i=0;i<t;i+=1)n[i]=255&e[i];return n}function p(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let i;return i=void 0===t&&void 0===n?new s(e):void 0===n?new s(e,t):new s(e,t,n),Object.setPrototypeOf(i,c.prototype),i}function g(e){if(e>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(a.isView(e)||$(e,a))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;let r=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(r)return i?-1:X(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function y(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function b(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Q(n=+n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=c.from(t,i)),c.isBuffer(t))return 0===t.length?-1:w(e,t,n,i,r);if("number"==typeof t)return t&=255,"function"==typeof s.prototype.indexOf?r?s.prototype.indexOf.call(e,t,n):s.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,i,r){let s,a=1,o=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(r){let i=-1;for(s=n;s<o;s++)if(c(e,s)===c(t,-1===i?0:s-i)){if(-1===i&&(i=s),s-i+1===l)return i*a}else-1!==i&&(s-=s-i),i=-1}else for(n+l>o&&(n=o-l),s=n;s>=0;s--){let n=!0;for(let i=0;i<l;i++)if(c(e,s+i)!==c(t,i)){n=!1;break}if(n)return s}return-1}function k(e,t,n,i){n=Number(n)||0;const r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;const s=t.length;let a;for(i>s/2&&(i=s/2),a=0;a<i;++a){const i=parseInt(t.substr(2*a,2),16);if(Q(i))return a;e[n+a]=i}return a}function x(e,t,n,i){return K(X(t,e.length-n),e,n,i)}function S(e,t,n,i){return K(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function _(e,t,n,i){return K(Y(t),e,n,i)}function A(e,t,n,i){return K(function(e,t){let n,i,r;const s=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),i=n>>8,r=n%256,s.push(r),s.push(i);return s}(t,e.length-n),e,n,i)}function E(e,n,i){return 0===n&&i===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,i))}function C(e,t,n){n=Math.min(e.length,n);const i=[];let r=t;for(;r<n;){const t=e[r];let s=null,a=t>239?4:t>223?3:t>191?2:1;if(r+a<=n){let n,i,o,l;switch(a){case 1:t<128&&(s=t);break;case 2:n=e[r+1],128===(192&n)&&(l=(31&t)<<6|63&n,l>127&&(s=l));break;case 3:n=e[r+1],i=e[r+2],128===(192&n)&&128===(192&i)&&(l=(15&t)<<12|(63&n)<<6|63&i,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:n=e[r+1],i=e[r+2],o=e[r+3],128===(192&n)&&128===(192&i)&&128===(192&o)&&(l=(15&t)<<18|(63&n)<<12|(63&i)<<6|63&o,l>65535&&l<1114112&&(s=l))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|1023&s),i.push(s),r+=a}return function(e){const t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);let n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=M));return n}(i)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new s(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,s.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch{return!1}}(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,s.prototype),Object.setPrototypeOf(c,s),c.alloc=function(e,t,n){return function(e,t,n){return h(e),e<=0?l(e):void 0!==t?"string"==typeof n?l(e).fill(t,n):l(e).fill(t):l(e)}(e,t,n)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if($(e,s)&&(e=c.from(e,e.offset,e.byteLength)),$(t,s)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,i=t.length;for(let r=0,s=Math.min(n,i);r<s;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const i=c.allocUnsafe(t);let r=0;for(n=0;n<e.length;++n){let t=e[n];if($(t,s))r+t.length>i.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(i,r)):s.prototype.set.call(i,t,r);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,r)}r+=t.length}return i},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?C(this,0,e):v.apply(this,arguments)}
vendor: 12,151 bytes, line 2
2,c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let t="";const n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,i,r){if($(e,s)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;let a=(r>>>=0)-(i>>>=0),o=(n>>>=0)-(t>>>=0);const l=Math.min(a,o),u=this.slice(i,r),h=e.slice(t,n);for(let s=0;s<l;++s)if(u[s]!==h[s]){a=u[s],o=h[s];break}return a<o?-1:o<a?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},c.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}const r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return k(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":case"latin1":case"binary":return S(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const M=4096;function P(e,t,n){let i="";n=Math.min(e.length,n);for(let r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function T(e,t,n){let i="";n=Math.min(e.length,n);for(let r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function R(e,t,n){const i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);let r="";for(let s=t;s<n;++s)r+=J[e[s]];return r}function L(e,t,n){const i=e.slice(t,n);let r="";for(let s=0;s<i.length-1;s+=2)r+=String.fromCharCode(i[s]+256*i[s+1]);return r}function I(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,i,r,s){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<s)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function N(e,t,n,i,r){H(t,i,r,e,n,7);let s=Number(t&BigInt(4294967295));e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function F(e,t,n,i,r){H(t,i,r,e,n,7);let s=Number(t&BigInt(4294967295));e[n+7]=s,s>>=8,e[n+6]=s,s>>=8,e[n+5]=s,s>>=8,e[n+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function O(e,t,n,i,r,s){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function W(e,t,i,r,s){return t=+t,i>>>=0,s||O(e,0,i,4),n.write(e,t,i,r,23,4),i+4}function j(e,t,i,r,s){return t=+t,i>>>=0,s||O(e,0,i,8),n.write(e,t,i,r,52,8),i+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const i=this.subarray(e,t);return Object.setPrototypeOf(i,c.prototype),i},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||I(e,t,this.length);let i=this[e],r=1,s=0;for(;++s<t&&(r*=256);)i+=this[e+s]*r;return i},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||I(e,t,this.length);let i=this[e+--t],r=1;for(;t>0&&(r*=256);)i+=this[e+--t]*r;return i},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Z((function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];(void 0===t||void 0===n)&&q(e,this.length-8);const i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,r=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(i)+(BigInt(r)<<BigInt(32))})),c.prototype.readBigUInt64BE=Z((function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];(void 0===t||void 0===n)&&q(e,this.length-8);const i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],r=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(i)<<BigInt(32))+BigInt(r)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||I(e,t,this.length);let i=this[e],r=1,s=0;for(;++s<t&&(r*=256);)i+=this[e+s]*r;return r*=128,i>=r&&(i-=Math.pow(2,8*t)),i},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||I(e,t,this.length);let i=t,r=1,s=this[e+--i];for(;i>0&&(r*=256);)s+=this[e+--i]*r;return r*=128,s>=r&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Z((function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];(void 0===t||void 0===n)&&q(e,this.length-8);const i=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Z((function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];(void 0===t||void 0===n)&&q(e,this.length-8);const i=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),n.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),n.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),n.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),n.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t>>>=0,n>>>=0,!i){D(this,e,t,n,Math.pow(2,8*n)-1,0)}let r=1,s=0;for(this[t]=255&e;++s<n&&(r*=256);)this[t+s]=e/r&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t>>>=0,n>>>=0,!i){D(this,e,t,n,Math.pow(2,8*n)-1,0)}let r=n-1,s=1;for(this[t+r]=255&e;--r>=0&&(s*=256);)this[t+r]=e/s&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Z((function(e){return N(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Z((function(e){return F(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}let r=0,s=1,a=0;for(this[t]=255&e;++r<n&&(s*=256);)e<0&&0===a&&0!==this[t+r-1]&&(a=1),this[t+r]=(e/s|0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}let r=n-1,s=1,a=0;for(this[t+r]=255&e;--r>=0&&(s*=256);)e<0&&0===a&&0!==this[t+r+1]&&(a=1),this[t+r]=(e/s|0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Z((function(e){return N(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Z((function(e){return F(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return W(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return W(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,i){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&0!==i&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);const r=i-n;return this===e&&"function"==typeof s.prototype.copyWithin?this.copyWithin(t,n,i):s.prototype.set.call(e,this.subarray(n,i),t),r},c.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!c.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){const t=e.charCodeAt(0);("utf8"===i&&t<128||"latin1"===i)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let r;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(r=t;r<n;++r)this[r]=e;
2else{const s=c.isBuffer(e)?e:c.from(e,i),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(r=0;r<n-t;++r)this[r+t]=s[r%a]}return this};const B={};function z(e,t,n){B[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name="".concat(this.name," [").concat(e,"]"),this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return"".concat(this.name," [").concat(e,"]: ").concat(this.message)}}}function U(e){let t="",n=e.length;const i="-"===e[0]?1:0;for(;n>=i+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function H(e,t,n,i,r,s){if(e>n||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=0===t||t===BigInt(0)?">= 0".concat(n," and < 2").concat(n," ** ").concat(8*(s+1)).concat(n):">= -(2".concat(n," ** ").concat(8*(s+1)-1).concat(n,") and < 2 ** ").concat(8*(s+1)-1).concat(n),new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){V(t,"offset"),(void 0===e[t]||void 0===e[t+n])&&q(t,e.length-(n+1))}(i,r,s)}function V(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,n){throw Math.floor(e)!==e?(V(e,n),new B.ERR_OUT_OF_RANGE("offset","an integer",e)):t<0?new B.ERR_BUFFER_OUT_OF_BOUNDS:new B.ERR_OUT_OF_RANGE("offset",">= 0 and <= ".concat(t),e)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),z("ERR_OUT_OF_RANGE",(function(e,t,n){let i='The value of "'.concat(e,'" is out of range.'),r=n;return Number.isInteger(n)&&Math.abs(n)>2**32?r=U(String(n)):"bigint"==typeof n&&(r=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(r=U(r)),r+="n"),i+=" It must be ".concat(t,". Received ").concat(r),i}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function X(e,t){let n;t=t||1/0;const i=e.length;let r=null;const s=[];for(let a=0;a<i;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&s.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&s.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function Y(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function K(e,t,n,i){let r;for(r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!==e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const i=16*n;for(let r=0;r<16;++r)t[i+r]=e[n]+e[r]}return t}();function Z(e){return typeof BigInt>"u"?ee:e}function ee(){throw new Error("BigInt not supported")}}(Mc);const jc=Mc.Buffer,Bc=Mc.Blob,zc=Mc.BlobOptions,Uc=Mc.Buffer,Hc=Mc.File,Vc=Mc.FileOptions,qc=Mc.INSPECT_MAX_BYTES,Gc=Mc.SlowBuffer,Xc=Mc.TranscodeEncoding,Yc=Mc.atob,Kc=Mc.btoa,$c=Mc.constants,Qc=Mc.isAscii,Jc=Mc.isUtf8,Zc=Mc.kMaxLength,eu=Mc.kStringMaxLength,tu=Mc.resolveObjectURL,nu=Mc.transcode;Symbol.toStringTag;var iu={d:(e,t)=>{for(var n in t)iu.o(t,n)&&!iu.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},ru=globalThis.pdfjsLib={};iu.d(ru,{AbortException:()=>gh,AnnotationEditorLayer:()=>vC,AnnotationEditorParamsType:()=>yu,AnnotationEditorType:()=>vu,AnnotationEditorUIManager:()=>mg,AnnotationLayer:()=>tx,AnnotationMode:()=>mu,CMapCompressionType:()=>Qu,ColorPicker:()=>n_,DOMSVGFactory:()=>_d,DrawLayer:()=>PC,FeatureTest:()=>bh,GlobalWorkerOptions:()=>Ev,ImageKind:()=>Eu,InvalidPDFException:()=>hh,MissingPDFException:()=>dh,OPS:()=>Ju,Outliner:()=>dS,PDFDataRangeTransport:()=>Cb,PDFDateString:()=>Fd,PDFWorker:()=>Vb,PasswordResponses:()=>Zu,PermissionFlag:()=>bu,PixelsPerInch:()=>
2Gh,RenderingCancelledException:()=>Ed,TextLayer:()=>fb,UnexpectedResponseException:()=>fh,Util:()=>Ah,VerbosityLevel:()=>$u,XfaLayer:()=>pw,build:()=>uw,createValidAbsoluteUrl:()=>ah,fetchData:()=>kd,getDocument:()=>xb,getFilenameFromUrl:()=>Pd,getPdfFilenameFromUrl:()=>Td,getXfaPageViewport:()=>Od,isDataScheme:()=>Cd,isPdfFile:()=>Md,noContextMenu:()=>Id,normalizeUnicode:()=>Mh,renderTextLayer:()=>pb,setLayerDimensions:()=>zd,shadow:()=>oh,updateTextLayer:()=>gb,version:()=>cw});const su="object"==typeof ls&&ls+""=="[object process]"&&!ls.versions.nw&&!(ls.versions.electron&&ls.type&&"browser"!==ls.type),au=[1,0,0,1,0,0],ou=[.001,0,0,.001,0,0],lu=1.35,cu=1,uu=2,hu=4,du=16,fu=32,pu=64,gu=256,mu={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},vu={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},yu={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},bu={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},wu=0,ku=1,xu=2,Su=3,_u=3,Au=4,Eu={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},Cu=1,Mu=2,Pu=3,Tu=4,Ru=5,Lu=6,Iu=7,Du=8,Nu=9,Fu=10,Ou=11,Wu=12,ju=13,Bu=14,zu=15,Uu=16,Hu=17,Vu=20,qu=1,Gu=2,Xu=3,Yu=4,Ku=5,$u={ERRORS:0,WARNINGS:1,INFOS:5},Qu={NONE:0,BINARY:1},Ju={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},Zu={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let eh=$u.WARNINGS;function th(){return eh}function nh(e){eh>=$u.INFOS&&console.log("Info: ".concat(e))}function ih(e){eh>=$u.WARNINGS&&console.log("Warning: ".concat(e))}function rh(e){throw new Error(e)}function sh(e,t){e||rh(t)}function ah(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;try{if(n&&"string"==typeof e){if(n.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);(null==t?void 0:t.length)>=2&&(e="http://".concat(e))}if(n.tryConvertEncoding)try{e=function(e){return decodeURIComponent(escape(e))}(e)}catch{}}const i=t?new URL(e,t):new URL(e);if(function(e){switch(null==e?void 0:e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(i))return i}catch{}return null}function oh(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Object.defineProperty(e,t,{value:n,enumerable:!i,configurable:!0,writable:!1}),n}const lh=function(){function e(t,n){this.constructor===e&&rh("Cannot initialize BaseException."),this.message=t,this.name=n}return e.prototype=new Error,e.constructor=e,e}();class ch extends lh{constructor(e,t){super(e,"PasswordException"),this.code=t}}class uh extends lh{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}}class hh extends lh{constructor(e){super(e,"InvalidPDFException")}}class dh extends lh{constructor(e){super(e,"MissingPDFException")}}class fh extends lh{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}}class ph extends lh{constructor(e){super(e,"FormatError")}}class gh extends lh{constructor(e){super(e,"AbortException")}}function mh(e){("object"!=typeof e||void 0===(null==e?void 0:e.length))&&rh("Invalid argument for bytesToString");const t=e.length,n=8192;if(t<n)return String.fromCharCode.apply(null,e);const i=[];for(let r=0;r<t;r+=n){const s=Math.min(r+n,t),a=e.subarray(r,s);i.push(String.fromCharCode.apply(null,a))}return i.join("")}function vh(e){"string"!=typeof e&&rh("Invalid argument for stringToBytes");const t=e.length,n=new Uint8Array(t);for(let i=0;i<t;++i)n[i]=255&e.charCodeAt(i);return n}function yh(e){const t=Object.create(null);for(const[n,i]of e)t[n]=i;return t}class bh{static get isLittleEndian(){return oh(this,"isLittleEndian",function(){const e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return oh(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return oh(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator<"u"&&"string"==typeof(null==navigator?void 0:navigator.platform)?oh(this,"platform",{isMac:navigator.platform.includes("Mac")}):oh(this,"platform",{isMac:!1})}static get isCSSRoundSupported(){var e,t;return oh(this,"isCSSRoundSupported",null==(t=null==(e=globalThis.CSS)?void 0:e.supports)?void 0:t.call(e,"width: round(1.5px, 1px)"))}}const wh=Array.from(Array(256).keys(),(e=>e.toString(16).padStart(2,"0")));var kh,xh,Sh,_h;class Ah{static makeHexColor(e,t,n){return"#".concat(wh[e]).concat(wh[t]).concat(wh[n])}static scaleMinMax(e,t){let n;e[0]?(e[0]<0&&(n=t[0],t[0]=t[2],t[2]=n),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(n=t[1],t[1]=t[3],t[3]=n),t[1]*=e[3],t[3]*=e[3]):(n=t[0],t[0]=t[1],t[1]=n,n=t[2],t[2]=t[3],t[3]=n,e[1]<0&&(n=t[1],t[1]=t[3],t[3]=n),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(n=t[0],t[0]=t[2],t[2]=n),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const n=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/n,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/n]}static getAxialAlignedBoundingBox(e,t){const n=this.applyTransform(e,t),i=this.applyTransform(e.slice(2,4),t),r=this.applyTransform([e[0],e[3]],t),s=this.applyTransform([e[2],e[1]],t);return[Math.min(n[0],i[0],r[0],s[0]),Math.min(n[1],i[1],r[1],s[1]),Math.max(n[0],i[0],r[0],s[0]),Math.max(n[1],i[1],r[1],s[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],n=e[0]*t[0]+e[1]*t[2],i=e[0]*t[1]+e[1]*t[3],r=e[2]*t[0]+e[3]*t[2],s=e[2]*t[1]+e[3]*t[3],a=(n+s)/2,o=Math.sqrt((n+s)**2-4*(n*s-r*i))/2,l=a+o||1,c=a-o||1;return[Math.sqrt(l),Math.sqrt(c)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const n=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),i=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(n>i)return null;const r=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),s=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return r>s?null:[n,r,i,s]}static bezierBoundingBox(e,t,n,i,r,s,a,o,l){return l?(l[0]=Math.min(l[0],e,a),l[1]=Math.min(l[1],t,o),l[2]=Math.max(l[2],e,a),l[3]=Math.max(l[3],t,o)):l=[Math.min(e,a),Math.min(t,o),Math.max(e,a),Math.max(t,o)],te(this,Sh,_h).call(this,e,n,r,a,t,i,s,o,3*(3*(n-r)-e+a),6*(e-2*n+r),3*(n-e),l),te(this,Sh,_h).call(this,e,n,r,a,t,i,s,o,3*(3*(i-s)-t+o),6*(t-2*i+s),3*(i-t),l),l}}kh=new WeakSet,xh=function(e,t,n,i,r,s,a,o,l,c){if(l<=0||l>=1)return;const u=1-l,h=l*l,d=h*l,f=u*(u*(u*e+3*l*t)+3*h*n)+d*i,p=u*(u*(u*r+3*l*s)+3*h*a)+d*o;c[0]=Math.min(c[0],f),c[1]=Math.min(c[1],p),c[2]=Math.max(c[2],f),c[3]=Math.max(c[3],p)},Sh=new WeakSet,_h=function(e,t,n,i,r,s,a,o,l,c,u,h){if(Math.abs(l)<1e-12)return void(Math.abs(c)>=1e-12&&te(this,kh,xh).call(this,e,t,n,i,r,s,a,o,-u/c,h));const d=c**2-4*u*l;if(d<0)return;const f=Math.sqrt(d),p=2*l;te(this,kh,xh).call(this,e,t,n,i,r,s,a,o,(-c+f)/p,h),te(this,kh,xh).call(this,e,t,n,i,r,s,a,o,(-c-f)/p,h)},J(Ah,kh),J(Ah,Sh);let Eh=null,Ch=null;function Mh(e){return Eh||(Eh=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,Ch=new Map([["\ufb05","\u017ft"]])),e.replaceAll(Eh,((e,t,n)=>t?t.normalize("NFKC"):Ch.get(n)))}const Ph="pdfjs_internal_id_",Th=0,Rh=1,Lh=2,Ih=3,Dh=4,Nh=5,Fh=6,Oh=7,Wh=8;class jh{constructor(){this.constructor===jh&&rh("Cannot initialize BaseFilterFactory.")}addFilter(e){return"none"}addHCMFilter(e,t){return"none"}addAlphaFilter(e){return"none"}addLuminosityFilter(e){return"none"}addHighlightHCMFilter(e,t,n,i,r){return"none"}destroy(){}}class Bh{constructor(){this.constructor===Bh&&rh("Cannot initialize BaseCanvasFactory.")}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const n=this._createCanvas(e,t);return{canvas:n,context:n.getContext("2d")}}reset(e,t,n){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||n<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=n}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){rh("Abstract method `_createCanvas` called.")}}class zh{constructor(e){let{baseUrl:t=null,isCompressed:n=!0}=e;this.constructor===zh&&rh("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=t,this.isCompressed=n}async fetch(e){let{name:t}=e;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!t)throw new Error("CMap name must be specified.");const n=this.baseUrl+t+(this.isCompressed?".bcmap":""),i=this.isCompressed?Qu.BINARY:Qu.NONE;return this._fetchData(n,i).catch((e=>{throw new Error("Unable to load ".concat(this.isCompressed?"binary ":"","CMap at: ").concat(n))}))}_fetchData(e,t){rh("Abstract method `_fetchData` called.")}}class Uh{constructor(e){let{baseUrl:t=null}=e;this.constructor===Uh&&rh("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=t}async fetch(e){let{filename:t}=e;if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!t)throw new Error("Font filename must be specified.");const n="".concat(this.baseUrl).concat(t);return this._fetchData(n).catch((e=>{throw new Error("Unable to load font data at: ".concat(n))}))}_fetchData(e){rh("Abstract method `_fetchData` called.")}}class Hh{constructor(){this.constructor===Hh&&rh("Cannot initialize BaseSVGFactory.")}create(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),n||(i.setAttribute("width","".concat(e,"px")),i.setAttribute("height","".concat(t,"px"))),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox","0 0 ".concat(e," ").concat(t)),i}createElement(e){if("string"!=typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){rh("Abstract method `_createSVG` called.")}}const Vh="http://www.w3.org/2000/svg",qh=class{};K(qh,"CSS",96),K(qh,"PDF",72),K(qh,"PDF_TO_CSS_UNITS",qh.CSS/qh.PDF);let Gh=qh;var Xh,Yh,Kh,$h,Qh,Jh,Zh,ed,td,nd,id,rd,sd,ad,od,ld,cd,ud,hd,dd,fd,pd,gd,md,vd,yd,bd,wd;Xh=new WeakMap,Yh=new WeakMap,Kh=new WeakMap,$h=new WeakMap,Qh=new WeakMap,Jh=new WeakMap,Zh=new WeakSet,ed=function(){return Q(this,Xh)||Z(this,Xh,new Map)},td=new WeakSet,nd=function(){return Q(this,Qh)||Z(this,Qh,new Map)},id=new WeakSet,rd=function(){if(!Q(this,Yh)){const e=Q(this,$h).createElement("div"),{style:t}=e;t.visibility="hidden",t.contain="strict",t.width=t.height=0,t.position="absolute",t.top=t.left=0,t.zIndex=-1;const n=Q(this,$h).createElementNS(Vh,"svg");n.setAttribute("width",0),n.setAttribute("height",0),Z(this,Yh,Q(this,$h).createElementNS(Vh,"defs")),e.append(n),n.append(Q(this,Yh)),Q(this,$h).body.append(e)}return Q(this,Yh)},sd=new WeakSet,ad=function(e){if(1===e.length){const t=e[0],n=new Array(256);for(let e=0;e<256;e++)n[e]=t[e]/255;const i=n.join(",");return[i,i,i]}const[t,n,i]=e,r=new Array(256),s=new Array(256),a=new Array(256);for(let o=0;o<256;o++)r[o]=t[o]/255,s[o]=n[o]/255,a[o]=i[o]/255;return[r.join(","),s.join(","),a.join(",")]},od=new WeakSet,ld=function(e){const t=Q(this,$h).createElementNS(Vh,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.a
2ppend(t)},cd=new WeakSet,ud=function(e){const t=Q(this,$h).createElementNS(Vh,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(t)},hd=new WeakSet,dd=function(e){const t=Q(this,$h).createElementNS(Vh,"filter");return t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("id",e),Q(this,id,rd).append(t),t},fd=new WeakSet,pd=function(e,t,n){const i=Q(this,$h).createElementNS(Vh,t);i.setAttribute("type","discrete"),i.setAttribute("tableValues",n),e.append(i)},gd=new WeakSet,md=function(e,t,n,i){const r=Q(this,$h).createElementNS(Vh,"feComponentTransfer");i.append(r),te(this,fd,pd).call(this,r,"feFuncR",e),te(this,fd,pd).call(this,r,"feFuncG",t),te(this,fd,pd).call(this,r,"feFuncB",n)},vd=new WeakSet,yd=function(e,t){const n=Q(this,$h).createElementNS(Vh,"feComponentTransfer");t.append(n),te(this,fd,pd).call(this,n,"feFuncA",e)},bd=new WeakSet,wd=function(e){return Q(this,id,rd).style.color=e,Wd(getComputedStyle(Q(this,id,rd)).getPropertyValue("color"))};async function kd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";if(Ld(e,document.baseURI)){const n=await fetch(e);if(!n.ok)throw new Error(n.statusText);switch(t){case"arraybuffer":return n.arrayBuffer();case"blob":return n.blob();case"json":return n.json()}return n.text()}return new Promise(((n,i)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType=t,r.onreadystatechange=()=>{if(r.readyState===XMLHttpRequest.DONE){if(200===r.status||0===r.status){switch(t){case"arraybuffer":case"blob":case"json":return void n(r.response)}return void n(r.responseText)}i(new Error(r.statusText))}},r.send(null)}))}class xd extends zh{_fetchData(e,t){return kd(e,this.isCompressed?"arraybuffer":"text").then((e=>({cMapData:e instanceof ArrayBuffer?new Uint8Array(e):vh(e),compressionType:t})))}}class Sd extends Uh{_fetchData(e){return kd(e,"arraybuffer").then((e=>new Uint8Array(e)))}}class _d extends Hh{_createSVG(e){return document.createElementNS(Vh,e)}}class Ad{constructor(e){let{viewBox:t,scale:n,rotation:i,offsetX:r=0,offsetY:s=0,dontFlip:a=!1}=e;this.viewBox=t,this.scale=n,this.rotation=i,this.offsetX=r,this.offsetY=s;const o=(t[2]+t[0])/2,l=(t[3]+t[1])/2;let c,u,h,d,f,p,g,m;switch(i%=360,i<0&&(i+=360),i){case 180:c=-1,u=0,h=0,d=1;break;case 90:c=0,u=1,h=1,d=0;break;case 270:c=0,u=-1,h=-1,d=0;break;case 0:c=1,u=0,h=0,d=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}a&&(h=-h,d=-d),0===c?(f=Math.abs(l-t[1])*n+r,p=Math.abs(o-t[0])*n+s,g=(t[3]-t[1])*n,m=(t[2]-t[0])*n):(f=Math.abs(o-t[0])*n+r,p=Math.abs(l-t[1])*n+s,g=(t[2]-t[0])*n,m=(t[3]-t[1])*n),this.transform=[c*n,u*n,h*n,d*n,f-c*n*o-h*n*l,p-u*n*o-d*n*l],this.width=g,this.height=m}get rawDims(){const{viewBox:e}=this;return oh(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone(){let{scale:e=this.scale,rotation:t=this.rotation,offsetX:n=this.offsetX,offsetY:i=this.offsetY,dontFlip:r=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ad({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:n,offsetY:i,dontFlip:r})}convertToViewportPoint(e,t){return Ah.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=Ah.applyTransform([e[0],e[1]],this.transform),n=Ah.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],n[0],n[1]]}convertToPdfPoint(e,t){return Ah.applyInverseTransform([e,t],this.transform)}}class Ed extends lh{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;super(e,"RenderingCancelledException"),this.extraDelay=t}}function Cd(e){const t=e.length;let n=0;for(;n<t&&""===e[n].trim();)n++;return"data:"===e.substring(n,n+5).toLowerCase()}function Md(e){return"string"==typeof e&&/\.pdf$/i.test(e)}function Pd(e){return[e]=e.split(/[#?]/,1),e.substring(e.lastIndexOf("/")+1)}function Td(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof e)return t;if(Cd(e))return ih('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const n=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let r=n.exec(i[1])||n.exec(i[2])||n.exec(i[3]);if(r&&(r=r[0],r.includes("%")))try{r=n.exec(decodeURIComponent(r))[0]}catch{}return r||t}class Rd{constructor(){K(this,"started",Object.create(null)),K(this,"times",[])}time(e){e in this.started&&ih("Timer is already running for ".concat(e)),this.started[e]=Date.now()}timeEnd(e){e in this.started||ih("Timer has not been started for ".concat(e)),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const{name:n}of this.times)t=Math.max(n.length,t);for(const{name:n,start:i,end:r}of this.times)e.push("".concat(n.padEnd(t)," ").concat(r-i,"ms\n"));return e.join("")}}function Ld(e,t){try{const{protocol:n}=t?new URL(e,t):new URL(e);return"http:"===n||"https:"===n}catch{return!1}}function Id(e){e.preventDefault()}function Dd(e){console.log("Deprecated API usage: "+e)}let Nd;class Fd{static toDateObject(e){if(!e||"string"!=typeof e)return null;Nd||(Nd=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=Nd.exec(e);if(!t)return null;const n=parseInt(t[1],10);let i=parseInt(t[2],10);i=i>=1&&i<=12?i-1:0;let r=parseInt(t[3],10);r=r>=1&&r<=31?r:1;let s=parseInt(t[4],10);s=s>=0&&s<=23?s:0;let a=parseInt(t[5],10);a=a>=0&&a<=59?a:0;let o=parseInt(t[6],10);o=o>=0&&o<=59?o:0;const l=t[7]||"Z";
2let c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;let u=parseInt(t[9],10)||0;return u=u>=0&&u<=59?u:0,"-"===l?(s+=c,a+=u):"+"===l&&(s-=c,a-=u),new Date(Date.UTC(n,i,r,s,a,o))}}function Od(e,t){let{scale:n=1,rotation:i=0}=t;const{width:r,height:s}=e.attributes.style,a=[0,0,parseInt(r),parseInt(s)];return new Ad({viewBox:a,scale:n,rotation:i})}function Wd(e){if(e.startsWith("#")){const t=parseInt(e.slice(1),16);return[(16711680&t)>>16,(65280&t)>>8,255&t]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map((e=>parseInt(e))):e.startsWith("rgba(")?e.slice(5,-1).split(",").map((e=>parseInt(e))).slice(0,3):(ih('Not a valid color format: "'.concat(e,'"')),[0,0,0])}function jd(e){const{a:t,b:n,c:i,d:r,e:s,f:a}=e.getTransform();return[t,n,i,r,s,a]}function Bd(e){const{a:t,b:n,c:i,d:r,e:s,f:a}=e.getTransform().invertSelf();return[t,n,i,r,s,a]}function zd(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t instanceof Ad){const{pageWidth:i,pageHeight:r}=t.rawDims,{style:s}=e,a=bh.isCSSRoundSupported,o="var(--scale-factor) * ".concat(i,"px"),l="var(--scale-factor) * ".concat(r,"px"),c=a?"round(".concat(o,", 1px)"):"calc(".concat(o,")"),u=a?"round(".concat(l,", 1px)"):"calc(".concat(l,")");n&&t.rotation%180!==0?(s.width=u,s.height=c):(s.width=c,s.height=u)}i&&e.setAttribute("data-main-rotation",t.rotation)}var Ud,Hd,Vd,qd,Gd,Xd,Yd,Kd,$d,Qd,Jd,Zd,ef,tf,nf,rf;const sf=class e{constructor(e){J(this,Yd),J(this,$d),J(this,Jd),J(this,ef),J(this,nf),J(this,Ud,null),J(this,Hd,null),J(this,Vd,void 0),J(this,qd,null),Z(this,Vd,e)}render(){const t=Z(this,Ud,document.createElement("div"));t.className="editToolbar",t.setAttribute("role","toolbar"),t.addEventListener("contextmenu",Id),t.addEventListener("pointerdown",te(e,Gd,Xd));const n=Z(this,qd,document.createElement("div"));n.className="buttons",t.append(n);const i=Q(this,Vd).toolbarPosition;if(i){const{style:e}=t,n="ltr"===Q(this,Vd)._uiManager.direction?1-i[0]:i[0];e.insetInlineEnd="".concat(100*n,"%"),e.top="calc(".concat(100*i[1],"% + var(--editor-toolbar-vert-offset))")}return te(this,ef,tf).call(this),t}hide(){var e;Q(this,Ud).classList.add("hidden"),null==(e=Q(this,Hd))||e.hideDropdown()}show(){Q(this,Ud).classList.remove("hidden")}addAltTextButton(e){te(this,Jd,Zd).call(this,e),Q(this,qd).prepend(e,Q(this,nf,rf))}addColorPicker(e){Z(this,Hd,e);const t=e.renderButton();te(this,Jd,Zd).call(this,t),Q(this,qd).prepend(t,Q(this,nf,rf))}remove(){var e;Q(this,Ud).remove(),null==(e=Q(this,Hd))||e.destroy(),Z(this,Hd,null)}};Ud=new WeakMap,Hd=new WeakMap,Vd=new WeakMap,qd=new WeakMap,Gd=new WeakSet,Xd=function(e){e.stopPropagation()},Yd=new WeakSet,Kd=function(e){Q(this,Vd)._focusEventsAllowed=!1,e.preventDefault(),e.stopPropagation()},$d=new WeakSet,Qd=function(e){Q(this,Vd)._focusEventsAllowed=!0,e.preventDefault(),e.stopPropagation()},Jd=new WeakSet,Zd=function(e){e.addEventListener("focusin",te(this,Yd,Kd).bind(this),{capture:!0}),e.addEventListener("focusout",te(this,$d,Qd).bind(this),{capture:!0}),e.addEventListener("contextmenu",Id)},ef=new WeakSet,tf=function(){const e=document.createElement("button");e.className="delete",e.tabIndex=0,e.setAttribute("data-l10n-id","pdfjs-editor-remove-".concat(Q(this,Vd).editorType,"-button")),te(this,Jd,Zd).call(this,e),e.addEventListener("click",(e=>{Q(this,Vd)._uiManager.delete()})),Q(this,qd).append(e)},nf=new WeakSet,rf=function(){const e=document.createElement("div");return e.className="divider",e},J(sf,Gd);let af=sf;var of,lf,cf,uf,hf,df,ff,pf,gf,mf,vf,yf,bf,wf,kf;class xf{constructor(e){J(this,uf),J(this,df),J(this,pf),J(this,of,null),J(this,lf,null),J(this,cf,void 0),Z(this,cf,e)}show(e,t,n){const[i,r]=te(this,df,ff).call(this,t,n),{style:s}=Q(this,lf)||Z(this,lf,te(this,uf,hf).call(this));e.append(Q(this,lf)),s.insetInlineEnd="".concat(100*i,"%"),s.top="calc(".concat(100*r,"% + var(--editor-toolbar-vert-offset))")}hide(){Q(this,lf).remove()}}function Sf(e,t,n){for(const i of n)t.addEventListener(i,e[i].bind(e))}of=new WeakMap,lf=new WeakMap,cf=new WeakMap,uf=new WeakSet,hf=function(){const e=Z(this,lf,document.createElement("div"));e.className="editToolbar",e.setAttribute("role","toolbar"),e.addEventListener("contextmenu",Id);const t=Z(this,of,document.createElement("div"));return t.className="buttons",e.append(t),te(this,pf,gf).call(this),e},df=new WeakSet,ff=function(e,t){let n=0,i=0;for(const r of e){const e=r.y+r.height;if(e<n)continue;const s=r.x+(t?r.width:0);e>n?(i=s,n=e):t?s>i&&(i=s):s<i&&(i=s)}return[t?1-i:i,n]},pf=new WeakSet,gf=function(){const e=document.createElement("button");e.className="highlightButton",e.tabIndex=0,e.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const t=document.createElement("span");e.append(t),t.className="visuallyHidden",t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label"),e.addEventListener("contextmenu",Id),e.addEventListener("click",(()=>{Q(this,cf).highlightSelection("floating_button")})),Q(this,of).append(e)};class _f{constructor(){J(this,mf,0)}get id(){return"".concat("pdfjs_internal_editor_").concat(ee(this,mf)._++)}}mf=new WeakMap;const Af=class{constructor(){J(this,wf),J(this,vf,function(){if(typeof crypto<"u"&&"function"==typeof(null==crypto?void 0:crypto.randomUUID))return crypto.randomUUID();const e=new Uint8Array(32);if(typeof crypto<"u"&&"function"==typeof(null==crypto?void 0:crypto.getRandomValues))crypto.getRandomValues(e);else for(let t=0;t<32;t++)e[t]=Math.floor(255*Math.random());return mh(e)}()),J(this,yf,0),J(this,bf,null)}static get _isSVGFittingCanvas(){const e=new OffscreenCanvas(1,3).getContext("2d"),t=new Image;t.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>';return oh(this,"_isSVGFittingCanvas",t.decode().then((()=>(e.drawImage(t,0,0,1,1,0,0,1,3),0===new Uint32Array(e.getImageData(0,0,1,1).data.buffer)[0]))))}async getFromFile(e){const{lastModified:t,name:n,size:i,type:r}=e;return te(this,wf,kf).call(this,"".concat(t,"_").concat(n,"_").concat(i,"_").concat(r),e)}async getFromUrl(e){return te(this,wf,kf).call(this,e,e)}async getFromId(e){Q(this,bf)||Z(this,bf,new Map);const t=Q(this,bf).get(e);return t?t.bitmap?(t.refCounter+=1,t):t.file?this.getFromFile(t.file):this.getFromUrl(t.url):null}getSvgUrl(e){const t=Q(this,bf).get(e);return null!=t&&t.isSvg?t.svgUrl:null}deleteId(e){Q(this,bf)||Z(this,bf,new Map);const t=Q(this,bf).get(e);t&&(t.refCounter-=1,0===t.refCounter&&(t.bitmap=null))}isValidId(e){return e.startsWith("image_".concat(Q(this,vf),"_"))}};vf=new WeakMap,yf=new WeakMap,bf=new WeakMap,wf=new WeakSet,kf=async function(e,t){Q(this,bf)||Z(this,bf,new Map);let n=Q(this,bf).get(e);if(null===n)return null;if(null!=n&&n.bitmap)return n.refCounter+=1,n;try{let e;if(n||(n={bitmap:null,id:"image_".concat(Q(this,vf),"_").concat(ee(this,yf)._++),refCounter:0,isSvg:!1}),"string"==typeof t?(n.url=t,e=await kd(t,"blob")):e=n.file=t,"image/svg+xml"===e.type){const t=Af._isSVGFittingCanvas,i=new FileReader,r=new Image,s=new Promise(((e,s)=>{r.onload=()=>{n.bitmap=r,n.isSvg=!0,e()},i.onload=async()=>{const e=n.svgUrl=i.result;r.src=await t?"".concat(e,"#svgView(preserveAspectRatio(none))"):e},r.onerror=i.onerror=s}));i.readAsDataURL(e),await s}else n.bitmap=await createImageBitmap(e);n.refCounter=1}catch(i){console.error(i),n=null}return Q(this,bf).set(e,n),n&&Q(this,bf).set(n.id,n),n};let Ef=Af;var Cf,Mf,Pf,Tf,Rf,Lf;class If{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;J(this,Cf,[]),J(this,Mf,!1),J(this,Pf,void 0),J(this,Tf,-1),Z(this,Pf,e)}add(e){let{cmd:t,undo:n,post:i,mustExec:r,type:s=NaN,overwriteIfSameType:a=!1,keepUndo:o=!1}=e;if(r&&t(),Q(this,Mf))return;const l={cmd:t,undo:n,post:i,type:s};if(-1===Q(this,Tf))return Q(this,Cf).length>0&&(Q(this,Cf).length=0),Z(this,Tf,0),void Q(this,Cf).push(l);if(a&&Q(this,Cf)[Q(this,Tf)].type===s)return o&&(l.undo=Q(this,Cf)[Q(this,Tf)].undo),void(Q(this,Cf)[Q(this,Tf)]=l);const c=Q(this,Tf)+1;c===Q(this,Pf)?Q(this,Cf).splice(0,1):(Z(this,Tf,c),c<Q(this,Cf).length&&Q(this,Cf).splice(c)),Q(this,Cf).push(l)}undo(){if(-1===Q(this,Tf))return;Z(this,Mf,!0);const{undo:e,post:t}=Q(this,Cf)[Q(this,Tf)];e(),null==t||t(),Z(this,Mf,!1),Z(this,Tf,Q(this,Tf)-1)}redo(){if(Q(this,Tf)<Q(this,Cf).length-1){Z(this,Tf,Q(this,Tf)+1),Z(this,Mf,!0);const{cmd:e,post:t}=Q(this,Cf)[Q(this,Tf)];e(),null==t||t(),Z(this,Mf,!1)}}hasSomethingToUndo(){return-1!==Q(this,Tf)}hasSomethingToRedo(){return Q(this,Tf)<Q(this,Cf).length-1}destroy(){Z(this,Cf,null)}}Cf=new WeakMap,Mf=new WeakMap,Pf=new WeakMap,Tf=new WeakMap;class Df{constructor(e){J(this,Rf),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:t}=bh.platform;for(const[n,i,r={}]of e)for(const e of n){const n=e.startsWith("mac+");t&&n?(this.callbacks.set(e.slice(4),{callback:i,options:r}),this.allKeys.add(e.split("+").at(-1))):!t&&!n&&(this.callbacks.set(e,{callback:i,options:r}),this.allKeys.add(e.split("+").at(-1)))}}exec(e,t){if(!this.allKeys.has(t.key))return;const n=this.callbacks.get(te(this,Rf,Lf).call(this,t));if(!n)return;const{callback:i,options:{bubbles:r=!1,args:s=[],checker:a=null}}=n;a&&!a(e,t)||(i.bind(e,...s,t)(),r||(t.stopPropagation(),t.preventDefault()))}}
2Rf=new WeakSet,Lf=function(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t};const Nf=class e{get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return function(e){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const n of e.keys()){t.style.color=n;const i=window.getComputedStyle(t).color;e.set(n,Wd(i))}t.remove()}(e),oh(this,"_colors",e)}convert(t){const n=Wd(t);if(!window.matchMedia("(forced-colors: active)").matches)return n;for(const[i,r]of this._colors)if(r.every(((e,t)=>e===n[t])))return e._colorsMapping.get(i);return n}getHexCode(e){const t=this._colors.get(e);return t?Ah.makeHexColor(...t):e}};K(Nf,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let Ff=Nf;var Of,Wf,jf,Bf,zf,Uf,Hf,Vf,qf,Gf,Xf,Yf,Kf,$f,Qf,Jf,Zf,ep,tp,np,ip,rp,sp,ap,op,lp,cp,up,hp,dp,fp,pp,gp,mp,vp,yp,bp,wp,kp,xp,Sp,_p,Ap,Ep,Cp,Mp,Pp,Tp,Rp,Lp,Ip,Dp,Np,Fp,Op,Wp,jp,Bp,zp,Up,Hp,Vp,qp,Gp,Xp,Yp,Kp,$p,Qp,Jp,Zp,eg,tg,ng,ig,rg,sg,ag,og,lg,cg,ug,hg,dg,fg,pg;const gg=class e{constructor(e,t,n,i,r,s,a,o,l){J(this,Pp),J(this,Rp),J(this,Ip),J(this,Np),J(this,Op),J(this,jp),J(this,zp),J(this,Hp),J(this,qp),J(this,Xp),J(this,Kp),J(this,Qp),J(this,Zp),J(this,tg),J(this,ig),J(this,sg),J(this,og),J(this,cg),J(this,hg),J(this,fg),J(this,Of,null),J(this,Wf,new Map),J(this,jf,new Map),J(this,Bf,null),J(this,zf,null),J(this,Uf,null),J(this,Hf,new If),J(this,Vf,0),J(this,qf,new Set),J(this,Gf,null),J(this,Xf,null),J(this,Yf,new Set),J(this,Kf,!1),J(this,$f,null),J(this,Qf,null),J(this,Jf,null),J(this,Zf,!1),J(this,ep,null),J(this,tp,new _f),J(this,np,!1),J(this,ip,!1),J(this,rp,null),J(this,sp,null),J(this,ap,null),J(this,op,vu.NONE),J(this,lp,new Set),J(this,cp,null),J(this,up,null),J(this,hp,null),J(this,dp,this.blur.bind(this)),J(this,fp,this.focus.bind(this)),J(this,pp,this.copy.bind(this)),J(this,gp,this.cut.bind(this)),J(this,mp,this.paste.bind(this)),J(this,vp,this.keydown.bind(this)),J(this,yp,this.keyup.bind(this)),J(this,bp,this.onEditingAction.bind(this)),J(this,wp,this.onPageChanging.bind(this)),J(this,kp,this.onScaleChanging.bind(this)),J(this,xp,te(this,Ip,Dp).bind(this)),J(this,Sp,this.onRotationChanging.bind(this)),J(this,_p,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1}),J(this,Ap,[0,0]),J(this,Ep,null),J(this,Cp,null),J(this,Mp,null),Z(this,Cp,e),Z(this,Mp,t),Z(this,Bf,n),this._eventBus=i,this._eventBus._on("editingaction",Q(this,bp)),this._eventBus._on("pagechanging",Q(this,wp)),this._eventBus._on("scalechanging",Q(this,kp)),this._eventBus._on("rotationchanging",Q(this,Sp)),te(this,Op,Wp).call(this),te(this,qp,Gp).call(this),Z(this,zf,r.annotationStorage),Z(this,$f,r.filterFactory),Z(this,up,s),Z(this,Jf,a||null),Z(this,Kf,o),Z(this,ap,l||null),this.viewParameters={realScale:Gh.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}static get _keyboardManager(){const t=e.prototype,n=e=>Q(e,Cp).contains(document.activeElement)&&"BUTTON"!==document.activeElement.tagName&&e.hasSomethingToControl(),i=(e,t)=>{let{target:n}=t;if(n instanceof HTMLInputElement){const{type:e}=n;return"text"!==e&&"number"!==e}return!0},r=this.TRANSLATE_SMALL,s=this.TRANSLATE_BIG;return oh(this,"_keyboardManager",new Df([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:i}],[["ctrl+z","mac+meta+z"],t.undo,{checker:i}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:i}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:i}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(e,t)=>{let{target:n}=t;return!(n instanceof HTMLButtonElement)&&Q(e,Cp).contains(n)&&!e.isEnterHandled}}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(e,t)=>{let{target:n}=t;return!(n instanceof HTMLButtonElement)&&Q(e,Cp).contains(document.activeElement)}}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-r,0],checker:n}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-s,0],checker:n}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[r,0],checker:n}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[s,0],checker:n}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-r],checker:n}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-s],checker:n}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,r],checker:n}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,s],checker:n}]]))}destroy(){var e,t;te(this,Xp,Yp).call(this),te(this,Hp,Vp).call(this),this._eventBus._off("editingaction",Q(this,bp)),this._eventBus._off("pagechanging",Q(this,wp)),this._eventBus._off("scalechanging",Q(this,kp)),this._eventBus._off("rotationchanging",Q(this,Sp)
2);for(const n of Q(this,jf).values())n.destroy();Q(this,jf).clear(),Q(this,Wf).clear(),Q(this,Yf).clear(),Z(this,Of,null),Q(this,lp).clear(),Q(this,Hf).destroy(),null==(e=Q(this,Bf))||e.destroy(),null==(t=Q(this,ep))||t.hide(),Z(this,ep,null),Q(this,Qf)&&(clearTimeout(Q(this,Qf)),Z(this,Qf,null)),Q(this,Ep)&&(clearTimeout(Q(this,Ep)),Z(this,Ep,null)),te(this,jp,Bp).call(this)}async mlGuess(e){var t;return(null==(t=Q(this,ap))?void 0:t.guess(e))||null}get hasMLManager(){return!!Q(this,ap)}get hcmFilter(){return oh(this,"hcmFilter",Q(this,up)?Q(this,$f).addHCMFilter(Q(this,up).foreground,Q(this,up).background):"none")}get direction(){return oh(this,"direction",getComputedStyle(Q(this,Cp)).direction)}get highlightColors(){return oh(this,"highlightColors",Q(this,Jf)?new Map(Q(this,Jf).split(",").map((e=>e.split("=").map((e=>e.trim()))))):null)}get highlightColorNames(){return oh(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,(e=>e.reverse()))):null)}setMainHighlightColorPicker(e){Z(this,sp,e)}editAltText(e){var t;null==(t=Q(this,Bf))||t.editAltText(this,e)}onPageChanging(e){let{pageNumber:t}=e;Z(this,Vf,t-1)}focusMainContainer(){Q(this,Cp).focus()}findParent(e,t){for(const n of Q(this,jf).values()){const{x:i,y:r,width:s,height:a}=n.div.getBoundingClientRect();if(e>=i&&e<=i+s&&t>=r&&t<=r+a)return n}return null}disableUserSelect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Q(this,Mp).classList.toggle("noUserSelect",e)}addShouldRescale(e){Q(this,Yf).add(e)}removeShouldRescale(e){Q(this,Yf).delete(e)}onScaleChanging(e){let{scale:t}=e;this.commitOrRemove(),this.viewParameters.realScale=t*Gh.PDF_TO_CSS_UNITS;for(const n of Q(this,Yf))n.onScaleChanging()}onRotationChanging(e){let{pagesRotation:t}=e;this.commitOrRemove(),this.viewParameters.rotation=t}highlightSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=document.getSelection();if(!t||t.isCollapsed)return;const{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=t,a=t.toString(),o=te(this,Pp,Tp).call(this,t).closest(".textLayer"),l=this.getSelectionBoxes(o);if(l){t.empty(),Q(this,op)===vu.NONE&&(this._eventBus.dispatch("showannotationeditorui",{source:this,mode:vu.HIGHLIGHT}),this.showAllEditors("highlight",!0,!0));for(const t of Q(this,jf).values())if(t.hasTextLayer(o)){t.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:l,anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s,text:a});break}}}addToAnnotationStorage(e){!e.isEmpty()&&Q(this,zf)&&!Q(this,zf).has(e.id)&&Q(this,zf).setValue(e.id,e)}blur(){if(this.isShiftKeyDown=!1,Q(this,Zf)&&(Z(this,Zf,!1),te(this,Np,Fp).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:e}=document;for(const t of Q(this,lp))if(t.div.contains(e)){Z(this,rp,[t,e]),t._focusEventsAllowed=!1;break}}focus(){if(!Q(this,rp))return;const[e,t]=Q(this,rp);Z(this,rp,null),t.addEventListener("focusin",(()=>{e._focusEventsAllowed=!0}),{once:!0}),t.focus()}addEditListeners(){te(this,qp,Gp).call(this),te(this,Kp,$p).call(this)}removeEditListeners(){te(this,Xp,Yp).call(this),te(this,Qp,Jp).call(this)}copy(e){var t;if(e.preventDefault(),null==(t=Q(this,Of))||t.commitOrRemove(),!this.hasSelection)return;const n=[];for(const i of Q(this,lp)){const e=i.serialize(!0);e&&n.push(e)}0!==n.length&&e.clipboardData.setData("application/pdfjs",JSON.stringify(n))}cut(e){this.copy(e),this.delete()}paste(e){e.preventDefault();const{clipboardData:t}=e;for(const s of t.items)for(const e of Q(this,Xf))if(e.isHandlingMimeForPasting(s.type))return void e.paste(s,this.currentLayer);let n=t.getData("application/pdfjs");if(!n)return;try{n=JSON.parse(n)}catch(r){return void ih('paste: "'.concat(r.message,'".'))}if(!Array.isArray(n))return;this.unselectAll();const i=this.currentLayer;try{const e=[];for(const s of n){const t=i.deserialize(s);if(!t)return;e.push(t)}const t=()=>{for(const t of e)te(this,og,lg).call(this,t);te(this,fg,pg).call(this,e)},r=()=>{for(const t of e)t.remove()};this.addCommands({cmd:t,undo:r,mustExec:!0})}catch(r){ih('paste: "'.concat(r.message,'".'))}}keydown(t){!this.isShiftKeyDown&&"Shift"===t.key&&(this.isShiftKeyDown=!0),Q(this,op)!==vu.NONE&&!this.isEditorHandlingKeyboard&&e._keyboardManager.exec(this,t)}keyup(e){this.isShiftKeyDown&&"Shift"===e.key&&(this.isShiftKeyDown=!1,Q(this,Zf)&&(Z(this,Zf,!1),te(this,Np,Fp).c
2all(this,"main_toolbar")))}onEditingAction(e){let{name:t}=e;switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu")}}setEditingState(e){e?(te(this,zp,Up).call(this),te(this,Kp,$p).call(this),te(this,Zp,eg).call(this,{isEditing:Q(this,op)!==vu.NONE,isEmpty:te(this,hg,dg).call(this),hasSomethingToUndo:Q(this,Hf).hasSomethingToUndo(),hasSomethingToRedo:Q(this,Hf).hasSomethingToRedo(),hasSelectedEditor:!1})):(te(this,Hp,Vp).call(this),te(this,Qp,Jp).call(this),te(this,Zp,eg).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!Q(this,Xf)){Z(this,Xf,e);for(const e of Q(this,Xf))te(this,tg,ng).call(this,e.defaultPropertiesToUpdate)}}getId(){return Q(this,tp).id}get currentLayer(){return Q(this,jf).get(Q(this,Vf))}getLayer(e){return Q(this,jf).get(e)}get currentPageIndex(){return Q(this,Vf)}addLayer(e){Q(this,jf).set(e.pageIndex,e),Q(this,np)?e.enable():e.disable()}removeLayer(e){Q(this,jf).delete(e.pageIndex)}updateMode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Q(this,op)!==e){if(Z(this,op,e),e===vu.NONE)return this.setEditingState(!1),void te(this,sg,ag).call(this);this.setEditingState(!0),te(this,ig,rg).call(this),this.unselectAll();for(const t of Q(this,jf).values())t.updateMode(e);if(!t&&n)return void this.addNewEditorFromKeyboard();if(t)for(const e of Q(this,Wf).values())if(e.annotationElementId===t){this.setSelected(e),e.enterInEditMode();break}}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e!==Q(this,op)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){var n;if(Q(this,Xf)){switch(e){case yu.CREATE:return void this.currentLayer.addNewEditor();case yu.HIGHLIGHT_DEFAULT_COLOR:null==(n=Q(this,sp))||n.updateColor(t);break;case yu.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(Q(this,hp)||Z(this,hp,new Map)).set(e,t),this.showAllEditors("highlight",t)}for(const n of Q(this,lp))n.updateParams(e,t);for(const n of Q(this,Xf))n.updateDefaultParams(e,t)}}showAllEditors(e,t){var n;var i;for(const r of Q(this,Wf).values())r.editorType===e&&r.show(t);(null===(n=null==(i=Q(this,hp))?void 0:i.get(yu.HIGHLIGHT_SHOW_ALL))||void 0===n||n)!==t&&te(this,tg,ng).call(this,[[yu.HIGHLIGHT_SHOW_ALL,t]])}enableWaiting(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Q(this,ip)!==e){Z(this,ip,e);for(const t of Q(this,jf).values())e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}}getEditors(e){const t=[];for(const n of Q(this,Wf).values())n.pageIndex===e&&t.push(n);return t}getEditor(e){return Q(this,Wf).get(e)}addEditor(e){Q(this,Wf).set(e.id,e)}removeEditor(e){var t;e.div.contains(document.activeElement)&&(Q(this,Qf)&&clearTimeout(Q(this,Qf)),Z(this,Qf,setTimeout((()=>{this.focusMainContainer(),Z(this,Qf,null)}),0))),Q(this,Wf).delete(e.id),this.unselect(e),(!e.annotationElementId||!Q(this,qf).has(e.annotationElementId))&&(null==(t=Q(this,zf))||t.remove(e.id))}addDeletedAnnotationElement(e){Q(this,qf).add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}isDeletedAnnotationElement(e){return Q(this,qf).has(e)}removeDeletedAnnotationElement(e){Q(this,qf).delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}setActiveEditor(e){Q(this,Of)!==e&&(Z(this,Of,e),e&&te(this,tg,ng).call(this,e.propertiesToUpdate))}updateUI(e){Q(this,cg,ug)===e&&te(this,tg,ng).call(this,e.propertiesToUpdate)}toggleSelected(e){if(Q(this,lp).has(e))return Q(this,lp).delete(e),e.unselect(),void te(this,Zp,eg).call(this,{hasSelectedEditor:this.hasSelection});Q(this,lp).add(e),e.select(),te(this,tg,ng).call(this,e.propertiesToUpdate),te(this,Zp,eg).call(this,{hasSelectedEditor:!0})}setSelected(e){for(const t of Q(this,lp))t!==e&&t.unselect();Q(this,lp).clear(),Q(this,lp).add(e),e.select(),te(this,tg,ng).call(this,e.propertiesToUpdate),te(this,Zp,eg).call(this,{hasSelectedEditor:!0})}isSelected(e){return Q(this,lp).has(e)}get firstSelectedEditor(){return Q(this,lp).values().next().value}unselect(e){e.unselect(),Q(this,lp).delete(e),te(this,Zp,eg).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==Q(this,lp).size}get isEnterHandled(){return 1===Q(this,lp).size&&this.firstSelectedEditor.isEnterHandled}undo(){Q(this,Hf).undo(),te(this,Zp,eg).call(this,{hasSomethingToUndo:Q(this,Hf).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:te(this,hg,dg).call(this)})}redo(){Q(this,Hf).redo(),te(this,Zp,eg).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:Q(this,Hf).hasSomethingToRedo(),isEmpty:te(this,hg,dg).call(this)})}addCommands(e){Q(this,Hf).add(e),te(this,Zp,eg).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:te(this,hg,dg).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const e=[...Q(this,lp)];this.addCommands({cmd:()=>{for(const t of e)t.remove()},undo:()=>{for(const t of e)te(this,og,lg).call(this,t)},mustExec:!0})}commitOrRemove(){var e;null==(e=Q(this,Of))||e.commitOrRemove()}hasSomethingToControl(){return Q(this,Of)||this.hasSelection}selectAll(){for(const e of Q(this,lp))e.commit();te(this,fg,pg).call(this,Q(this,Wf).values())}unselectAll(){if((!Q(this,Of)||(Q(this,Of).commitOrRemove(),Q(this,op)===vu.NONE))&&this.hasSelection){for(const e of Q(this,lp))e.unselect();Q(this,lp).clear(),te(this,Zp,eg).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]||this.commitOrRemove(),!this.hasSelection)return;Q(this,Ap)[0]+=e,Q(this,Ap)[1]+=t;const[n,i]=Q(this,Ap),r=[...Q(this,lp)];Q(this,Ep)&&clearTimeout(Q(this,Ep)),Z(this,Ep,setTimeout((()=>{Z(this,Ep,null),Q(this,Ap)[0]=Q(this,Ap)[1]=0,this.addCommands({cmd:()=>{for(const e of r)Q(this,Wf).has(e.id)&&e.translateInPage(n,i)},undo:()=>{for(const e of r)Q(this,Wf).has(e.id)&&e.translateInPage(-n,-i)},mustExec:!1})}),1e3));for(const s of r)s.translateInPage(e,t)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),Z(this,Gf,new Map);for(const e of Q(this,lp))Q(this,Gf).set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!Q(this,Gf))return!1;this.disableUserSelect(!1);const e=Q(this,Gf);Z(this,Gf,null);let t=!1;for(const[{x:i,y:r,pageIndex:s},a]of e)a.newX=i,a.newY=r,a.newPageIndex=s,t||(t=i!==a.savedX||r!==a.savedY||s!==a.savedPageIndex);if(!t)return!1;const n=(e,t,n,i)=>{if(Q(this,Wf).has(e.id)){const r=Q(this,jf).get(i);r?e._setParentAndPosition(r,t,n):(e.pageIndex=i,e.x=t,e.y=n)}};return this.addCommands({cmd:()=>{for(const[t,{newX:i,newY:r,newPageIndex:s}]of e)n(t,i,r,s)},undo:()=>{for(const[t,{savedX:i,savedY:r,savedPageIndex:s}]of e)n(t,i,r,s)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(Q(this,Gf))for(const n of Q(this,Gf).keys())n.drag(e,t)}rebuild(e){if(null===e.parent){const t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){var e;return(null==(e=this.getActive())?void 0:e.shouldGetKeyboardEvents())||1===Q(this,lp).size&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return Q(this,Of)===e}getActive(){return Q(this,Of)}getMode(){return Q(this,op)}get imageManager(){return oh(this,"imageManager",new Ef)}getSelectionBoxes(e){if(!e)return null;const t=document.getSelection();for(let l=0,c=t.rangeCount;l<c;
2l++)if(!e.contains(t.getRangeAt(l).commonAncestorContainer))return null;const{x:n,y:i,width:r,height:s}=e.getBoundingClientRect();let a;switch(e.getAttribute("data-main-rotation")){case"90":a=(e,t,a,o)=>({x:(t-i)/s,y:1-(e+a-n)/r,width:o/s,height:a/r});break;case"180":a=(e,t,a,o)=>({x:1-(e+a-n)/r,y:1-(t+o-i)/s,width:a/r,height:o/s});break;case"270":a=(e,t,a,o)=>({x:1-(t+o-i)/s,y:(e-n)/r,width:o/s,height:a/r});break;default:a=(e,t,a,o)=>({x:(e-n)/r,y:(t-i)/s,width:a/r,height:o/s})}const o=[];for(let l=0,c=t.rangeCount;l<c;l++){const e=t.getRangeAt(l);if(!e.collapsed)for(const{x:t,y:n,width:i,height:r}of e.getClientRects())0===i||0===r||o.push(a(t,n,i,r))}return 0===o.length?null:o}addChangedExistingAnnotation(e){let{annotationElementId:t,id:n}=e;(Q(this,Uf)||Z(this,Uf,new Map)).set(t,n)}removeChangedExistingAnnotation(e){let{annotationElementId:t}=e;var n;null==(n=Q(this,Uf))||n.delete(t)}renderAnnotationElement(e){var t;const n=null==(t=Q(this,Uf))?void 0:t.get(e.data.id);if(!n)return;const i=Q(this,zf).getRawValue(n);i&&(Q(this,op)===vu.NONE&&!i.hasBeenModified||i.renderAnnotationElement(e))}};Of=new WeakMap,Wf=new WeakMap,jf=new WeakMap,Bf=new WeakMap,zf=new WeakMap,Uf=new WeakMap,Hf=new WeakMap,Vf=new WeakMap,qf=new WeakMap,Gf=new WeakMap,Xf=new WeakMap,Yf=new WeakMap,Kf=new WeakMap,$f=new WeakMap,Qf=new WeakMap,Jf=new WeakMap,Zf=new WeakMap,ep=new WeakMap,tp=new WeakMap,np=new WeakMap,ip=new WeakMap,rp=new WeakMap,sp=new WeakMap,ap=new WeakMap,op=new WeakMap,lp=new WeakMap,cp=new WeakMap,up=new WeakMap,hp=new WeakMap,dp=new WeakMap,fp=new WeakMap,pp=new WeakMap,gp=new WeakMap,mp=new WeakMap,vp=new WeakMap,yp=new WeakMap,bp=new WeakMap,wp=new WeakMap,kp=new WeakMap,xp=new WeakMap,Sp=new WeakMap,_p=new WeakMap,Ap=new WeakMap,Ep=new WeakMap,Cp=new WeakMap,Mp=new WeakMap,Pp=new WeakSet,Tp=function(e){let{anchorNode:t}=e;return t.nodeType===Node.TEXT_NODE?t.parentElement:t},Rp=new WeakSet,Lp=function(){const e=document.getSelection();if(!e||e.isCollapsed)return;const t=te(this,Pp,Tp).call(this,e).closest(".textLayer"),n=this.getSelectionBoxes(t);n&&(Q(this,ep)||Z(this,ep,new xf(this)),Q(this,ep).show(t,n,"ltr"===this.direction))},Ip=new WeakSet,Dp=function(){var e,t,n;const i=document.getSelection();if(!i||i.isCollapsed)return void(Q(this,cp)&&(null==(e=Q(this,ep))||e.hide(),Z(this,cp,null),te(this,Zp,eg).call(this,{hasSelectedText:!1})));const{anchorNode:r}=i;if(r!==Q(this,cp))if(te(this,Pp,Tp).call(this,i).closest(".textLayer")){if(null==(n=Q(this,ep))||n.hide(),Z(this,cp,r),te(this,Zp,eg).call(this,{hasSelectedText:!0}),(Q(this,op)===vu.HIGHLIGHT||Q(this,op)===vu.NONE)&&(Q(this,op)===vu.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),Z(this,Zf,this.isShiftKeyDown),!this.isShiftKeyDown)){const e=t=>{"pointerup"===t.type&&0!==t.button||(window.removeEventListener("pointerup",e),window.removeEventListener("blur",e),"pointerup"===t.type&&te(this,Np,Fp).call(this,"main_toolbar"))};window.addEventListener("pointerup",e),window.addEventListener("blur",e)}}else Q(this,cp)&&(null==(t=Q(this,ep))||t.hide(),Z(this,cp,null),te(this,Zp,eg).call(this,{hasSelectedText:!1}))},Np=new WeakSet,Fp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Q(this,op)===vu.HIGHLIGHT?this.highlightSelection(e):Q(this,Kf)&&te(this,Rp,Lp).call(this)},Op=new WeakSet,Wp=function(){document.addEventListener("selectionchange",Q(this,xp))},jp=new WeakSet,Bp=function(){document.removeEventListener("selectionchange",Q(this,xp))},zp=new WeakSet,Up=function(){window.addEventListener("focus",Q(this,fp)),window.addEventListener("blur",Q(this,dp))},Hp=new WeakSet,Vp=function(){window.removeEventListener("focus",Q(this,fp)),window.removeEventListener("blur",Q(this,dp))},qp=new WeakSet,Gp=function(){window.addEventListener("keydown",Q(this,vp)),window.addEventListener("keyup",Q(this,yp))},Xp=new WeakSet,Yp=function(){window.removeEventListener("keydown",Q(this,vp)),window.removeEventListener("keyup",Q(this,yp))},Kp=new WeakSet,$p=function(){document.addEventListener("copy",Q(this,pp)),document.addEventListener("cut",Q(this,gp)),document.addEventListener("paste",Q(this,mp))},Qp=new WeakSet,Jp=function(){document.removeEventListener("copy",Q(this,pp)),document.removeEventListener("cut",Q(this,gp)),document.removeEventListener("paste",Q(this,mp))},Zp=new WeakSet,eg=function(e){Object.entries(e).some((e=>{let[t,n]=e;return Q(this,_p)[t]!==n}))&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(Q(this,_p),e)}),Q(this,op)===vu.HIGHLIGHT&&!1===e.hasSelectedEditor&&te(this,tg,ng).call(this,[[yu.HIGHLIGHT_FREE,!0]]))},tg=new WeakSet,ng=function(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})},ig=new WeakSet,rg=function(){if(!Q(this,np)){Z(this,np,!0);for(const e of Q(this,jf).values())e.enable();for(const e of Q(this,Wf).values())e.enable()}},sg=new WeakSet,ag=function(){if(this.unselectAll(),Q(this,np)){Z(this,np,!1);for(const e of Q(this,jf).values())e.disable();for(const e of Q(this,Wf).values())e.disable()}},og=new WeakSet,lg=function(e){const t=Q(this,jf).get(e.pageIndex);t?t.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))},cg=new WeakSet,ug=function(){let e=null;for(e of Q(this,lp));return e},hg=new WeakSet,dg=function(){if(0===Q(this,Wf).size)return!0;
2if(1===Q(this,Wf).size)for(const e of Q(this,Wf).values())return e.isEmpty();return!1},fg=new WeakSet,pg=function(e){for(const t of Q(this,lp))t.unselect();Q(this,lp).clear();for(const t of e)t.isEmpty()||(Q(this,lp).add(t),t.select());te(this,Zp,eg).call(this,{hasSelectedEditor:this.hasSelection})},K(gg,"TRANSLATE_SMALL",1),K(gg,"TRANSLATE_BIG",10);let mg=gg;var vg,yg,bg,wg,kg,xg,Sg,_g,Ag;const Eg=class e{constructor(e){J(this,_g),J(this,vg,""),J(this,yg,!1),J(this,bg,null),J(this,wg,null),J(this,kg,null),J(this,xg,!1),J(this,Sg,null),Z(this,Sg,e)}static initialize(t){e._l10nPromise||(e._l10nPromise=t)}async render(){const t=Z(this,bg,document.createElement("button"));t.className="altText";const n=await e._l10nPromise.get("pdfjs-editor-alt-text-button-label");t.textContent=n,t.setAttribute("aria-label",n),t.tabIndex="0",t.addEventListener("contextmenu",Id),t.addEventListener("pointerdown",(e=>e.stopPropagation()));const i=e=>{e.preventDefault(),Q(this,Sg)._uiManager.editAltText(Q(this,Sg))};return t.addEventListener("click",i,{capture:!0}),t.addEventListener("keydown",(e=>{e.target===t&&"Enter"===e.key&&(Z(this,xg,!0),i(e))})),await te(this,_g,Ag).call(this),t}finish(){Q(this,bg)&&(Q(this,bg).focus({focusVisible:Q(this,xg)}),Z(this,xg,!1))}isEmpty(){return!Q(this,vg)&&!Q(this,yg)}get data(){return{altText:Q(this,vg),decorative:Q(this,yg)}}set data(e){let{altText:t,decorative:n}=e;Q(this,vg)===t&&Q(this,yg)===n||(Z(this,vg,t),Z(this,yg,n),te(this,_g,Ag).call(this))}toggle(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Q(this,bg)&&(!e&&Q(this,kg)&&(clearTimeout(Q(this,kg)),Z(this,kg,null)),Q(this,bg).disabled=!e)}destroy(){var e;null==(e=Q(this,bg))||e.remove(),Z(this,bg,null),Z(this,wg,null)}};vg=new WeakMap,yg=new WeakMap,bg=new WeakMap,wg=new WeakMap,kg=new WeakMap,xg=new WeakMap,Sg=new WeakMap,_g=new WeakSet,Ag=async function(){var e;const t=Q(this,bg);if(!t)return;if(!Q(this,vg)&&!Q(this,yg))return t.classList.remove("done"),void(null==(e=Q(this,wg))||e.remove());t.classList.add("done"),Eg._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then((e=>{t.setAttribute("aria-label",e)}));let n=Q(this,wg);if(!n){Z(this,wg,n=document.createElement("span")),n.className="tooltip",n.setAttribute("role","tooltip");const e=n.id="alt-text-tooltip-".concat(Q(this,Sg).id);t.setAttribute("aria-describedby",e);const i=100;t.addEventListener("mouseenter",(()=>{Z(this,kg,setTimeout((()=>{Z(this,kg,null),Q(this,wg).classList.add("show"),Q(this,Sg)._reportTelemetry({action:"alt_text_tooltip"})}),i))})),t.addEventListener("mouseleave",(()=>{var e;Q(this,kg)&&(clearTimeout(Q(this,kg)),Z(this,kg,null)),null==(e=Q(this,wg))||e.classList.remove("show")}))}n.innerText=Q(this,yg)?await Eg._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip"):Q(this,vg),n.parentNode||t.append(n);const i=Q(this,Sg).getImageForAltText();null==i||i.setAttribute("aria-describedby",n.id)},K(Eg,"_l10nPromise",null);let Cg=Eg;var Mg,Pg,Tg,Rg,Lg,Ig,Dg,Ng,Fg,Og,Wg,jg,Bg,zg,Ug,Hg,Vg,qg,Gg,Xg,Yg,Kg,$g,Qg,Jg,Zg,em,tm,nm,im,rm,sm,am,om,lm,cm,um,hm,dm,fm,pm,gm,mm,vm,ym,bm,wm,km,xm;const Sm=class e{constructor(t){J(this,Kg),J(this,Zg),J(this,tm),J(this,im),J(this,sm),J(this,om),J(this,cm),J(this,hm),J(this,fm),J(this,gm),J(this,vm),J(this,bm),J(this,km),J(this,Mg,null),J(this,Pg,null),J(this,Tg,!1),J(this,Rg,!1),J(this,Lg,null),J(this,Ig,null),J(this,Dg,this.focusin.bind(this)),J(this,Ng,this.focusout.bind(this)),J(this,Fg,null),J(this,Og,""),J(this,Wg,!1),J(this,jg,null),J(this,Bg,!1),J(this,zg,!1),J(this,Ug,!1),J(this,Hg,null),J(this,Vg,0),J(this,qg,0),J(this,Gg,null),K(this,"_initialOptions",Object.create(null)),K(this,"_isVisible",!0),K(this,"_uiManager",null),K(this,"_focusEventsAllowed",!0),K(this,"_l10nPromise",null),J(this,Xg,!1),J(this,Yg,e._zIndex++),this.constructor===e&&rh("Cannot initialize AnnotationEditor."),this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null;const{rotation:n,rawDims:{pageWidth:i,pageHeight:r,pageX:s,pageY:a}}=this.parent.viewport;this.rotation=n,this.pageRotation=(360+n-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[i,r],this.pageTranslation=[s,a];const[o,l]=this.parentDimensions;this.x=t.x/o,this.y=t.y/l,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const t=e.prototype._resizeWithKeyboard,n=mg.TRANSLATE_SMALL,i=mg.TRANSLATE_BIG;return oh(this,"_resizerKeyboardManager",new Df([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-n,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-i,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[n,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[i,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-n]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-i]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,n]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,i]}],[["Escape","mac+Escape"],e.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return oh(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){const t=new Am({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}
2static initialize(t,n,i){if(e._l10nPromise||(e._l10nPromise=new Map(["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-resizer-label-topLeft","pdfjs-editor-resizer-label-topMiddle","pdfjs-editor-resizer-label-topRight","pdfjs-editor-resizer-label-middleRight","pdfjs-editor-resizer-label-bottomRight","pdfjs-editor-resizer-label-bottomMiddle","pdfjs-editor-resizer-label-bottomLeft","pdfjs-editor-resizer-label-middleLeft"].map((e=>[e,t.get(e.replaceAll(/([A-Z])/g,(e=>"-".concat(e.toLowerCase()))))])))),null!=i&&i.strings)for(const s of i.strings)e._l10nPromise.set(s,t.get(s));if(-1!==e._borderLineWidth)return;const r=getComputedStyle(document.documentElement);e._borderLineWidth=parseFloat(r.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){rh("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return Q(this,Xg)}set _isDraggable(e){var t;Z(this,Xg,e),null==(t=this.div)||t.classList.toggle("draggable",e)}get isEnterHandled(){return!0}center(){const[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(2*e),this.y+=this.width*e/(2*t);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(2*e),this.y-=this.width*e/(2*t);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=Q(this,Yg)}setParent(e){null!==e?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):te(this,km,xm).call(this),this.parent=e}focusin(e){this._focusEventsAllowed&&(Q(this,Wg)?Z(this,Wg,!1):this.parent.setSelected(this))}focusout(e){var t;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const n=e.relatedTarget;null!=n&&n.closest("#".concat(this.id))||(e.preventDefault(),null!=(t=this.parent)&&t.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,n,i){const[r,s]=this.parentDimensions;[n,i]=this.screenToPageTranslation(n,i),this.x=(e+n)/r,this.y=(t+i)/s,this.fixAndSetPosition()}translate(e,t){te(this,Kg,$g).call(this,this.parentDimensions,e,t)}translateInPage(e,t){Q(this,jg)||Z(this,jg,[this.x,this.y]),te(this,Kg,$g).call(this,this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}drag(e,t){Q(this,jg)||Z(this,jg,[this.x,this.y]);const[n,i]=this.parentDimensions;if(this.x+=e/n,this.y+=t/i,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:e,y:t}=this.div.getBoundingClientRect();this.parent.findNewParent(this,e,t)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:r,y:s}=this;const[a,o]=this.getBaseTranslation();r+=a,s+=o,this.div.style.left="".concat((100*r).toFixed(2),"%"),this.div.style.top="".concat((100*s).toFixed(2),"%"),this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!Q(this,jg)&&(Q(this,jg)[0]!==this.x||Q(this,jg)[1]!==this.y)}getBaseTranslation(){const[t,n]=this.parentDimensions,{_borderLineWidth:i}=e,r=i/t,s=i/n;switch(this.rotation){case 90:return[-r,s];case 180:return[r,s];case 270:return[r,-s];default:return[-r,-s]}}get _mustFixPosition(){return!0}fixAndSetPosition(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.rotation;const[t,n]=this.pageDimensions;let{x:i,y:r,width:s,height:a}=this;if(s*=t,a*=n,i*=t,r*=n,this._mustFixPosition)switch(e){case 0:i=Math.max(0,Math.min(t-s,i)),r=Math.max(0,Math.min(n-a,r));break;case 90:i=Math.max(0,Math.min(t-a,i)),r=Math.min(n,Math.max(s,r));break;case 180:i=Math.min(t,Math.max(s,i)),r=Math.min(n,Math.max(a,r));break;case 270:i=Math.min(t,Math.max(a,i)),r=Math.max(0,Math.min(n-s,r))}this.x=i/=t,this.y=r/=n;const[o,l]=this.getBaseTranslation();i+=o,r+=l;const{style:c}=this.div;c.left="".concat((100*i).toFixed(2),"%"),c.top="".concat((100*r).toFixed(2),"%"),this.moveInDOM()}screenToPageTranslation(t,n){var i;return te(i=e,Qg,Jg).call(i,t,n,this.parentRotation)}pageTranslationToScreen(t,n){var i;return te(i=e,Qg,Jg).call(i,t,n,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e,pageDimensions:[t,n]}=this,i=t*e,r=n*e;return bh.isCSSRoundSupported?[Math.round(i),Math.round(r)]:[i,r]}setDims(e,t){const[n,i]=this.parentDimensions;this.div.style.width="".concat((100*e/n).toFixed(2),"%"),Q(this,Rg)||(this.div.style.height="".concat((100*t/i).toFixed(2),"%"))}fixDims(){const{style:e}=this.div,{height:t,width:n}=e,i=n.endsWith("%"),r=!Q(this,Rg)&&t.endsWith("%");if(i&&r)return;const[s,a]=this.parentDimensions;i||(e.width="".concat((100*parseFloat(n)/s).toFixed(2),"%")),!Q(this,Rg)&&!r&&(e.height="".concat((100*parseFloat(t)/a).toFixed(2),"%"))}getInitialTranslation(){return[0,0]}altTextFinish(){var e;null==(e=Q(this,Pg))||e.finish()}async addEditToolbar(){return Q(this,Fg)||Q(this,zg)||(Z(this,Fg,new af(this)),this.div.append(Q(this,Fg).render()),Q(this,Pg)&&Q(this,Fg).addAltTextButton(await Q(this,Pg).render())),Q(this,Fg)}removeEditToolbar(){var e;Q(this,Fg)&&(Q(this,Fg).remove(),Z(this,Fg,null),null==(e=Q(this,Pg))||e.destroy())}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){Q(this,Pg)||(Cg.initialize(e._l10nPromise),Z(this,Pg,new Cg(this)),await this.addEditToolbar())}get altTextData(){var e;return null==(e=Q(this,Pg))?void 0:e.data}set altTextData(e){Q(this,Pg)&&(Q(this,Pg).data=e)}hasAltText(){var e;return!(null!=(e=Q(this,Pg))&&e.isEmpty())}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=Q(this,Tg)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),this.div.addEventListener("focusin",Q(this,Dg)),this.div.addEventListener("focusout",Q(this,Ng));const[e,t]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth="".concat((100*t/e).toFixed(2),"%"),this.div.style.maxHeight="".concat((100*e/t).toFixed(2),"%"));const[n,i]=this.getInitialTranslation();return this.translate(n,i),Sf(this,this.div,["pointerdown"]),this.div}pointerdown(e){const{isMac:t}=bh.platform;0!==e.button||e.ctrlKey&&t?e.preventDefault():(Z(this,Wg,!0),this._isDraggable?te(this,hm,dm).call(this,e):te(this,cm,um).call(this,e))}
2moveInDOM(){Q(this,Hg)&&clearTimeout(Q(this,Hg)),Z(this,Hg,setTimeout((()=>{var e;Z(this,Hg,null),null==(e=this.parent)||e.moveEditorInDOM(this)}),0))}_setParentAndPosition(e,t,n){e.changeParent(this),this.x=t,this.y=n,this.fixAndSetPosition()}getRect(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.rotation;const i=this.parentScale,[r,s]=this.pageDimensions,[a,o]=this.pageTranslation,l=e/i,c=t/i,u=this.x*r,h=this.y*s,d=this.width*r,f=this.height*s;switch(n){case 0:return[u+l+a,s-h-c-f+o,u+l+d+a,s-h-c+o];case 90:return[u+c+a,s-h+l+o,u+c+f+a,s-h+l+d+o];case 180:return[u-l-d+a,s-h+c+o,u-l+a,s-h+c+f+o];case 270:return[u-c-f+a,s-h-l-d+o,u-c+a,s-h-l+o];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[n,i,r,s]=e,a=r-n,o=s-i;switch(this.rotation){case 0:return[n,t-s,a,o];case 90:return[n,t-i,o,a];case 180:return[r,t-i,a,o];case 270:return[r,t-s,o,a];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){Z(this,zg,!0)}disableEditMode(){Z(this,zg,!1)}isInEditMode(){return Q(this,zg)}shouldGetKeyboardEvents(){return Q(this,Ug)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var e,t;null==(e=this.div)||e.addEventListener("focusin",Q(this,Dg)),null==(t=this.div)||t.addEventListener("focusout",Q(this,Ng))}rotate(e){}serialize(){rh("An editor must be serializable")}static deserialize(e,t,n){const i=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:n});i.rotation=e.rotation;const[r,s]=i.pageDimensions,[a,o,l,c]=i.getRectInCurrentCoords(e.rect,s);return i.x=a/r,i.y=o/s,i.width=l/r,i.height=c/s,i}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||null!==this.serialize())}remove(){if(this.div.removeEventListener("focusin",Q(this,Dg)),this.div.removeEventListener("focusout",Q(this,Ng)),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),Q(this,Hg)&&(clearTimeout(Q(this,Hg)),Z(this,Hg,null)),te(this,km,xm).call(this),this.removeEditToolbar(),Q(this,Gg)){for(const e of Q(this,Gg).values())clearTimeout(e);Z(this,Gg,null)}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(te(this,tm,nm).call(this),Q(this,Lg).classList.remove("hidden"),Sf(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||"Enter"!==t.key)return;this._uiManager.setSelected(this),Z(this,Ig,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const n=Q(this,Lg).children;if(!Q(this,Mg)){Z(this,Mg,Array.from(n));const t=te(this,fm,pm).bind(this),i=te(this,gm,mm).bind(this);for(const n of Q(this,Mg)){const r=n.getAttribute("data-resizer-name");n.setAttribute("role","spinbutton"),n.addEventListener("keydown",t),n.addEventListener("blur",i),n.addEventListener("focus",te(this,vm,ym).bind(this,r)),e._l10nPromise.get("pdfjs-editor-resizer-label-".concat(r)).then((e=>n.setAttribute("aria-label",e)))}}const i=Q(this,Mg)[0];let r=0;for(const e of n){if(e===i)break;r++}const s=(360-this.rotation+this.parentRotation)%360/90*(Q(this,Mg).length/4);if(s!==r){if(s<r)for(let e=0;e<r-s;e++)Q(this,Lg).append(Q(this,Lg).firstChild);else if(s>r)for(let e=0;e<s-r;e++)Q(this,Lg).firstChild.before(Q(this,Lg).lastChild);let t=0;for(const i of n){const n=Q(this,Mg)[t++].getAttribute("data-resizer-name");e._l10nPromise.get("pdfjs-editor-resizer-label-".concat(n)).then((e=>i.setAttribute("aria-label",e)))}}te(this,bm,wm).call(this,0),Z(this,Ug,!0),Q(this,Lg).firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}_resizeWithKeyboard(e,t){Q(this,Ug)&&te(this,om,lm).call(this,Q(this,Og),{movementX:e,movementY:t})}_stopResizingWithKeyboard(){te(this,km,xm).call(this),this.div.focus()}select(){var e,t;this.makeResizable(),null==(e=this.div)||e.classList.add("selectedEditor"),Q(this,Fg)?null==(t=Q(this,Fg))||t.show():this.addEditToolbar().then((()=>{var e,t;null!=(e=this.div)&&e.classList.contains("selectedEditor")&&(null==(t=Q(this,Fg))||t.show())}))}unselect(){var e,t,n,i;null==(e=Q(this,Lg))||e.classList.add("hidden"),null==(t=this.div)||t.classList.remove("selectedEditor"),null!=(n=this.div)&&n.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),null==(i=Q(this,Fg))||i.hide()}updateParams(e,t){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return Q(this,Bg)}set isEditing(e){Z(this,Bg,e),this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,t){Z(this,Rg,!0);const n=e/t,{style:i}=this.div;i.aspectRatio=n,i.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){Q(this,Gg)||Z(this,Gg,new Map);const{action:n}=t;let i=Q(this,Gg).get(n);return i&&clearTimeout(i),i=setTimeout((()=>{this._reportTelemetry(t),Q(this,Gg).delete(n),0===Q(this,Gg).size&&Z(this,Gg,null)}),e._telemetryTimeout),void Q(this,Gg).set(n,i)}t.type||(t.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}
2show(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._isVisible;this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),Z(this,Tg,!1)}disable(){this.div&&(this.div.tabIndex=-1),Z(this,Tg,!0)}renderAnnotationElement(e){let t=e.container.querySelector(".annotationContent");if(t){if("CANVAS"===t.nodeName){const e=t;t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.before(t)}}else t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.container.prepend(t);return t}resetAnnotationElement(e){const{firstChild:t}=e.container;"DIV"===t.nodeName&&t.classList.contains("annotationContent")&&t.remove()}};Mg=new WeakMap,Pg=new WeakMap,Tg=new WeakMap,Rg=new WeakMap,Lg=new WeakMap,Ig=new WeakMap,Dg=new WeakMap,Ng=new WeakMap,Fg=new WeakMap,Og=new WeakMap,Wg=new WeakMap,jg=new WeakMap,Bg=new WeakMap,zg=new WeakMap,Ug=new WeakMap,Hg=new WeakMap,Vg=new WeakMap,qg=new WeakMap,Gg=new WeakMap,Xg=new WeakMap,Yg=new WeakMap,Kg=new WeakSet,$g=function(e,t,n){let[i,r]=e;[t,n]=this.screenToPageTranslation(t,n),this.x+=t/i,this.y+=n/r,this.fixAndSetPosition()},Qg=new WeakSet,Jg=function(e,t,n){switch(n){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}},Zg=new WeakSet,em=function(e){switch(e){case 90:{const[e,t]=this.pageDimensions;return[0,-e/t,t/e,0]}case 180:return[-1,0,0,-1];case 270:{const[e,t]=this.pageDimensions;return[0,e/t,-t/e,0]}default:return[1,0,0,1]}},tm=new WeakSet,nm=function(){if(Q(this,Lg))return;Z(this,Lg,document.createElement("div")),Q(this,Lg).classList.add("resizers");const e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"];for(const t of e){const e=document.createElement("div");Q(this,Lg).append(e),e.classList.add("resizer",t),e.setAttribute("data-resizer-name",t),e.addEventListener("pointerdown",te(this,im,rm).bind(this,t)),e.addEventListener("contextmenu",Id),e.tabIndex=-1}this.div.prepend(Q(this,Lg))},im=new WeakSet,rm=function(e,t){var n;t.preventDefault();const{isMac:i}=bh.platform;if(0!==t.button||t.ctrlKey&&i)return;null==(n=Q(this,Pg))||n.toggle(!1);const r=te(this,om,lm).bind(this,e),s=this._isDraggable;this._isDraggable=!1;const a={passive:!0,capture:!0};this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",r,a),window.addEventListener("contextmenu",Id);const o=this.x,l=this.y,c=this.width,u=this.height,h=this.parent.div.style.cursor,d=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;const f=()=>{var e;this.parent.togglePointerEvents(!0),null==(e=Q(this,Pg))||e.toggle(!0),this._isDraggable=s,window.removeEventListener("pointerup",f),window.removeEventListener("blur",f),window.removeEventListener("pointermove",r,a),window.removeEventListener("contextmenu",Id),this.parent.div.style.cursor=h,this.div.style.cursor=d,te(this,sm,am).call(this,o,l,c,u)};window.addEventListener("pointerup",f),window.addEventListener("blur",f)},sm=new WeakSet,am=function(e,t,n,i){const r=this.x,s=this.y,a=this.width,o=this.height;r===e&&s===t&&a===n&&o===i||this.addCommands({cmd:()=>{this.width=a,this.height=o,this.x=r,this.y=s;const[e,t]=this.parentDimensions;this.setDims(e*a,t*o),this.fixAndSetPosition()},undo:()=>{this.width=n,this.height=i,this.x=e,this.y=t;const[r,s]=this.parentDimensions;this.setDims(r*n,s*i),this.fixAndSetPosition()},mustExec:!0})},om=new WeakSet,lm=function(e,t){const[n,i]=this.parentDimensions,r=this.x,s=this.y,a=this.width,o=this.height,l=Sm.MIN_SIZE/n,c=Sm.MIN_SIZE/i,u=e=>Math.round(1e4*e)/1e4,h=te(this,Zg,em).call(this,this.rotation),d=(e,t)=>[h[0]*e+h[2]*t,h[1]*e+h[3]*t],f=te(this,Zg,em).call(this,360-this.rotation);let p,g,m=!1,v=!1;switch(e){case"topLeft":m=!0,p=(e,t)=>[0,0],g=(e,t)=>[e,t];break;case"topMiddle":p=(e,t)=>[e/2,0],g=(e,t)=>[e/2,t];break;case"topRight":m=!0,p=(e,t)=>[e,0],g=(e,t)=>[0,t];break;case"middleRight":v=!0,p=(e,t)=>[e,t/2],g=(e,t)=>[0,t/2];break;case"bottomRight":m=!0,p=(e,t)=>[e,t],g=(e,t)=>[0,0];break;case"bottomMiddle":p=(e,t)=>[e/2,t],g=(e,t)=>[e/2,0];break;case"bottomLeft":m=!0,p=(e,t)=>[0,t],g=(e,t)=>[e,0];break;case"middleLeft":v=!0,p=(e,t)=>[0,t/2],g=(e,t)=>[e,t/2]}const y=p(a,o),b=g(a,o);let w=d(...b);const k=u(r+w[0]),x=u(s+w[1]);let S=1,_=1,[A,E]=this.screenToPageTranslation(t.movementX,t.movementY);if([A,E]=(C=A/n,M=E/i,[f[0]*C+f[2]*M,f[1]*C+f[3]*M]),m){const e=Math.hypot(a,o);S=_=Math.max(Math.min(Math.hypot(b[0]-y[0]-A,b[1]-y[1]-E)/e,1/a,1/o),l/a,c/o)}else v?S=Math.max(l,Math.min(1,Math.abs(b[0]-y[0]-A)))/a:_=Math.max(c,Math.min(1,Math.abs(b[1]-y[1]-E)))/o;var C,M;const P=u(a*S),T=u(o*_);w=d(...g(P,T));const R=k-w[0],L=x-w[1];this.width=P,this.height=T,this.x=R,this.y=L,this.setDims(n*P,i*T),this.fixAndSetPosition()},cm=new WeakSet,um=function(e){const{isMac:t}=bh.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)},hm=new WeakSet,dm=function(e){const t=this._uiManager.isSelected(this);let n,i;this._uiManager.setUpDragSession(),t&&(this.div.classList.add("moving"),n={passive:!0,capture:!0},Z(this,Vg,e.clientX),Z(this,qg,e.clientY),i=e=>{const{clientX:t,clientY:n}=e,[i,r]=this.screenToPageTranslation(t-Q(this,Vg),n-Q(this,qg));Z(this,Vg,t),Z(this,qg,n),this._uiManager.dragSelectedEditors(i,r)},window.addEventListener("pointermove",i,n));const r=()=>{window.removeEventListener("pointerup",r),window.removeEventListener("blur",r),t&&(this.div.classList.remove("moving"),window.removeEventListener("pointermove",i,n)),Z(this,Wg,!1),this._uiManager.endDragSession()||te(this,cm,um).call(this,e)};window.addEventListener("pointerup",r),window.addEventListener("blur",r)}
2,fm=new WeakSet,pm=function(e){Sm._resizerKeyboardManager.exec(this,e)},gm=new WeakSet,mm=function(e){var t;Q(this,Ug)&&(null==(t=e.relatedTarget)?void 0:t.parentNode)!==Q(this,Lg)&&te(this,km,xm).call(this)},vm=new WeakSet,ym=function(e){Z(this,Og,Q(this,Ug)?e:"")},bm=new WeakSet,wm=function(e){if(Q(this,Mg))for(const t of Q(this,Mg))t.tabIndex=e},km=new WeakSet,xm=function(){if(Z(this,Ug,!1),te(this,bm,wm).call(this,-1),Q(this,Ig)){const{savedX:e,savedY:t,savedWidth:n,savedHeight:i}=Q(this,Ig);te(this,sm,am).call(this,e,t,n,i),Z(this,Ig,null)}},J(Sm,Qg),K(Sm,"_borderLineWidth",-1),K(Sm,"_colorManager",new Ff),K(Sm,"_zIndex",1),K(Sm,"_telemetryTimeout",1e3);let _m=Sm;class Am extends _m{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}const Em=3285377520,Cm=4294901760,Mm=65535;class Pm{constructor(e){this.h1=e?4294967295&e:Em,this.h2=e?4294967295&e:Em}update(e){let t,n;if("string"==typeof e){t=new Uint8Array(2*e.length),n=0;for(let i=0,r=e.length;i<r;i++){const r=e.charCodeAt(i);r<=255?t[n++]=r:(t[n++]=r>>>8,t[n++]=255&r)}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");t=e.slice(),n=t.byteLength}const i=n>>2,r=n-4*i,s=new Uint32Array(t.buffer,0,i);let a=0,o=0,l=this.h1,c=this.h2;const u=3432918353,h=461845907,d=u&Mm,f=h&Mm;for(let p=0;p<i;p++)1&p?(a=s[p],a=a*u&Cm|a*d&Mm,a=a<<15|a>>>17,a=a*h&Cm|a*f&Mm,l^=a,l=l<<13|l>>>19,l=5*l+3864292196):(o=s[p],o=o*u&Cm|o*d&Mm,o=o<<15|o>>>17,o=o*h&Cm|o*f&Mm,c^=o,c=c<<13|c>>>19,c=5*c+3864292196);switch(a=0,r){case 3:a^=t[4*i+2]<<16;case 2:a^=t[4*i+1]<<8;case 1:a^=t[4*i],a=a*u&Cm|a*d&Mm,a=a<<15|a>>>17,a=a*h&Cm|a*f&Mm,1&i?l^=a:c^=a}this.h1=l,this.h2=c}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&Cm|36045*e&Mm,t=4283543511*t&Cm|(2950163797*(t<<16|e>>>16)&Cm)>>>16,e^=t>>>1,e=444984403*e&Cm|60499*e&Mm,t=3301882366*t&Cm|(3120437893*(t<<16|e>>>16)&Cm)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}const Tm=Object.freeze({map:null,hash:"",transfer:void 0});var Rm,Lm,Im,Dm,Nm,Fm;class Om{constructor(){J(this,Im),J(this,Rm,!1),J(this,Lm,new Map),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const n=Q(this,Lm).get(e);return void 0===n?t:Object.assign(t,n)}getRawValue(e){return Q(this,Lm).get(e)}remove(e){if(Q(this,Lm).delete(e),0===Q(this,Lm).size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(const e of Q(this,Lm).values())if(e instanceof _m)return;this.onAnnotationEditor(null)}}setValue(e,t){const n=Q(this,Lm).get(e);let i=!1;if(void 0!==n)for(const[r,s]of Object.entries(t))n[r]!==s&&(i=!0,n[r]=s);else i=!0,Q(this,Lm).set(e,t);i&&te(this,Im,Dm).call(this),t instanceof _m&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(t.constructor._type)}has(e){return Q(this,Lm).has(e)}getAll(){return Q(this,Lm).size>0?yh(Q(this,Lm)):null}setAll(e){for(const[t,n]of Object.entries(e))this.setValue(t,n)}get size(){return Q(this,Lm).size}resetModified(){Q(this,Rm)&&(Z(this,Rm,!1),"function"==typeof this.onResetModified&&this.onResetModified())}get print(){return new Wm(this)}get serializable(){if(0===Q(this,Lm).size)return Tm;const e=new Map,t=new Pm,n=[],i=Object.create(null);let r=!1;for(const[s,a]of Q(this,Lm)){const n=a instanceof _m?a.serialize(!1,i):a;n&&(e.set(s,n),t.update("".concat(s,":").concat(JSON.stringify(n))),r||(r=!!n.bitmap))}if(r)for(const s of e.values())s.bitmap&&n.push(s.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:n}:Tm}get editorStats(){let e=null;const t=new Map;for(const i of Q(this,Lm).values()){if(!(i instanceof _m))continue;const r=i.telemetryFinalData;if(!r)continue;const{type:s}=r;t.has(s)||t.set(s,Object.getPrototypeOf(i).constructor),e||(e=Object.create(null));const a=e[s]||(e[s]=new Map);for(const[e,t]of Object.entries(r)){var n;if("type"===e)continue;let i=a.get(e);i||(i=new Map,a.set(e,i));const r=null!==(n=i.get(t))&&void 0!==n?n:0;i.set(t,r+1)}}for(const[i,r]of t)e[i]=r.computeTelemetryFinalData(e[i]);return e}}Rm=new WeakMap,Lm=new WeakMap,Im=new WeakSet,Dm=function(){Q(this,Rm)||(Z(this,Rm,!0),"function"==typeof this.onSetModified&&this.onSetModified())};class Wm extends Om{constructor(e){super(),J(this,Nm,void 0);const{map:t,hash:n,transfer:i}=e.serializable,r=structuredClone(t,i?{transfer:i}:null);Z(this,Nm,{map:r,hash:n,transfer:i})}get print(){rh("Should not call PrintAnnotationStorage.print")}get serializable(){return Q(this,Nm)}}Nm=new WeakMap;
2class jm{constructor(e){let{ownerDocument:t=globalThis.document,styleElement:n=null}=e;J(this,Fm,new Set),this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),Q(this,Fm).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(e){let{systemFontInfo:t,_inspectFont:n}=e;if(t&&!Q(this,Fm).has(t.loadedName)){if(sh(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:e,src:i,style:r}=t,s=new FontFace(e,i,r);this.addNativeFontFace(s);try{await s.load(),Q(this,Fm).add(e),null==n||n(t)}catch{ih("Cannot load system font: ".concat(t.baseFontName,", installing it could help to improve PDF rendering.")),this.removeNativeFontFace(s)}return}rh("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo)return void await this.loadSystemFont(e);if(this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(n){throw ih("Failed to load font '".concat(t.family,"': '").concat(n,"'.")),e.disableFontFace=!0,n}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise((t=>{const n=this._queueLoadingCallback(t);this._prepareFontLoadEvent(e,n)}))}}get isFontLoadingAPISupported(){var e;return oh(this,"isFontLoadingAPISupported",!(null==(e=this._document)||!e.fonts))}get isSyncFontLoadingSupported(){let e=!1;return(su||typeof navigator<"u"&&"string"==typeof(null==navigator?void 0:navigator.userAgent)&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),oh(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const{loadingRequests:t}=this,n={done:!1,complete:function(){for(sh(!n.done,"completeRequest() cannot be called twice."),n.done=!0;t.length>0&&t[0].done;){const e=t.shift();setTimeout(e.callback,0)}},callback:e};return t.push(n),n}get _loadTestFont(){return oh(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function i(e,t,n,i){return e.substring(0,t)+i+e.substring(t+n)}let r,s;const a=this._document.createElement("canvas");a.width=1,a.height=1;const o=a.getContext("2d");let l=0;const c="lt".concat(Date.now()).concat(this.loadTestFontId++);let u=this._loadTestFont;u=i(u,976,c.length,c);const h=1482184792;let d=n(u,16);for(r=0,s=c.length-3;r<s;r+=4)d=d-h+n(c,r)|0;var f;r<c.length&&(d=d-h+n(c+"XXX",r)|0),u=i(u,16,4,(f=d,String.fromCharCode(f>>24&255,f>>16&255,f>>8&255,255&f)));const p="url(data:font/opentype;base64,".concat(btoa(u),");"),g='@font-face {font-family:"'.concat(c,'";src:').concat(p,"}");this.insertRule(g);const m=this._document.createElement("div");m.style.visibility="hidden",m.style.width=m.style.height="10px",m.style.position="absolute",m.style.top=m.style.left="0px";for(const v of[e.loadedName,c]){const e=this._document.createElement("span");e.textContent="Hi",e.style.fontFamily=v,m.append(e)}this._document.body.append(m),function e(t,n){if(++l>30)return ih("Load test font never loaded."),void n();o.font="30px "+t,o.fillText(".",0,20),o.getImageData(0,0,1,1).data[3]>0?n():setTimeout(e.bind(null,t,n))}(c,(()=>{m.remove(),t.complete()}
2))}}Fm=new WeakMap;class Bm{constructor(e,t){let{disableFontFace:n=!1,inspectFont:i=null}=t;this.compiledGlyphs=Object.create(null);for(const r in e)this[r]=e[r];this.disableFontFace=!0===n,this._inspectFont=i}createNativeFontFace(){var e;if(!this.data||this.disableFontFace)return null;let t;if(this.cssFontInfo){const e={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(e.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),t=new FontFace(this.cssFontInfo.fontFamily,this.data,e)}else t=new FontFace(this.loadedName,this.data,{});return null==(e=this._inspectFont)||e.call(this,this),t}createFontFaceRule(){var e;if(!this.data||this.disableFontFace)return null;const t=mh(this.data),n="url(data:".concat(this.mimetype,";base64,").concat(btoa(t),");");let i;if(this.cssFontInfo){let e="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(e+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),i='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(e,"src:").concat(n,"}")}else i='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(n,"}");return null==(e=this._inspectFont)||e.call(this,this,n),i}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let n;try{n=e.get(this.loadedName+"_path_"+t)}catch(r){ih('getPathGenerator - ignoring character: "'.concat(r,'".'))}if(!Array.isArray(n)||0===n.length)return this.compiledGlyphs[t]=function(e,t){};const i=[];for(let s=0,a=n.length;s<a;)switch(n[s++]){case Th:{const[e,t,r,a,o,l]=n.slice(s,s+6);i.push((n=>n.bezierCurveTo(e,t,r,a,o,l))),s+=6}break;case Rh:{const[e,t]=n.slice(s,s+2);i.push((n=>n.moveTo(e,t))),s+=2}break;case Lh:{const[e,t]=n.slice(s,s+2);i.push((n=>n.lineTo(e,t))),s+=2}break;case Ih:{const[e,t,r,a]=n.slice(s,s+4);i.push((n=>n.quadraticCurveTo(e,t,r,a))),s+=4}break;case Dh:i.push((e=>e.restore()));break;case Nh:i.push((e=>e.save()));break;case Fh:sh(2===i.length,"Scale command is only valid at the third position.");break;case Oh:{const[e,t,r,a,o,l]=n.slice(s,s+6);i.push((n=>n.transform(e,t,r,a,o,l))),s+=6}break;case Wh:{const[e,t]=n.slice(s,s+2);i.push((n=>n.translate(e,t))),s+=2}}return this.compiledGlyphs[t]=function(e,t){i[0](e),i[1](e),e.scale(t,-t);for(let n=2,r=i.length;n<r;n++)i[n](e)}}}if(su){var zm=Promise.withResolvers(),Um=null;(async()=>{const e=await import("./empty-GlqisfcO.js"),t=await import("./index-BIqdkLuE.js").then((e=>e.i)),n=await import("./index-DFn6bF3J.js").then((e=>e.i)),i=await import("./url-Dkx9cvHv.js").then((e=>e.u));return new Map(Object.entries({fs:e,http:t,https:n,url:i,canvas:undefined,path2d:undefined}))})().then((e=>{Um=e,zm.resolve()}),(e=>{ih("loadPackages: ".concat(e)),Um=new Map,zm.resolve()}))}class Hm{static get promise(){return zm.promise}static get(e){return null==Um?void 0:Um.get(e)}}const Vm=function(e){return Hm.get("fs").promises.readFile(e).then((e=>new Uint8Array(e)))};const qm="Fill",Gm="Stroke",Xm="Shading";function Ym(e,t){if(!t)return;const n=t[2]-t[0],i=t[3]-t[1],r=new Path2D;r.rect(t[0],t[1],n,i),e.clip(r)}class Km{constructor(){this.constructor===Km&&rh("Cannot initialize BaseShadingPattern.")}getPattern(){rh("Abstract method `getPattern` called.")}}class $m extends Km{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const n of this._colorStops)t.addColorStop(n[0],n[1]);return t}getPattern(e,t,n,i){let r;if(i===Gm||i===qm){const s=t.current.getClippedPathBoundingBox(i,jd(e))||[0,0,0,0],a=Math.ceil(s[2]-s[0])||1,o=Math.ceil(s[3]-s[1])||1,l=t.cachedCanvases.getCanvas("pattern",a,o,!0),c=l.context;c.clearRect(0,0,c.canvas.width,c.canvas.height),c.beginPath(),c.rect(0,0,c.canvas.width,c.canvas.height),c.translate(-s[0],-s[1]),n=Ah.transform(n,[1,0,0,1,s[0],s[1]]),c.transform(...t.baseTransform),this.matrix&&c.transform(...this.matrix
2),Ym(c,this._bbox),c.fillStyle=this._createGradient(c),c.fill(),r=e.createPattern(l.canvas,"no-repeat");const u=new DOMMatrix(n);r.setTransform(u)}else Ym(e,this._bbox),r=this._createGradient(e);return r}}function Qm(e,t,n,i,r,s,a,o){const l=t.coords,c=t.colors,u=e.data,h=4*e.width;let d;l[n+1]>l[i+1]&&(d=n,n=i,i=d,d=s,s=a,a=d),l[i+1]>l[r+1]&&(d=i,i=r,r=d,d=a,a=o,o=d),l[n+1]>l[i+1]&&(d=n,n=i,i=d,d=s,s=a,a=d);const f=(l[n]+t.offsetX)*t.scaleX,p=(l[n+1]+t.offsetY)*t.scaleY,g=(l[i]+t.offsetX)*t.scaleX,m=(l[i+1]+t.offsetY)*t.scaleY,v=(l[r]+t.offsetX)*t.scaleX,y=(l[r+1]+t.offsetY)*t.scaleY;if(p>=y)return;const b=c[s],w=c[s+1],k=c[s+2],x=c[a],S=c[a+1],_=c[a+2],A=c[o],E=c[o+1],C=c[o+2],M=Math.round(p),P=Math.round(y);let T,R,L,I,D,N,F,O;for(let W=M;W<=P;W++){if(W<m){const e=W<p?0:(p-W)/(p-m);T=f-(f-g)*e,R=b-(b-x)*e,L=w-(w-S)*e,I=k-(k-_)*e}else{let e;e=W>y?1:m===y?0:(m-W)/(m-y),T=g-(g-v)*e,R=x-(x-A)*e,L=S-(S-E)*e,I=_-(_-C)*e}let e;e=W<p?0:W>y?1:(p-W)/(p-y),D=f-(f-v)*e,N=b-(b-A)*e,F=w-(w-E)*e,O=k-(k-C)*e;const t=Math.round(Math.min(T,D)),n=Math.round(Math.max(T,D));let i=h*W+4*t;for(let r=t;r<=n;r++)e=(T-r)/(T-D),e<0?e=0:e>1&&(e=1),u[i++]=R-(R-N)*e|0,u[i++]=L-(L-F)*e|0,u[i++]=I-(I-O)*e|0,u[i++]=255}}function Jm(e,t,n){const i=t.coords,r=t.colors;let s,a;switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(i.length/o)-1,c=o-1;for(s=0;s<l;s++){let t=s*o;for(let s=0;s<c;s++,t++)Qm(e,n,i[t],i[t+1],i[t+o],r[t],r[t+1],r[t+o]),Qm(e,n,i[t+o+1],i[t+1],i[t+o],r[t+o+1],r[t+1],r[t+o])}break;case"triangles":for(s=0,a=i.length;s<a;s+=3)Qm(e,n,i[s],i[s+1],i[s+2],r[s],r[s+1],r[s+2]);break;default:throw new Error("illegal figure")}}class Zm extends Km{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,n){const i=Math.floor(this._bounds[0]),r=Math.floor(this._bounds[1]),s=Math.ceil(this._bounds[2])-i,a=Math.ceil(this._bounds[3])-r,o=Math.min(Math.ceil(Math.abs(s*e[0]*1.1)),3e3),l=Math.min(Math.ceil(Math.abs(a*e[1]*1.1)),3e3),c=s/o,u=a/l,h={coords:this._coords,colors:this._colors,offsetX:-i,offsetY:-r,scaleX:1/c,scaleY:1/u},d=o+4,f=l+4,p=n.getCanvas("mesh",d,f,!1),g=p.context,m=g.createImageData(o,l);if(t){const e=m.data;for(let n=0,i=e.length;n<i;n+=4)e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2],e[n+3]=255}for(const v of this._figures)Jm(m,v,h);return g.putImageData(m,2,2),{canvas:p.canvas,offsetX:i-2*c,offsetY:r-2*u,scaleX:c,scaleY:u}}getPattern(e,t,n,i){let r;if(Ym(e,this._bbox),i===Xm)r=Ah.singularValueDecompose2dScale(jd(e));else if(r=Ah.singularValueDecompose2dScale(t.baseTransform),this.matrix){const e=Ah.singularValueDecompose2dScale(this.matrix);r=[r[0]*e[0],r[1]*e[1]]}const s=this._createMeshCanvas(r,i===Xm?null:this._background,t.cachedCanvases);return i!==Xm&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}class ev extends Km{getPattern(){return"hotpink"}}const tv=1,nv=2,iv=class e{constructor(e,t,n,i,r){this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=n,this.canvasGraphicsFactory=i,this.baseTransform=r}createPatternCanvas(e){const t=this.operatorList,n=this.bbox,i=this.xstep,r=this.ystep,s=this.paintType,a=this.tilingType,o=this.color,l=this.canvasGraphicsFactory;nh("TilingType: "+a);const c=n[0],u=n[1],h=n[2],d=n[3],f=Ah.singularValueDecompose2dScale(this.matrix),p=Ah.singularValueDecompose2dScale(this.baseTransform),g=[f[0]*p[0],f[1]*p[1]],m=this.getSizeAndScale(i,this.ctx.canvas.width,g[0]),v=this.getSizeAndScale(r,this.ctx.canvas.height,g[1]),y=e.cachedCanvases.getCanvas("pattern",m.size,v.size,!0),b=y.context,w=l.createCanvasGraphics(b);w.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(w,s,o);let k=c,x=u,S=h,_=d;return c<0&&(k=0,S+=Math.abs(c)),u<0&&(x=0,_+=Math.abs(u)),b.translate(-m.scale*k,-v.scale*x),w.transform(m.scale,0,0,v.scale,0,0),b.save(),this.clipBbox(w,k,x,S,_),w.baseTransform=jd(w.ctx),w.executeOperatorList(t),w.endDrawing(),{canvas:y.canvas,scaleX:m.scale,scaleY:v.scale,offsetX:k,offsetY:x}}getSizeAndScale(t,n,i){t=Math.abs(t);const r=Math.max(e.MAX_PATTERN_SIZE,n);let s=Math.ceil(t*i);return s>=r?s=r:i=s/t,{scale:i,size:s}}clipBbox(e,t,n,i,r){const s=i-t,a=r-n;e.ctx.rect(t,n,s,a),e.current.updateRectMinMax(jd(e.ctx),[t,n,i,r]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,n){const i=e.ctx,r=e.current;switch(t){case tv:const e=this.ctx;i.fillStyle=e.fillStyle,i.strokeStyle=e.strokeStyle,r.fillColor=e.fillStyle,r.strokeColor=e.strokeStyle;break;case nv:const s=Ah.makeHexColor(n[0],n[1],n[2]);i.fillStyle=s,i.strokeStyle=s,r.fillColor=s,r.strokeColor=s;break;default:throw new ph("Unsupported paint type: ".concat(t))}}getPattern(e,t,n,i){let r=n;i!==Xm&&(r=Ah.transform(r,t.baseTransform),this.matrix&&(r=Ah.transform(r,this.matrix
2)));const s=this.createPatternCanvas(t);let a=new DOMMatrix(r);a=a.translate(s.offsetX,s.offsetY),a=a.scale(1/s.scaleX,1/s.scaleY);const o=e.createPattern(s.canvas,"repeat");return o.setTransform(a),o}};K(iv,"MAX_PATTERN_SIZE",3e3);let rv=iv;function sv(e){let{src:t,srcPos:n=0,dest:i,width:r,height:s,nonBlackColor:a=4294967295,inverseDecode:o=!1}=e;const l=bh.isLittleEndian?4278190080:255,[c,u]=o?[a,l]:[l,a],h=r>>3,d=7&r,f=t.length;i=new Uint32Array(i.buffer);let p=0;for(let g=0;g<s;g++){for(const r=n+h;n<r;n++){const e=n<f?t[n]:255;i[p++]=128&e?u:c,i[p++]=64&e?u:c,i[p++]=32&e?u:c,i[p++]=16&e?u:c,i[p++]=8&e?u:c,i[p++]=4&e?u:c,i[p++]=2&e?u:c,i[p++]=1&e?u:c}if(0===d)continue;const e=n<f?t[n++]:255;for(let t=0;t<d;t++)i[p++]=e&1<<7-t?u:c}return{srcPos:n,destPos:p}}const av=16;class ov{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,n){let i;return void 0!==this.cache[e]?(i=this.cache[e],this.canvasFactory.reset(i,t,n)):(i=this.canvasFactory.create(t,n),this.cache[e]=i),i}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function lv(e,t,n,i,r,s,a,o,l,c){const[u,h,d,f,p,g]=jd(e);if(0===h&&0===d){const m=a*u+p,v=Math.round(m),y=o*f+g,b=Math.round(y),w=(a+l)*u+p,k=Math.abs(Math.round(w)-v)||1,x=(o+c)*f+g,S=Math.abs(Math.round(x)-b)||1;return e.setTransform(Math.sign(u),0,0,Math.sign(f),v,b),e.drawImage(t,n,i,r,s,0,0,k,S),e.setTransform(u,h,d,f,p,g),[k,S]}if(0===u&&0===f){const m=o*d+p,v=Math.round(m),y=a*h+g,b=Math.round(y),w=(o+c)*d+p,k=Math.abs(Math.round(w)-v)||1,x=(a+l)*h+g,S=Math.abs(Math.round(x)-b)||1;return e.setTransform(0,Math.sign(h),Math.sign(d),0,v,b),e.drawImage(t,n,i,r,s,0,0,S,k),e.setTransform(u,h,d,f,p,g),[S,k]}e.drawImage(t,n,i,r,s,a,o,l,c);return[Math.hypot(u,h)*l,Math.hypot(d,f)*c]}class cv{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=au,this.textMatrixScale=1,this.fontMatrix=ou,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=wu,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,n){[t,n]=Ah.applyTransform([t,n],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,n),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,n)}updateRectMinMax(e,t){const n=Ah.applyTransform(t,e),i=Ah.applyTransform(t.slice(2),e),r=Ah.applyTransform([t[0],t[3]],e),s=Ah.applyTransform([t[2],t[1]],e);this.minX=Math.min(this.minX,n[0],i[0],r[0],s[0]),this.minY=Math.min(this.minY,n[1],i[1],r[1],s[1]),this.maxX=Math.max(this.maxX,n[0],i[0],r[0],s[0]),this.maxY=Math.max(this.maxY,n[1],i[1],r[1],s[1])}updateScalingPathMinMax(e,t){Ah.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.minY=Math.min(this.minY,t[1]),this.maxX=Math.max(this.maxX,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,n,i,r,s,a,o,l,c){const u=Ah.bezierBoundingBox(t,n,i,r,s,a,o,l,c);c||this.updateRectMinMax(e,u)}getPathBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[this.minX,this.minY,this.maxX,this.maxY];if(e===Gm){t||rh("Stroke bounding box must include transform.");const e=Ah.singularValueDecompose2dScale(t),i=e[0]*this.lineWidth/2,r=e[1]*this.lineWidth/2;n[0]-=i,n[1]-=r,n[2]+=i,n[3]+=r}return n}updateClipFromPath(){const e=Ah.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Ah.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function uv(e,t){if(typeof ImageData<"u"&&t instanceof ImageData)return void e.putImageData(t,0,0);const n=t.height,i=t.width,r=n%av,s=(n-r)/av,a=0===r?s:s+1,o=e.createImageData(i,av);let l,c=0;const u=t.data,h=o.data;let d,f,p,g;if(t.kind===Eu.GRAYSCALE_1BPP){const t=u.byteLength,n=new Uint32Array(h.buffer,0,h.byteLength>>2),g=n.length,m=i+7>>3,v=4294967295,y=bh.isLittleEndian?4278190080:255;for(d=0;d<a;d++){for(p=d<s?av:r,l=0,f=0;f<p;f++){const e=t-c;let r=0;const s=e>m?i:8*e-7,a=-8&s;let o=0,h=0;for(;r<a;r+=8)h=u[c++],n[l++]=128&h?v:y,n[l++]=64&h?v:y,n[l++]=32&h?v:y,n[l++]=16&h?v:y,n[l++]=8&h?v:y,n[l++]=4&h?v:y,n[l++]=2&h?v:y,n[l++]=1&h?v:y;for(;r<s;r++)0===o&&(h=u[c++],o=128),n[l++]=h&o?v:y,o>>=1}for(;l<g;)n[l++]=0;e.putImageData(o,0,d*av)}}else if(t.kind===Eu.RGBA_32BPP){for(f=0,g=i*av*4,d=0;d<s;d++)h.set(u.subarray(c,c+g)),c+=g,e.putImageData(o,0,f),f+=av;d<a&&(g=i*r*4,h.set(u.subarray(c,c+g)),e.putImageData(o,0,f))}else{if(t.kind!==Eu.RGB_24BPP)throw new Error("bad image kind: ".concat(t.kind));for(p=av,g=i*p,d=0;d<a;d++){for(d>=s&&(p=r,g=i*p),l=0,f=g;f--;)h[l++]=u[c++],h[l++]=u[c++],h[l++]=u[c++],h[l++]=255;e.putImageData(o,0,d*av)}}}function hv(e,t){if(t.bitmap)return void e.drawImage(t.bitmap,0,0);const n=t.height,i=t.width,r=n%av,s=(n-r)/av,a=0===r?s:s+1,o=e.createImageData(i,av);let l=0;const c=t.data,u=o.data;for(let h=0;h<a;h++){const t=h<s?av:r;({srcPos:l}=sv({src:c,srcPos:l,dest:u,width:i,height:t,nonBlackColor:0})),e.putImageData(o,0,h*av)}}function dv(e,t){const n=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const i of n)void 0!==e[i]&&(t[i]=e[i]);void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function fv(e){if(e.strokeStyle=e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0),!su){const{filter:t}=e;"none"!==t&&""!==t&&(e.filter="none")}}function pv(e,t){if(t)return!0;const n=Ah.singularValueDecompose2dScale(e);n[0]=Math.fround(n[0]),n[1]=Math.fround(n[1]);const i=Math.fround((globalThis.devicePixelRatio||1)*Gh.PDF_TO_CSS_UNITS);return n[0]<=i&&n[1]<=i}const gv=["butt","round","square"],mv=["miter","round","bevel"],vv={},yv={};var bv,wv,kv,xv;bv=new WeakSet,wv=function(){for(;this.stateStack.length||this.inSMaskMode;
2)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},kv=new WeakSet,xv=function(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==e){const t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}};let Sv=class e{constructor(e,t,n,i,r,s,a,o){let{optionalContentConfig:l,markedContentStack:c=null}=s;J(this,bv),J(this,kv),this.ctx=e,this.current=new cv(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=n,this.canvasFactory=i,this.filterFactory=r,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=c||[],this.optionalContentConfig=l,this.cachedCanvases=new ov(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=a,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=o,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing(e){let{transform:t,viewport:n,transparency:i=!1,background:r=null}=e;const s=this.ctx.canvas.width,a=this.ctx.canvas.height,o=this.ctx.fillStyle;if(this.ctx.fillStyle=r||"#ffffff",this.ctx.fillRect(0,0,s,a),this.ctx.fillStyle=o,i){const e=this.cachedCanvases.getCanvas("transparent",s,a);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...jd(this.compositeCtx))}this.ctx.save(),fv(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform(...n.transform),this.viewportScale=n.scale,this.baseTransform=jd(this.ctx)}executeOperatorList(e,t,n,i){const r=e.argsArray,s=e.fnArray;let a=t||0;const o=r.length;if(o===a)return a;const l=o-a>10&&"function"==typeof n,c=l?Date.now()+15:0;let u=0;const h=this.commonObjs,d=this.objs;let f;for(;;){if(void 0!==i&&a===i.nextBreakPoint)return i.breakIt(a,n),a;if(f=s[a],f!==Ju.dependency)this[f].apply(this,r[a]);else for(const e of r[a]){const t=e.startsWith("g_")?h:d;if(!t.has(e))return t.get(e,n),a}if(a++,a===o)return a;if(l&&++u>10){if(Date.now()>c)return n(),a;u=0}}}endDrawing(){te(this,bv,wv).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),te(this,kv,xv).call(this)}_scaleImage(e,t){const n=e.width,i=e.height;let r,s,a=Math.max(Math.hypot(t[0],t[1]),1),o=Math.max(Math.hypot(t[2],t[3]),1),l=n,c=i,u="prescale1";for(;a>2&&l>1||o>2&&c>1;){let t=l,n=c;a>2&&l>1&&(t=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l/2),a/=l/t),o>2&&c>1&&(n=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c)/2,o/=c/n),r=this.cachedCanvases.getCanvas(u,t,n),s=r.context,s.clearRect(0,0,t,n),s.drawImage(e,0,0,l,c,0,0,t,n),e=r.canvas,l=t,c=n,u="prescale1"===u?"prescale2":"prescale1"}return{img:e,paintWidth:l,paintHeight:c}}_createMaskCanvas(e){const t=this.ctx,{width:n,height:i}=e,r=this.current.fillColor,s=this.current.patternFill,a=jd(t);let o,l,c,u;if((e.bitmap||e.data)&&e.count>1){const t=e.bitmap||e.data.buffer;l=JSON.stringify(s?a:[a.slice(0,4),r]),o=this._cachedBitmapsMap.get(t),o||(o=new Map,this._cachedBitmapsMap.set(t,o));const n=o.get(l);if(n&&!s){return{canvas:n,offsetX:Math.round(Math.min(a[0],a[2])+a[4]),offsetY:Math.round(Math.min(a[1],a[3])+a[5])}}c=n}c||(u=this.cachedCanvases.getCanvas("maskCanvas",n,i),hv(u.context,e));let h=Ah.transform(a,[1/n,0,0,-1/i,0,0]);h=Ah.transform(h,[1,0,0,1,0,-i]);const[d,f,p,g]=Ah.getAxialAlignedBoundingBox([0,0,n,i],h),m=Math.round(p-d)||1,v=Math.round(g-f)||1,y=this.cachedCanvases.getCanvas("fillCanvas",m,v),b=y.context,w=d,k=f;b.translate(-w,-k),b.transform(...h),c||(c=this._scaleImage(u.canvas,Bd(b)),c=c.img,o&&s&&o.set(l,c)),b.imageSmoothingEnabled=pv(jd(b),e.interpolate),lv(b,c,0,0,c.width,c.height,0,0,n,i),b.globalCompositeOperation="source-in";const x=Ah.transform(Bd(b),[1,0,0,1,-w,-k]);
2return b.fillStyle=s?r.getPattern(t,this,x,qm):r,b.fillRect(0,0,n,i),o&&!s&&(this.cachedCanvases.delete("fillCanvas"),o.set(l,y.canvas)),{canvas:y.canvas,offsetX:Math.round(w),offsetY:Math.round(k)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=gv[e]}setLineJoin(e){this.ctx.lineJoin=mv[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const n=this.ctx;void 0!==n.setLineDash&&(n.setLineDash(e),n.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,n]of e)switch(t){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n[0],n[1]);break;case"CA":this.current.strokeAlpha=n;break;case"ca":this.current.fillAlpha=n,this.ctx.globalAlpha=n;break;case"BM":this.ctx.globalCompositeOperation=n;break;case"SMask":this.current.activeSMask=n?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(n)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,t=this.ctx.canvas.height,n="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(n,e,t);this.suspendedCtx=this.ctx,this.ctx=i.context;const r=this.ctx;r.setTransform(...jd(this.suspendedCtx)),dv(this.suspendedCtx,r),function(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,n){t.translate(e,n),this.__originalTranslate(e,n)},e.scale=function(e,n){t.scale(e,n),this.__originalScale(e,n)},e.transform=function(e,n,i,r,s,a){t.transform(e,n,i,r,s,a),this.__originalTransform(e,n,i,r,s,a)},e.setTransform=function(e,n,i,r,s,a){t.setTransform(e,n,i,r,s,a),this.__originalSetTransform(e,n,i,r,s,a)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,n){t.moveTo(e,n),this.__originalMoveTo(e,n)},e.lineTo=function(e,n){t.lineTo(e,n),this.__originalLineTo(e,n)},e.bezierCurveTo=function(e,n,i,r,s,a){t.bezierCurveTo(e,n,i,r,s,a),this.__originalBezierCurveTo(e,n,i,r,s,a)},e.rect=function(e,n,i,r){t.rect(e,n,i,r),this.__originalRect(e,n,i,r)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(r,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),dv(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask,n=this.suspendedCtx;this.composeSMask(n,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore(
2)}composeSMask(e,t,n,i){const r=i[0],s=i[1],a=i[2]-r,o=i[3]-s;0===a||0===o||(this.genericComposeSMask(t.context,n,a,o,t.subtype,t.backdrop,t.transferMap,r,s,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(n.canvas,0,0),e.restore())}genericComposeSMask(e,t,n,i,r,s,a,o,l,c,u){let h=e.canvas,d=o-c,f=l-u;if(s)if(d<0||f<0||d+n>h.width||f+i>h.height){const e=this.cachedCanvases.getCanvas("maskExtension",n,i),t=e.context;t.drawImage(h,-d,-f),s.some((e=>0!==e))&&(t.globalCompositeOperation="destination-atop",t.fillStyle=Ah.makeHexColor(...s),t.fillRect(0,0,n,i),t.globalCompositeOperation="source-over"),h=e.canvas,d=f=0}else if(s.some((e=>0!==e))){e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const t=new Path2D;t.rect(d,f,n,i),e.clip(t),e.globalCompositeOperation="destination-atop",e.fillStyle=Ah.makeHexColor(...s),e.fillRect(d,f,n,i),e.restore()}t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0),"Alpha"===r&&a?t.filter=this.filterFactory.addAlphaFilter(a):"Luminosity"===r&&(t.filter=this.filterFactory.addLuminosityFilter(a));const p=new Path2D;p.rect(o,l,n,i),t.clip(p),t.globalCompositeOperation="destination-in",t.drawImage(h,d,f,n,i,o,l,n,i),t.restore()}save(){this.inSMaskMode?(dv(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),dv(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,n,i,r,s){this.ctx.transform(e,t,n,i,r,s),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,n){const i=this.ctx,r=this.current;let s,a,o=r.x,l=r.y;const c=jd(i),u=0===c[0]&&0===c[3]||0===c[1]&&0===c[2],h=u?n.slice(0):null;for(let d=0,f=0,p=e.length;d<p;d++)switch(0|e[d]){case Ju.rectangle:o=t[f++],l=t[f++];const e=t[f++],n=t[f++],d=o+e,p=l+n;i.moveTo(o,l),0===e||0===n?i.lineTo(d,p):(i.lineTo(d,l),i.lineTo(d,p),i.lineTo(o,p)),u||r.updateRectMinMax(c,[o,l,d,p]),i.closePath();break;case Ju.moveTo:o=t[f++],l=t[f++],i.moveTo(o,l),u||r.updatePathMinMax(c,o,l);break;case Ju.lineTo:o=t[f++],l=t[f++],i.lineTo(o,l),u||r.updatePathMinMax(c,o,l);break;case Ju.curveTo:s=o,a=l,o=t[f+4],l=t[f+5],i.bezierCurveTo(t[f],t[f+1],t[f+2],t[f+3],o,l),r.updateCurvePathMinMax(c,s,a,t[f],t[f+1],t[f+2],t[f+3],o,l,h),f+=6;break;case Ju.curveTo2:s=o,a=l,i.bezierCurveTo(o,l,t[f],t[f+1],t[f+2],t[f+3]),r.updateCurvePathMinMax(c,s,a,o,l,t[f],t[f+1],t[f+2],t[f+3],h),o=t[f+2],l=t[f+3],f+=4;break;case Ju.curveTo3:s=o,a=l,o=t[f+2],l=t[f+3],i.bezierCurveTo(t[f],t[f+1],o,l,o,l),r.updateCurvePathMinMax(c,s,a,t[f],t[f+1],o,l,o,l,h),f+=4;break;case Ju.closePath:i.closePath()}u&&r.updateScalingPathMinMax(c,h),r.setCurrentPoint(o,l)}closePath(){this.ctx.closePath()}stroke(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this.ctx,n=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof n&&null!=n&&n.getPattern?(t.save(),t.strokeStyle=n.getPattern(t,this,Bd(t),Gm),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this.ctx,n=this.current.fillColor;let i=!1;this.current.patternFill&&(t.save(),t.fillStyle=n.getPattern(t,this,Bd(t),qm),i=!0);const r=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==r&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),i&&t.restore(),e&&this.consumePath(r)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=vv}eoClip(){this.pendingClip=yv}beginText(){this.current.textMatrix=au,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(const n of e)t.setTransform(...n.transform),t.translate(n.x,n.y),n.addToPath(t,n.fontSize);
2t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){var n;const i=this.commonObjs.get(e),r=this.current;if(!i)throw new Error("Can't find font for ".concat(e));if(r.fontMatrix=i.fontMatrix||ou,(0===r.fontMatrix[0]||0===r.fontMatrix[3])&&ih("Invalid font matrix for font "+e),t<0?(t=-t,r.fontDirection=-1):r.fontDirection=1,this.current.font=i,this.current.fontSize=t,i.isType3Font)return;const s=i.loadedName||"sans-serif",a=(null==(n=i.systemFontInfo)?void 0:n.css)||'"'.concat(s,'", ').concat(i.fallbackName);let o="normal";i.black?o="900":i.bold&&(o="bold");const l=i.italic?"italic":"normal";let c=t;t<16?c=16:t>100&&(c=100),this.current.fontSizeScale=t/c,this.ctx.font="".concat(l," ").concat(o," ").concat(c,"px ").concat(a)}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,n,i,r,s){this.current.textMatrix=[e,t,n,i,r,s],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,n,i){const r=this.ctx,s=this.current,a=s.font,o=s.textRenderingMode,l=s.fontSize/s.fontSizeScale,c=o&_u,u=!!(o&Au),h=s.patternFill&&!a.missingFile;let d;(a.disableFontFace||u||h)&&(d=a.getPathGenerator(this.commonObjs,e)),a.disableFontFace||h?(r.save(),r.translate(t,n),r.beginPath(),d(r,l),i&&r.setTransform(...i),(c===wu||c===xu)&&r.fill(),(c===ku||c===xu)&&r.stroke(),r.restore()):((c===wu||c===xu)&&r.fillText(e,t,n),(c===ku||c===xu)&&r.strokeText(e,t,n)),u&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:jd(r),x:t,y:n,fontSize:l,addToPath:d})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let n=!1;for(let i=3;i<t.length;i+=4)if(t[i]>0&&t[i]<255){n=!0;break}return oh(this,"isFontSubpixelAAEnabled",n)}showText(e){const t=this.current,n=t.font;if(n.isType3Font)return this.showType3Text(e);const i=t.fontSize;if(0===i)return;const r=this.ctx,s=t.fontSizeScale,a=t.charSpacing,o=t.wordSpacing,l=t.fontDirection,c=t.textHScale*l,u=e.length,h=n.vertical,d=h?1:-1,f=n.defaultVMetrics,p=i*t.fontMatrix[0],g=t.textRenderingMode===wu&&!n.disableFontFace&&!t.patternFill;let m;if(r.save(),r.transform(...t.textMatrix),r.translate(t.x,t.y+t.textRise),l>0?r.scale(c,-1):r.scale(c,1),t.patternFill){r.save();const e=t.fillColor.getPattern(r,this,Bd(r),qm);m=jd(r),r.restore(),r.fillStyle=e}let v=t.lineWidth;const y=t.textMatrixScale;if(0===y||0===v){const e=t.textRenderingMode&_u;(e===ku||e===xu)&&(v=this.getSinglePixelWidth())}else v/=y;if(1!==s&&(r.scale(s,s),v/=s),r.lineWidth=v,n.isInvalidPDFjsFont){const n=[];let i=0;for(const t of e)n.push(t.unicode),i+=t.width;return r.fillText(n.join(""),0,0),t.x+=i*p*c,r.restore(),void this.compose()}let b,w=0;for(b=0;b<u;++b){const t=e[b];if("number"==typeof t){w+=d*t*i/1e3;continue}let c=!1;const u=(t.isSpace?o:0)+a,v=t.fontChar,y=t.accent;let k,x,S=t.width;if(h){const e=t.vmetric||f,n=-(t.vmetric?e[1]:.5*S)*p,i=e[2]*p;S=e?-e[0]:S,k=n/s,x=(w+i)/s}else k=w/s,x=0;if(n.remeasure&&S>0){const e=1e3*r.measureText(v).width/i*s;if(S<e&&this.isFontSubpixelAAEnabled){const t=S/e;c=!0,r.save(),r.scale(t,1),k/=t}else S!==e&&(k+=(S-e)/2e3*i/s)}if(this.contentVisible&&(t.isInFont||n.missingFile))if(g&&!y)r.fillText(v,k,x);else if(this.paintChar(v,k,x,m),y){const e=k+i*y.offset.x/s,t=x-i*y.offset.y/s;this.paintChar(y.fontChar,e,t,m)}w+=h?S*p-u*l:S*p+u*l,c&&r.restore()}h?t.y-=w:t.x+=w*c,r.restore(),this.compose()}showType3Text(e){const t=this.ctx,n=this.current,i=n.font,r=n.fontSize,s=n.fontDirection,a=i.vertical?1:-1,o=n.charSpacing,l=n.wordSpacing,c=n.textHScale*s,u=n.fontMatrix||ou,h=e.length;let d,f,p,g;if(!(n.textRenderingMode===Su)&&0!==r){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...n.textMatrix),t.translate(n.x,n.y),t.scale(c,s),d=0;d<h;++d){if(f=e[d],"number"==typeof f){g=a*f*r/1e3,this.ctx.translate(g,0),n.x+=g*c;continue}const s=(f.isSpace?l:0)+o,h=i.charProcOperatorList[f.operatorListId];h?(this.contentVisible&&(this.processingType3=f,this.save(),t.scale(r,r),t.transform(...u),this.executeOperatorList(h),this.restore(
2)),p=Ah.applyTransform([f.width,0],u)[0]*r+s,t.translate(p,0),n.x+=p*c):ih('Type3 character "'.concat(f.operatorListId,'" is not available.'))}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,n,i,r,s){this.ctx.rect(n,i,r-n,s-i),this.ctx.clip(),this.endPath()}getColorN_Pattern(t){let n;if("TilingPattern"===t[0]){const i=t[1],r=this.baseTransform||jd(this.ctx),s={createCanvasGraphics:t=>new e(t,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};n=new rv(t,i,this.ctx,s,r)}else n=this._getPattern(t[1],t[2]);return n}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,n){const i=Ah.makeHexColor(e,t,n);this.ctx.strokeStyle=i,this.current.strokeColor=i}setFillRGBColor(e,t,n){const i=Ah.makeHexColor(e,t,n);this.ctx.fillStyle=i,this.current.fillColor=i,this.current.patternFill=!1}_getPattern(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(e)?t=this.cachedPatterns.get(e):(t=function(e){switch(e[0]){case"RadialAxial":return new $m(e);case"Mesh":return new Zm(e);case"Dummy":return new ev}throw new Error("Unknown IR type: ".concat(e[0]))}(this.getObject(e)),this.cachedPatterns.set(e,t)),n&&(t.matrix=n),t}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const n=this._getPattern(e);t.fillStyle=n.getPattern(t,this,Bd(t),Xm);const i=Bd(t);if(i){const{width:e,height:n}=t.canvas,[r,s,a,o]=Ah.getAxialAlignedBoundingBox([0,0,e,n],i);this.ctx.fillRect(r,s,a-r,o-s)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){rh("Should not call beginInlineImage")}beginImageData(){rh("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),e&&this.transform(...e),this.baseTransform=jd(this.ctx),t)){const e=t[2]-t[0],n=t[3]-t[1];this.ctx.rect(t[0],t[1],e,n),this.current.updateRectMinMax(jd(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||nh("TODO: Support non-isolated groups."),e.knockout&&ih("Knockout groups not supported.");const n=jd(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let i=Ah.getAxialAlignedBoundingBox(e.bbox,jd(t));const r=[0,0,t.canvas.width,t.canvas.height];i=Ah.intersect(i,r)||[0,0,0,0];const s=Math.floor(i[0]),a=Math.floor(i[1]),o=Math.max(Math.ceil(i[2])-s,1),l=Math.max(Math.ceil(i[3])-a,1);this.current.startNewPathAndClipBox([0,0,o,l]);let c="groupAt"+this.groupLevel;e.smask&&(c+="_smask_"+this.smaskCounter++%2);const u=this.cachedCanvases.getCanvas(c,o,l),h=u.context;h.translate(-s,-a),h.transform(...n),e.smask?this.smaskStack.push({canvas:u.canvas,context:h,offsetX:s,offsetY:a,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(s,a),t.save()),dv(t,h),this.ctx=h,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,n=this.groupStack.pop();if(this.ctx=n,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const e=jd(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...e);const n=Ah.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(n)}}beginAnnotation(e,t,n,i,r){if(te(this,bv,wv).call(this),fv(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),t){const i=t[2]-t[0],s=t[3]-t[1];if(r&&this.annotationCanvasMap){(n=n.slice())[4]-=t[0],n[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=i,t[3]=s;const[r,a]=Ah.singularValueDecompose2dScale(jd(this.ctx)),{viewportScale:o}=this,l=Math.ceil(i*this.outputScaleX*o),c=Math.ceil(s*this.outputScaleY*o);this.annotationCanvas=this.canvasFactory.create(l,c);const{canvas:u,context:h}=this.annotationCanvas;this.annotationCanvasMap.set(e,u),this.annotationCanvas.savedCtx=this.ctx,this.ctx=h,this.ctx.save(),this.ctx.setTransform(r,0,0,-a,0,s*a),fv(this.ctx)}else fv(this.ctx),this.ctx.rect(t[0],t[1],i,s),this.ctx.clip(),this.endPath()}
2this.current=new cv(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...n),this.transform(...i)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),te(this,kv,xv).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const n=this.ctx,i=this.processingType3;if(i&&(void 0===i.compiled&&(i.compiled=function(e){const{width:t,height:n}=e;if(t>1e3||n>1e3)return null;const i=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),r=t+1;let s,a,o,l=new Uint8Array(r*(n+1));const c=t+7&-8;let u=new Uint8Array(c*n),h=0;for(const g of e.data){let e=128;for(;e>0;)u[h++]=g&e?0:255,e>>=1}let d=0;for(h=0,0!==u[h]&&(l[0]=1,++d),a=1;a<t;a++)u[h]!==u[h+1]&&(l[a]=u[h]?2:1,++d),h++;for(0!==u[h]&&(l[a]=2,++d),s=1;s<n;s++){h=s*c,o=s*r,u[h-c]!==u[h]&&(l[o]=u[h]?1:8,++d);let e=(u[h]?4:0)+(u[h-c]?8:0);for(a=1;a<t;a++)e=(e>>2)+(u[h+1]?4:0)+(u[h-c+1]?8:0),i[e]&&(l[o+a]=i[e],++d),h++;if(u[h-c]!==u[h]&&(l[o+a]=u[h]?2:4,++d),d>1e3)return null}for(h=c*(n-1),o=s*r,0!==u[h]&&(l[o]=8,++d),a=1;a<t;a++)u[h]!==u[h+1]&&(l[o+a]=u[h]?4:8,++d),h++;if(0!==u[h]&&(l[o+a]=4,++d),d>1e3)return null;const f=new Int32Array([0,r,-1,0,-r,0,0,0,1]),p=new Path2D;for(s=0;d&&s<=n;s++){let e=s*r;const n=e+t;for(;e<n&&!l[e];)e++;if(e===n)continue;p.moveTo(e%r,s);const i=e;let a=l[e];do{const t=f[a];do{e+=t}while(!l[e]);const n=l[e];5!==n&&10!==n?(a=n,l[e]=0):(a=n&51*a>>4,l[e]&=a>>2|a<<2),p.lineTo(e%r,e/r|0),l[e]||--d}while(i!==e);--s}return u=null,l=null,function(e){e.save(),e.scale(1/t,-1/n),e.translate(0,-n),e.fill(p),e.beginPath(),e.restore()}}(e)),i.compiled))return void i.compiled(n);const r=this._createMaskCanvas(e),s=r.canvas;n.save(),n.setTransform(1,0,0,1,0,0),n.drawImage(s,r.offsetX,r.offsetY),n.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;if(!this.contentVisible)return;e=this.getObject(e.data,e);const a=this.ctx;a.save();const o=jd(a);a.transform(t,n,i,r,0,0);const l=this._createMaskCanvas(e);a.setTransform(1,0,0,1,l.offsetX-o[4],l.offsetY-o[5]);for(let c=0,u=s.length;c<u;c+=2){const e=Ah.transform(o,[t,n,i,r,s[c],s[c+1]]),[u,h]=Ah.applyTransform([0,0],e);a.drawImage(l.canvas,u,h)}a.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const t=this.ctx,n=this.current.fillColor,i=this.current.patternFill;for(const r of e){const{data:e,width:s,height:a,transform:o}=r,l=this.cachedCanvases.getCanvas("maskCanvas",s,a),c=l.context;c.save();hv(c,this.getObject(e,r)),c.globalCompositeOperation="source-in",c.fillStyle=i?n.getPattern(c,this,Bd(t),qm):n,c.fillRect(0,0,s,a),c.restore(),t.save(),t.transform(...o),t.scale(1,-1),lv(t,l.canvas,0,0,s,a,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const t=this.getObject(e);t?this.paintInlineImageXObject(t):ih("Dependent image isn't ready yet")}paintImageXObjectRepeat(e,t,n,i){if(!this.contentVisible)return;const r=this.getObject(e);if(!r)return void ih("Dependent image isn't ready yet");const s=r.width,a=r.height,o=[];for(let l=0,c=i.length;l<c;l+=2)o.push({transform:[t,0,0,n,i[l],i[l+1]],x:0,y:0,w:s,h:a});this.paintInlineImageXObjectGroup(r,o)}applyTransferMapsToCanvas(e){return"none"!==this.current.transferMaps&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if("none"===this.current.transferMaps)return e.bitmap;const{bitmap:t,width:n,height:i}=e,r=this.cachedCanvases.getCanvas("inlineImage",n,i),s=r.context;return s.filter=this.current.transferMaps,s.drawImage(t,0,0),s.filter="none",r.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return;const t=e.width,n=e.height,i=this.ctx;if(this.save(),!su){const{filter:e}=i;"none"!==e&&""!==e&&(i.filter="none")}let r;if(i.scale(1/t,-1/n),e.bitmap)r=this.applyTransferMapsToBitmap(e);else if("function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)r=e;else{const i=this.cachedCanvases.getCanvas("inlineImage",t,n).context;uv(i,e),r=this.applyTransferMapsToCanvas(i)}const s=this._scaleImage(r,Bd(i));i.imageSmoothingEnabled=pv(jd(i),e.interpolate),lv(i,s.img,0,0,s.paintWidth,s.paintHeight,0,-n,t,n),this.compose(),this.restore(
2)}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;const n=this.ctx;let i;if(e.bitmap)i=e.bitmap;else{const t=e.width,n=e.height,r=this.cachedCanvases.getCanvas("inlineImage",t,n).context;uv(r,e),i=this.applyTransferMapsToCanvas(r)}for(const r of t)n.save(),n.transform(...r.transform),n.scale(1,-1),lv(n,i,r.x,r.y,r.w,r.h,0,-1,1,1),n.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const n=this.ctx;this.pendingClip&&(t||(this.pendingClip===yv?n.clip("evenodd"):n.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),n.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=jd(this.ctx);if(0===e[1]&&0===e[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),n=Math.hypot(e[0],e[2]),i=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(n,i)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){const{lineWidth:e}=this.current,{a:t,b:n,c:i,d:r}=this.ctx.getTransform();let s,a;if(0===n&&0===i){const n=Math.abs(t),i=Math.abs(r);if(n===i)if(0===e)s=a=1/n;else{const t=n*e;s=a=t<1?1/t:1}else if(0===e)s=1/n,a=1/i;else{const t=n*e,r=i*e;s=t<1?1/t:1,a=r<1?1/r:1}}else{const o=Math.abs(t*r-n*i),l=Math.hypot(t,n),c=Math.hypot(i,r);if(0===e)s=c/o,a=l/o;else{const t=e*o;s=c>t?c/t:1,a=l>t?l/t:1}}this._cachedScaleForStroking[0]=s,this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:n}=this.current,[i,r]=this.getScaleForStroking();if(t.lineWidth=n||1,1===i&&1===r)return void t.stroke();const s=t.getLineDash();if(e&&t.save(),t.scale(i,r),s.length>0){const e=Math.max(i,r);t.setLineDash(s.map((t=>t/e))),t.lineDashOffset/=e}t.stroke(),e&&t.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}};for(const qT in Ju)void 0!==Sv.prototype[qT]&&(Sv.prototype[Ju[qT]]=Sv.prototype[qT]);var _v,Av;class Ev{static get workerPort(){return Q(this,_v)}static set workerPort(e){if(!(typeof Worker<"u"&&e instanceof Worker)&&null!==e)throw new Error("Invalid `workerPort` type.");Z(this,_v,e)}static get workerSrc(){return Q(this,Av)}static set workerSrc(e){if("string"!=typeof e)throw new Error("Invalid `workerSrc` type.");Z(this,Av,e)}}_v=new WeakMap,Av=new WeakMap,J(Ev,_v,null),J(Ev,Av,"");const Cv=1,Mv=2,Pv=1,Tv=2,Rv=3,Lv=4,Iv=5,Dv=6,Nv=7,Fv=8;function Ov(e){switch(e instanceof Error||"object"==typeof e&&null!==e||rh('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new gh(e.message);case"MissingPDFException":return new dh(e.message);case"PasswordException":return new ch(e.message,e.code);case"UnexpectedResponseException":return new fh(e.message,e.status);case"UnknownErrorException":return new uh(e.message,e.details);default:return new uh(e.message,e.toString())}}var Wv,jv,Bv,zv,Uv,Hv,Vv,qv;class Gv{constructor(e,t,n){J(this,Wv),J(this,Bv),J(this,Uv),this.sourceName=e,this.targetName=t,this.comObj=n,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void te(this,Bv,zv).call(this,t);if(t.callback){const e=t.callbackId,n=this.callbackCapabilities[e];if(!n)throw new Error("Cannot resolve callback ".concat(e));if(delete this.callbackCapabilities[e],t.callback===Cv)n.resolve(t.data);else{if(t.callback!==Mv)throw new Error("Unexpected callback case");n.reject(Ov(t.reason))}return}const i=this.actionHandler[t.action];if(!i)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){const e=this.sourceName,r=t.sourceName;new Promise((function(e){e(i(t.data))})).then((function(i){n.postMessage({sourceName:e,targetName:r,callback:Cv,callbackId:t.callbackId,data:i})}),(function(i){n.postMessage({sourceName:e,targetName:r,callback:Mv,callbackId:t.callbackId,reason:Ov(i)})}))}else t.streamId?te(this,Wv,jv).call(this,t):i(t.data)},n.addEventListener("message",this._onComObjOnMessage)}on(e,t){const n=this.actionHandler;if(n[e])throw new Error('There is already an actionName called "'.concat(e,'"'));n[e]=t}send(e,t,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}
2sendWithPromise(e,t,n){const i=this.callbackId++,r=Promise.withResolvers();this.callbackCapabilities[i]=r;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:t},n)}catch(s){r.reject(s)}return r.promise}sendWithStream(e,t,n,i){const r=this.streamId++,s=this.sourceName,a=this.targetName,o=this.comObj;return new ReadableStream({start:n=>{const l=Promise.withResolvers();return this.streamControllers[r]={controller:n,startCall:l,pullCall:null,cancelCall:null,isClosed:!1},o.postMessage({sourceName:s,targetName:a,action:e,streamId:r,data:t,desiredSize:n.desiredSize},i),l.promise},pull:e=>{const t=Promise.withResolvers();return this.streamControllers[r].pullCall=t,o.postMessage({sourceName:s,targetName:a,stream:Dv,streamId:r,desiredSize:e.desiredSize}),t.promise},cancel:e=>{sh(e instanceof Error,"cancel must have a valid reason");const t=Promise.withResolvers();return this.streamControllers[r].cancelCall=t,this.streamControllers[r].isClosed=!0,o.postMessage({sourceName:s,targetName:a,stream:Pv,streamId:r,reason:Ov(e)}),t.promise}},n)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}Wv=new WeakSet,jv=function(e){const t=e.streamId,n=this.sourceName,i=e.sourceName,r=this.comObj,s=this,a=this.actionHandler[e.action],o={enqueue(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=s,o>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),r.postMessage({sourceName:n,targetName:i,stream:Lv,streamId:t,chunk:e},a)},close(){this.isCancelled||(this.isCancelled=!0,r.postMessage({sourceName:n,targetName:i,stream:Rv,streamId:t}),delete s.streamSinks[t])},error(e){sh(e instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,r.postMessage({sourceName:n,targetName:i,stream:Iv,streamId:t,reason:Ov(e)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};o.sinkCapability.resolve(),o.ready=o.sinkCapability.promise,this.streamSinks[t]=o,new Promise((function(t){t(a(e.data,o))})).then((function(){r.postMessage({sourceName:n,targetName:i,stream:Fv,streamId:t,success:!0})}),(function(e){r.postMessage({sourceName:n,targetName:i,stream:Fv,streamId:t,reason:Ov(e)})}))},Bv=new WeakSet,zv=function(e){const t=e.streamId,n=this.sourceName,i=e.sourceName,r=this.comObj,s=this.streamControllers[t],a=this.streamSinks[t];switch(e.stream){case Fv:e.success?s.startCall.resolve():s.startCall.reject(Ov(e.reason));break;case Nv:e.success?s.pullCall.resolve():s.pullCall.reject(Ov(e.reason));break;case Dv:if(!a){r.postMessage({sourceName:n,targetName:i,stream:Nv,streamId:t,success:!0});break}a.desiredSize<=0&&e.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=e.desiredSize,new Promise((function(e){var t;e(null==(t=a.onPull)?void 0:t.call(a))})).then((function(){r.postMessage({sourceName:n,targetName:i,stream:Nv,streamId:t,success:!0})}),(function(e){r.postMessage({sourceName:n,targetName:i,stream:Nv,streamId:t,reason:Ov(e)})}));break;case Lv:if(sh(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(e.chunk);break;case Rv:if(sh(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),te(this,Uv,Hv).call(this,s,t);break;case Iv:sh(s,"error should have stream controller"),s.controller.error(Ov(e.reason)),te(this,Uv,Hv).call(this,s,t);break;case Tv:e.success?s.cancelCall.resolve():s.cancelCall.reject(Ov(e.reason)),te(this,Uv,Hv).call(this,s,t);break;case Pv:if(!a)break;new Promise((function(t){var n;t(null==(n=a.onCancel)?void 0:n.call(a,Ov(e.reason)))})).then((function(){r.postMessage({sourceName:n,targetName:i,stream:Tv,streamId:t,success:!0})}),(function(e){r.postMessage({sourceName:n,targetName:i,stream:Tv,streamId:t,reason:Ov(e)})})),a.sinkCapability.reject(Ov(e.reason)),a.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}},Uv=new WeakSet,Hv=async function(e,t){var n,i,r;await Promise.allSettled([null==(n=e.startCall)?void 0:n.promise,null==(i=e.pullCall)?void 0:i.promise,null==(r=e.cancelCall)?void 0:r.promise]),delete this.streamControllers[t]};class Xv{constructor(e){let{parsedData:t,rawData:n}=e;J(this,Vv,void 0),J(this,qv,void 0),Z(this,Vv,t),Z(this,qv,n)}getRaw(){return Q(this,qv)}get(e){var t;return null!==(t=Q(this,Vv).get(e))&&void 0!==t?t:null}getAll(){return yh(Q(this,Vv))}has(e){return Q(this,Vv).has(e)}}Vv=new WeakMap,qv=new WeakMap;const Yv=Symbol("INTERNAL");var Kv,$v,Qv,Jv,Zv,ey,ty,ny,iy,ry;class sy{constructor(e,t){let{name:n,intent:i,usage:r}=t;J(this,Kv,!1),J(this,$v,!1),J(this,Qv,!1),J(this,Jv,!0),Z(this,Kv,!!(e&uu)),Z(this,$v,!!(e&hu)),this.name=n,this.intent=i,this.usage=r}get visible(){if(Q(this,Qv))return Q(this,Jv);if(!Q(this,Jv))return!1;const{print:e,view:t}=this.usage;return Q(this,Kv)?"OFF"!==(null==t?void 0:t.viewState):!Q(this,$v)||"OFF"!==(null==e?void 0:e.printState)}_setVisible(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e!==Yv&&rh("Internal method `_setVisible` called."),Z(this,Qv,n),Z(this,Jv,t)}}Kv=new WeakMap,$v=new WeakMap,Qv=new WeakMap,Jv=new WeakMap;class ay{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:uu;if(J(this,iy),J(this,Zv,null),J(this,ey,new Map),J(this,ty,null),J(this,ny,null),this.renderingIntent=t,this.name=null,this.creator=null,null!==e){this.name=e.name,this.creator=e.creator,Z(this,ny,e.order);for(const n of e.groups)Q(this,ey).set(n.id,new sy(t,n));if("OFF"===e.baseState)for(const e of Q(this,ey).values())e._setVisible(Yv,!1);for(const t of e.on)Q(this,ey).get(t)._setVisible(Yv,!0);for(const t of e.off)Q(this,ey).get(t)._setVisible(Yv,!1);Z(this,ty,this.getHash())}}isVisible(e){if(0===Q(this,ey).size)return!0;
2if(!e)return nh("Optional content group not defined."),!0;if("OCG"===e.type)return Q(this,ey).has(e.id)?Q(this,ey).get(e.id).visible:(ih("Optional content group not found: ".concat(e.id)),!0);if("OCMD"===e.type){if(e.expression)return te(this,iy,ry).call(this,e.expression);if(!e.policy||"AnyOn"===e.policy){for(const t of e.ids){if(!Q(this,ey).has(t))return ih("Optional content group not found: ".concat(t)),!0;if(Q(this,ey).get(t).visible)return!0}return!1}if("AllOn"===e.policy){for(const t of e.ids){if(!Q(this,ey).has(t))return ih("Optional content group not found: ".concat(t)),!0;if(!Q(this,ey).get(t).visible)return!1}return!0}if("AnyOff"===e.policy){for(const t of e.ids){if(!Q(this,ey).has(t))return ih("Optional content group not found: ".concat(t)),!0;if(!Q(this,ey).get(t).visible)return!0}return!1}if("AllOff"===e.policy){for(const t of e.ids){if(!Q(this,ey).has(t))return ih("Optional content group not found: ".concat(t)),!0;if(Q(this,ey).get(t).visible)return!1}return!0}return ih("Unknown optional content policy ".concat(e.policy,".")),!0}return ih("Unknown group type ".concat(e.type,".")),!0}setVisibility(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=Q(this,ey).get(e);n?(n._setVisible(Yv,!!t,!0),Z(this,Zv,null)):ih("Optional content group not found: ".concat(e))}setOCGState(e){let t,{state:n,preserveRB:i}=e;for(const r of n){switch(r){case"ON":case"OFF":case"Toggle":t=r;continue}const e=Q(this,ey).get(r);if(e)switch(t){case"ON":e._setVisible(Yv,!0);break;case"OFF":e._setVisible(Yv,!1);break;case"Toggle":e._setVisible(Yv,!e.visible)}}Z(this,Zv,null)}get hasInitialVisibility(){return null===Q(this,ty)||this.getHash()===Q(this,ty)}getOrder(){return Q(this,ey).size?Q(this,ny)?Q(this,ny).slice():[...Q(this,ey).keys()]:null}getGroups(){return Q(this,ey).size>0?yh(Q(this,ey)):null}getGroup(e){return Q(this,ey).get(e)||null}getHash(){if(null!==Q(this,Zv))return Q(this,Zv);const e=new Pm;for(const[t,n]of Q(this,ey))e.update("".concat(t,":").concat(n.visible));return Z(this,Zv,e.hexdigest())}}Zv=new WeakMap,ey=new WeakMap,ty=new WeakMap,ny=new WeakMap,iy=new WeakSet,ry=function(e){const t=e.length;if(t<2)return!0;const n=e[0];for(let i=1;i<t;i++){const t=e[i];let r;if(Array.isArray(t))r=te(this,iy,ry).call(this,t);else{if(!Q(this,ey).has(t))return ih("Optional content group not found: ".concat(t)),!0;r=Q(this,ey).get(t).visible}switch(n){case"And":if(!r)return!1;break;case"Or":if(r)return!0;break;case"Not":return!r;default:return!0}}return"And"===n};class oy{constructor(e,t){let{disableRange:n=!1,disableStream:i=!1}=t;sh(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:r,initialData:s,progressiveDone:a,contentDispositionFilename:o}=e;if(this._queuedChunks=[],this._progressiveDone=a,this._contentDispositionFilename=o,(null==s?void 0:s.length)>0){const e=s instanceof Uint8Array&&s.byteLength===s.buffer.byteLength?s.buffer:new Uint8Array(s).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!i,this._isRangeSupported=!n,this._contentLength=r,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener(((e,t)=>{this._onReceiveData({begin:e,chunk:t})})),e.addProgressListener(((e,t)=>{this._onProgress({loaded:e,total:t})})),e.addProgressiveReadListener((e=>{this._onReceiveData({chunk:e})})),e.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),e.transportReady()}_onReceiveData(e){let{begin:t,chunk:n}=e;const i=n instanceof Uint8Array&&n.byteLength===n.buffer.byteLength?n.buffer:new Uint8Array(n).buffer;if(void 0===t)this._fullRequestReader?this._fullRequestReader._enqueue(i):this._queuedChunks.push(i);else{sh(this._rangeReaders.some((function(e){return e._begin===t&&(e._enqueue(i),!0)})),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var e,t;return null!==(e=null==(t=this._fullRequestReader)?void 0:t._loaded)&&void 0!==e?e:0}_onProgress(e){var t,n,i,r;void 0===e.total?null==(n=null==(t=this._rangeReaders[0])?void 0:t.onProgress)||n.call(t,{loaded:e.loaded}):null==(r=null==(i=this._fullRequestReader)?void 0:i.onProgress)||r.call(i,{loaded:e.loaded,total:e.total})}_onProgressiveDone(){var e;null==(e=this._fullRequestReader)||e.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){sh(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new ly(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=new cy(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(n),n}cancelAllRequests(e){var t;null==(t=this._fullRequestReader)||t.cancel(e);for(const n of this._rangeReaders.slice(0))n.cancel(e);this._pdfDataRangeTransport.abort()}}class ly{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this._stream=e,this._done=n||!1,this._filename=Md(i)?i:null,this._queuedChunks=t||[],this._loaded=0;for(const r of this._queuedChunks)this._loaded+=r.byteLength;
2this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class cy{constructor(e,t,n){this._stream=e,this._begin=t,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function uy(e){let{getResponseHeader:t,isHttp:n,rangeChunkSize:i,disableRange:r}=e;const s={allowRangeRequests:!1,suggestedLength:void 0},a=parseInt(t("Content-Length"),10);return!Number.isInteger(a)||(s.suggestedLength=a,a<=2*i)||r||!n||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(s.allowRangeRequests=!0),s}function hy(e){const t=e("Content-Disposition");if(t){let e=function(e){let t=!0,n=i("filename\\*","i").exec(e);if(n){n=n[1];let e=a(n);return e=unescape(e),e=o(e),e=l(e),s(e)}if(n=function(e){const t=[];let n;const r=i("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(n=r.exec(e));){let[,e,i,r]=n;if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[i,r]}const s=[];for(let i=0;i<t.length&&i in t;++i){let[e,n]=t[i];n=a(n),e&&(n=unescape(n),0===i&&(n=o(n))),s.push(n)}return s.join("")}(e),n)return s(l(n));if(n=i("filename","i").exec(e),n){n=n[1];let e=a(n);return e=l(e),s(e)}function i(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function r(e,n){if(e){if(!/^[\x00-\xFF]+$/.test(n))return n;try{const i=new TextDecoder(e,{fatal:!0}),r=vh(n);n=i.decode(r),t=!1}catch{}}return n}function s(e){return t&&/[\x80-\xff]/.test(e)&&(e=r("utf-8",e),t&&(e=r("iso-8859-1",e))),e}function a(e){if(e.startsWith('"')){const t=e.slice(1).split('\\"');for(let e=0;e<t.length;++e){const n=t[e].indexOf('"');-1!==n&&(t[e]=t[e].slice(0,n),t.length=e+1),t[e]=t[e].replaceAll(/\\(.)/g,"$1")}e=t.join('"')}return e}function o(e){const t=e.indexOf("'");return-1===t?e:r(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function l(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,n,i){if("q"===n||"Q"===n)return r(t,i=(i=i.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})));try{i=atob(i)}catch{}return r(t,i)}))}return""}(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch{}if(Md(e))return e}return null}function dy(e,t){return 404===e||0===e&&t.startsWith("file:")?new dh('Missing PDF "'+t+'".'):new fh("Unexpected server response (".concat(e,') while retrieving PDF "').concat(t,'".'),e)}function fy(e){return 200===e||206===e}function py(e,t,n){return{method:"GET",headers:e,signal:n.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function gy(e){const t=new Headers;for(const n in e){const i=e[n];void 0!==i&&t.append(n,i)}return t}function my(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:(ih("getArrayBuffer - unexpected data format: ".concat(e)),new Uint8Array(e).buffer)}class vy{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e,t;return null!==(e=null==(t=this._fullRequestReader)?void 0:t._loaded)&&void 0!==e?e:0}getFullReader(){return sh(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new yy(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=new by(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){var t;null==(t=this._fullRequestReader)||t.cancel(e);for(const n of this._rangeRequestReaders.slice(0))n.cancel(e)}}class yy{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=gy(this._stream.httpHeaders);const n=t.url;fetch(n,py(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!fy(e.status))throw dy(e.status,n);this._reader=e.body.getReader(),this._headersCapability.resolve();const t=t=>e.headers.get(t),{allowRangeRequests:i,suggestedLength:r}=uy({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=r||this._contentLength,this._filename=hy(t),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new gh("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e;await this._headersCapability.promise;const{value:t,done:n}=await this._reader.read();return n?{value:t,done:n}:(this._loaded+=t.byteLength,null==(e=this.onProgress)||e.call(this,{loaded:this._loaded,total:this._contentLength}),{value:my(t),done:!1})}cancel(e){var t;null==(t=this._reader)||t.cancel(e),this._abortController.abort()}}class by{constructor(e,t,n){this._stream=e,this._reader=null,this._loaded=0;const i=e.source;this._withCredentials=i.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!i.disableStream,this._abortController=new AbortController,this._headers=gy(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(t,"-").concat(n-1));const r=i.url;fetch(r,py(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!fy(e.status))throw dy(e.status,r);this._readCapability.resolve(),this._reader=e.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e;await this._readCapability.promise;const{value:t,done:n}=await this._reader.read();return n?{value:t,done:n}:(this._loaded+=t.byteLength,null==(e=this.onProgress)||e.call(this,{loaded:this._loaded}),{value:my(t),done:!1})}cancel(e){var t;null==(t=this._reader)||t.cancel(e),this._abortController.abort()}}class wy{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,n){const i={begin:e,end:t};for(const r in n)i[r]=n[r];return this.request(i)}requestFull(e){return this.request(e)}request(e){const t=new XMLHttpRequest,n=this.currXhrId++,i=this.pendingRequests[n]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const r in this.httpHeaders){const e=this.httpHeaders[r];void 0!==e&&t.setRequestHeader(r,e)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range","bytes=".concat(e.begin,"-").concat(e.end-1)),i.expectedStatus=206):i.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(n){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,n),t.onprogress=this.onProgress.bind(this,n),i.onHeadersReceived=e.onHeadersReceived,i.onDone=e.onDone,i.onError=e.onError,i.onProgress=e.onProgress,t.send(null),n}onProgress(e,t){var n;const i=this.pendingRequests[e];i&&(null==(n=i.onProgress)||n.call(i,t))}onStateChange(e,t){var n,i,r;const s=this.pendingRequests[e];if(!s)return;const a=s.xhr;if(a.readyState>=2&&s.onHeadersReceived&&(s.onHeadersReceived(),delete s.onHeadersReceived),4!==a.readyState||!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],0===a.status&&this.isHttp)return void(null==(n=s.onError)||n.call(s,a.status));const o=a.status||200;if((200!==o||206!==s.expectedStatus)&&o!==s.expectedStatus)return void(null==(i=s.onError)||i.call(s,a.status));const l=function(e){const t=e.response;return"string"!=typeof t?t:vh(t).buffer}(a);if(206===o){const e=a.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);s.onDone({begin:parseInt(t[1],10),chunk:l})}else l?s.onDone({begin:0,chunk:l}):null==(r=s.onError)||r.call(s,a.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}
2abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}class ky{constructor(e){this._source=e,this._manager=new wy(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return sh(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new xy(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const n=new Sy(this._manager,e,t);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}cancelAllRequests(e){var t;null==(t=this._fullRequestReader)||t.cancel(e);for(const n of this._rangeRequestReaders.slice(0))n.cancel(e)}}class xy{constructor(e,t){this._manager=e;const n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(n),this._headersReceivedCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e),n=e=>t.getResponseHeader(e),{allowRangeRequests:i,suggestedLength:r}=uy({getResponseHeader:n,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});i&&(this._isRangeSupported=!0),this._contentLength=r||this._contentLength,this._filename=hy(n),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=dy(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){var t;null==(t=this.onProgress)||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class Sy{constructor(e,t,n){this._manager=e;const i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,n,i),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var e;null==(e=this.onClosed)||e.call(this,this)}_onDone(e){const t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=dy(e,this._url);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){var t;this.isStreamingSupported||null==(t=this.onProgress)||t.call(this,{loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest
2(this._requestId),this._close()}}const _y=/^file:\/\/\/[a-zA-Z]:\//;class Ay{constructor(e){this.source=e,this.url=function(e){const t=Hm.get("url"),n=t.parse(e);return"file:"===n.protocol||n.host?n:/^[a-z]:[/\\]/i.test(e)?t.parse("file:///".concat(e)):(n.host||(n.protocol="file:"),n)}(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e,t;return null!==(e=null==(t=this._fullRequestReader)?void 0:t._loaded)&&void 0!==e?e:0}getFullReader(){return sh(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new Ry(this):new Py(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=this.isFsUrl?new Ly(this,e,t):new Ty(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){var t;null==(t=this._fullRequestReader)||t.cancel(e);for(const n of this._rangeRequestReaders.slice(0))n.cancel(e)}}class Ey{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return null===t?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,null==(e=this.onProgress)||e.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new gh("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class Cy{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return null===t?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,null==(e=this.onProgress)||e.call(this,{loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}function My(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class Py extends Ey{constructor(e){super(e);const t=t=>
2{if(404===t.statusCode){const e=new dh('Missing PDF "'.concat(this._url,'".'));return this._storedError=e,void this._headersCapability.reject(e)}this._headersCapability.resolve(),this._setReadableStream(t);const n=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:i,suggestedLength:r}=uy({getResponseHeader:n,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=r||this._contentLength,this._filename=hy(n)};if(this._request=null,"http:"===this._url.protocol){const n=Hm.get("http");this._request=n.request(My(this._url,e.httpHeaders),t)}else{const n=Hm.get("https");this._request=n.request(My(this._url,e.httpHeaders),t)}this._request.on("error",(e=>{this._storedError=e,this._headersCapability.reject(e)})),this._request.end()}}class Ty extends Cy{constructor(e,t,n){super(e),this._httpHeaders={};for(const r in e.httpHeaders){const t=e.httpHeaders[r];void 0!==t&&(this._httpHeaders[r]=t)}this._httpHeaders.Range="bytes=".concat(t,"-").concat(n-1);const i=e=>{if(404!==e.statusCode)this._setReadableStream(e);else{const e=new dh('Missing PDF "'.concat(this._url,'".'));this._storedError=e}};if(this._request=null,"http:"===this._url.protocol){const e=Hm.get("http");this._request=e.request(My(this._url,this._httpHeaders),i)}else{const e=Hm.get("https");this._request=e.request(My(this._url,this._httpHeaders),i)}this._request.on("error",(e=>{this._storedError=e})),this._request.end()}}class Ry extends Ey{constructor(e){super(e);let t=decodeURIComponent(this._url.path);_y.test(this._url.href)&&(t=t.replace(/^\//,""));const n=Hm.get("fs");n.promises.lstat(t).then((e=>{this._contentLength=e.size,this._setReadableStream(n.createReadStream(t)),this._headersCapability.resolve()}),(e=>{"ENOENT"===e.code&&(e=new dh('Missing PDF "'.concat(t,'".'))),this._storedError=e,this._headersCapability.reject(e)}))}}class Ly extends Cy{constructor(e,t,n){super(e);let i=decodeURIComponent(this._url.path);_y.test(this._url.href)&&(i=i.replace(/^\//,""));const r=Hm.get("fs");this._setReadableStream(r.createReadStream(i,{start:t,end:n-1}))}}const Iy=30;var Dy,Ny,Fy,Oy,Wy,jy,By,zy,Uy,Hy,Vy,qy,Gy,Xy,Yy,Ky,$y,Qy,Jy,Zy,eb,tb,nb,ib,rb,sb,ab,ob,lb,cb,ub,hb,db;let fb=(Zy=class{constructor(e){let{textContentSource:t,container:n,viewport:i}=e;if(J(this,ib),J(this,sb),J(this,ob),J(this,Ny,Promise.withResolvers()),J(this,Fy,null),J(this,Oy,!1),J(this,Wy,!(null==(Dy=globalThis.FontInspector)||!Dy.enabled)),J(this,jy,null),J(this,By,null),J(this,zy,0),J(this,Uy,0),J(this,Hy,null),J(this,Vy,null),J(this,qy,0),J(this,Gy,0),J(this,Xy,Object.create(null)),J(this,Yy,[]),J(this,Ky,null),J(this,$y,[]),J(this,Qy,new WeakMap),J(this,Jy,null),t instanceof ReadableStream)Z(this,Ky,t);else{if("object"!=typeof t)throw new Error('No "textContentSource" parameter specified.');Z(this,Ky,new ReadableStream({start(e){e.enqueue(t),e.close()}}))}Z(this,Fy,Z(this,Vy,n)),Z(this,Gy,i.scale*(globalThis.devicePixelRatio||1)),Z(this,qy,i.rotation),Z(this,By,{prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:null});const{pageWidth:r,pageHeight:s,pageX:a,pageY:o}=i.rawDims;Z(this,Jy,[1,0,0,-1,-a,o+s]),Z(this,Uy,r),Z(this,zy,s),zd(n,i),Q(this,Ny).promise.catch((()=>{})).then((()=>{Q(Zy,nb).delete(this),Z(this,By,null),Z(this,Xy,null)}))}render(){const e=()=>{Q(this,Hy).read().then((t=>{var n;let{value:i,done:r}=t;r?Q(this,Ny).resolve():(null!==(n=Q(this,jy))&&void 0!==n||Z(this,jy,i.lang),Object.assign(Q(this,Xy),i.styles),te(this,ib,rb).call(this,i.items),e())}),Q(this,Ny).reject)};return Z(this,Hy,Q(this,Ky).getReader()),Q(Zy,nb).add(this),e(),Q(this,Ny).promise}update(e){let{viewport:t,onBefore:n=null}=e;var i;const r=t.scale*(globalThis.devicePixelRatio||1),s=t.rotation;if(s!==Q(this,qy)&&(null==n||n(),Z(this,qy,s),zd(Q(this,Vy),{rotation:s})),r!==Q(this,Gy)){null==n||n(),Z(this,Gy,r);const e={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:te(i=Zy,cb,ub).call(i,Q(this,jy))};for(const t of Q(this,$y))e.properties=Q(this,Qy).get(t),e.div=t,te(this,ob,lb).call(this,e)}}cancel(){var e;const t=new gh("TextLayer task cancelled.");null==(e=Q(this,Hy))||e.cancel(t).catch((()=>{})),Z(this,Hy,null),Q(this,Ny).reject(t)}get textDivs(){return Q(this,$y)}get textContentItemsStr(){return Q(this,Yy)}static cleanup(){if(!(Q(this,nb).size>
20)){Q(this,eb).clear();for(const{canvas:e}of Q(this,tb).values())e.remove();Q(this,tb).clear()}}},Ny=new WeakMap,Fy=new WeakMap,Oy=new WeakMap,Wy=new WeakMap,jy=new WeakMap,By=new WeakMap,zy=new WeakMap,Uy=new WeakMap,Hy=new WeakMap,Vy=new WeakMap,qy=new WeakMap,Gy=new WeakMap,Xy=new WeakMap,Yy=new WeakMap,Ky=new WeakMap,$y=new WeakMap,Qy=new WeakMap,Jy=new WeakMap,eb=new WeakMap,tb=new WeakMap,nb=new WeakMap,ib=new WeakSet,rb=function(e){var t,n;if(Q(this,Oy))return;(n=Q(this,By)).ctx||(n.ctx=te(t=Zy,cb,ub).call(t,Q(this,jy)));const i=Q(this,$y),r=Q(this,Yy);for(const s of e){if(i.length>1e5)return ih("Ignoring additional textDivs for performance reasons."),void Z(this,Oy,!0);if(void 0!==s.str)r.push(s.str),te(this,sb,ab).call(this,s);else if("beginMarkedContentProps"===s.type||"beginMarkedContent"===s.type){const e=Q(this,Fy);Z(this,Fy,document.createElement("span")),Q(this,Fy).classList.add("markedContent"),null!==s.id&&Q(this,Fy).setAttribute("id","".concat(s.id)),e.append(Q(this,Fy))}else"endMarkedContent"===s.type&&Z(this,Fy,Q(this,Fy).parentNode)}},sb=new WeakSet,ab=function(e){var t;const n=document.createElement("span"),i={angle:0,canvasWidth:0,hasText:""!==e.str,hasEOL:e.hasEOL,fontSize:0};Q(this,$y).push(n);const r=Ah.transform(Q(this,Jy),e.transform);let s=Math.atan2(r[1],r[0]);const a=Q(this,Xy)[e.fontName];a.vertical&&(s+=Math.PI/2);const o=Q(this,Wy)&&a.fontSubstitution||a.fontFamily,l=Math.hypot(r[2],r[3]),c=l*te(t=Zy,hb,db).call(t,o,Q(this,jy));let u,h;0===s?(u=r[4],h=r[5]-c):(u=r[4]+c*Math.sin(s),h=r[5]-c*Math.cos(s));const d="calc(var(--scale-factor)*",f=n.style;Q(this,Fy)===Q(this,Vy)?(f.left="".concat((100*u/Q(this,Uy)).toFixed(2),"%"),f.top="".concat((100*h/Q(this,zy)).toFixed(2),"%")):(f.left="".concat(d).concat(u.toFixed(2),"px)"),f.top="".concat(d).concat(h.toFixed(2),"px)")),f.fontSize="".concat(d).concat(l.toFixed(2),"px)"),f.fontFamily=o,i.fontSize=l,n.setAttribute("role","presentation"),n.textContent=e.str,n.dir=e.dir,Q(this,Wy)&&(n.dataset.fontName=a.fontSubstitutionLoadedName||e.fontName),0!==s&&(i.angle=s*(180/Math.PI));let p=!1;if(e.str.length>1)p=!0;else if(" "!==e.str&&e.transform[0]!==e.transform[3]){const t=Math.abs(e.transform[0]),n=Math.abs(e.transform[3]);t!==n&&Math.max(t,n)/Math.min(t,n)>1.5&&(p=!0)}if(p&&(i.canvasWidth=a.vertical?e.height:e.width),Q(this,Qy).set(n,i),Q(this,By).div=n,Q(this,By).properties=i,te(this,ob,lb).call(this,Q(this,By)),i.hasText&&Q(this,Fy).append(n),i.hasEOL){const e=document.createElement("br");e.setAttribute("role","presentation"),Q(this,Fy).append(e)}},ob=new WeakSet,lb=function(e){const{div:t,properties:n,ctx:i,prevFontSize:r,prevFontFamily:s}=e,{style:a}=t;let o="";if(0!==n.canvasWidth&&n.hasText){const{fontFamily:l}=a,{canvasWidth:c,fontSize:u}=n;(r!==u||s!==l)&&(i.font="".concat(u*Q(this,Gy),"px ").concat(l),e.prevFontSize=u,e.prevFontFamily=l);const{width:h}=i.measureText(t.textContent);h>0&&(o="scaleX(".concat(c*Q(this,Gy)/h,")"))}0!==n.angle&&(o="rotate(".concat(n.angle,"deg) ").concat(o)),o.length>0&&(a.transform=o)},cb=new WeakSet,ub=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=Q(this,tb).get(e||(e=""));if(!t){const n=document.createElement("canvas");n.className="hiddenCanvasElement",n.lang=e,document.body.append(n),t=n.getContext("2d",{alpha:!1}),Q(this,tb).set(e,t)}return t},hb=new WeakSet,db=function(e,t){const n=Q(this,eb).get(e);if(n)return n;const i=te(this,cb,ub).call(this,t),r=i.font;i.canvas.width=i.canvas.height=Iy,i.font="".concat(Iy,"px ").concat(e);const s=i.measureText("");let a=s.fontBoundingBoxAscent,o=Math.abs(s.fontBoundingBoxDescent);if(a){const t=a/(a+o);return Q(this,eb).set(e,t),i.canvas.width=i.canvas.height=0,i.font=r,t}i.strokeStyle="red",i.clearRect(0,0,Iy,Iy),i.strokeText("g",0,0);let l=i.getImageData(0,0,Iy,Iy).data;o=0;for(let u=l.length-1-3;u>=0;u-=4)if(l[u]>0){o=Math.ceil(u/4/Iy);break}i.clearRect(0,0,Iy,Iy),i.strokeText("A",0,Iy),l=i.getImageData(0,0,Iy,Iy).data,a=0;for(let u=0,h=l.length;u<h;u+=4)if(l[u]>0){a=Iy-Math.floor(u/4/Iy);break}i.canvas.width=i.canvas.height=0,i.font=r;const c=a?a/(a+o):.8;return Q(this,eb).set(e,c),c},J(Zy,cb),J(Zy,hb),J(Zy,eb,new Map),J(Zy,tb,new Map),J(Zy,nb,new Set),Zy);function pb(){Dd("`renderTextLayer`, please use `TextLayer` instead.");const{textContentSource:e,container:t,viewport:n,...i}=arguments[0],r=Object.keys(i);r.length>0&&ih("Ignoring `renderTextLayer` parameters: "+r.join(", "));const s=new fb({textContentSource:e,container:t,viewport:n}),{textDivs:a,textContentItemsStr:o}=s;return{promise:s.render(),textDivs:a,textContentItemsStr:o}}function gb(){Dd("`updateTextLayer`, please use `TextLayer` instead.")}class mb{static textContent(e){const t=[],n={items:t,styles:Object.create(null)};return function e(n){var i;if(!n)return;let r=null;const s=n.name;if("#text"===s)r=n.value;else{if(!mb.shouldBuildText(s))return;null!=(i=null==n?void 0:n.attributes)&&i.textContent?r=n.attributes.textContent:n.value&&(r=n.value)}if(null!==r&&t.push({str:r}),n.children)for(const t of n.children)e(t)}(e),n}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}const vb=65536,yb=su?class extends Bh{_createCanvas(e,t){return Hm.get("
2canvas").createCanvas(e,t)}}:class extends Bh{constructor(){let{ownerDocument:e=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._document=e}_createCanvas(e,t){const n=this._document.createElement("canvas");return n.width=e,n.height=t,n}},bb=su?class extends zh{_fetchData(e,t){return Vm(e).then((e=>({cMapData:e,compressionType:t})))}}:xd,wb=su?class extends jh{}:class extends jh{constructor(){let{docId:e,ownerDocument:t=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),J(this,Zh),J(this,td),J(this,id),J(this,sd),J(this,od),J(this,cd),J(this,hd),J(this,fd),J(this,gd),J(this,vd),J(this,bd),J(this,Xh,void 0),J(this,Yh,void 0),J(this,Kh,void 0),J(this,$h,void 0),J(this,Qh,void 0),J(this,Jh,0),Z(this,Kh,e),Z(this,$h,t)}addFilter(e){if(!e)return"none";let t=Q(this,Zh,ed).get(e);if(t)return t;const[n,i,r]=te(this,sd,ad).call(this,e),s=1===e.length?n:"".concat(n).concat(i).concat(r);if(t=Q(this,Zh,ed).get(s),t)return Q(this,Zh,ed).set(e,t),t;const a="g_".concat(Q(this,Kh),"_transfer_map_").concat(ee(this,Jh)._++),o="url(#".concat(a,")");Q(this,Zh,ed).set(e,o),Q(this,Zh,ed).set(s,o);const l=te(this,hd,dd).call(this,a);return te(this,gd,md).call(this,n,i,r,l),o}addHCMFilter(e,t){var n;const i="".concat(e,"-").concat(t),r="base";let s=Q(this,td,nd).get(r);if((null==s?void 0:s.key)===i||(s?(null==(n=s.filter)||n.remove(),s.key=i,s.url="none",s.filter=null):(s={key:i,url:"none",filter:null},Q(this,td,nd).set(r,s)),!e||!t))return s.url;const a=te(this,bd,wd).call(this,e);e=Ah.makeHexColor(...a);const o=te(this,bd,wd).call(this,t);if(t=Ah.makeHexColor(...o),Q(this,id,rd).style.color="","#000000"===e&&"#ffffff"===t||e===t)return s.url;const l=new Array(256);for(let f=0;f<=255;f++){const e=f/255;l[f]=e<=.03928?e/12.92:((e+.055)/1.055)**2.4}const c=l.join(","),u="g_".concat(Q(this,Kh),"_hcm_filter"),h=s.filter=te(this,hd,dd).call(this,u);te(this,gd,md).call(this,c,c,c,h),te(this,cd,ud).call(this,h);const d=(e,t)=>{const n=a[e]/255,i=o[e]/255,r=new Array(t+1);for(let s=0;s<=t;s++)r[s]=n+s/t*(i-n);return r.join(",")};return te(this,gd,md).call(this,d(0,5),d(1,5),d(2,5),h),s.url="url(#".concat(u,")"),s.url}addAlphaFilter(e){let t=Q(this,Zh,ed).get(e);if(t)return t;const[n]=te(this,sd,ad).call(this,[e]),i="alpha_".concat(n);if(t=Q(this,Zh,ed).get(i),t)return Q(this,Zh,ed).set(e,t),t;const r="g_".concat(Q(this,Kh),"_alpha_map_").concat(ee(this,Jh)._++),s="url(#".concat(r,")");Q(this,Zh,ed).set(e,s),Q(this,Zh,ed).set(i,s);const a=te(this,hd,dd).call(this,r);return te(this,vd,yd).call(this,n,a),s}addLuminosityFilter(e){let t,n,i=Q(this,Zh,ed).get(e||"luminosity");if(i)return i;if(e?([t]=te(this,sd,ad).call(this,[e]),n="luminosity_".concat(t)):n="luminosity",i=Q(this,Zh,ed).get(n),i)return Q(this,Zh,ed).set(e,i),i;const r="g_".concat(Q(this,Kh),"_luminosity_map_").concat(ee(this,Jh)._++),s="url(#".concat(r,")");Q(this,Zh,ed).set(e,s),Q(this,Zh,ed).set(n,s);const a=te(this,hd,dd).call(this,r);return te(this,od,ld).call(this,a),e&&te(this,vd,yd).call(this,t,a),s}addHighlightHCMFilter(e,t,n,i,r){var s;const a="".concat(t,"-").concat(n,"-").concat(i,"-").concat(r);let o=Q(this,td,nd).get(e);if((null==o?void 0:o.key)===a||(o?(null==(s=o.filter)||s.remove(),o.key=a,o.url="none",o.filter=null):(o={key:a,url:"none",filter:null},Q(this,td,nd).set(e,o)),!t||!n))return o.url;const[l,c]=[t,n].map(te(this,bd,wd).bind(this));let u=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),h=Math.round(.2126*c[0]+.7152*c[1]+.0722*c[2]),[d,f]=[i,r].map(te(this,bd,wd).bind(this));h<u&&([u,h,d,f]=[h,u,f,d]),Q(this,id,rd).style.color="";const p=(e,t,n)=>{const i=new Array(256),r=(h-u)/n,s=e/255,a=(t-e)/(255*n);let o=0;for(let l=0;l<=n;l++){const e=Math.round(u+l*r),t=s+l*a;for(let n=o;n<=e;n++)i[n]=t;o=e+1}for(let l=o;l<256;l++)i[l]=i[o-1];return i.join(",")},g="g_".concat(Q(this,Kh),"_hcm_").concat(e,"_filter"),m=o.filter=te(this,hd,dd).call(this,g);return te(this,cd,ud).call(this,m),te(this,gd,md).call(this,p(d[0],f[0],5),p(d[1],f[1],5),p(d[2],f[2],5),m),o.url="url(#".concat(g,")"),o.url}destroy(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&0!==Q(this,td,nd).size||(Q(this,Yh)&&(Q(this,Yh).parentNode.parentNode.remove(),Z(this,Yh,null)),Q(this,Xh)&&(Q(this,Xh).clear(),Z(this,Xh,null)),Z(this,Jh,0))}},kb=su?class extends Uh{_fetchData(e){return Vm(e)}}:Sd;function xb(e){var t,n;if("string"==typeof e||e instanceof URL?e={url:e}:(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(e={data:e}),"object"!=typeof e)throw new Error("Invalid parameter in getDocument, need parameter object.");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const i=new Eb,{docId:r}=i,s=e.url?function(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch{if(su&&"string"==typeof e)return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(e.url):null,a=e.data?function(e){if(su&&typeof jc<"u"&&e instanceof jc)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if("string"==typeof e)return vh(e);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)||"object"==typeof e&&!isNaN(null==e?void 0:e.length))return new Uint8Array(e);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(e.data):null,o=e.httpHeaders||null,l=!0===e.withCredentials,c=null!==(t=e.password)&&void 0!==t?t:null,u=e.range instanceof Cb?e.range:null,h=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:vb;let d=e.worker instanceof Vb?e.worker:null;
2const f=e.verbosity,p="string"!=typeof e.docBaseUrl||Cd(e.docBaseUrl)?null:e.docBaseUrl,g="string"==typeof e.cMapUrl?e.cMapUrl:null,m=!1!==e.cMapPacked,v=e.CMapReaderFactory||bb,y="string"==typeof e.standardFontDataUrl?e.standardFontDataUrl:null,b=e.StandardFontDataFactory||kb,w=!0!==e.stopAtErrors,k=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,x=!1!==e.isEvalSupported,S="boolean"==typeof e.isOffscreenCanvasSupported?e.isOffscreenCanvasSupported:!su,_=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,A="boolean"==typeof e.disableFontFace?e.disableFontFace:su,E=!0===e.fontExtraProperties,C=!0===e.enableXfa,M=e.ownerDocument||globalThis.document,P=!0===e.disableRange,T=!0===e.disableStream,R=!0===e.disableAutoFetch,L=!0===e.pdfBug,I=u?u.length:null!==(n=e.length)&&void 0!==n?n:NaN,D="boolean"==typeof e.useSystemFonts?e.useSystemFonts:!su&&!A,N="boolean"==typeof e.useWorkerFetch?e.useWorkerFetch:v===xd&&b===Sd&&g&&y&&Ld(g,document.baseURI)&&Ld(y,document.baseURI),F=e.canvasFactory||new yb({ownerDocument:M}),O=e.filterFactory||new wb({docId:r,ownerDocument:M});!function(e){Number.isInteger(e)&&(eh=e)}(f);const W={canvasFactory:F,filterFactory:O};if(N||(W.cMapReaderFactory=new v({baseUrl:g,isCompressed:m}),W.standardFontDataFactory=new b({baseUrl:y})),!d){const e={verbosity:f,port:Ev.workerPort};d=e.port?Vb.fromPort(e):new Vb(e),i._worker=d}const j={docId:r,apiVersion:"4.3.136",data:a,password:c,disableAutoFetch:R,rangeChunkSize:h,length:I,docBaseUrl:p,enableXfa:C,evaluatorOptions:{maxImageSize:k,disableFontFace:A,ignoreErrors:w,isEvalSupported:x,isOffscreenCanvasSupported:S,canvasMaxAreaInBytes:_,fontExtraProperties:E,useSystemFonts:D,cMapUrl:N?g:null,standardFontDataUrl:N?y:null}},B={disableFontFace:A,fontExtraProperties:E,ownerDocument:M,pdfBug:L,styleElement:null,loadingParams:{disableAutoFetch:R,enableXfa:C}};return d.promise.then((function(){if(i.destroyed)throw new Error("Loading aborted");if(d.destroyed)throw new Error("Worker was destroyed");const e=d.messageHandler.sendWithPromise("GetDocRequest",j,a?[a.buffer]:null);let t;return u?t=new oy(u,{disableRange:P,disableStream:T}):a||(n={url:s,length:I,httpHeaders:o,withCredentials:l,rangeChunkSize:h,disableRange:P,disableStream:T},t=su?typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype&&Ld(n.url)?new vy(n):new Ay(n):Ld(n.url)?new vy(n):new ky(n)),e.then((e=>{if(i.destroyed)throw new Error("Loading aborted");if(d.destroyed)throw new Error("Worker was destroyed");const n=new Gv(r,e,d.port),s=new Jb(n,i,t,B,W);i._transport=s,n.send("Ready",null)}));var n})).catch(i._capability.reject),i}function Sb(e){return"object"==typeof e&&Number.isInteger(null==e?void 0:e.num)&&e.num>=0&&Number.isInteger(null==e?void 0:e.gen)&&e.gen>=0}var _b;const Ab=class e{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId="d".concat(ee(e,_b)._++),this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var e,t,n;this.destroyed=!0;try{null!=(e=this._worker)&&e.port&&(this._worker._pendingDestroy=!0),await(null==(t=this._transport)?void 0:t.destroy())}catch(i){throw null!=(n=this._worker)&&n.port&&delete this._worker._pendingDestroy,i}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};_b=new WeakMap,J(Ab,_b,0);let Eb=Ab,Cb=class{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.length=e,this.initialData=t,this.progressiveDone=n,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const n of this._rangeListeners)n(e,t)}onDataProgress(e,t){this._readyCapability.promise.then((()=>{for(const n of this._progressListeners)n(e,t)}))}onDataProgressiveRead(e){this._readyCapability.promise.then((()=>{for(const t of this._progressiveReadListeners)t(e)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const e of this._progressiveDoneListeners)e()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){rh("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}};class Mb{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return oh(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}
2getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){let{intent:e="display"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}var Pb,Tb,Rb,Lb,Ib,Db,Nb,Fb;class Ob{constructor(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];J(this,Rb),J(this,Ib),J(this,Pb,null),J(this,Tb,!1),this._pageIndex=e,this._pageInfo=t,this._transport=n,this._stats=i?new Rd:null,this._pdfBug=i,this.commonObjs=n.commonObjs,this.objs=new sw,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport(){let{scale:e,rotation:t=this.rotate,offsetX:n=0,offsetY:i=0,dontFlip:r=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ad({viewBox:this.view,scale:e,rotation:t,offsetX:n,offsetY:i,dontFlip:r})}getAnnotations(){let{intent:e="display"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return oh(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var e;return(null==(e=this._transport._htmlForXfa)?void 0:e.children[this._pageIndex])||null}render(e){let{canvasContext:t,viewport:n,intent:i="display",annotationMode:r=mu.ENABLE,transform:s=null,background:a=null,optionalContentConfigPromise:o=null,annotationCanvasMap:l=null,pageColors:c=null,printAnnotationStorage:u=null}=e;var h,d;null==(h=this._stats)||h.time("Overall");const f=this._transport.getRenderingIntent(i,r,u),{renderingIntent:p,cacheKey:g}=f;Z(this,Tb,!1),te(this,Ib,Db).call(this),o||(o=this._transport.getOptionalContentConfig(p));let m=this._intentStates.get(g);m||(m=Object.create(null),this._intentStates.set(g,m)),m.streamReaderCancelTimeout&&(clearTimeout(m.streamReaderCancelTimeout),m.streamReaderCancelTimeout=null);const v=!!(p&hu);m.displayReadyCapability||(m.displayReadyCapability=Promise.withResolvers(),m.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null==(d=this._stats)||d.time("Page Request"),this._pumpOperatorList(f));const y=e=>{var t;m.renderTasks.delete(b),(this._maybeCleanupAfterRender||v)&&Z(this,Tb,!0),te(this,Rb,Lb).call(this,!v),e?(b.capability.reject(e),this._abortOperatorList({intentState:m,reason:e instanceof Error?e:new Error(e)})):b.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),null!=(t=globalThis.Stats)&&t.enabled&&globalThis.Stats.add(this.pageNumber,this._stats)
2)},b=new lw({callback:y,params:{canvasContext:t,viewport:n,transform:s,background:a},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:m.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!v,pdfBug:this._pdfBug,pageColors:c});(m.renderTasks||(m.renderTasks=new Set)).add(b);const w=b.task;return Promise.all([m.displayReadyCapability.promise,o]).then((e=>{let[t,n]=e;var i;if(this.destroyed)y();else{if(null==(i=this._stats)||i.time("Rendering"),!(n.renderingIntent&p))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");b.initializeGraphics({transparency:t,optionalContentConfig:n}),b.operatorListChanged()}})).catch(y),w}getOperatorList(){let{intent:e="display",annotationMode:t=mu.ENABLE,printAnnotationStorage:n=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var i;const r=this._transport.getRenderingIntent(e,t,n,!0);let s,a=this._intentStates.get(r.cacheKey);return a||(a=Object.create(null),this._intentStates.set(r.cacheKey,a)),a.opListReadCapability||(s=Object.create(null),s.operatorListChanged=function(){a.operatorList.lastChunk&&(a.opListReadCapability.resolve(a.operatorList),a.renderTasks.delete(s))},a.opListReadCapability=Promise.withResolvers(),(a.renderTasks||(a.renderTasks=new Set)).add(s),a.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null==(i=this._stats)||i.time("Page Request"),this._pumpOperatorList(r)),a.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:e=!1,disableNormalization:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===e,disableNormalization:!0===t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((e=>mb.textContent(e)));const t=this.streamTextContent(e);return new Promise((function(e,n){const i=t.getReader(),r={items:[],styles:Object.create(null),lang:null};!function t(){i.read().then((function(n){var i;let{value:s,done:a}=n;a?e(r):(null!==(i=r.lang)&&void 0!==i||(r.lang=s.lang),Object.assign(r.styles,s.styles),r.items.push(...s.items),t())}),n)}()}))}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const n of t.renderTasks)e.push(n.completed),n.cancel();return this.objs.clear(),Z(this,Tb,!1),te(this,Ib,Db).call(this),Promise.all(e)}cleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Z(this,Tb,!0);const t=te(this,Rb,Lb).call(this,!1);return e&&t&&this._stats&&(this._stats=new Rd),t}_startRenderPage(e,t){var n,i;const r=this._intentStates.get(t);r&&(null==(n=this._stats)||n.timeEnd("Page Request"),null==(i=r.displayReadyCapability)||i.resolve(e))}_renderPageChunk(e,t){for(let n=0,i=e.length;n<i;n++)t.operatorList.fnArray.push(e.fnArray[n]),t.operatorList.argsArray.push(e.argsArray[n]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const n of t.renderTasks)n.operatorListChanged();e.lastChunk&&te(this,Rb,Lb).call(this,!0)}_pumpOperatorList(e){let{renderingIntent:t,cacheKey:n,annotationStorageSerializable:i}=e;const{map:r,transfer:s}=i,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:t,cacheKey:n,annotationStorage:r},s).getReader(),o=this._intentStates.get(n);o.streamReader=a;const l=()=>{a.read().then((e=>{let{value:t,done:n}=e;n?o.streamReader=null:this._transport.destroyed||(this._renderPageChunk(t,o),l())}),(e=>{if(o.streamReader=null,!this._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;for(const e of o.renderTasks)e.operatorListChanged();
2te(this,Rb,Lb).call(this,!0)}if(o.displayReadyCapability)o.displayReadyCapability.reject(e);else{if(!o.opListReadCapability)throw e;o.opListReadCapability.reject(e)}}}))};l()}_abortOperatorList(e){let{intentState:t,reason:n,force:i=!1}=e;if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!i){if(t.renderTasks.size>0)return;if(n instanceof Ed){let e=100;return n.extraDelay>0&&n.extraDelay<1e3&&(e+=n.extraDelay),void(t.streamReaderCancelTimeout=setTimeout((()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:n,force:!0})}),e))}}if(t.streamReader.cancel(new gh(n.message)).catch((()=>{})),t.streamReader=null,!this._transport.destroyed){for(const[e,n]of this._intentStates)if(n===t){this._intentStates.delete(e);break}this.cleanup()}}}get stats(){return this._stats}}Pb=new WeakMap,Tb=new WeakMap,Rb=new WeakSet,Lb=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(te(this,Ib,Db).call(this),!Q(this,Tb)||this.destroyed)return!1;if(e)return Z(this,Pb,setTimeout((()=>{Z(this,Pb,null),te(this,Rb,Lb).call(this,!1)}),5e3)),!1;for(const{renderTasks:t,operatorList:n}of this._intentStates.values())if(t.size>0||!n.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),Z(this,Tb,!1),!0},Ib=new WeakSet,Db=function(){Q(this,Pb)&&(clearTimeout(Q(this,Pb)),Z(this,Pb,null))};class Wb{constructor(){J(this,Nb,new Set),J(this,Fb,Promise.resolve())}postMessage(e,t){const n={data:structuredClone(e,t?{transfer:t}:null)};Q(this,Fb).then((()=>{for(const e of Q(this,Nb))e.call(this,n)}))}addEventListener(e,t){Q(this,Nb).add(t)}removeEventListener(e,t){Q(this,Nb).delete(t)}terminate(){Q(this,Nb).clear()}}Nb=new WeakMap,Fb=new WeakMap;const jb={isWorkerDisabled:!1,fakeWorkerId:0};var Bb,zb,Ub;su&&(jb.isWorkerDisabled=!0,Ev.workerSrc||(Ev.workerSrc="./pdf.worker.mjs")),jb.isSameOrigin=function(e,t){let n;try{if(n=new URL(e),!n.origin||"null"===n.origin)return!1}catch{return!1}const i=new URL(t,n);return n.origin===i.origin},jb.createCDNWrapper=function(e){const t='await import("'.concat(e,'");');return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};const Hb=class e{constructor(){let{name:t=null,port:n=null,verbosity:i=th()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r;if(this.name=t,this.destroyed=!1,this.verbosity=i,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,n){if(null!=(r=Q(e,Bb))&&r.has(n))throw new Error("Cannot use more than one PDFWorker per port.");return(Q(e,Bb)||Z(e,Bb,new WeakMap)).set(n,this),void this._initializeFromPort(n)}this._initialize()}get promise(){return su?Promise.all([Hm.promise,this._readyCapability.promise]):this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new Gv("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!jb.isWorkerDisabled&&!Q(e,zb,Ub)){let{workerSrc:t}=e;try{jb.isSameOrigin(window.location.href,t)||(t=jb.createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t,{type:"module"}),n=new Gv("main","worker",e),i=()=>{e.removeEventListener("error",r),n.destroy(),e.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},r=()=>{this._webWorker||i()};e.addEventListener("error",r),n.on("test",(t=>{e.removeEventListener("error",r),this.destroyed?i():t?(this._messageHandler=n,this._port=e,this._webWorker=e,this._readyCapability.resolve(),n.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),n.destroy(),e.terminate())})),n.on("ready",(t=>{if(e.removeEventListener("error",r),this.destroyed)i();else try{s()}catch{this._setupFakeWorker()}}));const s=()=>{const e=new Uint8Array;n.send("test",e,[e.buffer])};return void s()}catch{nh("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){jb.isWorkerDisabled||(ih("Setting up fake worker."),jb.isWorkerDisabled=!0),e._setupFakeWorkerGlobal.then((e=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const t=new Wb;this._port=t;const n="fake".concat(jb.fakeWorkerId++),i=new Gv(n+"_worker",n,t);e.setup(i,t);
2const r=new Gv(n,n+"_worker",t);this._messageHandler=r,this._readyCapability.resolve(),r.send("configure",{verbosity:this.verbosity})})).catch((e=>{this._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(e.message,'".')))}))}destroy(){var t;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),null==(t=Q(e,Bb))||t.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(t){var n;if(null==t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");const i=null==(n=Q(this,Bb))?void 0:n.get(t.port);if(i){if(i._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return i}return new e(t)}static get workerSrc(){if(Ev.workerSrc)return Ev.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return oh(this,"_setupFakeWorkerGlobal",(async()=>Q(this,zb,Ub)?Q(this,zb,Ub):(await import(this.workerSrc)).WorkerMessageHandler)())}};Bb=new WeakMap,zb=new WeakSet,Ub=function(){var e;try{return(null==(e=globalThis.pdfjsWorker)?void 0:e.WorkerMessageHandler)||null}catch{return null}},J(Hb,zb),J(Hb,Bb,void 0);let Vb=Hb;var qb,Gb,Xb,Yb,Kb,$b,Qb;class Jb{constructor(e,t,n,i,r){J(this,$b),J(this,qb,new Map),J(this,Gb,new Map),J(this,Xb,new Map),J(this,Yb,new Map),J(this,Kb,null),this.messageHandler=e,this.loadingTask=t,this.commonObjs=new sw,this.fontLoader=new jm({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=r.canvasFactory,this.filterFactory=r.filterFactory,this.cMapReaderFactory=r.cMapReaderFactory,this.standardFontDataFactory=r.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return oh(this,"annotationStorage",new Om)}getRenderingIntent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mu.ENABLE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=uu,s=Tm;switch(e){case"any":r=cu;break;case"display":break;case"print":r=hu;break;default:ih("getRenderingIntent - invalid intent: ".concat(e))}switch(t){case mu.DISABLE:r+=pu;break;case mu.ENABLE:break;case mu.ENABLE_FORMS:r+=du;break;case mu.ENABLE_STORAGE:r+=fu,s=(r&hu&&n instanceof Wm?n:this.annotationStorage).serializable;break;default:ih("getRenderingIntent - invalid annotationMode: ".concat(t))}return i&&(r+=gu),{renderingIntent:r,cacheKey:"".concat(r,"_").concat(s.hash),annotationStorageSerializable:s}}destroy(){var e;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),null==(e=Q(this,Kb))||e.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const i of Q(this,Gb).values())t.push(i._destroy());Q(this,Gb).clear(),Q(this,Xb).clear(),Q(this,Yb).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const n=this.messageHandler.sendWithPromise("Terminate",null);return t.push(n),Promise.all(t).then((()=>{var e;this.commonObjs.clear(),this.fontLoader.clear(),Q(this,qb).clear(),this.filterFactory.destroy(),fb.cleanup(),null==(e=this._networkStream)||e.cancelAllRequests(new gh("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",((e,t)=>{sh(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then((function(e){let{value:n,done:i}=e;i?t.close():(sh(n instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(n),1,[n]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}})),e.on("ReaderHeadersReady",(e=>{const n=Promise.withResolvers(),i=this._fullReader;return i.headersReady.then((()=>{var e;(!i.isStreamingSupported||!i.isRangeSupported)&&(this._lastProgress&&(null==(e=t.onProgress)||e.call(t,this._lastProgress)),i.onProgress=e=>{var n;null==(n=t.onProgress)||n.call(t,{loaded:e.loaded,total:e.total})}),n.resolve({isStreamingSupported:i.isStreamingSupported,isRangeSupported:i.isRangeSupported,contentLength:i.contentLength})}),n.reject),n.promise})),e.on("GetRangeReader",((e,t)=>
2{sh(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const n=this._networkStream.getRangeReader(e.begin,e.end);n?(t.onPull=()=>{n.read().then((function(e){let{value:n,done:i}=e;i?t.close():(sh(n instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(n),1,[n]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{n.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}):t.close()})),e.on("GetDoc",(e=>{let{pdfInfo:n}=e;this._numPages=n.numPages,this._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,t._capability.resolve(new Mb(n,this))})),e.on("DocException",(function(e){let n;switch(e.name){case"PasswordException":n=new ch(e.message,e.code);break;case"InvalidPDFException":n=new hh(e.message);break;case"MissingPDFException":n=new dh(e.message);break;case"UnexpectedResponseException":n=new fh(e.message,e.status);break;case"UnknownErrorException":n=new uh(e.message,e.details);break;default:rh("DocException - expected a valid Error.")}t._capability.reject(n)})),e.on("PasswordRequest",(e=>{if(Z(this,Kb,Promise.withResolvers()),t.onPassword){const i=e=>{e instanceof Error?Q(this,Kb).reject(e):Q(this,Kb).resolve({password:e})};try{t.onPassword(i,e.code)}catch(n){Q(this,Kb).reject(n)}}else Q(this,Kb).reject(new ch(e.message,e.code));return Q(this,Kb).promise})),e.on("DataLoaded",(e=>{var n;null==(n=t.onProgress)||n.call(t,{loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(e=>{this.destroyed||Q(this,Gb).get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)})),e.on("commonobj",(t=>{let[n,i,r]=t;var s;if(this.destroyed||this.commonObjs.has(n))return null;switch(i){case"Font":const{disableFontFace:t,fontExtraProperties:a,pdfBug:o}=this._params;if("error"in r){const e=r.error;ih("Error during font loading: ".concat(e)),this.commonObjs.resolve(n,e);break}const l=o&&null!=(s=globalThis.FontInspector)&&s.enabled?(e,t)=>globalThis.FontInspector.fontAdded(e,t):null,c=new Bm(r,{disableFontFace:t,inspectFont:l});this.fontLoader.bind(c).catch((()=>e.sendWithPromise("FontFallback",{id:n}))).finally((()=>{!a&&c.data&&(c.data=null),this.commonObjs.resolve(n,c)}));break;case"CopyLocalImage":const{imageRef:u}=r;sh(u,"The imageRef must be defined.");for(const e of Q(this,Gb).values())for(const[,t]of e.objs)if((null==t?void 0:t.ref)===u)return t.dataLen?(this.commonObjs.resolve(n,structuredClone(t)),t.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(n,r);break;default:throw new Error("Got unknown common object type ".concat(i))}return null})),e.on("obj",(e=>{let[t,n,i,r]=e;var s;if(this.destroyed)return;const a=Q(this,Gb).get(n);if(!a.objs.has(t)){if(0===a._intentStates.size)return void(null==(s=null==r?void 0:r.bitmap)||s.close());switch(i){case"Image":a.objs.resolve(t,r),(null==r?void 0:r.dataLen)>1e7&&(a._maybeCleanupAfterRender=!0);break;case"Pattern":a.objs.resolve(t,r);break;default:throw new Error("Got unknown object type ".concat(i))}}})),e.on("DocProgress",(e=>{var n;this.destroyed||null==(n=t.onProgress)||n.call(t,{loaded:e.loaded,total:e.total})})),e.on("FetchBuiltInCMap",(e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(e):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.")))),e.on("FetchStandardFontData",(e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(e):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var e,t;this.annotationStorage.size<=0&&ih("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:n,transfer:i}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:n,filename:null!==(e=null==(t=this._fullReader)?void 0:t.filename)&&void 0!==e?e:null},i).finally((()=>{this.annotationStorage.resetModified()}))}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,n=Q(this,Xb).get(t);if(n)return n;
2const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then((n=>{if(this.destroyed)throw new Error("Transport destroyed");n.refStr&&Q(this,Yb).set(n.refStr,e);const i=new Ob(t,n,this,this._params.pdfBug);return Q(this,Gb).set(t,i),i}));return Q(this,Xb).set(t,i),i}getPageIndex(e){return Sb(e)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return te(this,$b,Qb).call(this,"GetFieldObjects")}hasJSActions(){return te(this,$b,Qb).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return te(this,$b,Qb).call(this,"GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return te(this,$b,Qb).call(this,"GetOptionalContentConfig").then((t=>new ay(t,e)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",t=Q(this,qb).get(e);if(t)return t;const n=this.messageHandler.sendWithPromise(e,null).then((e=>{var t,n,i,r;return{info:e[0],metadata:e[1]?new Xv(e[1]):null,contentDispositionFilename:null!==(t=null==(i=this._fullReader)?void 0:i.filename)&&void 0!==t?t:null,contentLength:null!==(n=null==(r=this._fullReader)?void 0:r.contentLength)&&void 0!==n?n:null}}));return Q(this,qb).set(e,n),n}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of Q(this,Gb).values())if(!e.cleanup())throw new Error("startCleanup: Page ".concat(e.pageNumber," is currently rendering."));this.commonObjs.clear(),e||this.fontLoader.clear(),Q(this,qb).clear(),this.filterFactory.destroy(!0),fb.cleanup()}}cachedPageNumber(e){var t;if(!Sb(e))return null;const n=0===e.gen?"".concat(e.num,"R"):"".concat(e.num,"R").concat(e.gen);return null!==(t=Q(this,Yb).get(n))&&void 0!==t?t:null}}qb=new WeakMap,Gb=new WeakMap,Xb=new WeakMap,Yb=new WeakMap,Kb=new WeakMap,$b=new WeakSet,Qb=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Q(this,qb).get(e);if(n)return n;const i=this.messageHandler.sendWithPromise(e,t);return Q(this,qb).set(e,i),i};const Zb=Symbol("INITIAL_DATA");var ew,tw,nw,iw,rw;class sw{constructor(){J(this,tw),J(this,ew,Object.create(null))}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t){const n=te(this,tw,nw).call(this,e);return n.promise.then((()=>t(n.data))),null}const n=Q(this,ew)[e];if(!n||n.data===Zb)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return n.data}has(e){const t=Q(this,ew)[e];return!!t&&t.data!==Zb}resolve(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=te(this,tw,nw).call(this,e);n.data=t,n.resolve()}clear(){var e;for(const t in Q(this,ew)){const{data:n}=Q(this,ew)[t];null==(e=null==n?void 0:n.bitmap)||e.close()}Z(this,ew,Object.create(null))}*[Symbol.iterator](){for(const e in Q(this,ew)){const{data:t}=Q(this,ew)[e];t!==Zb&&(yield[e,t])}}}ew=new WeakMap,tw=new WeakSet,nw=function(e){var t;return(t=Q(this,ew))[e]||(t[e]={...Promise.withResolvers(),data:Zb})};class aw{constructor(e){J(this,iw,null),Z(this,iw,e),this.onContinue=null}get promise(){return Q(this,iw).capability.promise}cancel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;Q(this,iw).cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=Q(this,iw).operatorList;if(!e)return!1;const{annotationCanvasMap:t}=Q(this,iw);return e.form||e.canvas&&(null==t?void 0:t.size)>0}}iw=new WeakMap;const ow=class e{constructor(e){let{callback:t,params:n,objs:i,commonObjs:r,annotationCanvasMap:s,operatorList:a,pageIndex:o,canvasFactory:l,filterFactory:c,useRequestAnimationFrame:u=!1,pdfBug:h=!1,pageColors:d=null}=e;this.callback=t,this.params=n,this.objs=i,this.commonObjs=r,this.annotationCanvasMap=s,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=o,this.canvasFactory=l,this.filterFactory=c,this._pdfBug=h,this.pageColors=d,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===u&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new aw(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=n.canvasContext.canvas}get completed(){return this.capability.promise.catch((function(){}))}initializeGraphics(t){let{transparency:n=!1,optionalContentConfig:i}=t;var r,s;if(this.cancelled)return;
2if(this._canvas){if(Q(e,rw).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Q(e,rw).add(this._canvas)}this._pdfBug&&null!=(r=globalThis.StepperManager)&&r.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:a,viewport:o,transform:l,background:c}=this.params;this.gfx=new Sv(a,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:i},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:l,viewport:o,transparency:n,background:c}),this.operatorListIdx=0,this.graphicsReady=!0,null==(s=this.graphicsReadyCallback)||s.call(this)}cancel(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;var i;this.running=!1,this.cancelled=!0,null==(i=this.gfx)||i.endDrawing(),Q(e,rw).delete(this._canvas),this.callback(t||new Ed("Rendering cancelled, page ".concat(this._pageIndex+1),n))}operatorListChanged(){var e;this.graphicsReady?(null==(e=this.stepper)||e.updateOperatorList(this.operatorList),!this.running&&this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame((()=>{this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Q(e,rw).delete(this._canvas),this.callback())))}};rw=new WeakMap,J(ow,rw,new WeakSet);let lw=ow;const cw="4.3.136",uw="0cec64437";function hw(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}function dw(e){return Math.max(0,Math.min(255,255*e))}class fw{static CMYK_G(e){let[t,n,i,r]=e;return["G",1-Math.min(1,.3*t+.59*i+.11*n+r)]}static G_CMYK(e){let[t]=e;return["CMYK",0,0,0,1-t]}static G_RGB(e){let[t]=e;return["RGB",t,t,t]}static G_rgb(e){let[t]=e;return t=dw(t),[t,t,t]}static G_HTML(e){let[t]=e;const n=hw(t);return"#".concat(n).concat(n).concat(n)}static RGB_G(e){let[t,n,i]=e;return["G",.3*t+.59*n+.11*i]}static RGB_rgb(e){return e.map(dw)}static RGB_HTML(e){return"#".concat(e.map(hw).join(""))}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(e){let[t,n,i,r]=e;return["RGB",1-Math.min(1,t+r),1-Math.min(1,i+r),1-Math.min(1,n+r)]}static CMYK_rgb(e){let[t,n,i,r]=e;return[dw(1-Math.min(1,t+r)),dw(1-Math.min(1,i+r)),dw(1-Math.min(1,n+r))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK(e){let[t,n,i]=e;const r=1-t,s=1-n,a=1-i;return["CMYK",r,s,a,Math.min(r,s,a)]}}class pw{static setupStorage(e,t,n,i,r){const s=i.getValue(t,{value:null});switch(n.name){case"textarea":if(null!==s.value&&(e.textContent=s.value),"print"===r)break;e.addEventListener("input",(e=>{i.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===n.attributes.type||"checkbox"===n.attributes.type){if(s.value===n.attributes.xfaOn?e.setAttribute("checked",!0):s.value===n.attributes.xfaOff&&e.removeAttribute("checked"),"print"===r)break;e.addEventListener("change",(e=>{i.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==s.value&&e.setAttribute("value",s.value),"print"===r)break;e.addEventListener("input",(e=>{i.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==s.value){e.setAttribute("value",s.value);for(const e of n.children)e.attributes.value===s.value?e.attributes.selected=!0:e.attributes.hasOwnProperty("selected")&&delete e.attributes.selected}e.addEventListener("input",(e=>{const n=e.target.options,r=-1===n.selectedIndex?"":n[n.selectedIndex].value;i.setValue(t,{value:r})}))}}static setAttributes(e){let{html:t,element:n,storage:i=null,intent:r,linkService:s}=e;const{attributes:a}=n,o=t instanceof HTMLAnchorElement;"radio"===a.type&&(a.name="".concat(a.name,"-").concat(r));for(const[l,c]of Object.entries(a))if(null!=c)switch(l){case"class":c.length&&t.setAttribute(l,c.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",c);break;case"style":Object.assign(t.style,c);break;case"textContent":t.textContent=c;break;default:(!o||"href"!==l&&"newWindow"!==l)&&t.setAttribute(l,c)}o&&s.addLinkAttributes(t,a.href,a.newWindow),i&&a.dataId&&this.setupStorage(t,a.dataId,n,i)}static render(e){var t,n;const i=e.annotationStorage,r=e.linkService,s=e.xfaHtml,a=e.intent||"display",o=document.createElement(s.name);s.attributes&&this.setAttributes({html:o,element:s,intent:a,linkService:r});const l="richText"!==a,c=e.div;if(c.append(o),e.viewport){const t="matrix(".concat(e.viewport.transform.join(","),")");c.style.transform=t}l&&c.setAttribute("class","xfaLayer xfaFont");const u=[];
2if(0===s.children.length){if(s.value){const e=document.createTextNode(s.value);o.append(e),l&&mb.shouldBuildText(s.name)&&u.push(e)}return{textDivs:u}}const h=[[s,-1,o]];for(;h.length>0;){const[e,s,o]=h.at(-1);if(s+1===e.children.length){h.pop();continue}const c=e.children[++h.at(-1)[1]];if(null===c)continue;const{name:d}=c;if("#text"===d){const e=document.createTextNode(c.value);u.push(e),o.append(e);continue}const f=null!=(t=null==c?void 0:c.attributes)&&t.xmlns?document.createElementNS(c.attributes.xmlns,d):document.createElement(d);if(o.append(f),c.attributes&&this.setAttributes({html:f,element:c,storage:i,intent:a,linkService:r}),(null==(n=c.children)?void 0:n.length)>0)h.push([c,-1,f]);else if(c.value){const e=document.createTextNode(c.value);l&&mb.shouldBuildText(d)&&u.push(e),f.append(e)}}for(const d of c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))d.setAttribute("readOnly",!0);return{textDivs:u}}static update(e){const t="matrix(".concat(e.viewport.transform.join(","),")");e.div.style.transform=t,e.div.hidden=!1}}const gw=1e3,mw=new WeakSet;function vw(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class yw{static create(e){switch(e.data.annotationType){case Mu:return new Tk(e);case Cu:return new Rk(e);case Vu:switch(e.data.fieldType){case"Tx":return new Ik(e);case"Btn":return e.data.radioButton?new Fk(e):e.data.checkBox?new Nk(e):new Ok(e);case"Ch":return new Wk(e);case"Sig":return new Dk(e)}return new Lk(e);case Uu:return new jk(e);case Pu:return new zk(e);case Tu:return new Uk(e);case Ru:return new Hk(e);case Lu:return new Vk(e);case Du:return new qk(e);case Bu:return new Xk(e);case zu:return new Yk(e);case Iu:return new Gk(e);case Nu:return new Kk(e);case Fu:return new $k(e);case Ou:return new Qk(e);case Wu:return new Jk(e);case ju:return new Zk(e);case Hu:return new ex(e);default:return new _w(e)}}}var bw,ww,kw,xw,Sw;bw=new WeakMap,ww=new WeakMap,kw=new WeakMap,xw=new WeakSet,Sw=function(e){const{container:{style:t},data:{rect:n,rotation:i},parent:{viewport:{rawDims:{pageWidth:r,pageHeight:s,pageX:a,pageY:o}}}}=this;null==n||n.splice(0,4,...e);const{width:l,height:c}=vw(e);t.left="".concat(100*(e[0]-a)/r,"%"),t.top="".concat(100*(s-e[3]+o)/s,"%"),0===i?(t.width="".concat(100*l/r,"%"),t.height="".concat(100*c/s,"%")):this.setRotation(i)};let _w=class e{constructor(e){let{isRenderable:t=!1,ignoreBorder:n=!1,createQuadrilaterals:i=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};J(this,xw),J(this,bw,null),J(this,ww,!1),J(this,kw,null),this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(n)),i&&this._createQuadrilaterals()}static _hasPopupData(e){let{titleObj:t,contentsObj:n,richText:i}=e;return!!(null!=t&&t.str||null!=n&&n.str||null!=i&&i.str)}get hasPopupData(){return e._hasPopupData(this.data)}updateEdited(e){var t;if(!this.container)return;Q(this,bw)||Z(this,bw,{rect:this.data.rect.slice(0)});const{rect:n}=e;n&&te(this,xw,Sw).call(this,n),null==(t=Q(this,kw))||t.popup.updateEdited(e)}resetEdited(){var e;Q(this,bw)&&(te(this,xw,Sw).call(this,Q(this,bw).rect),null==(e=Q(this,kw))||e.popup.resetEdited(),Z(this,bw,null))}_createContainer(e){const{data:t,parent:{page:n,viewport:i}}=this,r=document.createElement("section");r.setAttribute("data-annotation-id",t.id),this instanceof Lk||(r.tabIndex=gw);const{style:s}=r;if(s.zIndex=this.parent.zIndex++,t.popupRef&&r.setAttribute("aria-haspopup","dialog"),t.alternativeText&&(r.title=t.alternativeText),t.noRotate&&r.classList.add("norotate"),!t.rect||this instanceof jk){const{rotation:e}=t;return!t.hasOwnCanvas&&0!==e&&this.setRotation(e,r),r}const{width:a,height:o}=vw(t.rect);if(!e&&t.borderStyle.width>0){s.borderWidth="".concat(t.borderStyle.width,"px");const e=t.borderStyle.horizontalCornerRadius,n=t.borderStyle.verticalCornerRadius;if(e>0||n>0){const t="calc(".concat(e,"px * var(--scale-factor)) / calc(").concat(n,"px * var(--scale-factor))");s.borderRadius=t}else if(this instanceof Fk){const e="calc(".concat(a,"px * var(--scale-factor)) / calc(").concat(o,"px * var(--scale-factor))");s.borderRadius=e}switch(t.borderStyle.style){case qu:s.borderStyle="solid";break;case Gu:s.borderStyle="dashed";break;case Xu:ih("Unimplemented border style: beveled");break;case Yu:ih("Unimplemented border style: inset");break;case Ku:s.borderBottomStyle="solid"}const i=t.borderColor||null;i?(Z(this,ww,!0),s.borderColor=Ah.makeHexColor(0|i[0],0|i[1],0|i[2])):s.borderWidth=0}const l=Ah.normalizeRect([t.rect[0],n.view[3]-t.rect[1]+n.view[1],t.rect[2],n.view[3]-t.rect[3]+n.view[1]]),{pageWidth:c,pageHeight:u,pageX:h,pageY:d}=i.rawDims;s.left="".concat(100*(l[0]-h)/c,"%"),s.top="".concat(100*(l[1]-d)/u,"%");const{rotation:f}=t;return t.hasOwnCanvas||0===f?(s.width="".concat(100*a/c,"%"),s.height="".concat(100*o/u,"%")):this.setRotation(f,r),r}setRotation(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;if(!this.data.rect)return;const{pageWidth:n,pageHeight:i}=this.parent.viewport.rawDims,{width:r,height:s}=vw(this.data.rect);let a,o;e%180===0?(a=100*r/n,o=100*s/i):(a=100*s/n,o=100*r/i),t.style.width="".concat(a,"%"),t.style.height="".concat(o,"%"),t.setAttribute("data-main-rotation",(360-e)%360)}
2get _commonActions(){const e=(e,t,n)=>{const i=n.detail[e],r=i[0],s=i.slice(1);n.target.style[t]=fw["".concat(r,"_HTML")](s),this.annotationStorage.setValue(this.data.id,{[t]:fw["".concat(r,"_rgb")](s)})};return oh(this,"_commonActions",{display:e=>{const{display:t}=e.detail,n=t%2===1;this.container.style.visibility=n?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:n,noPrint:1===t||2===t})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{const{hidden:t}=e.detail;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:t,noView:t})},focus:e=>{setTimeout((()=>e.target.focus({preventScroll:!1})),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:e=>{const t=e.detail.rotation;this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(e,t){const n=this._commonActions;for(const i of Object.keys(t.detail)){const r=e[i]||n[i];null==r||r(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const n=this._commonActions;for(const[i,r]of Object.entries(t)){const s=n[i];if(s){s({detail:{[i]:r},target:e}),delete t[i]}}}
2_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e}=this.data;if(!e)return;const[t,n,i,r]=this.data.rect;if(1===e.length){const[,{x:s,y:a},{x:o,y:l}]=e[0];if(i===s&&r===a&&t===o&&n===l)return}const{style:s}=this.container;let a;if(Q(this,ww)){const{borderColor:e,borderWidth:t}=s;s.borderWidth=0,a=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">','<g fill="transparent" stroke="'.concat(e,'" stroke-width="').concat(t,'">')],this.container.classList.add("hasBorder")}const o=i-t,l=r-n,{svgFactory:c}=this,u=c.createElement("svg");u.classList.add("quadrilateralsContainer"),u.setAttribute("width",0),u.setAttribute("height",0);const h=c.createElement("defs");u.append(h);const d=c.createElement("clipPath"),f="clippath_".concat(this.data.id);d.setAttribute("id",f),d.setAttribute("clipPathUnits","objectBoundingBox"),h.append(d);for(const[,{x:p,y:g},{x:m,y:v}]of e){const e=c.createElement("rect"),n=(m-t)/o,i=(r-g)/l,s=(p-m)/o,u=(g-v)/l;e.setAttribute("x",n),e.setAttribute("y",i),e.setAttribute("width",s),e.setAttribute("height",u),d.append(e),null==a||a.push('<rect vector-effect="non-scaling-stroke" x="'.concat(n,'" y="').concat(i,'" width="').concat(s,'" height="').concat(u,'"/>'))}Q(this,ww)&&(a.push("</g></svg>')"),s.backgroundImage=a.join("")),this.container.append(u),this.container.style.clipPath="url(#".concat(f,")")}_createPopup(){const{container:e,data:t}=this;e.setAttribute("aria-haspopup","dialog");const n=Z(this,kw,new jk({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:"popup_".concat(t.id),rotation:t.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(n.render())}render(){rh("Abstract method `AnnotationElement.render` called")}_getElementsByName(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[];if(this._fieldObjects){const i=this._fieldObjects[e];if(i)for(const{page:e,id:r,exportValues:s}of i){if(-1===e||r===t)continue;const i="string"==typeof s?s:null,a=document.querySelector('[data-element-id="'.concat(r,'"]'));!a||mw.has(a)?n.push({id:r,exportValue:i,domElement:a}):ih("_getElementsByName - element not allowed: ".concat(r))}return n}for(const i of document.getElementsByName(e)){const{exportValue:e}=i,r=i.getAttribute("data-element-id");r!==t&&mw.has(i)&&n.push({id:r,exportValue:e,domElement:i})}return n}show(){var e;this.container&&(this.container.hidden=!1),null==(e=this.popup)||e.maybeShow()}hide(){var e;this.container&&(this.container.hidden=!0),null==(e=this.popup)||e.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}get _isEditable(){return!1}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",(()=>{var n;null==(n=this.linkService.eventBus)||n.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})}))}};var Aw,Ew,Cw,Mw,Pw,Tw,Rw,Lw,Iw,Dw,Nw,Fw,Ow,Ww,jw,Bw,zw,Uw,Hw,Vw,qw,Gw,Xw,Yw,Kw,$w,Qw,Jw,Zw,ek,tk,nk,ik,rk,sk,ak,ok,lk,ck,uk,hk,dk,fk,pk,gk,mk,vk,yk,bk,wk,kk,xk,Sk,_k,Ak,Ek,Ck,Mk,Pk;class Tk extends _w{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(e,{isRenderable:!0,ignoreBorder:!(null==t||!t.ignoreBorder),createQuadrilaterals:!0}),J(this,Aw),J(this,Cw),J(this,Pw),this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:t}=this,n=document.createElement("a");n.setAttribute("data-element-id",e.id);let i=!1;return e.url?(t.addLinkAttributes(n,e.url,e.newWindow),i=!0):e.action?(this._bindNamedAction(n,e.action),i=!0):e.attachment?(te(this,Cw,Mw).call(this,n,e.attachment,e.attachmentDest),i=!0):e.setOCGState?(te(this,Pw,Tw).call(this,n,e.setOCGState),i=!0):e.dest?(this._bindLink(n,e.dest),i=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(n,e),i=!0),e.resetForm?(this._bindResetFormAction(n,e.resetForm),i=!0):this.isTooltipOnly&&!i&&(this._bindLink(n,""),i=!0)),this.container.classList.add("linkA
2nnotation"),i&&this.container.append(n),this.container}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&te(this,Aw,Ew).call(this)}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),te(this,Aw,Ew).call(this)}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");const n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const i of Object.keys(t.actions)){const r=n.get(i);r&&(e[r]=()=>{var e;return null==(e=this.linkService.eventBus)||e.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:i}}),!1})}e.onclick||(e.onclick=()=>!1),te(this,Aw,Ew).call(this)}_bindResetFormAction(e,t){const n=e.onclick;if(n||(e.href=this.linkService.getAnchorUrl("")),te(this,Aw,Ew).call(this),!this._fieldObjects)return ih('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(n||(e.onclick=()=>!1));e.onclick=()=>{var e;null==n||n();const{fields:i,refs:r,include:s}=t,a=[];if(0!==i.length||0!==r.length){const e=new Set(r);for(const t of i){const n=this._fieldObjects[t]||[];for(const{id:t}of n)e.add(t)}for(const t of Object.values(this._fieldObjects))for(const n of t)e.has(n.id)===s&&a.push(n)}else for(const t of Object.values(this._fieldObjects))a.push(...t);const o=this.annotationStorage,l=[];for(const t of a){const{id:e}=t;switch(l.push(e),t.type){case"text":{const n=t.defaultValue||"";o.setValue(e,{value:n});break}case"checkbox":case"radiobutton":{const n=t.defaultValue===t.exportValues;o.setValue(e,{value:n});break}case"combobox":case"listbox":{const n=t.defaultValue||"";o.setValue(e,{value:n});break}default:continue}const n=document.querySelector('[data-element-id="'.concat(e,'"]'));n&&(mw.has(n)?n.dispatchEvent(new Event("resetform")):ih("_bindResetFormAction - element not allowed: ".concat(e)))}return this.enableScripting&&(null==(e=this.linkService.eventBus)||e.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:l,name:"ResetForm"}})),!1}}}Aw=new WeakSet,Ew=function(){this.container.setAttribute("data-internal-link","")},Cw=new WeakSet,Mw=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.href=this.linkService.getAnchorUrl(""),t.description&&(e.title=t.description),e.onclick=()=>{var e;return null==(e=this.downloadManager)||e.openOrDownloadData(t.content,t.filename,n),!1},te(this,Aw,Ew).call(this)},Pw=new WeakSet,Tw=function(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),te(this,Aw,Ew).call(this)};class Rk extends _w{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class Lk extends _w{render(){return this.container}showElementAndHideCanvas(e){var t;this.data.hasOwnCanvas&&("CANVAS"===(null==(t=e.previousSibling)?void 0:t.nodeName)&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return bh.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,n,i,r){n.includes("mouse")?e.addEventListener(n,(e=>{var t;null==(t=this.linkService.eventBus)||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:r(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})})):e.addEventListener(n,(e=>{var s;if("blur"===n){if(!t.focused||!e.relatedTarget)return;t.focused=!1}else if("focus"===n){if(t.focused)return;t.focused=!0}r&&(null==(s=this.linkService.eventBus)||s.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:r(e)}}))}))}_setEventListeners(e,t,n,i){var r,s,a;for(const[o,l]of n)("Action"===l||null!=(r=this.data.actions)&&r[l])&&(("Focus"===l||"Blur"===l)&&(t||(t={focused:!1})),this._setEventListener(e,t,o,l,i),"Focus"!==l||null!=(s=this.data.actions)&&s.Blur?"Blur"===l&&(null==(a=this.data.actions)||!a.Focus)&&this._setEventListener(e,t,"focus","Focus",null):this._setEventListener(e,t,"blur","Blur",null))}
2_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":Ah.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const{fontColor:t}=this.data.defaultAppearanceData,n=this.data.defaultAppearanceData.fontSize||9,i=e.style;let r;const s=e=>Math.round(10*e)/10;if(this.data.multiLine){const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2),t=e/(Math.round(e/(lu*n))||1);r=Math.min(n,s(t/lu))}else{const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2);r=Math.min(n,s(e/lu))}i.fontSize="calc(".concat(r,"px * var(--scale-factor))"),i.color=Ah.makeHexColor(t[0],t[1],t[2]),null!==this.data.textAlignment&&(i.textAlign=["left","center","right"][this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class Ik extends Lk{constructor(e){super(e,{isRenderable:e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,n,i){const r=this.annotationStorage;for(const s of this._getElementsByName(e.name,e.id))s.domElement&&(s.domElement[t]=n),r.setValue(s.id,{[i]:n})}render(){var e,t;const n=this.annotationStorage,i=this.data.id;this.container.classList.add("textWidgetAnnotation");let r=null;if(this.renderForms){var s,a;const o=n.getValue(i,{value:this.data.fieldValue});let l=o.value||"";const c=n.getValue(i,{charLimit:this.data.maxLen}).charLimit;c&&l.length>c&&(l=l.slice(0,c));let u=o.formattedValue||(null==(e=this.data.textContent)?void 0:e.join("\n"))||null;u&&this.data.comb&&(u=u.replaceAll(/\s+/g,""));const h={userValue:l,formattedValue:u,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(r=document.createElement("textarea"),r.textContent=null!==(s=u)&&void 0!==s?s:l,this.data.doNotScroll&&(r.style.overflowY="hidden")):(r=document.createElement("input"),r.type="text",r.setAttribute("value",null!==(a=u)&&void 0!==a?a:l),this.data.doNotScroll&&(r.style.overflowX="hidden")),this.data.hasOwnCanvas&&(r.hidden=!0),mw.add(r),r.setAttribute("data-element-id",i),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=gw,this._setRequired(r,this.data.required),c&&(r.maxLength=c),r.addEventListener("input",(e=>{n.setValue(i,{value:e.target.value}),this.setPropertyOnSiblings(r,"value",e.target.value,"value"),h.formattedValue=null})),r.addEventListener("resetform",(e=>{var t;const n=null!==(t=this.data.defaultFieldValue)&&void 0!==t?t:"";r.value=h.userValue=n,h.formattedValue=null}));let d=e=>{const{formattedValue:t}=h;null!=t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){r.addEventListener("focus",(e=>{var t;if(h.focused)return;const{target:n}=e;h.userValue&&(n.value=h.userValue),h.lastCommittedValue=n.value,h.commitKey=1,null!=(t=this.data.actions)&&t.Focus||(h.focused=!0)})),r.addEventListener("updatefromsandbox",(e=>{this.showElementAndHideCanvas(e.target);const t={value(e){var t;h.userValue=null!==(t=e.detail.value)&&void 0!==t?t:"",n.setValue(i,{value:h.userValue.toString()}),e.target.value=h.userValue},formattedValue(e){const{formattedValue:t}=e.detail;h.formattedValue=t,null!=t&&e.target!==document.activeElement&&(e.target.value=t),n.setValue(i,{formattedValue:t})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:e=>{var t;const{charLimit:r}=e.detail,{target:s}=e;if(0===r)return void s.removeAttribute("maxLength");s.setAttribute("maxLength",r);let a=h.userValue;!a||a.length<=r||(a=a.slice(0,r),s.value=h.userValue=a,n.setValue(i,{value:a}),null==(t=this.linkService.eventBus)||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:a,willCommit:!0,commitKey:1,selStart:s.selectionStart,selEnd:s.selectionEnd}}))}};this._dispatchEventFromSandbox(t,e)})),r.addEventListener("keydown",(e=>{var t;h.commitKey=1;let n=-1;if("Escape"===e.key?n=0:"Enter"!==e.key||this.data.multiLine?"Tab"===e.key&&(h.commitKey=3):n=2,-1===n)return;const{value:r}=e.target;h.lastCommittedValue!==r&&(h.lastCommittedValue=r,h.userValue=r,null==(t=this.linkService.eventBus)||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:r,willC
2ommit:!0,commitKey:n,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))}));const e=d;d=null,r.addEventListener("blur",(t=>{var n,r;if(!h.focused||!t.relatedTarget)return;null!=(n=this.data.actions)&&n.Blur||(h.focused=!1);const{value:s}=t.target;h.userValue=s,h.lastCommittedValue!==s&&(null==(r=this.linkService.eventBus)||r.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:s,willCommit:!0,commitKey:h.commitKey,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}})),e(t)})),null!=(t=this.data.actions)&&t.Keystroke&&r.addEventListener("beforeinput",(e=>{var t;h.lastCommittedValue=null;const{data:n,target:r}=e,{value:s,selectionStart:a,selectionEnd:o}=r;let l=a,c=o;switch(e.inputType){case"deleteWordBackward":{const e=s.substring(0,a).match(/\w*[^\w]*$/);e&&(l-=e[0].length);break}case"deleteWordForward":{const e=s.substring(a).match(/^[^\w]*\w*/);e&&(c+=e[0].length);break}case"deleteContentBackward":a===o&&(l-=1);break;case"deleteContentForward":a===o&&(c+=1)}e.preventDefault(),null==(t=this.linkService.eventBus)||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:s,change:n||"",willCommit:!1,selStart:l,selEnd:c}})})),this._setEventListeners(r,h,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.value))}if(d&&r.addEventListener("blur",d),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/c;r.classList.add("comb"),r.style.letterSpacing="calc(".concat(e,"px * var(--scale-factor) - 1ch)")}}else r=document.createElement("div"),r.textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell",this.data.hasOwnCanvas&&(r.hidden=!0);return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class Dk extends Lk{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class Nk extends Lk{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,n=t.id;let i=e.getValue(n,{value:t.exportValue===t.fieldValue}).value;"string"==typeof i&&(i="Off"!==i,e.setValue(n,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const r=document.createElement("input");return mw.add(r),r.setAttribute("data-element-id",n),r.disabled=t.readOnly,this._setRequired(r,this.data.required),r.type="checkbox",r.name=t.fieldName,i&&r.setAttribute("checked",!0),r.setAttribute("exportValue",t.exportValue),r.tabIndex=gw,r.addEventListener("change",(i=>{const{name:r,checked:s}=i.target;for(const a of this._getElementsByName(r,n)){const n=s&&a.exportValue===t.exportValue;a.domElement&&(a.domElement.checked=n),e.setValue(a.id,{value:n})}e.setValue(n,{value:s})})),r.addEventListener("resetform",(e=>{const n=t.defaultFieldValue||"Off";e.target.checked=n===t.exportValue})),this.enableScripting&&this.hasJSActions&&(r.addEventListener("updatefromsandbox",(t=>{const i={value(t){t.target.checked="Off"!==t.detail.value,e.setValue(n,{value:t.target.checked})}};this._dispatchEventFromSandbox(i,t)})),this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class Fk extends Lk{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const e=this.annotationStorage,t=this.data,n=t.id;let i=e.getValue(n,{value:t.fieldValue===t.buttonValue}).value;if("string"==typeof i&&(i=i!==t.buttonValue,e.setValue(n,{value:i})),i)for(const s of this._getElementsByName(t.fieldName,n))e.setValue(s.id,{value:!1});const r=document.createElement("input");if(mw.add(r),r.setAttribute("data-element-id",n),r.disabled=t.readOnly,this._setRequired(r,this.data.required),r.type="radio",r.name=t.fieldName,i&&r.setAttribute("checked",!0),r.tabIndex=gw,r.addEventListener("change",(t=>{const{name:i,checked:r}=t.target;for(const s of this._getElementsByName(i,n))e.setValue(s.id,{value:!1});e.setValue(n,{value:r})})),r.addEventListener("resetform",(e=>{const n=t.defaultFieldValue;e.target.checked=null!=n&&n===t.buttonValue})),this.enableScripting&&this.hasJSActions){const i=t.buttonValue;r.addEventListener("updatefromsandbox",(t=>{const r={value:t=>{const r=i===t.detail.value;for(const i of this._getElementsByName(t.target.name)){const t=r&&i.id===n;i.domElement&&(i.domElement.checked=t),e.setValue(i.id,{value:t})}}};this._dispatchEventFromSandbox(r,t)})),this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))}
2return this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class Ok extends Tk{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton");const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",(e=>{this._dispatchEventFromSandbox({},e)}))),e}}class Wk extends Lk{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const e=this.annotationStorage,t=this.data.id,n=e.getValue(t,{value:this.data.fieldValue}),i=document.createElement("select");mw.add(i),i.setAttribute("data-element-id",t),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=gw;let r=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue;for(const n of i.options)n.selected=n.value===t}));for(const c of this.data.options){const e=document.createElement("option");e.textContent=c.displayValue,e.value=c.exportValue,n.value.includes(c.exportValue)&&(e.setAttribute("selected",!0),r=!1),i.append(e)}let s=null;if(r){const e=document.createElement("option");e.value=" ",e.setAttribute("hidden",!0),e.setAttribute("selected",!0),i.prepend(e),s=()=>{e.remove(),i.removeEventListener("input",s),s=null},i.addEventListener("input",s)}const a=e=>{const t=e?"value":"textContent",{options:n,multiple:r}=i;return r?Array.prototype.filter.call(n,(e=>e.selected)).map((e=>e[t])):-1===n.selectedIndex?null:n[n.selectedIndex][t]};let o=a(!1);const l=e=>{const t=e.target.options;return Array.prototype.map.call(t,(e=>({displayValue:e.textContent,exportValue:e.value})))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",(n=>{const r={value(n){null==s||s();const r=n.detail.value,l=new Set(Array.isArray(r)?r:[r]);for(const e of i.options)e.selected=l.has(e.value);e.setValue(t,{value:a(!0)}),o=a(!1)},multipleSelection(e){i.multiple=!0},remove(n){const r=i.options,s=n.detail.remove;r[s].selected=!1,i.remove(s),r.length>0&&-1===Array.prototype.findIndex.call(r,(e=>e.selected))&&(r[0].selected=!0),e.setValue(t,{value:a(!0),items:l(n)}),o=a(!1)},clear(n){for(;0!==i.length;)i.remove(0);e.setValue(t,{value:null,items:[]}),o=a(!1)},insert(n){const{index:r,displayValue:s,exportValue:c}=n.detail.insert,u=i.children[r],h=document.createElement("option");h.textContent=s,h.value=c,u?u.before(h):i.append(h),e.setValue(t,{value:a(!0),items:l(n)}),o=a(!1)},items(n){const{items:r}=n.detail;for(;0!==i.length;)i.remove(0);for(const e of r){const{displayValue:t,exportValue:n}=e,r=document.createElement("option");r.textContent=t,r.value=n,i.append(r)}i.options.length>0&&(i.options[0].selected=!0),e.setValue(t,{value:a(!0),items:l(n)}),o=a(!1)},indices(n){const i=new Set(n.detail.indices);for(const e of n.target.options)e.selected=i.has(e.index);e.setValue(t,{value:a(!0)}),o=a(!1)},editable(e){e.target.disabled=!e.detail.editable}};this._dispatchEventFromSandbox(r,n)})),i.addEventListener("input",(n=>{var i;const r=a(!0),s=a(!1);e.setValue(t,{value:r}),n.preventDefault(),null==(i=this.linkService.eventBus)||i.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:o,change:s,changeEx:r,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(e=>e.target.value))):i.addEventListener("input",(function(n){e.setValue(t,{value:a(!0)})})),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class jk extends _w{constructor(e){const{data:t,elements:n}=e;super(e,{isRenderable:_w._hasPopupData(t)}),this.elements=n,this.popup=null}render(){this.container.classList.add("popupAnnotation");const e=this.popup=new Bk({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),t=[];for(const n of this.elements)n.popup=e,t.push(n.data.id),n.addHighlightArea();return this.container.setAttribute("aria-controls",t.map((e=>"".concat(Ph).concat(e))).join(",")),this.container}}
2class Bk{constructor(e){let{container:t,color:n,elements:i,titleObj:r,modificationDate:s,contentsObj:a,richText:o,parent:l,rect:c,parentRect:u,open:h}=e;var d;J(this,$w),J(this,Jw),J(this,ek),J(this,nk),J(this,rk),J(this,ak),J(this,lk),J(this,uk),J(this,dk),J(this,Rw,te(this,rk,sk).bind(this)),J(this,Lw,te(this,dk,fk).bind(this)),J(this,Iw,te(this,uk,hk).bind(this)),J(this,Dw,te(this,lk,ck).bind(this)),J(this,Nw,null),J(this,Fw,null),J(this,Ow,null),J(this,Ww,null),J(this,jw,null),J(this,Bw,null),J(this,zw,null),J(this,Uw,!1),J(this,Hw,null),J(this,Vw,null),J(this,qw,null),J(this,Gw,null),J(this,Xw,null),J(this,Yw,null),J(this,Kw,!1),Z(this,Fw,t),Z(this,Xw,r),Z(this,Ow,a),Z(this,Gw,o),Z(this,Bw,l),Z(this,Nw,n),Z(this,qw,c),Z(this,zw,u),Z(this,jw,i),Z(this,Ww,Fd.toDateObject(s)),this.trigger=i.flatMap((e=>e.getElementsToTriggerPopup()));for(const f of this.trigger)f.addEventListener("click",Q(this,Dw)),f.addEventListener("mouseenter",Q(this,Iw)),f.addEventListener("mouseleave",Q(this,Lw)),f.classList.add("popupTriggerArea");for(const f of i)null==(d=f.container)||d.addEventListener("keydown",Q(this,Rw));Q(this,Fw).hidden=!0,h&&te(this,lk,ck).call(this)}render(){if(Q(this,Hw))return;const e=Z(this,Hw,document.createElement("div"));if(e.className="popup",Q(this,Nw)){const t=e.style.outlineColor=Ah.makeHexColor(...Q(this,Nw));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?e.style.backgroundColor="color-mix(in srgb, ".concat(t," 30%, white)"):e.style.backgroundColor=Ah.makeHexColor(...Q(this,Nw).map((e=>Math.floor(.7*(255-e)+e))))}const t=document.createElement("span");t.className="header";const n=document.createElement("h1");if(t.append(n),({dir:n.dir,str:n.textContent}=Q(this,Xw)),e.append(t),Q(this,Ww)){const e=document.createElement("span");e.classList.add("popupDate"),e.setAttribute("data-l10n-id","pdfjs-annotation-date-string"),e.setAttribute("data-l10n-args",JSON.stringify({date:Q(this,Ww).toLocaleDateString(),time:Q(this,Ww).toLocaleTimeString()})),t.append(e)}const i=Q(this,$w,Qw);if(i)pw.render({xfaHtml:i,intent:"richText",div:e}),e.lastChild.classList.add("richText","popupContent");else{const t=this._formatContents(Q(this,Ow));e.append(t)}Q(this,Fw).append(e)}_formatContents(e){let{str:t,dir:n}=e;const i=document.createElement("p");i.classList.add("popupContent"),i.dir=n;const r=t.split(/(?:\r\n?|\n)/);for(let s=0,a=r.length;s<a;++s){const e=r[s];i.append(document.createTextNode(e)),s<a-1&&i.append(document.createElement("br"))}return i}updateEdited(e){let{rect:t,popupContent:n}=e;var i;Q(this,Yw)||Z(this,Yw,{contentsObj:Q(this,Ow),richText:Q(this,Gw)}),t&&Z(this,Vw,null),n&&(Z(this,Gw,te(this,nk,ik).call(this,n)),Z(this,Ow,null)),null==(i=Q(this,Hw))||i.remove(),Z(this,Hw,null)}resetEdited(){var e;Q(this,Yw)&&(({contentsObj:ee(this,Ow)._,richText:ee(this,Gw)._}=Q(this,Yw)),Z(this,Yw,null),null==(e=Q(this,Hw))||e.remove(),Z(this,Hw,null),Z(this,Vw,null))}forceHide(){Z(this,Kw,this.isVisible),Q(this,Kw)&&(Q(this,Fw).hidden=!0)}maybeShow(){Q(this,Kw)&&(Q(this,Hw)||te(this,uk,hk).call(this),Z(this,Kw,!1),Q(this,Fw).hidden=!1)}get isVisible(){return!1===Q(this,Fw).hidden}}Rw=new WeakMap,Lw=new WeakMap,Iw=new WeakMap,Dw=new WeakMap,Nw=new WeakMap,Fw=new WeakMap,Ow=new WeakMap,Ww=new WeakMap,jw=new WeakMap,Bw=new WeakMap,zw=new WeakMap,Uw=new WeakMap,Hw=new WeakMap,Vw=new WeakMap,qw=new WeakMap,Gw=new WeakMap,Xw=new WeakMap,Yw=new WeakMap,Kw=new WeakMap,$w=new WeakSet,Qw=function(){const e=Q(this,Gw),t=Q(this,Ow);return null!=e&&e.str&&(!(null!=t&&t.str)||t.str===e.str)&&Q(this,Gw).html||null},Jw=new WeakSet,Zw=function(){var e,t,n;return(null==(n=null==(t=null==(e=Q(this,$w,Qw))?void 0:e.attributes)?void 0:t.style)?void 0:n.fontSize)||0},ek=new WeakSet,tk=function(){var e,t,n;return(null==(n=null==(t=null==(e=Q(this,$w,Qw))?void 0:e.attributes)?void 0:t.style)?void 0:n.color)||null},nk=new WeakSet,ik=function(e){const t=[],n={str:e,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:t}]}},i={style:{color:Q(this,ek,tk),fontSize:Q(this,Jw,Zw)?"calc(".concat(Q(this,Jw,Zw),"px * var(--scale-factor))"):""}};for(const r of e.split("\n"))t.push({name:"span",value:r,attributes:i});return n},rk=new WeakSet,sk=function(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||("Enter"===e.key||"Escape"===e.key&&Q(this,Uw))&&te(this,lk,ck).call(this)},ak=new WeakSet,ok=function(){if(null!==Q(this,Vw))return;const{page:{view:e},viewport:{rawDims:{pageWidth:t,pageHeight:n,pageX:i,pageY:r}}}=Q(this,Bw);let s=!!Q(this,zw),a=Q(this,s?zw:qw);for(const d of Q(this,jw))if(!a||null!==Ah.intersect(d.data.rect,a)){a=d.data.rect,s=!0;break}const o=Ah.normalizeRect([a[0],e[3]-a[1]+e[1],a[2],e[3]-a[3]+e[1]]),l=s?a[2]-a[0]+5:0,c=o[0]+l,u=o[1];Z(this,Vw,[100*(c-i)/t,100*(u-r)/n]);const{style:h}=Q(this,Fw);h.left="".concat(Q(this,Vw)[0],"%"),h.top="".concat(Q(this,Vw)[1],"%")},lk=new WeakSet,ck=function(){Z(this,Uw,!Q(this,Uw)),Q(this,Uw)?(te(this,uk,hk).call(this),Q(this,Fw).addEventListener("click",Q(this,Dw)),Q(this,Fw).addEventListener("keydown",Q(this,Rw))
2):(te(this,dk,fk).call(this),Q(this,Fw).removeEventListener("click",Q(this,Dw)),Q(this,Fw).removeEventListener("keydown",Q(this,Rw)))},uk=new WeakSet,hk=function(){Q(this,Hw)||this.render(),this.isVisible?Q(this,Uw)&&Q(this,Fw).classList.add("focused"):(te(this,ak,ok).call(this),Q(this,Fw).hidden=!1,Q(this,Fw).style.zIndex=parseInt(Q(this,Fw).style.zIndex)+1e3)},dk=new WeakSet,fk=function(){Q(this,Fw).classList.remove("focused"),!Q(this,Uw)&&this.isVisible&&(Q(this,Fw).hidden=!0,Q(this,Fw).style.zIndex=parseInt(Q(this,Fw).style.zIndex)-1e3)};class zk extends _w{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=vu.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const t of this.textContent){const n=document.createElement("span");n.textContent=t,e.append(n)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}get _isEditable(){return this.data.hasOwnCanvas}}class Uk extends _w{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),J(this,pk,null)}render(){this.container.classList.add("lineAnnotation");const e=this.data,{width:t,height:n}=vw(e.rect),i=this.svgFactory.create(t,n,!0),r=Z(this,pk,this.svgFactory.createElement("svg:line"));return r.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),r.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),r.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),r.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),r.setAttribute("stroke-width",e.borderStyle.width||1),r.setAttribute("stroke","transparent"),r.setAttribute("fill","transparent"),i.append(r),this.container.append(i),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Q(this,pk)}addHighlightArea(){this.container.classList.add("highlightArea")}}pk=new WeakMap;class Hk extends _w{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),J(this,gk,null)}render(){this.container.classList.add("squareAnnotation");const e=this.data,{width:t,height:n}=vw(e.rect),i=this.svgFactory.create(t,n,!0),r=e.borderStyle.width,s=Z(this,gk,this.svgFactory.createElement("svg:rect"));return s.setAttribute("x",r/2),s.setAttribute("y",r/2),s.setAttribute("width",t-r),s.setAttribute("height",n-r),s.setAttribute("stroke-width",r||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),i.append(s),this.container.append(i),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Q(this,gk)}addHighlightArea(){this.container.classList.add("highlightArea")}}gk=new WeakMap;class Vk extends _w{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),J(this,mk,null)}render(){this.container.classList.add("circleAnnotation");const e=this.data,{width:t,height:n}=vw(e.rect),i=this.svgFactory.create(t,n,!0),r=e.borderStyle.width,s=Z(this,mk,this.svgFactory.createElement("svg:ellipse"));return s.setAttribute("cx",t/2),s.setAttribute("cy",n/2),s.setAttribute("rx",t/2-r/2),s.setAttribute("ry",n/2-r/2),s.setAttribute("stroke-width",r||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),i.append(s),this.container.append(i),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Q(this,mk)}addHighlightArea(){this.container.classList.add("highlightArea")}}mk=new WeakMap;class qk extends _w{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),J(this,vk,null),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const e=this.data,{width:t,height:n}=vw(e.rect),i=this.svgFactory.create(t,n,!0);let r=[];for(const a of e.vertices){const t=a.x-e.rect[0],n=e.rect[3]-a.y;r.push(t+","+n)}r=r.join(" ");const s=Z(this,vk,this.svgFactory.createElement(this.svgElementName));return s.setAttribute("points",r),s.setAttribute("stroke-width",e.borderStyle.width||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),i.append(s),this.container.append(i),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Q(this,vk)}addHighlightArea(){this.container.classList.add("highlightArea")}}vk=new WeakMap;class Gk extends qk{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class Xk extends _w{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}
2class Yk extends _w{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),J(this,yk,[]),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=vu.INK}render(){this.container.classList.add(this.containerClassName);const e=this.data,{width:t,height:n}=vw(e.rect),i=this.svgFactory.create(t,n,!0);for(const r of e.inkLists){let t=[];for(const i of r){const n=i.x-e.rect[0],r=e.rect[3]-i.y;t.push("".concat(n,",").concat(r))}t=t.join(" ");const n=this.svgFactory.createElement(this.svgElementName);Q(this,yk).push(n),n.setAttribute("points",t),n.setAttribute("stroke-width",e.borderStyle.width||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),!e.popupRef&&this.hasPopupData&&this._createPopup(),i.append(n)}return this.container.append(i),this.container}getElementsToTriggerPopup(){return Q(this,yk)}addHighlightArea(){this.container.classList.add("highlightArea")}}yk=new WeakMap;class Kk extends _w{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class $k extends _w{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class Qk extends _w{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class Jk extends _w{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class Zk extends _w{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class ex extends _w{constructor(e){var t;super(e,{isRenderable:!0}),J(this,wk),J(this,bk,null);const{file:n}=this.data;this.filename=n.filename,this.content=n.content,null==(t=this.linkService.eventBus)||t.dispatch("fileattachmentannotation",{source:this,...n})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:e,data:t}=this;let n;t.hasAppearance||0===t.fillAlpha?n=document.createElement("div"):(n=document.createElement("img"),n.src="".concat(this.imageResourcesPath,"annotation-").concat(/paperclip/i.test(t.name)?"paperclip":"pushpin",".svg"),t.fillAlpha&&t.fillAlpha<1&&(n.style="filter: opacity(".concat(Math.round(100*t.fillAlpha),"%);"))),n.addEventListener("dblclick",te(this,wk,kk).bind(this)),Z(this,bk,n);const{isMac:i}=bh.platform;return e.addEventListener("keydown",(e=>{"Enter"===e.key&&(i?e.metaKey:e.ctrlKey)&&te(this,wk,kk).call(this)})),!t.popupRef&&this.hasPopupData?this._createPopup():n.classList.add("popupTriggerArea"),e.append(n),e}getElementsToTriggerPopup(){return Q(this,bk)}addHighlightArea(){this.container.classList.add("highlightArea")}}bk=new WeakMap,wk=new WeakSet,kk=function(){var e;null==(e=this.downloadManager)||e.openOrDownloadData(this.content,this.filename)};let tx=(Pk=class{constructor(e){let{div:t,accessibilityManager:n,annotationCanvasMap:i,annotationEditorUIManager:r,page:s,viewport:a}=e;J(this,Ak),J(this,Ck),J(this,xk,null),J(this,Sk,null),J(this,_k,new Map),this.div=t,Z(this,xk,n),Z(this,Sk,i),this.page=s,this.viewport=a,this.zIndex=0,this._annotationEditorUIManager=r}async render(e){var t;const{annotations:n}=e,i=this.div;zd(i,this.viewport);const r=new Map,s={data:null,layer:i,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new _d,annotationStorage:e.annotationStorage||new Om,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const a of n){if(a.noHTML)continue;const e=a.annotationType===Uu;if(e){const e=r.get(a.id);if(!e)continue;s.elements=e}else{const{width:e,height:t}=vw(a.rect);if(e<=0||t<=0)continue}s.data=a;const n=yw.create(s);if(!n.isRenderable)continue;if(!e&&a.popupRef){const e=r.get(a.popupRef);e?e.push(n):r.set(a.popupRef,[n])}const i=n.render();a.hidden&&(i.style.visibility="hidden"),te(this,Ak,Ek).call(this,i,a.id),n.annotationEditorType>0&&(Q(this,_k).set(n.data.id,n),null==(t=this._annotationEditorUIManager)||t.renderAnnotationElement(n))}te(this,Ck,Mk).call(this)}update(e){let{viewport:t}=e;const n=this.div;this.viewport=t,zd(n,{rotation:t.rotation}),te(this,Ck,Mk).call(this),n.hidden=!1}getEditableAnnotations(){return Array.from(Q(this,_k).values())}getEditableAnnotation(e){return Q(this,_k).get(e)}},xk=new WeakMap,Sk=new WeakMap,_k=new WeakMap,Ak=new WeakSet,Ek=function(e,t){var n;const i=e.firstChild||e;i.id="".concat(Ph).concat(t),this.div.append(e),null==(n=Q(this,xk))||n.moveElementInDOM(this.div,e,i,!1)},Ck=new WeakSet,Mk=function(){if(!Q(this,Sk))return;const e=this.div;for(const[t,n]of Q(this,Sk)){const i=e.querySelector('[data-annotation-id="'.concat(t,'"]'));if(!i)continue;n.className="annotationContent";const{firstChild:r}=i;r?"CANVAS"===r.nodeName?r.replaceWith(n):r.classList.contains("annotationContent")?r.after(n):r.before(n):i.append(n)}Q(this,Sk).clear()},Pk);const nx=/\r\n?|\n/g;var ix,rx,sx,ax,ox,lx,cx,ux,hx,dx,fx,px,gx,mx,vx,yx,bx,wx,kx,xx,Sx,_x,Ax,Ex,Cx,Mx,Px,Tx;const Rx=class e extends _m{constructor(t){super({...t,name:"freeTextEditor"}),J(this,fx),J(this,gx),J(this,vx),J(this,bx),J(this,Sx),J(this,Ax),J(this,Px),J(this,ix,this.editorDivBlur.bind(this)),J(this,rx,this.editorDivFocus.bind(this)),J(this,sx,this.editorDivInput.bind(this)),J(this,ax,this.editorDivKeydown.bind(this)),J(this,ox,this.editorDivPaste.bind(this)),J(this,lx,void 0),J(this,cx,""),J(this,ux,"".concat(this.id,"-editor")),J(this,hx,void 0),J(this,dx,null),Z(this,lx,t.color||e._defaultColor||_m._defaultLineColor),Z(this,hx,t.fontSize||e._defaultFontSize)}static get _keyboardManager(){const t=e.prototype,n=e=>e.isEmpty(),i=mg.TRANSLATE_SMALL,r=mg.TRANSLATE_BIG;return oh(this,"_keyboardManager",new Df([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-i,0],checker:n}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-r,0],checker:n}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[i,0],checker:n}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[r,0],checker:n}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-i],checker:n}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-r],checker:n}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,i],checker:n}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,r],checker:n}]]))}static initialize(e,t){_m.initialize(e,t,{strings:["pdfjs-free-text-default-content"]});const n=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(n.getPropertyValue("--freetext-padding"))}
2static updateDefaultParams(t,n){switch(t){case yu.FREETEXT_SIZE:e._defaultFontSize=n;break;case yu.FREETEXT_COLOR:e._defaultColor=n}}updateParams(e,t){switch(e){case yu.FREETEXT_SIZE:te(this,fx,px).call(this,t);break;case yu.FREETEXT_COLOR:te(this,gx,mx).call(this,t)}}static get defaultPropertiesToUpdate(){return[[yu.FREETEXT_SIZE,e._defaultFontSize],[yu.FREETEXT_COLOR,e._defaultColor||_m._defaultLineColor]]}get propertiesToUpdate(){return[[yu.FREETEXT_SIZE,Q(this,hx)],[yu.FREETEXT_COLOR,Q(this,lx)]]}_translateEmpty(e,t){this._uiManager.translateSelectedEditors(e,t,!0)}getInitialTranslation(){const t=this.parentScale;return[-e._internalPadding*t,-(e._internalPadding+Q(this,hx))*t]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(vu.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",Q(this,ax)),this.editorDiv.addEventListener("focus",Q(this,rx)),this.editorDiv.addEventListener("blur",Q(this,ix)),this.editorDiv.addEventListener("input",Q(this,sx)),this.editorDiv.addEventListener("paste",Q(this,ox)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",Q(this,ux)),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",Q(this,ax)),this.editorDiv.removeEventListener("focus",Q(this,rx)),this.editorDiv.removeEventListener("blur",Q(this,ix)),this.editorDiv.removeEventListener("input",Q(this,sx)),this.editorDiv.removeEventListener("paste",Q(this,ox)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var e;this.width||(this.enableEditMode(),this.editorDiv.focus(),null!=(e=this._initialOptions)&&e.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=Q(this,cx),t=Z(this,cx,te(this,vx,yx).call(this).trimEnd());if(e===t)return;const n=e=>{Z(this,cx,e),e?(te(this,Sx,_x).call(this),this._uiManager.rebuild(this),te(this,bx,wx).call(this)):this.remove()};this.addCommands({cmd:()=>{n(t)},undo:()=>{n(e)},mustExec:!1}),te(this,bx,wx).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(t){e._keyboardManager.exec(this,t)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",Q(this,ux)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text"),this.enableEditing(),_m._l10nPromise.get("pdfjs-free-text-default-content").then((e=>{var t;return null==(t=this.editorDiv)?void 0:t.setAttribute("default-content",e)})),this.editorDiv.contentEditable=!0;const{style:n}=this.editorDiv;if(n.fontSize="calc(".concat(Q(this,hx),"px * var(--scale-factor))"),n.color=Q(this,lx),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),Sf(this,this.div,["dblclick","keydown"]),this.width){const[n,i]=this.parentDimensions;
2if(this.annotationElementId){const{position:r}=Q(this,dx);let[s,a]=this.getInitialTranslation();[s,a]=this.pageTranslationToScreen(s,a);const[o,l]=this.pageDimensions,[c,u]=this.pageTranslation;let h,d;switch(this.rotation){case 0:h=e+(r[0]-c)/o,d=t+this.height-(r[1]-u)/l;break;case 90:h=e+(r[0]-c)/o,d=t-(r[1]-u)/l,[s,a]=[a,-s];break;case 180:h=e-this.width+(r[0]-c)/o,d=t-(r[1]-u)/l,[s,a]=[-s,-a];break;case 270:h=e+(r[0]-c-this.height*l)/o,d=t+(r[1]-u-this.width*o)/l,[s,a]=[-a,s]}this.setAt(h*n,d*i,s,a)}else this.setAt(e*n,t*i,this.width*n,this.height*i);te(this,Sx,_x).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(t){var n,i,r;const s=t.clipboardData||window.clipboardData,{types:a}=s;if(1===a.length&&"text/plain"===a[0])return;t.preventDefault();const o=te(n=e,Cx,Mx).call(n,s.getData("text")||"").replaceAll(nx,"\n");if(!o)return;const l=window.getSelection();if(!l.rangeCount)return;this.editorDiv.normalize(),l.deleteFromDocument();const c=l.getRangeAt(0);if(!o.includes("\n"))return c.insertNode(document.createTextNode(o)),this.editorDiv.normalize(),void l.collapseToStart();const{startContainer:u,startOffset:h}=c,d=[],f=[];if(u.nodeType===Node.TEXT_NODE){const t=u.parentElement;if(f.push(u.nodeValue.slice(h).replaceAll(nx,"")),t!==this.editorDiv){let n=d;for(const r of this.editorDiv.childNodes)r!==t?n.push(te(i=e,kx,xx).call(i,r)):n=f}d.push(u.nodeValue.slice(0,h).replaceAll(nx,""))}else if(u===this.editorDiv){let t=d,n=0;for(const i of this.editorDiv.childNodes)n++===h&&(t=f),t.push(te(r=e,kx,xx).call(r,i))}Z(this,cx,"".concat(d.join("\n")).concat(o).concat(f.join("\n"))),te(this,Sx,_x).call(this);const p=new Range;let g=d.reduce(((e,t)=>e+t.length),0);for(const{firstChild:e}of this.editorDiv.childNodes)if(e.nodeType===Node.TEXT_NODE){const t=e.nodeValue.length;if(g<=t){p.setStart(e,g),p.setEnd(e,g);break}g-=t}l.removeAllRanges(),l.addRange(p)}get contentDiv(){return this.editorDiv}static deserialize(t,n,i){var r;let s=null;if(t instanceof zk){const{data:{defaultAppearanceData:{fontSize:e,fontColor:n},rect:i,rotation:r,id:a},textContent:o,textPosition:l,parent:{page:{pageNumber:c}}}=t;if(!o||0===o.length)return null;s=t={annotationType:vu.FREETEXT,color:Array.from(n),fontSize:e,value:o.join("\n"),position:l,pageIndex:c-1,rect:i.slice(0),rotation:r,id:a,deleted:!1}}const a=super.deserialize(t,n,i);return Z(a,hx,t.fontSize),Z(a,lx,Ah.makeHexColor(...t.color)),Z(a,cx,te(r=e,Cx,Mx).call(r,t.value)),a.annotationElementId=t.id||null,Z(a,dx,s),a}serialize(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const n=e._internalPadding*this.parentScale,i=this.getRect(n,n),r=_m._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:Q(this,lx)),s={annotationType:vu.FREETEXT,color:r,fontSize:Q(this,hx),value:te(this,Ax,Ex).call(this),pageIndex:this.pageIndex,rect:i,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return t?s:this.annotationElementId&&!te(this,Px,Tx).call(this,s)?null:(s.id=this.annotationElementId,s)}renderAnnotationElement(t){const n=super.renderAnnotationElement(t);if(this.deleted)return n;const{style:i}=n;i.fontSize="calc(".concat(Q(this,hx),"px * var(--scale-factor))"),i.color=Q(this,lx),n.replaceChildren();for(const e of Q(this,cx).split("\n")){const t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),n.append(t)}const r=e._internalPadding*this.parentScale;return t.updateEdited({rect:this.getRect(r,r),popupContent:Q(this,cx)}),n}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}};ix=new WeakMap,rx=new WeakMap,sx=new WeakMap,ax=new WeakMap,ox=new WeakMap,lx=new WeakMap,cx=new WeakMap,ux=new WeakMap,hx=new WeakMap,dx=new WeakMap,fx=new WeakSet,px=function(e){const t=e=>{this.editorDiv.style.fontSize="calc(".concat(e,"px * var(--scale-factor))"),this.translate(0,-(e-Q(this,hx))*this.parentScale),Z(this,hx,e),te(this,bx,wx).c
2all(this)},n=Q(this,hx);this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:yu.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},gx=new WeakSet,mx=function(e){const t=e=>{Z(this,lx,this.editorDiv.style.color=e)},n=Q(this,lx);this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:yu.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},vx=new WeakSet,yx=function(){var e;const t=[];this.editorDiv.normalize();for(const n of this.editorDiv.childNodes)t.push(te(e=Rx,kx,xx).call(e,n));return t.join("\n")},bx=new WeakSet,wx=function(){const[e,t]=this.parentDimensions;let n;if(this.isAttachedToDOM)n=this.div.getBoundingClientRect();else{const{currentLayer:e,div:t}=this,i=t.style.display,r=t.classList.contains("hidden");t.classList.remove("hidden"),t.style.display="hidden",e.div.append(this.div),n=t.getBoundingClientRect(),t.remove(),t.style.display=i,t.classList.toggle("hidden",r)}this.rotation%180===this.parentRotation%180?(this.width=n.width/e,this.height=n.height/t):(this.width=n.height/e,this.height=n.width/t),this.fixAndSetPosition()},kx=new WeakSet,xx=function(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(nx,"")},Sx=new WeakSet,_x=function(){if(this.editorDiv.replaceChildren(),Q(this,cx))for(const e of Q(this,cx).split("\n")){const t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(t)}},Ax=new WeakSet,Ex=function(){return Q(this,cx).replaceAll("\xa0"," ")},Cx=new WeakSet,Mx=function(e){return e.replaceAll(" ","\xa0")},Px=new WeakSet,Tx=function(e){const{value:t,fontSize:n,color:i,pageIndex:r}=Q(this,dx);return this._hasBeenMoved||e.value!==t||e.fontSize!==n||e.color.some(((e,t)=>e!==i[t]))||e.pageIndex!==r},J(Rx,kx),J(Rx,Cx),K(Rx,"_freeTextDefaultContent",""),K(Rx,"_internalPadding",0),K(Rx,"_defaultColor",null),K(Rx,"_defaultFontSize",10),K(Rx,"_type","freetext"),K(Rx,"_editorType",vu.FREETEXT);let Lx=Rx;var Ix,Dx,Nx,Fx,Ox,Wx,jx,Bx,zx,Ux,Hx,Vx,qx,Gx,Xx,Yx,Kx,$x,Qx,Jx,Zx,eS,tS,nS,iS,rS,sS,aS,oS,lS,cS,uS,hS;class dS{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];J(this,Fx),J(this,Wx),J(this,Bx),J(this,Ux),J(this,Vx),J(this,Ix,void 0),J(this,Dx,[]),J(this,Nx,[]);let r=1/0,s=-1/0,a=1/0,o=-1/0;const l=10**-4;for(const{x:g,y:m,width:v,height:y}of e){const e=Math.floor((g-t)/l)*l,n=Math.ceil((g+v+t)/l)*l,i=Math.floor((m-t)/l)*l,c=Math.ceil((m+y+t)/l)*l,u=[e,i,c,!0],h=[n,i,c,!1];Q(this,Dx).push(u,h),r=Math.min(r,e),s=Math.max(s,n),a=Math.min(a,i),o=Math.max(o,c)}const c=s-r+2*n,u=o-a+2*n,h=r-n,d=a-n,f=Q(this,Dx).at(i?-1:-2),p=[f[0],f[2]];for(const g of Q(this,Dx)){const[e,t,n]=g;g[0]=(e-h)/c,g[1]=(t-d)/u,g[2]=(n-d)/u}Z(this,Ix,{x:h,y:d,width:c,height:u,lastPoint:p})}getOutlines(){Q(this,Dx).sort(((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2]));const e=[];for(const t of Q(this,Dx))t[3]?(e.push(...te(this,Vx,qx).call(this,t)),te(this,Bx,zx).call(this,t)):(te(this,Ux,Hx).call(this,t),e.push(...te(this,Vx,qx).call(this,t)));return te(this,Fx,Ox).call(this,e)}}Ix=new WeakMap,Dx=new WeakMap,Nx=new WeakMap,Fx=new WeakSet,Ox=function(e){const t=[],n=new Set;for(const s of e){const[e,n,i]=s;t.push([e,n,s],[e,i,s])}t.sort(((e,t)=>e[1]-t[1]||e[0]-t[0]));for(let s=0,a=t.length;s<a;s+=2){const e=t[s][2],i=t[s+1][2];e.push(i),i.push(e),n.add(e),n.add(i)}const i=[];let r;for(;n.size>0;){const e=n.values().next().value;let[t,s,a,o,l]=e;n.delete(e);let c=t,u=s;for(r=[t,a],i.push(r);;){let e;if(n.has(o))e=o;else{if(!n.has(l))break;e=l}n.delete(e),[t,s,a,o,l]=e,c!==t&&(r.push(c,u,t,u===s?s:a),c=t),u=u===s?a:s}r.push(c,u)}return new pS(i,Q(this,Ix))},Wx=new WeakSet,jx=function(e){const t=Q(this,Nx);let n=0,i=t.length-1;for(;n<=i;){const r=n+i>>1,s=t[r][0];if(s===e)return r;s<e?n=r+1:i=r-1}return i+1},Bx=new WeakSet,zx=function(e){let[,t,n]=e;const i=te(this,Wx,jx).call(this,t);Q(this,Nx).splice(i,0,[t,n])},Ux=new WeakSet,Hx=function(e){let[,t,n]=e;const i=te(this,Wx,jx).call(this,t);for(let r=i;r<Q(this,Nx).length;r++){const[e,i]=Q(this,Nx)[r];if(e!==t)break;
2if(e===t&&i===n)return void Q(this,Nx).splice(r,1)}for(let r=i-1;r>=0;r--){const[e,i]=Q(this,Nx)[r];if(e!==t)break;if(e===t&&i===n)return void Q(this,Nx).splice(r,1)}},Vx=new WeakSet,qx=function(e){const[t,n,i]=e,r=[[t,n,i]],s=te(this,Wx,jx).call(this,i);for(let a=0;a<s;a++){const[e,n]=Q(this,Nx)[a];for(let i=0,s=r.length;i<s;i++){const[,a,o]=r[i];if(!(n<=a||o<=e)){if(a>=e){if(o>n)r[i][1]=n;else{if(1===s)return[];r.splice(i,1),i--,s--}continue}r[i][2]=e,o>n&&r.push([t,n,o])}}}return r};class fS{toSVGPath(){throw new Error("Abstract method `toSVGPath` must be implemented.")}get box(){throw new Error("Abstract getter `box` must be implemented.")}serialize(e,t){throw new Error("Abstract method `serialize` must be implemented.")}get free(){return this instanceof e_}}class pS extends fS{constructor(e,t){super(),J(this,Gx,void 0),J(this,Xx,void 0),Z(this,Xx,e),Z(this,Gx,t)}toSVGPath(){const e=[];for(const t of Q(this,Xx)){let[n,i]=t;e.push("M".concat(n," ").concat(i));for(let r=2;r<t.length;r+=2){const s=t[r],a=t[r+1];s===n?(e.push("V".concat(a)),i=a):a===i&&(e.push("H".concat(s)),n=s)}e.push("Z")}return e.join(" ")}serialize(e,t){let[n,i,r,s]=e;const a=[],o=r-n,l=s-i;for(const c of Q(this,Xx)){const e=new Array(c.length);for(let t=0;t<c.length;t+=2)e[t]=n+c[t]*o,e[t+1]=s-c[t+1]*l;a.push(e)}return a}get box(){return Q(this,Gx)}}Gx=new WeakMap,Xx=new WeakMap;const gS=class e{constructor(t,n,i,r,s){let{x:a,y:o}=t,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;J(this,uS),J(this,Yx,void 0),J(this,Kx,[]),J(this,$x,void 0),J(this,Qx,void 0),J(this,Jx,[]),J(this,Zx,new Float64Array(18)),J(this,eS,void 0),J(this,tS,void 0),J(this,nS,void 0),J(this,iS,void 0),J(this,rS,void 0),J(this,sS,void 0),J(this,aS,[]),Z(this,Yx,n),Z(this,sS,r*i),Z(this,Qx,s),Q(this,Zx).set([NaN,NaN,NaN,NaN,a,o],6),Z(this,$x,l),Z(this,iS,Q(e,oS)*i),Z(this,nS,Q(e,cS)*i),Z(this,rS,i),Q(this,aS).push(a,o)}get free(){return!0}isEmpty(){return isNaN(Q(this,Zx)[8])}add(e){let{x:t,y:n}=e;var i;Z(this,eS,t),Z(this,tS,n);const[r,s,a,o]=Q(this,Yx);let[l,c,u,h]=Q(this,Zx).subarray(8,12);const d=t-u,f=n-h,p=Math.hypot(d,f);if(p<Q(this,nS))return!1;const g=p-Q(this,iS),m=g/p,v=m*d,y=m*f;let b=l,w=c;l=u,c=h,u+=v,h+=y,null==(i=Q(this,aS))||i.push(t,n);const k=v/g,x=-y/g*Q(this,sS),S=k*Q(this,sS);return Q(this,Zx).set(Q(this,Zx).subarray(2,8),0),Q(this,Zx).set([u+x,h+S],4),Q(this,Zx).set(Q(this,Zx).subarray(14,18),12),Q(this,Zx).set([u-x,h-S],16),isNaN(Q(this,Zx)[6])?(0===Q(this,Jx).length&&(Q(this,Zx).set([l+x,c+S],2),Q(this,Jx).push(NaN,NaN,NaN,NaN,(l+x-r)/a,(c+S-s)/o),Q(this,Zx).set([l-x,c-S],14),Q(this,Kx).push(NaN,NaN,NaN,NaN,(l-x-r)/a,(c-S-s)/o)),Q(this,Zx).set([b,w,l,c,u,h],6),!this.isEmpty()):(Q(this,Zx).set([b,w,l,c,u,h],6),Math.abs(Math.atan2(w-c,b-l)-Math.atan2(y,v))<Math.PI/2?([l,c,u,h]=Q(this,Zx).subarray(2,6),Q(this,Jx).push(NaN,NaN,NaN,NaN,((l+u)/2-r)/a,((c+h)/2-s)/o),[l,c,b,w]=Q(this,Zx).subarray(14,18),Q(this,Kx).push(NaN,NaN,NaN,NaN,((b+l)/2-r)/a,((w+c)/2-s)/o),!0):([b,w,l,c,u,h]=Q(this,Zx).subarray(0,6),Q(this,Jx).push(((b+5*l)/6-r)/a,((w+5*c)/6-s)/o,((5*l+u)/6-r)/a,((5*c+h)/6-s)/o,((l+u)/2-r)/a,((c+h)/2-s)/o),[u,h,l,c,b,w]=Q(this,Zx).subarray(12,18),Q(this,Kx).push(((b+5*l)/6-r)/a,((w+5*c)/6-s)/o,((5*l+u)/6-r)/a,((5*c+h)/6-s)/o,((l+u)/2-r)/a,((c+h)/2-s)/o),!0))}toSVGPath(){if(this.isEmpty())return"";const e=Q(this,Jx),t=Q(this,Kx),n=Q(this,Zx).subarray(4,6),i=Q(this,Zx).subarray(16,18),[r,s,a,o]=Q(this,Yx),[l,c,u,h]=te(this,uS,hS).call(this);if(isNaN(Q(this,Zx)[6])&&!this.isEmpty())return"M".concat((Q(this,Zx)[2]-r)/a," ").concat((Q(this,Zx)[3]-s)/o," L").concat((Q(this,Zx)[4]-r)/a," ").concat((Q(this,Zx)[5]-s)/o," L").concat(l," ").concat(c," L").concat(u," ").concat(h," L").concat((Q(this,Zx)[16]-r)/a," ").concat((Q(this,Zx)[17]-s)/o," L").concat((Q(this,Zx)[14]-r)/a," ").concat((Q(this,Zx)[15]-s)/o," Z");const d=[];d.push("M".concat(e[4]," ").concat(e[5]));for(let f=6;f<e.length;f+=6)isNaN(e[f])?d.push("L".concat(e[f+4]," ").concat(e[f+5])):d.push("C".concat(e[f]," ").concat(e[f+1]," ").concat(e[f+2]," ").concat(e[f+3]," ").concat(e[f+4]," ").concat(e[f+5]));d.push("L".concat((n[0]-r)/a," ").concat((n[1]-s)/o," L").concat(l," ").concat(c," L").concat(u," ").concat(h," L").concat((i[0]-r)/a," ").concat((i[1]-s)/o));for(let f=t.length-6;f>=6;f-=6)isNaN(t[f])?d.push("L".concat(t[f+4]," ").concat(t[f+5])):d.push("C".concat(t[f]," ").concat(t[f+1]," ").concat(t[f+2]," ").concat(t[f+3]," ").concat(t[f+4]," ").concat(t[f+5]));return d.push("L".concat(t[4]," ").concat(t[5]," Z")),d.join(" ")}getOutlines(){var e,t;
2const n=Q(this,Jx),i=Q(this,Kx),r=Q(this,Zx),s=r.subarray(4,6),a=r.subarray(16,18),[o,l,c,u]=Q(this,Yx),h=new Float64Array((null!==(e=null==(t=Q(this,aS))?void 0:t.length)&&void 0!==e?e:0)+2);for(let y=0,b=h.length-2;y<b;y+=2)h[y]=(Q(this,aS)[y]-o)/c,h[y+1]=(Q(this,aS)[y+1]-l)/u;h[h.length-2]=(Q(this,eS)-o)/c,h[h.length-1]=(Q(this,tS)-l)/u;const[d,f,p,g]=te(this,uS,hS).call(this);if(isNaN(r[6])&&!this.isEmpty()){const e=new Float64Array(36);return e.set([NaN,NaN,NaN,NaN,(r[2]-o)/c,(r[3]-l)/u,NaN,NaN,NaN,NaN,(r[4]-o)/c,(r[5]-l)/u,NaN,NaN,NaN,NaN,d,f,NaN,NaN,NaN,NaN,p,g,NaN,NaN,NaN,NaN,(r[16]-o)/c,(r[17]-l)/u,NaN,NaN,NaN,NaN,(r[14]-o)/c,(r[15]-l)/u],0),new e_(e,h,Q(this,Yx),Q(this,rS),Q(this,$x),Q(this,Qx))}const m=new Float64Array(Q(this,Jx).length+24+Q(this,Kx).length);let v=n.length;for(let y=0;y<v;y+=2)isNaN(n[y])?m[y]=m[y+1]=NaN:(m[y]=n[y],m[y+1]=n[y+1]);m.set([NaN,NaN,NaN,NaN,(s[0]-o)/c,(s[1]-l)/u,NaN,NaN,NaN,NaN,d,f,NaN,NaN,NaN,NaN,p,g,NaN,NaN,NaN,NaN,(a[0]-o)/c,(a[1]-l)/u],v),v+=24;for(let y=i.length-6;y>=6;y-=6)for(let e=0;e<6;e+=2)isNaN(i[y+e])?(m[v]=m[v+1]=NaN,v+=2):(m[v]=i[y+e],m[v+1]=i[y+e+1],v+=2);return m.set([NaN,NaN,NaN,NaN,i[4],i[5]],v),new e_(m,h,Q(this,Yx),Q(this,rS),Q(this,$x),Q(this,Qx))}};Yx=new WeakMap,Kx=new WeakMap,$x=new WeakMap,Qx=new WeakMap,Jx=new WeakMap,Zx=new WeakMap,eS=new WeakMap,tS=new WeakMap,nS=new WeakMap,iS=new WeakMap,rS=new WeakMap,sS=new WeakMap,aS=new WeakMap,oS=new WeakMap,lS=new WeakMap,cS=new WeakMap,uS=new WeakSet,hS=function(){const e=Q(this,Zx).subarray(4,6),t=Q(this,Zx).subarray(16,18),[n,i,r,s]=Q(this,Yx);return[(Q(this,eS)+(e[0]-t[0])/2-n)/r,(Q(this,tS)+(e[1]-t[1])/2-i)/s,(Q(this,eS)+(t[0]-e[0])/2-n)/r,(Q(this,tS)+(t[1]-e[1])/2-i)/s]},J(gS,oS,8),J(gS,lS,2),J(gS,cS,Q(gS,oS)+Q(gS,lS));let mS=gS;var vS,yS,bS,wS,kS,xS,SS,_S,AS,ES,CS,MS,PS,TS,RS,LS,IS,DS,NS,FS,OS,WS,jS,BS,zS,US,HS,VS,qS,GS,XS,YS,KS,$S,QS,JS,ZS;class e_ extends fS{constructor(e,t,n,i,r,s){super(),J(this,_S),J(this,ES),J(this,MS),J(this,vS,void 0),J(this,yS,null),J(this,bS,void 0),J(this,wS,void 0),J(this,kS,void 0),J(this,xS,void 0),J(this,SS,void 0),Z(this,SS,e),Z(this,kS,t),Z(this,vS,n),Z(this,xS,i),Z(this,bS,r),Z(this,wS,s),te(this,MS,PS).call(this,s);const{x:a,y:o,width:l,height:c}=Q(this,yS);for(let u=0,h=e.length;u<h;u+=2)e[u]=(e[u]-a)/l,e[u+1]=(e[u+1]-o)/c;for(let u=0,h=t.length;u<h;u+=2)t[u]=(t[u]-a)/l,t[u+1]=(t[u+1]-o)/c}toSVGPath(){const e=["M".concat(Q(this,SS)[4]," ").concat(Q(this,SS)[5])];for(let t=6,n=Q(this,SS).length;t<n;t+=6)isNaN(Q(this,SS)[t])?e.push("L".concat(Q(this,SS)[t+4]," ").concat(Q(this,SS)[t+5])):e.push("C".concat(Q(this,SS)[t]," ").concat(Q(this,SS)[t+1]," ").concat(Q(this,SS)[t+2]," ").concat(Q(this,SS)[t+3]," ").concat(Q(this,SS)[t+4]," ").concat(Q(this,SS)[t+5]));return e.push("Z"),e.join(" ")}serialize(e,t){let[n,i,r,s]=e;const a=r-n,o=s-i;let l,c;switch(t){case 0:l=te(this,_S,AS).call(this,Q(this,SS),n,s,a,-o),c=te(this,_S,AS).call(this,Q(this,kS),n,s,a,-o);break;case 90:l=te(this,ES,CS).call(this,Q(this,SS),n,i,a,o),c=te(this,ES,CS).call(this,Q(this,kS),n,i,a,o);break;case 180:l=te(this,_S,AS).call(this,Q(this,SS),r,i,-a,o),c=te(this,_S,AS).call(this,Q(this,kS),r,i,-a,o);break;case 270:l=te(this,ES,CS).call(this,Q(this,SS),r,s,-a,-o),c=te(this,ES,CS).call(this,Q(this,kS),r,s,-a,-o)}return{outline:Array.from(l),points:[Array.from(c)]}}get box(){return Q(this,yS)}getNewOutline(e,t){const{x:n,y:i,width:r,height:s}=Q(this,yS),[a,o,l,c]=Q(this,vS),u=r*l,h=s*c,d=n*l+a,f=i*c+o,p=new mS({x:Q(this,kS)[0]*u+d,y:Q(this,kS)[1]*h+f},Q(this,vS),Q(this,xS),e,Q(this,wS),null!==t&&void 0!==t?t:Q(this,bS));for(let g=2;g<Q(this,kS).length;g+=2)p.add({x:Q(this,kS)[g]*u+d,y:Q(this,kS)[g+1]*h+f});return p.getOutlines()}}vS=new WeakMap,yS=new WeakMap,bS=new WeakMap,wS=new WeakMap,kS=new WeakMap,xS=new WeakMap,SS=new WeakMap,_S=new WeakSet,AS=function(e,t,n,i,r){const s=new Float64Array(e.length);for(let a=0,o=e.length;a<o;a+=2)s[a]=t+e[a]*i,s[a+1]=n+e[a+1]*r;return s},ES=new WeakSet,CS=function(e,t,n,i,r){const s=new Float64Array(e.length);for(let a=0,o=e.length;a<o;a+=2)s[a]=t+e[a+1]*i,s[a+1]=n+e[a]*r;return s},MS=new WeakSet,PS=function(e){const t=Q(this,SS);let n=t[4],i=t[5],r=n,s=i,a=n,o=i,l=n,c=i;const u=e?Math.max:Math.min;for(let g=6,m=t.length;g<m;g+=6){if(isNaN(t[g]))r=Math.min(r,t[g+4]),s=Math.min(s,t[g+5]),a=Math.max(a,t[g+4]),o=Math.max(o,t[g+5]),c<t[g+5]?(l=t[g+4],c=t[g+5]):c===t[g+5]&&(l=u(l,t[g+4]));else{const e=Ah.bezierBoundingBox(n,i,...t.slice(g,g+6));r=Math.min(r,e[0]),s=Math.min(s,e[1]),a=Math.max(a,e[2]),o=Math.max(o,e[3]),c<e[3]?(l=e[2],c=e[3]):c===e[3]&&(l=u(l,e[2]))}n=t[g+4],i=t[g+5]}const h=r-Q(this,bS),d=s-Q(this,bS),f=a-r+2*Q(this,bS),p=o-s+2*Q(this,bS);Z(this,yS,{x:h,y:d,width:f,height:p,lastPoint:[l,c]})};const t_=class e{constructor(e){let{editor:t=null,uiManager:n=null}=e;var i;J(this,US),J(this,VS),J(this,GS),J(this,YS),J(this,$S),J(this,JS),J(this,TS,te(this,GS,XS).bind(this)),J(this,RS,te(this,$S,QS).bind(this)),J(this,LS,null),J(this,IS,null),J(this,DS,void 0),J(this,NS,null),J(this,FS,!1),J(this,OS,!1),J(this,WS,null),J(this,jS,void 0),J(this,BS,null),J(this,zS,void 0),t?(Z(this,OS,!1),Z(this,zS,yu.HIGHLIGHT_COLOR),Z(this,WS,t)):(Z(this,OS,!0),Z(this,zS,yu.HIGHLIGHT_DEFAULT_COLOR)),Z(this,BS,(null==t?void 0:t._uiManager)||n),Z(this,jS,Q(this,BS)._eventBus),Z(this,DS,(null==t?void 0:t.color)||(null==(i=Q(this,BS))?void 0:i.highlightColors.values().next().value)||"#FFFF98")}static get _keyboardManager(){return oh(this,"_keyboardManager",new Df([[["Escape","mac+Escape"],e.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],e.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],e.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],e.prototype._moveToPrevious],[["Home","mac+Home"],e.prototype._moveToBeginning],[["End","mac+End"],e.prototype._moveToEnd]]))}renderButton(){const e=Z(this,LS,document.createElement("button"));
2e.className="colorPicker",e.tabIndex="0",e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),e.setAttribute("aria-haspopup",!0),e.addEventListener("click",te(this,YS,KS).bind(this)),e.addEventListener("keydown",Q(this,TS));const t=Z(this,IS,document.createElement("span"));return t.className="swatch",t.setAttribute("aria-hidden",!0),t.style.backgroundColor=Q(this,DS),e.append(t),e}renderMainDropdown(){const e=Z(this,NS,te(this,US,HS).call(this));return e.setAttribute("aria-orientation","horizontal"),e.setAttribute("aria-labelledby","highlightColorPickerLabel"),e}_colorSelectFromKeyboard(e){if(e.target===Q(this,LS))return void te(this,YS,KS).call(this,e);const t=e.target.getAttribute("data-color");t&&te(this,VS,qS).call(this,t,e)}_moveToNext(e){var t,n;Q(this,JS,ZS)?e.target!==Q(this,LS)?null==(n=e.target.nextSibling)||n.focus():null==(t=Q(this,NS).firstChild)||t.focus():te(this,YS,KS).call(this,e)}_moveToPrevious(e){var t,n;e.target!==(null==(t=Q(this,NS))?void 0:t.firstChild)&&e.target!==Q(this,LS)?(Q(this,JS,ZS)||te(this,YS,KS).call(this,e),null==(n=e.target.previousSibling)||n.focus()):Q(this,JS,ZS)&&this._hideDropdownFromKeyboard()}_moveToBeginning(e){var t;Q(this,JS,ZS)?null==(t=Q(this,NS).firstChild)||t.focus():te(this,YS,KS).call(this,e)}_moveToEnd(e){var t;Q(this,JS,ZS)?null==(t=Q(this,NS).lastChild)||t.focus():te(this,YS,KS).call(this,e)}hideDropdown(){var e;null==(e=Q(this,NS))||e.classList.add("hidden"),window.removeEventListener("pointerdown",Q(this,RS))}_hideDropdownFromKeyboard(){var e;if(!Q(this,OS)){if(!Q(this,JS,ZS))return void(null==(e=Q(this,WS))||e.unselect());this.hideDropdown(),Q(this,LS).focus({preventScroll:!0,focusVisible:Q(this,FS)})}}updateColor(e){if(Q(this,IS)&&(Q(this,IS).style.backgroundColor=e),!Q(this,NS))return;const t=Q(this,BS).highlightColors.values();for(const n of Q(this,NS).children)n.setAttribute("aria-selected",t.next().value===e)}destroy(){var e,t;null==(e=Q(this,LS))||e.remove(),Z(this,LS,null),Z(this,IS,null),null==(t=Q(this,NS))||t.remove(),Z(this,NS,null)}};TS=new WeakMap,RS=new WeakMap,LS=new WeakMap,IS=new WeakMap,DS=new WeakMap,NS=new WeakMap,FS=new WeakMap,OS=new WeakMap,WS=new WeakMap,jS=new WeakMap,BS=new WeakMap,zS=new WeakMap,US=new WeakSet,HS=function(){const e=document.createElement("div");e.addEventListener("contextmenu",Id),e.className="dropdown",e.role="listbox",e.setAttribute("aria-multiselectable",!1),e.setAttribute("aria-orientation","vertical"),e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown");for(const[t,n]of Q(this,BS).highlightColors){const i=document.createElement("button");i.tabIndex="0",i.role="option",i.setAttribute("data-color",n),i.title=t,i.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-".concat(t));const r=document.createElement("span");i.append(r),r.className="swatch",r.style.backgroundColor=n,i.setAttribute("aria-selected",n===Q(this,DS)),i.addEventListener("click",te(this,VS,qS).bind(this,n)),e.append(i)}return e.addEventListener("keydown",Q(this,TS)),e},VS=new WeakSet,qS=function(e,t){t.stopPropagation(),Q(this,jS).dispatch("switchannotationeditorparams",{source:this,type:Q(this,zS),value:e})},GS=new WeakSet,XS=function(e){t_._keyboardManager.exec(this,e)},YS=new WeakSet,KS=function(e){if(Q(this,JS,ZS))return void this.hideDropdown();if(Z(this,FS,0===e.detail),window.addEventListener("pointerdown",Q(this,RS)),Q(this,NS))return void Q(this,NS).classList.remove("hidden");const t=Z(this,NS,te(this,US,HS).call(this));Q(this,LS).append(t)},$S=new WeakSet,QS=function(e){var t;null!=(t=Q(this,NS))&&t.contains(e.target)||this.hideDropdown()},JS=new WeakSet,ZS=function(){return Q(this,NS)&&!Q(this,NS).classList.contains("hidden")};let n_=t_;var i_,r_,s_,a_,o_,l_,c_,u_,h_,d_,f_,p_,g_,m_,v_,y_,b_,w_,k_,x_,S_,__,A_,E_,C_,M_,P_,T_,R_,L_,I_,D_,N_,F_,O_,W_,j_,B_,z_,U_,H_,V_,q_,G_,X_,Y_,K_,$_,Q_;const J_=class e extends _m{constructor(t){super({...t,name:"highlightEditor"}),J(this,x_),J(this,__),J(this,E_),J(this,M_),J(this,T_),J(this,L_),J(this,D_),J(this,W_),J(this,B_),J(this,U_),J(this,V_),J(this,G_),J(this,i_,null),J(this,r_,0),J(this,s_,void 0),J(this,a_,null),J(this,o_,null),J(this,l_,null),J(this,c_,null),J(this,u_,0),J(this,h_,null),J(this,d_,null),J(this,f_,null),J(this,p_,!1),J(this,g_,te(this,W_,j_).bind(this)),J(this,m_,null),J(this,v_,void 0),J(this,y_,null),J(this,b_,""),J(this,w_,void 0),J(this,k_,""),this.color=t.color||e._defaultColor,Z(this,w_,t.thickness||e._defaultThickness),Z(this,v_,t.opacity||e._defaultOpacity),Z(this,s_,t.boxes||null),Z(this,k_,t.methodOfCreation||""),Z(this,b_,t.text||""),this._isDraggable=!1,t.highlightId>-1?(Z(this,p_,!0),te(this,__,A_).call(this,t),te(this,D_,N_).call(this)):(Z(this,i_,t.anchorNode),Z(this,r_,t.anchorOffset),Z(this,c_,t.focusNode),Z(this,u_,t.focusOffset),te(this,x_,S_).call(this),te(this,D_,N_).call(this),this.rotate(this.rotation))}static get _keyboardManager(){const t=e.prototype;return oh(this,"_keyboardManager",new Df([[["ArrowLeft","mac+ArrowLeft"],t._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],t._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],t._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],t._moveCaret,{args:[3]}]]))}get telemetryInitialData(){return{action:"added",type:Q(this,p_)?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:Q(this,w_),methodOfCreation:Q(this,k_)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("
2color").size}}static initialize(t,n){var i;_m.initialize(t,n),e._defaultColor||(e._defaultColor=(null==(i=n.highlightColors)?void 0:i.values().next().value)||"#fff066")}static updateDefaultParams(t,n){switch(t){case yu.HIGHLIGHT_DEFAULT_COLOR:e._defaultColor=n;break;case yu.HIGHLIGHT_THICKNESS:e._defaultThickness=n}}translateInPage(e,t){}get toolbarPosition(){return Q(this,m_)}updateParams(e,t){switch(e){case yu.HIGHLIGHT_COLOR:te(this,E_,C_).call(this,t);break;case yu.HIGHLIGHT_THICKNESS:te(this,M_,P_).call(this,t)}}static get defaultPropertiesToUpdate(){return[[yu.HIGHLIGHT_DEFAULT_COLOR,e._defaultColor],[yu.HIGHLIGHT_THICKNESS,e._defaultThickness]]}get propertiesToUpdate(){return[[yu.HIGHLIGHT_COLOR,this.color||e._defaultColor],[yu.HIGHLIGHT_THICKNESS,Q(this,w_)||e._defaultThickness],[yu.HIGHLIGHT_FREE,Q(this,p_)]]}async addEditToolbar(){const e=await super.addEditToolbar();return e?(this._uiManager.highlightColors&&(Z(this,o_,new n_({editor:this})),e.addColorPicker(Q(this,o_))),e):null}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(te(this,U_,H_).call(this))}getBaseTranslation(){return[0,0]}getRect(e,t){return super.getRect(e,t,te(this,U_,H_).call(this))}onceAdded(){this.parent.addUndoableEditor(this),this.div.focus()}remove(){te(this,L_,I_).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(te(this,D_,N_).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){var t;let n=!1;this.parent&&!e?te(this,L_,I_).call(this):e&&(te(this,D_,N_).call(this,e),n=!this.parent&&(null==(t=this.div)?void 0:t.classList.contains("selectedEditor"))),super.setParent(e),this.show(this._isVisible),n&&this.select()}rotate(t){var n,i,r;const{drawLayer:s}=this.parent;let a;Q(this,p_)?(t=(t-this.rotation+360)%360,a=te(n=e,F_,O_).call(n,Q(this,d_).box,t)):a=te(i=e,F_,O_).call(i,this,t),s.rotate(Q(this,f_),t),s.rotate(Q(this,y_),t),s.updateBox(Q(this,f_),a),s.updateBox(Q(this,y_),te(r=e,F_,O_).call(r,Q(this,l_).box,t))}render(){if(this.div)return this.div;const e=super.render();Q(this,b_)&&(e.setAttribute("aria-label",Q(this,b_)),e.setAttribute("role","mark")),Q(this,p_)?e.classList.add("free"):this.div.addEventListener("keydown",Q(this,g_));const t=Z(this,h_,document.createElement("div"));e.append(t),t.setAttribute("aria-hidden","true"),t.className="internal",t.style.clipPath=Q(this,a_);const[n,i]=this.parentDimensions;return this.setDims(this.width*n,this.height*i),Sf(this,Q(this,h_),["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){this.parent.drawLayer.addClass(Q(this,y_),"hovered")}pointerleave(){this.parent.drawLayer.removeClass(Q(this,y_),"hovered")}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:te(this,B_,z_).call(this,!0);break;case 1:case 3:te(this,B_,z_).call(this,!1)}}select(){var e,t;super.select(),Q(this,y_)&&(null==(e=this.parent)||e.drawLayer.removeClass(Q(this,y_),"hovered"),null==(t=this.parent)||t.drawLayer.addClass(Q(this,y_),"selected"))}unselect(){var e;super.unselect(),Q(this,y_)&&(null==(e=this.parent)||e.drawLayer.removeClass(Q(this,y_),"selected"),Q(this,p_)||te(this,B_,z_).call(this,!1))}get _mustFixPosition(){return!Q(this,p_)}show(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._isVisible;super.show(e),this.parent&&(this.parent.drawLayer.show(Q(this,f_),e),this.parent.drawLayer.show(Q(this,y_),e))}static startHighlighting(e,t,n){let{target:i,x:r,y:s}=n;const{x:a,y:o,width:l,height:c}=i.getBoundingClientRect(),u=t=>{te(this,Y_,K_).call(this,e,t)},h={capture:!0,passive:!1},d=e=>{e.preventDefault(),e.stopPropagation()},f=t=>{i.removeEventListener("pointermove",u),window.removeEventListener("blur",f),window.removeEventListener("pointerup",f),window.removeEventListener("pointerdown",d,h),window.removeEventListener("contextmenu",Id),te(this,$_,Q_).call(this,e,t)};window.addEventListener("blur",f),window.addEventListener("pointerup",f),window.addEventListener("pointerdown",d,h),window.addEventListener("contextmenu",Id),i.addEventListener("pointermove",u),this._freeHighlight=new mS({x:r,y:s},[a,o,l,c],e.scale,this._defaultThickness/2,t,.001),({id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.highlight(this._freeHighlight,this._defaultColor,this._defaultOpacity,!0))}static deserialize(e,t,n){var i;const r=super.deserialize(e,t,n),{rect:[s,a,o,l],color:c,quadPoints:u}=e;r.color=Ah.makeHexColor(...c),Z(r,v_,e.opacity);const[h,d]=r.pageDimensions;r.width=(o-s)/h,r.height=(l-a)/d;const f=Z(r,s_,[]);for(let p=0;p<u.length;p+=8)f.push({x:(u[4]-o)/h,y:(l-(1-u[p+5]))/d,width:(u[p+2]-u[p])/h,height:(u[p+5]-u[p+1])/d});return te(i=r,x_,S_).call(i),r}serialize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty()||e)return null;const t=this.getRect(0,0),n=_m._colorManager.convert(this.color);return{annotationType:vu.HIGHLIGHT,color:n,opacity:Q(this,v_),thickness:Q(this,w_),quadPoints:te(this,V_,q_).call(this),outlines:te(this,G_,X_).call(this,t),pageIndex:this.pageIndex,rect:t,rotation:te(this,U_,H_).call(this),structTreeParentId:this._structTreeParentId}}static canCreateNewEmptyEditor(){return!1}};i_=new WeakMap,r_=new WeakMap,s_=new WeakMap,a_=new WeakMap,o_=new WeakMap,l_=new WeakMap,c_=new WeakMap,u_=new WeakMap,h_=new WeakMap,d_=new WeakMap,f_=new WeakMap,p_=new WeakMap,g_=new WeakMap,m_=new WeakMap,v_=new WeakMap,y_=new WeakMap,b_=new WeakMap,w_=new WeakMap,k_=new WeakMap,x_=new WeakSet,S_=function(){const e=new dS(Q(this,s_),.001);Z(this,d_,e.getOutlines()),({x:this.x,y:this.y,width:this.width,height:this.height}=Q(this,d_).box);const t=new dS(Q(this,s_),.0025,.001,"ltr"===this._uiManager.direction);Z(this,l_,t.getOutlines());const{lastPoint:n}=Q(this,l_).box;Z(this,m_,[(n[0]-this.x)/this.width,(n[1]-this.y)/this.height])},__=new WeakSet,A_=function(e){let{highlightOutlines:t,highlightId:n,clipPathId:i}=e;var r,s;if(Z(this,d_,t),Z(this,l_,t.getNewOutline(Q(this,w_)/2+1.5,.0025)),n>=0)Z(this,f_,n),Z(this,a_,i),this.parent.drawLayer.finalizeLine(n,t),Z(this,y_,this.parent.drawLayer.highlightOutline(Q(this,l_)));else if(this.parent){const e=this.parent.viewport.rotation;this.parent.drawLayer.updateLine(Q(this,f_),t),this.parent.drawLayer.updateBox(Q(this,f_),te(r=J_,F_,O_).call(r,Q(this,d_).box,(e-this.rotation+360)%360)),this.parent.drawLayer.updateLine(Q(this,y_),Q(this,l_)),this.parent.drawLayer.updateBox(Q(this,y_),te(s=J_,F_,O_).call(s,Q(this,l_).box,e))}const{x:a,y:o,width:l,height:c}=t.box;switch(this.rotation){case 0:this.x=a,this.y=o,this.width=l,this.height=c;break;case 90:{const[e,t]=this.parentDimensions;this.x=o,this.y=1-a,this.width=l*t/e,this.height=c*e/t;break}case 180:this.x=1-a,this.y=1-o,this.width=l,this.height=c;break;case 270:{const[e,t]=this.parentDimensions;this.x=1-o,this.y=a,this.width=l*t/e,this.height=c*e/t;break}}const{lastPoint:u}=Q(this,l_).box;Z(this,m_,[(u[0]-a)/l,(u[1]-o)/c])},E_=new WeakSet,C_=function(e){const t=e=>{var t,n;this.color=e,null==(t=this.parent)||t.drawLayer.changeColor(Q(this,f_),e),null==(n=Q(this,o_))||n.updateColor(e)},n=this.color;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:yu.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(e)},!0)},M_=new WeakSet,P_=function(e){const t=Q(this,w_),n=e=>{Z(this,w_,e),te(this,T_,R_).call(this,e)};this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,t),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:yu.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)},T_=new WeakSet,R_=function(e){if(!Q(this,p_))return;te(this,__,A_).call(this,{highlightOutlines:Q(this,d_).getNewOutline(e/2)}),this.fixAndSetPosition();const[t,n]=this.parentDimensions;this.setDims(this.width*t,this.height*n)},L_=new WeakSet,I_=function(){null===Q(this,f_)||!this.parent||(this.parent.drawLayer.remove(Q(this,f_)),Z(this,f_,null),this.parent.drawLayer.remove(Q(this,y_)),Z(this,y_,null))},D_=new WeakSet,N_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent;null===Q(this,f_)&&(({id:ee(this,f_)._,clipPathId:ee(this,a_)._}=e.drawLayer.highlight(Q(this,d_),this.color,Q(this,v_))),Z(this,y_,e.drawLayer.highlightOutline(Q(this,l_))),Q(this,h_)&&(Q(this,h_).style.clipPath=Q(this,a_)))},F_=new WeakSet,O_=function(e,t){let{x:n,y:i,width:r,height:s}=e;switch(t){case 90:return{x:1-i-s,y:n,width:s,height:r};case 180:return{x:1-n-r,y:1-i-s,width:r,height:s};case 270:return{x:i,y:1-n-r,width:s,height:r}}return{x:n,y:i,width:r,height:s}},W_=new WeakSet,j_=function(e){J_._keyboardManager.exec(this,e)},B_=new WeakSet,z_=function(e){if(!Q(this,i_))return;const t=window.getSelection();e?t.setPosition(Q(this,i_),Q(this,r_)):t.setPosition(Q(this,c_),Q(this,u_))},U_=new WeakSet,H_=function(){return Q(this,p_)?this.rotation:0},V_=new WeakSet,q_=function(){if(Q(this,p_))return null;const[e,t]=this.pageDimensions,n=Q(this,s_),i=new Array(8*n.length);let r=0;for(const{x:s,y:a,width:o,height:l}of n){const n=s*e,c=(1-a-l)*t;i[r]=i[r+4]=n,i[r+1]=i[r+3]=c,i[r+2]=i[r+6]=n+o*e,i[r+5]=i[r+7]=c+l*t,r+=8}return i},G_=new WeakSet,X_=function(e){return Q(this,d_).serialize(e,te(this,U_,H_).call(this))},Y_=new WeakSet,K_=function(e,t){this._freeHighlight.add(t)&&e.drawLayer.updatePath(this._freeHighlightId,this._freeHighlight)},$_=new WeakSet,Q_=function(e,t){this._freeHighlight.isEmpty()?e.drawLayer.removeFreeHighlight(this._freeHighlightId):e.createAndAddNewEditor(t,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""},J(J_,F_),J(J_,Y_),J(J_,$_),K(J_,"_defaultColor",null),K(J_,"_defaultOpacity",1),K(J_,"_defaultThickness",12),K(J_,"_l10nPromise"),K(J_,"_type","highlight"),K(J_,"_editorType",vu.HIGHLIGHT),K(J_,"_freeHighlightId",-1),K(J_,"_freeHighlight",null),K(J_,"_freeHighlightClipId","");let Z_=J_;var eA,tA,nA,iA,rA,sA,aA,oA,lA,cA,uA,hA,dA,fA,pA,gA,mA,vA,yA,bA,wA,kA,xA,SA,_A,AA,EA,CA,MA,PA,TA,RA,LA,IA,DA,NA,FA,OA,WA,jA,BA,zA,UA,HA,VA,qA,GA,XA,YA,KA,$A,QA,JA,ZA,eE,tE,nE,iE,rE,sE,aE,oE,lE,cE,uE,hE,dE;const fE=class e extends _m{constructor(e){super({...e,name:"inkEditor"}),J(this,gA),J(this,vA),J(this,bA),J(this,kA),J(this,SA),J(this,AA),J(this,CA),J(this,PA),J(this,RA),J(this,IA),J(this,NA),J(this,OA),J(this,jA),J(this,zA),J(this,HA),J(this,qA),J(this,XA),J(this,KA),J(this,QA),J(this,sE),J(this,oE),J(this,cE),J(this,hE),J(this,eA,0),J(this,tA,0),J(this,nA,this.canvasPointermove.bind(this)),J(this,iA,this.canvasPointerleave.bind(this)),J(this,rA,this.canvasPointerup.bind(this)),J(this,sA,this.canvasPointerdown.bind(this)),J(this,aA,null),J(this,oA,new Path2D),J(this,lA,!1),J(this,cA,!1),J(this,uA,!1),J(this,hA,null),J(this,dA,0),J(this,fA,0),J(this,pA,null),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(e,t){_m.initialize(e,t)}static updateDefaultParams(t,n){switch(t){case yu.INK_THICKNESS:e._defaultThickness=n;break;case yu.INK_COLOR:e._defaultColor=n;break;case yu.INK_OPACITY:e._defaultOpacity=n/100}}updateParams(e,t){switch(e){case yu.INK_THICKNESS:te(this,gA,mA).call(this,t);break;case yu.INK_COLOR:te(this,vA,yA).call(this,t);break;case yu.INK_OPACITY:te(this,bA,wA).call(this,t)}}static get defaultPropertiesToUpdate(){return[[yu.INK_THICKNESS,e._defaultThickness],[yu.INK_COLOR,e._defaultColor||_m._defaultLineColor],[yu.INK_OPACITY,Math.round(100*e._defaultOpacity)]]}get propertiesToUpdate(){var t;return[[yu.INK_THICKNESS,this.thickness||e._defaultThickness],[yu.INK_COLOR,this.color||e._defaultColor||_m._defaultLineColor],[yu.INK_OPACITY,Math.round(100*(null!==(t=this.opacity)&&void 0!==t?t:e._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.canvas||(te(this,HA,VA).call(this),te(this,qA,GA).call(this)),this.isAttachedToDOM||(this.parent.add(this),te(this,XA,YA).call(this)),te(this,hE,dE).call(this)))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,Q(this,aA)&&(clearTimeout(Q(this,aA)),Z(this,aA,null)),Q(this,hA).disconnect(),Z(this,hA,null),super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&null===e&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){const[e,t]=this.parentDimensions,n=this.width*e,i=this.height*t;this.setDimensions(n,i)}enableEditMode(){Q(this,lA)||null===this.canvas||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",Q(this,sA)))}disableEditMode(){!this.isInEditMode()||null===this.canvas||(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",Q(this,sA)))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}commit(){Q(this,lA)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),Z(this,lA,!0),this.div.classList.add("disabled"),te(this,hE,dE).call(this,!0),this.select(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),this.enableEditMode())}canvasPointerdown(e){0!==e.button||!this.isInEditMode()||Q(this,lA)||(this.setInForeground(),e.preventDefault(),this.div.contains(document.activeElement)||this.div.focus({preventScroll:!0}),te(this,AA,EA).call(this,e.offsetX,e.offsetY))}canvasPointermove(e){e.preventDefault(),te(this,CA,MA).call(this,e.offsetX,e.offsetY)}canvasPointerup(e){e.preventDefault(),te(this,zA,UA).call(this,e)}
2canvasPointerleave(e){te(this,zA,UA).call(this,e)}get isResizable(){return!this.isEmpty()&&Q(this,lA)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.div.setAttribute("data-l10n-id","pdfjs-ink");const[n,i,r,s]=te(this,kA,xA).call(this);if(this.setAt(n,i,0,0),this.setDims(r,s),te(this,HA,VA).call(this),this.width){const[n,i]=this.parentDimensions;this.setAspectRatio(this.width*n,this.height*i),this.setAt(e*n,t*i,this.width*n,this.height*i),Z(this,uA,!0),te(this,XA,YA).call(this),this.setDims(this.width*n,this.height*i),te(this,jA,BA).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return te(this,qA,GA).call(this),this.div}setDimensions(e,t){const n=Math.round(e),i=Math.round(t);if(Q(this,dA)===n&&Q(this,fA)===i)return;Z(this,dA,n),Z(this,fA,i),this.canvas.style.visibility="hidden";const[r,s]=this.parentDimensions;this.width=e/r,this.height=t/s,this.fixAndSetPosition(),Q(this,lA)&&te(this,KA,$A).call(this,e,t),te(this,XA,YA).call(this),te(this,jA,BA).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(t,n,i){var r,s,a;if(t instanceof Yk)return null;const o=super.deserialize(t,n,i);o.thickness=t.thickness,o.color=Ah.makeHexColor(...t.color),o.opacity=t.opacity;const[l,c]=o.pageDimensions,u=o.width*l,h=o.height*c,d=o.parentScale,f=t.thickness/2;Z(o,lA,!0),Z(o,dA,Math.round(u)),Z(o,fA,Math.round(h));const{paths:p,rect:g,rotation:m}=t;for(let{bezier:y}of p){y=te(r=e,iE,rE).call(r,y,g,m);const t=[];o.paths.push(t);let n=d*(y[0]-f),i=d*(y[1]-f);for(let e=2,r=y.length;e<r;e+=6){const r=d*(y[e]-f),s=d*(y[e+1]-f),a=d*(y[e+2]-f),o=d*(y[e+3]-f),l=d*(y[e+4]-f),c=d*(y[e+5]-f);t.push([[n,i],[r,s],[a,o],[l,c]]),n=l,i=c}const s=te(this,ZA,eE).call(this,t);o.bezierPath2D.push(s)}const v=te(s=o,oE,lE).call(s);return Z(o,tA,Math.max(_m.MIN_SIZE,v[2]-v[0])),Z(o,eA,Math.max(_m.MIN_SIZE,v[3]-v[1])),te(a=o,KA,$A).call(a,u,h),o}serialize(){if(this.isEmpty())return null;const e=this.getRect(0,0),t=_m._colorManager.convert(this.ctx.strokeStyle);return{annotationType:vu.INK,color:t,thickness:this.thickness,opacity:this.opacity,paths:te(this,sE,aE).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,e),pageIndex:this.pageIndex,rect:e,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}};eA=new WeakMap,tA=new WeakMap,nA=new WeakMap,iA=new WeakMap,rA=new WeakMap,sA=new WeakMap,aA=new WeakMap,oA=new WeakMap,lA=new WeakMap,cA=new WeakMap,uA=new WeakMap,hA=new WeakMap,dA=new WeakMap,fA=new WeakMap,pA=new WeakMap,gA=new WeakSet,mA=function(e){const t=e=>{this.thickness=e,te(this,hE,dE).call(this)},n=this.thickness;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:yu.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},vA=new WeakSet,yA=function(e){const t=e=>{this.color=e,te(this,jA,BA).call(this)},n=this.color;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:yu.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},bA=new WeakSet,wA=function(e){const t=e=>{this.opacity=e,te(this,jA,BA).call(this)};e/=100;const n=this.opacity;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:yu.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},kA=new WeakSet,xA=function(){const{parentRotation:e,parentDimensions:[t,n]}=this;switch(e){case 90:return[0,n,n,t];case 180:return[t,n,t,n];case 270:return[t,0,n,t];default:return[0,0,t,n]}},SA=new WeakSet,_A=function(){const{ctx:e,color:t,opacity:n,thickness:i,parentScale:r,scaleFactor:s}=this;var a;e.lineWidth=i*r/s,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle="".concat(t).concat((a=n,Math.round(Math.min(255,Math.max(1,255*a))).toString(16).padStart(2,"0")))},AA=new WeakSet,EA=function(e,t){var n;this.canvas.addEventListener("contextmenu",Id),this.canvas.addEventListener("pointerleave",Q(this,iA)),this.canvas.addEventListener("pointermove",Q(this,nA)),this.canvas.addEventListener("pointerup",Q(this,rA)),this.canvas.removeEventListener("pointerdown",Q(this,sA)),this.isEditing=!0,Q(this,uA)||(Z(this,uA,!0),te(this,XA,YA).call(this),this.thickness||(this.thickness=fE._defaultThickness),this.color||(this.color=fE._defaultColor||_m._defaultLineColor),null!==(n=this.opacity)&&void 0!==n||(this.opacity=fE._defaultOpacity)),this.currentPath.push([e,t]),Z(this,cA,!1),te(this,SA,_A).call(this),Z(this,pA,(()=>{te(this,IA,DA).call(this),Q(this,pA)&&window.requestAnimationFrame(Q(this,pA))})),window.requestAnimationFrame(Q(this,pA))},CA=new WeakSet,MA=function(e,t){const[n,i]=this.currentPath.at(-1);if(this.currentPath.length>1&&e===n&&t===i)return;const r=this.currentPath;let s=Q(this,oA);if(r.push([e,t]),Z(this,cA,!0),r.length<=2)return s.moveTo(...r[0]),void s.lineTo(e,t);3===r.length&&(Z(this,oA,s=new Path2D),s.moveTo(...r[0])),te(this,NA,FA).call(this,s,...r.at(-3),...r.at(-2),e,t)}
2,PA=new WeakSet,TA=function(){if(0===this.currentPath.length)return;const e=this.currentPath.at(-1);Q(this,oA).lineTo(...e)},RA=new WeakSet,LA=function(e,t){let n;if(Z(this,pA,null),e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height),te(this,CA,MA).call(this,e,t),te(this,PA,TA).call(this),1!==this.currentPath.length)n=te(this,OA,WA).call(this);else{const i=[e,t];n=[[i,i.slice(),i.slice(),i]]}const i=Q(this,oA),r=this.currentPath;this.currentPath=[],Z(this,oA,new Path2D);this.addCommands({cmd:()=>{this.allRawPaths.push(r),this.paths.push(n),this.bezierPath2D.push(i),this._uiManager.rebuild(this)},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(te(this,HA,VA).call(this),te(this,qA,GA).call(this)),te(this,hE,dE).call(this))},mustExec:!0})},IA=new WeakSet,DA=function(){if(!Q(this,cA))return;Z(this,cA,!1);Math.ceil(this.thickness*this.parentScale);const e=this.currentPath.slice(-3),t=e.map((e=>e[0])),n=e.map((e=>e[1]));Math.min(...t),Math.max(...t),Math.min(...n),Math.max(...n);const{ctx:i}=this;i.save(),i.clearRect(0,0,this.canvas.width,this.canvas.height);for(const r of this.bezierPath2D)i.stroke(r);i.stroke(Q(this,oA)),i.restore()},NA=new WeakSet,FA=function(e,t,n,i,r,s,a){const o=(t+i)/2,l=(n+r)/2,c=(i+s)/2,u=(r+a)/2;e.bezierCurveTo(o+2*(i-o)/3,l+2*(r-l)/3,c+2*(i-c)/3,u+2*(r-u)/3,c,u)},OA=new WeakSet,WA=function(){const e=this.currentPath;if(e.length<=2)return[[e[0],e[0],e.at(-1),e.at(-1)]];const t=[];let n,[i,r]=e[0];for(n=1;n<e.length-2;n++){const[s,a]=e[n],[o,l]=e[n+1],c=(s+o)/2,u=(a+l)/2,h=[i+2*(s-i)/3,r+2*(a-r)/3],d=[c+2*(s-c)/3,u+2*(a-u)/3];t.push([[i,r],h,d,[c,u]]),[i,r]=[c,u]}const[s,a]=e[n],[o,l]=e[n+1],c=[i+2*(s-i)/3,r+2*(a-r)/3],u=[o+2*(s-o)/3,l+2*(a-l)/3];return t.push([[i,r],c,u,[o,l]]),t},jA=new WeakSet,BA=function(){if(this.isEmpty())return void te(this,QA,JA).call(this);te(this,SA,_A).call(this);const{canvas:e,ctx:t}=this;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),te(this,QA,JA).call(this);for(const n of this.bezierPath2D)t.stroke(n)},zA=new WeakSet,UA=function(e){this.canvas.removeEventListener("pointerleave",Q(this,iA)),this.canvas.removeEventListener("pointermove",Q(this,nA)),this.canvas.removeEventListener("pointerup",Q(this,rA)),this.canvas.addEventListener("pointerdown",Q(this,sA)),Q(this,aA)&&clearTimeout(Q(this,aA)),Z(this,aA,setTimeout((()=>{Z(this,aA,null),this.canvas.removeEventListener("contextmenu",Id)}),10)),te(this,RA,LA).call(this,e.offsetX,e.offsetY),this.addToAnnotationStorage(),this.setInBackground()},HA=new WeakSet,VA=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",this.canvas.setAttribute("data-l10n-id","pdfjs-ink-canvas"),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},qA=new WeakSet,GA=function(){Z(this,hA,new ResizeObserver((e=>{const t=e[0].contentRect;t.width&&t.height&&this.setDimensions(t.width,t.height)}))),Q(this,hA).observe(this.div)},XA=new WeakSet,YA=function(){if(!Q(this,uA))return;const[e,t]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),te(this,QA,JA).call(this)},KA=new WeakSet,$A=function(e,t){const n=te(this,cE,uE).call(this),i=(e-n)/Q(this,tA),r=(t-n)/Q(this,eA);this.scaleFactor=Math.min(i,r)},QA=new WeakSet,JA=function(){const e=te(this,cE,uE).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)},ZA=new WeakSet,eE=function(e){const t=new Path2D;for(let n=0,i=e.length;n<i;n++){const[i,r,s,a]=e[n];0===n&&t.moveTo(...i),t.bezierCurveTo(r[0],r[1],s[0],s[1],a[0],a[1])}return t},tE=new WeakSet,nE=function(e,t,n){const[i,r,s,a]=t;switch(n){case 0:for(let t=0,n=e.length;t<n;t+=2)e[t]+=i,e[t+1]=a-e[t+1];break;case 90:for(let t=0,n=e.length;t<n;t+=2){const n=e[t];e[t]=e[t+1]+i,e[t+1]=n+r}break;case 180:for(let t=0,n=e.length;t<n;t+=2)e[t]=s-e[t],e[t+1]+=r;break;case 270:for(let t=0,n=e.length;t<n;t+=2){const n=e[t];e[t]=s-e[t+1],e[t+1]=a-n}break;default:throw new Error("Invalid rotation")}return e},iE=new WeakSet,rE=function(e,t,n){const[i,r,s,a]=t;switch(n){case 0:for(let t=0,n=e.length;t<n;
2t+=2)e[t]-=i,e[t+1]=a-e[t+1];break;case 90:for(let t=0,n=e.length;t<n;t+=2){const n=e[t];e[t]=e[t+1]-r,e[t+1]=n-i}break;case 180:for(let t=0,n=e.length;t<n;t+=2)e[t]=s-e[t],e[t+1]-=r;break;case 270:for(let t=0,n=e.length;t<n;t+=2){const n=e[t];e[t]=a-e[t+1],e[t+1]=s-n}break;default:throw new Error("Invalid rotation")}return e},sE=new WeakSet,aE=function(e,t,n,i){var r,s;const a=[],o=this.thickness/2,l=e*t+o,c=e*n+o;for(const u of this.paths){const t=[],n=[];for(let i=0,r=u.length;i<r;i++){const[s,a,o,h]=u[i];if(s[0]===h[0]&&s[1]===h[1]&&1===r){const i=e*s[0]+l,r=e*s[1]+c;t.push(i,r),n.push(i,r);break}const d=e*s[0]+l,f=e*s[1]+c,p=e*a[0]+l,g=e*a[1]+c,m=e*o[0]+l,v=e*o[1]+c,y=e*h[0]+l,b=e*h[1]+c;0===i&&(t.push(d,f),n.push(d,f)),t.push(p,g,m,v,y,b),n.push(p,g),i===r-1&&n.push(y,b)}a.push({bezier:te(r=fE,tE,nE).call(r,t,i,this.rotation),points:te(s=fE,tE,nE).call(s,n,i,this.rotation)})}return a},oE=new WeakSet,lE=function(){let e=1/0,t=-1/0,n=1/0,i=-1/0;for(const r of this.paths)for(const[s,a,o,l]of r){const r=Ah.bezierBoundingBox(...s,...a,...o,...l);e=Math.min(e,r[0]),n=Math.min(n,r[1]),t=Math.max(t,r[2]),i=Math.max(i,r[3])}return[e,n,t,i]},cE=new WeakSet,uE=function(){return Q(this,lA)?Math.ceil(this.thickness*this.parentScale):0},hE=new WeakSet,dE=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return;if(!Q(this,lA))return void te(this,jA,BA).call(this);const t=te(this,oE,lE).call(this),n=te(this,cE,uE).call(this);Z(this,tA,Math.max(_m.MIN_SIZE,t[2]-t[0])),Z(this,eA,Math.max(_m.MIN_SIZE,t[3]-t[1]));const i=Math.ceil(n+Q(this,tA)*this.scaleFactor),r=Math.ceil(n+Q(this,eA)*this.scaleFactor),[s,a]=this.parentDimensions;this.width=i/s,this.height=r/a,this.setAspectRatio(i,r);const o=this.translationX,l=this.translationY;this.translationX=-t[0],this.translationY=-t[1],te(this,XA,YA).call(this),te(this,jA,BA).call(this),Z(this,dA,i),Z(this,fA,r),this.setDims(i,r);const c=e?n/this.scaleFactor/2:0;this.translate(o-this.translationX-c,l-this.translationY-c)},J(fE,ZA),J(fE,tE),J(fE,iE),K(fE,"_defaultColor",null),K(fE,"_defaultOpacity",1),K(fE,"_defaultThickness",1),K(fE,"_type","ink"),K(fE,"_editorType",vu.INK);let pE=fE;var gE,mE,vE,yE,bE,wE,kE,xE,SE,_E,AE,EE,CE,ME,PE,TE,RE,LE,IE,DE,NE,FE,OE,WE,jE,BE,zE,UE,HE;const VE=class extends _m{constructor(e){super({...e,name:"stampEditor"}),J(this,EE),J(this,ME),J(this,TE),J(this,LE),J(this,DE),J(this,FE),J(this,WE),J(this,BE),J(this,UE),J(this,gE,null),J(this,mE,null),J(this,vE,null),J(this,yE,null),J(this,bE,null),J(this,wE,""),J(this,kE,null),J(this,xE,null),J(this,SE,null),J(this,_E,!1),J(this,AE,!1),Z(this,yE,e.bitmapUrl),Z(this,bE,e.bitmapFile)}static initialize(e,t){_m.initialize(e,t)}static get supportedTypes(){return oh(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((e=>"image/".concat(e))))}static get supportedTypesStr(){return oh(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,t){t.pasteEditor(vu.STAMP,{bitmapFile:e.getAsFile()})}remove(){var e,t;Q(this,mE)&&(Z(this,gE,null),this._uiManager.imageManager.deleteId(Q(this,mE)),null==(e=Q(this,kE))||e.remove(),Z(this,kE,null),null==(t=Q(this,xE))||t.disconnect(),Z(this,xE,null),Q(this,SE)&&(clearTimeout(Q(this,SE)),Z(this,SE,null))),super.remove()}rebuild(){this.parent?(super.rebuild(),null!==this.div&&(Q(this,mE)&&null===Q(this,kE)&&te(this,TE,RE).call(this),this.isAttachedToDOM||this.parent.add(this))):Q(this,mE)&&te(this,TE,RE).call(this)}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(Q(this,vE)||Q(this,gE)||Q(this,yE)||Q(this,bE)||Q(this,mE))}get isResizable(){return!0}render(){if(this.div)return this.div;let e,t;if(this.width&&(e=this.x,t=this.y),super.render(),this.div.hidden=!0,this.addAltTextButton(),Q(this,gE)?te(this,LE,IE).call(this):te(this,TE,RE).call(this),this.width){const[n,i]=this.parentDimensions;this.setAt(e*n,t*i,this.width*n,this.height*i)}return this.div}getImageForAltText(){return Q(this,kE)}static deserialize(e,t,n){if(e instanceof Zk)return null;const i=super.deserialize(e,t,n),{rect:r,bitmapUrl:s,bitmapId:a,isSvg:o,accessibilityData:l}=e;a&&n.imageManager.isValidId(a)?Z(i,mE,a):Z(i,yE,s),Z(i,_E,o);const[c,u]=i.pageDimensions;return i.width=(r[2]-r[0])/c,i.height=(r[3]-r[1])/u,l&&(i.altTextData=l),i}serialize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isEmpty())return null;const n={annotationType:vu.STAMP,bitmapId:Q(this,mE),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:Q(this,_E),structTreeParentId:this._structTreeParentId};if(e)return n.bitmapUrl=te(this,BE,zE).call(this,!0),n.accessibilityData=this.altTextData,n;const{decorative:i,altText:r}=this.altTextData;if(!i&&r&&(n.accessibilityData={type:"Figure",alt:r}),null===t)return n;t.stamps||(t.stamps=new Map);const s=Q(this,_E)?(n.rect[2]-n.rect[0])*(n.rect[3]-n.rect[1]):null;if(t.stamps.has(Q(this,mE))){if(Q(this,_E)){const e=t.stamps.get(Q(this,mE));s>e.area&&(e.area=s,e.serialized.bitmap.close(),e.serialized.bitmap=te(this,BE,zE).call(this,!1))}}else t.stamps.set(Q(this,mE),{area:s,serialized:n}),n.bitmap=te(this,BE,zE).call(this,!1);return n}};gE=new WeakMap,mE=new WeakMap,vE=new WeakMap,yE=new WeakMap,bE=new WeakMap,wE=new WeakMap,kE=new WeakMap,xE=new WeakMap,SE=new WeakMap,_E=new WeakMap,AE=new WeakMap,EE=new WeakSet,CE=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e?(Z(this,gE,e.bitmap),t||(Z(this,mE,e.id),Z(this,_E,e.isSvg)),e.file&&Z(this,wE,e.file.name),te(this,LE,IE).call(this)):this.remove()},ME=new WeakSet,PE=function(){Z(this,vE,null),this._uiManager.enableWaiting(!1),Q(this,kE)&&this.div.focus()},TE=new WeakSet,RE=function(){if(Q(this,mE))return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(Q(this,mE)).then((e=>te(this,EE,CE).call(this,e,!0))).finally((()=>te(this,ME,PE).call(this)));if(Q(this,yE)){const e=Q(this,yE);return Z(this,yE,null),this._uiManager.enableWaiting(!0),void Z(this,vE,this._uiManager.imageManager.getFromUrl(e).then((e=>te(this,EE,CE).call(this,e))).finally((()=>te(this,ME,PE).call(this))))}if(Q(this,bE)){const e=Q(this,bE);return Z(this,bE,null),this._uiManager.enableWaiting(!0),void Z(this,vE,this._uiManager.imageManager.getFromFile(e).then((e=>te(this,EE,CE).call(this,e))).finally((()=>te(this,ME,PE).call(this))))}const e=document.createElement("input");e.type="file",e.accept=VE.supportedTypesStr,Z(this,vE,new Promise((t=>{e.addEventListener("change",(async()=>
2{if(e.files&&0!==e.files.length){this._uiManager.enableWaiting(!0);const t=await this._uiManager.imageManager.getFromFile(e.files[0]);te(this,EE,CE).call(this,t)}else this.remove();t()})),e.addEventListener("cancel",(()=>{this.remove(),t()}))})).finally((()=>te(this,ME,PE).call(this)))),e.click()},LE=new WeakSet,IE=function(){const{div:e}=this;let{width:t,height:n}=Q(this,gE);const[i,r]=this.pageDimensions,s=.75;if(this.width)t=this.width*i,n=this.height*r;else if(t>s*i||n>s*r){const e=Math.min(s*i/t,s*r/n);t*=e,n*=e}const[a,o]=this.parentDimensions;this.setDims(t*a/i,n*o/r),this._uiManager.enableWaiting(!1);const l=Z(this,kE,document.createElement("canvas"));e.append(l),e.hidden=!1,te(this,WE,jE).call(this,t,n),te(this,UE,HE).call(this),Q(this,AE)||(this.parent.addUndoableEditor(this),Z(this,AE,!0)),this._reportTelemetry({action:"inserted_image"}),Q(this,wE)&&l.setAttribute("aria-label",Q(this,wE))},DE=new WeakSet,NE=function(e,t){var n;const[i,r]=this.parentDimensions;this.width=e/i,this.height=t/r,this.setDims(e,t),null!=(n=this._initialOptions)&&n.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,null!==Q(this,SE)&&clearTimeout(Q(this,SE)),Z(this,SE,setTimeout((()=>{Z(this,SE,null),te(this,WE,jE).call(this,e,t)}),200))},FE=new WeakSet,OE=function(e,t){const{width:n,height:i}=Q(this,gE);let r=n,s=i,a=Q(this,gE);for(;r>2*e||s>2*t;){const n=r,i=s;r>2*e&&(r=r>=16384?Math.floor(r/2)-1:Math.ceil(r/2)),s>2*t&&(s=s>=16384?Math.floor(s/2)-1:Math.ceil(s/2));const o=new OffscreenCanvas(r,s);o.getContext("2d").drawImage(a,0,0,n,i,0,0,r,s),a=o.transferToImageBitmap()}return a},WE=new WeakSet,jE=function(e,t){e=Math.ceil(e),t=Math.ceil(t);const n=Q(this,kE);if(!n||n.width===e&&n.height===t)return;n.width=e,n.height=t;const i=Q(this,_E)?Q(this,gE):te(this,FE,OE).call(this,e,t);if(this._uiManager.hasMLManager&&!this.hasAltText()){const n=new OffscreenCanvas(e,t).getContext("2d");n.drawImage(i,0,0,i.width,i.height,0,0,e,t),this._uiManager.mlGuess({service:"image-to-text",request:{data:n.getImageData(0,0,e,t).data,width:e,height:t,channels:4}}).then((e=>{const t=(null==e?void 0:e.output)||"";this.parent&&t&&!this.hasAltText()&&(this.altTextData={altText:t,decorative:!1})}))}const r=n.getContext("2d");r.filter=this._uiManager.hcmFilter,r.drawImage(i,0,0,i.width,i.height,0,0,e,t)},BE=new WeakSet,zE=function(e){if(e){if(Q(this,_E)){const e=this._uiManager.imageManager.getSvgUrl(Q(this,mE));if(e)return e}const e=document.createElement("canvas");return({width:e.width,height:e.height}=Q(this,gE)),e.getContext("2d").drawImage(Q(this,gE),0,0),e.toDataURL()}if(Q(this,_E)){const[e,t]=this.pageDimensions,n=Math.round(this.width*e*Gh.PDF_TO_CSS_UNITS),i=Math.round(this.height*t*Gh.PDF_TO_CSS_UNITS),r=new OffscreenCanvas(n,i);return r.getContext("2d").drawImage(Q(this,gE),0,0,Q(this,gE).width,Q(this,gE).height,0,0,n,i),r.transferToImageBitmap()}return structuredClone(Q(this,gE))},UE=new WeakSet,HE=function(){Z(this,xE,new ResizeObserver((e=>{const t=e[0].contentRect;t.width&&t.height&&te(this,DE,NE).call(this,t.width,t.height)}))),Q(this,xE).observe(this.div)},K(VE,"_type","stamp"),K(VE,"_editorType",vu.STAMP);let qE=VE;var GE,XE,YE,KE,$E,QE,JE,ZE,eC,tC,nC,iC,rC,sC,aC,oC,lC,cC,uC,hC,dC,fC,pC,gC;const mC=class e{constructor(t){let{uiManager:n,pageIndex:i,div:r,accessibilityManager:s,annotationLayer:a,drawLayer:o,textLayer:l,viewport:c,l10n:u}=t;J(this,aC),J(this,lC),J(this,uC),J(this,dC),J(this,pC),J(this,GE,void 0),J(this,XE,!1),J(this,YE,null),J(this,KE,null),J(this,$E,null),J(this,QE,null),J(this,JE,null),J(this,ZE,new Map),J(this,eC,!1),J(this,tC,!1),J(this,nC,!1),J(this,iC,null),J(this,rC,void 0);const h=[...Q(e,sC).values()];if(!e._initialized){e._initialized=!0;for(const e of h)e.initialize(u,n)}n.registerEditorTypes(h),Z(this,rC,n),this.pageIndex=i,this.div=r,Z(this,GE,s),Z(this,YE,a),this.viewport=c,Z(this,iC,l),this.drawLayer=o,Q(this,rC).addLayer(this)}get isEmpty(){return 0===Q(this,ZE).size}get isInvisible(){return this.isEmpty&&Q(this,rC).getMode()===vu.NONE}updateToolbar(e){Q(this,rC).updateToolbar(e)}updateMode(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q(this,rC).getMode();switch(te(this,pC,gC).call(this),t){case vu.NONE:return this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),void this.disableClick();case vu.INK:this.addInkEditorIfNeeded(!1),this.disableTextSelection(),this.togglePointerEvents(!0),this.disableClick();break;case vu.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:n}=this.div;for(const i of Q(e,sC).values())n.toggle("".concat(i._type,"Editing"),t===i._editorType);this.div.hidden=!1}hasTextLayer(e){var t;return e===(null==(t=Q(this,iC))?void 0:t.div)}addInkEditorIfNeeded(e){if(Q(this,rC).getMode()===vu.INK){if(!e)for(const e of Q(this,ZE).values())if(e.isEmpty())return void e.setInBackgroun
2d();this.createAndAddNewEditor({offsetX:0,offsetY:0},!1).setInBackground()}}setEditingState(e){Q(this,rC).setEditingState(e)}addCommands(e){Q(this,rC).addCommands(e)}togglePointerEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.div.classList.toggle("disabled",!e)}toggleAnnotationLayerPointerEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t;null==(t=Q(this,YE))||t.div.classList.toggle("disabled",!e)}enable(){this.div.tabIndex=0,this.togglePointerEvents(!0);const e=new Set;for(const n of Q(this,ZE).values())n.enableEditing(),n.show(!0),n.annotationElementId&&(Q(this,rC).removeChangedExistingAnnotation(n),e.add(n.annotationElementId));if(!Q(this,YE))return;const t=Q(this,YE).getEditableAnnotations();for(const n of t){if(n.hide(),Q(this,rC).isDeletedAnnotationElement(n.data.id)||e.has(n.data.id))continue;const t=this.deserialize(n);t&&(this.addOrRebuild(t),t.enableEditing())}}disable(){var t;Z(this,nC,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1);const n=new Map,i=new Map;for(const e of Q(this,ZE).values())if(e.disableEditing(),e.annotationElementId){if(null!==e.serialize()){n.set(e.annotationElementId,e);continue}i.set(e.annotationElementId,e),null==(t=this.getEditableAnnotation(e.annotationElementId))||t.show(),e.remove()}if(Q(this,YE)){const e=Q(this,YE).getEditableAnnotations();for(const t of e){const{id:e}=t.data;if(Q(this,rC).isDeletedAnnotationElement(e))continue;let r=i.get(e);r?(r.resetAnnotationElement(t),r.show(!1),t.show()):(r=n.get(e),r&&(Q(this,rC).addChangedExistingAnnotation(r),r.renderAnnotationElement(t),r.show(!1)),t.show())}}te(this,pC,gC).call(this),this.isEmpty&&(this.div.hidden=!0);const{classList:r}=this.div;for(const s of Q(e,sC).values())r.remove("".concat(s._type,"Editing"));this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),Z(this,nC,!1)}getEditableAnnotation(e){var t;return(null==(t=Q(this,YE))?void 0:t.getEditableAnnotation(e))||null}setActiveEditor(e){Q(this,rC).getActive()!==e&&Q(this,rC).setActiveEditor(e)}enableTextSelection(){var e;this.div.tabIndex=-1,null!=(e=Q(this,iC))&&e.div&&!Q(this,QE)&&(Z(this,QE,te(this,aC,oC).bind(this)),Q(this,iC).div.addEventListener("pointerdown",Q(this,QE)),Q(this,iC).div.classList.add("highlighting"))}disableTextSelection(){var e;this.div.tabIndex=0,null!=(e=Q(this,iC))&&e.div&&Q(this,QE)&&(Q(this,iC).div.removeEventListener("pointerdown",Q(this,QE)),Z(this,QE,null),Q(this,iC).div.classList.remove("highlighting"))}enableClick(){Q(this,$E)||(Z(this,$E,this.pointerdown.bind(this)),Z(this,KE,this.pointerup.bind(this)),this.div.addEventListener("pointerdown",Q(this,$E)),this.div.addEventListener("pointerup",Q(this,KE)))}disableClick(){Q(this,$E)&&(this.div.removeEventListener("pointerdown",Q(this,$E)),this.div.removeEventListener("pointerup",Q(this,KE)),Z(this,$E,null),Z(this,KE,null))}attach(e){Q(this,ZE).set(e.id,e);const{annotationElementId:t}=e;t&&Q(this,rC).isDeletedAnnotationElement(t)&&Q(this,rC).removeDeletedAnnotationElement(e)}detach(e){var t;Q(this,ZE).delete(e.id),null==(t=Q(this,GE))||t.removePointerInTextLayer(e.contentDiv),!Q(this,nC)&&e.annotationElementId&&Q(this,rC).addDeletedAnnotationElement(e)}remove(e){this.detach(e),Q(this,rC).removeEditor(e),e.div.remove(),e.isAttachedToDOM=!1,Q(this,tC)||this.addInkEditorIfNeeded(!1)}changeParent(e){var t;e.parent!==this&&(e.parent&&e.annotationElementId&&(Q(this,rC).addDeletedAnnotationElement(e.annotationElementId),_m.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),null==(t=e.parent)||t.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}add(e){if(e.parent!==this||!e.isAttachedToDOM){if(this.changeParent(e),Q(this,rC).addEditor(e),this.attach(e),!e.isAttachedToDOM){const t=e.render();this.div.append(t),e.isAttachedToDOM=!0}e.fixAndSetPosition(),e.onceAdded(),Q(this,rC).addToAnnotationStorage(e),e._reportTelemetry(e.telemetryInitialData)}}moveEditorInDOM(e){var t;if(!e.isAttachedToDOM)return;const{activeElement:n}=document;e.div.contains(n)&&!Q(this,JE)&&(e._focusEventsAllowed=!1,Z(this,JE,setTimeout((()=>{Z(this,JE,null),e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",(()=>{e._focusEventsAllowed=!0}),{once:!0}),n.focus())}),0))),e._structTreeParentId=null==(t=Q(this,GE))?void 0:t.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?(e.parent||(e.parent=this),e.rebuild(),e.show()):this.add(e)}addUndoableEditor(e){this.addCommands({cmd:()=>e._uiManager.rebuild(e),undo:()=>{e.remove()},mustExec:!1})}getNextId(){return Q(this,rC).getId()}canCreateNewEmptyEditor(){var e;return null==(e=Q(this,lC,cC))?void 0:e.canCreateNewEmptyEditor()}pasteEditor(e,t){Q(this,rC).updateToolbar(e),Q(this,rC).updateMode(e);const{offsetX:n,offsetY:i}=te(this,dC,fC).call(this),r=this.getNextId(),s=te(this,uC,hC).call(this,{parent:this,id:r,x:n,y:i,uiManager:Q(this,rC),isCentered:!0,...t});s&&this.add(s)}deserialize(t){var n,i;return(null==(i=Q(e,sC).get(null!==(n=t.annotationType)&&void 0!==n?n:t.annotationEditorType))?void 0:i.deserialize(t,this,Q(this,rC)))||null}createAndAddNewEditor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.getNextId(),r=te(this,uC,hC).call(this,{parent:this,id:i,x:e.offsetX,y:e.offsetY,uiManager:Q(this,rC),isCentered:t,...n});return r&&this.add(r),r}addNewEditor(){this.createAndAddNewEditor(te(this,dC,fC).call(this),!0)}setSelected(e){Q(this,rC).setSelected(e)}toggleSelected(e){Q(this,rC).toggleSelected(e)}isSelected(e){return Q(this,rC).isSelected(e)}unselect(e){Q(this,rC).unselect(e)}pointerup(e){const{isMac:t}=bh.platform;if(!(0!==e.button||e.ctrlKey&&t)&&e.target===this.div&&Q(this,eC)){if(Z(this,eC,!1),!Q(this,XE))return void Z(this,XE,!0);if(Q(this,rC).getMode()===vu.STAMP)return void Q(this,rC).unselectAll();this.createAndAddNewEditor(e,!1)}}pointerdown(e){if(Q(this,rC).getMode()===vu.HIGHLIGHT&&this.enableTextSelection(),Q(this,eC))return void Z(this,eC,!1);const{isMac:t}=bh.platform;if(0!==e.button||e.ctrlKey&&t||e.target!==this.div)return;Z(this,eC,!0);const n=Q(this,rC).getActive();Z(this,XE,!n||n.isEmpty())}findNewParent(e,t,n){const i=Q(this,rC).findParent(t,n);return null!==i&&i!==this&&(i.changeParent(e),!0)}destroy(){var e,t;(null==(e=Q(this,rC).getActive())?void 0:e.parent)===this&&(Q(this,rC).commitOrRemove(),Q(this,rC).setActiveEditor(null)),Q(this,JE)&&(clearTimeout(Q(this,JE)),Z(this,JE,null));for(const n of Q(this,ZE).values())null==(t=Q(this,GE))||t.removePointerInTextLayer(n.contentDiv),n.setParent(null),n.isAttachedToDOM=!1,n.div.remove();this.div=null,Q(this,ZE).clear(),Q(this,rC).removeLayer(this)}render(e){let{viewport:t}=e;this.viewport=t,zd(this.div,t);for(const n of Q(this,rC).getEditors(this.pageIndex))this.add(n),n.rebuild();this.updateMode()}update(e){let{viewport:t}=e;Q(this,rC).commitOrRemove(),te(this,pC,gC).call(this);const n=this.viewport.rotation,i=t.rotation;if(this.viewport=t,zd(this.div,{rotation:i}),n!==i)for(const r of Q(this,ZE).values())r.rotate(i);this.addInkEditorIfNeeded(!1)}get pageDimensions(){const{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}get scale(){return Q(this,rC).viewParameters.realScale}};GE=new WeakMap,XE=new WeakMap,YE=new WeakMap,KE=new WeakMap,$E=new WeakMap,QE=new WeakMap,JE=new WeakMap,ZE=new WeakMap,eC=new WeakMap,tC=new WeakMap,nC=new WeakMap,iC=new WeakMap,rC=new WeakMap,sC=new WeakMap,aC=new WeakSet,oC=function(e){if(Q(this,rC).unselectAll(),e.target===Q(this,iC).div){const{isMac:t}=bh.platform;if(0!==e.button||e.ctrlKey&&t)return;Q(this,rC).showAllEditors("highlight",!0,!0),Q(this,iC).div.classList.add("free"),Z_.startHighlighting(this,"ltr"===Q(this,rC).direction,e),Q(this,iC).div.addEventListener("pointerup",(()=>{Q(this,iC).div.classList.remove("free")}),{once:!0}),e.preventDefault()}},lC=new WeakSet,cC=function(){return Q(mC,sC).get(Q(this,rC).getMode())},uC=new WeakSet,hC=function(e){const t=Q(this,lC,cC);return t?new t.prototype.constructor(e):null},dC=new WeakSet,fC=function(){const{x:e,y:t,width:n,height:i}=this.div.getBoundingClientRect(),r=Math.max(0,e),s=Math.max(0,t),a=(r+Math.min(window.innerWidth,e+n))/2-e,o=(s+Math.min(window.innerHeight,t+i))/2-t,[l,c]=this.viewport.rotation%180===0?[a,o]:[o,a];return{offsetX:l,offsetY:c}},pC=new WeakSet,gC=function(){Z(this,tC,!0);for(const e of Q(this,ZE).values())e.isEmpty()&&e.remove();Z(this,tC,!1)},K(mC,"_initialized",!1),J(mC,sC,new Map([Lx,pE,qE,Z_].map((e=>[e._editorType,e]))));let vC=mC;var yC,bC,wC,kC,xC,SC,_C,AC,EC,CC;const MC=class e{constructor(e){let{pageIndex:t}=e;J(this,_C),J(this,EC),J(this,yC,null),J(this,bC,0),J(this,wC,new Map),J(this,kC,new Map),this.pageIndex=t}setParent(e){if(Q(this,yC)){if(Q(this,yC)!==e){if(Q(this,wC).size>0)for(const t of Q(this,wC).values())t.remove(),e.append(t);Z(this,yC,e)}}else Z(this,yC,e)}static get _svgFactory(){return oh(this,"_svgFactory",new _d)}highlight(t,n,i){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=ee(this,bC)._++,a=te(this,_C,AC).call(this,t.box);a.classList.add("highlight"),t.free&&a.classList.add("free");const o=e._svgFactory.createElement("defs");a.append(o);const l=e._svgFactory.createElement("path");o.append(l);const c="path_p".concat(this.pageIndex,"_").concat(s);l.setAttribute("id",c),l.setAttribute("d",t.toSVGPath()),r&&Q(this,kC).set(s,l);const u=te(this,EC,CC).call(this,o,c),h=e._svgFactory.createElement("use");return a.append(h),a.setAttribute("fill",n),a.setAttribute("fill-opacity",i),h.setAttribute("href","#".concat(c)),Q(this,wC).set(s,a),{id:s,clipPathId:"url(#".concat(u,")")}}highlightOutline(t){const n=ee(this,bC)._++,i=te(this,_C,AC).call(this,t.box);i.classList.add("highlightOutline");const r=e._svgFactory.createElement("defs");i.append(r);const s=e._svgFactory.createElement("path");r.append(s);const a="path_p".concat(this.pageIndex,"_").concat(n);let o;if(s.setAttribute("id",a),s.setAttribute("d",t.toSVGPath()),s.setAttribute("vector-effect","non-scaling-stroke"),t.free){i.classList.add("free");const t=e._svgFactory.createElement("mask");r.append(t),o="mask_p".concat(this.pageIndex,"_").concat(n),t.setAttribute("id",o),t.setAttribute("maskUnits","objectBoundingBox");const s=e._svgFactory.createElement("rect");t.append(s),s.setAttribute("width","1"),s.setAttribute("height","1"),s.setAttribute("fill","white");const l=e._svgFactory.createElement("use");t.append(l),l.setAttribute("href","#".concat(a)),l.setAttribute("stroke","none"),l.setAttribute("fill","black"),l.setAttribute("fill-rule","nonzero"),l.classList.add("mask")}const l=e._svgFactory.createElement("use");i.append(l),l.setAttribute("href","#".concat(a)),o&&l.setAttribute("mask","url(#".concat(o,")"));const c=l.cloneNode();return i.append(c),l.classList.add("mainOutline"),c.classList.add("secondaryOutline"),Q(this,wC).set(n,i),n}finalizeLine(e,t){const n=Q(this,kC).get(e);Q(this,kC).delete(e),this.updateBox(e,t.box),n.setAttribute("d",t.toSVGPath())}updateLine(e,t){Q(this,wC).get(e).firstChild.firstChild.setAttribute("d",t.toSVGPath())}removeFreeHighlight(e){this.remove(e),Q(this,kC).delete(e)}updatePath(e,t){Q(this,kC).get(e).setAttribute("d",t.toSVGPath())}updateBox(t,n){var i;te(i=e,xC,SC).call(i,Q(this,wC).get(t),n)}
2show(e,t){Q(this,wC).get(e).classList.toggle("hidden",!t)}rotate(e,t){Q(this,wC).get(e).setAttribute("data-main-rotation",t)}changeColor(e,t){Q(this,wC).get(e).setAttribute("fill",t)}changeOpacity(e,t){Q(this,wC).get(e).setAttribute("fill-opacity",t)}addClass(e,t){Q(this,wC).get(e).classList.add(t)}removeClass(e,t){Q(this,wC).get(e).classList.remove(t)}remove(e){null!==Q(this,yC)&&(Q(this,wC).get(e).remove(),Q(this,wC).delete(e))}destroy(){Z(this,yC,null);for(const e of Q(this,wC).values())e.remove();Q(this,wC).clear()}};yC=new WeakMap,bC=new WeakMap,wC=new WeakMap,kC=new WeakMap,xC=new WeakSet,SC=function(e){let{x:t=0,y:n=0,width:i=1,height:r=1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{style:s}=e;s.top="".concat(100*n,"%"),s.left="".concat(100*t,"%"),s.width="".concat(100*i,"%"),s.height="".concat(100*r,"%")},_C=new WeakSet,AC=function(e){var t;const n=MC._svgFactory.create(1,1,!0);return Q(this,yC).append(n),n.setAttribute("aria-hidden",!0),te(t=MC,xC,SC).call(t,n,e),n},EC=new WeakSet,CC=function(e,t){const n=MC._svgFactory.createElement("clipPath");e.append(n);const i="clip_".concat(t);n.setAttribute("id",i),n.setAttribute("clipPathUnits","objectBoundingBox");const r=MC._svgFactory.createElement("use");return n.append(r),r.setAttribute("href","#".concat(t)),r.classList.add("clip"),i},J(MC,xC);let PC=MC;var TC=ru.AbortException,RC=ru.AnnotationEditorLayer,LC=ru.AnnotationEditorParamsType,IC=ru.AnnotationEditorType,DC=ru.AnnotationEditorUIManager,NC=ru.AnnotationLayer,FC=ru.AnnotationMode,OC=ru.CMapCompressionType,WC=ru.ColorPicker,jC=ru.DOMSVGFactory,BC=ru.DrawLayer,zC=ru.FeatureTest,UC=ru.GlobalWorkerOptions,HC=ru.ImageKind,VC=ru.InvalidPDFException,qC=ru.MissingPDFException,GC=ru.OPS,XC=ru.Outliner,YC=ru.PDFDataRangeTransport,KC=ru.PDFDateString,$C=ru.PDFWorker,QC=ru.PasswordResponses,JC=ru.PermissionFlag,ZC=ru.PixelsPerInch,eM=ru.RenderingCancelledException,tM=ru.TextLayer,nM=ru.UnexpectedResponseException,iM=ru.Util,rM=ru.VerbosityLevel,sM=ru.XfaLayer,aM=ru.build,oM=ru.createValidAbsoluteUrl,lM=ru.fetchData,cM=ru.getDocument,uM=ru.getFilenameFromUrl,hM=ru.getPdfFilenameFromUrl,dM=ru.getXfaPageViewport,fM=ru.isDataScheme,pM=ru.isPdfFile,gM=ru.noContextMenu,mM=ru.normalizeUnicode,vM=ru.renderTextLayer,yM=ru.setLayerDimensions,bM=ru.shadow,wM=ru.updateTextLayer,kM=ru.version;const xM=Object.freeze(Object.defineProperty({__proto__:null,AbortException:TC,AnnotationEditorLayer:RC,AnnotationEditorParamsType:LC,AnnotationEditorType:IC,AnnotationEditorUIManager:DC,AnnotationLayer:NC,AnnotationMode:FC,CMapCompressionType:OC,ColorPicker:WC,DOMSVGFactory:jC,DrawLayer:BC,FeatureTest:zC,GlobalWorkerOptions:UC,ImageKind:HC,InvalidPDFException:VC,MissingPDFException:qC,OPS:GC,Outliner:XC,PDFDataRangeTransport:YC,PDFDateString:KC,PDFWorker:$C,PasswordResponses:QC,PermissionFlag:JC,PixelsPerInch:ZC,RenderingCancelledException:eM,TextLayer:tM,UnexpectedResponseException:nM,Util:iM,VerbosityLevel:rM,XfaLayer:sM,build:aM,createValidAbsoluteUrl:oM,fetchData:lM,getDocument:cM,getFilenameFromUrl:uM,getPdfFilenameFromUrl:hM,getXfaPageViewport:dM,isDataScheme:fM,isPdfFile:pM,noContextMenu:gM,normalizeUnicode:mM,renderTextLayer:vM,setLayerDimensions:yM,shadow:bM,updateTextLayer:wM,version:kM},Symbol.toStringTag,{value:"Module"}));var SM=function(e,t,n){if(n||2===arguments.length)for(var i,r=0,s=t.length;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},_M=SM(SM(SM(SM(SM(SM(SM(SM(SM(SM(SM(SM(SM(SM(SM(SM(SM(SM([],["onCopy","onCut","onPaste"],!0),["onCompositionEnd","onCompositionStart","onCompositionUpdate"],!0),["onFocus","onBlur"],!0),["onInput","onInvalid","onReset","onSubmit"],!0),["onLoad","onError"],!0),["onKeyDown","onKeyPress","onKeyUp"],!0),["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],!0),["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],!0),["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],!0),["onSelect"],!0),["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],!0),["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],!0),["onScroll"],!0),["onWheel"],!0),["onAnimationStart","onAnimationEnd","onAnimationIteration"],!0),["onTransitionEnd"],!0),["onChange"],!0),["onToggle"],!0);function AM(e,t){var n={};return _M.forEach((function(i){var r=e[i];r&&(n[i]=t?function(e){return r(e,t(i))}:r)})),n}function EM(e){var t=!1;return{promise:new Promise((function(n,i){e.then((function(e){return!t&&n(e)})).catch((function(e){return!t&&i(e)}))})),cancel:function(){t=!0}}}function CM(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=CM(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function MM(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=CM(e))&&(i&&(i+=" "),i+=t);return i}var PM="production"===ls.env.NODE_ENV,TM="Invariant failed";function RM(e,t){if(!e){if(PM)throw new Error(TM);var n="function"==typeof t?t():t,i=n?"".concat(TM,": ").concat(n):TM;throw new Error(i)}}
2var LM=function(){};if("production"!==ls.env.NODE_ENV){var IM=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var i=1;i<n;i++)t[i-1]=arguments[i];var r=0,s="Warning: "+e.replace(/%s/g,(function(){return t[r++]}));typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}};LM=function(e,t,n){var i=arguments.length;n=new Array(i>2?i-2:0);for(var r=2;r<i;r++)n[r-2]=arguments[r];if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||IM.apply(null,[t].concat(n))}}const DM=ie(LM);var NM=Object.prototype.hasOwnProperty;function FM(e,t,n){for(n of e.keys())if(OM(n,t))return n}function OM(e,t){var n,i,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&OM(e[i],t[i]););return-1===i}if(n===Set){if(e.size!==t.size)return!1;for(i of e)if((r=i)&&"object"==typeof r&&!(r=FM(t,r))||!t.has(r))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(i of e)if((r=i[0])&&"object"==typeof r&&!(r=FM(t,r))||!OM(i[1],t.get(r)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((i=e.byteLength)===t.byteLength)for(;i--&&e.getInt8(i)===t.getInt8(i););return-1===i}if(ArrayBuffer.isView(e)){if((i=e.byteLength)===t.byteLength)for(;i--&&e[i]===t[i];);return-1===i}if(!n||"object"==typeof e){for(n in i=0,e)if(NM.call(e,n)&&++i&&!NM.call(t,n)||!(n in t)||!OM(e[n],t[n]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}const WM=(0,i.createContext)(null);function jM(e){let{children:t,type:n}=e;return(0,X.jsx)("div",{className:"react-pdf__message react-pdf__message--".concat(n),children:t})}class BM{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(e){this.pdfDocument=e}setViewer(e){this.pdfViewer=e}setExternalLinkRel(e){this.externalLinkRel=e}setExternalLinkTarget(e){this.externalLinkTarget=e}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return RM(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber||0}set page(e){RM(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber=e}get rotation(){return 0}set rotation(e){}goToDestination(e){return new Promise((t=>{RM(this.pdfDocument,"PDF document not loaded."),RM(e,"Destination is not specified."),"string"==typeof e?this.pdfDocument.getDestination(e).then(t):Array.isArray(e)?t(e):e.then(t)})).then((e=>{RM(Array.isArray(e),'"'.concat(e,'" is not a valid destination array.'));const t=e[0];new Promise((e=>{RM(this.pdfDocument,"PDF document not loaded."),t instanceof Object?this.pdfDocument.getPageIndex(t).then((t=>{e(t)})).catch((()=>{RM(!1,'"'.concat(t,'" is not a valid page reference.'))})):"number"==typeof t?e(t):RM(!1,'"'.concat(t,'" is not a valid destination reference.'))})).then((t=>{const n=t+1;RM(this.pdfViewer,"PDF viewer is not initialized."),RM(n>=1&&n<=this.pagesCount,'"'.concat(n,'" is not a valid page number.')),this.pdfViewer.scrollPageIntoView({dest:e,pageIndex:t,pageNumber:n})}))}))}navigateTo(e){this.goToDestination(e)}goToPage(e){const t=e-1;RM(this.pdfViewer,"PDF viewer is not initialized."),RM(e>=1&&e<=this.pagesCount,'"'.concat(e,'" is not a valid page number.')),this.pdfViewer.scrollPageIntoView({pageIndex:t,pageNumber:e})}addLinkAttributes(e,t,n){e.href=t,e.rel=this.externalLinkRel||"noopener noreferrer nofollow",e.target=n?"_blank":this.externalLinkTarget||""}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}setHash(){}executeNamedAction(){}cachePageRef(){}isPageVisible(){return!0}isPageCached(){return!0}executeSetOCGState(){}}const zM=1,UM=2,HM=typeof document<"u",VM=HM&&"file:"===window.location.protocol;function qM(e){return function(e){return typeof e<"u"}(e)&&null!==e}function GM(e){return function(e){return"string"==typeof e}(e)&&/^data:/.test(e)}function XM(e){RM(GM(e),"Invalid data URI.");const[t="",n=""]=e.split(",");return-1!==t.split(";").indexOf("base64")?atob(n):unescape(n)}function YM(){return HM&&window.devicePixelRatio||1}const KM="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";
2function $M(){DM(!VM,"Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ".concat(KM))}function QM(e){e&&e.cancel&&e.cancel()}function JM(e,t){return Object.defineProperty(e,"width",{get(){return this.view[2]*t},configurable:!0}),Object.defineProperty(e,"height",{get(){return this.view[3]*t},configurable:!0}),Object.defineProperty(e,"originalWidth",{get(){return this.view[2]},configurable:!0}),Object.defineProperty(e,"originalHeight",{get(){return this.view[3]},configurable:!0}),e}function ZM(e){return new Promise(((t,n)=>{const i=new FileReader;i.onload=()=>{if(!i.result)return n(new Error("Error while reading a file."));t(i.result)},i.onerror=e=>{if(!e.target)return n(new Error("Error while reading a file."));const{error:t}=e.target;if(!t)return n(new Error("Error while reading a file."));switch(t.code){case t.NOT_FOUND_ERR:return n(new Error("Error while reading a file: File not found."));case t.SECURITY_ERR:return n(new Error("Error while reading a file: Security error."));case t.ABORT_ERR:return n(new Error("Error while reading a file: Aborted."));default:return n(new Error("Error while reading a file."))}},i.readAsArrayBuffer(e)}))}function eP(e,t){switch(t.type){case"RESOLVE":return{value:t.value,error:void 0};case"REJECT":return{value:!1,error:t.error};case"RESET":return{value:void 0,error:void 0};default:return e}}function tP(){return(0,i.useReducer)(eP,{value:void 0,error:void 0})}var nP=function(e,t,n,i){return new(n||(n=Promise))((function(r,s){function a(e){try{l(i.next(e))}catch(t){s(t)}}function o(e){try{l(i.throw(e))}catch(t){s(t)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,o)}l((i=i.apply(e,t||[])).next())}))},iP=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};const{PDFDataRangeTransport:rP}=xM,sP=(e,t)=>{switch(t){case zM:e(prompt("Enter the password to open this PDF file."));break;case UM:e(prompt("Invalid password. Please try again."));break}};function aP(e){return"object"==typeof e&&null!==e&&("data"in e||"range"in e||"url"in e)}const oP=(0,i.forwardRef)((function(e,t){var{children:n,className:r,error:s="Failed to load PDF file.",externalLinkRel:a,externalLinkTarget:o,file:l,inputRef:c,imageResourcesPath:u,loading:h="Loading PDF\u2026",noData:d="No PDF file specified.",onItemClick:f,onLoadError:p,onLoadProgress:g,onLoadSuccess:m,onPassword:v=sP,onSourceError:y,onSourceSuccess:b,options:w,renderMode:k,rotate:x}=e,S=iP(e,["children","className","error","externalLinkRel","externalLinkTarget","file","inputRef","imageResourcesPath","loading","noData","onItemClick","onLoadError","onLoadProgress","onLoadSuccess","onPassword","onSourceError","onSourceSuccess","options","renderMode","rotate"]);const[_,A]=tP(),{value:E,error:C}=_,[M,P]=tP(),{value:T,error:R}=M,L=(0,i.useRef)(new BM),I=(0,i.useRef)([]),D=(0,i.useRef)(void 0),N=(0,i.useRef)(void 0);l&&l!==D.current&&aP(l)&&(DM(!OM(l,D.current),'File prop passed to <Document /> changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.'),D.current=l),w&&w!==N.current&&(DM(!OM(w,N.current),'Options prop passed to <Document /> changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.'),N.current=w);const F=(0,i.useRef)({scrollPageIntoView:e=>{const{dest:t,pageNumber:n,pageIndex:i=n-1}=e;if(f)return void f({dest:t,pageIndex:i,pageNumber:n});const r=I.current[i];r?r.scrollIntoView():DM(!1,"An internal link leading to page ".concat(n," was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>."))}});(0,i.useImperativeHandle)(t,(()=>({linkService:L,pages:I,viewer:F})),[]),(0,i.useEffect)((function(){A({type:"RESET"})}),[l,A]);const O=(0,i.useCallback)((()=>nP(this,void 0,void 0,(function*(){if(!l)return null;if("string"==typeof l)return GM(l)?{data:XM(l)}:($M(),{url:l});if(l instanceof rP)return{range:l};if(l instanceof ArrayBuffer)return{data:l};if(HM&&function(e){return RM(HM,"isBlob can only be used in a browser environment"),e instanceof Blob}(l))return{data:yield ZM(l)};if(RM("object"==typeof l,"Invalid parameter in file, need either Uint8Array, string or a parameter object"),RM(aP(l),"Invalid parameter object: need either .data, .range or .url"),"url"in l&&"string"==typeof l.url){if(GM(l.url)){const{url:e}=l,t=iP(l,["url"]),n=XM(e);return Object.assign({data:n},t)}$M()}return l}))),[l]);function W(e,t){I.current[e]=t}function j(e){delete I.current[e]}(0,i.useEffect)((()=>{const e=EM(O());return e.promise.then((e=>{A({type:"RESOLVE",value:e})})).catch((e=>{A({type:"REJECT",error:e})})),()=>{QM(e)}}),[O,A]),(0,i.useEffect)((()=>
2{if(!(typeof E>"u")){if(!1===E)return void(C&&(DM(!1,C.toString()),y&&y(C)));b&&b()}}),[E]),(0,i.useEffect)((function(){P({type:"RESET"})}),[P,E]),(0,i.useEffect)((function(){if(!E)return;const e=Object.assign(Object.assign({},E),w),t=cM(e);g&&(t.onProgress=g),v&&(t.onPassword=v);const n=t;return n.promise.then((e=>{P({type:"RESOLVE",value:e})})).catch((e=>{n.destroyed||P({type:"REJECT",error:e})})),()=>{n.destroy()}}),[w,P,E]),(0,i.useEffect)((()=>{if(!(typeof T>"u")){if(!1===T)return void(R&&(DM(!1,R.toString()),p&&p(R)));T&&(m&&m(T),I.current=new Array(T.numPages),L.current.setDocument(T))}}),[T]),(0,i.useEffect)((function(){L.current.setViewer(F.current),L.current.setExternalLinkRel(a),L.current.setExternalLinkTarget(o)}),[a,o]);const B=(0,i.useMemo)((()=>({imageResourcesPath:u,linkService:L.current,onItemClick:f,pdf:T,registerPage:W,renderMode:k,rotate:x,unregisterPage:j})),[u,f,T,k,x]),z=(0,i.useMemo)((()=>AM(S,(()=>T))),[S,T]);return(0,X.jsx)("div",Object.assign({className:MM("react-pdf__Document",r),ref:c,style:{"--scale-factor":"1"}},z,{children:l?null==T?(0,X.jsx)(jM,{type:"loading",children:"function"==typeof h?h():h}):!1===T?(0,X.jsx)(jM,{type:"error",children:"function"==typeof s?s():s}
2):(0,X.jsx)(WM.Provider,{value:B,children:n}):(0,X.jsx)(jM,{type:"no-data",children:"function"==typeof d?d():d})}))}));function lP(){return(0,i.useContext)(WM)}function cP(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(Boolean);return n.length<=1?n[0]||null:function(e){n.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}const uP=(0,i.createContext)(null),hP={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},dP=/^H(\d+)$/;function fP(e){return"children"in e}function pP(e){return!!fP(e)&&(1===e.children.length&&0 in e.children&&"id"in e.children[0])}function gP(e){const t={};if(fP(e)){const{role:n}=e,i=n.match(dP);if(i)t.role="heading",t["aria-level"]=Number(i[1]);else if(function(e){return e in hP}(n)){const e=hP[n];e&&(t.role=e)}}return t}function mP(e){const t={};if(fP(e)){if(void 0!==e.alt&&(t["aria-label"]=e.alt),void 0!==e.lang&&(t.lang=e.lang),pP(e)){const[n]=e.children;if(n){const e=mP(n);return Object.assign(Object.assign({},t),e)}}}else"id"in e&&(t["aria-owns"]=e.id);return t}function vP(e){return e?Object.assign(Object.assign({},gP(e)),mP(e)):null}function yP(e){let{className:t,node:n}=e;const r=(0,i.useMemo)((()=>vP(n)),[n]),s=(0,i.useMemo)((()=>!fP(n)||pP(n)?null:n.children.map(((e,t)=>(0,X.jsx)(yP,{node:e},t)))),[n]);return(0,X.jsx)("span",Object.assign({className:t},r,{children:s}))}function bP(){return(0,i.useContext)(uP)}function wP(){const e=bP();RM(e,"Unable to find Page context.");const{onGetStructTreeError:t,onGetStructTreeSuccess:n}=e,[r,s]=tP(),{value:a,error:o}=r,{customTextRenderer:l,page:c}=e;return(0,i.useEffect)((function(){s({type:"RESET"})}),[s,c]),(0,i.useEffect)((function(){if(l||!c)return;const e=EM(c.getStructTree()),t=e;return e.promise.then((e=>{s({type:"RESOLVE",value:e})})).catch((e=>{s({type:"REJECT",error:e})})),()=>QM(t)}),[l,c,s]),(0,i.useEffect)((()=>{if(void 0!==a){if(!1===a)return void(o&&(DM(!1,o.toString()),t&&t(o)));a&&n&&n(a)}}),[a]),a?(0,X.jsx)(yP,{className:"react-pdf__Page__structTree structTree",node:a}):null}const kP=FC;function xP(e){const t=bP();RM(t,"Unable to find Page context.");const n=Object.assign(Object.assign({},t),e),{_className:r,canvasBackground:s,devicePixelRatio:a=YM(),onRenderError:o,onRenderSuccess:l,page:c,renderForms:u,renderTextLayer:h,rotate:d,scale:f}=n,{canvasRef:p}=e;RM(c,"Attempted to render page canvas, but no page was specified.");const g=(0,i.useRef)(null);
2function m(e){(function(e){return"RenderingCancelledException"===e.name})(e)||(DM(!1,e.toString()),o&&o(e))}const v=(0,i.useMemo)((()=>c.getViewport({scale:f*a,rotation:d})),[a,c,d,f]),y=(0,i.useMemo)((()=>c.getViewport({scale:f,rotation:d})),[c,d,f]);(0,i.useEffect)((function(){if(!c)return;c.cleanup();const{current:e}=g;if(!e)return;e.width=v.width,e.height=v.height,e.style.width="".concat(Math.floor(y.width),"px"),e.style.height="".concat(Math.floor(y.height),"px"),e.style.visibility="hidden";const t={annotationMode:u?kP.ENABLE_FORMS:kP.ENABLE,canvasContext:e.getContext("2d",{alpha:!1}),viewport:v};s&&(t.background=s);const n=c.render(t),i=n;return n.promise.then((()=>{e.style.visibility="",c&&l&&l(JM(c,f))})).catch(m),()=>QM(i)}),[s,g,a,c,u,v,y]);const b=(0,i.useCallback)((()=>{const{current:e}=g;e&&(e.width=0,e.height=0)}),[g]);return(0,i.useEffect)((()=>b),[b]),(0,X.jsx)("canvas",{className:"".concat(r,"__canvas"),dir:"ltr",ref:cP(p,g),style:{display:"block",userSelect:"none"},children:h?(0,X.jsx)(wP,{}):null})}function SP(){const e=bP();RM(e,"Unable to find Page context.");const{customTextRenderer:t,onGetTextError:n,onGetTextSuccess:r,onRenderTextLayerError:s,onRenderTextLayerSuccess:a,page:o,pageIndex:l,pageNumber:c,rotate:u,scale:h}=e;RM(o,"Attempted to load page text content, but no page was specified.");const[d,f]=tP(),{value:p,error:g}=d,m=(0,i.useRef)(null),v=(0,i.useRef)(void 0);DM(1===parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10),"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer"),(0,i.useEffect)((function(){f({type:"RESET"})}),[o,f]),(0,i.useEffect)((function(){if(!o)return;const e=EM(o.getTextContent()),t=e;return e.promise.then((e=>{f({type:"RESOLVE",value:e})})).catch((e=>{f({type:"REJECT",error:e})})),()=>QM(t)}),[o,f]),(0,i.useEffect)((()=>{if(void 0!==p){if(!1===p)return void(g&&(DM(!1,g.toString()),n&&n(g)));p&&r&&r(p)}}),[p]);const y=(0,i.useCallback)((()=>{a&&a()}),[a]),b=(0,i.useCallback)((e=>{DM(!1,e.toString()),s&&s(e)}),[s]);const w=(0,i.useMemo)((()=>o.getViewport({scale:h,rotation:u})),[o,u,h]);return(0,i.useLayoutEffect)((function(){if(!o||!p)return;const{current:e}=m;if(!e)return;e.innerHTML="";const n=o.streamTextContent({includeMarkedContent:!0}),i=new tM({container:e,textContentSource:n,viewport:w}),r=i;return i.render().then((()=>{const n=document.createElement("div");n.className="endOfContent",e.append(n),v.current=n;const i=e.querySelectorAll('[role="presentation"]');if(t){let e=0;p.items.forEach(((n,r)=>{if(!function(e){return"str"in e}(n))return;const s=i[e];if(!s)return;const a=t(Object.assign({pageIndex:l,pageNumber:c,itemIndex:r},n));s.innerHTML=a,e+=n.str&&n.hasEOL?2:1}))}y()})).catch(b),()=>QM(r)}),[t,b,y,o,l,c,p,w]),(0,X.jsx)("div",{className:MM("react-pdf__Page__textContent","textLayer"),onMouseUp:function(){const e=v.current;e&&e.classList.remove("active")},onMouseDown:function(){const e=v.current;e&&e.classList.add("active")},ref:m})}function _P(){const e=lP(),t=bP();RM(t,"Unable to find Page context.");const n=Object.assign(Object.assign({},e),t),{imageResourcesPath:r,linkService:s,onGetAnnotationsError:a,onGetAnnotationsSuccess:o,onRenderAnnotationLayerError:l,onRenderAnnotationLayerSuccess:c,page:u,pdf:h,renderForms:d,rotate:f,scale:p=1}=n;RM(h,"Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."),RM(u,"Attempted to load page annotations, but no page was specified."),RM(s,"Attempted to load page annotations, but no linkService was specified.");const[g,m]=tP(),{value:v,error:y}=g,b=(0,i.useRef)(null);DM(1===parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10),"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations"),(0,i.useEffect)((function(){m({type:"RESET"})}),[m,u]),(0,i.useEffect)((function(){if(!u)return;const e=EM(u.getAnnotations()),t=e;return e.promise.then((e=>{m({type:"RESOLVE",value:e})})).catch((e=>{m({type:"REJECT",error:e})})),()=>{QM(t)}}),[m,u,d]),(0,i.useEffect)((()=>
2{if(void 0!==v){if(!1===v)return void(y&&(DM(!1,y.toString()),a&&a(y)));v&&o&&o(v)}}),[v]);const w=(0,i.useMemo)((()=>u.getViewport({scale:p,rotation:f})),[u,f,p]);return(0,i.useEffect)((function(){if(!h||!u||!s||!v)return;const{current:e}=b;if(!e)return;const t=w.clone({dontFlip:!0}),n={accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,div:e,l10n:null,page:u,viewport:t},i={annotations:v,annotationStorage:h.annotationStorage,div:e,imageResourcesPath:r,linkService:s,page:u,renderForms:d,viewport:t};e.innerHTML="";try{new NC(n).render(i),c&&c()}catch(a){!function(e){DM(!1,"".concat(e)),l&&l(e)}(a)}return()=>{}}),[v,r,s,u,d,w]),(0,X.jsx)("div",{className:MM("react-pdf__Page__annotations","annotationLayer"),ref:b})}const AP=1;function EP(e){const t=lP(),n=Object.assign(Object.assign({},t),e),{_className:r="react-pdf__Page",_enableRegisterUnregisterPage:s=!0,canvasBackground:a,canvasRef:o,children:l,className:c,customRenderer:u,customTextRenderer:h,devicePixelRatio:d,error:f="Failed to load the page.",height:p,inputRef:g,loading:m="Loading page\u2026",noData:v="No page specified.",onGetAnnotationsError:y,onGetAnnotationsSuccess:b,onGetStructTreeError:w,onGetStructTreeSuccess:k,onGetTextError:x,onGetTextSuccess:S,onLoadError:_,onLoadSuccess:A,onRenderAnnotationLayerError:E,onRenderAnnotationLayerSuccess:C,onRenderError:M,onRenderSuccess:P,onRenderTextLayerError:T,onRenderTextLayerSuccess:R,pageIndex:L,pageNumber:I,pdf:D,registerPage:N,renderAnnotationLayer:F=!0,renderForms:O=!1,renderMode:W="canvas",renderTextLayer:j=!0,rotate:B,scale:z=AP,unregisterPage:U,width:H}=n,V=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(n,["_className","_enableRegisterUnregisterPage","canvasBackground","canvasRef","children","className","customRenderer","customTextRenderer","devicePixelRatio","error","height","inputRef","loading","noData","onGetAnnotationsError","onGetAnnotationsSuccess","onGetStructTreeError","onGetStructTreeSuccess","onGetTextError","onGetTextSuccess","onLoadError","onLoadSuccess","onRenderAnnotationLayerError","onRenderAnnotationLayerSuccess","onRenderError","onRenderSuccess","onRenderTextLayerError","onRenderTextLayerSuccess","pageIndex","pageNumber","pdf","registerPage","renderAnnotationLayer","renderForms","renderMode","renderTextLayer","rotate","scale","unregisterPage","width"]),[q,G]=tP(),{value:Y,error:K}=q,$=(0,i.useRef)(null);RM(D,"Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");const Q=qM(I)?I-1:null!==L&&void 0!==L?L:null,J=null!==I&&void 0!==I?I:qM(L)?L+1:null,Z=null!==B&&void 0!==B?B:Y?Y.rotate:null,ee=(0,i.useMemo)((()=>{if(!Y)return null;let e=1;const t=null!==z&&void 0!==z?z:AP;if(H||p){const t=Y.getViewport({scale:1,rotation:Z});H?e=H/t.width:p&&(e=p/t.height)}return t*e}),[p,Y,Z,z,H]);(0,i.useEffect)((function(){return()=>{qM(Q)&&s&&U&&U(Q)}}),[s,D,Q,U]),(0,i.useEffect)((function(){G({type:"RESET"})}),[G,D,Q]),(0,i.useEffect)((function(){if(!D||!J)return;const e=EM(D.getPage(J)),t=e;return e.promise.then((e=>{G({type:"RESOLVE",value:e})})).catch((e=>{G({type:"REJECT",error:e})})),()=>QM(t)}),[G,D,Q,J,N]),(0,i.useEffect)((()=>{if(void 0!==Y){if(!1===Y)return void(K&&(DM(!1,K.toString()),_&&_(K)));!function(){if(A){if(!Y||!ee)return;A(JM(Y,ee))}if(s&&N){if(!qM(Q)||!$.current)return;N(Q,$.current)}}()}}),[Y,ee]);const te=(0,i.useMemo)((()=>Y&&qM(Q)&&J&&qM(Z)&&qM(ee)?{_className:r,canvasBackground:a,customTextRenderer:h,devicePixelRatio:d,onGetAnnotationsError:y,onGetAnnotationsSuccess:b,onGetStructTreeError:w,onGetStructTreeSuccess:k,onGetTextError:x,onGetTextSuccess:S,onRenderAnnotationLayerError:E,onRenderAnnotationLayerSuccess:C,onRenderError:M,onRenderSuccess:P,onRenderTextLayerError:T,onRenderTextLayerSuccess:R,page:Y,pageIndex:Q,pageNumber:J,renderForms:O,renderTextLayer:j,rotate:Z,scale:ee}:null),[r,a,h,d,y,b,w,k,x,S,E,C,M,P,T,R,Y,Q,J,O,j,Z,ee]),ne=(0,i.useMemo)((()=>AM(V,(()=>Y&&(ee?JM(Y,ee):void 0)))),[V,Y,ee]),ie="".concat(Q,"@").concat(ee,"/").concat(Z);
2function re(){switch(W){case"custom":return RM(u,'renderMode was set to "custom", but no customRenderer was passed.'),(0,X.jsx)(u,{},"".concat(ie,"_custom"));case"none":return null;default:return(0,X.jsx)(xP,{canvasRef:o},"".concat(ie,"_canvas"))}}return(0,X.jsx)("div",Object.assign({className:MM(r,c),"data-page-number":J,ref:cP(g,$),style:{"--scale-factor":"".concat(ee),backgroundColor:a||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"}},ne,{children:J?null===D||void 0===Y||null===Y?(0,X.jsx)(jM,{type:"loading",children:"function"==typeof m?m():m}):!1===D||!1===Y?(0,X.jsx)(jM,{type:"error",children:"function"==typeof f?f():f}):(0,X.jsxs)(uP.Provider,{value:te,children:[re(),j?(0,X.jsx)(SP,{},"".concat(ie,"_text")):null,F?(0,X.jsx)(_P,{},"".concat(ie,"_annotations")):null,l]}):(0,X.jsx)(jM,{type:"no-data",children:"function"==typeof v?v():v})}))}DM(!VM,"Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ".concat(KM)),UC.workerSrc="pdf.worker.mjs";const CP="SET_ZOOM_LEVEL",MP=e=>({type:CP,value:e}),PP="SET_PDF_PAGINATED",TP="SET_NUM_PAGES",RP=e=>({type:TP,value:e}),LP="SET_CURRENT_PAGE",IP=e=>({type:LP,value:e}),DP={defaultZoomLevel:1,zoomLevel:1,zoomJump:.1,paginated:!0,numPages:0,currentPage:1},NP=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:DP,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case CP:{const{value:n}=t;return{...e,zoomLevel:n}}case PP:{const{value:n}=t;return{...e,paginated:n}}case TP:{const{value:n}=t;return{...e,numPages:n}}case LP:{const{value:n}=t;return{...e,currentPage:n}}default:return e}},FP=(0,i.createContext)({state:DP,dispatch:()=>null}),OP=e=>{var t,n,r;let{children:s,mainState:a}=e;var o,l,c,u,h,d,f;const[p,g]=(0,i.useReducer)(NP,{...DP,defaultZoomLevel:null!==(t=null==(l=null==(o=a.config)?void 0:o.pdfZoom)?void 0:l.defaultZoom)&&void 0!==t?t:DP.defaultZoomLevel,zoomLevel:null!==(n=null==(u=null==(c=a.config)?void 0:c.pdfZoom)?void 0:u.defaultZoom)&&void 0!==n?n:DP.zoomLevel,zoomJump:null!==(r=null==(d=null==(h=a.config)?void 0:h.pdfZoom)?void 0:d.zoomJump)&&void 0!==r?r:DP.zoomJump,paginated:(null==(f=a.config)||!f.pdfVerticalScrollByDefault)&&DP.paginated,mainState:a});return(0,X.jsx)(FP.Provider,{value:{state:p,dispatch:g},children:s})},WP=e=>{var t,n;let{pageNum:r}=e;const{state:{mainState:s,paginated:a,zoomLevel:o,numPages:l,currentPage:c}}=(0,i.useContext)(FP),{t:u}=Gl(),h=(null==s?void 0:s.rendererRect)||null,d=null!==r&&void 0!==r?r:c;return(0,X.jsxs)(jP,{id:"pdf-page-wrapper",$lastPage:d>=l,children:[!a&&(0,X.jsx)(BP,{id:"pdf-page-info",children:u("pdfPluginPageNumber",{currentPage:d,allPagesCount:l})}),(0,X.jsx)(EP,{pageNumber:d||c,scale:o,height:(null!==(t=null==h?void 0:h.height)&&void 0!==t?t:100)-100,width:(null!==(n=null==h?void 0:h.width)&&void 0!==n?n:100)-100,loading:u("pdfPluginLoading")})]})},jP=Jo.div(M||(M=s(["\n margin: ",";\n"])),(e=>e.$lastPage?"20px 0":void 0)),BP=Jo.div(P||(P=s(["\n padding: 0 0 10px 10px;\n color: ",";\n font-size: 14px;\n text-align: left;\n\n @media (max-width: 768px) {\n font-size: 10px;\n }\n"])),(e=>e.theme.textTertiary)),zP=()=>{const{state:{numPages:e}}=(0,i.useContext)(FP),t=[];for(let n=0;n<e;n++)t.push((0,X.jsx)(WP,{pageNum:n+1},n+1));return(0,X.jsx)(X.Fragment,{children:t})},UP=()=>{const{state:{mainState:e,paginated:t},dispatch:n}=(0,i.useContext)(FP),{t:r}=Gl(),s=(null==e?void 0:e.currentDocument)||null;return(0,i.useEffect)((()=>{n(RP(DP.numPages))}),[s]),s&&void 0!==s.fileData?(0,X.jsx)(HP,{file:s.fileData,onLoadSuccess:e=>{let{numPages:t}=e;return n(RP(t))},loading:(0,X.jsx)("span",{children:r("pdfPluginLoading")}),children:t?(0,X.jsx)(WP,{}):(0,X.jsx)(zP,{})}):null},HP=Jo(oP)(T||(T=s(["\n display: flex;\n flex-direction: column;\n margin: 0 auto;\n"]))),VP=e=>(0,X.jsx)(GP,{...e,reverse:!0}),qP=e=>(0,X.jsx)(GP,{...e}),GP=e=>{const{color:t,size:n,reverse:i}=e;return(0,X.jsx)("svg",{width:n||"100%",height:n||"100%",style:{transform:"".concat(i?"rotate(180deg)":"")},viewBox:"0 0 12 12",version:"1.1",children:(0,X.jsx)("g",{id:"Icons",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,X.jsx)("g",{id:"Rounded",transform:"translate(-548.000000, -1000.000000)",children:(0,X.jsx)("g",{id:"AV",transform:"translate(100.000000, 852.000000)",children:(0,X.jsx)("g",{id:"-Round-/-AV-/-skip_next",transform:"translate(442.000000, 142.000000)",children:(0,X.jsxs)("g",{children:[(0,X.jsx)("rect",{id:"Rectangle-Copy-52",x:"0",y:"0",width:"24",height:"24"}),(0,X.jsx)("path",{d:"M7.58,16.89 L13.35,12.82 C13.91,12.42 13.91,11.58 13.35,11.19 L7.58,7.11 C6.91,6.65 6,7.12 6,7.93 L6,16.07 C6,16.88 6.91,17.35 7.58,16.89 Z M16,7 L16,17 C16,17.55 16.45,
218 17,18 C17.55,18 18,17.55 18,17 L18,7 C18,6.45 17.55,6 17,6 C16.45,6 16,6.45 16,7 Z",id:"icon_color",fill:t||"#aaa"})]})})})})})})},XP=e=>{const{color:t,size:n,reverse:i}=e;return(0,X.jsxs)("svg",{width:n||"100%",height:n||"100%",style:{transform:"".concat(i?"rotate(180deg)":"")},id:"Layer_1",viewBox:"0 0 24 24",children:[(0,X.jsx)("path",{d:"M20.57,9.43A8,8,0,0,0,5.26,10,5,5,0,1,0,5,20h5V18H5a3,3,0,0,1,0-6,3.1,3.1,0,0,1,.79.12l1.12.31.14-1.15a6,6,0,0,1,11.74-.82l.15.54.54.16A3.46,3.46,0,0,1,22,14.5,3.5,3.5,0,0,1,18.5,18H16v2h2.5A5.48,5.48,0,0,0,20.57,9.43Z",fill:t||"#aaa"}),(0,X.jsx)("polygon",{points:"12 11 12 15.59 10.71 14.29 9.29 15.71 13 19.41 16.71 15.71 15.29 14.29 14 15.59 14 11 12 11",fill:t||"#aaa"})]})},YP=e=>(0,X.jsx)($P,{...e}),KP=e=>(0,X.jsx)($P,{...e,reverse:!0}),$P=e=>{const{color:t,size:n,reverse:i}=e;return(0,X.jsx)("svg",{width:n||"100%",height:n||"100%",viewBox:"0 0 32 32",version:"1.1",children:(0,X.jsx)("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,X.jsx)("g",{id:"search-plus-icon",fill:t||"#aaa",children:(0,X.jsx)("path",{id:"search-plus",d:i?"M 13 13 L 16 13 L 19 13 L 19 16 L 16 16 L 13 16 L 10 16 L 10 13 Z M 19.4271 21.4271 C 18.0372 22.4175 16.3367 23 14.5 23 C 9.8056 23 6 19.1944 6 14.5 C 6 9.8056 9.8056 6 14.5 6 C 19.1944 6 23 9.8056 23 14.5 C 23 16.3367 22.4175 18.0372 21.4271 19.4271 L 27.0119 25.0119 C 27.5621 25.5621 27.5575 26.4425 27.0117 26.9883 L 26.9883 27.0117 C 26.4439 27.5561 25.5576 27.5576 25.0119 27.0119 L 19.4271 21.4271 L 19.4271 21.4271 L 19.4271 21.4271 Z M 14.5 21 C 18.0899 21 21 18.0899 21 14.5 C 21 10.9101 18.0899 8 14.5 8 C 10.9101 8 8 10.9101 8 14.5 C 8 18.0899 10.9101 21 14.5 21 L 14.5 21 Z":"M 13 13 L 13 10 L 16 10 L 16 13 L 19 13 L 19 16 L 16 16 L 16 19 L 13 19 L 13 16 L 10 16 L 10 13 Z M 19.4271 21.4271 C 18.0372 22.4175 16.3367 23 14.5 23 C 9.8056 23 6 19.1944 6 14.5 C 6 9.8056 9.8056 6 14.5 6 C 19.1944 6 23 9.8056 23 14.5 C 23 16.3367 22.4175 18.0372 21.4271 19.4271 L 27.0119 25.0119 C 27.5621 25.5621 27.5575 26.4425 27.0117 26.9883 L 26.9883 27.0117 C 26.4439 27.5561 25.5576 27.5576 25.0119 27.0119 L 19.4271 21.4271 L 19.4271 21.4271 L 19.4271 21.4271 Z M 14.5 21 C 18.0899 21 21 18.0899 21 14.5 C 21 10.9101 18.0899 8 14.5 8 C 10.9101 8 8 10.9101 8 14.5 C 8 18.0899 10.9101 21 14.5 21 L 14.5 21 Z"})})})})},QP=e=>{const{color:t,size:n}=e;return(0,X.jsx)("svg",{width:n||"100%",height:n||"100%",viewBox:"0 0 24 24",children:(0,X.jsx)("path",{fill:t||"#aaa",d:"M9.29,13.29,4,18.59V17a1,1,0,0,0-2,0v4a1,1,0,0,0,.08.38,1,1,0,0,0,.54.54A1,1,0,0,0,3,22H7a1,1,0,0,0,0-2H5.41l5.3-5.29a1,1,0,0,0-1.42-1.42ZM5.41,4H7A1,1,0,0,0,7,2H3a1,1,0,0,0-.38.08,1,1,0,0,0-.54.54A1,1,0,0,0,2,3V7A1,1,0,0,0,4,7V5.41l5.29,5.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42ZM21,16a1,1,0,0,0-1,1v1.59l-5.29-5.3a1,1,0,0,0-1.42,1.42L18.59,20H17a1,1,0,0,0,0,2h4a1,1,0,0,0,.38-.08,1,1,0,0,0,.54-.54A1,1,0,0,0,22,21V17A1,1,0,0,0,21,16Zm.92-13.38a1,1,0,0,0-.54-.54A1,1,0,0,0,21,2H17a1,1,0,0,0,0,2h1.59l-5.3,5.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L20,5.41V7a1,1,0,0,0,2,0V3A1,1,0,0,0,21.92,2.62Z"})})},JP=e=>{const{color:t,size:n,reverse:i}=e;return(0,X.jsx)("svg",{width:n||"100%",height:n||"100%",style:{transform:"".concat(i?"rotate(90deg)":"")},version:"1.1",id:"Scroll_1",viewBox:"0 0 297 297",xmlSpace:"preserve",children:(0,X.jsx)("path",{fill:t||"#aaa",d:"M206.004,200.723h-31.231V96.277h31.231c0.005,0,0.014,0,0.019,0c5.289,0,9.575-4.287,9.575-9.574\n c0-2.342-0.841-4.488-2.236-6.151L156.168,3.851C154.36,1.428,151.515,0,148.492,0c-3.023,0-5.868,1.428-7.675,3.851L83.302,80.98\n c-2.166,2.902-2.507,6.779-0.883,10.017c1.624,3.236,4.936,5.28,8.559,5.28h31.231v104.445H90.978c-3.623,0-6.934,2.044-8.559,5.28\n c-1.624,3.237-1.283,7.114,0.883,10.017l57.513,77.129c1.808,2.424,4.652,3.852,7.675,3.852c3.023,0,5.868-1.428,7.676-3.852\n l57.514-77.129c2.164-2.902,2.507-6.779,0.883-10.017C212.938,202.767,209.627,200.723,206.004,200.723z"})})},ZP=()=>{const{state:{currentPage:e,numPages:t},dispatch:n}=(0,i.useContext)(FP),{t:r}=Gl();return(0,X.jsxs)(eT,{id:"pdf-pagination",children:[(0,X.jsx)(tT,{id:"pdf-pagination-prev",onClick:()=>n(IP(e-1)),disabled:1===e,children:(0,X.jsx)(VP,{color:"#000",size:"50%"})}),(0,X.jsx)(iT,{id:"pdf-pagination-info",children:r("pdfPluginPageNumber",{currentPage:e,allPagesCount:t})}),(0,X.jsx)(nT,{id:"pdf-pagination-next",onClick:()=>n(IP(e+1)),disabled:e>=t,children:(0,X.jsx)(qP,{color:"#000",size:"50%"})})]})}
2,eT=Jo.div(R||(R=s(["\n display: flex;\n align-items: center;\n"]))),tT=Jo(bl)(L||(L=s(["\n width: 30px;\n height: 30px;\n margin: 0 5px;\n\n @media (max-width: 768px) {\n width: 25px;\n height: 25px;\n }\n"]))),nT=Jo(tT)(I||(I=s(["\n margin: 0 20px 0 5px;\n"]))),iT=Jo.div(D||(D=s(["\n color: ",";\n font-size: 14px;\n text-align: left;\n\n @media (max-width: 768px) {\n font-size: 10px;\n }\n"])),(e=>e.theme.textPrimary)),rT=()=>{const{t:e}=Gl(),{state:{mainState:t,paginated:n,zoomLevel:r,numPages:s,zoomJump:a,defaultZoomLevel:o},dispatch:l}=(0,i.useContext)(FP),c=(null==t?void 0:t.currentDocument)||null;return(0,X.jsxs)(sT,{id:"pdf-controls",children:[n&&s>1&&(0,X.jsx)(ZP,{}),(null==c?void 0:c.fileData)&&(0,X.jsx)(oT,{id:"pdf-download",href:null==c?void 0:c.fileData,download:(null==c?void 0:c.fileName)||(null==c?void 0:c.uri),title:e("downloadButtonLabel"),children:(0,X.jsx)(XP,{color:"#000",size:"75%"})}),(0,X.jsx)(aT,{id:"pdf-zoom-out",onMouseDown:()=>l(MP(r-a)),children:(0,X.jsx)(KP,{color:"#000",size:"80%"})}),(0,X.jsx)(aT,{id:"pdf-zoom-in",onMouseDown:()=>l(MP(r+a)),children:(0,X.jsx)(YP,{color:"#000",size:"80%"})}),(0,X.jsx)(aT,{id:"pdf-zoom-reset",onMouseDown:()=>l(MP(o)),disabled:r===o,children:(0,X.jsx)(QP,{color:"#000",size:"70%"})}),s>1&&(0,X.jsx)(aT,{id:"pdf-toggle-pagination",onMouseDown:()=>l((e=>({type:PP,value:e}))(!n)),children:(0,X.jsx)(JP,{color:"#000",size:"70%",reverse:n})})]})},sT=Jo.div(N||(N=s(["\n display: flex;\n position: sticky;\n top: 0;\n left: 0;\n z-index: 1;\n justify-content: flex-end;\n padding: 8px;\n background-color: ",";\n box-shadow: 0px 2px 3px #00000033;\n\n @media (max-width: 768px) {\n padding: 6px;\n }\n"])),(e=>e.theme.tertiary)),aT=Jo(bl)(F||(F=s(["\n width: 30px;\n height: 30px;\n @media (max-width: 768px) {\n width: 25px;\n height: 25px;\n }\n"]))),oT=Jo(wl)(O||(O=s(["\n width: 30px;\n height: 30px;\n @media (max-width: 768px) {\n width: 25px;\n height: 25px;\n }\n"])));UC.workerSrc=new URL("https://unpkg.com/pdfjs-dist@".concat(kM,"/build/pdf.worker.min.mjs")).toString();const lT=e=>{let{mainState:t}=e;return(0,X.jsx)(OP,{mainState:t,children:(0,X.jsxs)(cT,{id:"pdf-renderer","data-testid":"pdf-renderer",children:[(0,X.jsx)(rT,{}),(0,X.jsx)(UP,{})]})})};lT.fileTypes=["pdf","application/pdf"],lT.weight=0;const cT=Jo.div(W||(W=s(["\n display: flex;\n flex-direction: column;\n flex: 1;\n\n /* width */\n &::-webkit-scrollbar {\n ",";\n }\n /* Track */\n &::-webkit-scrollbar-track {\n /* background: ","; */\n }\n /* Handle */\n &::-webkit-scrollbar-thumb {\n background: ",";\n }\n /* Handle on hover */\n &::-webkit-scrollbar-thumb:hover {\n background: ",";\n }\n"])),(e=>e.theme.disableThemeScrollbar?"":"width: 10px"),(e=>e.theme.secondary),(e=>e.theme.tertiary),(e=>e.theme.primary)),uT=Jo(mc)(j||(j=s(["\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n height: 100%;\n background-color: white;\n background-image: linear-gradient(45deg, #e0e0e0 25%, transparent 25%),\n linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, #e0e0e0 75%),\n linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);\n background-size: 20px 20px;\n background-position:\n 0 0,\n 0 10px,\n 10px -10px,\n -10px 0px;\n"]))),hT=e=>(0,X.jsx)(uT,{...e});hT.fileTypes=["png","image/png"],hT.weight=0;let dT,fT,pT=[];const gT=e=>{var t={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378
2:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop"};return e in t?t[e]:"Tag"+e},mT=e=>{var t,n={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE"};return e in n&&(t=n[e]),t},vT=(e,t,n)=>{n=n||0;var i=t+Math.floor(n/8),r=n+e,s=32-e;if(r<=0)throw RangeError("No bits requested");if(r<=8)var a=24+n,o=dT.getUint8(i,fT);else if(r<=16)a=16+n,o=dT.getUint16(i,fT);else{if(!(r<=32))throw RangeError("Too many bits requested");a=n,o=dT.getUint32(i,fT)}return{bits:o<<a>>>s,byteOffset:i+Math.floor(r/8),bitOffset:r%8}},yT=(e,t)=>{if(e<=0)throw RangeError("No bytes requested");if(e<=1)return dT.getUint8(t,fT);if(e<=2)return dT.getUint16(t,fT);if(e<=3)return dT.getUint32(t,fT)>>>8;if(e<=4)return dT.getUint32(t,fT);throw RangeError("Too many bytes requested")},bT=(e,t,n,i)=>{var r=[],s=(e=>{var t;return-1!==["BYTE","ASCII","SBYTE","UNDEFINED"].indexOf(e)?t=1:-1!==["SHORT","SSHORT"].indexOf(e)?t=2:-1!==["LONG","SLONG","FLOAT"].indexOf(e)?t=4:-1!==["RATIONAL","SRATIONAL","DOUBLE"].indexOf(e)&&(t=8),t})(t);if(s*n<=4){if(!1===fT)var a=i>>>8*(4-s);else a=i;r.push(a)}else for(var o=0;o<n;o++){var l=s*o;if(s>=8){if(-1===["RATIONAL","SRATIONAL"].indexOf(t))throw TypeError("Can't handle this field type or size");r.push(yT(4,i+l)),r.push(yT(4,i+l+4))}else r.push(yT(s,i+l))}return"ASCII"===t&&r.forEach((function(e,t,n){n[t]=String.fromCharCode(e)})),r},wT=(e,t)=>{var n=Math.pow(2,8-t);return Math.floor(e*n+(n-1))},kT=(e,t,n,i)=>(typeof i>"u"&&(i=1),"rgba("+e+", "+t+", "+n+", "+i+")"),xT=e=>{for(var t=yT(2,e),n=[],i=e+2,r=0;r<t;i+=12,r++){var s=yT(2,i),a=yT(2,i+2),o=yT(4,i+4),l=yT(4,i+8),c=gT(s),u=mT(a),h=bT(0,u,o,l);n[c]={type:u,values:h}}pT.push(n);var d=yT(4,i);return 0===d?pT:xT(d)},ST=(e,t)=>{let n=t||document.createElement("canvas");if(e&&(dT=new DataView(e),fT=(()=>{var e=yT(2,0);if(18761===e)fT=!0;else{if(19789!==e)throw TypeError("Invalid byte order value.");fT=!1}return fT})(),(()=>{if(42!==yT(2,2))throw RangeError("You forgot your towel!");return!0})())){var i=yT(4,4);pT=xT(i);var r=pT[0],s=r.ImageWidth.values[0],a=r.ImageLength.values[0];n.width=s,n.height=a;var o=[],l=r.Compression?r.Compression.values[0]:1,c=r.SamplesPerPixel.values[0],u=[],h=0,d=!1;if(r.BitsPerSample.values.forEach((function(e,t,n){u[t]={bitsPerSample:e,hasBytesPerSample:!1,bytesPerSample:void 0},e%8===0&&(u[t].hasBytesPerSample=!0,u[t].bytesPerSample=e/8),h+=e}),void 0),h%8===0){d=!0;var f=h/8}var p=r.StripOffsets.values,g=p.length;if(r.StripByteCounts)var m=r.StripByteCounts.values;else{if(1!==g)throw Error("Cannot recover from missing StripByteCounts");m=[Math.ceil(s*a*h/8)]}for(var v=0;v<g;v++){var y=p[v];o[v]=[];for(var b=m[v],w=0,k=0,x=1,S=!0,_=[],A=0,E=0,C=0;w<b;w+=x)switch(l){case 1:var M=0;for(_=[];M<c;M++){if(!u[M].hasBytesPerSample){var P=vT(u[M].bitsPerSample,y+w,k);throw _.push(P.bits),w=P.byteOffset-y,k=P.bitOffset,RangeError("Cannot handle sub-byte bits per sample")}var T=u[M].bytesPerSample*M;_.push(yT(u[M].bytesPerSample,y+w+T))}if(o[v].push(_),!d)throw x=0,RangeError("Cannot handle sub-byte bits per pixel");x=f;break;case 2:case 3:case 4:case 5:case 6:case 7:break;case 32773:if(S){S=!1;var R=1,L=1,I=dT.getInt8(y+w,fT);I>=0&&I<=127?R=I+1:I>=-127&&I<=-1?L=1-I:S=!0}else{var D=yT(1,y+w);for(M=0;M<L;M++){if(!u[E].hasBytesPerSample)throw RangeError("Cannot handle sub-byte bits per sample");C=C<<8*A|D,++A===u[E].bytesPerSample&&(_.push(C),C=A=0,E++),E===c&&(o[v].push(_),_=[],E=0)}0===--R&&(S=!0)}x=1}}if(n.getContext){var N=n.getContext("2d");if(N.fillStyle=kT(255,255,255,0),r.RowsPerStrip)var F=r.RowsPerStrip.values[0];else F=a;var O=o.length,W=a%F,j=0===W?F:W,B=F,z=0,U=r.PhotometricInterpretation.values[0],H=[],V=0;if(r.ExtraSamples&&(V=(H=r.ExtraSamples.values).length),r.ColorMap)var q=r.ColorMap.values,G=Math.pow(2,u[0].bitsPerSample);for(v=0;v<O;v++){v+1===O&&(B=j);for(var X=o[v].length,Y=z*v,K=0,$=0;$<X;K++)for(var Q=0;Q<s;Q++,$++){var J=o[v][$],Z=0,ee=0,te=0,ne=1;if(V>0)for(var ie=0;ie<V;
2ie++)if(1===H[ie]||2===H[ie]){ne=J[3+ie]/256;break}switch(U){case 0:if(u[0].hasBytesPerSample)var re=Math.pow(16,2*u[0].bytesPerSample);J.forEach((function(e,t,n){n[t]=re-e}));case 1:Z=ee=te=wT(J[0],u[0].bitsPerSample);break;case 2:Z=wT(J[0],u[0].bitsPerSample),ee=wT(J[1],u[1].bitsPerSample),te=wT(J[2],u[2].bitsPerSample);break;case 3:if(void 0===q)throw Error("Palette image missing color map");var se=J[0];Z=wT(q[se],16),ee=wT(q[G+se],16),te=wT(q[2*G+se],16);break;case 4:throw RangeError("Not Yet Implemented: Transparency mask");case 5:throw RangeError("Not Yet Implemented: CMYK");case 6:throw RangeError("Not Yet Implemented: YCbCr");case 8:throw RangeError("Not Yet Implemented: CIELab");default:throw RangeError("Unknown Photometric Interpretation:",U)}N.fillStyle=kT(Z,ee,te,ne),N.fillRect(Q,Y+K,1,1)}z=B}}return n}},_T=e=>{const{mainState:{currentDocument:t}}=e,{t:n}=Gl(),[r,s]=(0,i.useState)(!1),[a,o]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{if(!t||r)return;const e=document.getElementById("tiff-img");try{e&&ST(t.fileData,e),s(!0)}catch{o(!0)}}),[t,r]),a?(0,X.jsx)(mc,{...e,children:(0,X.jsx)("div",{children:n("brokenFile")})}):(0,X.jsx)(mc,{...e,children:(0,X.jsx)(AT,{id:"tiff-img"})})};_T.fileTypes=["tif","tiff","image/tif","image/tiff"],_T.weight=0,_T.fileLoader=e=>nc({...e,readerTypeFunction:"arrayBuffer"});const AT=Jo.canvas(B||(B=s(["\n max-width: 95%;\n max-height: 95%;\n"]))),ET=e=>{let{mainState:{currentDocument:t}}=e;return(0,X.jsx)(CT,{id:"txt-renderer",children:null==t?void 0:t.fileData})};ET.fileTypes=["txt","text/plain"],ET.weight=0,ET.fileLoader=rc;const CT=Jo.div(z||(z=s(["\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 30px;\n"])));var MT={exports:{}};MT.exports=function e(){var t=typeof self<"u"?self:typeof window<"u"?window:void 0!==t?t:{},n=!t.document&&!!t.postMessage,i=t.IS_PAPA_WORKER||!1,r={},s=0,a={parse:function(n,i){var o=(i=i||{}).dynamicTyping||!1;if(k(o)&&(i.dynamicTypingFunction=o,o={}),i.dynamicTyping=o,i.transform=!!k(i.transform)&&i.transform,i.worker&&a.WORKERS_SUPPORTED){var l=function(){if(!a.WORKERS_SUPPORTED)return!1;var n,i,o=(n=t.URL||t.webkitURL||null,i=e.toString(),a.BLOB_URL||(a.BLOB_URL=n.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",i,")();"],{type:"text/javascript"})))),l=new t.Worker(o);return l.onmessage=m,l.id=s++,r[l.id]=l}();return l.userStep=i.step,l.userChunk=i.chunk,l.userComplete=i.complete,l.userError=i.error,i.step=k(i.step),i.chunk=k(i.chunk),i.complete=k(i.complete),i.error=k(i.error),delete i.worker,void l.postMessage({input:n,config:i,workerId:l.id})}var f,p=null;return a.NODE_STREAM_INPUT,"string"==typeof n?(n=65279===(f=n).charCodeAt(0)?f.slice(1):f,p=i.download?new c(i):new h(i)):!0===n.readable&&k(n.read)&&k(n.on)?p=new d(i):(t.File&&n instanceof File||n instanceof Object)&&(p=new u(i)),p.stream(n)},unparse:function(e,t){var n=!1,i=!0,r=",",s="\r\n",o='"',l=o+o,c=!1,u=null,h=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||a.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(r=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(o=t.quoteChar),"boolean"==typeof t.header&&(i=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");u=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+o),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(h=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(p(o),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return f(null,e,c);if("object"==typeof e[0])return f(u||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||u),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),f(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function f(e,t,n){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var o=Array.isArray(e)&&0<e.length,l=!Array.isArray(t[0]);if(o&&i){for(var c=0;c<e.length;c++)0<c&&(a+=r),a+=g(e[c],c);0<t.length&&(a+=s)}for(var u=0;u<t.length;u++){var h=o?e.length:t[u].length,d=!1,f=o?0===Object.keys(t[u]).length:0===t[u].length;if(n&&!o&&(d="greedy"===n?""===t[u].join("").trim():1===t[u].length&&0===t[u][0].length),"greedy"===n&&o){for(var p=[],m=0;m<h;m++){var v=l?e[m]:m;p.push(t[u][v])}d=""===p.join("").trim()}if(!d){for(var y=0;
vendor: 14,504 bytes, line 2
2y<h;y++){0<y&&!f&&(a+=r);var b=o&&l?e[y]:y;a+=g(t[u][b],y)}u<t.length-1&&(!n||0<h&&!f)&&(a+=s)}}return a}function g(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var i=!1;h&&"string"==typeof e&&h.test(e)&&(e="'"+e,i=!0);var s=e.toString().replace(d,l);return(i=i||!0===n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var n=0;n<t.length;n++)if(-1<e.indexOf(t[n]))return!0;return!1}(s,a.BAD_DELIMITERS)||-1<s.indexOf(r)||" "===s.charAt(0)||" "===s.charAt(s.length-1))?o+s+o:s}},RECORD_SEP:"\x1e",UNIT_SEP:"\x1f",BYTE_ORDER_MARK:"\ufeff"};if(a.BAD_DELIMITERS=["\r","\n",'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!n&&!!t.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=g,a.ParserHandle=f,a.NetworkStreamer=c,a.FileStreamer=u,a.StringStreamer=h,a.ReadableStreamStreamer=d,t.jQuery){var o=t.jQuery;o.fn.parse=function(e){var n=e.config||{},i=[];return this.each((function(e){if("INPUT"!==o(this).prop("tagName").toUpperCase()||"file"!==o(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var r=0;r<this.files.length;r++)i.push({file:this.files[r],inputElem:this,instanceConfig:o.extend({},n)})})),r(),this;function r(){if(0!==i.length){var t,n,r,l,c=i[0];if(k(e.before)){var u=e.before(c.file,c.inputElem);if("object"==typeof u){if("abort"===u.action)return t="AbortError",n=c.file,r=c.inputElem,l=u.reason,void(k(e.error)&&e.error({name:t},n,r,l));if("skip"===u.action)return void s();"object"==typeof u.config&&(c.instanceConfig=o.extend(c.instanceConfig,u.config))}else if("skip"===u)return void s()}var h=c.instanceConfig.complete;c.instanceConfig.complete=function(e){k(h)&&h(e,c.file,c.inputElem),s()},a.parse(c.file,c.instanceConfig)}else k(e.complete)&&e.complete()}function s(){i.splice(0,1),r()}}}function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new f(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,n){if(this.isFirstChunk&&k(this._config.beforeFirstChunk)){var r=this._config.beforeFirstChunk(e);void 0!==r&&(e=r)}this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e;this._partialLine="";var o=this._handle.parse(s,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var l=o.meta.cursor;this._finished||(this._partialLine=s.substring(l-this._baseIndex),this._baseIndex=l),o&&o.data&&(this._rowCount+=o.data.length);var c=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(i)t.postMessage({results:o,workerId:a.WORKER_ID,finished:c});else if(k(this._config.chunk)&&!n){if(this._config.chunk(o,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);o=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(o.data),this._completeResults.errors=this._completeResults.errors.concat(o.errors),this._completeResults.meta=o.meta),this._completed||!c||!k(this._config.complete)||o&&o.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||o&&o.meta.paused||this._nextChunk(),o}this._halted=!0},this._sendError=function(e){k(this._config.error)?this._config.error(e):i&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=w(this._chunkLoaded,this),t.onerror=w(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var i in e)t.setRequestHeader(i,e[i])}if(this._config.chunkSize){var r=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+r)}try{t.send(this._config.downloadRequestBody)}catch(s){this._chunkError(s.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function u(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),l.call(this,e);var i=typeof FileReader<"u";this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,i?((t=new FileReader).onload=w(this._chunkLoaded,this),t.onerror=w(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var r=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,r)}var s=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function h(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function d(e){l.call(this,e=e||{});var t=[],n=!0,i=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=w((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(i){this._streamError(i)}}),this),this._streamError=w((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=w((function(){this._streamCleanUp(),i=!0,this._streamData("")}),this),this._streamCleanUp=w((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function f(e){var t,n,i,r=Math.pow(2,53),s=-r,o=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,c=this,u=0,h=0,d=!1,f=!1,m=[],v={data:[],errors:[],meta:{}};if(k(e.step)){var y=e.step;e.step=function(t){if(v=t,S())x();else{if(x(),0===v.data.length)return;u+=t.data.length,e.preview&&u>e.preview?n.abort():(v.data=v.data[0],y(v,c))}}}function w(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function x(){return v&&i&&(A("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),i=!1),e.skipEmptyLines&&(v.data=v.data.filter((function(e){return!w(e)}))),S()&&function(){if(v)if(Array.isArray(v.data[0])){for(var t=0;S()&&t<v.data.length;t++)v.data[t].forEach(n);v.data.splice(0,1)}else v.data.forEach(n);function n(t,n){k(e.transformHeader)&&(t=e.transformHeader(t,n)),m.push(t)}}(),function(){if(!v||!e.header&&!e.dynamicTyping&&!e.transform)return v;function t(t,n){var i,r=e.header?{}:[];for(i=0;i<t.length;i++){var s=i,a=t[i];e.header&&(s=i>=m.length?"__parsed_extra":m[i]),e.transform&&(a=e.transform(a,s)),a=_(s,a),"__parsed_extra"===s?(r[s]=r[s]||[],r[s].push(a)):r[s]=a}return e.header&&(i>m.length?A("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+i,h+n):i<m.length&&A("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+i,h+n)),r}var n=1;return!v.data.length||Array.isArray(v.data[0])?(v.data=v.data.map(t),n=v.data.length):v.data=t(v.data,0),e.header&&v.meta&&(v.meta.fields=m),h+=n,v}()}function S(){return e.header&&0===m.length}function _(t,n){return i=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[i]&&(e.dynamicTyping[i]=e.dynamicTypingFunction(i)),!0===(e.dynamicTyping[i]||e.dynamicTyping)?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&(function(e){if(o.test(e)){var t=parseFloat(e);if(s<t&&t<r)return!0}return!1}(n)?parseFloat(n):l.test(n)?new Date(n):""===n?null:n):n;var i}function A(e,t,n,i){var r={type:e,code:t,message:n};void 0!==i&&(r.row=i),v.errors.push(r)}this.parse=function(r,s,o){var l=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var n=new RegExp(p(t)+"([^]*?)"+p(t),"gm"),i=(e=e.replace(n,"")).split("\r"),r=e.split("\n"),s=1<r.length&&r[0].length<i[0].length;if(1===i.length||s)return"\n";for(var a=0,o=0;o<i.length;o++)"\n"===i[o][0]&&a++;return a>=i.length/2?"\r\n":"\r"}(r,l)),i=!1,e.delimiter)k(e.delimiter)&&(e.delimiter=e.delimiter(r),v.meta.delimiter=e.delimiter);else{var c=function(t,n,i,r,s){var o,l,c,u;s=s||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var h=0;h<s.length;h++){var d=s[h],f=0,p=0,m=0;c=void 0;for(var v=new g({comments:r,delimiter:d,newline:n,preview:10}).parse(t),y=0;y<v.data.length;y++)if(i&&w(v.data[y]))m++;else{var b=v.data[y].length;p+=b,void 0!==c?0<b&&(f+=Math.abs(b-c),c=b):c=b}0<v.data.length&&(p/=v.data.length-m),(void 0===l||f<=l)&&(void 0===u||u<p)&&1.99<p&&(l=f,o=d,u=p)}return{successful:!!(e.delimiter=o),bestDelimiter:o}}(r,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);c.successful?e.delimiter=c.bestDelimiter:(i=!0,e.delimiter=a.DefaultDelimiter),v.meta.delimiter=e.delimiter}var u=b(e);return e.preview&&e.header&&u.preview++,t=r,n=new g(u),v=n.parse(t,s,o),x(),d?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,n.abort(),t=k(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){c.streamer._halted?(d=!1,c.streamer.parseChunk(t,!0)):setTimeout(c.resume,3)},this.aborted=function(){return f},this.abort=function(){f=!0,n.abort(),v.meta.aborted=!0,k(e.complete)&&e.complete(v),t=""}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t,n=(e=e||{}).delimiter,i=e.newline,r=e.comments,s=e.step,o=e.preview,l=e.fastMode,c=t=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(c=e.escapeChar),("string"!=typeof n||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=","),r===n)throw new Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||-1<a.BAD_DELIMITERS.indexOf(r))&&(r=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var u=0,h=!1;this.parse=function(a,d,f){if("string"!=typeof a)throw new Error("Input must be a string");var g=a.length,m=n.length,v=i.length,y=r.length,b=k(s),w=[],x=[],S=[],_=u=0;if(!a)return G();if(e.header&&!d){var A=a.split(i)[0].split(n),E=[],C={},M=!1;for(var P in A){var T=A[P];k(e.transformHeader)&&(T=e.transformHeader(T,P));var R=T,L=C[T]||0;for(0<L&&(M=!0,R=T+"_"+L),C[T]=L+1;E.includes(R);)R=R+"_"+L;E.push(R)}if(M){var I=a.split(i);I[0]=E.join(n),a=I.join(i)}}if(l||!1!==l&&-1===a.indexOf(t)){for(var D=a.split(i),N=0;N<D.length;N++){if(S=D[N],u+=S.length,N!==D.length-1)u+=i.length;else if(f)return G();if(!r||S.substring(0,y)!==r){if(b){if(w=[],U(S.split(n)),X(),h)return G()}else U(S.split(n));if(o&&o<=N)return w=w.slice(0,o),G(!0)}}return G()}for(var F=a.indexOf(n,u),O=a.indexOf(i,u),W=new RegExp(p(c)+p(t),"g"),j=a.indexOf(t,u);;)if(a[u]!==t)if(r&&0===S.length&&a.substring(u,u+y)===r){if(-1===O)return G();u=O+v,O=a.indexOf(i,u),F=a.indexOf(n,u)}else if(-1!==F&&(F<O||-1===O))S.push(a.substring(u,F)),u=F+m,F=a.indexOf(n,u);else{if(-1===O)break;if(S.push(a.substring(u,O)),q(O+v),b&&(X(),h))return G();if(o&&w.length>=o)return G(!0)}else for(j=u,u++;;){if(-1===(j=a.indexOf(t,j+1)))return f||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:u}),V();if(j===g-1)return V(a.substring(u,j).replace(W,t));if(t!==c||a[j+1]!==c){if(t===c||0===j||a[j-1]!==c){-1!==F&&F<j+1&&(F=a.indexOf(n,j+1)),-1!==O&&O<j+1&&(O=a.indexOf(i,j+1));var B=H(-1===O?F:Math.min(F,O));if(a.substr(j+1+B,m)===n){S.push(a.substring(u,j).replace(W,t)),a[u=j+1+B+m]!==t&&(j=a.indexOf(t,u)),F=a.indexOf(n,u),O=a.indexOf(i,u);break}var z=H(O);if(a.substring(j+1+z,j+1+z+v)===i){if(S.push(a.substring(u,j).replace(W,t)),q(j+1+z+v),F=a.indexOf(n,u),j=a.indexOf(t,u),b&&(X(),h))return G();if(o&&w.length>=o)return G(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:u}),j++}}else j++}return V();function U(e){w.push(e),_=u}function H(e){var t=0;if(-1!==e){var n=a.substring(j+1,e);n&&""===n.trim()&&(t=n.length)}return t}function V(e){return f||(void 0===e&&(e=a.substring(u)),S.push(e),u=g,U(S),b&&X()),G()}function q(e){u=e,U(S),S=[],O=a.indexOf(i,u)}function G(e){return{data:w,errors:x,meta:{delimiter:n,linebreak:i,aborted:h,truncated:!!e,cursor:_+(d||0)}}}function X(){s(G()),w=[],x=[]}},this.abort=function(){h=!0},this.getCharIndex=function(){return u}}function m(e){var t=e.data,n=r[t.workerId],i=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){i=!0,v(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y}
2;if(k(n.userStep)){for(var a=0;a<t.results.data.length&&(n.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},s),!i);a++);delete t.results}else k(n.userChunk)&&(n.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!i&&v(t.workerId,t.results)}function v(e,t){var n=r[e];k(n.userComplete)&&n.userComplete(t),n.terminate(),delete r[e]}function y(){throw new Error("Not implemented.")}function b(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=b(e[n]);return t}function w(e,t){return function(){e.apply(t,arguments)}}function k(e){return"function"==typeof e}return i&&(t.onmessage=function(e){var n=e.data;if(void 0===a.WORKER_ID&&n&&(a.WORKER_ID=n.workerId),"string"==typeof n.input)t.postMessage({workerId:a.WORKER_ID,results:a.parse(n.input,n.config),finished:!0});else if(t.File&&n.input instanceof File||n.input instanceof Object){var i=a.parse(n.input,n.config);i&&t.postMessage({workerId:a.WORKER_ID,results:i,finished:!0})}}),(c.prototype=Object.create(l.prototype)).constructor=c,(u.prototype=Object.create(l.prototype)).constructor=u,(h.prototype=Object.create(h.prototype)).constructor=h,(d.prototype=Object.create(l.prototype)).constructor=d,a}();const PT=ie(MT.exports),TT=e=>{let{mainState:{currentDocument:t,config:n}}=e;const[r,s]=(0,i.useState)([]);return(0,i.useEffect)((()=>{var e;if(null!=t&&t.fileData){var i;const r=PT.parse(t.fileData,{delimiter:null!==(i=null==n?void 0:n.csvDelimiter)&&void 0!==i?i:","});(null==(e=r.errors)||!e.length)&&r.data&&s(r.data)}}),[t,null==n?void 0:n.csvDelimiter]),r.length?(0,X.jsx)(RT,{children:(0,X.jsxs)(LT,{children:[(0,X.jsx)("thead",{children:(0,X.jsx)("tr",{children:r[0].map((e=>(0,X.jsx)("th",{children:e},e)))})}),(0,X.jsx)("tbody",{children:r.slice(1,r.length).map((e=>(0,X.jsx)("tr",{children:e.map((e=>(0,X.jsx)("td",{children:e},e)))},e.join(""))))})]})}):null};TT.fileTypes=["csv","text/csv"],TT.weight=0,TT.fileLoader=rc;const RT=Jo.div(U||(U=s(["\n width: 100%;\n"]))),LT=Jo.table(H||(H=s(["\n width: 100%;\n text-align: left;\n\n th,\n td {\n padding: 5px 10px;\n\n &:empty {\n display: none;\n }\n }\n"]))),IT=e=>(0,X.jsx)(mc,{...e});IT.fileTypes=["gif","image/gif"],IT.weight=0;const DT=e=>{let{mainState:{currentDocument:t}}=e;return t?(0,X.jsx)(NT,{id:"video-renderer",children:(0,X.jsx)(FT,{controls:!0,src:t.uri})}):null};DT.fileTypes=["video/mp4","video/quicktime","video/x-msvideo"],DT.weight=0;const NT=Jo.div(V||(V=s(["\n width: 100%;\n"]))),FT=Jo.video(q||(q=s(["\n width: 100%;\n height: 100%;\n border: 0;\n"]))),OT=e=>(0,X.jsx)(mc,{...e});OT.fileTypes=["webp","image/webp"],OT.weight=0;const WT=[bc,wc,Sc,_c,lT,hT,_T,ET,TT,IT,DT,OT],jT=(0,i.forwardRef)(((e,t)=>{const{documents:n,theme:i}=e;if(!n)throw new Error("Please provide an array of documents to DocViewer!");return(0,X.jsx)(ml,{ref:t,pluginRenderers:WT,...e,children:(0,X.jsx)(Ho,{theme:i?{...gc,...i}:gc,children:(0,X.jsxs)(zT,{id:"react-doc-viewer","data-testid":"react-doc-viewer",className:e.className,style:e.style,children:[(0,X.jsx)(ec,{}),(0,X.jsx)(cc,{})]})})})})),BT=(0,i.memo)(jT),zT=Jo.div(G||(G=s(["\n display: flex;\n flex-direction: column;\n background: #ffffff;\n width: 100%;\n height: 100%;\n"])));const UT=function(){const e=[{uri:"https://calibre-ebook.com/downloads/demos/demo.docx",fileType:"docx",fileName:"Demo Document"},{uri:"https://sample-videos.com/xls/Sample-Spreadsheet-10-rows.xls",fileType:"xls",fileName:"Demo Spreadsheet"},{uri:" https://sample-videos.com/ppt/Sample-PPT-File-500kb.ppt",fileType:"ppt",fileName:"Demo Powerpoint"},{uri:n(905),fileType:"pdf",fileName:"Javascript Function"},{uri:n(201),fileType:"png",fileName:"Image"}];return(0,X.jsx)(X.Fragment,{children:(0,X.jsx)(BT,{documents:e,pluginRenderers:WT,style:{height:500}})})};const HT=function(){return(0,X.jsx)("div",{className:"App",children:(0,X.jsx)(UT,{})})},VT=e=>{e&&e instanceof Function&&n.e(453).then(n.bind(n,453)).then((t=>{let{getCLS:n,getFID:i,getFCP:r,getLCP:s,getTTFB:a}=t;n(e),i(e),r(e),s(e),a(e)}))};r.createRoot(document.getElementById("root")).render((0,X.jsx)(i.Str
2ictMode,{children:(0,X.jsx)(HT,{})})),VT()})(); 3//# sourceMappingURL=main.2a4f252a.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.