polotno-node 2.12.21 → 2.12.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
`+D+s}var z=!1;function Z(s,h){if(!s||z)return"";z=!0;var P=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(h)if(h=function(){throw Error()},Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(tt){var F=tt}Reflect.construct(s,[],h)}else{try{h.call()}catch(tt){F=tt}s.call(h.prototype)}else{try{throw Error()}catch(tt){F=tt}s()}}catch(tt){if(tt&&F&&typeof tt.stack=="string"){for(var K=tt.stack.split(`
|
|
27
27
|
`),ne=F.stack.split(`
|
|
28
28
|
`),ge=K.length-1,Ie=ne.length-1;1<=ge&&0<=Ie&&K[ge]!==ne[Ie];)Ie--;for(;1<=ge&&0<=Ie;ge--,Ie--)if(K[ge]!==ne[Ie]){if(ge!==1||Ie!==1)do if(ge--,Ie--,0>Ie||K[ge]!==ne[Ie]){var Be=`
|
|
29
|
-
`+K[ge].replace(" at new "," at ");return s.displayName&&Be.includes("<anonymous>")&&(Be=Be.replace("<anonymous>",s.displayName)),Be}while(1<=ge&&0<=Ie);break}}}finally{z=!1,Error.prepareStackTrace=P}return(s=s?s.displayName||s.name:"")?j(s):""}function re(s){switch(s.tag){case 5:return j(s.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return s=Z(s.type,!1),s;case 11:return s=Z(s.type.render,!1),s;case 1:return s=Z(s.type,!0),s;default:return""}}function W(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case O:return"Fragment";case M:return"Portal";case R:return"Profiler";case L:return"StrictMode";case q:return"Suspense";case G:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case k:return(s.displayName||"Context")+".Consumer";case T:return(s._context.displayName||"Context")+".Provider";case C:var h=s.render;return s=s.displayName,s||(s=h.displayName||h.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case J:return h=s.displayName||null,h!==null?h:W(s.type)||"Memo";case ae:h=s._payload,s=s._init;try{return W(s(h))}catch{}}return null}function Q(s){var h=s.type;switch(s.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=h.render,s=s.displayName||s.name||"",h.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W(h);case 8:return h===L?"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(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function se(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ue(s){var h=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function le(s){var h=ue(s)?"checked":"value",P=Object.getOwnPropertyDescriptor(s.constructor.prototype,h),F=""+s[h];if(!s.hasOwnProperty(h)&&typeof P<"u"&&typeof P.get=="function"&&typeof P.set=="function"){var K=P.get,ne=P.set;return Object.defineProperty(s,h,{configurable:!0,get:function(){return K.call(this)},set:function(ge){F=""+ge,ne.call(this,ge)}}),Object.defineProperty(s,h,{enumerable:P.enumerable}),{getValue:function(){return F},setValue:function(ge){F=""+ge},stopTracking:function(){s._valueTracker=null,delete s[h]}}}}function ye(s){s._valueTracker||(s._valueTracker=le(s))}function Re(s){if(!s)return!1;var h=s._valueTracker;if(!h)return!0;var P=h.getValue(),F="";return s&&(F=ue(s)?s.checked?"true":"false":s.value),s=F,s!==P?(h.setValue(s),!0):!1}function Me(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Pe(s,h){var P=h.checked;return U({},h,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:P??s._wrapperState.initialChecked})}function de(s,h){var P=h.defaultValue==null?"":h.defaultValue,F=h.checked!=null?h.checked:h.defaultChecked;P=se(h.value!=null?h.value:P),s._wrapperState={initialChecked:F,initialValue:P,controlled:h.type==="checkbox"||h.type==="radio"?h.checked!=null:h.value!=null}}function Te(s,h){h=h.checked,h!=null&&w(s,"checked",h,!1)}function Ae(s,h){Te(s,h);var P=se(h.value),F=h.type;if(P!=null)F==="number"?(P===0&&s.value===""||s.value!=P)&&(s.value=""+P):s.value!==""+P&&(s.value=""+P);else if(F==="submit"||F==="reset"){s.removeAttribute("value");return}h.hasOwnProperty("value")?_e(s,h.type,P):h.hasOwnProperty("defaultValue")&&_e(s,h.type,se(h.defaultValue)),h.checked==null&&h.defaultChecked!=null&&(s.defaultChecked=!!h.defaultChecked)}function be(s,h,P){if(h.hasOwnProperty("value")||h.hasOwnProperty("defaultValue")){var F=h.type;if(!(F!=="submit"&&F!=="reset"||h.value!==void 0&&h.value!==null))return;h=""+s._wrapperState.initialValue,P||h===s.value||(s.value=h),s.defaultValue=h}P=s.name,P!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,P!==""&&(s.name=P)}function _e(s,h,P){(h!=="number"||Me(s.ownerDocument)!==s)&&(P==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+P&&(s.defaultValue=""+P))}var xe=Array.isArray;function Le(s,h,P,F){if(s=s.options,h){h={};for(var K=0;K<P.length;K++)h["$"+P[K]]=!0;for(P=0;P<s.length;P++)K=h.hasOwnProperty("$"+s[P].value),s[P].selected!==K&&(s[P].selected=K),K&&F&&(s[P].defaultSelected=!0)}else{for(P=""+se(P),h=null,K=0;K<s.length;K++){if(s[K].value===P){s[K].selected=!0,F&&(s[K].defaultSelected=!0);return}h!==null||s[K].disabled||(h=s[K])}h!==null&&(h.selected=!0)}}function pe(s,h){if(h.dangerouslySetInnerHTML!=null)throw Error(r(91));return U({},h,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function Ce(s,h){var P=h.value;if(P==null){if(P=h.children,h=h.defaultValue,P!=null){if(h!=null)throw Error(r(92));if(xe(P)){if(1<P.length)throw Error(r(93));P=P[0]}h=P}h==null&&(h=""),P=h}s._wrapperState={initialValue:se(P)}}function je(s,h){var P=se(h.value),F=se(h.defaultValue);P!=null&&(P=""+P,P!==s.value&&(s.value=P),h.defaultValue==null&&s.defaultValue!==P&&(s.defaultValue=P)),F!=null&&(s.defaultValue=""+F)}function He(s){var h=s.textContent;h===s._wrapperState.initialValue&&h!==""&&h!==null&&(s.value=h)}function st(s){switch(s){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 pt(s,h){return s==null||s==="http://www.w3.org/1999/xhtml"?st(h):s==="http://www.w3.org/2000/svg"&&h==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var ct,bt=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(h,P,F,K){MSApp.execUnsafeLocalFunction(function(){return s(h,P,F,K)})}:s}(function(s,h){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=h;else{for(ct=ct||document.createElement("div"),ct.innerHTML="<svg>"+h.valueOf().toString()+"</svg>",h=ct.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;h.firstChild;)s.appendChild(h.firstChild)}});function ht(s,h){if(h){var P=s.firstChild;if(P&&P===s.lastChild&&P.nodeType===3){P.nodeValue=h;return}}s.textContent=h}var vt={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},wr=["Webkit","ms","Moz","O"];Object.keys(vt).forEach(function(s){wr.forEach(function(h){h=h+s.charAt(0).toUpperCase()+s.substring(1),vt[h]=vt[s]})});function cr(s,h,P){return h==null||typeof h=="boolean"||h===""?"":P||typeof h!="number"||h===0||vt.hasOwnProperty(s)&&vt[s]?(""+h).trim():h+"px"}function Pt(s,h){s=s.style;for(var P in h)if(h.hasOwnProperty(P)){var F=P.indexOf("--")===0,K=cr(P,h[P],F);P==="float"&&(P="cssFloat"),F?s.setProperty(P,K):s[P]=K}}var $t=U({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 $e(s,h){if(h){if($t[s]&&(h.children!=null||h.dangerouslySetInnerHTML!=null))throw Error(r(137,s));if(h.dangerouslySetInnerHTML!=null){if(h.children!=null)throw Error(r(60));if(typeof h.dangerouslySetInnerHTML!="object"||!("__html"in h.dangerouslySetInnerHTML))throw Error(r(61))}if(h.style!=null&&typeof h.style!="object")throw Error(r(62))}}function ze(s,h){if(s.indexOf("-")===-1)return typeof h.is=="string";switch(s){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 kt=null;function St(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var er=null,jt=null,vr=null;function Xt(s){if(s=su(s)){if(typeof er!="function")throw Error(r(280));var h=s.stateNode;h&&(h=_i(h),er(s.stateNode,s.type,h))}}function lr(s){jt?vr?vr.push(s):vr=[s]:jt=s}function Oi(){if(jt){var s=jt,h=vr;if(vr=jt=null,Xt(s),h)for(s=0;s<h.length;s++)Xt(h[s])}}function Zn(s,h){return s(h)}function gi(){}var mn=!1;function Yt(s,h,P){if(mn)return s(h,P);mn=!0;try{return Zn(s,h,P)}finally{mn=!1,(jt!==null||vr!==null)&&(gi(),Oi())}}function sa(s,h){var P=s.stateNode;if(P===null)return null;var F=_i(P);if(F===null)return null;P=F[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(F=!F.disabled)||(s=s.type,F=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!F;break e;default:s=!1}if(s)return null;if(P&&typeof P!="function")throw Error(r(231,h,typeof P));return P}var Ra=!1;if(o)try{var Un={};Object.defineProperty(Un,"passive",{get:function(){Ra=!0}}),window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch{Ra=!1}function Ui(s,h,P,F,K,ne,ge,Ie,Be){var tt=Array.prototype.slice.call(arguments,3);try{h.apply(P,tt)}catch(gt){this.onError(gt)}}var Rr=!1,yn=null,An=!1,ba=null,Mo={onError:function(s){Rr=!0,yn=s}};function wa(s,h,P,F,K,ne,ge,Ie,Be){Rr=!1,yn=null,Ui.apply(Mo,arguments)}function Ya(s,h,P,F,K,ne,ge,Ie,Be){if(wa.apply(this,arguments),Rr){if(Rr){var tt=yn;Rr=!1,yn=null}else throw Error(r(198));An||(An=!0,ba=tt)}}function Qn(s){var h=s,P=s;if(s.alternate)for(;h.return;)h=h.return;else{s=h;do h=s,(h.flags&4098)!==0&&(P=h.return),s=h.return;while(s)}return h.tag===3?P:null}function _a(s){if(s.tag===13){var h=s.memoizedState;if(h===null&&(s=s.alternate,s!==null&&(h=s.memoizedState)),h!==null)return h.dehydrated}return null}function xa(s){if(Qn(s)!==s)throw Error(r(188))}function Io(s){var h=s.alternate;if(!h){if(h=Qn(s),h===null)throw Error(r(188));return h!==s?null:s}for(var P=s,F=h;;){var K=P.return;if(K===null)break;var ne=K.alternate;if(ne===null){if(F=K.return,F!==null){P=F;continue}break}if(K.child===ne.child){for(ne=K.child;ne;){if(ne===P)return xa(K),s;if(ne===F)return xa(K),h;ne=ne.sibling}throw Error(r(188))}if(P.return!==F.return)P=K,F=ne;else{for(var ge=!1,Ie=K.child;Ie;){if(Ie===P){ge=!0,P=K,F=ne;break}if(Ie===F){ge=!0,F=K,P=ne;break}Ie=Ie.sibling}if(!ge){for(Ie=ne.child;Ie;){if(Ie===P){ge=!0,P=ne,F=K;break}if(Ie===F){ge=!0,F=ne,P=K;break}Ie=Ie.sibling}if(!ge)throw Error(r(189))}}if(P.alternate!==F)throw Error(r(190))}if(P.tag!==3)throw Error(r(188));return P.stateNode.current===P?s:h}function Ci(s){return s=Io(s),s!==null?Xa(s):null}function Xa(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var h=Xa(s);if(h!==null)return h;s=s.sibling}return null}var Ps=t.unstable_scheduleCallback,Ko=t.unstable_cancelCallback,Vl=t.unstable_shouldYield,cf=t.unstable_requestPaint,bn=t.unstable_now,Gl=t.unstable_getCurrentPriorityLevel,Zo=t.unstable_ImmediatePriority,Sa=t.unstable_UserBlockingPriority,Qo=t.unstable_NormalPriority,cc=t.unstable_LowPriority,$s=t.unstable_IdlePriority,po=null,oi=null;function an(s){if(oi&&typeof oi.onCommitFiberRoot=="function")try{oi.onCommitFiberRoot(po,s,void 0,(s.current.flags&128)===128)}catch{}}var mr=Math.clz32?Math.clz32:qi,Jo=Math.log,Er=Math.LN2;function qi(s){return s>>>=0,s===0?32:31-(Jo(s)/Er|0)|0}var Ka=64,Hi=4194304;function Pn(s){switch(s&-s){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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Vi(s,h){var P=s.pendingLanes;if(P===0)return 0;var F=0,K=s.suspendedLanes,ne=s.pingedLanes,ge=P&268435455;if(ge!==0){var Ie=ge&~K;Ie!==0?F=Pn(Ie):(ne&=ge,ne!==0&&(F=Pn(ne)))}else ge=P&~K,ge!==0?F=Pn(ge):ne!==0&&(F=Pn(ne));if(F===0)return 0;if(h!==0&&h!==F&&(h&K)===0&&(K=F&-F,ne=h&-h,K>=ne||K===16&&(ne&4194240)!==0))return h;if((F&4)!==0&&(F|=P&16),h=s.entangledLanes,h!==0)for(s=s.entanglements,h&=F;0<h;)P=31-mr(h),K=1<<P,F|=s[P],h&=~K;return F}function Ws(s,h){switch(s){case 1:case 2:case 4:return h+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 h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qn(s,h){for(var P=s.suspendedLanes,F=s.pingedLanes,K=s.expirationTimes,ne=s.pendingLanes;0<ne;){var ge=31-mr(ne),Ie=1<<ge,Be=K[ge];Be===-1?((Ie&P)===0||(Ie&F)!==0)&&(K[ge]=Ws(Ie,h)):Be<=h&&(s.expiredLanes|=Ie),ne&=~Ie}}function es(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function Ru(){var s=Ka;return Ka<<=1,(Ka&4194240)===0&&(Ka=64),s}function Ea(s){for(var h=[],P=0;31>P;P++)h.push(s);return h}function hl(s,h,P){s.pendingLanes|=h,h!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,h=31-mr(h),s[h]=P}function ts(s,h){var P=s.pendingLanes&~h;s.pendingLanes=h,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=h,s.mutableReadLanes&=h,s.entangledLanes&=h,h=s.entanglements;var F=s.eventTimes;for(s=s.expirationTimes;0<P;){var K=31-mr(P),ne=1<<K;h[K]=0,F[K]=-1,s[K]=-1,P&=~ne}}function $l(s,h){var P=s.entangledLanes|=h;for(s=s.entanglements;P;){var F=31-mr(P),K=1<<F;K&h|s[F]&h&&(s[F]|=h),P&=~K}}var Ar=0;function go(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var rs,Ys,fc,hc,Xs,ns=!1,Za=[],Ma=null,Ia=null,Fa=null,xt=new Map,Ks=new Map,vo=[],dc="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 pc(s,h){switch(s){case"focusin":case"focusout":Ma=null;break;case"dragenter":case"dragleave":Ia=null;break;case"mouseover":case"mouseout":Fa=null;break;case"pointerover":case"pointerout":xt.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ks.delete(h.pointerId)}}function Qa(s,h,P,F,K,ne){return s===null||s.nativeEvent!==ne?(s={blockedOn:h,domEventName:P,eventSystemFlags:F,nativeEvent:ne,targetContainers:[K]},h!==null&&(h=su(h),h!==null&&Ys(h)),s):(s.eventSystemFlags|=F,h=s.targetContainers,K!==null&&h.indexOf(K)===-1&&h.push(K),s)}function pn(s,h,P,F,K){switch(h){case"focusin":return Ma=Qa(Ma,s,h,P,F,K),!0;case"dragenter":return Ia=Qa(Ia,s,h,P,F,K),!0;case"mouseover":return Fa=Qa(Fa,s,h,P,F,K),!0;case"pointerover":var ne=K.pointerId;return xt.set(ne,Qa(xt.get(ne)||null,s,h,P,F,K)),!0;case"gotpointercapture":return ne=K.pointerId,Ks.set(ne,Qa(Ks.get(ne)||null,s,h,P,F,K)),!0}return!1}function Wl(s){var h=Ms(s.target);if(h!==null){var P=Qn(h);if(P!==null){if(h=P.tag,h===13){if(h=_a(P),h!==null){s.blockedOn=h,Xs(s.priority,function(){fc(P)});return}}else if(h===3&&P.stateNode.current.memoizedState.isDehydrated){s.blockedOn=P.tag===3?P.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Yl(s){if(s.blockedOn!==null)return!1;for(var h=s.targetContainers;0<h.length;){var P=Zs(s.domEventName,s.eventSystemFlags,h[0],s.nativeEvent);if(P===null){P=s.nativeEvent;var F=new P.constructor(P.type,P);kt=F,P.target.dispatchEvent(F),kt=null}else return h=su(P),h!==null&&Ys(h),s.blockedOn=P,!1;h.shift()}return!0}function ks(s,h,P){Yl(s)&&P.delete(h)}function Mu(){ns=!1,Ma!==null&&Yl(Ma)&&(Ma=null),Ia!==null&&Yl(Ia)&&(Ia=null),Fa!==null&&Yl(Fa)&&(Fa=null),xt.forEach(ks),Ks.forEach(ks)}function ja(s,h){s.blockedOn===h&&(s.blockedOn=null,ns||(ns=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mu)))}function vi(s){function h(K){return ja(K,s)}if(0<Za.length){ja(Za[0],s);for(var P=1;P<Za.length;P++){var F=Za[P];F.blockedOn===s&&(F.blockedOn=null)}}for(Ma!==null&&ja(Ma,s),Ia!==null&&ja(Ia,s),Fa!==null&&ja(Fa,s),xt.forEach(h),Ks.forEach(h),P=0;P<vo.length;P++)F=vo[P],F.blockedOn===s&&(F.blockedOn=null);for(;0<vo.length&&(P=vo[0],P.blockedOn===null);)Wl(P),P.blockedOn===null&&vo.shift()}var Fo=_.ReactCurrentBatchConfig,Xl=!0;function Aa(s,h,P,F){var K=Ar,ne=Fo.transition;Fo.transition=null;try{Ar=1,mo(s,h,P,F)}finally{Ar=K,Fo.transition=ne}}function Ja(s,h,P,F){var K=Ar,ne=Fo.transition;Fo.transition=null;try{Ar=4,mo(s,h,P,F)}finally{Ar=K,Fo.transition=ne}}function mo(s,h,P,F){if(Xl){var K=Zs(s,h,P,F);if(K===null)iu(s,h,F,yo,P),pc(s,F);else if(pn(K,s,h,P,F))F.stopPropagation();else if(pc(s,F),h&4&&-1<dc.indexOf(s)){for(;K!==null;){var ne=su(K);if(ne!==null&&rs(ne),ne=Zs(s,h,P,F),ne===null&&iu(s,h,F,yo,P),ne===K)break;K=ne}K!==null&&F.stopPropagation()}else iu(s,h,F,null,P)}}var yo=null;function Zs(s,h,P,F){if(yo=null,s=St(F),s=Ms(s),s!==null)if(h=Qn(s),h===null)s=null;else if(P=h.tag,P===13){if(s=_a(h),s!==null)return s;s=null}else if(P===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;s=null}else h!==s&&(s=null);return yo=s,null}function dl(s){switch(s){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(Gl()){case Zo:return 1;case Sa:return 4;case Qo:case cc:return 16;case $s:return 536870912;default:return 16}default:return 16}}var Jn=null,Da=null,eo=null;function Os(){if(eo)return eo;var s,h=Da,P=h.length,F,K="value"in Jn?Jn.value:Jn.textContent,ne=K.length;for(s=0;s<P&&h[s]===K[s];s++);var ge=P-s;for(F=1;F<=ge&&h[P-F]===K[ne-F];F++);return eo=K.slice(s,1<F?1-F:void 0)}function mi(s){var h=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&h===13&&(s=13)):s=h,s===10&&(s=13),32<=s||s===13?s:0}function kn(){return!0}function X(){return!1}function fe(s){function h(P,F,K,ne,ge){this._reactName=P,this._targetInst=K,this.type=F,this.nativeEvent=ne,this.target=ge,this.currentTarget=null;for(var Ie in s)s.hasOwnProperty(Ie)&&(P=s[Ie],this[Ie]=P?P(ne):ne[Ie]);return this.isDefaultPrevented=(ne.defaultPrevented!=null?ne.defaultPrevented:ne.returnValue===!1)?kn:X,this.isPropagationStopped=X,this}return U(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var P=this.nativeEvent;P&&(P.preventDefault?P.preventDefault():typeof P.returnValue!="unknown"&&(P.returnValue=!1),this.isDefaultPrevented=kn)},stopPropagation:function(){var P=this.nativeEvent;P&&(P.stopPropagation?P.stopPropagation():typeof P.cancelBubble!="unknown"&&(P.cancelBubble=!0),this.isPropagationStopped=kn)},persist:function(){},isPersistent:kn}),h}var Ne={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fe=fe(Ne),Ge=U({},Ne,{view:0,detail:0}),lt=fe(Ge),ft,Lt,Et,Ut=U({},Ge,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wo,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Et&&(Et&&s.type==="mousemove"?(ft=s.screenX-Et.screenX,Lt=s.screenY-Et.screenY):Lt=ft=0,Et=s),ft)},movementY:function(s){return"movementY"in s?s.movementY:Lt}}),Rt=fe(Ut),Pr=U({},Ut,{dataTransfer:0}),Mr=fe(Pr),ei=U({},Ge,{relatedTarget:0}),Hr=fe(ei),ti=U({},Ne,{animationName:0,elapsedTime:0,pseudoElement:0}),Hn=fe(ti),Ni=U({},Ne,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),bo=fe(Ni),Cs=U({},Ne,{data:0}),Ns=fe(Cs),Kl={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pl={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"},Ba={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Iu(s){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(s):(s=Ba[s])?!!h[s]:!1}function wo(){return Iu}var jo=U({},Ge,{key:function(s){if(s.key){var h=Kl[s.key]||s.key;if(h!=="Unidentified")return h}return s.type==="keypress"?(s=mi(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?pl[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wo,charCode:function(s){return s.type==="keypress"?mi(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?mi(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),yi=fe(jo),is=U({},Ut,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pa=fe(is),gl=U({},Ge,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wo}),Qs=fe(gl),Li=U({},Ne,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ls=fe(Li),Js=U({},Ut,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),Zl=fe(Js),si=[9,13,27,32],la=o&&"CompositionEvent"in window,Do=null;o&&"documentMode"in document&&(Do=document.documentMode);var as=o&&"TextEvent"in window&&!Do,li=o&&(!la||Do&&8<Do&&11>=Do),to=" ",Gi=!1;function ua(s,h){switch(s){case"keyup":return si.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $i(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Vn=!1;function os(s,h){switch(s){case"compositionend":return $i(h);case"keypress":return h.which!==32?null:(Gi=!0,to);case"textInput":return s=h.data,s===to&&Gi?null:s;default:return null}}function Ql(s,h){if(Vn)return s==="compositionend"||!la&&ua(s,h)?(s=Os(),eo=Da=Jn=null,Vn=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return li&&h.locale!=="ko"?null:h.data;default:return null}}var ca={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 Jr(s){var h=s&&s.nodeName&&s.nodeName.toLowerCase();return h==="input"?!!ca[s.type]:h==="textarea"}function vl(s,h,P,F){lr(F),h=_c(h,"onChange"),0<h.length&&(P=new Fe("onChange","change",null,P,F),s.push({event:P,listeners:h}))}var ka=null,Wi=null;function ml(s){ru(s,0)}function _o(s){var h=ci(s);if(Re(h))return s}function Yi(s,h){if(s==="change")return h}var Bo=!1;if(o){var za;if(o){var Ti="oninput"in document;if(!Ti){var xo=document.createElement("div");xo.setAttribute("oninput","return;"),Ti=typeof xo.oninput=="function"}za=Ti}else za=!1;Bo=za&&(!document.documentMode||9<document.documentMode)}function zo(){ka&&(ka.detachEvent("onpropertychange",Oa),Wi=ka=null)}function Oa(s){if(s.propertyName==="value"&&_o(Wi)){var h=[];vl(h,Wi,s,St(s)),Yt(ml,h)}}function So(s,h,P){s==="focusin"?(zo(),ka=h,Wi=P,ka.attachEvent("onpropertychange",Oa)):s==="focusout"&&zo()}function tr(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return _o(Wi)}function en(s,h){if(s==="click")return _o(h)}function Ln(s,h){if(s==="input"||s==="change")return _o(h)}function Tn(s,h){return s===h&&(s!==0||1/s===1/h)||s!==s&&h!==h}var Gn=typeof Object.is=="function"?Object.is:Tn;function Eo(s,h){if(Gn(s,h))return!0;if(typeof s!="object"||s===null||typeof h!="object"||h===null)return!1;var P=Object.keys(s),F=Object.keys(h);if(P.length!==F.length)return!1;for(F=0;F<P.length;F++){var K=P[F];if(!u.call(h,K)||!Gn(s[K],h[K]))return!1}return!0}function Xi(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function on(s,h){var P=Xi(s);s=0;for(var F;P;){if(P.nodeType===3){if(F=s+P.textContent.length,s<=h&&F>=h)return{node:P,offset:h-s};s=F}e:{for(;P;){if(P.nextSibling){P=P.nextSibling;break e}P=P.parentNode}P=void 0}P=Xi(P)}}function ri(s,h){return s&&h?s===h?!0:s&&s.nodeType===3?!1:h&&h.nodeType===3?ri(s,h.parentNode):"contains"in s?s.contains(h):s.compareDocumentPosition?!!(s.compareDocumentPosition(h)&16):!1:!1}function ui(){for(var s=window,h=Me();h instanceof s.HTMLIFrameElement;){try{var P=typeof h.contentWindow.location.href=="string"}catch{P=!1}if(P)s=h.contentWindow;else break;h=Me(s.document)}return h}function yl(s){var h=s&&s.nodeName&&s.nodeName.toLowerCase();return h&&(h==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||h==="textarea"||s.contentEditable==="true")}function Jl(s){var h=ui(),P=s.focusedElem,F=s.selectionRange;if(h!==P&&P&&P.ownerDocument&&ri(P.ownerDocument.documentElement,P)){if(F!==null&&yl(P)){if(h=F.start,s=F.end,s===void 0&&(s=h),"selectionStart"in P)P.selectionStart=h,P.selectionEnd=Math.min(s,P.value.length);else if(s=(h=P.ownerDocument||document)&&h.defaultView||window,s.getSelection){s=s.getSelection();var K=P.textContent.length,ne=Math.min(F.start,K);F=F.end===void 0?ne:Math.min(F.end,K),!s.extend&&ne>F&&(K=F,F=ne,ne=K),K=on(P,ne);var ge=on(P,F);K&&ge&&(s.rangeCount!==1||s.anchorNode!==K.node||s.anchorOffset!==K.offset||s.focusNode!==ge.node||s.focusOffset!==ge.offset)&&(h=h.createRange(),h.setStart(K.node,K.offset),s.removeAllRanges(),ne>F?(s.addRange(h),s.extend(ge.node,ge.offset)):(h.setEnd(ge.node,ge.offset),s.addRange(h)))}}for(h=[],s=P;s=s.parentNode;)s.nodeType===1&&h.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<h.length;P++)s=h[P],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var eu=o&&"documentMode"in document&&11>=document.documentMode,bl=null,bi=null,el=null,tu=!1;function Fu(s,h,P){var F=P.window===P?P.document:P.nodeType===9?P:P.ownerDocument;tu||bl==null||bl!==Me(F)||(F=bl,"selectionStart"in F&&yl(F)?F={start:F.selectionStart,end:F.selectionEnd}:(F=(F.ownerDocument&&F.ownerDocument.defaultView||window).getSelection(),F={anchorNode:F.anchorNode,anchorOffset:F.anchorOffset,focusNode:F.focusNode,focusOffset:F.focusOffset}),el&&Eo(el,F)||(el=F,F=_c(bi,"onSelect"),0<F.length&&(h=new Fe("onSelect","select",null,h,P),s.push({event:h,listeners:F}),h.target=bl)))}function Ua(s,h){var P={};return P[s.toLowerCase()]=h.toLowerCase(),P["Webkit"+s]="webkit"+h,P["Moz"+s]="moz"+h,P}var Ri={animationend:Ua("Animation","AnimationEnd"),animationiteration:Ua("Animation","AnimationIteration"),animationstart:Ua("Animation","AnimationStart"),transitionend:Ua("Transition","TransitionEnd")},Uo={},ju={};o&&(ju=document.createElement("div").style,"AnimationEvent"in window||(delete Ri.animationend.animation,delete Ri.animationiteration.animation,delete Ri.animationstart.animation),"TransitionEvent"in window||delete Ri.transitionend.transition);function wl(s){if(Uo[s])return Uo[s];if(!Ri[s])return s;var h=Ri[s],P;for(P in h)if(h.hasOwnProperty(P)&&P in ju)return Uo[s]=h[P];return s}var gc=wl("animationend"),vc=wl("animationiteration"),mc=wl("animationstart"),yc=wl("transitionend"),bc=new Map,wc="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 qo(s,h){bc.set(s,h),a(h,[s])}for(var _l=0;_l<wc.length;_l++){var wi=wc[_l],ro=wi.toLowerCase(),xl=wi[0].toUpperCase()+wi.slice(1);qo(ro,"on"+xl)}qo(gc,"onAnimationEnd"),qo(vc,"onAnimationIteration"),qo(mc,"onAnimationStart"),qo("dblclick","onDoubleClick"),qo("focusin","onFocus"),qo("focusout","onBlur"),qo(yc,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ho="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(" "),ff=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ho));function Sl(s,h,P){var F=s.type||"unknown-event";s.currentTarget=P,Ya(F,h,void 0,s),s.currentTarget=null}function ru(s,h){h=(h&4)!==0;for(var P=0;P<s.length;P++){var F=s[P],K=F.event;F=F.listeners;e:{var ne=void 0;if(h)for(var ge=F.length-1;0<=ge;ge--){var Ie=F[ge],Be=Ie.instance,tt=Ie.currentTarget;if(Ie=Ie.listener,Be!==ne&&K.isPropagationStopped())break e;Sl(K,Ie,tt),ne=Be}else for(ge=0;ge<F.length;ge++){if(Ie=F[ge],Be=Ie.instance,tt=Ie.currentTarget,Ie=Ie.listener,Be!==ne&&K.isPropagationStopped())break e;Sl(K,Ie,tt),ne=Be}}}if(An)throw s=ba,An=!1,ba=null,s}function sn(s,h){var P=h[Ca];P===void 0&&(P=h[Ca]=new Set);var F=s+"__bubble";P.has(F)||(nu(h,s,2,!1),P.add(F))}function Du(s,h,P){var F=0;h&&(F|=4),nu(P,s,F,h)}var El="_reactListening"+Math.random().toString(36).slice(2);function Ts(s){if(!s[El]){s[El]=!0,n.forEach(function(P){P!=="selectionchange"&&(ff.has(P)||Du(P,!1,s),Du(P,!0,s))});var h=s.nodeType===9?s:s.ownerDocument;h===null||h[El]||(h[El]=!0,Du("selectionchange",!1,h))}}function nu(s,h,P,F){switch(dl(h)){case 1:var K=Aa;break;case 4:K=Ja;break;default:K=mo}P=K.bind(null,h,P,s),K=void 0,!Ra||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||(K=!0),F?K!==void 0?s.addEventListener(h,P,{capture:!0,passive:K}):s.addEventListener(h,P,!0):K!==void 0?s.addEventListener(h,P,{passive:K}):s.addEventListener(h,P,!1)}function iu(s,h,P,F,K){var ne=F;if((h&1)===0&&(h&2)===0&&F!==null)e:for(;;){if(F===null)return;var ge=F.tag;if(ge===3||ge===4){var Ie=F.stateNode.containerInfo;if(Ie===K||Ie.nodeType===8&&Ie.parentNode===K)break;if(ge===4)for(ge=F.return;ge!==null;){var Be=ge.tag;if((Be===3||Be===4)&&(Be=ge.stateNode.containerInfo,Be===K||Be.nodeType===8&&Be.parentNode===K))return;ge=ge.return}for(;Ie!==null;){if(ge=Ms(Ie),ge===null)return;if(Be=ge.tag,Be===5||Be===6){F=ne=ge;continue e}Ie=Ie.parentNode}}F=F.return}Yt(function(){var tt=ne,gt=St(P),mt=[];e:{var dt=bc.get(s);if(dt!==void 0){var Ft=Fe,Ht=s;switch(s){case"keypress":if(mi(P)===0)break e;case"keydown":case"keyup":Ft=yi;break;case"focusin":Ht="focus",Ft=Hr;break;case"focusout":Ht="blur",Ft=Hr;break;case"beforeblur":case"afterblur":Ft=Hr;break;case"click":if(P.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ft=Rt;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ft=Mr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ft=Qs;break;case gc:case vc:case mc:Ft=Hn;break;case yc:Ft=Ls;break;case"scroll":Ft=lt;break;case"wheel":Ft=Zl;break;case"copy":case"cut":case"paste":Ft=bo;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ft=Pa}var Gt=(h&4)!==0,ta=!Gt&&s==="scroll",Qe=Gt?dt!==null?dt+"Capture":null:dt;Gt=[];for(var Ve=tt,Je;Ve!==null;){Je=Ve;var wt=Je.stateNode;if(Je.tag===5&&wt!==null&&(Je=wt,Qe!==null&&(wt=sa(Ve,Qe),wt!=null&&Gt.push(au(Ve,wt,Je)))),ta)break;Ve=Ve.return}0<Gt.length&&(dt=new Ft(dt,Ht,null,P,gt),mt.push({event:dt,listeners:Gt}))}}if((h&7)===0){e:{if(dt=s==="mouseover"||s==="pointerover",Ft=s==="mouseout"||s==="pointerout",dt&&P!==kt&&(Ht=P.relatedTarget||P.fromElement)&&(Ms(Ht)||Ht[Qi]))break e;if((Ft||dt)&&(dt=gt.window===gt?gt:(dt=gt.ownerDocument)?dt.defaultView||dt.parentWindow:window,Ft?(Ht=P.relatedTarget||P.toElement,Ft=tt,Ht=Ht?Ms(Ht):null,Ht!==null&&(ta=Qn(Ht),Ht!==ta||Ht.tag!==5&&Ht.tag!==6)&&(Ht=null)):(Ft=null,Ht=tt),Ft!==Ht)){if(Gt=Rt,wt="onMouseLeave",Qe="onMouseEnter",Ve="mouse",(s==="pointerout"||s==="pointerover")&&(Gt=Pa,wt="onPointerLeave",Qe="onPointerEnter",Ve="pointer"),ta=Ft==null?dt:ci(Ft),Je=Ht==null?dt:ci(Ht),dt=new Gt(wt,Ve+"leave",Ft,P,gt),dt.target=ta,dt.relatedTarget=Je,wt=null,Ms(gt)===tt&&(Gt=new Gt(Qe,Ve+"enter",Ht,P,gt),Gt.target=Je,Gt.relatedTarget=ta,wt=Gt),ta=wt,Ft&&Ht)t:{for(Gt=Ft,Qe=Ht,Ve=0,Je=Gt;Je;Je=tl(Je))Ve++;for(Je=0,wt=Qe;wt;wt=tl(wt))Je++;for(;0<Ve-Je;)Gt=tl(Gt),Ve--;for(;0<Je-Ve;)Qe=tl(Qe),Je--;for(;Ve--;){if(Gt===Qe||Qe!==null&&Gt===Qe.alternate)break t;Gt=tl(Gt),Qe=tl(Qe)}Gt=null}else Gt=null;Ft!==null&&Xf(mt,dt,Ft,Gt,!1),Ht!==null&&ta!==null&&Xf(mt,ta,Ht,Gt,!0)}}e:{if(dt=tt?ci(tt):window,Ft=dt.nodeName&&dt.nodeName.toLowerCase(),Ft==="select"||Ft==="input"&&dt.type==="file")var Wt=Yi;else if(Jr(dt))if(Bo)Wt=Ln;else{Wt=tr;var nr=So}else(Ft=dt.nodeName)&&Ft.toLowerCase()==="input"&&(dt.type==="checkbox"||dt.type==="radio")&&(Wt=en);if(Wt&&(Wt=Wt(s,tt))){vl(mt,Wt,P,gt);break e}nr&&nr(s,dt,tt),s==="focusout"&&(nr=dt._wrapperState)&&nr.controlled&&dt.type==="number"&&_e(dt,"number",dt.value)}switch(nr=tt?ci(tt):window,s){case"focusin":(Jr(nr)||nr.contentEditable==="true")&&(bl=nr,bi=tt,el=null);break;case"focusout":el=bi=bl=null;break;case"mousedown":tu=!0;break;case"contextmenu":case"mouseup":case"dragend":tu=!1,Fu(mt,P,gt);break;case"selectionchange":if(eu)break;case"keydown":case"keyup":Fu(mt,P,gt)}var ir;if(la)e:{switch(s){case"compositionstart":var hr="onCompositionStart";break e;case"compositionend":hr="onCompositionEnd";break e;case"compositionupdate":hr="onCompositionUpdate";break e}hr=void 0}else Vn?ua(s,P)&&(hr="onCompositionEnd"):s==="keydown"&&P.keyCode===229&&(hr="onCompositionStart");hr&&(li&&P.locale!=="ko"&&(Vn||hr!=="onCompositionStart"?hr==="onCompositionEnd"&&Vn&&(ir=Os()):(Jn=gt,Da="value"in Jn?Jn.value:Jn.textContent,Vn=!0)),nr=_c(tt,hr),0<nr.length&&(hr=new Ns(hr,s,null,P,gt),mt.push({event:hr,listeners:nr}),ir?hr.data=ir:(ir=$i(P),ir!==null&&(hr.data=ir)))),(ir=as?os(s,P):Ql(s,P))&&(tt=_c(tt,"onBeforeInput"),0<tt.length&&(gt=new Ns("onBeforeInput","beforeinput",null,P,gt),mt.push({event:gt,listeners:tt}),gt.data=ir))}ru(mt,h)})}function au(s,h,P){return{instance:s,listener:h,currentTarget:P}}function _c(s,h){for(var P=h+"Capture",F=[];s!==null;){var K=s,ne=K.stateNode;K.tag===5&&ne!==null&&(K=ne,ne=sa(s,P),ne!=null&&F.unshift(au(s,ne,K)),ne=sa(s,h),ne!=null&&F.push(au(s,ne,K))),s=s.return}return F}function tl(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function Xf(s,h,P,F,K){for(var ne=h._reactName,ge=[];P!==null&&P!==F;){var Ie=P,Be=Ie.alternate,tt=Ie.stateNode;if(Be!==null&&Be===F)break;Ie.tag===5&&tt!==null&&(Ie=tt,K?(Be=sa(P,ne),Be!=null&&ge.unshift(au(P,Be,Ie))):K||(Be=sa(P,ne),Be!=null&&ge.push(au(P,Be,Ie)))),P=P.return}ge.length!==0&&s.push({event:h,listeners:ge})}var Hh=/\r\n?/g,Kf=/\u0000|\uFFFD/g;function hf(s){return(typeof s=="string"?s:""+s).replace(Hh,`
|
|
30
|
-
`).replace(Kf,"")}function Bu(s,h,P){if(h=hf(h),hf(s)!==h&&P)throw Error(r(425))}function Rs(){}var zu=null,Al=null;function df(s,h){return s==="textarea"||s==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var no=typeof setTimeout=="function"?setTimeout:void 0,xc=typeof clearTimeout=="function"?clearTimeout:void 0,Uu=typeof Promise=="function"?Promise:void 0,Zf=typeof queueMicrotask=="function"?queueMicrotask:typeof Uu<"u"?function(s){return Uu.resolve(null).then(s).catch(Qf)}:no;function Qf(s){setTimeout(function(){throw s})}function Sc(s,h){var P=h,F=0;do{var K=P.nextSibling;if(s.removeChild(P),K&&K.nodeType===8)if(P=K.data,P==="/$"){if(F===0){s.removeChild(K),vi(h);return}F--}else P!=="$"&&P!=="$?"&&P!=="$!"||F++;P=K}while(P);vi(h)}function Ki(s){for(;s!=null;s=s.nextSibling){var h=s.nodeType;if(h===1||h===3)break;if(h===8){if(h=s.data,h==="$"||h==="$!"||h==="$?")break;if(h==="/$")return null}}return s}function Zi(s){s=s.previousSibling;for(var h=0;s;){if(s.nodeType===8){var P=s.data;if(P==="$"||P==="$!"||P==="$?"){if(h===0)return s;h--}else P==="/$"&&h++}s=s.previousSibling}return null}var fa=Math.random().toString(36).slice(2),Ao="__reactFiber$"+fa,ou="__reactProps$"+fa,Qi="__reactContainer$"+fa,Ca="__reactEvents$"+fa,Jf="__reactListeners$"+fa,eh="__reactHandles$"+fa;function Ms(s){var h=s[Ao];if(h)return h;for(var P=s.parentNode;P;){if(h=P[Qi]||P[Ao]){if(P=h.alternate,h.child!==null||P!==null&&P.child!==null)for(s=Zi(s);s!==null;){if(P=s[Ao])return P;s=Zi(s)}return h}s=P,P=s.parentNode}return null}function su(s){return s=s[Ao]||s[Qi],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function ci(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(r(33))}function _i(s){return s[ou]||null}var Ec=[],ss=-1;function Po(s){return{current:s}}function Yr(s){0>ss||(s.current=Ec[ss],Ec[ss]=null,ss--)}function tn(s,h){ss++,Ec[ss]=s.current,s.current=h}var ls={},Mi=Po(ls),ha=Po(!1),rl=ls;function Pl(s,h){var P=s.type.contextTypes;if(!P)return ls;var F=s.stateNode;if(F&&F.__reactInternalMemoizedUnmaskedChildContext===h)return F.__reactInternalMemoizedMaskedChildContext;var K={},ne;for(ne in P)K[ne]=h[ne];return F&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=h,s.__reactInternalMemoizedMaskedChildContext=K),K}function da(s){return s=s.childContextTypes,s!=null}function lu(){Yr(ha),Yr(Mi)}function pf(s,h,P){if(Mi.current!==ls)throw Error(r(168));tn(Mi,h),tn(ha,P)}function qu(s,h,P){var F=s.stateNode;if(h=h.childContextTypes,typeof F.getChildContext!="function")return P;F=F.getChildContext();for(var K in F)if(!(K in h))throw Error(r(108,Q(s)||"Unknown",K));return U({},P,F)}function us(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||ls,rl=Mi.current,tn(Mi,s),tn(ha,ha.current),!0}function th(s,h,P){var F=s.stateNode;if(!F)throw Error(r(169));P?(s=qu(s,h,rl),F.__reactInternalMemoizedMergedChildContext=s,Yr(ha),Yr(Mi),tn(Mi,s)):Yr(ha),tn(ha,P)}var cs=null,kl=!1,N=!1;function B(s){cs===null?cs=[s]:cs.push(s)}function te(s){kl=!0,B(s)}function ie(){if(!N&&cs!==null){N=!0;var s=0,h=Ar;try{var P=cs;for(Ar=1;s<P.length;s++){var F=P[s];do F=F(!0);while(F!==null)}cs=null,kl=!1}catch(K){throw cs!==null&&(cs=cs.slice(s+1)),Ps(Zo,ie),K}finally{Ar=h,N=!1}}return null}var he=[],ve=0,me=null,we=0,Se=[],Oe=0,De=null,Ze=1,ke="";function qe(s,h){he[ve++]=we,he[ve++]=me,me=s,we=h}function Ke(s,h,P){Se[Oe++]=Ze,Se[Oe++]=ke,Se[Oe++]=De,De=s;var F=Ze;s=ke;var K=32-mr(F)-1;F&=~(1<<K),P+=1;var ne=32-mr(h)+K;if(30<ne){var ge=K-K%5;ne=(F&(1<<ge)-1).toString(32),F>>=ge,K-=ge,Ze=1<<32-mr(h)+K|P<<K|F,ke=ne+s}else Ze=1<<ne|P<<K|F,ke=s}function it(s){s.return!==null&&(qe(s,1),Ke(s,1,0))}function Ye(s){for(;s===me;)me=he[--ve],he[ve]=null,we=he[--ve],he[ve]=null;for(;s===De;)De=Se[--Oe],Se[Oe]=null,ke=Se[--Oe],Se[Oe]=null,Ze=Se[--Oe],Se[Oe]=null}var nt=null,Ue=null,ot=!1,ut=null;function qt(s,h){var P=ol(5,null,null,0);P.elementType="DELETED",P.stateNode=h,P.return=s,h=s.deletions,h===null?(s.deletions=[P],s.flags|=16):h.push(P)}function Mt(s,h){switch(s.tag){case 5:var P=s.type;return h=h.nodeType!==1||P.toLowerCase()!==h.nodeName.toLowerCase()?null:h,h!==null?(s.stateNode=h,nt=s,Ue=Ki(h.firstChild),!0):!1;case 6:return h=s.pendingProps===""||h.nodeType!==3?null:h,h!==null?(s.stateNode=h,nt=s,Ue=null,!0):!1;case 13:return h=h.nodeType!==8?null:h,h!==null?(P=De!==null?{id:Ze,overflow:ke}:null,s.memoizedState={dehydrated:h,treeContext:P,retryLane:1073741824},P=ol(18,null,null,0),P.stateNode=h,P.return=s,s.child=P,nt=s,Ue=null,!0):!1;default:return!1}}function ar(s){return(s.mode&1)!==0&&(s.flags&128)===0}function It(s){if(ot){var h=Ue;if(h){var P=h;if(!Mt(s,h)){if(ar(s))throw Error(r(418));h=Ki(P.nextSibling);var F=nt;h&&Mt(s,h)?qt(F,P):(s.flags=s.flags&-4097|2,ot=!1,nt=s)}}else{if(ar(s))throw Error(r(418));s.flags=s.flags&-4097|2,ot=!1,nt=s}}}function _r(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;nt=s}function Rn(s){if(s!==nt)return!1;if(!ot)return _r(s),ot=!0,!1;var h;if((h=s.tag!==3)&&!(h=s.tag!==5)&&(h=s.type,h=h!=="head"&&h!=="body"&&!df(s.type,s.memoizedProps)),h&&(h=Ue)){if(ar(s))throw fr(),Error(r(418));for(;h;)qt(s,h),h=Ki(h.nextSibling)}if(_r(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));e:{for(s=s.nextSibling,h=0;s;){if(s.nodeType===8){var P=s.data;if(P==="/$"){if(h===0){Ue=Ki(s.nextSibling);break e}h--}else P!=="$"&&P!=="$!"&&P!=="$?"||h++}s=s.nextSibling}Ue=null}}else Ue=nt?Ki(s.stateNode.nextSibling):null;return!0}function fr(){for(var s=Ue;s;)s=Ki(s.nextSibling)}function Tt(){Ue=nt=null,ot=!1}function _t(s){ut===null?ut=[s]:ut.push(s)}var Mn=_.ReactCurrentBatchConfig;function Dt(s,h,P){if(s=P.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(P._owner){if(P=P._owner,P){if(P.tag!==1)throw Error(r(309));var F=P.stateNode}if(!F)throw Error(r(147,s));var K=F,ne=""+s;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===ne?h.ref:(h=function(ge){var Ie=K.refs;ge===null?delete Ie[ne]:Ie[ne]=ge},h._stringRef=ne,h)}if(typeof s!="string")throw Error(r(284));if(!P._owner)throw Error(r(290,s))}return s}function or(s,h){throw s=Object.prototype.toString.call(h),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":s))}function kr(s){var h=s._init;return h(s._payload)}function fi(s){function h(Qe,Ve){if(s){var Je=Qe.deletions;Je===null?(Qe.deletions=[Ve],Qe.flags|=16):Je.push(Ve)}}function P(Qe,Ve){if(!s)return null;for(;Ve!==null;)h(Qe,Ve),Ve=Ve.sibling;return null}function F(Qe,Ve){for(Qe=new Map;Ve!==null;)Ve.key!==null?Qe.set(Ve.key,Ve):Qe.set(Ve.index,Ve),Ve=Ve.sibling;return Qe}function K(Qe,Ve){return Qe=Dc(Qe,Ve),Qe.index=0,Qe.sibling=null,Qe}function ne(Qe,Ve,Je){return Qe.index=Je,s?(Je=Qe.alternate,Je!==null?(Je=Je.index,Je<Ve?(Qe.flags|=2,Ve):Je):(Qe.flags|=2,Ve)):(Qe.flags|=1048576,Ve)}function ge(Qe){return s&&Qe.alternate===null&&(Qe.flags|=2),Qe}function Ie(Qe,Ve,Je,wt){return Ve===null||Ve.tag!==6?(Ve=Z0(Je,Qe.mode,wt),Ve.return=Qe,Ve):(Ve=K(Ve,Je),Ve.return=Qe,Ve)}function Be(Qe,Ve,Je,wt){var Wt=Je.type;return Wt===O?gt(Qe,Ve,Je.props.children,wt,Je.key):Ve!==null&&(Ve.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===ae&&kr(Wt)===Ve.type)?(wt=K(Ve,Je.props),wt.ref=Dt(Qe,Ve,Je),wt.return=Qe,wt):(wt=Wp(Je.type,Je.key,Je.props,null,Qe.mode,wt),wt.ref=Dt(Qe,Ve,Je),wt.return=Qe,wt)}function tt(Qe,Ve,Je,wt){return Ve===null||Ve.tag!==4||Ve.stateNode.containerInfo!==Je.containerInfo||Ve.stateNode.implementation!==Je.implementation?(Ve=Q0(Je,Qe.mode,wt),Ve.return=Qe,Ve):(Ve=K(Ve,Je.children||[]),Ve.return=Qe,Ve)}function gt(Qe,Ve,Je,wt,Wt){return Ve===null||Ve.tag!==7?(Ve=_f(Je,Qe.mode,wt,Wt),Ve.return=Qe,Ve):(Ve=K(Ve,Je),Ve.return=Qe,Ve)}function mt(Qe,Ve,Je){if(typeof Ve=="string"&&Ve!==""||typeof Ve=="number")return Ve=Z0(""+Ve,Qe.mode,Je),Ve.return=Qe,Ve;if(typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case A:return Je=Wp(Ve.type,Ve.key,Ve.props,null,Qe.mode,Je),Je.ref=Dt(Qe,null,Ve),Je.return=Qe,Je;case M:return Ve=Q0(Ve,Qe.mode,Je),Ve.return=Qe,Ve;case ae:var wt=Ve._init;return mt(Qe,wt(Ve._payload),Je)}if(xe(Ve)||Y(Ve))return Ve=_f(Ve,Qe.mode,Je,null),Ve.return=Qe,Ve;or(Qe,Ve)}return null}function dt(Qe,Ve,Je,wt){var Wt=Ve!==null?Ve.key:null;if(typeof Je=="string"&&Je!==""||typeof Je=="number")return Wt!==null?null:Ie(Qe,Ve,""+Je,wt);if(typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case A:return Je.key===Wt?Be(Qe,Ve,Je,wt):null;case M:return Je.key===Wt?tt(Qe,Ve,Je,wt):null;case ae:return Wt=Je._init,dt(Qe,Ve,Wt(Je._payload),wt)}if(xe(Je)||Y(Je))return Wt!==null?null:gt(Qe,Ve,Je,wt,null);or(Qe,Je)}return null}function Ft(Qe,Ve,Je,wt,Wt){if(typeof wt=="string"&&wt!==""||typeof wt=="number")return Qe=Qe.get(Je)||null,Ie(Ve,Qe,""+wt,Wt);if(typeof wt=="object"&&wt!==null){switch(wt.$$typeof){case A:return Qe=Qe.get(wt.key===null?Je:wt.key)||null,Be(Ve,Qe,wt,Wt);case M:return Qe=Qe.get(wt.key===null?Je:wt.key)||null,tt(Ve,Qe,wt,Wt);case ae:var nr=wt._init;return Ft(Qe,Ve,Je,nr(wt._payload),Wt)}if(xe(wt)||Y(wt))return Qe=Qe.get(Je)||null,gt(Ve,Qe,wt,Wt,null);or(Ve,wt)}return null}function Ht(Qe,Ve,Je,wt){for(var Wt=null,nr=null,ir=Ve,hr=Ve=0,Ga=null;ir!==null&&hr<Je.length;hr++){ir.index>hr?(Ga=ir,ir=null):Ga=ir.sibling;var cn=dt(Qe,ir,Je[hr],wt);if(cn===null){ir===null&&(ir=Ga);break}s&&ir&&cn.alternate===null&&h(Qe,ir),Ve=ne(cn,Ve,hr),nr===null?Wt=cn:nr.sibling=cn,nr=cn,ir=Ga}if(hr===Je.length)return P(Qe,ir),ot&&qe(Qe,hr),Wt;if(ir===null){for(;hr<Je.length;hr++)ir=mt(Qe,Je[hr],wt),ir!==null&&(Ve=ne(ir,Ve,hr),nr===null?Wt=ir:nr.sibling=ir,nr=ir);return ot&&qe(Qe,hr),Wt}for(ir=F(Qe,ir);hr<Je.length;hr++)Ga=Ft(ir,Qe,hr,Je[hr],wt),Ga!==null&&(s&&Ga.alternate!==null&&ir.delete(Ga.key===null?hr:Ga.key),Ve=ne(Ga,Ve,hr),nr===null?Wt=Ga:nr.sibling=Ga,nr=Ga);return s&&ir.forEach(function(Bc){return h(Qe,Bc)}),ot&&qe(Qe,hr),Wt}function Gt(Qe,Ve,Je,wt){var Wt=Y(Je);if(typeof Wt!="function")throw Error(r(150));if(Je=Wt.call(Je),Je==null)throw Error(r(151));for(var nr=Wt=null,ir=Ve,hr=Ve=0,Ga=null,cn=Je.next();ir!==null&&!cn.done;hr++,cn=Je.next()){ir.index>hr?(Ga=ir,ir=null):Ga=ir.sibling;var Bc=dt(Qe,ir,cn.value,wt);if(Bc===null){ir===null&&(ir=Ga);break}s&&ir&&Bc.alternate===null&&h(Qe,ir),Ve=ne(Bc,Ve,hr),nr===null?Wt=Bc:nr.sibling=Bc,nr=Bc,ir=Ga}if(cn.done)return P(Qe,ir),ot&&qe(Qe,hr),Wt;if(ir===null){for(;!cn.done;hr++,cn=Je.next())cn=mt(Qe,cn.value,wt),cn!==null&&(Ve=ne(cn,Ve,hr),nr===null?Wt=cn:nr.sibling=cn,nr=cn);return ot&&qe(Qe,hr),Wt}for(ir=F(Qe,ir);!cn.done;hr++,cn=Je.next())cn=Ft(ir,Qe,hr,cn.value,wt),cn!==null&&(s&&cn.alternate!==null&&ir.delete(cn.key===null?hr:cn.key),Ve=ne(cn,Ve,hr),nr===null?Wt=cn:nr.sibling=cn,nr=cn);return s&&ir.forEach(function(J7){return h(Qe,J7)}),ot&&qe(Qe,hr),Wt}function ta(Qe,Ve,Je,wt){if(typeof Je=="object"&&Je!==null&&Je.type===O&&Je.key===null&&(Je=Je.props.children),typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case A:e:{for(var Wt=Je.key,nr=Ve;nr!==null;){if(nr.key===Wt){if(Wt=Je.type,Wt===O){if(nr.tag===7){P(Qe,nr.sibling),Ve=K(nr,Je.props.children),Ve.return=Qe,Qe=Ve;break e}}else if(nr.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===ae&&kr(Wt)===nr.type){P(Qe,nr.sibling),Ve=K(nr,Je.props),Ve.ref=Dt(Qe,nr,Je),Ve.return=Qe,Qe=Ve;break e}P(Qe,nr);break}else h(Qe,nr);nr=nr.sibling}Je.type===O?(Ve=_f(Je.props.children,Qe.mode,wt,Je.key),Ve.return=Qe,Qe=Ve):(wt=Wp(Je.type,Je.key,Je.props,null,Qe.mode,wt),wt.ref=Dt(Qe,Ve,Je),wt.return=Qe,Qe=wt)}return ge(Qe);case M:e:{for(nr=Je.key;Ve!==null;){if(Ve.key===nr)if(Ve.tag===4&&Ve.stateNode.containerInfo===Je.containerInfo&&Ve.stateNode.implementation===Je.implementation){P(Qe,Ve.sibling),Ve=K(Ve,Je.children||[]),Ve.return=Qe,Qe=Ve;break e}else{P(Qe,Ve);break}else h(Qe,Ve);Ve=Ve.sibling}Ve=Q0(Je,Qe.mode,wt),Ve.return=Qe,Qe=Ve}return ge(Qe);case ae:return nr=Je._init,ta(Qe,Ve,nr(Je._payload),wt)}if(xe(Je))return Ht(Qe,Ve,Je,wt);if(Y(Je))return Gt(Qe,Ve,Je,wt);or(Qe,Je)}return typeof Je=="string"&&Je!==""||typeof Je=="number"?(Je=""+Je,Ve!==null&&Ve.tag===6?(P(Qe,Ve.sibling),Ve=K(Ve,Je),Ve.return=Qe,Qe=Ve):(P(Qe,Ve),Ve=Z0(Je,Qe.mode,wt),Ve.return=Qe,Qe=Ve),ge(Qe)):P(Qe,Ve)}return ta}var ni=fi(!0),Ir=fi(!1),hi=Po(null),hn=null,On=null,Sr=null;function Dr(){Sr=On=hn=null}function wn(s){var h=hi.current;Yr(hi),s._currentValue=h}function Br(s,h,P){for(;s!==null;){var F=s.alternate;if((s.childLanes&h)!==h?(s.childLanes|=h,F!==null&&(F.childLanes|=h)):F!==null&&(F.childLanes&h)!==h&&(F.childLanes|=h),s===P)break;s=s.return}}function _n(s,h){hn=s,Sr=On=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&h)!==0&&(oe=!0),s.firstContext=null)}function xn(s){var h=s._currentValue;if(Sr!==s)if(s={context:s,memoizedValue:h,next:null},On===null){if(hn===null)throw Error(r(308));On=s,hn.dependencies={lanes:0,firstContext:s}}else On=On.next=s;return h}var Xr=null;function xi(s){Xr===null?Xr=[s]:Xr.push(s)}function Vr(s,h,P,F){var K=h.interleaved;return K===null?(P.next=P,xi(h)):(P.next=K.next,K.next=P),h.interleaved=P,Gr(s,F)}function Gr(s,h){s.lanes|=h;var P=s.alternate;for(P!==null&&(P.lanes|=h),P=s,s=s.return;s!==null;)s.childLanes|=h,P=s.alternate,P!==null&&(P.childLanes|=h),P=s,s=s.return;return P.tag===3?P.stateNode:null}var $n=!1;function Si(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pa(s,h){s=s.updateQueue,h.updateQueue===s&&(h.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function Wn(s,h){return{eventTime:s,lane:h,tag:0,payload:null,callback:null,next:null}}function In(s,h,P){var F=s.updateQueue;if(F===null)return null;if(F=F.shared,(nn&2)!==0){var K=F.pending;return K===null?h.next=h:(h.next=K.next,K.next=h),F.pending=h,Gr(s,P)}return K=F.interleaved,K===null?(h.next=h,xi(F)):(h.next=K.next,K.next=h),F.interleaved=h,Gr(s,P)}function ga(s,h,P){if(h=h.updateQueue,h!==null&&(h=h.shared,(P&4194240)!==0)){var F=h.lanes;F&=s.pendingLanes,P|=F,h.lanes=P,$l(s,P)}}function Kr(s,h){var P=s.updateQueue,F=s.alternate;if(F!==null&&(F=F.updateQueue,P===F)){var K=null,ne=null;if(P=P.firstBaseUpdate,P!==null){do{var ge={eventTime:P.eventTime,lane:P.lane,tag:P.tag,payload:P.payload,callback:P.callback,next:null};ne===null?K=ne=ge:ne=ne.next=ge,P=P.next}while(P!==null);ne===null?K=ne=h:ne=ne.next=h}else K=ne=h;P={baseState:F.baseState,firstBaseUpdate:K,lastBaseUpdate:ne,shared:F.shared,effects:F.effects},s.updateQueue=P;return}s=P.lastBaseUpdate,s===null?P.firstBaseUpdate=h:s.next=h,P.lastBaseUpdate=h}function Ii(s,h,P,F){var K=s.updateQueue;$n=!1;var ne=K.firstBaseUpdate,ge=K.lastBaseUpdate,Ie=K.shared.pending;if(Ie!==null){K.shared.pending=null;var Be=Ie,tt=Be.next;Be.next=null,ge===null?ne=tt:ge.next=tt,ge=Be;var gt=s.alternate;gt!==null&&(gt=gt.updateQueue,Ie=gt.lastBaseUpdate,Ie!==ge&&(Ie===null?gt.firstBaseUpdate=tt:Ie.next=tt,gt.lastBaseUpdate=Be))}if(ne!==null){var mt=K.baseState;ge=0,gt=tt=Be=null,Ie=ne;do{var dt=Ie.lane,Ft=Ie.eventTime;if((F&dt)===dt){gt!==null&&(gt=gt.next={eventTime:Ft,lane:0,tag:Ie.tag,payload:Ie.payload,callback:Ie.callback,next:null});e:{var Ht=s,Gt=Ie;switch(dt=h,Ft=P,Gt.tag){case 1:if(Ht=Gt.payload,typeof Ht=="function"){mt=Ht.call(Ft,mt,dt);break e}mt=Ht;break e;case 3:Ht.flags=Ht.flags&-65537|128;case 0:if(Ht=Gt.payload,dt=typeof Ht=="function"?Ht.call(Ft,mt,dt):Ht,dt==null)break e;mt=U({},mt,dt);break e;case 2:$n=!0}}Ie.callback!==null&&Ie.lane!==0&&(s.flags|=64,dt=K.effects,dt===null?K.effects=[Ie]:dt.push(Ie))}else Ft={eventTime:Ft,lane:dt,tag:Ie.tag,payload:Ie.payload,callback:Ie.callback,next:null},gt===null?(tt=gt=Ft,Be=mt):gt=gt.next=Ft,ge|=dt;if(Ie=Ie.next,Ie===null){if(Ie=K.shared.pending,Ie===null)break;dt=Ie,Ie=dt.next,dt.next=null,K.lastBaseUpdate=dt,K.shared.pending=null}}while(!0);if(gt===null&&(Be=mt),K.baseState=Be,K.firstBaseUpdate=tt,K.lastBaseUpdate=gt,h=K.shared.interleaved,h!==null){K=h;do ge|=K.lane,K=K.next;while(K!==h)}else ne===null&&(K.shared.lanes=0);mf|=ge,s.lanes=ge,s.memoizedState=mt}}function zr(s,h,P){if(s=h.effects,h.effects=null,s!==null)for(h=0;h<s.length;h++){var F=s[h],K=F.callback;if(K!==null){if(F.callback=null,F=P,typeof K!="function")throw Error(r(191,K));K.call(F)}}}var rr={},Or=Po(rr),yr=Po(rr),Cn=Po(rr);function ii(s){if(s===rr)throw Error(r(174));return s}function Vo(s,h){switch(tn(Cn,h),tn(yr,s),tn(Or,rr),s=h.nodeType,s){case 9:case 11:h=(h=h.documentElement)?h.namespaceURI:pt(null,"");break;default:s=s===8?h.parentNode:h,h=s.namespaceURI||null,s=s.tagName,h=pt(h,s)}Yr(Or),tn(Or,h)}function ln(){Yr(Or),Yr(yr),Yr(Cn)}function uu(s){ii(Cn.current);var h=ii(Or.current),P=pt(h,s.type);h!==P&&(tn(yr,s),tn(Or,P))}function Is(s){yr.current===s&&(Yr(Or),Yr(yr))}var un=Po(0);function io(s){for(var h=s;h!==null;){if(h.tag===13){var P=h.memoizedState;if(P!==null&&(P=P.dehydrated,P===null||P.data==="$?"||P.data==="$!"))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===s)break;for(;h.sibling===null;){if(h.return===null||h.return===s)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var Ol=[];function va(){for(var s=0;s<Ol.length;s++)Ol[s]._workInProgressVersionPrimary=null;Ol.length=0}var cu=_.ReactCurrentDispatcher,fu=_.ReactCurrentBatchConfig,Fi=0,rn=null,Fn=null,jn=null,ao=!1,ko=!1,oo=0,Ac=0;function Dn(){throw Error(r(321))}function hu(s,h){if(h===null)return!1;for(var P=0;P<h.length&&P<s.length;P++)if(!Gn(s[P],h[P]))return!1;return!0}function nl(s,h,P,F,K,ne){if(Fi=ne,rn=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,cu.current=s===null||s.memoizedState===null?T0:pu,s=P(F,K),ko){ne=0;do{if(ko=!1,oo=0,25<=ne)throw Error(r(301));ne+=1,jn=Fn=null,h.updateQueue=null,cu.current=nh,s=P(F,K)}while(ko)}if(cu.current=Cc,h=Fn!==null&&Fn.next!==null,Fi=0,jn=Fn=rn=null,ao=!1,h)throw Error(r(300));return s}function so(){var s=oo!==0;return oo=0,s}function gn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jn===null?rn.memoizedState=jn=s:jn=jn.next=s,jn}function di(){if(Fn===null){var s=rn.alternate;s=s!==null?s.memoizedState:null}else s=Fn.next;var h=jn===null?rn.memoizedState:jn.next;if(h!==null)jn=h,Fn=s;else{if(s===null)throw Error(r(310));Fn=s,s={memoizedState:Fn.memoizedState,baseState:Fn.baseState,baseQueue:Fn.baseQueue,queue:Fn.queue,next:null},jn===null?rn.memoizedState=jn=s:jn=jn.next=s}return jn}function ma(s,h){return typeof h=="function"?h(s):h}function Ji(s){var h=di(),P=h.queue;if(P===null)throw Error(r(311));P.lastRenderedReducer=s;var F=Fn,K=F.baseQueue,ne=P.pending;if(ne!==null){if(K!==null){var ge=K.next;K.next=ne.next,ne.next=ge}F.baseQueue=K=ne,P.pending=null}if(K!==null){ne=K.next,F=F.baseState;var Ie=ge=null,Be=null,tt=ne;do{var gt=tt.lane;if((Fi>)===gt)Be!==null&&(Be=Be.next={lane:0,action:tt.action,hasEagerState:tt.hasEagerState,eagerState:tt.eagerState,next:null}),F=tt.hasEagerState?tt.eagerState:s(F,tt.action);else{var mt={lane:gt,action:tt.action,hasEagerState:tt.hasEagerState,eagerState:tt.eagerState,next:null};Be===null?(Ie=Be=mt,ge=F):Be=Be.next=mt,rn.lanes|=gt,mf|=gt}tt=tt.next}while(tt!==null&&tt!==ne);Be===null?ge=F:Be.next=Ie,Gn(F,h.memoizedState)||(oe=!0),h.memoizedState=F,h.baseState=ge,h.baseQueue=Be,P.lastRenderedState=F}if(s=P.interleaved,s!==null){K=s;do ne=K.lane,rn.lanes|=ne,mf|=ne,K=K.next;while(K!==s)}else K===null&&(P.lanes=0);return[h.memoizedState,P.dispatch]}function Fs(s){var h=di(),P=h.queue;if(P===null)throw Error(r(311));P.lastRenderedReducer=s;var F=P.dispatch,K=P.pending,ne=h.memoizedState;if(K!==null){P.pending=null;var ge=K=K.next;do ne=s(ne,ge.action),ge=ge.next;while(ge!==K);Gn(ne,h.memoizedState)||(oe=!0),h.memoizedState=ne,h.baseQueue===null&&(h.baseState=ne),P.lastRenderedState=ne}return[ne,F]}function Pc(){}function Hu(s,h){var P=rn,F=di(),K=h(),ne=!Gn(F.memoizedState,K);if(ne&&(F.memoizedState=K,oe=!0),F=F.queue,Oc(gf.bind(null,P,F,s),[s]),F.getSnapshot!==h||ne||jn!==null&&jn.memoizedState.tag&1){if(P.flags|=2048,qa(9,fs.bind(null,P,F,K,h),void 0,null),Va===null)throw Error(r(349));(Fi&30)!==0||rh(P,h,K)}return K}function rh(s,h,P){s.flags|=16384,s={getSnapshot:h,value:P},h=rn.updateQueue,h===null?(h={lastEffect:null,stores:null},rn.updateQueue=h,h.stores=[s]):(P=h.stores,P===null?h.stores=[s]:P.push(s))}function fs(s,h,P,F){h.value=P,h.getSnapshot=F,Cl(h)&&du(s)}function gf(s,h,P){return P(function(){Cl(h)&&du(s)})}function Cl(s){var h=s.getSnapshot;s=s.value;try{var P=h();return!Gn(s,P)}catch{return!0}}function du(s){var h=Gr(s,1);h!==null&&Rl(h,s,1,-1)}function Go(s){var h=gn();return typeof s=="function"&&(s=s()),h.memoizedState=h.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:s},h.queue=s,s=s.dispatch=Rp.bind(null,rn,s),[h.memoizedState,s]}function qa(s,h,P,F){return s={tag:s,create:h,destroy:P,deps:F,next:null},h=rn.updateQueue,h===null?(h={lastEffect:null,stores:null},rn.updateQueue=h,h.lastEffect=s.next=s):(P=h.lastEffect,P===null?h.lastEffect=s.next=s:(F=P.next,P.next=s,s.next=F,h.lastEffect=s)),s}function hs(){return di().memoizedState}function lo(s,h,P,F){var K=gn();rn.flags|=s,K.memoizedState=qa(1|h,P,void 0,F===void 0?null:F)}function ds(s,h,P,F){var K=di();F=F===void 0?null:F;var ne=void 0;if(Fn!==null){var ge=Fn.memoizedState;if(ne=ge.destroy,F!==null&&hu(F,ge.deps)){K.memoizedState=qa(h,P,ne,F);return}}rn.flags|=s,K.memoizedState=qa(1|h,P,ne,F)}function kc(s,h){return lo(8390656,8,s,h)}function Oc(s,h){return ds(2048,8,s,h)}function vf(s,h){return ds(4,2,s,h)}function Vu(s,h){return ds(4,4,s,h)}function ps(s,h){if(typeof h=="function")return s=s(),h(s),function(){h(null)};if(h!=null)return s=s(),h.current=s,function(){h.current=null}}function Cp(s,h,P){return P=P!=null?P.concat([s]):null,ds(4,4,ps.bind(null,h,s),P)}function Nl(){}function Vh(s,h){var P=di();h=h===void 0?null:h;var F=P.memoizedState;return F!==null&&h!==null&&hu(h,F[1])?F[0]:(P.memoizedState=[s,h],s)}function Bn(s,h){var P=di();h=h===void 0?null:h;var F=P.memoizedState;return F!==null&&h!==null&&hu(h,F[1])?F[0]:(s=s(),P.memoizedState=[s,h],s)}function Np(s,h,P){return(Fi&21)===0?(s.baseState&&(s.baseState=!1,oe=!0),s.memoizedState=P):(Gn(P,h)||(P=Ru(),rn.lanes|=P,mf|=P,s.baseState=!0),h)}function Lp(s,h){var P=Ar;Ar=P!==0&&4>P?P:4,s(!0);var F=fu.transition;fu.transition={};try{s(!1),h()}finally{Ar=P,fu.transition=F}}function Tp(){return di().memoizedState}function L0(s,h,P){var F=Fc(s);if(P={lane:F,action:P,hasEagerState:!1,eagerState:null,next:null},Gh(s))Mp(h,P);else if(P=Vr(s,h,P,F),P!==null){var K=Wo();Rl(P,s,F,K),$o(P,h,F)}}function Rp(s,h,P){var F=Fc(s),K={lane:F,action:P,hasEagerState:!1,eagerState:null,next:null};if(Gh(s))Mp(h,K);else{var ne=s.alternate;if(s.lanes===0&&(ne===null||ne.lanes===0)&&(ne=h.lastRenderedReducer,ne!==null))try{var ge=h.lastRenderedState,Ie=ne(ge,P);if(K.hasEagerState=!0,K.eagerState=Ie,Gn(Ie,ge)){var Be=h.interleaved;Be===null?(K.next=K,xi(h)):(K.next=Be.next,Be.next=K),h.interleaved=K;return}}catch{}finally{}P=Vr(s,h,K,F),P!==null&&(K=Wo(),Rl(P,s,F,K),$o(P,h,F))}}function Gh(s){var h=s.alternate;return s===rn||h!==null&&h===rn}function Mp(s,h){ko=ao=!0;var P=s.pending;P===null?h.next=h:(h.next=P.next,P.next=h),s.pending=h}function $o(s,h,P){if((P&4194240)!==0){var F=h.lanes;F&=s.pendingLanes,P|=F,h.lanes=P,$l(s,P)}}var Cc={readContext:xn,useCallback:Dn,useContext:Dn,useEffect:Dn,useImperativeHandle:Dn,useInsertionEffect:Dn,useLayoutEffect:Dn,useMemo:Dn,useReducer:Dn,useRef:Dn,useState:Dn,useDebugValue:Dn,useDeferredValue:Dn,useTransition:Dn,useMutableSource:Dn,useSyncExternalStore:Dn,useId:Dn,unstable_isNewReconciler:!1},T0={readContext:xn,useCallback:function(s,h){return gn().memoizedState=[s,h===void 0?null:h],s},useContext:xn,useEffect:kc,useImperativeHandle:function(s,h,P){return P=P!=null?P.concat([s]):null,lo(4194308,4,ps.bind(null,h,s),P)},useLayoutEffect:function(s,h){return lo(4194308,4,s,h)},useInsertionEffect:function(s,h){return lo(4,2,s,h)},useMemo:function(s,h){var P=gn();return h=h===void 0?null:h,s=s(),P.memoizedState=[s,h],s},useReducer:function(s,h,P){var F=gn();return h=P!==void 0?P(h):h,F.memoizedState=F.baseState=h,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:h},F.queue=s,s=s.dispatch=L0.bind(null,rn,s),[F.memoizedState,s]},useRef:function(s){var h=gn();return s={current:s},h.memoizedState=s},useState:Go,useDebugValue:Nl,useDeferredValue:function(s){return gn().memoizedState=s},useTransition:function(){var s=Go(!1),h=s[0];return s=Lp.bind(null,s[1]),gn().memoizedState=s,[h,s]},useMutableSource:function(){},useSyncExternalStore:function(s,h,P){var F=rn,K=gn();if(ot){if(P===void 0)throw Error(r(407));P=P()}else{if(P=h(),Va===null)throw Error(r(349));(Fi&30)!==0||rh(F,h,P)}K.memoizedState=P;var ne={value:P,getSnapshot:h};return K.queue=ne,kc(gf.bind(null,F,ne,s),[s]),F.flags|=2048,qa(9,fs.bind(null,F,ne,P,h),void 0,null),P},useId:function(){var s=gn(),h=Va.identifierPrefix;if(ot){var P=ke,F=Ze;P=(F&~(1<<32-mr(F)-1)).toString(32)+P,h=":"+h+"R"+P,P=oo++,0<P&&(h+="H"+P.toString(32)),h+=":"}else P=Ac++,h=":"+h+"r"+P.toString(32)+":";return s.memoizedState=h},unstable_isNewReconciler:!1},pu={readContext:xn,useCallback:Vh,useContext:xn,useEffect:Oc,useImperativeHandle:Cp,useInsertionEffect:vf,useLayoutEffect:Vu,useMemo:Bn,useReducer:Ji,useRef:hs,useState:function(){return Ji(ma)},useDebugValue:Nl,useDeferredValue:function(s){var h=di();return Np(h,Fn.memoizedState,s)},useTransition:function(){var s=Ji(ma)[0],h=di().memoizedState;return[s,h]},useMutableSource:Pc,useSyncExternalStore:Hu,useId:Tp,unstable_isNewReconciler:!1},nh={readContext:xn,useCallback:Vh,useContext:xn,useEffect:Oc,useImperativeHandle:Cp,useInsertionEffect:vf,useLayoutEffect:Vu,useMemo:Bn,useReducer:Fs,useRef:hs,useState:function(){return Fs(ma)},useDebugValue:Nl,useDeferredValue:function(s){var h=di();return Fn===null?h.memoizedState=s:Np(h,Fn.memoizedState,s)},useTransition:function(){var s=Fs(ma)[0],h=di().memoizedState;return[s,h]},useMutableSource:Pc,useSyncExternalStore:Hu,useId:Tp,unstable_isNewReconciler:!1};function Na(s,h){if(s&&s.defaultProps){h=U({},h),s=s.defaultProps;for(var P in s)h[P]===void 0&&(h[P]=s[P]);return h}return h}function Nc(s,h,P,F){h=s.memoizedState,P=P(F,h),P=P==null?h:U({},h,P),s.memoizedState=P,s.lanes===0&&(s.updateQueue.baseState=P)}var Lc={isMounted:function(s){return(s=s._reactInternals)?Qn(s)===s:!1},enqueueSetState:function(s,h,P){s=s._reactInternals;var F=Wo(),K=Fc(s),ne=Wn(F,K);ne.payload=h,P!=null&&(ne.callback=P),h=In(s,ne,K),h!==null&&(Rl(h,s,K,F),ga(h,s,K))},enqueueReplaceState:function(s,h,P){s=s._reactInternals;var F=Wo(),K=Fc(s),ne=Wn(F,K);ne.tag=1,ne.payload=h,P!=null&&(ne.callback=P),h=In(s,ne,K),h!==null&&(Rl(h,s,K,F),ga(h,s,K))},enqueueForceUpdate:function(s,h){s=s._reactInternals;var P=Wo(),F=Fc(s),K=Wn(P,F);K.tag=2,h!=null&&(K.callback=h),h=In(s,K,F),h!==null&&(Rl(h,s,F,P),ga(h,s,F))}};function ih(s,h,P,F,K,ne,ge){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(F,ne,ge):h.prototype&&h.prototype.isPureReactComponent?!Eo(P,F)||!Eo(K,ne):!0}function Ip(s,h,P){var F=!1,K=ls,ne=h.contextType;return typeof ne=="object"&&ne!==null?ne=xn(ne):(K=da(h)?rl:Mi.current,F=h.contextTypes,ne=(F=F!=null)?Pl(s,K):ls),h=new h(P,ne),s.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Lc,s.stateNode=h,h._reactInternals=s,F&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=K,s.__reactInternalMemoizedMaskedChildContext=ne),h}function $h(s,h,P,F){s=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(P,F),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(P,F),h.state!==s&&Lc.enqueueReplaceState(h,h.state,null)}function ah(s,h,P,F){var K=s.stateNode;K.props=P,K.state=s.memoizedState,K.refs={},Si(s);var ne=h.contextType;typeof ne=="object"&&ne!==null?K.context=xn(ne):(ne=da(h)?rl:Mi.current,K.context=Pl(s,ne)),K.state=s.memoizedState,ne=h.getDerivedStateFromProps,typeof ne=="function"&&(Nc(s,h,ne,P),K.state=s.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof K.getSnapshotBeforeUpdate=="function"||typeof K.UNSAFE_componentWillMount!="function"&&typeof K.componentWillMount!="function"||(h=K.state,typeof K.componentWillMount=="function"&&K.componentWillMount(),typeof K.UNSAFE_componentWillMount=="function"&&K.UNSAFE_componentWillMount(),h!==K.state&&Lc.enqueueReplaceState(K,K.state,null),Ii(s,P,K,F),K.state=s.memoizedState),typeof K.componentDidMount=="function"&&(s.flags|=4194308)}function Gu(s,h){try{var P="",F=h;do P+=re(F),F=F.return;while(F);var K=P}catch(ne){K=`
|
|
29
|
+
`+K[ge].replace(" at new "," at ");return s.displayName&&Be.includes("<anonymous>")&&(Be=Be.replace("<anonymous>",s.displayName)),Be}while(1<=ge&&0<=Ie);break}}}finally{z=!1,Error.prepareStackTrace=P}return(s=s?s.displayName||s.name:"")?j(s):""}function re(s){switch(s.tag){case 5:return j(s.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return s=Z(s.type,!1),s;case 11:return s=Z(s.type.render,!1),s;case 1:return s=Z(s.type,!0),s;default:return""}}function W(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case O:return"Fragment";case M:return"Portal";case R:return"Profiler";case L:return"StrictMode";case q:return"Suspense";case G:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case k:return(s.displayName||"Context")+".Consumer";case T:return(s._context.displayName||"Context")+".Provider";case C:var h=s.render;return s=s.displayName,s||(s=h.displayName||h.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case J:return h=s.displayName||null,h!==null?h:W(s.type)||"Memo";case ae:h=s._payload,s=s._init;try{return W(s(h))}catch{}}return null}function Q(s){var h=s.type;switch(s.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=h.render,s=s.displayName||s.name||"",h.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W(h);case 8:return h===L?"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(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function se(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ue(s){var h=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function le(s){var h=ue(s)?"checked":"value",P=Object.getOwnPropertyDescriptor(s.constructor.prototype,h),F=""+s[h];if(!s.hasOwnProperty(h)&&typeof P<"u"&&typeof P.get=="function"&&typeof P.set=="function"){var K=P.get,ne=P.set;return Object.defineProperty(s,h,{configurable:!0,get:function(){return K.call(this)},set:function(ge){F=""+ge,ne.call(this,ge)}}),Object.defineProperty(s,h,{enumerable:P.enumerable}),{getValue:function(){return F},setValue:function(ge){F=""+ge},stopTracking:function(){s._valueTracker=null,delete s[h]}}}}function ye(s){s._valueTracker||(s._valueTracker=le(s))}function Re(s){if(!s)return!1;var h=s._valueTracker;if(!h)return!0;var P=h.getValue(),F="";return s&&(F=ue(s)?s.checked?"true":"false":s.value),s=F,s!==P?(h.setValue(s),!0):!1}function Me(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Pe(s,h){var P=h.checked;return U({},h,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:P??s._wrapperState.initialChecked})}function de(s,h){var P=h.defaultValue==null?"":h.defaultValue,F=h.checked!=null?h.checked:h.defaultChecked;P=se(h.value!=null?h.value:P),s._wrapperState={initialChecked:F,initialValue:P,controlled:h.type==="checkbox"||h.type==="radio"?h.checked!=null:h.value!=null}}function Te(s,h){h=h.checked,h!=null&&w(s,"checked",h,!1)}function Ae(s,h){Te(s,h);var P=se(h.value),F=h.type;if(P!=null)F==="number"?(P===0&&s.value===""||s.value!=P)&&(s.value=""+P):s.value!==""+P&&(s.value=""+P);else if(F==="submit"||F==="reset"){s.removeAttribute("value");return}h.hasOwnProperty("value")?_e(s,h.type,P):h.hasOwnProperty("defaultValue")&&_e(s,h.type,se(h.defaultValue)),h.checked==null&&h.defaultChecked!=null&&(s.defaultChecked=!!h.defaultChecked)}function be(s,h,P){if(h.hasOwnProperty("value")||h.hasOwnProperty("defaultValue")){var F=h.type;if(!(F!=="submit"&&F!=="reset"||h.value!==void 0&&h.value!==null))return;h=""+s._wrapperState.initialValue,P||h===s.value||(s.value=h),s.defaultValue=h}P=s.name,P!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,P!==""&&(s.name=P)}function _e(s,h,P){(h!=="number"||Me(s.ownerDocument)!==s)&&(P==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+P&&(s.defaultValue=""+P))}var xe=Array.isArray;function Le(s,h,P,F){if(s=s.options,h){h={};for(var K=0;K<P.length;K++)h["$"+P[K]]=!0;for(P=0;P<s.length;P++)K=h.hasOwnProperty("$"+s[P].value),s[P].selected!==K&&(s[P].selected=K),K&&F&&(s[P].defaultSelected=!0)}else{for(P=""+se(P),h=null,K=0;K<s.length;K++){if(s[K].value===P){s[K].selected=!0,F&&(s[K].defaultSelected=!0);return}h!==null||s[K].disabled||(h=s[K])}h!==null&&(h.selected=!0)}}function pe(s,h){if(h.dangerouslySetInnerHTML!=null)throw Error(r(91));return U({},h,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function Ce(s,h){var P=h.value;if(P==null){if(P=h.children,h=h.defaultValue,P!=null){if(h!=null)throw Error(r(92));if(xe(P)){if(1<P.length)throw Error(r(93));P=P[0]}h=P}h==null&&(h=""),P=h}s._wrapperState={initialValue:se(P)}}function je(s,h){var P=se(h.value),F=se(h.defaultValue);P!=null&&(P=""+P,P!==s.value&&(s.value=P),h.defaultValue==null&&s.defaultValue!==P&&(s.defaultValue=P)),F!=null&&(s.defaultValue=""+F)}function He(s){var h=s.textContent;h===s._wrapperState.initialValue&&h!==""&&h!==null&&(s.value=h)}function st(s){switch(s){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 pt(s,h){return s==null||s==="http://www.w3.org/1999/xhtml"?st(h):s==="http://www.w3.org/2000/svg"&&h==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var ct,bt=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(h,P,F,K){MSApp.execUnsafeLocalFunction(function(){return s(h,P,F,K)})}:s}(function(s,h){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=h;else{for(ct=ct||document.createElement("div"),ct.innerHTML="<svg>"+h.valueOf().toString()+"</svg>",h=ct.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;h.firstChild;)s.appendChild(h.firstChild)}});function ht(s,h){if(h){var P=s.firstChild;if(P&&P===s.lastChild&&P.nodeType===3){P.nodeValue=h;return}}s.textContent=h}var vt={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},wr=["Webkit","ms","Moz","O"];Object.keys(vt).forEach(function(s){wr.forEach(function(h){h=h+s.charAt(0).toUpperCase()+s.substring(1),vt[h]=vt[s]})});function cr(s,h,P){return h==null||typeof h=="boolean"||h===""?"":P||typeof h!="number"||h===0||vt.hasOwnProperty(s)&&vt[s]?(""+h).trim():h+"px"}function Pt(s,h){s=s.style;for(var P in h)if(h.hasOwnProperty(P)){var F=P.indexOf("--")===0,K=cr(P,h[P],F);P==="float"&&(P="cssFloat"),F?s.setProperty(P,K):s[P]=K}}var $t=U({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 $e(s,h){if(h){if($t[s]&&(h.children!=null||h.dangerouslySetInnerHTML!=null))throw Error(r(137,s));if(h.dangerouslySetInnerHTML!=null){if(h.children!=null)throw Error(r(60));if(typeof h.dangerouslySetInnerHTML!="object"||!("__html"in h.dangerouslySetInnerHTML))throw Error(r(61))}if(h.style!=null&&typeof h.style!="object")throw Error(r(62))}}function ze(s,h){if(s.indexOf("-")===-1)return typeof h.is=="string";switch(s){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 kt=null;function St(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var er=null,jt=null,vr=null;function Xt(s){if(s=su(s)){if(typeof er!="function")throw Error(r(280));var h=s.stateNode;h&&(h=xi(h),er(s.stateNode,s.type,h))}}function lr(s){jt?vr?vr.push(s):vr=[s]:jt=s}function Oi(){if(jt){var s=jt,h=vr;if(vr=jt=null,Xt(s),h)for(s=0;s<h.length;s++)Xt(h[s])}}function Zn(s,h){return s(h)}function vi(){}var mn=!1;function Yt(s,h,P){if(mn)return s(h,P);mn=!0;try{return Zn(s,h,P)}finally{mn=!1,(jt!==null||vr!==null)&&(vi(),Oi())}}function sa(s,h){var P=s.stateNode;if(P===null)return null;var F=xi(P);if(F===null)return null;P=F[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(F=!F.disabled)||(s=s.type,F=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!F;break e;default:s=!1}if(s)return null;if(P&&typeof P!="function")throw Error(r(231,h,typeof P));return P}var Ra=!1;if(o)try{var Un={};Object.defineProperty(Un,"passive",{get:function(){Ra=!0}}),window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch{Ra=!1}function Ui(s,h,P,F,K,ne,ge,Ie,Be){var tt=Array.prototype.slice.call(arguments,3);try{h.apply(P,tt)}catch(gt){this.onError(gt)}}var Rr=!1,yn=null,An=!1,ba=null,Mo={onError:function(s){Rr=!0,yn=s}};function wa(s,h,P,F,K,ne,ge,Ie,Be){Rr=!1,yn=null,Ui.apply(Mo,arguments)}function Ya(s,h,P,F,K,ne,ge,Ie,Be){if(wa.apply(this,arguments),Rr){if(Rr){var tt=yn;Rr=!1,yn=null}else throw Error(r(198));An||(An=!0,ba=tt)}}function Qn(s){var h=s,P=s;if(s.alternate)for(;h.return;)h=h.return;else{s=h;do h=s,(h.flags&4098)!==0&&(P=h.return),s=h.return;while(s)}return h.tag===3?P:null}function _a(s){if(s.tag===13){var h=s.memoizedState;if(h===null&&(s=s.alternate,s!==null&&(h=s.memoizedState)),h!==null)return h.dehydrated}return null}function xa(s){if(Qn(s)!==s)throw Error(r(188))}function Io(s){var h=s.alternate;if(!h){if(h=Qn(s),h===null)throw Error(r(188));return h!==s?null:s}for(var P=s,F=h;;){var K=P.return;if(K===null)break;var ne=K.alternate;if(ne===null){if(F=K.return,F!==null){P=F;continue}break}if(K.child===ne.child){for(ne=K.child;ne;){if(ne===P)return xa(K),s;if(ne===F)return xa(K),h;ne=ne.sibling}throw Error(r(188))}if(P.return!==F.return)P=K,F=ne;else{for(var ge=!1,Ie=K.child;Ie;){if(Ie===P){ge=!0,P=K,F=ne;break}if(Ie===F){ge=!0,F=K,P=ne;break}Ie=Ie.sibling}if(!ge){for(Ie=ne.child;Ie;){if(Ie===P){ge=!0,P=ne,F=K;break}if(Ie===F){ge=!0,F=ne,P=K;break}Ie=Ie.sibling}if(!ge)throw Error(r(189))}}if(P.alternate!==F)throw Error(r(190))}if(P.tag!==3)throw Error(r(188));return P.stateNode.current===P?s:h}function Ci(s){return s=Io(s),s!==null?Xa(s):null}function Xa(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var h=Xa(s);if(h!==null)return h;s=s.sibling}return null}var Ps=t.unstable_scheduleCallback,Ko=t.unstable_cancelCallback,Vl=t.unstable_shouldYield,cf=t.unstable_requestPaint,bn=t.unstable_now,Gl=t.unstable_getCurrentPriorityLevel,Zo=t.unstable_ImmediatePriority,Sa=t.unstable_UserBlockingPriority,Qo=t.unstable_NormalPriority,cc=t.unstable_LowPriority,$s=t.unstable_IdlePriority,po=null,oi=null;function an(s){if(oi&&typeof oi.onCommitFiberRoot=="function")try{oi.onCommitFiberRoot(po,s,void 0,(s.current.flags&128)===128)}catch{}}var mr=Math.clz32?Math.clz32:qi,Jo=Math.log,Er=Math.LN2;function qi(s){return s>>>=0,s===0?32:31-(Jo(s)/Er|0)|0}var Ka=64,Hi=4194304;function Pn(s){switch(s&-s){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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Vi(s,h){var P=s.pendingLanes;if(P===0)return 0;var F=0,K=s.suspendedLanes,ne=s.pingedLanes,ge=P&268435455;if(ge!==0){var Ie=ge&~K;Ie!==0?F=Pn(Ie):(ne&=ge,ne!==0&&(F=Pn(ne)))}else ge=P&~K,ge!==0?F=Pn(ge):ne!==0&&(F=Pn(ne));if(F===0)return 0;if(h!==0&&h!==F&&(h&K)===0&&(K=F&-F,ne=h&-h,K>=ne||K===16&&(ne&4194240)!==0))return h;if((F&4)!==0&&(F|=P&16),h=s.entangledLanes,h!==0)for(s=s.entanglements,h&=F;0<h;)P=31-mr(h),K=1<<P,F|=s[P],h&=~K;return F}function Ws(s,h){switch(s){case 1:case 2:case 4:return h+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 h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qn(s,h){for(var P=s.suspendedLanes,F=s.pingedLanes,K=s.expirationTimes,ne=s.pendingLanes;0<ne;){var ge=31-mr(ne),Ie=1<<ge,Be=K[ge];Be===-1?((Ie&P)===0||(Ie&F)!==0)&&(K[ge]=Ws(Ie,h)):Be<=h&&(s.expiredLanes|=Ie),ne&=~Ie}}function es(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function Ru(){var s=Ka;return Ka<<=1,(Ka&4194240)===0&&(Ka=64),s}function Ea(s){for(var h=[],P=0;31>P;P++)h.push(s);return h}function hl(s,h,P){s.pendingLanes|=h,h!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,h=31-mr(h),s[h]=P}function ts(s,h){var P=s.pendingLanes&~h;s.pendingLanes=h,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=h,s.mutableReadLanes&=h,s.entangledLanes&=h,h=s.entanglements;var F=s.eventTimes;for(s=s.expirationTimes;0<P;){var K=31-mr(P),ne=1<<K;h[K]=0,F[K]=-1,s[K]=-1,P&=~ne}}function $l(s,h){var P=s.entangledLanes|=h;for(s=s.entanglements;P;){var F=31-mr(P),K=1<<F;K&h|s[F]&h&&(s[F]|=h),P&=~K}}var Ar=0;function go(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var rs,Ys,fc,hc,Xs,ns=!1,Za=[],Ma=null,Ia=null,Fa=null,xt=new Map,Ks=new Map,vo=[],dc="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 pc(s,h){switch(s){case"focusin":case"focusout":Ma=null;break;case"dragenter":case"dragleave":Ia=null;break;case"mouseover":case"mouseout":Fa=null;break;case"pointerover":case"pointerout":xt.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ks.delete(h.pointerId)}}function Qa(s,h,P,F,K,ne){return s===null||s.nativeEvent!==ne?(s={blockedOn:h,domEventName:P,eventSystemFlags:F,nativeEvent:ne,targetContainers:[K]},h!==null&&(h=su(h),h!==null&&Ys(h)),s):(s.eventSystemFlags|=F,h=s.targetContainers,K!==null&&h.indexOf(K)===-1&&h.push(K),s)}function pn(s,h,P,F,K){switch(h){case"focusin":return Ma=Qa(Ma,s,h,P,F,K),!0;case"dragenter":return Ia=Qa(Ia,s,h,P,F,K),!0;case"mouseover":return Fa=Qa(Fa,s,h,P,F,K),!0;case"pointerover":var ne=K.pointerId;return xt.set(ne,Qa(xt.get(ne)||null,s,h,P,F,K)),!0;case"gotpointercapture":return ne=K.pointerId,Ks.set(ne,Qa(Ks.get(ne)||null,s,h,P,F,K)),!0}return!1}function Wl(s){var h=Ms(s.target);if(h!==null){var P=Qn(h);if(P!==null){if(h=P.tag,h===13){if(h=_a(P),h!==null){s.blockedOn=h,Xs(s.priority,function(){fc(P)});return}}else if(h===3&&P.stateNode.current.memoizedState.isDehydrated){s.blockedOn=P.tag===3?P.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Yl(s){if(s.blockedOn!==null)return!1;for(var h=s.targetContainers;0<h.length;){var P=Zs(s.domEventName,s.eventSystemFlags,h[0],s.nativeEvent);if(P===null){P=s.nativeEvent;var F=new P.constructor(P.type,P);kt=F,P.target.dispatchEvent(F),kt=null}else return h=su(P),h!==null&&Ys(h),s.blockedOn=P,!1;h.shift()}return!0}function ks(s,h,P){Yl(s)&&P.delete(h)}function Mu(){ns=!1,Ma!==null&&Yl(Ma)&&(Ma=null),Ia!==null&&Yl(Ia)&&(Ia=null),Fa!==null&&Yl(Fa)&&(Fa=null),xt.forEach(ks),Ks.forEach(ks)}function ja(s,h){s.blockedOn===h&&(s.blockedOn=null,ns||(ns=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mu)))}function mi(s){function h(K){return ja(K,s)}if(0<Za.length){ja(Za[0],s);for(var P=1;P<Za.length;P++){var F=Za[P];F.blockedOn===s&&(F.blockedOn=null)}}for(Ma!==null&&ja(Ma,s),Ia!==null&&ja(Ia,s),Fa!==null&&ja(Fa,s),xt.forEach(h),Ks.forEach(h),P=0;P<vo.length;P++)F=vo[P],F.blockedOn===s&&(F.blockedOn=null);for(;0<vo.length&&(P=vo[0],P.blockedOn===null);)Wl(P),P.blockedOn===null&&vo.shift()}var Fo=_.ReactCurrentBatchConfig,Xl=!0;function Aa(s,h,P,F){var K=Ar,ne=Fo.transition;Fo.transition=null;try{Ar=1,mo(s,h,P,F)}finally{Ar=K,Fo.transition=ne}}function Ja(s,h,P,F){var K=Ar,ne=Fo.transition;Fo.transition=null;try{Ar=4,mo(s,h,P,F)}finally{Ar=K,Fo.transition=ne}}function mo(s,h,P,F){if(Xl){var K=Zs(s,h,P,F);if(K===null)iu(s,h,F,yo,P),pc(s,F);else if(pn(K,s,h,P,F))F.stopPropagation();else if(pc(s,F),h&4&&-1<dc.indexOf(s)){for(;K!==null;){var ne=su(K);if(ne!==null&&rs(ne),ne=Zs(s,h,P,F),ne===null&&iu(s,h,F,yo,P),ne===K)break;K=ne}K!==null&&F.stopPropagation()}else iu(s,h,F,null,P)}}var yo=null;function Zs(s,h,P,F){if(yo=null,s=St(F),s=Ms(s),s!==null)if(h=Qn(s),h===null)s=null;else if(P=h.tag,P===13){if(s=_a(h),s!==null)return s;s=null}else if(P===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;s=null}else h!==s&&(s=null);return yo=s,null}function dl(s){switch(s){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(Gl()){case Zo:return 1;case Sa:return 4;case Qo:case cc:return 16;case $s:return 536870912;default:return 16}default:return 16}}var Jn=null,Da=null,eo=null;function Os(){if(eo)return eo;var s,h=Da,P=h.length,F,K="value"in Jn?Jn.value:Jn.textContent,ne=K.length;for(s=0;s<P&&h[s]===K[s];s++);var ge=P-s;for(F=1;F<=ge&&h[P-F]===K[ne-F];F++);return eo=K.slice(s,1<F?1-F:void 0)}function yi(s){var h=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&h===13&&(s=13)):s=h,s===10&&(s=13),32<=s||s===13?s:0}function kn(){return!0}function X(){return!1}function fe(s){function h(P,F,K,ne,ge){this._reactName=P,this._targetInst=K,this.type=F,this.nativeEvent=ne,this.target=ge,this.currentTarget=null;for(var Ie in s)s.hasOwnProperty(Ie)&&(P=s[Ie],this[Ie]=P?P(ne):ne[Ie]);return this.isDefaultPrevented=(ne.defaultPrevented!=null?ne.defaultPrevented:ne.returnValue===!1)?kn:X,this.isPropagationStopped=X,this}return U(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var P=this.nativeEvent;P&&(P.preventDefault?P.preventDefault():typeof P.returnValue!="unknown"&&(P.returnValue=!1),this.isDefaultPrevented=kn)},stopPropagation:function(){var P=this.nativeEvent;P&&(P.stopPropagation?P.stopPropagation():typeof P.cancelBubble!="unknown"&&(P.cancelBubble=!0),this.isPropagationStopped=kn)},persist:function(){},isPersistent:kn}),h}var Ne={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fe=fe(Ne),Ge=U({},Ne,{view:0,detail:0}),lt=fe(Ge),ft,Lt,Et,Ut=U({},Ge,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wo,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Et&&(Et&&s.type==="mousemove"?(ft=s.screenX-Et.screenX,Lt=s.screenY-Et.screenY):Lt=ft=0,Et=s),ft)},movementY:function(s){return"movementY"in s?s.movementY:Lt}}),Rt=fe(Ut),Pr=U({},Ut,{dataTransfer:0}),Mr=fe(Pr),ei=U({},Ge,{relatedTarget:0}),Hr=fe(ei),ti=U({},Ne,{animationName:0,elapsedTime:0,pseudoElement:0}),Hn=fe(ti),Ni=U({},Ne,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),bo=fe(Ni),Cs=U({},Ne,{data:0}),Ns=fe(Cs),Kl={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pl={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"},Ba={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Iu(s){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(s):(s=Ba[s])?!!h[s]:!1}function wo(){return Iu}var jo=U({},Ge,{key:function(s){if(s.key){var h=Kl[s.key]||s.key;if(h!=="Unidentified")return h}return s.type==="keypress"?(s=yi(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?pl[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wo,charCode:function(s){return s.type==="keypress"?yi(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?yi(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),bi=fe(jo),is=U({},Ut,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pa=fe(is),gl=U({},Ge,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wo}),Qs=fe(gl),Li=U({},Ne,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ls=fe(Li),Js=U({},Ut,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),Zl=fe(Js),si=[9,13,27,32],la=o&&"CompositionEvent"in window,Do=null;o&&"documentMode"in document&&(Do=document.documentMode);var as=o&&"TextEvent"in window&&!Do,li=o&&(!la||Do&&8<Do&&11>=Do),to=" ",Gi=!1;function ua(s,h){switch(s){case"keyup":return si.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $i(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Vn=!1;function os(s,h){switch(s){case"compositionend":return $i(h);case"keypress":return h.which!==32?null:(Gi=!0,to);case"textInput":return s=h.data,s===to&&Gi?null:s;default:return null}}function Ql(s,h){if(Vn)return s==="compositionend"||!la&&ua(s,h)?(s=Os(),eo=Da=Jn=null,Vn=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return li&&h.locale!=="ko"?null:h.data;default:return null}}var ca={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 Jr(s){var h=s&&s.nodeName&&s.nodeName.toLowerCase();return h==="input"?!!ca[s.type]:h==="textarea"}function vl(s,h,P,F){lr(F),h=_c(h,"onChange"),0<h.length&&(P=new Fe("onChange","change",null,P,F),s.push({event:P,listeners:h}))}var ka=null,Wi=null;function ml(s){ru(s,0)}function _o(s){var h=ci(s);if(Re(h))return s}function Yi(s,h){if(s==="change")return h}var Bo=!1;if(o){var za;if(o){var Ti="oninput"in document;if(!Ti){var xo=document.createElement("div");xo.setAttribute("oninput","return;"),Ti=typeof xo.oninput=="function"}za=Ti}else za=!1;Bo=za&&(!document.documentMode||9<document.documentMode)}function zo(){ka&&(ka.detachEvent("onpropertychange",Oa),Wi=ka=null)}function Oa(s){if(s.propertyName==="value"&&_o(Wi)){var h=[];vl(h,Wi,s,St(s)),Yt(ml,h)}}function So(s,h,P){s==="focusin"?(zo(),ka=h,Wi=P,ka.attachEvent("onpropertychange",Oa)):s==="focusout"&&zo()}function tr(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return _o(Wi)}function en(s,h){if(s==="click")return _o(h)}function Ln(s,h){if(s==="input"||s==="change")return _o(h)}function Tn(s,h){return s===h&&(s!==0||1/s===1/h)||s!==s&&h!==h}var Gn=typeof Object.is=="function"?Object.is:Tn;function Eo(s,h){if(Gn(s,h))return!0;if(typeof s!="object"||s===null||typeof h!="object"||h===null)return!1;var P=Object.keys(s),F=Object.keys(h);if(P.length!==F.length)return!1;for(F=0;F<P.length;F++){var K=P[F];if(!u.call(h,K)||!Gn(s[K],h[K]))return!1}return!0}function Xi(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function on(s,h){var P=Xi(s);s=0;for(var F;P;){if(P.nodeType===3){if(F=s+P.textContent.length,s<=h&&F>=h)return{node:P,offset:h-s};s=F}e:{for(;P;){if(P.nextSibling){P=P.nextSibling;break e}P=P.parentNode}P=void 0}P=Xi(P)}}function ri(s,h){return s&&h?s===h?!0:s&&s.nodeType===3?!1:h&&h.nodeType===3?ri(s,h.parentNode):"contains"in s?s.contains(h):s.compareDocumentPosition?!!(s.compareDocumentPosition(h)&16):!1:!1}function ui(){for(var s=window,h=Me();h instanceof s.HTMLIFrameElement;){try{var P=typeof h.contentWindow.location.href=="string"}catch{P=!1}if(P)s=h.contentWindow;else break;h=Me(s.document)}return h}function yl(s){var h=s&&s.nodeName&&s.nodeName.toLowerCase();return h&&(h==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||h==="textarea"||s.contentEditable==="true")}function Jl(s){var h=ui(),P=s.focusedElem,F=s.selectionRange;if(h!==P&&P&&P.ownerDocument&&ri(P.ownerDocument.documentElement,P)){if(F!==null&&yl(P)){if(h=F.start,s=F.end,s===void 0&&(s=h),"selectionStart"in P)P.selectionStart=h,P.selectionEnd=Math.min(s,P.value.length);else if(s=(h=P.ownerDocument||document)&&h.defaultView||window,s.getSelection){s=s.getSelection();var K=P.textContent.length,ne=Math.min(F.start,K);F=F.end===void 0?ne:Math.min(F.end,K),!s.extend&&ne>F&&(K=F,F=ne,ne=K),K=on(P,ne);var ge=on(P,F);K&&ge&&(s.rangeCount!==1||s.anchorNode!==K.node||s.anchorOffset!==K.offset||s.focusNode!==ge.node||s.focusOffset!==ge.offset)&&(h=h.createRange(),h.setStart(K.node,K.offset),s.removeAllRanges(),ne>F?(s.addRange(h),s.extend(ge.node,ge.offset)):(h.setEnd(ge.node,ge.offset),s.addRange(h)))}}for(h=[],s=P;s=s.parentNode;)s.nodeType===1&&h.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<h.length;P++)s=h[P],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var eu=o&&"documentMode"in document&&11>=document.documentMode,bl=null,wi=null,el=null,tu=!1;function Fu(s,h,P){var F=P.window===P?P.document:P.nodeType===9?P:P.ownerDocument;tu||bl==null||bl!==Me(F)||(F=bl,"selectionStart"in F&&yl(F)?F={start:F.selectionStart,end:F.selectionEnd}:(F=(F.ownerDocument&&F.ownerDocument.defaultView||window).getSelection(),F={anchorNode:F.anchorNode,anchorOffset:F.anchorOffset,focusNode:F.focusNode,focusOffset:F.focusOffset}),el&&Eo(el,F)||(el=F,F=_c(wi,"onSelect"),0<F.length&&(h=new Fe("onSelect","select",null,h,P),s.push({event:h,listeners:F}),h.target=bl)))}function Ua(s,h){var P={};return P[s.toLowerCase()]=h.toLowerCase(),P["Webkit"+s]="webkit"+h,P["Moz"+s]="moz"+h,P}var Ri={animationend:Ua("Animation","AnimationEnd"),animationiteration:Ua("Animation","AnimationIteration"),animationstart:Ua("Animation","AnimationStart"),transitionend:Ua("Transition","TransitionEnd")},Uo={},ju={};o&&(ju=document.createElement("div").style,"AnimationEvent"in window||(delete Ri.animationend.animation,delete Ri.animationiteration.animation,delete Ri.animationstart.animation),"TransitionEvent"in window||delete Ri.transitionend.transition);function wl(s){if(Uo[s])return Uo[s];if(!Ri[s])return s;var h=Ri[s],P;for(P in h)if(h.hasOwnProperty(P)&&P in ju)return Uo[s]=h[P];return s}var gc=wl("animationend"),vc=wl("animationiteration"),mc=wl("animationstart"),yc=wl("transitionend"),bc=new Map,wc="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 qo(s,h){bc.set(s,h),a(h,[s])}for(var _l=0;_l<wc.length;_l++){var _i=wc[_l],ro=_i.toLowerCase(),xl=_i[0].toUpperCase()+_i.slice(1);qo(ro,"on"+xl)}qo(gc,"onAnimationEnd"),qo(vc,"onAnimationIteration"),qo(mc,"onAnimationStart"),qo("dblclick","onDoubleClick"),qo("focusin","onFocus"),qo("focusout","onBlur"),qo(yc,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ho="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(" "),ff=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ho));function Sl(s,h,P){var F=s.type||"unknown-event";s.currentTarget=P,Ya(F,h,void 0,s),s.currentTarget=null}function ru(s,h){h=(h&4)!==0;for(var P=0;P<s.length;P++){var F=s[P],K=F.event;F=F.listeners;e:{var ne=void 0;if(h)for(var ge=F.length-1;0<=ge;ge--){var Ie=F[ge],Be=Ie.instance,tt=Ie.currentTarget;if(Ie=Ie.listener,Be!==ne&&K.isPropagationStopped())break e;Sl(K,Ie,tt),ne=Be}else for(ge=0;ge<F.length;ge++){if(Ie=F[ge],Be=Ie.instance,tt=Ie.currentTarget,Ie=Ie.listener,Be!==ne&&K.isPropagationStopped())break e;Sl(K,Ie,tt),ne=Be}}}if(An)throw s=ba,An=!1,ba=null,s}function sn(s,h){var P=h[Ca];P===void 0&&(P=h[Ca]=new Set);var F=s+"__bubble";P.has(F)||(nu(h,s,2,!1),P.add(F))}function Du(s,h,P){var F=0;h&&(F|=4),nu(P,s,F,h)}var El="_reactListening"+Math.random().toString(36).slice(2);function Ts(s){if(!s[El]){s[El]=!0,n.forEach(function(P){P!=="selectionchange"&&(ff.has(P)||Du(P,!1,s),Du(P,!0,s))});var h=s.nodeType===9?s:s.ownerDocument;h===null||h[El]||(h[El]=!0,Du("selectionchange",!1,h))}}function nu(s,h,P,F){switch(dl(h)){case 1:var K=Aa;break;case 4:K=Ja;break;default:K=mo}P=K.bind(null,h,P,s),K=void 0,!Ra||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||(K=!0),F?K!==void 0?s.addEventListener(h,P,{capture:!0,passive:K}):s.addEventListener(h,P,!0):K!==void 0?s.addEventListener(h,P,{passive:K}):s.addEventListener(h,P,!1)}function iu(s,h,P,F,K){var ne=F;if((h&1)===0&&(h&2)===0&&F!==null)e:for(;;){if(F===null)return;var ge=F.tag;if(ge===3||ge===4){var Ie=F.stateNode.containerInfo;if(Ie===K||Ie.nodeType===8&&Ie.parentNode===K)break;if(ge===4)for(ge=F.return;ge!==null;){var Be=ge.tag;if((Be===3||Be===4)&&(Be=ge.stateNode.containerInfo,Be===K||Be.nodeType===8&&Be.parentNode===K))return;ge=ge.return}for(;Ie!==null;){if(ge=Ms(Ie),ge===null)return;if(Be=ge.tag,Be===5||Be===6){F=ne=ge;continue e}Ie=Ie.parentNode}}F=F.return}Yt(function(){var tt=ne,gt=St(P),mt=[];e:{var dt=bc.get(s);if(dt!==void 0){var Ft=Fe,Ht=s;switch(s){case"keypress":if(yi(P)===0)break e;case"keydown":case"keyup":Ft=bi;break;case"focusin":Ht="focus",Ft=Hr;break;case"focusout":Ht="blur",Ft=Hr;break;case"beforeblur":case"afterblur":Ft=Hr;break;case"click":if(P.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ft=Rt;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ft=Mr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ft=Qs;break;case gc:case vc:case mc:Ft=Hn;break;case yc:Ft=Ls;break;case"scroll":Ft=lt;break;case"wheel":Ft=Zl;break;case"copy":case"cut":case"paste":Ft=bo;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ft=Pa}var Gt=(h&4)!==0,ta=!Gt&&s==="scroll",Qe=Gt?dt!==null?dt+"Capture":null:dt;Gt=[];for(var Ve=tt,Je;Ve!==null;){Je=Ve;var wt=Je.stateNode;if(Je.tag===5&&wt!==null&&(Je=wt,Qe!==null&&(wt=sa(Ve,Qe),wt!=null&&Gt.push(au(Ve,wt,Je)))),ta)break;Ve=Ve.return}0<Gt.length&&(dt=new Ft(dt,Ht,null,P,gt),mt.push({event:dt,listeners:Gt}))}}if((h&7)===0){e:{if(dt=s==="mouseover"||s==="pointerover",Ft=s==="mouseout"||s==="pointerout",dt&&P!==kt&&(Ht=P.relatedTarget||P.fromElement)&&(Ms(Ht)||Ht[Qi]))break e;if((Ft||dt)&&(dt=gt.window===gt?gt:(dt=gt.ownerDocument)?dt.defaultView||dt.parentWindow:window,Ft?(Ht=P.relatedTarget||P.toElement,Ft=tt,Ht=Ht?Ms(Ht):null,Ht!==null&&(ta=Qn(Ht),Ht!==ta||Ht.tag!==5&&Ht.tag!==6)&&(Ht=null)):(Ft=null,Ht=tt),Ft!==Ht)){if(Gt=Rt,wt="onMouseLeave",Qe="onMouseEnter",Ve="mouse",(s==="pointerout"||s==="pointerover")&&(Gt=Pa,wt="onPointerLeave",Qe="onPointerEnter",Ve="pointer"),ta=Ft==null?dt:ci(Ft),Je=Ht==null?dt:ci(Ht),dt=new Gt(wt,Ve+"leave",Ft,P,gt),dt.target=ta,dt.relatedTarget=Je,wt=null,Ms(gt)===tt&&(Gt=new Gt(Qe,Ve+"enter",Ht,P,gt),Gt.target=Je,Gt.relatedTarget=ta,wt=Gt),ta=wt,Ft&&Ht)t:{for(Gt=Ft,Qe=Ht,Ve=0,Je=Gt;Je;Je=tl(Je))Ve++;for(Je=0,wt=Qe;wt;wt=tl(wt))Je++;for(;0<Ve-Je;)Gt=tl(Gt),Ve--;for(;0<Je-Ve;)Qe=tl(Qe),Je--;for(;Ve--;){if(Gt===Qe||Qe!==null&&Gt===Qe.alternate)break t;Gt=tl(Gt),Qe=tl(Qe)}Gt=null}else Gt=null;Ft!==null&&Xf(mt,dt,Ft,Gt,!1),Ht!==null&&ta!==null&&Xf(mt,ta,Ht,Gt,!0)}}e:{if(dt=tt?ci(tt):window,Ft=dt.nodeName&&dt.nodeName.toLowerCase(),Ft==="select"||Ft==="input"&&dt.type==="file")var Wt=Yi;else if(Jr(dt))if(Bo)Wt=Ln;else{Wt=tr;var nr=So}else(Ft=dt.nodeName)&&Ft.toLowerCase()==="input"&&(dt.type==="checkbox"||dt.type==="radio")&&(Wt=en);if(Wt&&(Wt=Wt(s,tt))){vl(mt,Wt,P,gt);break e}nr&&nr(s,dt,tt),s==="focusout"&&(nr=dt._wrapperState)&&nr.controlled&&dt.type==="number"&&_e(dt,"number",dt.value)}switch(nr=tt?ci(tt):window,s){case"focusin":(Jr(nr)||nr.contentEditable==="true")&&(bl=nr,wi=tt,el=null);break;case"focusout":el=wi=bl=null;break;case"mousedown":tu=!0;break;case"contextmenu":case"mouseup":case"dragend":tu=!1,Fu(mt,P,gt);break;case"selectionchange":if(eu)break;case"keydown":case"keyup":Fu(mt,P,gt)}var ir;if(la)e:{switch(s){case"compositionstart":var hr="onCompositionStart";break e;case"compositionend":hr="onCompositionEnd";break e;case"compositionupdate":hr="onCompositionUpdate";break e}hr=void 0}else Vn?ua(s,P)&&(hr="onCompositionEnd"):s==="keydown"&&P.keyCode===229&&(hr="onCompositionStart");hr&&(li&&P.locale!=="ko"&&(Vn||hr!=="onCompositionStart"?hr==="onCompositionEnd"&&Vn&&(ir=Os()):(Jn=gt,Da="value"in Jn?Jn.value:Jn.textContent,Vn=!0)),nr=_c(tt,hr),0<nr.length&&(hr=new Ns(hr,s,null,P,gt),mt.push({event:hr,listeners:nr}),ir?hr.data=ir:(ir=$i(P),ir!==null&&(hr.data=ir)))),(ir=as?os(s,P):Ql(s,P))&&(tt=_c(tt,"onBeforeInput"),0<tt.length&&(gt=new Ns("onBeforeInput","beforeinput",null,P,gt),mt.push({event:gt,listeners:tt}),gt.data=ir))}ru(mt,h)})}function au(s,h,P){return{instance:s,listener:h,currentTarget:P}}function _c(s,h){for(var P=h+"Capture",F=[];s!==null;){var K=s,ne=K.stateNode;K.tag===5&&ne!==null&&(K=ne,ne=sa(s,P),ne!=null&&F.unshift(au(s,ne,K)),ne=sa(s,h),ne!=null&&F.push(au(s,ne,K))),s=s.return}return F}function tl(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function Xf(s,h,P,F,K){for(var ne=h._reactName,ge=[];P!==null&&P!==F;){var Ie=P,Be=Ie.alternate,tt=Ie.stateNode;if(Be!==null&&Be===F)break;Ie.tag===5&&tt!==null&&(Ie=tt,K?(Be=sa(P,ne),Be!=null&&ge.unshift(au(P,Be,Ie))):K||(Be=sa(P,ne),Be!=null&&ge.push(au(P,Be,Ie)))),P=P.return}ge.length!==0&&s.push({event:h,listeners:ge})}var Hh=/\r\n?/g,Kf=/\u0000|\uFFFD/g;function hf(s){return(typeof s=="string"?s:""+s).replace(Hh,`
|
|
30
|
+
`).replace(Kf,"")}function Bu(s,h,P){if(h=hf(h),hf(s)!==h&&P)throw Error(r(425))}function Rs(){}var zu=null,Al=null;function df(s,h){return s==="textarea"||s==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var no=typeof setTimeout=="function"?setTimeout:void 0,xc=typeof clearTimeout=="function"?clearTimeout:void 0,Uu=typeof Promise=="function"?Promise:void 0,Zf=typeof queueMicrotask=="function"?queueMicrotask:typeof Uu<"u"?function(s){return Uu.resolve(null).then(s).catch(Qf)}:no;function Qf(s){setTimeout(function(){throw s})}function Sc(s,h){var P=h,F=0;do{var K=P.nextSibling;if(s.removeChild(P),K&&K.nodeType===8)if(P=K.data,P==="/$"){if(F===0){s.removeChild(K),mi(h);return}F--}else P!=="$"&&P!=="$?"&&P!=="$!"||F++;P=K}while(P);mi(h)}function Ki(s){for(;s!=null;s=s.nextSibling){var h=s.nodeType;if(h===1||h===3)break;if(h===8){if(h=s.data,h==="$"||h==="$!"||h==="$?")break;if(h==="/$")return null}}return s}function Zi(s){s=s.previousSibling;for(var h=0;s;){if(s.nodeType===8){var P=s.data;if(P==="$"||P==="$!"||P==="$?"){if(h===0)return s;h--}else P==="/$"&&h++}s=s.previousSibling}return null}var fa=Math.random().toString(36).slice(2),Ao="__reactFiber$"+fa,ou="__reactProps$"+fa,Qi="__reactContainer$"+fa,Ca="__reactEvents$"+fa,Jf="__reactListeners$"+fa,eh="__reactHandles$"+fa;function Ms(s){var h=s[Ao];if(h)return h;for(var P=s.parentNode;P;){if(h=P[Qi]||P[Ao]){if(P=h.alternate,h.child!==null||P!==null&&P.child!==null)for(s=Zi(s);s!==null;){if(P=s[Ao])return P;s=Zi(s)}return h}s=P,P=s.parentNode}return null}function su(s){return s=s[Ao]||s[Qi],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function ci(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(r(33))}function xi(s){return s[ou]||null}var Ec=[],ss=-1;function Po(s){return{current:s}}function Yr(s){0>ss||(s.current=Ec[ss],Ec[ss]=null,ss--)}function tn(s,h){ss++,Ec[ss]=s.current,s.current=h}var ls={},Mi=Po(ls),ha=Po(!1),rl=ls;function Pl(s,h){var P=s.type.contextTypes;if(!P)return ls;var F=s.stateNode;if(F&&F.__reactInternalMemoizedUnmaskedChildContext===h)return F.__reactInternalMemoizedMaskedChildContext;var K={},ne;for(ne in P)K[ne]=h[ne];return F&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=h,s.__reactInternalMemoizedMaskedChildContext=K),K}function da(s){return s=s.childContextTypes,s!=null}function lu(){Yr(ha),Yr(Mi)}function pf(s,h,P){if(Mi.current!==ls)throw Error(r(168));tn(Mi,h),tn(ha,P)}function qu(s,h,P){var F=s.stateNode;if(h=h.childContextTypes,typeof F.getChildContext!="function")return P;F=F.getChildContext();for(var K in F)if(!(K in h))throw Error(r(108,Q(s)||"Unknown",K));return U({},P,F)}function us(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||ls,rl=Mi.current,tn(Mi,s),tn(ha,ha.current),!0}function th(s,h,P){var F=s.stateNode;if(!F)throw Error(r(169));P?(s=qu(s,h,rl),F.__reactInternalMemoizedMergedChildContext=s,Yr(ha),Yr(Mi),tn(Mi,s)):Yr(ha),tn(ha,P)}var cs=null,kl=!1,N=!1;function B(s){cs===null?cs=[s]:cs.push(s)}function te(s){kl=!0,B(s)}function ie(){if(!N&&cs!==null){N=!0;var s=0,h=Ar;try{var P=cs;for(Ar=1;s<P.length;s++){var F=P[s];do F=F(!0);while(F!==null)}cs=null,kl=!1}catch(K){throw cs!==null&&(cs=cs.slice(s+1)),Ps(Zo,ie),K}finally{Ar=h,N=!1}}return null}var he=[],ve=0,me=null,we=0,Se=[],Oe=0,De=null,Ze=1,ke="";function qe(s,h){he[ve++]=we,he[ve++]=me,me=s,we=h}function Ke(s,h,P){Se[Oe++]=Ze,Se[Oe++]=ke,Se[Oe++]=De,De=s;var F=Ze;s=ke;var K=32-mr(F)-1;F&=~(1<<K),P+=1;var ne=32-mr(h)+K;if(30<ne){var ge=K-K%5;ne=(F&(1<<ge)-1).toString(32),F>>=ge,K-=ge,Ze=1<<32-mr(h)+K|P<<K|F,ke=ne+s}else Ze=1<<ne|P<<K|F,ke=s}function it(s){s.return!==null&&(qe(s,1),Ke(s,1,0))}function Ye(s){for(;s===me;)me=he[--ve],he[ve]=null,we=he[--ve],he[ve]=null;for(;s===De;)De=Se[--Oe],Se[Oe]=null,ke=Se[--Oe],Se[Oe]=null,Ze=Se[--Oe],Se[Oe]=null}var nt=null,Ue=null,ot=!1,ut=null;function qt(s,h){var P=ol(5,null,null,0);P.elementType="DELETED",P.stateNode=h,P.return=s,h=s.deletions,h===null?(s.deletions=[P],s.flags|=16):h.push(P)}function Mt(s,h){switch(s.tag){case 5:var P=s.type;return h=h.nodeType!==1||P.toLowerCase()!==h.nodeName.toLowerCase()?null:h,h!==null?(s.stateNode=h,nt=s,Ue=Ki(h.firstChild),!0):!1;case 6:return h=s.pendingProps===""||h.nodeType!==3?null:h,h!==null?(s.stateNode=h,nt=s,Ue=null,!0):!1;case 13:return h=h.nodeType!==8?null:h,h!==null?(P=De!==null?{id:Ze,overflow:ke}:null,s.memoizedState={dehydrated:h,treeContext:P,retryLane:1073741824},P=ol(18,null,null,0),P.stateNode=h,P.return=s,s.child=P,nt=s,Ue=null,!0):!1;default:return!1}}function ar(s){return(s.mode&1)!==0&&(s.flags&128)===0}function It(s){if(ot){var h=Ue;if(h){var P=h;if(!Mt(s,h)){if(ar(s))throw Error(r(418));h=Ki(P.nextSibling);var F=nt;h&&Mt(s,h)?qt(F,P):(s.flags=s.flags&-4097|2,ot=!1,nt=s)}}else{if(ar(s))throw Error(r(418));s.flags=s.flags&-4097|2,ot=!1,nt=s}}}function _r(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;nt=s}function Rn(s){if(s!==nt)return!1;if(!ot)return _r(s),ot=!0,!1;var h;if((h=s.tag!==3)&&!(h=s.tag!==5)&&(h=s.type,h=h!=="head"&&h!=="body"&&!df(s.type,s.memoizedProps)),h&&(h=Ue)){if(ar(s))throw fr(),Error(r(418));for(;h;)qt(s,h),h=Ki(h.nextSibling)}if(_r(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));e:{for(s=s.nextSibling,h=0;s;){if(s.nodeType===8){var P=s.data;if(P==="/$"){if(h===0){Ue=Ki(s.nextSibling);break e}h--}else P!=="$"&&P!=="$!"&&P!=="$?"||h++}s=s.nextSibling}Ue=null}}else Ue=nt?Ki(s.stateNode.nextSibling):null;return!0}function fr(){for(var s=Ue;s;)s=Ki(s.nextSibling)}function Tt(){Ue=nt=null,ot=!1}function _t(s){ut===null?ut=[s]:ut.push(s)}var Mn=_.ReactCurrentBatchConfig;function Dt(s,h,P){if(s=P.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(P._owner){if(P=P._owner,P){if(P.tag!==1)throw Error(r(309));var F=P.stateNode}if(!F)throw Error(r(147,s));var K=F,ne=""+s;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===ne?h.ref:(h=function(ge){var Ie=K.refs;ge===null?delete Ie[ne]:Ie[ne]=ge},h._stringRef=ne,h)}if(typeof s!="string")throw Error(r(284));if(!P._owner)throw Error(r(290,s))}return s}function or(s,h){throw s=Object.prototype.toString.call(h),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":s))}function kr(s){var h=s._init;return h(s._payload)}function fi(s){function h(Qe,Ve){if(s){var Je=Qe.deletions;Je===null?(Qe.deletions=[Ve],Qe.flags|=16):Je.push(Ve)}}function P(Qe,Ve){if(!s)return null;for(;Ve!==null;)h(Qe,Ve),Ve=Ve.sibling;return null}function F(Qe,Ve){for(Qe=new Map;Ve!==null;)Ve.key!==null?Qe.set(Ve.key,Ve):Qe.set(Ve.index,Ve),Ve=Ve.sibling;return Qe}function K(Qe,Ve){return Qe=Dc(Qe,Ve),Qe.index=0,Qe.sibling=null,Qe}function ne(Qe,Ve,Je){return Qe.index=Je,s?(Je=Qe.alternate,Je!==null?(Je=Je.index,Je<Ve?(Qe.flags|=2,Ve):Je):(Qe.flags|=2,Ve)):(Qe.flags|=1048576,Ve)}function ge(Qe){return s&&Qe.alternate===null&&(Qe.flags|=2),Qe}function Ie(Qe,Ve,Je,wt){return Ve===null||Ve.tag!==6?(Ve=Z0(Je,Qe.mode,wt),Ve.return=Qe,Ve):(Ve=K(Ve,Je),Ve.return=Qe,Ve)}function Be(Qe,Ve,Je,wt){var Wt=Je.type;return Wt===O?gt(Qe,Ve,Je.props.children,wt,Je.key):Ve!==null&&(Ve.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===ae&&kr(Wt)===Ve.type)?(wt=K(Ve,Je.props),wt.ref=Dt(Qe,Ve,Je),wt.return=Qe,wt):(wt=Wp(Je.type,Je.key,Je.props,null,Qe.mode,wt),wt.ref=Dt(Qe,Ve,Je),wt.return=Qe,wt)}function tt(Qe,Ve,Je,wt){return Ve===null||Ve.tag!==4||Ve.stateNode.containerInfo!==Je.containerInfo||Ve.stateNode.implementation!==Je.implementation?(Ve=Q0(Je,Qe.mode,wt),Ve.return=Qe,Ve):(Ve=K(Ve,Je.children||[]),Ve.return=Qe,Ve)}function gt(Qe,Ve,Je,wt,Wt){return Ve===null||Ve.tag!==7?(Ve=_f(Je,Qe.mode,wt,Wt),Ve.return=Qe,Ve):(Ve=K(Ve,Je),Ve.return=Qe,Ve)}function mt(Qe,Ve,Je){if(typeof Ve=="string"&&Ve!==""||typeof Ve=="number")return Ve=Z0(""+Ve,Qe.mode,Je),Ve.return=Qe,Ve;if(typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case A:return Je=Wp(Ve.type,Ve.key,Ve.props,null,Qe.mode,Je),Je.ref=Dt(Qe,null,Ve),Je.return=Qe,Je;case M:return Ve=Q0(Ve,Qe.mode,Je),Ve.return=Qe,Ve;case ae:var wt=Ve._init;return mt(Qe,wt(Ve._payload),Je)}if(xe(Ve)||Y(Ve))return Ve=_f(Ve,Qe.mode,Je,null),Ve.return=Qe,Ve;or(Qe,Ve)}return null}function dt(Qe,Ve,Je,wt){var Wt=Ve!==null?Ve.key:null;if(typeof Je=="string"&&Je!==""||typeof Je=="number")return Wt!==null?null:Ie(Qe,Ve,""+Je,wt);if(typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case A:return Je.key===Wt?Be(Qe,Ve,Je,wt):null;case M:return Je.key===Wt?tt(Qe,Ve,Je,wt):null;case ae:return Wt=Je._init,dt(Qe,Ve,Wt(Je._payload),wt)}if(xe(Je)||Y(Je))return Wt!==null?null:gt(Qe,Ve,Je,wt,null);or(Qe,Je)}return null}function Ft(Qe,Ve,Je,wt,Wt){if(typeof wt=="string"&&wt!==""||typeof wt=="number")return Qe=Qe.get(Je)||null,Ie(Ve,Qe,""+wt,Wt);if(typeof wt=="object"&&wt!==null){switch(wt.$$typeof){case A:return Qe=Qe.get(wt.key===null?Je:wt.key)||null,Be(Ve,Qe,wt,Wt);case M:return Qe=Qe.get(wt.key===null?Je:wt.key)||null,tt(Ve,Qe,wt,Wt);case ae:var nr=wt._init;return Ft(Qe,Ve,Je,nr(wt._payload),Wt)}if(xe(wt)||Y(wt))return Qe=Qe.get(Je)||null,gt(Ve,Qe,wt,Wt,null);or(Ve,wt)}return null}function Ht(Qe,Ve,Je,wt){for(var Wt=null,nr=null,ir=Ve,hr=Ve=0,Ga=null;ir!==null&&hr<Je.length;hr++){ir.index>hr?(Ga=ir,ir=null):Ga=ir.sibling;var cn=dt(Qe,ir,Je[hr],wt);if(cn===null){ir===null&&(ir=Ga);break}s&&ir&&cn.alternate===null&&h(Qe,ir),Ve=ne(cn,Ve,hr),nr===null?Wt=cn:nr.sibling=cn,nr=cn,ir=Ga}if(hr===Je.length)return P(Qe,ir),ot&&qe(Qe,hr),Wt;if(ir===null){for(;hr<Je.length;hr++)ir=mt(Qe,Je[hr],wt),ir!==null&&(Ve=ne(ir,Ve,hr),nr===null?Wt=ir:nr.sibling=ir,nr=ir);return ot&&qe(Qe,hr),Wt}for(ir=F(Qe,ir);hr<Je.length;hr++)Ga=Ft(ir,Qe,hr,Je[hr],wt),Ga!==null&&(s&&Ga.alternate!==null&&ir.delete(Ga.key===null?hr:Ga.key),Ve=ne(Ga,Ve,hr),nr===null?Wt=Ga:nr.sibling=Ga,nr=Ga);return s&&ir.forEach(function(Bc){return h(Qe,Bc)}),ot&&qe(Qe,hr),Wt}function Gt(Qe,Ve,Je,wt){var Wt=Y(Je);if(typeof Wt!="function")throw Error(r(150));if(Je=Wt.call(Je),Je==null)throw Error(r(151));for(var nr=Wt=null,ir=Ve,hr=Ve=0,Ga=null,cn=Je.next();ir!==null&&!cn.done;hr++,cn=Je.next()){ir.index>hr?(Ga=ir,ir=null):Ga=ir.sibling;var Bc=dt(Qe,ir,cn.value,wt);if(Bc===null){ir===null&&(ir=Ga);break}s&&ir&&Bc.alternate===null&&h(Qe,ir),Ve=ne(Bc,Ve,hr),nr===null?Wt=Bc:nr.sibling=Bc,nr=Bc,ir=Ga}if(cn.done)return P(Qe,ir),ot&&qe(Qe,hr),Wt;if(ir===null){for(;!cn.done;hr++,cn=Je.next())cn=mt(Qe,cn.value,wt),cn!==null&&(Ve=ne(cn,Ve,hr),nr===null?Wt=cn:nr.sibling=cn,nr=cn);return ot&&qe(Qe,hr),Wt}for(ir=F(Qe,ir);!cn.done;hr++,cn=Je.next())cn=Ft(ir,Qe,hr,cn.value,wt),cn!==null&&(s&&cn.alternate!==null&&ir.delete(cn.key===null?hr:cn.key),Ve=ne(cn,Ve,hr),nr===null?Wt=cn:nr.sibling=cn,nr=cn);return s&&ir.forEach(function(J7){return h(Qe,J7)}),ot&&qe(Qe,hr),Wt}function ta(Qe,Ve,Je,wt){if(typeof Je=="object"&&Je!==null&&Je.type===O&&Je.key===null&&(Je=Je.props.children),typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case A:e:{for(var Wt=Je.key,nr=Ve;nr!==null;){if(nr.key===Wt){if(Wt=Je.type,Wt===O){if(nr.tag===7){P(Qe,nr.sibling),Ve=K(nr,Je.props.children),Ve.return=Qe,Qe=Ve;break e}}else if(nr.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===ae&&kr(Wt)===nr.type){P(Qe,nr.sibling),Ve=K(nr,Je.props),Ve.ref=Dt(Qe,nr,Je),Ve.return=Qe,Qe=Ve;break e}P(Qe,nr);break}else h(Qe,nr);nr=nr.sibling}Je.type===O?(Ve=_f(Je.props.children,Qe.mode,wt,Je.key),Ve.return=Qe,Qe=Ve):(wt=Wp(Je.type,Je.key,Je.props,null,Qe.mode,wt),wt.ref=Dt(Qe,Ve,Je),wt.return=Qe,Qe=wt)}return ge(Qe);case M:e:{for(nr=Je.key;Ve!==null;){if(Ve.key===nr)if(Ve.tag===4&&Ve.stateNode.containerInfo===Je.containerInfo&&Ve.stateNode.implementation===Je.implementation){P(Qe,Ve.sibling),Ve=K(Ve,Je.children||[]),Ve.return=Qe,Qe=Ve;break e}else{P(Qe,Ve);break}else h(Qe,Ve);Ve=Ve.sibling}Ve=Q0(Je,Qe.mode,wt),Ve.return=Qe,Qe=Ve}return ge(Qe);case ae:return nr=Je._init,ta(Qe,Ve,nr(Je._payload),wt)}if(xe(Je))return Ht(Qe,Ve,Je,wt);if(Y(Je))return Gt(Qe,Ve,Je,wt);or(Qe,Je)}return typeof Je=="string"&&Je!==""||typeof Je=="number"?(Je=""+Je,Ve!==null&&Ve.tag===6?(P(Qe,Ve.sibling),Ve=K(Ve,Je),Ve.return=Qe,Qe=Ve):(P(Qe,Ve),Ve=Z0(Je,Qe.mode,wt),Ve.return=Qe,Qe=Ve),ge(Qe)):P(Qe,Ve)}return ta}var ni=fi(!0),Ir=fi(!1),hi=Po(null),hn=null,On=null,Sr=null;function Dr(){Sr=On=hn=null}function wn(s){var h=hi.current;Yr(hi),s._currentValue=h}function Br(s,h,P){for(;s!==null;){var F=s.alternate;if((s.childLanes&h)!==h?(s.childLanes|=h,F!==null&&(F.childLanes|=h)):F!==null&&(F.childLanes&h)!==h&&(F.childLanes|=h),s===P)break;s=s.return}}function _n(s,h){hn=s,Sr=On=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&h)!==0&&(oe=!0),s.firstContext=null)}function xn(s){var h=s._currentValue;if(Sr!==s)if(s={context:s,memoizedValue:h,next:null},On===null){if(hn===null)throw Error(r(308));On=s,hn.dependencies={lanes:0,firstContext:s}}else On=On.next=s;return h}var Xr=null;function Si(s){Xr===null?Xr=[s]:Xr.push(s)}function Vr(s,h,P,F){var K=h.interleaved;return K===null?(P.next=P,Si(h)):(P.next=K.next,K.next=P),h.interleaved=P,Gr(s,F)}function Gr(s,h){s.lanes|=h;var P=s.alternate;for(P!==null&&(P.lanes|=h),P=s,s=s.return;s!==null;)s.childLanes|=h,P=s.alternate,P!==null&&(P.childLanes|=h),P=s,s=s.return;return P.tag===3?P.stateNode:null}var $n=!1;function Ei(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pa(s,h){s=s.updateQueue,h.updateQueue===s&&(h.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function Wn(s,h){return{eventTime:s,lane:h,tag:0,payload:null,callback:null,next:null}}function In(s,h,P){var F=s.updateQueue;if(F===null)return null;if(F=F.shared,(nn&2)!==0){var K=F.pending;return K===null?h.next=h:(h.next=K.next,K.next=h),F.pending=h,Gr(s,P)}return K=F.interleaved,K===null?(h.next=h,Si(F)):(h.next=K.next,K.next=h),F.interleaved=h,Gr(s,P)}function ga(s,h,P){if(h=h.updateQueue,h!==null&&(h=h.shared,(P&4194240)!==0)){var F=h.lanes;F&=s.pendingLanes,P|=F,h.lanes=P,$l(s,P)}}function Kr(s,h){var P=s.updateQueue,F=s.alternate;if(F!==null&&(F=F.updateQueue,P===F)){var K=null,ne=null;if(P=P.firstBaseUpdate,P!==null){do{var ge={eventTime:P.eventTime,lane:P.lane,tag:P.tag,payload:P.payload,callback:P.callback,next:null};ne===null?K=ne=ge:ne=ne.next=ge,P=P.next}while(P!==null);ne===null?K=ne=h:ne=ne.next=h}else K=ne=h;P={baseState:F.baseState,firstBaseUpdate:K,lastBaseUpdate:ne,shared:F.shared,effects:F.effects},s.updateQueue=P;return}s=P.lastBaseUpdate,s===null?P.firstBaseUpdate=h:s.next=h,P.lastBaseUpdate=h}function Ii(s,h,P,F){var K=s.updateQueue;$n=!1;var ne=K.firstBaseUpdate,ge=K.lastBaseUpdate,Ie=K.shared.pending;if(Ie!==null){K.shared.pending=null;var Be=Ie,tt=Be.next;Be.next=null,ge===null?ne=tt:ge.next=tt,ge=Be;var gt=s.alternate;gt!==null&&(gt=gt.updateQueue,Ie=gt.lastBaseUpdate,Ie!==ge&&(Ie===null?gt.firstBaseUpdate=tt:Ie.next=tt,gt.lastBaseUpdate=Be))}if(ne!==null){var mt=K.baseState;ge=0,gt=tt=Be=null,Ie=ne;do{var dt=Ie.lane,Ft=Ie.eventTime;if((F&dt)===dt){gt!==null&&(gt=gt.next={eventTime:Ft,lane:0,tag:Ie.tag,payload:Ie.payload,callback:Ie.callback,next:null});e:{var Ht=s,Gt=Ie;switch(dt=h,Ft=P,Gt.tag){case 1:if(Ht=Gt.payload,typeof Ht=="function"){mt=Ht.call(Ft,mt,dt);break e}mt=Ht;break e;case 3:Ht.flags=Ht.flags&-65537|128;case 0:if(Ht=Gt.payload,dt=typeof Ht=="function"?Ht.call(Ft,mt,dt):Ht,dt==null)break e;mt=U({},mt,dt);break e;case 2:$n=!0}}Ie.callback!==null&&Ie.lane!==0&&(s.flags|=64,dt=K.effects,dt===null?K.effects=[Ie]:dt.push(Ie))}else Ft={eventTime:Ft,lane:dt,tag:Ie.tag,payload:Ie.payload,callback:Ie.callback,next:null},gt===null?(tt=gt=Ft,Be=mt):gt=gt.next=Ft,ge|=dt;if(Ie=Ie.next,Ie===null){if(Ie=K.shared.pending,Ie===null)break;dt=Ie,Ie=dt.next,dt.next=null,K.lastBaseUpdate=dt,K.shared.pending=null}}while(!0);if(gt===null&&(Be=mt),K.baseState=Be,K.firstBaseUpdate=tt,K.lastBaseUpdate=gt,h=K.shared.interleaved,h!==null){K=h;do ge|=K.lane,K=K.next;while(K!==h)}else ne===null&&(K.shared.lanes=0);mf|=ge,s.lanes=ge,s.memoizedState=mt}}function zr(s,h,P){if(s=h.effects,h.effects=null,s!==null)for(h=0;h<s.length;h++){var F=s[h],K=F.callback;if(K!==null){if(F.callback=null,F=P,typeof K!="function")throw Error(r(191,K));K.call(F)}}}var rr={},Or=Po(rr),yr=Po(rr),Cn=Po(rr);function ii(s){if(s===rr)throw Error(r(174));return s}function Vo(s,h){switch(tn(Cn,h),tn(yr,s),tn(Or,rr),s=h.nodeType,s){case 9:case 11:h=(h=h.documentElement)?h.namespaceURI:pt(null,"");break;default:s=s===8?h.parentNode:h,h=s.namespaceURI||null,s=s.tagName,h=pt(h,s)}Yr(Or),tn(Or,h)}function ln(){Yr(Or),Yr(yr),Yr(Cn)}function uu(s){ii(Cn.current);var h=ii(Or.current),P=pt(h,s.type);h!==P&&(tn(yr,s),tn(Or,P))}function Is(s){yr.current===s&&(Yr(Or),Yr(yr))}var un=Po(0);function io(s){for(var h=s;h!==null;){if(h.tag===13){var P=h.memoizedState;if(P!==null&&(P=P.dehydrated,P===null||P.data==="$?"||P.data==="$!"))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===s)break;for(;h.sibling===null;){if(h.return===null||h.return===s)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var Ol=[];function va(){for(var s=0;s<Ol.length;s++)Ol[s]._workInProgressVersionPrimary=null;Ol.length=0}var cu=_.ReactCurrentDispatcher,fu=_.ReactCurrentBatchConfig,Fi=0,rn=null,Fn=null,jn=null,ao=!1,ko=!1,oo=0,Ac=0;function Dn(){throw Error(r(321))}function hu(s,h){if(h===null)return!1;for(var P=0;P<h.length&&P<s.length;P++)if(!Gn(s[P],h[P]))return!1;return!0}function nl(s,h,P,F,K,ne){if(Fi=ne,rn=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,cu.current=s===null||s.memoizedState===null?T0:pu,s=P(F,K),ko){ne=0;do{if(ko=!1,oo=0,25<=ne)throw Error(r(301));ne+=1,jn=Fn=null,h.updateQueue=null,cu.current=nh,s=P(F,K)}while(ko)}if(cu.current=Cc,h=Fn!==null&&Fn.next!==null,Fi=0,jn=Fn=rn=null,ao=!1,h)throw Error(r(300));return s}function so(){var s=oo!==0;return oo=0,s}function gn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jn===null?rn.memoizedState=jn=s:jn=jn.next=s,jn}function di(){if(Fn===null){var s=rn.alternate;s=s!==null?s.memoizedState:null}else s=Fn.next;var h=jn===null?rn.memoizedState:jn.next;if(h!==null)jn=h,Fn=s;else{if(s===null)throw Error(r(310));Fn=s,s={memoizedState:Fn.memoizedState,baseState:Fn.baseState,baseQueue:Fn.baseQueue,queue:Fn.queue,next:null},jn===null?rn.memoizedState=jn=s:jn=jn.next=s}return jn}function ma(s,h){return typeof h=="function"?h(s):h}function Ji(s){var h=di(),P=h.queue;if(P===null)throw Error(r(311));P.lastRenderedReducer=s;var F=Fn,K=F.baseQueue,ne=P.pending;if(ne!==null){if(K!==null){var ge=K.next;K.next=ne.next,ne.next=ge}F.baseQueue=K=ne,P.pending=null}if(K!==null){ne=K.next,F=F.baseState;var Ie=ge=null,Be=null,tt=ne;do{var gt=tt.lane;if((Fi>)===gt)Be!==null&&(Be=Be.next={lane:0,action:tt.action,hasEagerState:tt.hasEagerState,eagerState:tt.eagerState,next:null}),F=tt.hasEagerState?tt.eagerState:s(F,tt.action);else{var mt={lane:gt,action:tt.action,hasEagerState:tt.hasEagerState,eagerState:tt.eagerState,next:null};Be===null?(Ie=Be=mt,ge=F):Be=Be.next=mt,rn.lanes|=gt,mf|=gt}tt=tt.next}while(tt!==null&&tt!==ne);Be===null?ge=F:Be.next=Ie,Gn(F,h.memoizedState)||(oe=!0),h.memoizedState=F,h.baseState=ge,h.baseQueue=Be,P.lastRenderedState=F}if(s=P.interleaved,s!==null){K=s;do ne=K.lane,rn.lanes|=ne,mf|=ne,K=K.next;while(K!==s)}else K===null&&(P.lanes=0);return[h.memoizedState,P.dispatch]}function Fs(s){var h=di(),P=h.queue;if(P===null)throw Error(r(311));P.lastRenderedReducer=s;var F=P.dispatch,K=P.pending,ne=h.memoizedState;if(K!==null){P.pending=null;var ge=K=K.next;do ne=s(ne,ge.action),ge=ge.next;while(ge!==K);Gn(ne,h.memoizedState)||(oe=!0),h.memoizedState=ne,h.baseQueue===null&&(h.baseState=ne),P.lastRenderedState=ne}return[ne,F]}function Pc(){}function Hu(s,h){var P=rn,F=di(),K=h(),ne=!Gn(F.memoizedState,K);if(ne&&(F.memoizedState=K,oe=!0),F=F.queue,Oc(gf.bind(null,P,F,s),[s]),F.getSnapshot!==h||ne||jn!==null&&jn.memoizedState.tag&1){if(P.flags|=2048,qa(9,fs.bind(null,P,F,K,h),void 0,null),Va===null)throw Error(r(349));(Fi&30)!==0||rh(P,h,K)}return K}function rh(s,h,P){s.flags|=16384,s={getSnapshot:h,value:P},h=rn.updateQueue,h===null?(h={lastEffect:null,stores:null},rn.updateQueue=h,h.stores=[s]):(P=h.stores,P===null?h.stores=[s]:P.push(s))}function fs(s,h,P,F){h.value=P,h.getSnapshot=F,Cl(h)&&du(s)}function gf(s,h,P){return P(function(){Cl(h)&&du(s)})}function Cl(s){var h=s.getSnapshot;s=s.value;try{var P=h();return!Gn(s,P)}catch{return!0}}function du(s){var h=Gr(s,1);h!==null&&Rl(h,s,1,-1)}function Go(s){var h=gn();return typeof s=="function"&&(s=s()),h.memoizedState=h.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:s},h.queue=s,s=s.dispatch=Rp.bind(null,rn,s),[h.memoizedState,s]}function qa(s,h,P,F){return s={tag:s,create:h,destroy:P,deps:F,next:null},h=rn.updateQueue,h===null?(h={lastEffect:null,stores:null},rn.updateQueue=h,h.lastEffect=s.next=s):(P=h.lastEffect,P===null?h.lastEffect=s.next=s:(F=P.next,P.next=s,s.next=F,h.lastEffect=s)),s}function hs(){return di().memoizedState}function lo(s,h,P,F){var K=gn();rn.flags|=s,K.memoizedState=qa(1|h,P,void 0,F===void 0?null:F)}function ds(s,h,P,F){var K=di();F=F===void 0?null:F;var ne=void 0;if(Fn!==null){var ge=Fn.memoizedState;if(ne=ge.destroy,F!==null&&hu(F,ge.deps)){K.memoizedState=qa(h,P,ne,F);return}}rn.flags|=s,K.memoizedState=qa(1|h,P,ne,F)}function kc(s,h){return lo(8390656,8,s,h)}function Oc(s,h){return ds(2048,8,s,h)}function vf(s,h){return ds(4,2,s,h)}function Vu(s,h){return ds(4,4,s,h)}function ps(s,h){if(typeof h=="function")return s=s(),h(s),function(){h(null)};if(h!=null)return s=s(),h.current=s,function(){h.current=null}}function Cp(s,h,P){return P=P!=null?P.concat([s]):null,ds(4,4,ps.bind(null,h,s),P)}function Nl(){}function Vh(s,h){var P=di();h=h===void 0?null:h;var F=P.memoizedState;return F!==null&&h!==null&&hu(h,F[1])?F[0]:(P.memoizedState=[s,h],s)}function Bn(s,h){var P=di();h=h===void 0?null:h;var F=P.memoizedState;return F!==null&&h!==null&&hu(h,F[1])?F[0]:(s=s(),P.memoizedState=[s,h],s)}function Np(s,h,P){return(Fi&21)===0?(s.baseState&&(s.baseState=!1,oe=!0),s.memoizedState=P):(Gn(P,h)||(P=Ru(),rn.lanes|=P,mf|=P,s.baseState=!0),h)}function Lp(s,h){var P=Ar;Ar=P!==0&&4>P?P:4,s(!0);var F=fu.transition;fu.transition={};try{s(!1),h()}finally{Ar=P,fu.transition=F}}function Tp(){return di().memoizedState}function L0(s,h,P){var F=Fc(s);if(P={lane:F,action:P,hasEagerState:!1,eagerState:null,next:null},Gh(s))Mp(h,P);else if(P=Vr(s,h,P,F),P!==null){var K=Wo();Rl(P,s,F,K),$o(P,h,F)}}function Rp(s,h,P){var F=Fc(s),K={lane:F,action:P,hasEagerState:!1,eagerState:null,next:null};if(Gh(s))Mp(h,K);else{var ne=s.alternate;if(s.lanes===0&&(ne===null||ne.lanes===0)&&(ne=h.lastRenderedReducer,ne!==null))try{var ge=h.lastRenderedState,Ie=ne(ge,P);if(K.hasEagerState=!0,K.eagerState=Ie,Gn(Ie,ge)){var Be=h.interleaved;Be===null?(K.next=K,Si(h)):(K.next=Be.next,Be.next=K),h.interleaved=K;return}}catch{}finally{}P=Vr(s,h,K,F),P!==null&&(K=Wo(),Rl(P,s,F,K),$o(P,h,F))}}function Gh(s){var h=s.alternate;return s===rn||h!==null&&h===rn}function Mp(s,h){ko=ao=!0;var P=s.pending;P===null?h.next=h:(h.next=P.next,P.next=h),s.pending=h}function $o(s,h,P){if((P&4194240)!==0){var F=h.lanes;F&=s.pendingLanes,P|=F,h.lanes=P,$l(s,P)}}var Cc={readContext:xn,useCallback:Dn,useContext:Dn,useEffect:Dn,useImperativeHandle:Dn,useInsertionEffect:Dn,useLayoutEffect:Dn,useMemo:Dn,useReducer:Dn,useRef:Dn,useState:Dn,useDebugValue:Dn,useDeferredValue:Dn,useTransition:Dn,useMutableSource:Dn,useSyncExternalStore:Dn,useId:Dn,unstable_isNewReconciler:!1},T0={readContext:xn,useCallback:function(s,h){return gn().memoizedState=[s,h===void 0?null:h],s},useContext:xn,useEffect:kc,useImperativeHandle:function(s,h,P){return P=P!=null?P.concat([s]):null,lo(4194308,4,ps.bind(null,h,s),P)},useLayoutEffect:function(s,h){return lo(4194308,4,s,h)},useInsertionEffect:function(s,h){return lo(4,2,s,h)},useMemo:function(s,h){var P=gn();return h=h===void 0?null:h,s=s(),P.memoizedState=[s,h],s},useReducer:function(s,h,P){var F=gn();return h=P!==void 0?P(h):h,F.memoizedState=F.baseState=h,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:h},F.queue=s,s=s.dispatch=L0.bind(null,rn,s),[F.memoizedState,s]},useRef:function(s){var h=gn();return s={current:s},h.memoizedState=s},useState:Go,useDebugValue:Nl,useDeferredValue:function(s){return gn().memoizedState=s},useTransition:function(){var s=Go(!1),h=s[0];return s=Lp.bind(null,s[1]),gn().memoizedState=s,[h,s]},useMutableSource:function(){},useSyncExternalStore:function(s,h,P){var F=rn,K=gn();if(ot){if(P===void 0)throw Error(r(407));P=P()}else{if(P=h(),Va===null)throw Error(r(349));(Fi&30)!==0||rh(F,h,P)}K.memoizedState=P;var ne={value:P,getSnapshot:h};return K.queue=ne,kc(gf.bind(null,F,ne,s),[s]),F.flags|=2048,qa(9,fs.bind(null,F,ne,P,h),void 0,null),P},useId:function(){var s=gn(),h=Va.identifierPrefix;if(ot){var P=ke,F=Ze;P=(F&~(1<<32-mr(F)-1)).toString(32)+P,h=":"+h+"R"+P,P=oo++,0<P&&(h+="H"+P.toString(32)),h+=":"}else P=Ac++,h=":"+h+"r"+P.toString(32)+":";return s.memoizedState=h},unstable_isNewReconciler:!1},pu={readContext:xn,useCallback:Vh,useContext:xn,useEffect:Oc,useImperativeHandle:Cp,useInsertionEffect:vf,useLayoutEffect:Vu,useMemo:Bn,useReducer:Ji,useRef:hs,useState:function(){return Ji(ma)},useDebugValue:Nl,useDeferredValue:function(s){var h=di();return Np(h,Fn.memoizedState,s)},useTransition:function(){var s=Ji(ma)[0],h=di().memoizedState;return[s,h]},useMutableSource:Pc,useSyncExternalStore:Hu,useId:Tp,unstable_isNewReconciler:!1},nh={readContext:xn,useCallback:Vh,useContext:xn,useEffect:Oc,useImperativeHandle:Cp,useInsertionEffect:vf,useLayoutEffect:Vu,useMemo:Bn,useReducer:Fs,useRef:hs,useState:function(){return Fs(ma)},useDebugValue:Nl,useDeferredValue:function(s){var h=di();return Fn===null?h.memoizedState=s:Np(h,Fn.memoizedState,s)},useTransition:function(){var s=Fs(ma)[0],h=di().memoizedState;return[s,h]},useMutableSource:Pc,useSyncExternalStore:Hu,useId:Tp,unstable_isNewReconciler:!1};function Na(s,h){if(s&&s.defaultProps){h=U({},h),s=s.defaultProps;for(var P in s)h[P]===void 0&&(h[P]=s[P]);return h}return h}function Nc(s,h,P,F){h=s.memoizedState,P=P(F,h),P=P==null?h:U({},h,P),s.memoizedState=P,s.lanes===0&&(s.updateQueue.baseState=P)}var Lc={isMounted:function(s){return(s=s._reactInternals)?Qn(s)===s:!1},enqueueSetState:function(s,h,P){s=s._reactInternals;var F=Wo(),K=Fc(s),ne=Wn(F,K);ne.payload=h,P!=null&&(ne.callback=P),h=In(s,ne,K),h!==null&&(Rl(h,s,K,F),ga(h,s,K))},enqueueReplaceState:function(s,h,P){s=s._reactInternals;var F=Wo(),K=Fc(s),ne=Wn(F,K);ne.tag=1,ne.payload=h,P!=null&&(ne.callback=P),h=In(s,ne,K),h!==null&&(Rl(h,s,K,F),ga(h,s,K))},enqueueForceUpdate:function(s,h){s=s._reactInternals;var P=Wo(),F=Fc(s),K=Wn(P,F);K.tag=2,h!=null&&(K.callback=h),h=In(s,K,F),h!==null&&(Rl(h,s,F,P),ga(h,s,F))}};function ih(s,h,P,F,K,ne,ge){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(F,ne,ge):h.prototype&&h.prototype.isPureReactComponent?!Eo(P,F)||!Eo(K,ne):!0}function Ip(s,h,P){var F=!1,K=ls,ne=h.contextType;return typeof ne=="object"&&ne!==null?ne=xn(ne):(K=da(h)?rl:Mi.current,F=h.contextTypes,ne=(F=F!=null)?Pl(s,K):ls),h=new h(P,ne),s.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Lc,s.stateNode=h,h._reactInternals=s,F&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=K,s.__reactInternalMemoizedMaskedChildContext=ne),h}function $h(s,h,P,F){s=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(P,F),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(P,F),h.state!==s&&Lc.enqueueReplaceState(h,h.state,null)}function ah(s,h,P,F){var K=s.stateNode;K.props=P,K.state=s.memoizedState,K.refs={},Ei(s);var ne=h.contextType;typeof ne=="object"&&ne!==null?K.context=xn(ne):(ne=da(h)?rl:Mi.current,K.context=Pl(s,ne)),K.state=s.memoizedState,ne=h.getDerivedStateFromProps,typeof ne=="function"&&(Nc(s,h,ne,P),K.state=s.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof K.getSnapshotBeforeUpdate=="function"||typeof K.UNSAFE_componentWillMount!="function"&&typeof K.componentWillMount!="function"||(h=K.state,typeof K.componentWillMount=="function"&&K.componentWillMount(),typeof K.UNSAFE_componentWillMount=="function"&&K.UNSAFE_componentWillMount(),h!==K.state&&Lc.enqueueReplaceState(K,K.state,null),Ii(s,P,K,F),K.state=s.memoizedState),typeof K.componentDidMount=="function"&&(s.flags|=4194308)}function Gu(s,h){try{var P="",F=h;do P+=re(F),F=F.return;while(F);var K=P}catch(ne){K=`
|
|
31
31
|
Error generating stack: `+ne.message+`
|
|
32
|
-
`+ne.stack}return{value:s,source:h,stack:K,digest:null}}function oh(s,h,P){return{value:s,source:null,stack:P??null,digest:h??null}}function Tc(s,h){try{console.error(h.value)}catch(P){setTimeout(function(){throw P})}}var R0=typeof WeakMap=="function"?WeakMap:Map;function Fp(s,h,P){P=Wn(-1,P),P.tag=3,P.payload={element:null};var F=h.value;return P.callback=function(){Up||(Up=!0,H0=F),Tc(s,h)},P}function p(s,h,P){P=Wn(-1,P),P.tag=3;var F=s.type.getDerivedStateFromError;if(typeof F=="function"){var K=h.value;P.payload=function(){return F(K)},P.callback=function(){Tc(s,h)}}var ne=s.stateNode;return ne!==null&&typeof ne.componentDidCatch=="function"&&(P.callback=function(){Tc(s,h),typeof F!="function"&&(Mc===null?Mc=new Set([this]):Mc.add(this));var ge=h.stack;this.componentDidCatch(h.value,{componentStack:ge!==null?ge:""})}),P}function m(s,h,P){var F=s.pingCache;if(F===null){F=s.pingCache=new R0;var K=new Set;F.set(h,K)}else K=F.get(h),K===void 0&&(K=new Set,F.set(h,K));K.has(P)||(K.add(P),s=q7.bind(null,s,h,P),h.then(s,s))}function I(s){do{var h;if((h=s.tag===13)&&(h=s.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return s;s=s.return}while(s!==null);return null}function $(s,h,P,F,K){return(s.mode&1)===0?(s===h?s.flags|=65536:(s.flags|=128,P.flags|=131072,P.flags&=-52805,P.tag===1&&(P.alternate===null?P.tag=17:(h=Wn(-1,1),h.tag=2,In(P,h,1))),P.lanes|=1),s):(s.flags|=65536,s.lanes=K,s)}var ee=_.ReactCurrentOwner,oe=!1;function Ee(s,h,P,F){h.child=s===null?Ir(h,null,P,F):ni(h,s.child,P,F)}function We(s,h,P,F,K){P=P.render;var ne=h.ref;return _n(h,K),F=nl(s,h,P,F,ne,K),P=so(),s!==null&&!oe?(h.updateQueue=s.updateQueue,h.flags&=-2053,s.lanes&=~K,Ha(s,h,K)):(ot&&P&&it(h),h.flags|=1,Ee(s,h,F,K),h.child)}function rt(s,h,P,F,K){if(s===null){var ne=P.type;return typeof ne=="function"&&!K0(ne)&&ne.defaultProps===void 0&&P.compare===null&&P.defaultProps===void 0?(h.tag=15,h.type=ne,yt(s,h,ne,F,K)):(s=Wp(P.type,null,F,h,h.mode,K),s.ref=h.ref,s.return=h,h.child=s)}if(ne=s.child,(s.lanes&K)===0){var ge=ne.memoizedProps;if(P=P.compare,P=P!==null?P:Eo,P(ge,F)&&s.ref===h.ref)return Ha(s,h,K)}return h.flags|=1,s=Dc(ne,F),s.ref=h.ref,s.return=h,h.child=s}function yt(s,h,P,F,K){if(s!==null){var ne=s.memoizedProps;if(Eo(ne,F)&&s.ref===h.ref)if(oe=!1,h.pendingProps=F=ne,(s.lanes&K)!==0)(s.flags&131072)!==0&&(oe=!0);else return h.lanes=s.lanes,Ha(s,h,K)}return Ot(s,h,P,F,K)}function Bt(s,h,P){var F=h.pendingProps,K=F.children,ne=s!==null?s.memoizedState:null;if(F.mode==="hidden")if((h.mode&1)===0)h.memoizedState={baseLanes:0,cachePool:null,transitions:null},tn(lh,js),js|=P;else{if((P&1073741824)===0)return s=ne!==null?ne.baseLanes|P:P,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:s,cachePool:null,transitions:null},h.updateQueue=null,tn(lh,js),js|=s,null;h.memoizedState={baseLanes:0,cachePool:null,transitions:null},F=ne!==null?ne.baseLanes:P,tn(lh,js),js|=F}else ne!==null?(F=ne.baseLanes|P,h.memoizedState=null):F=P,tn(lh,js),js|=F;return Ee(s,h,K,P),h.child}function pr(s,h){var P=h.ref;(s===null&&P!==null||s!==null&&s.ref!==P)&&(h.flags|=512,h.flags|=2097152)}function Ot(s,h,P,F,K){var ne=da(P)?rl:Mi.current;return ne=Pl(h,ne),_n(h,K),P=nl(s,h,P,F,ne,K),F=so(),s!==null&&!oe?(h.updateQueue=s.updateQueue,h.flags&=-2053,s.lanes&=~K,Ha(s,h,K)):(ot&&F&&it(h),h.flags|=1,Ee(s,h,P,K),h.child)}function Nn(s,h,P,F,K){if(da(P)){var ne=!0;us(h)}else ne=!1;if(_n(h,K),h.stateNode===null)Fr(s,h),Ip(h,P,F),ah(h,P,F,K),F=!0;else if(s===null){var ge=h.stateNode,Ie=h.memoizedProps;ge.props=Ie;var Be=ge.context,tt=P.contextType;typeof tt=="object"&&tt!==null?tt=xn(tt):(tt=da(P)?rl:Mi.current,tt=Pl(h,tt));var gt=P.getDerivedStateFromProps,mt=typeof gt=="function"||typeof ge.getSnapshotBeforeUpdate=="function";mt||typeof ge.UNSAFE_componentWillReceiveProps!="function"&&typeof ge.componentWillReceiveProps!="function"||(Ie!==F||Be!==tt)&&$h(h,ge,F,tt),$n=!1;var dt=h.memoizedState;ge.state=dt,Ii(h,F,ge,K),Be=h.memoizedState,Ie!==F||dt!==Be||ha.current||$n?(typeof gt=="function"&&(Nc(h,P,gt,F),Be=h.memoizedState),(Ie=$n||ih(h,P,Ie,F,dt,Be,tt))?(mt||typeof ge.UNSAFE_componentWillMount!="function"&&typeof ge.componentWillMount!="function"||(typeof ge.componentWillMount=="function"&&ge.componentWillMount(),typeof ge.UNSAFE_componentWillMount=="function"&&ge.UNSAFE_componentWillMount()),typeof ge.componentDidMount=="function"&&(h.flags|=4194308)):(typeof ge.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=F,h.memoizedState=Be),ge.props=F,ge.state=Be,ge.context=tt,F=Ie):(typeof ge.componentDidMount=="function"&&(h.flags|=4194308),F=!1)}else{ge=h.stateNode,pa(s,h),Ie=h.memoizedProps,tt=h.type===h.elementType?Ie:Na(h.type,Ie),ge.props=tt,mt=h.pendingProps,dt=ge.context,Be=P.contextType,typeof Be=="object"&&Be!==null?Be=xn(Be):(Be=da(P)?rl:Mi.current,Be=Pl(h,Be));var Ft=P.getDerivedStateFromProps;(gt=typeof Ft=="function"||typeof ge.getSnapshotBeforeUpdate=="function")||typeof ge.UNSAFE_componentWillReceiveProps!="function"&&typeof ge.componentWillReceiveProps!="function"||(Ie!==mt||dt!==Be)&&$h(h,ge,F,Be),$n=!1,dt=h.memoizedState,ge.state=dt,Ii(h,F,ge,K);var Ht=h.memoizedState;Ie!==mt||dt!==Ht||ha.current||$n?(typeof Ft=="function"&&(Nc(h,P,Ft,F),Ht=h.memoizedState),(tt=$n||ih(h,P,tt,F,dt,Ht,Be)||!1)?(gt||typeof ge.UNSAFE_componentWillUpdate!="function"&&typeof ge.componentWillUpdate!="function"||(typeof ge.componentWillUpdate=="function"&&ge.componentWillUpdate(F,Ht,Be),typeof ge.UNSAFE_componentWillUpdate=="function"&&ge.UNSAFE_componentWillUpdate(F,Ht,Be)),typeof ge.componentDidUpdate=="function"&&(h.flags|=4),typeof ge.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof ge.componentDidUpdate!="function"||Ie===s.memoizedProps&&dt===s.memoizedState||(h.flags|=4),typeof ge.getSnapshotBeforeUpdate!="function"||Ie===s.memoizedProps&&dt===s.memoizedState||(h.flags|=1024),h.memoizedProps=F,h.memoizedState=Ht),ge.props=F,ge.state=Ht,ge.context=Be,F=tt):(typeof ge.componentDidUpdate!="function"||Ie===s.memoizedProps&&dt===s.memoizedState||(h.flags|=4),typeof ge.getSnapshotBeforeUpdate!="function"||Ie===s.memoizedProps&&dt===s.memoizedState||(h.flags|=1024),F=!1)}return dn(s,h,P,F,ne,K)}function dn(s,h,P,F,K,ne){pr(s,h);var ge=(h.flags&128)!==0;if(!F&&!ge)return K&&th(h,P,!1),Ha(s,h,ne);F=h.stateNode,ee.current=h;var Ie=ge&&typeof P.getDerivedStateFromError!="function"?null:F.render();return h.flags|=1,s!==null&&ge?(h.child=ni(h,s.child,null,ne),h.child=ni(h,null,Ie,ne)):Ee(s,h,Ie,ne),h.memoizedState=F.state,K&&th(h,P,!0),h.child}function uo(s){var h=s.stateNode;h.pendingContext?pf(s,h.pendingContext,h.pendingContext!==h.context):h.context&&pf(s,h.context,!1),Vo(s,h.containerInfo)}function il(s,h,P,F,K){return Tt(),_t(K),h.flags|=256,Ee(s,h,P,F),h.child}var et={dehydrated:null,treeContext:null,retryLane:0};function Xe(s){return{baseLanes:s,cachePool:null,transitions:null}}function at(s,h,P){var F=h.pendingProps,K=un.current,ne=!1,ge=(h.flags&128)!==0,Ie;if((Ie=ge)||(Ie=s!==null&&s.memoizedState===null?!1:(K&2)!==0),Ie?(ne=!0,h.flags&=-129):(s===null||s.memoizedState!==null)&&(K|=1),tn(un,K&1),s===null)return It(h),s=h.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((h.mode&1)===0?h.lanes=1:s.data==="$!"?h.lanes=8:h.lanes=1073741824,null):(ge=F.children,s=F.fallback,ne?(F=h.mode,ne=h.child,ge={mode:"hidden",children:ge},(F&1)===0&&ne!==null?(ne.childLanes=0,ne.pendingProps=ge):ne=Yp(ge,F,0,null),s=_f(s,F,P,null),ne.return=h,s.return=h,ne.sibling=s,h.child=ne,h.child.memoizedState=Xe(P),h.memoizedState=et,s):Ct(h,ge));if(K=s.memoizedState,K!==null&&(Ie=K.dehydrated,Ie!==null))return xr(s,h,ge,F,Ie,K,P);if(ne){ne=F.fallback,ge=h.mode,K=s.child,Ie=K.sibling;var Be={mode:"hidden",children:F.children};return(ge&1)===0&&h.child!==K?(F=h.child,F.childLanes=0,F.pendingProps=Be,h.deletions=null):(F=Dc(K,Be),F.subtreeFlags=K.subtreeFlags&14680064),Ie!==null?ne=Dc(Ie,ne):(ne=_f(ne,ge,P,null),ne.flags|=2),ne.return=h,F.return=h,F.sibling=ne,h.child=F,F=ne,ne=h.child,ge=s.child.memoizedState,ge=ge===null?Xe(P):{baseLanes:ge.baseLanes|P,cachePool:null,transitions:ge.transitions},ne.memoizedState=ge,ne.childLanes=s.childLanes&~P,h.memoizedState=et,F}return ne=s.child,s=ne.sibling,F=Dc(ne,{mode:"visible",children:F.children}),(h.mode&1)===0&&(F.lanes=P),F.return=h,F.sibling=null,s!==null&&(P=h.deletions,P===null?(h.deletions=[s],h.flags|=16):P.push(s)),h.child=F,h.memoizedState=null,F}function Ct(s,h){return h=Yp({mode:"visible",children:h},s.mode,0,null),h.return=s,s.child=h}function Qt(s,h,P,F){return F!==null&&_t(F),ni(h,s.child,null,P),s=Ct(h,h.pendingProps.children),s.flags|=2,h.memoizedState=null,s}function xr(s,h,P,F,K,ne,ge){if(P)return h.flags&256?(h.flags&=-257,F=oh(Error(r(422))),Qt(s,h,ge,F)):h.memoizedState!==null?(h.child=s.child,h.flags|=128,null):(ne=F.fallback,K=h.mode,F=Yp({mode:"visible",children:F.children},K,0,null),ne=_f(ne,K,ge,null),ne.flags|=2,F.return=h,ne.return=h,F.sibling=ne,h.child=F,(h.mode&1)!==0&&ni(h,s.child,null,ge),h.child.memoizedState=Xe(ge),h.memoizedState=et,ne);if((h.mode&1)===0)return Qt(s,h,ge,null);if(K.data==="$!"){if(F=K.nextSibling&&K.nextSibling.dataset,F)var Ie=F.dgst;return F=Ie,ne=Error(r(419)),F=oh(ne,F,void 0),Qt(s,h,ge,F)}if(Ie=(ge&s.childLanes)!==0,oe||Ie){if(F=Va,F!==null){switch(ge&-ge){case 4:K=2;break;case 16:K=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:K=32;break;case 536870912:K=268435456;break;default:K=0}K=(K&(F.suspendedLanes|ge))!==0?0:K,K!==0&&K!==ne.retryLane&&(ne.retryLane=K,Gr(s,K),Rl(F,s,K,-1))}return X0(),F=oh(Error(r(421))),Qt(s,h,ge,F)}return K.data==="$?"?(h.flags|=128,h.child=s.child,h=H7.bind(null,s),K._reactRetry=h,null):(s=ne.treeContext,Ue=Ki(K.nextSibling),nt=h,ot=!0,ut=null,s!==null&&(Se[Oe++]=Ze,Se[Oe++]=ke,Se[Oe++]=De,Ze=s.id,ke=s.overflow,De=h),h=Ct(h,F.children),h.flags|=4096,h)}function gr(s,h,P){s.lanes|=h;var F=s.alternate;F!==null&&(F.lanes|=h),Br(s.return,h,P)}function Ur(s,h,P,F,K){var ne=s.memoizedState;ne===null?s.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:F,tail:P,tailMode:K}:(ne.isBackwards=h,ne.rendering=null,ne.renderingStartTime=0,ne.last=F,ne.tail=P,ne.tailMode=K)}function ea(s,h,P){var F=h.pendingProps,K=F.revealOrder,ne=F.tail;if(Ee(s,h,F.children,P),F=un.current,(F&2)!==0)F=F&1|2,h.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=h.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&gr(s,P,h);else if(s.tag===19)gr(s,P,h);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===h)break e;for(;s.sibling===null;){if(s.return===null||s.return===h)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}F&=1}if(tn(un,F),(h.mode&1)===0)h.memoizedState=null;else switch(K){case"forwards":for(P=h.child,K=null;P!==null;)s=P.alternate,s!==null&&io(s)===null&&(K=P),P=P.sibling;P=K,P===null?(K=h.child,h.child=null):(K=P.sibling,P.sibling=null),Ur(h,!1,K,P,ne);break;case"backwards":for(P=null,K=h.child,h.child=null;K!==null;){if(s=K.alternate,s!==null&&io(s)===null){h.child=K;break}s=K.sibling,K.sibling=P,P=K,K=s}Ur(h,!0,P,null,ne);break;case"together":Ur(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function Fr(s,h){(h.mode&1)===0&&s!==null&&(s.alternate=null,h.alternate=null,h.flags|=2)}function Ha(s,h,P){if(s!==null&&(h.dependencies=s.dependencies),mf|=h.lanes,(P&h.childLanes)===0)return null;if(s!==null&&h.child!==s.child)throw Error(r(153));if(h.child!==null){for(s=h.child,P=Dc(s,s.pendingProps),h.child=P,P.return=h;s.sibling!==null;)s=s.sibling,P=P.sibling=Dc(s,s.pendingProps),P.return=h;P.sibling=null}return h.child}function M0(s,h,P){switch(h.tag){case 3:uo(h),Tt();break;case 5:uu(h);break;case 1:da(h.type)&&us(h);break;case 4:Vo(h,h.stateNode.containerInfo);break;case 10:var F=h.type._context,K=h.memoizedProps.value;tn(hi,F._currentValue),F._currentValue=K;break;case 13:if(F=h.memoizedState,F!==null)return F.dehydrated!==null?(tn(un,un.current&1),h.flags|=128,null):(P&h.child.childLanes)!==0?at(s,h,P):(tn(un,un.current&1),s=Ha(s,h,P),s!==null?s.sibling:null);tn(un,un.current&1);break;case 19:if(F=(P&h.childLanes)!==0,(s.flags&128)!==0){if(F)return ea(s,h,P);h.flags|=128}if(K=h.memoizedState,K!==null&&(K.rendering=null,K.tail=null,K.lastEffect=null),tn(un,un.current),F)break;return null;case 22:case 23:return h.lanes=0,Bt(s,h,P)}return Ha(s,h,P)}var qm,I0,Hm,Vm;qm=function(s,h){for(var P=h.child;P!==null;){if(P.tag===5||P.tag===6)s.appendChild(P.stateNode);else if(P.tag!==4&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===h)break;for(;P.sibling===null;){if(P.return===null||P.return===h)return;P=P.return}P.sibling.return=P.return,P=P.sibling}},I0=function(){},Hm=function(s,h,P,F){var K=s.memoizedProps;if(K!==F){s=h.stateNode,ii(Or.current);var ne=null;switch(P){case"input":K=Pe(s,K),F=Pe(s,F),ne=[];break;case"select":K=U({},K,{value:void 0}),F=U({},F,{value:void 0}),ne=[];break;case"textarea":K=pe(s,K),F=pe(s,F),ne=[];break;default:typeof K.onClick!="function"&&typeof F.onClick=="function"&&(s.onclick=Rs)}$e(P,F);var ge;P=null;for(tt in K)if(!F.hasOwnProperty(tt)&&K.hasOwnProperty(tt)&&K[tt]!=null)if(tt==="style"){var Ie=K[tt];for(ge in Ie)Ie.hasOwnProperty(ge)&&(P||(P={}),P[ge]="")}else tt!=="dangerouslySetInnerHTML"&&tt!=="children"&&tt!=="suppressContentEditableWarning"&&tt!=="suppressHydrationWarning"&&tt!=="autoFocus"&&(i.hasOwnProperty(tt)?ne||(ne=[]):(ne=ne||[]).push(tt,null));for(tt in F){var Be=F[tt];if(Ie=K?.[tt],F.hasOwnProperty(tt)&&Be!==Ie&&(Be!=null||Ie!=null))if(tt==="style")if(Ie){for(ge in Ie)!Ie.hasOwnProperty(ge)||Be&&Be.hasOwnProperty(ge)||(P||(P={}),P[ge]="");for(ge in Be)Be.hasOwnProperty(ge)&&Ie[ge]!==Be[ge]&&(P||(P={}),P[ge]=Be[ge])}else P||(ne||(ne=[]),ne.push(tt,P)),P=Be;else tt==="dangerouslySetInnerHTML"?(Be=Be?Be.__html:void 0,Ie=Ie?Ie.__html:void 0,Be!=null&&Ie!==Be&&(ne=ne||[]).push(tt,Be)):tt==="children"?typeof Be!="string"&&typeof Be!="number"||(ne=ne||[]).push(tt,""+Be):tt!=="suppressContentEditableWarning"&&tt!=="suppressHydrationWarning"&&(i.hasOwnProperty(tt)?(Be!=null&&tt==="onScroll"&&sn("scroll",s),ne||Ie===Be||(ne=[])):(ne=ne||[]).push(tt,Be))}P&&(ne=ne||[]).push("style",P);var tt=ne;(h.updateQueue=tt)&&(h.flags|=4)}},Vm=function(s,h,P,F){P!==F&&(h.flags|=4)};function Wh(s,h){if(!ot)switch(s.tailMode){case"hidden":h=s.tail;for(var P=null;h!==null;)h.alternate!==null&&(P=h),h=h.sibling;P===null?s.tail=null:P.sibling=null;break;case"collapsed":P=s.tail;for(var F=null;P!==null;)P.alternate!==null&&(F=P),P=P.sibling;F===null?h||s.tail===null?s.tail=null:s.tail.sibling=null:F.sibling=null}}function Oo(s){var h=s.alternate!==null&&s.alternate.child===s.child,P=0,F=0;if(h)for(var K=s.child;K!==null;)P|=K.lanes|K.childLanes,F|=K.subtreeFlags&14680064,F|=K.flags&14680064,K.return=s,K=K.sibling;else for(K=s.child;K!==null;)P|=K.lanes|K.childLanes,F|=K.subtreeFlags,F|=K.flags,K.return=s,K=K.sibling;return s.subtreeFlags|=F,s.childLanes=P,h}function T7(s,h,P){var F=h.pendingProps;switch(Ye(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oo(h),null;case 1:return da(h.type)&&lu(),Oo(h),null;case 3:return F=h.stateNode,ln(),Yr(ha),Yr(Mi),va(),F.pendingContext&&(F.context=F.pendingContext,F.pendingContext=null),(s===null||s.child===null)&&(Rn(h)?h.flags|=4:s===null||s.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,ut!==null&&($0(ut),ut=null))),I0(s,h),Oo(h),null;case 5:Is(h);var K=ii(Cn.current);if(P=h.type,s!==null&&h.stateNode!=null)Hm(s,h,P,F,K),s.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!F){if(h.stateNode===null)throw Error(r(166));return Oo(h),null}if(s=ii(Or.current),Rn(h)){F=h.stateNode,P=h.type;var ne=h.memoizedProps;switch(F[Ao]=h,F[ou]=ne,s=(h.mode&1)!==0,P){case"dialog":sn("cancel",F),sn("close",F);break;case"iframe":case"object":case"embed":sn("load",F);break;case"video":case"audio":for(K=0;K<Ho.length;K++)sn(Ho[K],F);break;case"source":sn("error",F);break;case"img":case"image":case"link":sn("error",F),sn("load",F);break;case"details":sn("toggle",F);break;case"input":de(F,ne),sn("invalid",F);break;case"select":F._wrapperState={wasMultiple:!!ne.multiple},sn("invalid",F);break;case"textarea":Ce(F,ne),sn("invalid",F)}$e(P,ne),K=null;for(var ge in ne)if(ne.hasOwnProperty(ge)){var Ie=ne[ge];ge==="children"?typeof Ie=="string"?F.textContent!==Ie&&(ne.suppressHydrationWarning!==!0&&Bu(F.textContent,Ie,s),K=["children",Ie]):typeof Ie=="number"&&F.textContent!==""+Ie&&(ne.suppressHydrationWarning!==!0&&Bu(F.textContent,Ie,s),K=["children",""+Ie]):i.hasOwnProperty(ge)&&Ie!=null&&ge==="onScroll"&&sn("scroll",F)}switch(P){case"input":ye(F),be(F,ne,!0);break;case"textarea":ye(F),He(F);break;case"select":case"option":break;default:typeof ne.onClick=="function"&&(F.onclick=Rs)}F=K,h.updateQueue=F,F!==null&&(h.flags|=4)}else{ge=K.nodeType===9?K:K.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=st(P)),s==="http://www.w3.org/1999/xhtml"?P==="script"?(s=ge.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof F.is=="string"?s=ge.createElement(P,{is:F.is}):(s=ge.createElement(P),P==="select"&&(ge=s,F.multiple?ge.multiple=!0:F.size&&(ge.size=F.size))):s=ge.createElementNS(s,P),s[Ao]=h,s[ou]=F,qm(s,h,!1,!1),h.stateNode=s;e:{switch(ge=ze(P,F),P){case"dialog":sn("cancel",s),sn("close",s),K=F;break;case"iframe":case"object":case"embed":sn("load",s),K=F;break;case"video":case"audio":for(K=0;K<Ho.length;K++)sn(Ho[K],s);K=F;break;case"source":sn("error",s),K=F;break;case"img":case"image":case"link":sn("error",s),sn("load",s),K=F;break;case"details":sn("toggle",s),K=F;break;case"input":de(s,F),K=Pe(s,F),sn("invalid",s);break;case"option":K=F;break;case"select":s._wrapperState={wasMultiple:!!F.multiple},K=U({},F,{value:void 0}),sn("invalid",s);break;case"textarea":Ce(s,F),K=pe(s,F),sn("invalid",s);break;default:K=F}$e(P,K),Ie=K;for(ne in Ie)if(Ie.hasOwnProperty(ne)){var Be=Ie[ne];ne==="style"?Pt(s,Be):ne==="dangerouslySetInnerHTML"?(Be=Be?Be.__html:void 0,Be!=null&&bt(s,Be)):ne==="children"?typeof Be=="string"?(P!=="textarea"||Be!=="")&&ht(s,Be):typeof Be=="number"&&ht(s,""+Be):ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&ne!=="autoFocus"&&(i.hasOwnProperty(ne)?Be!=null&&ne==="onScroll"&&sn("scroll",s):Be!=null&&w(s,ne,Be,ge))}switch(P){case"input":ye(s),be(s,F,!1);break;case"textarea":ye(s),He(s);break;case"option":F.value!=null&&s.setAttribute("value",""+se(F.value));break;case"select":s.multiple=!!F.multiple,ne=F.value,ne!=null?Le(s,!!F.multiple,ne,!1):F.defaultValue!=null&&Le(s,!!F.multiple,F.defaultValue,!0);break;default:typeof K.onClick=="function"&&(s.onclick=Rs)}switch(P){case"button":case"input":case"select":case"textarea":F=!!F.autoFocus;break e;case"img":F=!0;break e;default:F=!1}}F&&(h.flags|=4)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return Oo(h),null;case 6:if(s&&h.stateNode!=null)Vm(s,h,s.memoizedProps,F);else{if(typeof F!="string"&&h.stateNode===null)throw Error(r(166));if(P=ii(Cn.current),ii(Or.current),Rn(h)){if(F=h.stateNode,P=h.memoizedProps,F[Ao]=h,(ne=F.nodeValue!==P)&&(s=nt,s!==null))switch(s.tag){case 3:Bu(F.nodeValue,P,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Bu(F.nodeValue,P,(s.mode&1)!==0)}ne&&(h.flags|=4)}else F=(P.nodeType===9?P:P.ownerDocument).createTextNode(F),F[Ao]=h,h.stateNode=F}return Oo(h),null;case 13:if(Yr(un),F=h.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(ot&&Ue!==null&&(h.mode&1)!==0&&(h.flags&128)===0)fr(),Tt(),h.flags|=98560,ne=!1;else if(ne=Rn(h),F!==null&&F.dehydrated!==null){if(s===null){if(!ne)throw Error(r(318));if(ne=h.memoizedState,ne=ne!==null?ne.dehydrated:null,!ne)throw Error(r(317));ne[Ao]=h}else Tt(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;Oo(h),ne=!1}else ut!==null&&($0(ut),ut=null),ne=!0;if(!ne)return h.flags&65536?h:null}return(h.flags&128)!==0?(h.lanes=P,h):(F=F!==null,F!==(s!==null&&s.memoizedState!==null)&&F&&(h.child.flags|=8192,(h.mode&1)!==0&&(s===null||(un.current&1)!==0?La===0&&(La=3):X0())),h.updateQueue!==null&&(h.flags|=4),Oo(h),null);case 4:return ln(),I0(s,h),s===null&&Ts(h.stateNode.containerInfo),Oo(h),null;case 10:return wn(h.type._context),Oo(h),null;case 17:return da(h.type)&&lu(),Oo(h),null;case 19:if(Yr(un),ne=h.memoizedState,ne===null)return Oo(h),null;if(F=(h.flags&128)!==0,ge=ne.rendering,ge===null)if(F)Wh(ne,!1);else{if(La!==0||s!==null&&(s.flags&128)!==0)for(s=h.child;s!==null;){if(ge=io(s),ge!==null){for(h.flags|=128,Wh(ne,!1),F=ge.updateQueue,F!==null&&(h.updateQueue=F,h.flags|=4),h.subtreeFlags=0,F=P,P=h.child;P!==null;)ne=P,s=F,ne.flags&=14680066,ge=ne.alternate,ge===null?(ne.childLanes=0,ne.lanes=s,ne.child=null,ne.subtreeFlags=0,ne.memoizedProps=null,ne.memoizedState=null,ne.updateQueue=null,ne.dependencies=null,ne.stateNode=null):(ne.childLanes=ge.childLanes,ne.lanes=ge.lanes,ne.child=ge.child,ne.subtreeFlags=0,ne.deletions=null,ne.memoizedProps=ge.memoizedProps,ne.memoizedState=ge.memoizedState,ne.updateQueue=ge.updateQueue,ne.type=ge.type,s=ge.dependencies,ne.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),P=P.sibling;return tn(un,un.current&1|2),h.child}s=s.sibling}ne.tail!==null&&bn()>uh&&(h.flags|=128,F=!0,Wh(ne,!1),h.lanes=4194304)}else{if(!F)if(s=io(ge),s!==null){if(h.flags|=128,F=!0,P=s.updateQueue,P!==null&&(h.updateQueue=P,h.flags|=4),Wh(ne,!0),ne.tail===null&&ne.tailMode==="hidden"&&!ge.alternate&&!ot)return Oo(h),null}else 2*bn()-ne.renderingStartTime>uh&&P!==1073741824&&(h.flags|=128,F=!0,Wh(ne,!1),h.lanes=4194304);ne.isBackwards?(ge.sibling=h.child,h.child=ge):(P=ne.last,P!==null?P.sibling=ge:h.child=ge,ne.last=ge)}return ne.tail!==null?(h=ne.tail,ne.rendering=h,ne.tail=h.sibling,ne.renderingStartTime=bn(),h.sibling=null,P=un.current,tn(un,F?P&1|2:P&1),h):(Oo(h),null);case 22:case 23:return Y0(),F=h.memoizedState!==null,s!==null&&s.memoizedState!==null!==F&&(h.flags|=8192),F&&(h.mode&1)!==0?(js&1073741824)!==0&&(Oo(h),h.subtreeFlags&6&&(h.flags|=8192)):Oo(h),null;case 24:return null;case 25:return null}throw Error(r(156,h.tag))}function R7(s,h){switch(Ye(h),h.tag){case 1:return da(h.type)&&lu(),s=h.flags,s&65536?(h.flags=s&-65537|128,h):null;case 3:return ln(),Yr(ha),Yr(Mi),va(),s=h.flags,(s&65536)!==0&&(s&128)===0?(h.flags=s&-65537|128,h):null;case 5:return Is(h),null;case 13:if(Yr(un),s=h.memoizedState,s!==null&&s.dehydrated!==null){if(h.alternate===null)throw Error(r(340));Tt()}return s=h.flags,s&65536?(h.flags=s&-65537|128,h):null;case 19:return Yr(un),null;case 4:return ln(),null;case 10:return wn(h.type._context),null;case 22:case 23:return Y0(),null;case 24:return null;default:return null}}var jp=!1,Co=!1,M7=typeof WeakSet=="function"?WeakSet:Set,zt=null;function sh(s,h){var P=s.ref;if(P!==null)if(typeof P=="function")try{P(null)}catch(F){ji(s,h,F)}else P.current=null}function F0(s,h,P){try{P()}catch(F){ji(s,h,F)}}var Gm=!1;function I7(s,h){if(zu=Xl,s=ui(),yl(s)){if("selectionStart"in s)var P={start:s.selectionStart,end:s.selectionEnd};else e:{P=(P=s.ownerDocument)&&P.defaultView||window;var F=P.getSelection&&P.getSelection();if(F&&F.rangeCount!==0){P=F.anchorNode;var K=F.anchorOffset,ne=F.focusNode;F=F.focusOffset;try{P.nodeType,ne.nodeType}catch{P=null;break e}var ge=0,Ie=-1,Be=-1,tt=0,gt=0,mt=s,dt=null;t:for(;;){for(var Ft;mt!==P||K!==0&&mt.nodeType!==3||(Ie=ge+K),mt!==ne||F!==0&&mt.nodeType!==3||(Be=ge+F),mt.nodeType===3&&(ge+=mt.nodeValue.length),(Ft=mt.firstChild)!==null;)dt=mt,mt=Ft;for(;;){if(mt===s)break t;if(dt===P&&++tt===K&&(Ie=ge),dt===ne&&++gt===F&&(Be=ge),(Ft=mt.nextSibling)!==null)break;mt=dt,dt=mt.parentNode}mt=Ft}P=Ie===-1||Be===-1?null:{start:Ie,end:Be}}else P=null}P=P||{start:0,end:0}}else P=null;for(Al={focusedElem:s,selectionRange:P},Xl=!1,zt=h;zt!==null;)if(h=zt,s=h.child,(h.subtreeFlags&1028)!==0&&s!==null)s.return=h,zt=s;else for(;zt!==null;){h=zt;try{var Ht=h.alternate;if((h.flags&1024)!==0)switch(h.tag){case 0:case 11:case 15:break;case 1:if(Ht!==null){var Gt=Ht.memoizedProps,ta=Ht.memoizedState,Qe=h.stateNode,Ve=Qe.getSnapshotBeforeUpdate(h.elementType===h.type?Gt:Na(h.type,Gt),ta);Qe.__reactInternalSnapshotBeforeUpdate=Ve}break;case 3:var Je=h.stateNode.containerInfo;Je.nodeType===1?Je.textContent="":Je.nodeType===9&&Je.documentElement&&Je.removeChild(Je.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(wt){ji(h,h.return,wt)}if(s=h.sibling,s!==null){s.return=h.return,zt=s;break}zt=h.return}return Ht=Gm,Gm=!1,Ht}function Yh(s,h,P){var F=h.updateQueue;if(F=F!==null?F.lastEffect:null,F!==null){var K=F=F.next;do{if((K.tag&s)===s){var ne=K.destroy;K.destroy=void 0,ne!==void 0&&F0(h,P,ne)}K=K.next}while(K!==F)}}function Dp(s,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var P=h=h.next;do{if((P.tag&s)===s){var F=P.create;P.destroy=F()}P=P.next}while(P!==h)}}function j0(s){var h=s.ref;if(h!==null){var P=s.stateNode;switch(s.tag){case 5:s=P;break;default:s=P}typeof h=="function"?h(s):h.current=s}}function $m(s){var h=s.alternate;h!==null&&(s.alternate=null,$m(h)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(h=s.stateNode,h!==null&&(delete h[Ao],delete h[ou],delete h[Ca],delete h[Jf],delete h[eh])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Wm(s){return s.tag===5||s.tag===3||s.tag===4}function Ym(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Wm(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function D0(s,h,P){var F=s.tag;if(F===5||F===6)s=s.stateNode,h?P.nodeType===8?P.parentNode.insertBefore(s,h):P.insertBefore(s,h):(P.nodeType===8?(h=P.parentNode,h.insertBefore(s,P)):(h=P,h.appendChild(s)),P=P._reactRootContainer,P!=null||h.onclick!==null||(h.onclick=Rs));else if(F!==4&&(s=s.child,s!==null))for(D0(s,h,P),s=s.sibling;s!==null;)D0(s,h,P),s=s.sibling}function B0(s,h,P){var F=s.tag;if(F===5||F===6)s=s.stateNode,h?P.insertBefore(s,h):P.appendChild(s);else if(F!==4&&(s=s.child,s!==null))for(B0(s,h,P),s=s.sibling;s!==null;)B0(s,h,P),s=s.sibling}var co=null,Ll=!1;function Rc(s,h,P){for(P=P.child;P!==null;)Xm(s,h,P),P=P.sibling}function Xm(s,h,P){if(oi&&typeof oi.onCommitFiberUnmount=="function")try{oi.onCommitFiberUnmount(po,P)}catch{}switch(P.tag){case 5:Co||sh(P,h);case 6:var F=co,K=Ll;co=null,Rc(s,h,P),co=F,Ll=K,co!==null&&(Ll?(s=co,P=P.stateNode,s.nodeType===8?s.parentNode.removeChild(P):s.removeChild(P)):co.removeChild(P.stateNode));break;case 18:co!==null&&(Ll?(s=co,P=P.stateNode,s.nodeType===8?Sc(s.parentNode,P):s.nodeType===1&&Sc(s,P),vi(s)):Sc(co,P.stateNode));break;case 4:F=co,K=Ll,co=P.stateNode.containerInfo,Ll=!0,Rc(s,h,P),co=F,Ll=K;break;case 0:case 11:case 14:case 15:if(!Co&&(F=P.updateQueue,F!==null&&(F=F.lastEffect,F!==null))){K=F=F.next;do{var ne=K,ge=ne.destroy;ne=ne.tag,ge!==void 0&&((ne&2)!==0||(ne&4)!==0)&&F0(P,h,ge),K=K.next}while(K!==F)}Rc(s,h,P);break;case 1:if(!Co&&(sh(P,h),F=P.stateNode,typeof F.componentWillUnmount=="function"))try{F.props=P.memoizedProps,F.state=P.memoizedState,F.componentWillUnmount()}catch(Ie){ji(P,h,Ie)}Rc(s,h,P);break;case 21:Rc(s,h,P);break;case 22:P.mode&1?(Co=(F=Co)||P.memoizedState!==null,Rc(s,h,P),Co=F):Rc(s,h,P);break;default:Rc(s,h,P)}}function Km(s){var h=s.updateQueue;if(h!==null){s.updateQueue=null;var P=s.stateNode;P===null&&(P=s.stateNode=new M7),h.forEach(function(F){var K=V7.bind(null,s,F);P.has(F)||(P.add(F),F.then(K,K))})}}function Tl(s,h){var P=h.deletions;if(P!==null)for(var F=0;F<P.length;F++){var K=P[F];try{var ne=s,ge=h,Ie=ge;e:for(;Ie!==null;){switch(Ie.tag){case 5:co=Ie.stateNode,Ll=!1;break e;case 3:co=Ie.stateNode.containerInfo,Ll=!0;break e;case 4:co=Ie.stateNode.containerInfo,Ll=!0;break e}Ie=Ie.return}if(co===null)throw Error(r(160));Xm(ne,ge,K),co=null,Ll=!1;var Be=K.alternate;Be!==null&&(Be.return=null),K.return=null}catch(tt){ji(K,h,tt)}}if(h.subtreeFlags&12854)for(h=h.child;h!==null;)Zm(h,s),h=h.sibling}function Zm(s,h){var P=s.alternate,F=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Tl(h,s),gu(s),F&4){try{Yh(3,s,s.return),Dp(3,s)}catch(Gt){ji(s,s.return,Gt)}try{Yh(5,s,s.return)}catch(Gt){ji(s,s.return,Gt)}}break;case 1:Tl(h,s),gu(s),F&512&&P!==null&&sh(P,P.return);break;case 5:if(Tl(h,s),gu(s),F&512&&P!==null&&sh(P,P.return),s.flags&32){var K=s.stateNode;try{ht(K,"")}catch(Gt){ji(s,s.return,Gt)}}if(F&4&&(K=s.stateNode,K!=null)){var ne=s.memoizedProps,ge=P!==null?P.memoizedProps:ne,Ie=s.type,Be=s.updateQueue;if(s.updateQueue=null,Be!==null)try{Ie==="input"&&ne.type==="radio"&&ne.name!=null&&Te(K,ne),ze(Ie,ge);var tt=ze(Ie,ne);for(ge=0;ge<Be.length;ge+=2){var gt=Be[ge],mt=Be[ge+1];gt==="style"?Pt(K,mt):gt==="dangerouslySetInnerHTML"?bt(K,mt):gt==="children"?ht(K,mt):w(K,gt,mt,tt)}switch(Ie){case"input":Ae(K,ne);break;case"textarea":je(K,ne);break;case"select":var dt=K._wrapperState.wasMultiple;K._wrapperState.wasMultiple=!!ne.multiple;var Ft=ne.value;Ft!=null?Le(K,!!ne.multiple,Ft,!1):dt!==!!ne.multiple&&(ne.defaultValue!=null?Le(K,!!ne.multiple,ne.defaultValue,!0):Le(K,!!ne.multiple,ne.multiple?[]:"",!1))}K[ou]=ne}catch(Gt){ji(s,s.return,Gt)}}break;case 6:if(Tl(h,s),gu(s),F&4){if(s.stateNode===null)throw Error(r(162));K=s.stateNode,ne=s.memoizedProps;try{K.nodeValue=ne}catch(Gt){ji(s,s.return,Gt)}}break;case 3:if(Tl(h,s),gu(s),F&4&&P!==null&&P.memoizedState.isDehydrated)try{vi(h.containerInfo)}catch(Gt){ji(s,s.return,Gt)}break;case 4:Tl(h,s),gu(s);break;case 13:Tl(h,s),gu(s),K=s.child,K.flags&8192&&(ne=K.memoizedState!==null,K.stateNode.isHidden=ne,!ne||K.alternate!==null&&K.alternate.memoizedState!==null||(q0=bn())),F&4&&Km(s);break;case 22:if(gt=P!==null&&P.memoizedState!==null,s.mode&1?(Co=(tt=Co)||gt,Tl(h,s),Co=tt):Tl(h,s),gu(s),F&8192){if(tt=s.memoizedState!==null,(s.stateNode.isHidden=tt)&&!gt&&(s.mode&1)!==0)for(zt=s,gt=s.child;gt!==null;){for(mt=zt=gt;zt!==null;){switch(dt=zt,Ft=dt.child,dt.tag){case 0:case 11:case 14:case 15:Yh(4,dt,dt.return);break;case 1:sh(dt,dt.return);var Ht=dt.stateNode;if(typeof Ht.componentWillUnmount=="function"){F=dt,P=dt.return;try{h=F,Ht.props=h.memoizedProps,Ht.state=h.memoizedState,Ht.componentWillUnmount()}catch(Gt){ji(F,P,Gt)}}break;case 5:sh(dt,dt.return);break;case 22:if(dt.memoizedState!==null){ey(mt);continue}}Ft!==null?(Ft.return=dt,zt=Ft):ey(mt)}gt=gt.sibling}e:for(gt=null,mt=s;;){if(mt.tag===5){if(gt===null){gt=mt;try{K=mt.stateNode,tt?(ne=K.style,typeof ne.setProperty=="function"?ne.setProperty("display","none","important"):ne.display="none"):(Ie=mt.stateNode,Be=mt.memoizedProps.style,ge=Be!=null&&Be.hasOwnProperty("display")?Be.display:null,Ie.style.display=cr("display",ge))}catch(Gt){ji(s,s.return,Gt)}}}else if(mt.tag===6){if(gt===null)try{mt.stateNode.nodeValue=tt?"":mt.memoizedProps}catch(Gt){ji(s,s.return,Gt)}}else if((mt.tag!==22&&mt.tag!==23||mt.memoizedState===null||mt===s)&&mt.child!==null){mt.child.return=mt,mt=mt.child;continue}if(mt===s)break e;for(;mt.sibling===null;){if(mt.return===null||mt.return===s)break e;gt===mt&&(gt=null),mt=mt.return}gt===mt&&(gt=null),mt.sibling.return=mt.return,mt=mt.sibling}}break;case 19:Tl(h,s),gu(s),F&4&&Km(s);break;case 21:break;default:Tl(h,s),gu(s)}}function gu(s){var h=s.flags;if(h&2){try{e:{for(var P=s.return;P!==null;){if(Wm(P)){var F=P;break e}P=P.return}throw Error(r(160))}switch(F.tag){case 5:var K=F.stateNode;F.flags&32&&(ht(K,""),F.flags&=-33);var ne=Ym(s);B0(s,ne,K);break;case 3:case 4:var ge=F.stateNode.containerInfo,Ie=Ym(s);D0(s,Ie,ge);break;default:throw Error(r(161))}}catch(Be){ji(s,s.return,Be)}s.flags&=-3}h&4096&&(s.flags&=-4097)}function F7(s,h,P){zt=s,Qm(s)}function Qm(s,h,P){for(var F=(s.mode&1)!==0;zt!==null;){var K=zt,ne=K.child;if(K.tag===22&&F){var ge=K.memoizedState!==null||jp;if(!ge){var Ie=K.alternate,Be=Ie!==null&&Ie.memoizedState!==null||Co;Ie=jp;var tt=Co;if(jp=ge,(Co=Be)&&!tt)for(zt=K;zt!==null;)ge=zt,Be=ge.child,ge.tag===22&&ge.memoizedState!==null?ty(K):Be!==null?(Be.return=ge,zt=Be):ty(K);for(;ne!==null;)zt=ne,Qm(ne),ne=ne.sibling;zt=K,jp=Ie,Co=tt}Jm(s)}else(K.subtreeFlags&8772)!==0&&ne!==null?(ne.return=K,zt=ne):Jm(s)}}function Jm(s){for(;zt!==null;){var h=zt;if((h.flags&8772)!==0){var P=h.alternate;try{if((h.flags&8772)!==0)switch(h.tag){case 0:case 11:case 15:Co||Dp(5,h);break;case 1:var F=h.stateNode;if(h.flags&4&&!Co)if(P===null)F.componentDidMount();else{var K=h.elementType===h.type?P.memoizedProps:Na(h.type,P.memoizedProps);F.componentDidUpdate(K,P.memoizedState,F.__reactInternalSnapshotBeforeUpdate)}var ne=h.updateQueue;ne!==null&&zr(h,ne,F);break;case 3:var ge=h.updateQueue;if(ge!==null){if(P=null,h.child!==null)switch(h.child.tag){case 5:P=h.child.stateNode;break;case 1:P=h.child.stateNode}zr(h,ge,P)}break;case 5:var Ie=h.stateNode;if(P===null&&h.flags&4){P=Ie;var Be=h.memoizedProps;switch(h.type){case"button":case"input":case"select":case"textarea":Be.autoFocus&&P.focus();break;case"img":Be.src&&(P.src=Be.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(h.memoizedState===null){var tt=h.alternate;if(tt!==null){var gt=tt.memoizedState;if(gt!==null){var mt=gt.dehydrated;mt!==null&&vi(mt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Co||h.flags&512&&j0(h)}catch(dt){ji(h,h.return,dt)}}if(h===s){zt=null;break}if(P=h.sibling,P!==null){P.return=h.return,zt=P;break}zt=h.return}}function ey(s){for(;zt!==null;){var h=zt;if(h===s){zt=null;break}var P=h.sibling;if(P!==null){P.return=h.return,zt=P;break}zt=h.return}}function ty(s){for(;zt!==null;){var h=zt;try{switch(h.tag){case 0:case 11:case 15:var P=h.return;try{Dp(4,h)}catch(Be){ji(h,P,Be)}break;case 1:var F=h.stateNode;if(typeof F.componentDidMount=="function"){var K=h.return;try{F.componentDidMount()}catch(Be){ji(h,K,Be)}}var ne=h.return;try{j0(h)}catch(Be){ji(h,ne,Be)}break;case 5:var ge=h.return;try{j0(h)}catch(Be){ji(h,ge,Be)}}}catch(Be){ji(h,h.return,Be)}if(h===s){zt=null;break}var Ie=h.sibling;if(Ie!==null){Ie.return=h.return,zt=Ie;break}zt=h.return}}var j7=Math.ceil,Bp=_.ReactCurrentDispatcher,z0=_.ReactCurrentOwner,al=_.ReactCurrentBatchConfig,nn=0,Va=null,ya=null,fo=0,js=0,lh=Po(0),La=0,Xh=null,mf=0,zp=0,U0=0,Kh=null,gs=null,q0=0,uh=1/0,$u=null,Up=!1,H0=null,Mc=null,qp=!1,Ic=null,Hp=0,Zh=0,V0=null,Vp=-1,Gp=0;function Wo(){return(nn&6)!==0?bn():Vp!==-1?Vp:Vp=bn()}function Fc(s){return(s.mode&1)===0?1:(nn&2)!==0&&fo!==0?fo&-fo:Mn.transition!==null?(Gp===0&&(Gp=Ru()),Gp):(s=Ar,s!==0||(s=window.event,s=s===void 0?16:dl(s.type)),s)}function Rl(s,h,P,F){if(50<Zh)throw Zh=0,V0=null,Error(r(185));hl(s,P,F),((nn&2)===0||s!==Va)&&(s===Va&&((nn&2)===0&&(zp|=P),La===4&&jc(s,fo)),vs(s,F),P===1&&nn===0&&(h.mode&1)===0&&(uh=bn()+500,kl&&ie()))}function vs(s,h){var P=s.callbackNode;qn(s,h);var F=Vi(s,s===Va?fo:0);if(F===0)P!==null&&Ko(P),s.callbackNode=null,s.callbackPriority=0;else if(h=F&-F,s.callbackPriority!==h){if(P!=null&&Ko(P),h===1)s.tag===0?te(ny.bind(null,s)):B(ny.bind(null,s)),Zf(function(){(nn&6)===0&&ie()}),P=null;else{switch(go(F)){case 1:P=Zo;break;case 4:P=Sa;break;case 16:P=Qo;break;case 536870912:P=$s;break;default:P=Qo}P=fy(P,ry.bind(null,s))}s.callbackPriority=h,s.callbackNode=P}}function ry(s,h){if(Vp=-1,Gp=0,(nn&6)!==0)throw Error(r(327));var P=s.callbackNode;if(ch()&&s.callbackNode!==P)return null;var F=Vi(s,s===Va?fo:0);if(F===0)return null;if((F&30)!==0||(F&s.expiredLanes)!==0||h)h=$p(s,F);else{h=F;var K=nn;nn|=2;var ne=ay();(Va!==s||fo!==h)&&($u=null,uh=bn()+500,bf(s,h));do try{z7();break}catch(Ie){iy(s,Ie)}while(!0);Dr(),Bp.current=ne,nn=K,ya!==null?h=0:(Va=null,fo=0,h=La)}if(h!==0){if(h===2&&(K=es(s),K!==0&&(F=K,h=G0(s,K))),h===1)throw P=Xh,bf(s,0),jc(s,F),vs(s,bn()),P;if(h===6)jc(s,F);else{if(K=s.current.alternate,(F&30)===0&&!D7(K)&&(h=$p(s,F),h===2&&(ne=es(s),ne!==0&&(F=ne,h=G0(s,ne))),h===1))throw P=Xh,bf(s,0),jc(s,F),vs(s,bn()),P;switch(s.finishedWork=K,s.finishedLanes=F,h){case 0:case 1:throw Error(r(345));case 2:wf(s,gs,$u);break;case 3:if(jc(s,F),(F&130023424)===F&&(h=q0+500-bn(),10<h)){if(Vi(s,0)!==0)break;if(K=s.suspendedLanes,(K&F)!==F){Wo(),s.pingedLanes|=s.suspendedLanes&K;break}s.timeoutHandle=no(wf.bind(null,s,gs,$u),h);break}wf(s,gs,$u);break;case 4:if(jc(s,F),(F&4194240)===F)break;for(h=s.eventTimes,K=-1;0<F;){var ge=31-mr(F);ne=1<<ge,ge=h[ge],ge>K&&(K=ge),F&=~ne}if(F=K,F=bn()-F,F=(120>F?120:480>F?480:1080>F?1080:1920>F?1920:3e3>F?3e3:4320>F?4320:1960*j7(F/1960))-F,10<F){s.timeoutHandle=no(wf.bind(null,s,gs,$u),F);break}wf(s,gs,$u);break;case 5:wf(s,gs,$u);break;default:throw Error(r(329))}}}return vs(s,bn()),s.callbackNode===P?ry.bind(null,s):null}function G0(s,h){var P=Kh;return s.current.memoizedState.isDehydrated&&(bf(s,h).flags|=256),s=$p(s,h),s!==2&&(h=gs,gs=P,h!==null&&$0(h)),s}function $0(s){gs===null?gs=s:gs.push.apply(gs,s)}function D7(s){for(var h=s;;){if(h.flags&16384){var P=h.updateQueue;if(P!==null&&(P=P.stores,P!==null))for(var F=0;F<P.length;F++){var K=P[F],ne=K.getSnapshot;K=K.value;try{if(!Gn(ne(),K))return!1}catch{return!1}}}if(P=h.child,h.subtreeFlags&16384&&P!==null)P.return=h,h=P;else{if(h===s)break;for(;h.sibling===null;){if(h.return===null||h.return===s)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function jc(s,h){for(h&=~U0,h&=~zp,s.suspendedLanes|=h,s.pingedLanes&=~h,s=s.expirationTimes;0<h;){var P=31-mr(h),F=1<<P;s[P]=-1,h&=~F}}function ny(s){if((nn&6)!==0)throw Error(r(327));ch();var h=Vi(s,0);if((h&1)===0)return vs(s,bn()),null;var P=$p(s,h);if(s.tag!==0&&P===2){var F=es(s);F!==0&&(h=F,P=G0(s,F))}if(P===1)throw P=Xh,bf(s,0),jc(s,h),vs(s,bn()),P;if(P===6)throw Error(r(345));return s.finishedWork=s.current.alternate,s.finishedLanes=h,wf(s,gs,$u),vs(s,bn()),null}function W0(s,h){var P=nn;nn|=1;try{return s(h)}finally{nn=P,nn===0&&(uh=bn()+500,kl&&ie())}}function yf(s){Ic!==null&&Ic.tag===0&&(nn&6)===0&&ch();var h=nn;nn|=1;var P=al.transition,F=Ar;try{if(al.transition=null,Ar=1,s)return s()}finally{Ar=F,al.transition=P,nn=h,(nn&6)===0&&ie()}}function Y0(){js=lh.current,Yr(lh)}function bf(s,h){s.finishedWork=null,s.finishedLanes=0;var P=s.timeoutHandle;if(P!==-1&&(s.timeoutHandle=-1,xc(P)),ya!==null)for(P=ya.return;P!==null;){var F=P;switch(Ye(F),F.tag){case 1:F=F.type.childContextTypes,F!=null&&lu();break;case 3:ln(),Yr(ha),Yr(Mi),va();break;case 5:Is(F);break;case 4:ln();break;case 13:Yr(un);break;case 19:Yr(un);break;case 10:wn(F.type._context);break;case 22:case 23:Y0()}P=P.return}if(Va=s,ya=s=Dc(s.current,null),fo=js=h,La=0,Xh=null,U0=zp=mf=0,gs=Kh=null,Xr!==null){for(h=0;h<Xr.length;h++)if(P=Xr[h],F=P.interleaved,F!==null){P.interleaved=null;var K=F.next,ne=P.pending;if(ne!==null){var ge=ne.next;ne.next=K,F.next=ge}P.pending=F}Xr=null}return s}function iy(s,h){do{var P=ya;try{if(Dr(),cu.current=Cc,ao){for(var F=rn.memoizedState;F!==null;){var K=F.queue;K!==null&&(K.pending=null),F=F.next}ao=!1}if(Fi=0,jn=Fn=rn=null,ko=!1,oo=0,z0.current=null,P===null||P.return===null){La=1,Xh=h,ya=null;break}e:{var ne=s,ge=P.return,Ie=P,Be=h;if(h=fo,Ie.flags|=32768,Be!==null&&typeof Be=="object"&&typeof Be.then=="function"){var tt=Be,gt=Ie,mt=gt.tag;if((gt.mode&1)===0&&(mt===0||mt===11||mt===15)){var dt=gt.alternate;dt?(gt.updateQueue=dt.updateQueue,gt.memoizedState=dt.memoizedState,gt.lanes=dt.lanes):(gt.updateQueue=null,gt.memoizedState=null)}var Ft=I(ge);if(Ft!==null){Ft.flags&=-257,$(Ft,ge,Ie,ne,h),Ft.mode&1&&m(ne,tt,h),h=Ft,Be=tt;var Ht=h.updateQueue;if(Ht===null){var Gt=new Set;Gt.add(Be),h.updateQueue=Gt}else Ht.add(Be);break e}else{if((h&1)===0){m(ne,tt,h),X0();break e}Be=Error(r(426))}}else if(ot&&Ie.mode&1){var ta=I(ge);if(ta!==null){(ta.flags&65536)===0&&(ta.flags|=256),$(ta,ge,Ie,ne,h),_t(Gu(Be,Ie));break e}}ne=Be=Gu(Be,Ie),La!==4&&(La=2),Kh===null?Kh=[ne]:Kh.push(ne),ne=ge;do{switch(ne.tag){case 3:ne.flags|=65536,h&=-h,ne.lanes|=h;var Qe=Fp(ne,Be,h);Kr(ne,Qe);break e;case 1:Ie=Be;var Ve=ne.type,Je=ne.stateNode;if((ne.flags&128)===0&&(typeof Ve.getDerivedStateFromError=="function"||Je!==null&&typeof Je.componentDidCatch=="function"&&(Mc===null||!Mc.has(Je)))){ne.flags|=65536,h&=-h,ne.lanes|=h;var wt=p(ne,Ie,h);Kr(ne,wt);break e}}ne=ne.return}while(ne!==null)}sy(P)}catch(Wt){h=Wt,ya===P&&P!==null&&(ya=P=P.return);continue}break}while(!0)}function ay(){var s=Bp.current;return Bp.current=Cc,s===null?Cc:s}function X0(){(La===0||La===3||La===2)&&(La=4),Va===null||(mf&268435455)===0&&(zp&268435455)===0||jc(Va,fo)}function $p(s,h){var P=nn;nn|=2;var F=ay();(Va!==s||fo!==h)&&($u=null,bf(s,h));do try{B7();break}catch(K){iy(s,K)}while(!0);if(Dr(),nn=P,Bp.current=F,ya!==null)throw Error(r(261));return Va=null,fo=0,La}function B7(){for(;ya!==null;)oy(ya)}function z7(){for(;ya!==null&&!Vl();)oy(ya)}function oy(s){var h=cy(s.alternate,s,js);s.memoizedProps=s.pendingProps,h===null?sy(s):ya=h,z0.current=null}function sy(s){var h=s;do{var P=h.alternate;if(s=h.return,(h.flags&32768)===0){if(P=T7(P,h,js),P!==null){ya=P;return}}else{if(P=R7(P,h),P!==null){P.flags&=32767,ya=P;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{La=6,ya=null;return}}if(h=h.sibling,h!==null){ya=h;return}ya=h=s}while(h!==null);La===0&&(La=5)}function wf(s,h,P){var F=Ar,K=al.transition;try{al.transition=null,Ar=1,U7(s,h,P,F)}finally{al.transition=K,Ar=F}return null}function U7(s,h,P,F){do ch();while(Ic!==null);if((nn&6)!==0)throw Error(r(327));P=s.finishedWork;var K=s.finishedLanes;if(P===null)return null;if(s.finishedWork=null,s.finishedLanes=0,P===s.current)throw Error(r(177));s.callbackNode=null,s.callbackPriority=0;var ne=P.lanes|P.childLanes;if(ts(s,ne),s===Va&&(ya=Va=null,fo=0),(P.subtreeFlags&2064)===0&&(P.flags&2064)===0||qp||(qp=!0,fy(Qo,function(){return ch(),null})),ne=(P.flags&15990)!==0,(P.subtreeFlags&15990)!==0||ne){ne=al.transition,al.transition=null;var ge=Ar;Ar=1;var Ie=nn;nn|=4,z0.current=null,I7(s,P),Zm(P,s),Jl(Al),Xl=!!zu,Al=zu=null,s.current=P,F7(P),cf(),nn=Ie,Ar=ge,al.transition=ne}else s.current=P;if(qp&&(qp=!1,Ic=s,Hp=K),ne=s.pendingLanes,ne===0&&(Mc=null),an(P.stateNode),vs(s,bn()),h!==null)for(F=s.onRecoverableError,P=0;P<h.length;P++)K=h[P],F(K.value,{componentStack:K.stack,digest:K.digest});if(Up)throw Up=!1,s=H0,H0=null,s;return(Hp&1)!==0&&s.tag!==0&&ch(),ne=s.pendingLanes,(ne&1)!==0?s===V0?Zh++:(Zh=0,V0=s):Zh=0,ie(),null}function ch(){if(Ic!==null){var s=go(Hp),h=al.transition,P=Ar;try{if(al.transition=null,Ar=16>s?16:s,Ic===null)var F=!1;else{if(s=Ic,Ic=null,Hp=0,(nn&6)!==0)throw Error(r(331));var K=nn;for(nn|=4,zt=s.current;zt!==null;){var ne=zt,ge=ne.child;if((zt.flags&16)!==0){var Ie=ne.deletions;if(Ie!==null){for(var Be=0;Be<Ie.length;Be++){var tt=Ie[Be];for(zt=tt;zt!==null;){var gt=zt;switch(gt.tag){case 0:case 11:case 15:Yh(8,gt,ne)}var mt=gt.child;if(mt!==null)mt.return=gt,zt=mt;else for(;zt!==null;){gt=zt;var dt=gt.sibling,Ft=gt.return;if($m(gt),gt===tt){zt=null;break}if(dt!==null){dt.return=Ft,zt=dt;break}zt=Ft}}}var Ht=ne.alternate;if(Ht!==null){var Gt=Ht.child;if(Gt!==null){Ht.child=null;do{var ta=Gt.sibling;Gt.sibling=null,Gt=ta}while(Gt!==null)}}zt=ne}}if((ne.subtreeFlags&2064)!==0&&ge!==null)ge.return=ne,zt=ge;else e:for(;zt!==null;){if(ne=zt,(ne.flags&2048)!==0)switch(ne.tag){case 0:case 11:case 15:Yh(9,ne,ne.return)}var Qe=ne.sibling;if(Qe!==null){Qe.return=ne.return,zt=Qe;break e}zt=ne.return}}var Ve=s.current;for(zt=Ve;zt!==null;){ge=zt;var Je=ge.child;if((ge.subtreeFlags&2064)!==0&&Je!==null)Je.return=ge,zt=Je;else e:for(ge=Ve;zt!==null;){if(Ie=zt,(Ie.flags&2048)!==0)try{switch(Ie.tag){case 0:case 11:case 15:Dp(9,Ie)}}catch(Wt){ji(Ie,Ie.return,Wt)}if(Ie===ge){zt=null;break e}var wt=Ie.sibling;if(wt!==null){wt.return=Ie.return,zt=wt;break e}zt=Ie.return}}if(nn=K,ie(),oi&&typeof oi.onPostCommitFiberRoot=="function")try{oi.onPostCommitFiberRoot(po,s)}catch{}F=!0}return F}finally{Ar=P,al.transition=h}}return!1}function ly(s,h,P){h=Gu(P,h),h=Fp(s,h,1),s=In(s,h,1),h=Wo(),s!==null&&(hl(s,1,h),vs(s,h))}function ji(s,h,P){if(s.tag===3)ly(s,s,P);else for(;h!==null;){if(h.tag===3){ly(h,s,P);break}else if(h.tag===1){var F=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof F.componentDidCatch=="function"&&(Mc===null||!Mc.has(F))){s=Gu(P,s),s=p(h,s,1),h=In(h,s,1),s=Wo(),h!==null&&(hl(h,1,s),vs(h,s));break}}h=h.return}}function q7(s,h,P){var F=s.pingCache;F!==null&&F.delete(h),h=Wo(),s.pingedLanes|=s.suspendedLanes&P,Va===s&&(fo&P)===P&&(La===4||La===3&&(fo&130023424)===fo&&500>bn()-q0?bf(s,0):U0|=P),vs(s,h)}function uy(s,h){h===0&&((s.mode&1)===0?h=1:(h=Hi,Hi<<=1,(Hi&130023424)===0&&(Hi=4194304)));var P=Wo();s=Gr(s,h),s!==null&&(hl(s,h,P),vs(s,P))}function H7(s){var h=s.memoizedState,P=0;h!==null&&(P=h.retryLane),uy(s,P)}function V7(s,h){var P=0;switch(s.tag){case 13:var F=s.stateNode,K=s.memoizedState;K!==null&&(P=K.retryLane);break;case 19:F=s.stateNode;break;default:throw Error(r(314))}F!==null&&F.delete(h),uy(s,P)}var cy;cy=function(s,h,P){if(s!==null)if(s.memoizedProps!==h.pendingProps||ha.current)oe=!0;else{if((s.lanes&P)===0&&(h.flags&128)===0)return oe=!1,M0(s,h,P);oe=(s.flags&131072)!==0}else oe=!1,ot&&(h.flags&1048576)!==0&&Ke(h,we,h.index);switch(h.lanes=0,h.tag){case 2:var F=h.type;Fr(s,h),s=h.pendingProps;var K=Pl(h,Mi.current);_n(h,P),K=nl(null,h,F,s,K,P);var ne=so();return h.flags|=1,typeof K=="object"&&K!==null&&typeof K.render=="function"&&K.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,da(F)?(ne=!0,us(h)):ne=!1,h.memoizedState=K.state!==null&&K.state!==void 0?K.state:null,Si(h),K.updater=Lc,h.stateNode=K,K._reactInternals=h,ah(h,F,s,P),h=dn(null,h,F,!0,ne,P)):(h.tag=0,ot&&ne&&it(h),Ee(null,h,K,P),h=h.child),h;case 16:F=h.elementType;e:{switch(Fr(s,h),s=h.pendingProps,K=F._init,F=K(F._payload),h.type=F,K=h.tag=$7(F),s=Na(F,s),K){case 0:h=Ot(null,h,F,s,P);break e;case 1:h=Nn(null,h,F,s,P);break e;case 11:h=We(null,h,F,s,P);break e;case 14:h=rt(null,h,F,Na(F.type,s),P);break e}throw Error(r(306,F,""))}return h;case 0:return F=h.type,K=h.pendingProps,K=h.elementType===F?K:Na(F,K),Ot(s,h,F,K,P);case 1:return F=h.type,K=h.pendingProps,K=h.elementType===F?K:Na(F,K),Nn(s,h,F,K,P);case 3:e:{if(uo(h),s===null)throw Error(r(387));F=h.pendingProps,ne=h.memoizedState,K=ne.element,pa(s,h),Ii(h,F,null,P);var ge=h.memoizedState;if(F=ge.element,ne.isDehydrated)if(ne={element:F,isDehydrated:!1,cache:ge.cache,pendingSuspenseBoundaries:ge.pendingSuspenseBoundaries,transitions:ge.transitions},h.updateQueue.baseState=ne,h.memoizedState=ne,h.flags&256){K=Gu(Error(r(423)),h),h=il(s,h,F,P,K);break e}else if(F!==K){K=Gu(Error(r(424)),h),h=il(s,h,F,P,K);break e}else for(Ue=Ki(h.stateNode.containerInfo.firstChild),nt=h,ot=!0,ut=null,P=Ir(h,null,F,P),h.child=P;P;)P.flags=P.flags&-3|4096,P=P.sibling;else{if(Tt(),F===K){h=Ha(s,h,P);break e}Ee(s,h,F,P)}h=h.child}return h;case 5:return uu(h),s===null&&It(h),F=h.type,K=h.pendingProps,ne=s!==null?s.memoizedProps:null,ge=K.children,df(F,K)?ge=null:ne!==null&&df(F,ne)&&(h.flags|=32),pr(s,h),Ee(s,h,ge,P),h.child;case 6:return s===null&&It(h),null;case 13:return at(s,h,P);case 4:return Vo(h,h.stateNode.containerInfo),F=h.pendingProps,s===null?h.child=ni(h,null,F,P):Ee(s,h,F,P),h.child;case 11:return F=h.type,K=h.pendingProps,K=h.elementType===F?K:Na(F,K),We(s,h,F,K,P);case 7:return Ee(s,h,h.pendingProps,P),h.child;case 8:return Ee(s,h,h.pendingProps.children,P),h.child;case 12:return Ee(s,h,h.pendingProps.children,P),h.child;case 10:e:{if(F=h.type._context,K=h.pendingProps,ne=h.memoizedProps,ge=K.value,tn(hi,F._currentValue),F._currentValue=ge,ne!==null)if(Gn(ne.value,ge)){if(ne.children===K.children&&!ha.current){h=Ha(s,h,P);break e}}else for(ne=h.child,ne!==null&&(ne.return=h);ne!==null;){var Ie=ne.dependencies;if(Ie!==null){ge=ne.child;for(var Be=Ie.firstContext;Be!==null;){if(Be.context===F){if(ne.tag===1){Be=Wn(-1,P&-P),Be.tag=2;var tt=ne.updateQueue;if(tt!==null){tt=tt.shared;var gt=tt.pending;gt===null?Be.next=Be:(Be.next=gt.next,gt.next=Be),tt.pending=Be}}ne.lanes|=P,Be=ne.alternate,Be!==null&&(Be.lanes|=P),Br(ne.return,P,h),Ie.lanes|=P;break}Be=Be.next}}else if(ne.tag===10)ge=ne.type===h.type?null:ne.child;else if(ne.tag===18){if(ge=ne.return,ge===null)throw Error(r(341));ge.lanes|=P,Ie=ge.alternate,Ie!==null&&(Ie.lanes|=P),Br(ge,P,h),ge=ne.sibling}else ge=ne.child;if(ge!==null)ge.return=ne;else for(ge=ne;ge!==null;){if(ge===h){ge=null;break}if(ne=ge.sibling,ne!==null){ne.return=ge.return,ge=ne;break}ge=ge.return}ne=ge}Ee(s,h,K.children,P),h=h.child}return h;case 9:return K=h.type,F=h.pendingProps.children,_n(h,P),K=xn(K),F=F(K),h.flags|=1,Ee(s,h,F,P),h.child;case 14:return F=h.type,K=Na(F,h.pendingProps),K=Na(F.type,K),rt(s,h,F,K,P);case 15:return yt(s,h,h.type,h.pendingProps,P);case 17:return F=h.type,K=h.pendingProps,K=h.elementType===F?K:Na(F,K),Fr(s,h),h.tag=1,da(F)?(s=!0,us(h)):s=!1,_n(h,P),Ip(h,F,K),ah(h,F,K,P),dn(null,h,F,!0,s,P);case 19:return ea(s,h,P);case 22:return Bt(s,h,P)}throw Error(r(156,h.tag))};function fy(s,h){return Ps(s,h)}function G7(s,h,P,F){this.tag=s,this.key=P,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=F,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ol(s,h,P,F){return new G7(s,h,P,F)}function K0(s){return s=s.prototype,!(!s||!s.isReactComponent)}function $7(s){if(typeof s=="function")return K0(s)?1:0;if(s!=null){if(s=s.$$typeof,s===C)return 11;if(s===J)return 14}return 2}function Dc(s,h){var P=s.alternate;return P===null?(P=ol(s.tag,h,s.key,s.mode),P.elementType=s.elementType,P.type=s.type,P.stateNode=s.stateNode,P.alternate=s,s.alternate=P):(P.pendingProps=h,P.type=s.type,P.flags=0,P.subtreeFlags=0,P.deletions=null),P.flags=s.flags&14680064,P.childLanes=s.childLanes,P.lanes=s.lanes,P.child=s.child,P.memoizedProps=s.memoizedProps,P.memoizedState=s.memoizedState,P.updateQueue=s.updateQueue,h=s.dependencies,P.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},P.sibling=s.sibling,P.index=s.index,P.ref=s.ref,P}function Wp(s,h,P,F,K,ne){var ge=2;if(F=s,typeof s=="function")K0(s)&&(ge=1);else if(typeof s=="string")ge=5;else e:switch(s){case O:return _f(P.children,K,ne,h);case L:ge=8,K|=8;break;case R:return s=ol(12,P,h,K|2),s.elementType=R,s.lanes=ne,s;case q:return s=ol(13,P,h,K),s.elementType=q,s.lanes=ne,s;case G:return s=ol(19,P,h,K),s.elementType=G,s.lanes=ne,s;case H:return Yp(P,K,ne,h);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case T:ge=10;break e;case k:ge=9;break e;case C:ge=11;break e;case J:ge=14;break e;case ae:ge=16,F=null;break e}throw Error(r(130,s==null?s:typeof s,""))}return h=ol(ge,P,h,K),h.elementType=s,h.type=F,h.lanes=ne,h}function _f(s,h,P,F){return s=ol(7,s,F,h),s.lanes=P,s}function Yp(s,h,P,F){return s=ol(22,s,F,h),s.elementType=H,s.lanes=P,s.stateNode={isHidden:!1},s}function Z0(s,h,P){return s=ol(6,s,null,h),s.lanes=P,s}function Q0(s,h,P){return h=ol(4,s.children!==null?s.children:[],s.key,h),h.lanes=P,h.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},h}function W7(s,h,P,F,K){this.tag=h,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ea(0),this.expirationTimes=Ea(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ea(0),this.identifierPrefix=F,this.onRecoverableError=K,this.mutableSourceEagerHydrationData=null}function J0(s,h,P,F,K,ne,ge,Ie,Be){return s=new W7(s,h,P,Ie,Be),h===1?(h=1,ne===!0&&(h|=8)):h=0,ne=ol(3,null,null,h),s.current=ne,ne.stateNode=s,ne.memoizedState={element:F,isDehydrated:P,cache:null,transitions:null,pendingSuspenseBoundaries:null},Si(ne),s}function Y7(s,h,P){var F=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:F==null?null:""+F,children:s,containerInfo:h,implementation:P}}function hy(s){if(!s)return ls;s=s._reactInternals;e:{if(Qn(s)!==s||s.tag!==1)throw Error(r(170));var h=s;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(da(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(r(171))}if(s.tag===1){var P=s.type;if(da(P))return qu(s,P,h)}return h}function dy(s,h,P,F,K,ne,ge,Ie,Be){return s=J0(P,F,!0,s,K,ne,ge,Ie,Be),s.context=hy(null),P=s.current,F=Wo(),K=Fc(P),ne=Wn(F,K),ne.callback=h??null,In(P,ne,K),s.current.lanes=K,hl(s,K,F),vs(s,F),s}function Xp(s,h,P,F){var K=h.current,ne=Wo(),ge=Fc(K);return P=hy(P),h.context===null?h.context=P:h.pendingContext=P,h=Wn(ne,ge),h.payload={element:s},F=F===void 0?null:F,F!==null&&(h.callback=F),s=In(K,h,ge),s!==null&&(Rl(s,K,ge,ne),ga(s,K,ge)),ge}function Kp(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function py(s,h){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var P=s.retryLane;s.retryLane=P!==0&&P<h?P:h}}function eg(s,h){py(s,h),(s=s.alternate)&&py(s,h)}function X7(){return null}var gy=typeof reportError=="function"?reportError:function(s){console.error(s)};function tg(s){this._internalRoot=s}Zp.prototype.render=tg.prototype.render=function(s){var h=this._internalRoot;if(h===null)throw Error(r(409));Xp(s,h,null,null)},Zp.prototype.unmount=tg.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var h=s.containerInfo;yf(function(){Xp(null,s,null,null)}),h[Qi]=null}};function Zp(s){this._internalRoot=s}Zp.prototype.unstable_scheduleHydration=function(s){if(s){var h=hc();s={blockedOn:null,target:s,priority:h};for(var P=0;P<vo.length&&h!==0&&h<vo[P].priority;P++);vo.splice(P,0,s),P===0&&Wl(s)}};function rg(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Qp(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function vy(){}function K7(s,h,P,F,K){if(K){if(typeof F=="function"){var ne=F;F=function(){var tt=Kp(ge);ne.call(tt)}}var ge=dy(h,F,s,0,null,!1,!1,"",vy);return s._reactRootContainer=ge,s[Qi]=ge.current,Ts(s.nodeType===8?s.parentNode:s),yf(),ge}for(;K=s.lastChild;)s.removeChild(K);if(typeof F=="function"){var Ie=F;F=function(){var tt=Kp(Be);Ie.call(tt)}}var Be=J0(s,0,!1,null,null,!1,!1,"",vy);return s._reactRootContainer=Be,s[Qi]=Be.current,Ts(s.nodeType===8?s.parentNode:s),yf(function(){Xp(h,Be,P,F)}),Be}function Jp(s,h,P,F,K){var ne=P._reactRootContainer;if(ne){var ge=ne;if(typeof K=="function"){var Ie=K;K=function(){var Be=Kp(ge);Ie.call(Be)}}Xp(h,ge,s,K)}else ge=K7(P,h,s,K,F);return Kp(ge)}rs=function(s){switch(s.tag){case 3:var h=s.stateNode;if(h.current.memoizedState.isDehydrated){var P=Pn(h.pendingLanes);P!==0&&($l(h,P|1),vs(h,bn()),(nn&6)===0&&(uh=bn()+500,ie()))}break;case 13:yf(function(){var F=Gr(s,1);if(F!==null){var K=Wo();Rl(F,s,1,K)}}),eg(s,1)}},Ys=function(s){if(s.tag===13){var h=Gr(s,134217728);if(h!==null){var P=Wo();Rl(h,s,134217728,P)}eg(s,134217728)}},fc=function(s){if(s.tag===13){var h=Fc(s),P=Gr(s,h);if(P!==null){var F=Wo();Rl(P,s,h,F)}eg(s,h)}},hc=function(){return Ar},Xs=function(s,h){var P=Ar;try{return Ar=s,h()}finally{Ar=P}},er=function(s,h,P){switch(h){case"input":if(Ae(s,P),h=P.name,P.type==="radio"&&h!=null){for(P=s;P.parentNode;)P=P.parentNode;for(P=P.querySelectorAll("input[name="+JSON.stringify(""+h)+'][type="radio"]'),h=0;h<P.length;h++){var F=P[h];if(F!==s&&F.form===s.form){var K=_i(F);if(!K)throw Error(r(90));Re(F),Ae(F,K)}}}break;case"textarea":je(s,P);break;case"select":h=P.value,h!=null&&Le(s,!!P.multiple,h,!1)}},Zn=W0,gi=yf;var Z7={usingClientEntryPoint:!1,Events:[su,ci,_i,lr,Oi,W0]},Qh={findFiberByHostInstance:Ms,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Q7={bundleType:Qh.bundleType,version:Qh.version,rendererPackageName:Qh.rendererPackageName,rendererConfig:Qh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Ci(s),s===null?null:s.stateNode},findFiberByHostInstance:Qh.findFiberByHostInstance||X7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var e1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!e1.isDisabled&&e1.supportsFiber)try{po=e1.inject(Q7),oi=e1}catch{}}return ms.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z7,ms.createPortal=function(s,h){var P=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rg(h))throw Error(r(200));return Y7(s,h,null,P)},ms.createRoot=function(s,h){if(!rg(s))throw Error(r(299));var P=!1,F="",K=gy;return h!=null&&(h.unstable_strictMode===!0&&(P=!0),h.identifierPrefix!==void 0&&(F=h.identifierPrefix),h.onRecoverableError!==void 0&&(K=h.onRecoverableError)),h=J0(s,1,!1,null,null,P,!1,F,K),s[Qi]=h.current,Ts(s.nodeType===8?s.parentNode:s),new tg(h)},ms.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var h=s._reactInternals;if(h===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=Ci(h),s=s===null?null:s.stateNode,s},ms.flushSync=function(s){return yf(s)},ms.hydrate=function(s,h,P){if(!Qp(h))throw Error(r(200));return Jp(null,s,h,!0,P)},ms.hydrateRoot=function(s,h,P){if(!rg(s))throw Error(r(405));var F=P!=null&&P.hydratedSources||null,K=!1,ne="",ge=gy;if(P!=null&&(P.unstable_strictMode===!0&&(K=!0),P.identifierPrefix!==void 0&&(ne=P.identifierPrefix),P.onRecoverableError!==void 0&&(ge=P.onRecoverableError)),h=dy(h,null,s,1,P??null,K,!1,ne,ge),s[Qi]=h.current,Ts(s),F)for(s=0;s<F.length;s++)P=F[s],K=P._getVersion,K=K(P._source),h.mutableSourceEagerHydrationData==null?h.mutableSourceEagerHydrationData=[P,K]:h.mutableSourceEagerHydrationData.push(P,K);return new Zp(h)},ms.render=function(s,h,P){if(!Qp(h))throw Error(r(200));return Jp(null,s,h,!1,P)},ms.unmountComponentAtNode=function(s){if(!Qp(s))throw Error(r(40));return s._reactRootContainer?(yf(function(){Jp(null,null,s,!1,function(){s._reactRootContainer=null,s[Qi]=null})}),!0):!1},ms.unstable_batchedUpdates=W0,ms.unstable_renderSubtreeIntoContainer=function(s,h,P,F){if(!Qp(P))throw Error(r(200));if(s==null||s._reactInternals===void 0)throw Error(r(38));return Jp(s,h,P,!1,F)},ms.version="18.3.1-next-f1338f8080-20240426",ms}var xy;function zw(){if(xy)return ig.exports;xy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ig.exports=n9(),ig.exports}var Sy;function i9(){if(Sy)return t1;Sy=1;var e=zw();return t1.createRoot=e.createRoot,t1.hydrateRoot=e.hydrateRoot,t1}var a9=i9();const Uw=lc(a9);function Cr(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(r.length?" "+r.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var o9={};function n0(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:o9}var qw=Object.assign,I1=Object.getOwnPropertyDescriptor,xu=Object.defineProperty,i0=Object.prototype,bv=[];Object.freeze(bv);var tm={};Object.freeze(tm);var s9=typeof Proxy<"u",l9=Object.toString();function Hw(){s9||Cr("Proxy not available")}function Vw(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var wh=function(){};function Vs(e){return typeof e=="function"}function jf(e){var t=typeof e;switch(t){case"string":case"symbol":case"number":return!0}return!1}function a0(e){return e!==null&&typeof e=="object"}function Qc(e){if(!a0(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r.toString()===l9}function Gw(e){var t=e?.constructor;return t?t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction":!1}function o0(e,t,r){xu(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function $w(e,t,r){xu(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function af(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(n){return a0(n)&&n[r]===!0}}function jh(e){return e!=null&&Object.prototype.toString.call(e)==="[object Map]"}function u9(e){var t=Object.getPrototypeOf(e),r=Object.getPrototypeOf(t),n=Object.getPrototypeOf(r);return n===null}function ec(e){return e!=null&&Object.prototype.toString.call(e)==="[object Set]"}var Ww=typeof Object.getOwnPropertySymbols<"u";function c9(e){var t=Object.keys(e);if(!Ww)return t;var r=Object.getOwnPropertySymbols(e);return r.length?[].concat(t,r.filter(function(n){return i0.propertyIsEnumerable.call(e,n)})):t}var s0=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Ww?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function Yw(e){return e===null?null:typeof e=="object"?""+e:e}function nc(e,t){return i0.hasOwnProperty.call(e,t)}var f9=Object.getOwnPropertyDescriptors||function(t){var r={};return s0(t).forEach(function(n){r[n]=I1(t,n)}),r};function Us(e,t){return!!(e&t)}function qs(e,t,r){return r?e|=t:e&=~t,e}function Ey(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function h9(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p9(n.key),n)}}function Dh(e,t,r){return t&&h9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _h(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=g9(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
32
|
+
`+ne.stack}return{value:s,source:h,stack:K,digest:null}}function oh(s,h,P){return{value:s,source:null,stack:P??null,digest:h??null}}function Tc(s,h){try{console.error(h.value)}catch(P){setTimeout(function(){throw P})}}var R0=typeof WeakMap=="function"?WeakMap:Map;function Fp(s,h,P){P=Wn(-1,P),P.tag=3,P.payload={element:null};var F=h.value;return P.callback=function(){Up||(Up=!0,H0=F),Tc(s,h)},P}function p(s,h,P){P=Wn(-1,P),P.tag=3;var F=s.type.getDerivedStateFromError;if(typeof F=="function"){var K=h.value;P.payload=function(){return F(K)},P.callback=function(){Tc(s,h)}}var ne=s.stateNode;return ne!==null&&typeof ne.componentDidCatch=="function"&&(P.callback=function(){Tc(s,h),typeof F!="function"&&(Mc===null?Mc=new Set([this]):Mc.add(this));var ge=h.stack;this.componentDidCatch(h.value,{componentStack:ge!==null?ge:""})}),P}function m(s,h,P){var F=s.pingCache;if(F===null){F=s.pingCache=new R0;var K=new Set;F.set(h,K)}else K=F.get(h),K===void 0&&(K=new Set,F.set(h,K));K.has(P)||(K.add(P),s=q7.bind(null,s,h,P),h.then(s,s))}function I(s){do{var h;if((h=s.tag===13)&&(h=s.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return s;s=s.return}while(s!==null);return null}function $(s,h,P,F,K){return(s.mode&1)===0?(s===h?s.flags|=65536:(s.flags|=128,P.flags|=131072,P.flags&=-52805,P.tag===1&&(P.alternate===null?P.tag=17:(h=Wn(-1,1),h.tag=2,In(P,h,1))),P.lanes|=1),s):(s.flags|=65536,s.lanes=K,s)}var ee=_.ReactCurrentOwner,oe=!1;function Ee(s,h,P,F){h.child=s===null?Ir(h,null,P,F):ni(h,s.child,P,F)}function We(s,h,P,F,K){P=P.render;var ne=h.ref;return _n(h,K),F=nl(s,h,P,F,ne,K),P=so(),s!==null&&!oe?(h.updateQueue=s.updateQueue,h.flags&=-2053,s.lanes&=~K,Ha(s,h,K)):(ot&&P&&it(h),h.flags|=1,Ee(s,h,F,K),h.child)}function rt(s,h,P,F,K){if(s===null){var ne=P.type;return typeof ne=="function"&&!K0(ne)&&ne.defaultProps===void 0&&P.compare===null&&P.defaultProps===void 0?(h.tag=15,h.type=ne,yt(s,h,ne,F,K)):(s=Wp(P.type,null,F,h,h.mode,K),s.ref=h.ref,s.return=h,h.child=s)}if(ne=s.child,(s.lanes&K)===0){var ge=ne.memoizedProps;if(P=P.compare,P=P!==null?P:Eo,P(ge,F)&&s.ref===h.ref)return Ha(s,h,K)}return h.flags|=1,s=Dc(ne,F),s.ref=h.ref,s.return=h,h.child=s}function yt(s,h,P,F,K){if(s!==null){var ne=s.memoizedProps;if(Eo(ne,F)&&s.ref===h.ref)if(oe=!1,h.pendingProps=F=ne,(s.lanes&K)!==0)(s.flags&131072)!==0&&(oe=!0);else return h.lanes=s.lanes,Ha(s,h,K)}return Ot(s,h,P,F,K)}function Bt(s,h,P){var F=h.pendingProps,K=F.children,ne=s!==null?s.memoizedState:null;if(F.mode==="hidden")if((h.mode&1)===0)h.memoizedState={baseLanes:0,cachePool:null,transitions:null},tn(lh,js),js|=P;else{if((P&1073741824)===0)return s=ne!==null?ne.baseLanes|P:P,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:s,cachePool:null,transitions:null},h.updateQueue=null,tn(lh,js),js|=s,null;h.memoizedState={baseLanes:0,cachePool:null,transitions:null},F=ne!==null?ne.baseLanes:P,tn(lh,js),js|=F}else ne!==null?(F=ne.baseLanes|P,h.memoizedState=null):F=P,tn(lh,js),js|=F;return Ee(s,h,K,P),h.child}function pr(s,h){var P=h.ref;(s===null&&P!==null||s!==null&&s.ref!==P)&&(h.flags|=512,h.flags|=2097152)}function Ot(s,h,P,F,K){var ne=da(P)?rl:Mi.current;return ne=Pl(h,ne),_n(h,K),P=nl(s,h,P,F,ne,K),F=so(),s!==null&&!oe?(h.updateQueue=s.updateQueue,h.flags&=-2053,s.lanes&=~K,Ha(s,h,K)):(ot&&F&&it(h),h.flags|=1,Ee(s,h,P,K),h.child)}function Nn(s,h,P,F,K){if(da(P)){var ne=!0;us(h)}else ne=!1;if(_n(h,K),h.stateNode===null)Fr(s,h),Ip(h,P,F),ah(h,P,F,K),F=!0;else if(s===null){var ge=h.stateNode,Ie=h.memoizedProps;ge.props=Ie;var Be=ge.context,tt=P.contextType;typeof tt=="object"&&tt!==null?tt=xn(tt):(tt=da(P)?rl:Mi.current,tt=Pl(h,tt));var gt=P.getDerivedStateFromProps,mt=typeof gt=="function"||typeof ge.getSnapshotBeforeUpdate=="function";mt||typeof ge.UNSAFE_componentWillReceiveProps!="function"&&typeof ge.componentWillReceiveProps!="function"||(Ie!==F||Be!==tt)&&$h(h,ge,F,tt),$n=!1;var dt=h.memoizedState;ge.state=dt,Ii(h,F,ge,K),Be=h.memoizedState,Ie!==F||dt!==Be||ha.current||$n?(typeof gt=="function"&&(Nc(h,P,gt,F),Be=h.memoizedState),(Ie=$n||ih(h,P,Ie,F,dt,Be,tt))?(mt||typeof ge.UNSAFE_componentWillMount!="function"&&typeof ge.componentWillMount!="function"||(typeof ge.componentWillMount=="function"&&ge.componentWillMount(),typeof ge.UNSAFE_componentWillMount=="function"&&ge.UNSAFE_componentWillMount()),typeof ge.componentDidMount=="function"&&(h.flags|=4194308)):(typeof ge.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=F,h.memoizedState=Be),ge.props=F,ge.state=Be,ge.context=tt,F=Ie):(typeof ge.componentDidMount=="function"&&(h.flags|=4194308),F=!1)}else{ge=h.stateNode,pa(s,h),Ie=h.memoizedProps,tt=h.type===h.elementType?Ie:Na(h.type,Ie),ge.props=tt,mt=h.pendingProps,dt=ge.context,Be=P.contextType,typeof Be=="object"&&Be!==null?Be=xn(Be):(Be=da(P)?rl:Mi.current,Be=Pl(h,Be));var Ft=P.getDerivedStateFromProps;(gt=typeof Ft=="function"||typeof ge.getSnapshotBeforeUpdate=="function")||typeof ge.UNSAFE_componentWillReceiveProps!="function"&&typeof ge.componentWillReceiveProps!="function"||(Ie!==mt||dt!==Be)&&$h(h,ge,F,Be),$n=!1,dt=h.memoizedState,ge.state=dt,Ii(h,F,ge,K);var Ht=h.memoizedState;Ie!==mt||dt!==Ht||ha.current||$n?(typeof Ft=="function"&&(Nc(h,P,Ft,F),Ht=h.memoizedState),(tt=$n||ih(h,P,tt,F,dt,Ht,Be)||!1)?(gt||typeof ge.UNSAFE_componentWillUpdate!="function"&&typeof ge.componentWillUpdate!="function"||(typeof ge.componentWillUpdate=="function"&&ge.componentWillUpdate(F,Ht,Be),typeof ge.UNSAFE_componentWillUpdate=="function"&&ge.UNSAFE_componentWillUpdate(F,Ht,Be)),typeof ge.componentDidUpdate=="function"&&(h.flags|=4),typeof ge.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof ge.componentDidUpdate!="function"||Ie===s.memoizedProps&&dt===s.memoizedState||(h.flags|=4),typeof ge.getSnapshotBeforeUpdate!="function"||Ie===s.memoizedProps&&dt===s.memoizedState||(h.flags|=1024),h.memoizedProps=F,h.memoizedState=Ht),ge.props=F,ge.state=Ht,ge.context=Be,F=tt):(typeof ge.componentDidUpdate!="function"||Ie===s.memoizedProps&&dt===s.memoizedState||(h.flags|=4),typeof ge.getSnapshotBeforeUpdate!="function"||Ie===s.memoizedProps&&dt===s.memoizedState||(h.flags|=1024),F=!1)}return dn(s,h,P,F,ne,K)}function dn(s,h,P,F,K,ne){pr(s,h);var ge=(h.flags&128)!==0;if(!F&&!ge)return K&&th(h,P,!1),Ha(s,h,ne);F=h.stateNode,ee.current=h;var Ie=ge&&typeof P.getDerivedStateFromError!="function"?null:F.render();return h.flags|=1,s!==null&&ge?(h.child=ni(h,s.child,null,ne),h.child=ni(h,null,Ie,ne)):Ee(s,h,Ie,ne),h.memoizedState=F.state,K&&th(h,P,!0),h.child}function uo(s){var h=s.stateNode;h.pendingContext?pf(s,h.pendingContext,h.pendingContext!==h.context):h.context&&pf(s,h.context,!1),Vo(s,h.containerInfo)}function il(s,h,P,F,K){return Tt(),_t(K),h.flags|=256,Ee(s,h,P,F),h.child}var et={dehydrated:null,treeContext:null,retryLane:0};function Xe(s){return{baseLanes:s,cachePool:null,transitions:null}}function at(s,h,P){var F=h.pendingProps,K=un.current,ne=!1,ge=(h.flags&128)!==0,Ie;if((Ie=ge)||(Ie=s!==null&&s.memoizedState===null?!1:(K&2)!==0),Ie?(ne=!0,h.flags&=-129):(s===null||s.memoizedState!==null)&&(K|=1),tn(un,K&1),s===null)return It(h),s=h.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((h.mode&1)===0?h.lanes=1:s.data==="$!"?h.lanes=8:h.lanes=1073741824,null):(ge=F.children,s=F.fallback,ne?(F=h.mode,ne=h.child,ge={mode:"hidden",children:ge},(F&1)===0&&ne!==null?(ne.childLanes=0,ne.pendingProps=ge):ne=Yp(ge,F,0,null),s=_f(s,F,P,null),ne.return=h,s.return=h,ne.sibling=s,h.child=ne,h.child.memoizedState=Xe(P),h.memoizedState=et,s):Ct(h,ge));if(K=s.memoizedState,K!==null&&(Ie=K.dehydrated,Ie!==null))return xr(s,h,ge,F,Ie,K,P);if(ne){ne=F.fallback,ge=h.mode,K=s.child,Ie=K.sibling;var Be={mode:"hidden",children:F.children};return(ge&1)===0&&h.child!==K?(F=h.child,F.childLanes=0,F.pendingProps=Be,h.deletions=null):(F=Dc(K,Be),F.subtreeFlags=K.subtreeFlags&14680064),Ie!==null?ne=Dc(Ie,ne):(ne=_f(ne,ge,P,null),ne.flags|=2),ne.return=h,F.return=h,F.sibling=ne,h.child=F,F=ne,ne=h.child,ge=s.child.memoizedState,ge=ge===null?Xe(P):{baseLanes:ge.baseLanes|P,cachePool:null,transitions:ge.transitions},ne.memoizedState=ge,ne.childLanes=s.childLanes&~P,h.memoizedState=et,F}return ne=s.child,s=ne.sibling,F=Dc(ne,{mode:"visible",children:F.children}),(h.mode&1)===0&&(F.lanes=P),F.return=h,F.sibling=null,s!==null&&(P=h.deletions,P===null?(h.deletions=[s],h.flags|=16):P.push(s)),h.child=F,h.memoizedState=null,F}function Ct(s,h){return h=Yp({mode:"visible",children:h},s.mode,0,null),h.return=s,s.child=h}function Qt(s,h,P,F){return F!==null&&_t(F),ni(h,s.child,null,P),s=Ct(h,h.pendingProps.children),s.flags|=2,h.memoizedState=null,s}function xr(s,h,P,F,K,ne,ge){if(P)return h.flags&256?(h.flags&=-257,F=oh(Error(r(422))),Qt(s,h,ge,F)):h.memoizedState!==null?(h.child=s.child,h.flags|=128,null):(ne=F.fallback,K=h.mode,F=Yp({mode:"visible",children:F.children},K,0,null),ne=_f(ne,K,ge,null),ne.flags|=2,F.return=h,ne.return=h,F.sibling=ne,h.child=F,(h.mode&1)!==0&&ni(h,s.child,null,ge),h.child.memoizedState=Xe(ge),h.memoizedState=et,ne);if((h.mode&1)===0)return Qt(s,h,ge,null);if(K.data==="$!"){if(F=K.nextSibling&&K.nextSibling.dataset,F)var Ie=F.dgst;return F=Ie,ne=Error(r(419)),F=oh(ne,F,void 0),Qt(s,h,ge,F)}if(Ie=(ge&s.childLanes)!==0,oe||Ie){if(F=Va,F!==null){switch(ge&-ge){case 4:K=2;break;case 16:K=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:K=32;break;case 536870912:K=268435456;break;default:K=0}K=(K&(F.suspendedLanes|ge))!==0?0:K,K!==0&&K!==ne.retryLane&&(ne.retryLane=K,Gr(s,K),Rl(F,s,K,-1))}return X0(),F=oh(Error(r(421))),Qt(s,h,ge,F)}return K.data==="$?"?(h.flags|=128,h.child=s.child,h=H7.bind(null,s),K._reactRetry=h,null):(s=ne.treeContext,Ue=Ki(K.nextSibling),nt=h,ot=!0,ut=null,s!==null&&(Se[Oe++]=Ze,Se[Oe++]=ke,Se[Oe++]=De,Ze=s.id,ke=s.overflow,De=h),h=Ct(h,F.children),h.flags|=4096,h)}function gr(s,h,P){s.lanes|=h;var F=s.alternate;F!==null&&(F.lanes|=h),Br(s.return,h,P)}function Ur(s,h,P,F,K){var ne=s.memoizedState;ne===null?s.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:F,tail:P,tailMode:K}:(ne.isBackwards=h,ne.rendering=null,ne.renderingStartTime=0,ne.last=F,ne.tail=P,ne.tailMode=K)}function ea(s,h,P){var F=h.pendingProps,K=F.revealOrder,ne=F.tail;if(Ee(s,h,F.children,P),F=un.current,(F&2)!==0)F=F&1|2,h.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=h.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&gr(s,P,h);else if(s.tag===19)gr(s,P,h);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===h)break e;for(;s.sibling===null;){if(s.return===null||s.return===h)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}F&=1}if(tn(un,F),(h.mode&1)===0)h.memoizedState=null;else switch(K){case"forwards":for(P=h.child,K=null;P!==null;)s=P.alternate,s!==null&&io(s)===null&&(K=P),P=P.sibling;P=K,P===null?(K=h.child,h.child=null):(K=P.sibling,P.sibling=null),Ur(h,!1,K,P,ne);break;case"backwards":for(P=null,K=h.child,h.child=null;K!==null;){if(s=K.alternate,s!==null&&io(s)===null){h.child=K;break}s=K.sibling,K.sibling=P,P=K,K=s}Ur(h,!0,P,null,ne);break;case"together":Ur(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function Fr(s,h){(h.mode&1)===0&&s!==null&&(s.alternate=null,h.alternate=null,h.flags|=2)}function Ha(s,h,P){if(s!==null&&(h.dependencies=s.dependencies),mf|=h.lanes,(P&h.childLanes)===0)return null;if(s!==null&&h.child!==s.child)throw Error(r(153));if(h.child!==null){for(s=h.child,P=Dc(s,s.pendingProps),h.child=P,P.return=h;s.sibling!==null;)s=s.sibling,P=P.sibling=Dc(s,s.pendingProps),P.return=h;P.sibling=null}return h.child}function M0(s,h,P){switch(h.tag){case 3:uo(h),Tt();break;case 5:uu(h);break;case 1:da(h.type)&&us(h);break;case 4:Vo(h,h.stateNode.containerInfo);break;case 10:var F=h.type._context,K=h.memoizedProps.value;tn(hi,F._currentValue),F._currentValue=K;break;case 13:if(F=h.memoizedState,F!==null)return F.dehydrated!==null?(tn(un,un.current&1),h.flags|=128,null):(P&h.child.childLanes)!==0?at(s,h,P):(tn(un,un.current&1),s=Ha(s,h,P),s!==null?s.sibling:null);tn(un,un.current&1);break;case 19:if(F=(P&h.childLanes)!==0,(s.flags&128)!==0){if(F)return ea(s,h,P);h.flags|=128}if(K=h.memoizedState,K!==null&&(K.rendering=null,K.tail=null,K.lastEffect=null),tn(un,un.current),F)break;return null;case 22:case 23:return h.lanes=0,Bt(s,h,P)}return Ha(s,h,P)}var qm,I0,Hm,Vm;qm=function(s,h){for(var P=h.child;P!==null;){if(P.tag===5||P.tag===6)s.appendChild(P.stateNode);else if(P.tag!==4&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===h)break;for(;P.sibling===null;){if(P.return===null||P.return===h)return;P=P.return}P.sibling.return=P.return,P=P.sibling}},I0=function(){},Hm=function(s,h,P,F){var K=s.memoizedProps;if(K!==F){s=h.stateNode,ii(Or.current);var ne=null;switch(P){case"input":K=Pe(s,K),F=Pe(s,F),ne=[];break;case"select":K=U({},K,{value:void 0}),F=U({},F,{value:void 0}),ne=[];break;case"textarea":K=pe(s,K),F=pe(s,F),ne=[];break;default:typeof K.onClick!="function"&&typeof F.onClick=="function"&&(s.onclick=Rs)}$e(P,F);var ge;P=null;for(tt in K)if(!F.hasOwnProperty(tt)&&K.hasOwnProperty(tt)&&K[tt]!=null)if(tt==="style"){var Ie=K[tt];for(ge in Ie)Ie.hasOwnProperty(ge)&&(P||(P={}),P[ge]="")}else tt!=="dangerouslySetInnerHTML"&&tt!=="children"&&tt!=="suppressContentEditableWarning"&&tt!=="suppressHydrationWarning"&&tt!=="autoFocus"&&(i.hasOwnProperty(tt)?ne||(ne=[]):(ne=ne||[]).push(tt,null));for(tt in F){var Be=F[tt];if(Ie=K?.[tt],F.hasOwnProperty(tt)&&Be!==Ie&&(Be!=null||Ie!=null))if(tt==="style")if(Ie){for(ge in Ie)!Ie.hasOwnProperty(ge)||Be&&Be.hasOwnProperty(ge)||(P||(P={}),P[ge]="");for(ge in Be)Be.hasOwnProperty(ge)&&Ie[ge]!==Be[ge]&&(P||(P={}),P[ge]=Be[ge])}else P||(ne||(ne=[]),ne.push(tt,P)),P=Be;else tt==="dangerouslySetInnerHTML"?(Be=Be?Be.__html:void 0,Ie=Ie?Ie.__html:void 0,Be!=null&&Ie!==Be&&(ne=ne||[]).push(tt,Be)):tt==="children"?typeof Be!="string"&&typeof Be!="number"||(ne=ne||[]).push(tt,""+Be):tt!=="suppressContentEditableWarning"&&tt!=="suppressHydrationWarning"&&(i.hasOwnProperty(tt)?(Be!=null&&tt==="onScroll"&&sn("scroll",s),ne||Ie===Be||(ne=[])):(ne=ne||[]).push(tt,Be))}P&&(ne=ne||[]).push("style",P);var tt=ne;(h.updateQueue=tt)&&(h.flags|=4)}},Vm=function(s,h,P,F){P!==F&&(h.flags|=4)};function Wh(s,h){if(!ot)switch(s.tailMode){case"hidden":h=s.tail;for(var P=null;h!==null;)h.alternate!==null&&(P=h),h=h.sibling;P===null?s.tail=null:P.sibling=null;break;case"collapsed":P=s.tail;for(var F=null;P!==null;)P.alternate!==null&&(F=P),P=P.sibling;F===null?h||s.tail===null?s.tail=null:s.tail.sibling=null:F.sibling=null}}function Oo(s){var h=s.alternate!==null&&s.alternate.child===s.child,P=0,F=0;if(h)for(var K=s.child;K!==null;)P|=K.lanes|K.childLanes,F|=K.subtreeFlags&14680064,F|=K.flags&14680064,K.return=s,K=K.sibling;else for(K=s.child;K!==null;)P|=K.lanes|K.childLanes,F|=K.subtreeFlags,F|=K.flags,K.return=s,K=K.sibling;return s.subtreeFlags|=F,s.childLanes=P,h}function T7(s,h,P){var F=h.pendingProps;switch(Ye(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oo(h),null;case 1:return da(h.type)&&lu(),Oo(h),null;case 3:return F=h.stateNode,ln(),Yr(ha),Yr(Mi),va(),F.pendingContext&&(F.context=F.pendingContext,F.pendingContext=null),(s===null||s.child===null)&&(Rn(h)?h.flags|=4:s===null||s.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,ut!==null&&($0(ut),ut=null))),I0(s,h),Oo(h),null;case 5:Is(h);var K=ii(Cn.current);if(P=h.type,s!==null&&h.stateNode!=null)Hm(s,h,P,F,K),s.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!F){if(h.stateNode===null)throw Error(r(166));return Oo(h),null}if(s=ii(Or.current),Rn(h)){F=h.stateNode,P=h.type;var ne=h.memoizedProps;switch(F[Ao]=h,F[ou]=ne,s=(h.mode&1)!==0,P){case"dialog":sn("cancel",F),sn("close",F);break;case"iframe":case"object":case"embed":sn("load",F);break;case"video":case"audio":for(K=0;K<Ho.length;K++)sn(Ho[K],F);break;case"source":sn("error",F);break;case"img":case"image":case"link":sn("error",F),sn("load",F);break;case"details":sn("toggle",F);break;case"input":de(F,ne),sn("invalid",F);break;case"select":F._wrapperState={wasMultiple:!!ne.multiple},sn("invalid",F);break;case"textarea":Ce(F,ne),sn("invalid",F)}$e(P,ne),K=null;for(var ge in ne)if(ne.hasOwnProperty(ge)){var Ie=ne[ge];ge==="children"?typeof Ie=="string"?F.textContent!==Ie&&(ne.suppressHydrationWarning!==!0&&Bu(F.textContent,Ie,s),K=["children",Ie]):typeof Ie=="number"&&F.textContent!==""+Ie&&(ne.suppressHydrationWarning!==!0&&Bu(F.textContent,Ie,s),K=["children",""+Ie]):i.hasOwnProperty(ge)&&Ie!=null&&ge==="onScroll"&&sn("scroll",F)}switch(P){case"input":ye(F),be(F,ne,!0);break;case"textarea":ye(F),He(F);break;case"select":case"option":break;default:typeof ne.onClick=="function"&&(F.onclick=Rs)}F=K,h.updateQueue=F,F!==null&&(h.flags|=4)}else{ge=K.nodeType===9?K:K.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=st(P)),s==="http://www.w3.org/1999/xhtml"?P==="script"?(s=ge.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof F.is=="string"?s=ge.createElement(P,{is:F.is}):(s=ge.createElement(P),P==="select"&&(ge=s,F.multiple?ge.multiple=!0:F.size&&(ge.size=F.size))):s=ge.createElementNS(s,P),s[Ao]=h,s[ou]=F,qm(s,h,!1,!1),h.stateNode=s;e:{switch(ge=ze(P,F),P){case"dialog":sn("cancel",s),sn("close",s),K=F;break;case"iframe":case"object":case"embed":sn("load",s),K=F;break;case"video":case"audio":for(K=0;K<Ho.length;K++)sn(Ho[K],s);K=F;break;case"source":sn("error",s),K=F;break;case"img":case"image":case"link":sn("error",s),sn("load",s),K=F;break;case"details":sn("toggle",s),K=F;break;case"input":de(s,F),K=Pe(s,F),sn("invalid",s);break;case"option":K=F;break;case"select":s._wrapperState={wasMultiple:!!F.multiple},K=U({},F,{value:void 0}),sn("invalid",s);break;case"textarea":Ce(s,F),K=pe(s,F),sn("invalid",s);break;default:K=F}$e(P,K),Ie=K;for(ne in Ie)if(Ie.hasOwnProperty(ne)){var Be=Ie[ne];ne==="style"?Pt(s,Be):ne==="dangerouslySetInnerHTML"?(Be=Be?Be.__html:void 0,Be!=null&&bt(s,Be)):ne==="children"?typeof Be=="string"?(P!=="textarea"||Be!=="")&&ht(s,Be):typeof Be=="number"&&ht(s,""+Be):ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&ne!=="autoFocus"&&(i.hasOwnProperty(ne)?Be!=null&&ne==="onScroll"&&sn("scroll",s):Be!=null&&w(s,ne,Be,ge))}switch(P){case"input":ye(s),be(s,F,!1);break;case"textarea":ye(s),He(s);break;case"option":F.value!=null&&s.setAttribute("value",""+se(F.value));break;case"select":s.multiple=!!F.multiple,ne=F.value,ne!=null?Le(s,!!F.multiple,ne,!1):F.defaultValue!=null&&Le(s,!!F.multiple,F.defaultValue,!0);break;default:typeof K.onClick=="function"&&(s.onclick=Rs)}switch(P){case"button":case"input":case"select":case"textarea":F=!!F.autoFocus;break e;case"img":F=!0;break e;default:F=!1}}F&&(h.flags|=4)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return Oo(h),null;case 6:if(s&&h.stateNode!=null)Vm(s,h,s.memoizedProps,F);else{if(typeof F!="string"&&h.stateNode===null)throw Error(r(166));if(P=ii(Cn.current),ii(Or.current),Rn(h)){if(F=h.stateNode,P=h.memoizedProps,F[Ao]=h,(ne=F.nodeValue!==P)&&(s=nt,s!==null))switch(s.tag){case 3:Bu(F.nodeValue,P,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Bu(F.nodeValue,P,(s.mode&1)!==0)}ne&&(h.flags|=4)}else F=(P.nodeType===9?P:P.ownerDocument).createTextNode(F),F[Ao]=h,h.stateNode=F}return Oo(h),null;case 13:if(Yr(un),F=h.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(ot&&Ue!==null&&(h.mode&1)!==0&&(h.flags&128)===0)fr(),Tt(),h.flags|=98560,ne=!1;else if(ne=Rn(h),F!==null&&F.dehydrated!==null){if(s===null){if(!ne)throw Error(r(318));if(ne=h.memoizedState,ne=ne!==null?ne.dehydrated:null,!ne)throw Error(r(317));ne[Ao]=h}else Tt(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;Oo(h),ne=!1}else ut!==null&&($0(ut),ut=null),ne=!0;if(!ne)return h.flags&65536?h:null}return(h.flags&128)!==0?(h.lanes=P,h):(F=F!==null,F!==(s!==null&&s.memoizedState!==null)&&F&&(h.child.flags|=8192,(h.mode&1)!==0&&(s===null||(un.current&1)!==0?La===0&&(La=3):X0())),h.updateQueue!==null&&(h.flags|=4),Oo(h),null);case 4:return ln(),I0(s,h),s===null&&Ts(h.stateNode.containerInfo),Oo(h),null;case 10:return wn(h.type._context),Oo(h),null;case 17:return da(h.type)&&lu(),Oo(h),null;case 19:if(Yr(un),ne=h.memoizedState,ne===null)return Oo(h),null;if(F=(h.flags&128)!==0,ge=ne.rendering,ge===null)if(F)Wh(ne,!1);else{if(La!==0||s!==null&&(s.flags&128)!==0)for(s=h.child;s!==null;){if(ge=io(s),ge!==null){for(h.flags|=128,Wh(ne,!1),F=ge.updateQueue,F!==null&&(h.updateQueue=F,h.flags|=4),h.subtreeFlags=0,F=P,P=h.child;P!==null;)ne=P,s=F,ne.flags&=14680066,ge=ne.alternate,ge===null?(ne.childLanes=0,ne.lanes=s,ne.child=null,ne.subtreeFlags=0,ne.memoizedProps=null,ne.memoizedState=null,ne.updateQueue=null,ne.dependencies=null,ne.stateNode=null):(ne.childLanes=ge.childLanes,ne.lanes=ge.lanes,ne.child=ge.child,ne.subtreeFlags=0,ne.deletions=null,ne.memoizedProps=ge.memoizedProps,ne.memoizedState=ge.memoizedState,ne.updateQueue=ge.updateQueue,ne.type=ge.type,s=ge.dependencies,ne.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),P=P.sibling;return tn(un,un.current&1|2),h.child}s=s.sibling}ne.tail!==null&&bn()>uh&&(h.flags|=128,F=!0,Wh(ne,!1),h.lanes=4194304)}else{if(!F)if(s=io(ge),s!==null){if(h.flags|=128,F=!0,P=s.updateQueue,P!==null&&(h.updateQueue=P,h.flags|=4),Wh(ne,!0),ne.tail===null&&ne.tailMode==="hidden"&&!ge.alternate&&!ot)return Oo(h),null}else 2*bn()-ne.renderingStartTime>uh&&P!==1073741824&&(h.flags|=128,F=!0,Wh(ne,!1),h.lanes=4194304);ne.isBackwards?(ge.sibling=h.child,h.child=ge):(P=ne.last,P!==null?P.sibling=ge:h.child=ge,ne.last=ge)}return ne.tail!==null?(h=ne.tail,ne.rendering=h,ne.tail=h.sibling,ne.renderingStartTime=bn(),h.sibling=null,P=un.current,tn(un,F?P&1|2:P&1),h):(Oo(h),null);case 22:case 23:return Y0(),F=h.memoizedState!==null,s!==null&&s.memoizedState!==null!==F&&(h.flags|=8192),F&&(h.mode&1)!==0?(js&1073741824)!==0&&(Oo(h),h.subtreeFlags&6&&(h.flags|=8192)):Oo(h),null;case 24:return null;case 25:return null}throw Error(r(156,h.tag))}function R7(s,h){switch(Ye(h),h.tag){case 1:return da(h.type)&&lu(),s=h.flags,s&65536?(h.flags=s&-65537|128,h):null;case 3:return ln(),Yr(ha),Yr(Mi),va(),s=h.flags,(s&65536)!==0&&(s&128)===0?(h.flags=s&-65537|128,h):null;case 5:return Is(h),null;case 13:if(Yr(un),s=h.memoizedState,s!==null&&s.dehydrated!==null){if(h.alternate===null)throw Error(r(340));Tt()}return s=h.flags,s&65536?(h.flags=s&-65537|128,h):null;case 19:return Yr(un),null;case 4:return ln(),null;case 10:return wn(h.type._context),null;case 22:case 23:return Y0(),null;case 24:return null;default:return null}}var jp=!1,Co=!1,M7=typeof WeakSet=="function"?WeakSet:Set,zt=null;function sh(s,h){var P=s.ref;if(P!==null)if(typeof P=="function")try{P(null)}catch(F){ji(s,h,F)}else P.current=null}function F0(s,h,P){try{P()}catch(F){ji(s,h,F)}}var Gm=!1;function I7(s,h){if(zu=Xl,s=ui(),yl(s)){if("selectionStart"in s)var P={start:s.selectionStart,end:s.selectionEnd};else e:{P=(P=s.ownerDocument)&&P.defaultView||window;var F=P.getSelection&&P.getSelection();if(F&&F.rangeCount!==0){P=F.anchorNode;var K=F.anchorOffset,ne=F.focusNode;F=F.focusOffset;try{P.nodeType,ne.nodeType}catch{P=null;break e}var ge=0,Ie=-1,Be=-1,tt=0,gt=0,mt=s,dt=null;t:for(;;){for(var Ft;mt!==P||K!==0&&mt.nodeType!==3||(Ie=ge+K),mt!==ne||F!==0&&mt.nodeType!==3||(Be=ge+F),mt.nodeType===3&&(ge+=mt.nodeValue.length),(Ft=mt.firstChild)!==null;)dt=mt,mt=Ft;for(;;){if(mt===s)break t;if(dt===P&&++tt===K&&(Ie=ge),dt===ne&&++gt===F&&(Be=ge),(Ft=mt.nextSibling)!==null)break;mt=dt,dt=mt.parentNode}mt=Ft}P=Ie===-1||Be===-1?null:{start:Ie,end:Be}}else P=null}P=P||{start:0,end:0}}else P=null;for(Al={focusedElem:s,selectionRange:P},Xl=!1,zt=h;zt!==null;)if(h=zt,s=h.child,(h.subtreeFlags&1028)!==0&&s!==null)s.return=h,zt=s;else for(;zt!==null;){h=zt;try{var Ht=h.alternate;if((h.flags&1024)!==0)switch(h.tag){case 0:case 11:case 15:break;case 1:if(Ht!==null){var Gt=Ht.memoizedProps,ta=Ht.memoizedState,Qe=h.stateNode,Ve=Qe.getSnapshotBeforeUpdate(h.elementType===h.type?Gt:Na(h.type,Gt),ta);Qe.__reactInternalSnapshotBeforeUpdate=Ve}break;case 3:var Je=h.stateNode.containerInfo;Je.nodeType===1?Je.textContent="":Je.nodeType===9&&Je.documentElement&&Je.removeChild(Je.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(wt){ji(h,h.return,wt)}if(s=h.sibling,s!==null){s.return=h.return,zt=s;break}zt=h.return}return Ht=Gm,Gm=!1,Ht}function Yh(s,h,P){var F=h.updateQueue;if(F=F!==null?F.lastEffect:null,F!==null){var K=F=F.next;do{if((K.tag&s)===s){var ne=K.destroy;K.destroy=void 0,ne!==void 0&&F0(h,P,ne)}K=K.next}while(K!==F)}}function Dp(s,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var P=h=h.next;do{if((P.tag&s)===s){var F=P.create;P.destroy=F()}P=P.next}while(P!==h)}}function j0(s){var h=s.ref;if(h!==null){var P=s.stateNode;switch(s.tag){case 5:s=P;break;default:s=P}typeof h=="function"?h(s):h.current=s}}function $m(s){var h=s.alternate;h!==null&&(s.alternate=null,$m(h)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(h=s.stateNode,h!==null&&(delete h[Ao],delete h[ou],delete h[Ca],delete h[Jf],delete h[eh])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Wm(s){return s.tag===5||s.tag===3||s.tag===4}function Ym(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Wm(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function D0(s,h,P){var F=s.tag;if(F===5||F===6)s=s.stateNode,h?P.nodeType===8?P.parentNode.insertBefore(s,h):P.insertBefore(s,h):(P.nodeType===8?(h=P.parentNode,h.insertBefore(s,P)):(h=P,h.appendChild(s)),P=P._reactRootContainer,P!=null||h.onclick!==null||(h.onclick=Rs));else if(F!==4&&(s=s.child,s!==null))for(D0(s,h,P),s=s.sibling;s!==null;)D0(s,h,P),s=s.sibling}function B0(s,h,P){var F=s.tag;if(F===5||F===6)s=s.stateNode,h?P.insertBefore(s,h):P.appendChild(s);else if(F!==4&&(s=s.child,s!==null))for(B0(s,h,P),s=s.sibling;s!==null;)B0(s,h,P),s=s.sibling}var co=null,Ll=!1;function Rc(s,h,P){for(P=P.child;P!==null;)Xm(s,h,P),P=P.sibling}function Xm(s,h,P){if(oi&&typeof oi.onCommitFiberUnmount=="function")try{oi.onCommitFiberUnmount(po,P)}catch{}switch(P.tag){case 5:Co||sh(P,h);case 6:var F=co,K=Ll;co=null,Rc(s,h,P),co=F,Ll=K,co!==null&&(Ll?(s=co,P=P.stateNode,s.nodeType===8?s.parentNode.removeChild(P):s.removeChild(P)):co.removeChild(P.stateNode));break;case 18:co!==null&&(Ll?(s=co,P=P.stateNode,s.nodeType===8?Sc(s.parentNode,P):s.nodeType===1&&Sc(s,P),mi(s)):Sc(co,P.stateNode));break;case 4:F=co,K=Ll,co=P.stateNode.containerInfo,Ll=!0,Rc(s,h,P),co=F,Ll=K;break;case 0:case 11:case 14:case 15:if(!Co&&(F=P.updateQueue,F!==null&&(F=F.lastEffect,F!==null))){K=F=F.next;do{var ne=K,ge=ne.destroy;ne=ne.tag,ge!==void 0&&((ne&2)!==0||(ne&4)!==0)&&F0(P,h,ge),K=K.next}while(K!==F)}Rc(s,h,P);break;case 1:if(!Co&&(sh(P,h),F=P.stateNode,typeof F.componentWillUnmount=="function"))try{F.props=P.memoizedProps,F.state=P.memoizedState,F.componentWillUnmount()}catch(Ie){ji(P,h,Ie)}Rc(s,h,P);break;case 21:Rc(s,h,P);break;case 22:P.mode&1?(Co=(F=Co)||P.memoizedState!==null,Rc(s,h,P),Co=F):Rc(s,h,P);break;default:Rc(s,h,P)}}function Km(s){var h=s.updateQueue;if(h!==null){s.updateQueue=null;var P=s.stateNode;P===null&&(P=s.stateNode=new M7),h.forEach(function(F){var K=V7.bind(null,s,F);P.has(F)||(P.add(F),F.then(K,K))})}}function Tl(s,h){var P=h.deletions;if(P!==null)for(var F=0;F<P.length;F++){var K=P[F];try{var ne=s,ge=h,Ie=ge;e:for(;Ie!==null;){switch(Ie.tag){case 5:co=Ie.stateNode,Ll=!1;break e;case 3:co=Ie.stateNode.containerInfo,Ll=!0;break e;case 4:co=Ie.stateNode.containerInfo,Ll=!0;break e}Ie=Ie.return}if(co===null)throw Error(r(160));Xm(ne,ge,K),co=null,Ll=!1;var Be=K.alternate;Be!==null&&(Be.return=null),K.return=null}catch(tt){ji(K,h,tt)}}if(h.subtreeFlags&12854)for(h=h.child;h!==null;)Zm(h,s),h=h.sibling}function Zm(s,h){var P=s.alternate,F=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Tl(h,s),gu(s),F&4){try{Yh(3,s,s.return),Dp(3,s)}catch(Gt){ji(s,s.return,Gt)}try{Yh(5,s,s.return)}catch(Gt){ji(s,s.return,Gt)}}break;case 1:Tl(h,s),gu(s),F&512&&P!==null&&sh(P,P.return);break;case 5:if(Tl(h,s),gu(s),F&512&&P!==null&&sh(P,P.return),s.flags&32){var K=s.stateNode;try{ht(K,"")}catch(Gt){ji(s,s.return,Gt)}}if(F&4&&(K=s.stateNode,K!=null)){var ne=s.memoizedProps,ge=P!==null?P.memoizedProps:ne,Ie=s.type,Be=s.updateQueue;if(s.updateQueue=null,Be!==null)try{Ie==="input"&&ne.type==="radio"&&ne.name!=null&&Te(K,ne),ze(Ie,ge);var tt=ze(Ie,ne);for(ge=0;ge<Be.length;ge+=2){var gt=Be[ge],mt=Be[ge+1];gt==="style"?Pt(K,mt):gt==="dangerouslySetInnerHTML"?bt(K,mt):gt==="children"?ht(K,mt):w(K,gt,mt,tt)}switch(Ie){case"input":Ae(K,ne);break;case"textarea":je(K,ne);break;case"select":var dt=K._wrapperState.wasMultiple;K._wrapperState.wasMultiple=!!ne.multiple;var Ft=ne.value;Ft!=null?Le(K,!!ne.multiple,Ft,!1):dt!==!!ne.multiple&&(ne.defaultValue!=null?Le(K,!!ne.multiple,ne.defaultValue,!0):Le(K,!!ne.multiple,ne.multiple?[]:"",!1))}K[ou]=ne}catch(Gt){ji(s,s.return,Gt)}}break;case 6:if(Tl(h,s),gu(s),F&4){if(s.stateNode===null)throw Error(r(162));K=s.stateNode,ne=s.memoizedProps;try{K.nodeValue=ne}catch(Gt){ji(s,s.return,Gt)}}break;case 3:if(Tl(h,s),gu(s),F&4&&P!==null&&P.memoizedState.isDehydrated)try{mi(h.containerInfo)}catch(Gt){ji(s,s.return,Gt)}break;case 4:Tl(h,s),gu(s);break;case 13:Tl(h,s),gu(s),K=s.child,K.flags&8192&&(ne=K.memoizedState!==null,K.stateNode.isHidden=ne,!ne||K.alternate!==null&&K.alternate.memoizedState!==null||(q0=bn())),F&4&&Km(s);break;case 22:if(gt=P!==null&&P.memoizedState!==null,s.mode&1?(Co=(tt=Co)||gt,Tl(h,s),Co=tt):Tl(h,s),gu(s),F&8192){if(tt=s.memoizedState!==null,(s.stateNode.isHidden=tt)&&!gt&&(s.mode&1)!==0)for(zt=s,gt=s.child;gt!==null;){for(mt=zt=gt;zt!==null;){switch(dt=zt,Ft=dt.child,dt.tag){case 0:case 11:case 14:case 15:Yh(4,dt,dt.return);break;case 1:sh(dt,dt.return);var Ht=dt.stateNode;if(typeof Ht.componentWillUnmount=="function"){F=dt,P=dt.return;try{h=F,Ht.props=h.memoizedProps,Ht.state=h.memoizedState,Ht.componentWillUnmount()}catch(Gt){ji(F,P,Gt)}}break;case 5:sh(dt,dt.return);break;case 22:if(dt.memoizedState!==null){ey(mt);continue}}Ft!==null?(Ft.return=dt,zt=Ft):ey(mt)}gt=gt.sibling}e:for(gt=null,mt=s;;){if(mt.tag===5){if(gt===null){gt=mt;try{K=mt.stateNode,tt?(ne=K.style,typeof ne.setProperty=="function"?ne.setProperty("display","none","important"):ne.display="none"):(Ie=mt.stateNode,Be=mt.memoizedProps.style,ge=Be!=null&&Be.hasOwnProperty("display")?Be.display:null,Ie.style.display=cr("display",ge))}catch(Gt){ji(s,s.return,Gt)}}}else if(mt.tag===6){if(gt===null)try{mt.stateNode.nodeValue=tt?"":mt.memoizedProps}catch(Gt){ji(s,s.return,Gt)}}else if((mt.tag!==22&&mt.tag!==23||mt.memoizedState===null||mt===s)&&mt.child!==null){mt.child.return=mt,mt=mt.child;continue}if(mt===s)break e;for(;mt.sibling===null;){if(mt.return===null||mt.return===s)break e;gt===mt&&(gt=null),mt=mt.return}gt===mt&&(gt=null),mt.sibling.return=mt.return,mt=mt.sibling}}break;case 19:Tl(h,s),gu(s),F&4&&Km(s);break;case 21:break;default:Tl(h,s),gu(s)}}function gu(s){var h=s.flags;if(h&2){try{e:{for(var P=s.return;P!==null;){if(Wm(P)){var F=P;break e}P=P.return}throw Error(r(160))}switch(F.tag){case 5:var K=F.stateNode;F.flags&32&&(ht(K,""),F.flags&=-33);var ne=Ym(s);B0(s,ne,K);break;case 3:case 4:var ge=F.stateNode.containerInfo,Ie=Ym(s);D0(s,Ie,ge);break;default:throw Error(r(161))}}catch(Be){ji(s,s.return,Be)}s.flags&=-3}h&4096&&(s.flags&=-4097)}function F7(s,h,P){zt=s,Qm(s)}function Qm(s,h,P){for(var F=(s.mode&1)!==0;zt!==null;){var K=zt,ne=K.child;if(K.tag===22&&F){var ge=K.memoizedState!==null||jp;if(!ge){var Ie=K.alternate,Be=Ie!==null&&Ie.memoizedState!==null||Co;Ie=jp;var tt=Co;if(jp=ge,(Co=Be)&&!tt)for(zt=K;zt!==null;)ge=zt,Be=ge.child,ge.tag===22&&ge.memoizedState!==null?ty(K):Be!==null?(Be.return=ge,zt=Be):ty(K);for(;ne!==null;)zt=ne,Qm(ne),ne=ne.sibling;zt=K,jp=Ie,Co=tt}Jm(s)}else(K.subtreeFlags&8772)!==0&&ne!==null?(ne.return=K,zt=ne):Jm(s)}}function Jm(s){for(;zt!==null;){var h=zt;if((h.flags&8772)!==0){var P=h.alternate;try{if((h.flags&8772)!==0)switch(h.tag){case 0:case 11:case 15:Co||Dp(5,h);break;case 1:var F=h.stateNode;if(h.flags&4&&!Co)if(P===null)F.componentDidMount();else{var K=h.elementType===h.type?P.memoizedProps:Na(h.type,P.memoizedProps);F.componentDidUpdate(K,P.memoizedState,F.__reactInternalSnapshotBeforeUpdate)}var ne=h.updateQueue;ne!==null&&zr(h,ne,F);break;case 3:var ge=h.updateQueue;if(ge!==null){if(P=null,h.child!==null)switch(h.child.tag){case 5:P=h.child.stateNode;break;case 1:P=h.child.stateNode}zr(h,ge,P)}break;case 5:var Ie=h.stateNode;if(P===null&&h.flags&4){P=Ie;var Be=h.memoizedProps;switch(h.type){case"button":case"input":case"select":case"textarea":Be.autoFocus&&P.focus();break;case"img":Be.src&&(P.src=Be.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(h.memoizedState===null){var tt=h.alternate;if(tt!==null){var gt=tt.memoizedState;if(gt!==null){var mt=gt.dehydrated;mt!==null&&mi(mt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Co||h.flags&512&&j0(h)}catch(dt){ji(h,h.return,dt)}}if(h===s){zt=null;break}if(P=h.sibling,P!==null){P.return=h.return,zt=P;break}zt=h.return}}function ey(s){for(;zt!==null;){var h=zt;if(h===s){zt=null;break}var P=h.sibling;if(P!==null){P.return=h.return,zt=P;break}zt=h.return}}function ty(s){for(;zt!==null;){var h=zt;try{switch(h.tag){case 0:case 11:case 15:var P=h.return;try{Dp(4,h)}catch(Be){ji(h,P,Be)}break;case 1:var F=h.stateNode;if(typeof F.componentDidMount=="function"){var K=h.return;try{F.componentDidMount()}catch(Be){ji(h,K,Be)}}var ne=h.return;try{j0(h)}catch(Be){ji(h,ne,Be)}break;case 5:var ge=h.return;try{j0(h)}catch(Be){ji(h,ge,Be)}}}catch(Be){ji(h,h.return,Be)}if(h===s){zt=null;break}var Ie=h.sibling;if(Ie!==null){Ie.return=h.return,zt=Ie;break}zt=h.return}}var j7=Math.ceil,Bp=_.ReactCurrentDispatcher,z0=_.ReactCurrentOwner,al=_.ReactCurrentBatchConfig,nn=0,Va=null,ya=null,fo=0,js=0,lh=Po(0),La=0,Xh=null,mf=0,zp=0,U0=0,Kh=null,gs=null,q0=0,uh=1/0,$u=null,Up=!1,H0=null,Mc=null,qp=!1,Ic=null,Hp=0,Zh=0,V0=null,Vp=-1,Gp=0;function Wo(){return(nn&6)!==0?bn():Vp!==-1?Vp:Vp=bn()}function Fc(s){return(s.mode&1)===0?1:(nn&2)!==0&&fo!==0?fo&-fo:Mn.transition!==null?(Gp===0&&(Gp=Ru()),Gp):(s=Ar,s!==0||(s=window.event,s=s===void 0?16:dl(s.type)),s)}function Rl(s,h,P,F){if(50<Zh)throw Zh=0,V0=null,Error(r(185));hl(s,P,F),((nn&2)===0||s!==Va)&&(s===Va&&((nn&2)===0&&(zp|=P),La===4&&jc(s,fo)),vs(s,F),P===1&&nn===0&&(h.mode&1)===0&&(uh=bn()+500,kl&&ie()))}function vs(s,h){var P=s.callbackNode;qn(s,h);var F=Vi(s,s===Va?fo:0);if(F===0)P!==null&&Ko(P),s.callbackNode=null,s.callbackPriority=0;else if(h=F&-F,s.callbackPriority!==h){if(P!=null&&Ko(P),h===1)s.tag===0?te(ny.bind(null,s)):B(ny.bind(null,s)),Zf(function(){(nn&6)===0&&ie()}),P=null;else{switch(go(F)){case 1:P=Zo;break;case 4:P=Sa;break;case 16:P=Qo;break;case 536870912:P=$s;break;default:P=Qo}P=fy(P,ry.bind(null,s))}s.callbackPriority=h,s.callbackNode=P}}function ry(s,h){if(Vp=-1,Gp=0,(nn&6)!==0)throw Error(r(327));var P=s.callbackNode;if(ch()&&s.callbackNode!==P)return null;var F=Vi(s,s===Va?fo:0);if(F===0)return null;if((F&30)!==0||(F&s.expiredLanes)!==0||h)h=$p(s,F);else{h=F;var K=nn;nn|=2;var ne=ay();(Va!==s||fo!==h)&&($u=null,uh=bn()+500,bf(s,h));do try{z7();break}catch(Ie){iy(s,Ie)}while(!0);Dr(),Bp.current=ne,nn=K,ya!==null?h=0:(Va=null,fo=0,h=La)}if(h!==0){if(h===2&&(K=es(s),K!==0&&(F=K,h=G0(s,K))),h===1)throw P=Xh,bf(s,0),jc(s,F),vs(s,bn()),P;if(h===6)jc(s,F);else{if(K=s.current.alternate,(F&30)===0&&!D7(K)&&(h=$p(s,F),h===2&&(ne=es(s),ne!==0&&(F=ne,h=G0(s,ne))),h===1))throw P=Xh,bf(s,0),jc(s,F),vs(s,bn()),P;switch(s.finishedWork=K,s.finishedLanes=F,h){case 0:case 1:throw Error(r(345));case 2:wf(s,gs,$u);break;case 3:if(jc(s,F),(F&130023424)===F&&(h=q0+500-bn(),10<h)){if(Vi(s,0)!==0)break;if(K=s.suspendedLanes,(K&F)!==F){Wo(),s.pingedLanes|=s.suspendedLanes&K;break}s.timeoutHandle=no(wf.bind(null,s,gs,$u),h);break}wf(s,gs,$u);break;case 4:if(jc(s,F),(F&4194240)===F)break;for(h=s.eventTimes,K=-1;0<F;){var ge=31-mr(F);ne=1<<ge,ge=h[ge],ge>K&&(K=ge),F&=~ne}if(F=K,F=bn()-F,F=(120>F?120:480>F?480:1080>F?1080:1920>F?1920:3e3>F?3e3:4320>F?4320:1960*j7(F/1960))-F,10<F){s.timeoutHandle=no(wf.bind(null,s,gs,$u),F);break}wf(s,gs,$u);break;case 5:wf(s,gs,$u);break;default:throw Error(r(329))}}}return vs(s,bn()),s.callbackNode===P?ry.bind(null,s):null}function G0(s,h){var P=Kh;return s.current.memoizedState.isDehydrated&&(bf(s,h).flags|=256),s=$p(s,h),s!==2&&(h=gs,gs=P,h!==null&&$0(h)),s}function $0(s){gs===null?gs=s:gs.push.apply(gs,s)}function D7(s){for(var h=s;;){if(h.flags&16384){var P=h.updateQueue;if(P!==null&&(P=P.stores,P!==null))for(var F=0;F<P.length;F++){var K=P[F],ne=K.getSnapshot;K=K.value;try{if(!Gn(ne(),K))return!1}catch{return!1}}}if(P=h.child,h.subtreeFlags&16384&&P!==null)P.return=h,h=P;else{if(h===s)break;for(;h.sibling===null;){if(h.return===null||h.return===s)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function jc(s,h){for(h&=~U0,h&=~zp,s.suspendedLanes|=h,s.pingedLanes&=~h,s=s.expirationTimes;0<h;){var P=31-mr(h),F=1<<P;s[P]=-1,h&=~F}}function ny(s){if((nn&6)!==0)throw Error(r(327));ch();var h=Vi(s,0);if((h&1)===0)return vs(s,bn()),null;var P=$p(s,h);if(s.tag!==0&&P===2){var F=es(s);F!==0&&(h=F,P=G0(s,F))}if(P===1)throw P=Xh,bf(s,0),jc(s,h),vs(s,bn()),P;if(P===6)throw Error(r(345));return s.finishedWork=s.current.alternate,s.finishedLanes=h,wf(s,gs,$u),vs(s,bn()),null}function W0(s,h){var P=nn;nn|=1;try{return s(h)}finally{nn=P,nn===0&&(uh=bn()+500,kl&&ie())}}function yf(s){Ic!==null&&Ic.tag===0&&(nn&6)===0&&ch();var h=nn;nn|=1;var P=al.transition,F=Ar;try{if(al.transition=null,Ar=1,s)return s()}finally{Ar=F,al.transition=P,nn=h,(nn&6)===0&&ie()}}function Y0(){js=lh.current,Yr(lh)}function bf(s,h){s.finishedWork=null,s.finishedLanes=0;var P=s.timeoutHandle;if(P!==-1&&(s.timeoutHandle=-1,xc(P)),ya!==null)for(P=ya.return;P!==null;){var F=P;switch(Ye(F),F.tag){case 1:F=F.type.childContextTypes,F!=null&&lu();break;case 3:ln(),Yr(ha),Yr(Mi),va();break;case 5:Is(F);break;case 4:ln();break;case 13:Yr(un);break;case 19:Yr(un);break;case 10:wn(F.type._context);break;case 22:case 23:Y0()}P=P.return}if(Va=s,ya=s=Dc(s.current,null),fo=js=h,La=0,Xh=null,U0=zp=mf=0,gs=Kh=null,Xr!==null){for(h=0;h<Xr.length;h++)if(P=Xr[h],F=P.interleaved,F!==null){P.interleaved=null;var K=F.next,ne=P.pending;if(ne!==null){var ge=ne.next;ne.next=K,F.next=ge}P.pending=F}Xr=null}return s}function iy(s,h){do{var P=ya;try{if(Dr(),cu.current=Cc,ao){for(var F=rn.memoizedState;F!==null;){var K=F.queue;K!==null&&(K.pending=null),F=F.next}ao=!1}if(Fi=0,jn=Fn=rn=null,ko=!1,oo=0,z0.current=null,P===null||P.return===null){La=1,Xh=h,ya=null;break}e:{var ne=s,ge=P.return,Ie=P,Be=h;if(h=fo,Ie.flags|=32768,Be!==null&&typeof Be=="object"&&typeof Be.then=="function"){var tt=Be,gt=Ie,mt=gt.tag;if((gt.mode&1)===0&&(mt===0||mt===11||mt===15)){var dt=gt.alternate;dt?(gt.updateQueue=dt.updateQueue,gt.memoizedState=dt.memoizedState,gt.lanes=dt.lanes):(gt.updateQueue=null,gt.memoizedState=null)}var Ft=I(ge);if(Ft!==null){Ft.flags&=-257,$(Ft,ge,Ie,ne,h),Ft.mode&1&&m(ne,tt,h),h=Ft,Be=tt;var Ht=h.updateQueue;if(Ht===null){var Gt=new Set;Gt.add(Be),h.updateQueue=Gt}else Ht.add(Be);break e}else{if((h&1)===0){m(ne,tt,h),X0();break e}Be=Error(r(426))}}else if(ot&&Ie.mode&1){var ta=I(ge);if(ta!==null){(ta.flags&65536)===0&&(ta.flags|=256),$(ta,ge,Ie,ne,h),_t(Gu(Be,Ie));break e}}ne=Be=Gu(Be,Ie),La!==4&&(La=2),Kh===null?Kh=[ne]:Kh.push(ne),ne=ge;do{switch(ne.tag){case 3:ne.flags|=65536,h&=-h,ne.lanes|=h;var Qe=Fp(ne,Be,h);Kr(ne,Qe);break e;case 1:Ie=Be;var Ve=ne.type,Je=ne.stateNode;if((ne.flags&128)===0&&(typeof Ve.getDerivedStateFromError=="function"||Je!==null&&typeof Je.componentDidCatch=="function"&&(Mc===null||!Mc.has(Je)))){ne.flags|=65536,h&=-h,ne.lanes|=h;var wt=p(ne,Ie,h);Kr(ne,wt);break e}}ne=ne.return}while(ne!==null)}sy(P)}catch(Wt){h=Wt,ya===P&&P!==null&&(ya=P=P.return);continue}break}while(!0)}function ay(){var s=Bp.current;return Bp.current=Cc,s===null?Cc:s}function X0(){(La===0||La===3||La===2)&&(La=4),Va===null||(mf&268435455)===0&&(zp&268435455)===0||jc(Va,fo)}function $p(s,h){var P=nn;nn|=2;var F=ay();(Va!==s||fo!==h)&&($u=null,bf(s,h));do try{B7();break}catch(K){iy(s,K)}while(!0);if(Dr(),nn=P,Bp.current=F,ya!==null)throw Error(r(261));return Va=null,fo=0,La}function B7(){for(;ya!==null;)oy(ya)}function z7(){for(;ya!==null&&!Vl();)oy(ya)}function oy(s){var h=cy(s.alternate,s,js);s.memoizedProps=s.pendingProps,h===null?sy(s):ya=h,z0.current=null}function sy(s){var h=s;do{var P=h.alternate;if(s=h.return,(h.flags&32768)===0){if(P=T7(P,h,js),P!==null){ya=P;return}}else{if(P=R7(P,h),P!==null){P.flags&=32767,ya=P;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{La=6,ya=null;return}}if(h=h.sibling,h!==null){ya=h;return}ya=h=s}while(h!==null);La===0&&(La=5)}function wf(s,h,P){var F=Ar,K=al.transition;try{al.transition=null,Ar=1,U7(s,h,P,F)}finally{al.transition=K,Ar=F}return null}function U7(s,h,P,F){do ch();while(Ic!==null);if((nn&6)!==0)throw Error(r(327));P=s.finishedWork;var K=s.finishedLanes;if(P===null)return null;if(s.finishedWork=null,s.finishedLanes=0,P===s.current)throw Error(r(177));s.callbackNode=null,s.callbackPriority=0;var ne=P.lanes|P.childLanes;if(ts(s,ne),s===Va&&(ya=Va=null,fo=0),(P.subtreeFlags&2064)===0&&(P.flags&2064)===0||qp||(qp=!0,fy(Qo,function(){return ch(),null})),ne=(P.flags&15990)!==0,(P.subtreeFlags&15990)!==0||ne){ne=al.transition,al.transition=null;var ge=Ar;Ar=1;var Ie=nn;nn|=4,z0.current=null,I7(s,P),Zm(P,s),Jl(Al),Xl=!!zu,Al=zu=null,s.current=P,F7(P),cf(),nn=Ie,Ar=ge,al.transition=ne}else s.current=P;if(qp&&(qp=!1,Ic=s,Hp=K),ne=s.pendingLanes,ne===0&&(Mc=null),an(P.stateNode),vs(s,bn()),h!==null)for(F=s.onRecoverableError,P=0;P<h.length;P++)K=h[P],F(K.value,{componentStack:K.stack,digest:K.digest});if(Up)throw Up=!1,s=H0,H0=null,s;return(Hp&1)!==0&&s.tag!==0&&ch(),ne=s.pendingLanes,(ne&1)!==0?s===V0?Zh++:(Zh=0,V0=s):Zh=0,ie(),null}function ch(){if(Ic!==null){var s=go(Hp),h=al.transition,P=Ar;try{if(al.transition=null,Ar=16>s?16:s,Ic===null)var F=!1;else{if(s=Ic,Ic=null,Hp=0,(nn&6)!==0)throw Error(r(331));var K=nn;for(nn|=4,zt=s.current;zt!==null;){var ne=zt,ge=ne.child;if((zt.flags&16)!==0){var Ie=ne.deletions;if(Ie!==null){for(var Be=0;Be<Ie.length;Be++){var tt=Ie[Be];for(zt=tt;zt!==null;){var gt=zt;switch(gt.tag){case 0:case 11:case 15:Yh(8,gt,ne)}var mt=gt.child;if(mt!==null)mt.return=gt,zt=mt;else for(;zt!==null;){gt=zt;var dt=gt.sibling,Ft=gt.return;if($m(gt),gt===tt){zt=null;break}if(dt!==null){dt.return=Ft,zt=dt;break}zt=Ft}}}var Ht=ne.alternate;if(Ht!==null){var Gt=Ht.child;if(Gt!==null){Ht.child=null;do{var ta=Gt.sibling;Gt.sibling=null,Gt=ta}while(Gt!==null)}}zt=ne}}if((ne.subtreeFlags&2064)!==0&&ge!==null)ge.return=ne,zt=ge;else e:for(;zt!==null;){if(ne=zt,(ne.flags&2048)!==0)switch(ne.tag){case 0:case 11:case 15:Yh(9,ne,ne.return)}var Qe=ne.sibling;if(Qe!==null){Qe.return=ne.return,zt=Qe;break e}zt=ne.return}}var Ve=s.current;for(zt=Ve;zt!==null;){ge=zt;var Je=ge.child;if((ge.subtreeFlags&2064)!==0&&Je!==null)Je.return=ge,zt=Je;else e:for(ge=Ve;zt!==null;){if(Ie=zt,(Ie.flags&2048)!==0)try{switch(Ie.tag){case 0:case 11:case 15:Dp(9,Ie)}}catch(Wt){ji(Ie,Ie.return,Wt)}if(Ie===ge){zt=null;break e}var wt=Ie.sibling;if(wt!==null){wt.return=Ie.return,zt=wt;break e}zt=Ie.return}}if(nn=K,ie(),oi&&typeof oi.onPostCommitFiberRoot=="function")try{oi.onPostCommitFiberRoot(po,s)}catch{}F=!0}return F}finally{Ar=P,al.transition=h}}return!1}function ly(s,h,P){h=Gu(P,h),h=Fp(s,h,1),s=In(s,h,1),h=Wo(),s!==null&&(hl(s,1,h),vs(s,h))}function ji(s,h,P){if(s.tag===3)ly(s,s,P);else for(;h!==null;){if(h.tag===3){ly(h,s,P);break}else if(h.tag===1){var F=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof F.componentDidCatch=="function"&&(Mc===null||!Mc.has(F))){s=Gu(P,s),s=p(h,s,1),h=In(h,s,1),s=Wo(),h!==null&&(hl(h,1,s),vs(h,s));break}}h=h.return}}function q7(s,h,P){var F=s.pingCache;F!==null&&F.delete(h),h=Wo(),s.pingedLanes|=s.suspendedLanes&P,Va===s&&(fo&P)===P&&(La===4||La===3&&(fo&130023424)===fo&&500>bn()-q0?bf(s,0):U0|=P),vs(s,h)}function uy(s,h){h===0&&((s.mode&1)===0?h=1:(h=Hi,Hi<<=1,(Hi&130023424)===0&&(Hi=4194304)));var P=Wo();s=Gr(s,h),s!==null&&(hl(s,h,P),vs(s,P))}function H7(s){var h=s.memoizedState,P=0;h!==null&&(P=h.retryLane),uy(s,P)}function V7(s,h){var P=0;switch(s.tag){case 13:var F=s.stateNode,K=s.memoizedState;K!==null&&(P=K.retryLane);break;case 19:F=s.stateNode;break;default:throw Error(r(314))}F!==null&&F.delete(h),uy(s,P)}var cy;cy=function(s,h,P){if(s!==null)if(s.memoizedProps!==h.pendingProps||ha.current)oe=!0;else{if((s.lanes&P)===0&&(h.flags&128)===0)return oe=!1,M0(s,h,P);oe=(s.flags&131072)!==0}else oe=!1,ot&&(h.flags&1048576)!==0&&Ke(h,we,h.index);switch(h.lanes=0,h.tag){case 2:var F=h.type;Fr(s,h),s=h.pendingProps;var K=Pl(h,Mi.current);_n(h,P),K=nl(null,h,F,s,K,P);var ne=so();return h.flags|=1,typeof K=="object"&&K!==null&&typeof K.render=="function"&&K.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,da(F)?(ne=!0,us(h)):ne=!1,h.memoizedState=K.state!==null&&K.state!==void 0?K.state:null,Ei(h),K.updater=Lc,h.stateNode=K,K._reactInternals=h,ah(h,F,s,P),h=dn(null,h,F,!0,ne,P)):(h.tag=0,ot&&ne&&it(h),Ee(null,h,K,P),h=h.child),h;case 16:F=h.elementType;e:{switch(Fr(s,h),s=h.pendingProps,K=F._init,F=K(F._payload),h.type=F,K=h.tag=$7(F),s=Na(F,s),K){case 0:h=Ot(null,h,F,s,P);break e;case 1:h=Nn(null,h,F,s,P);break e;case 11:h=We(null,h,F,s,P);break e;case 14:h=rt(null,h,F,Na(F.type,s),P);break e}throw Error(r(306,F,""))}return h;case 0:return F=h.type,K=h.pendingProps,K=h.elementType===F?K:Na(F,K),Ot(s,h,F,K,P);case 1:return F=h.type,K=h.pendingProps,K=h.elementType===F?K:Na(F,K),Nn(s,h,F,K,P);case 3:e:{if(uo(h),s===null)throw Error(r(387));F=h.pendingProps,ne=h.memoizedState,K=ne.element,pa(s,h),Ii(h,F,null,P);var ge=h.memoizedState;if(F=ge.element,ne.isDehydrated)if(ne={element:F,isDehydrated:!1,cache:ge.cache,pendingSuspenseBoundaries:ge.pendingSuspenseBoundaries,transitions:ge.transitions},h.updateQueue.baseState=ne,h.memoizedState=ne,h.flags&256){K=Gu(Error(r(423)),h),h=il(s,h,F,P,K);break e}else if(F!==K){K=Gu(Error(r(424)),h),h=il(s,h,F,P,K);break e}else for(Ue=Ki(h.stateNode.containerInfo.firstChild),nt=h,ot=!0,ut=null,P=Ir(h,null,F,P),h.child=P;P;)P.flags=P.flags&-3|4096,P=P.sibling;else{if(Tt(),F===K){h=Ha(s,h,P);break e}Ee(s,h,F,P)}h=h.child}return h;case 5:return uu(h),s===null&&It(h),F=h.type,K=h.pendingProps,ne=s!==null?s.memoizedProps:null,ge=K.children,df(F,K)?ge=null:ne!==null&&df(F,ne)&&(h.flags|=32),pr(s,h),Ee(s,h,ge,P),h.child;case 6:return s===null&&It(h),null;case 13:return at(s,h,P);case 4:return Vo(h,h.stateNode.containerInfo),F=h.pendingProps,s===null?h.child=ni(h,null,F,P):Ee(s,h,F,P),h.child;case 11:return F=h.type,K=h.pendingProps,K=h.elementType===F?K:Na(F,K),We(s,h,F,K,P);case 7:return Ee(s,h,h.pendingProps,P),h.child;case 8:return Ee(s,h,h.pendingProps.children,P),h.child;case 12:return Ee(s,h,h.pendingProps.children,P),h.child;case 10:e:{if(F=h.type._context,K=h.pendingProps,ne=h.memoizedProps,ge=K.value,tn(hi,F._currentValue),F._currentValue=ge,ne!==null)if(Gn(ne.value,ge)){if(ne.children===K.children&&!ha.current){h=Ha(s,h,P);break e}}else for(ne=h.child,ne!==null&&(ne.return=h);ne!==null;){var Ie=ne.dependencies;if(Ie!==null){ge=ne.child;for(var Be=Ie.firstContext;Be!==null;){if(Be.context===F){if(ne.tag===1){Be=Wn(-1,P&-P),Be.tag=2;var tt=ne.updateQueue;if(tt!==null){tt=tt.shared;var gt=tt.pending;gt===null?Be.next=Be:(Be.next=gt.next,gt.next=Be),tt.pending=Be}}ne.lanes|=P,Be=ne.alternate,Be!==null&&(Be.lanes|=P),Br(ne.return,P,h),Ie.lanes|=P;break}Be=Be.next}}else if(ne.tag===10)ge=ne.type===h.type?null:ne.child;else if(ne.tag===18){if(ge=ne.return,ge===null)throw Error(r(341));ge.lanes|=P,Ie=ge.alternate,Ie!==null&&(Ie.lanes|=P),Br(ge,P,h),ge=ne.sibling}else ge=ne.child;if(ge!==null)ge.return=ne;else for(ge=ne;ge!==null;){if(ge===h){ge=null;break}if(ne=ge.sibling,ne!==null){ne.return=ge.return,ge=ne;break}ge=ge.return}ne=ge}Ee(s,h,K.children,P),h=h.child}return h;case 9:return K=h.type,F=h.pendingProps.children,_n(h,P),K=xn(K),F=F(K),h.flags|=1,Ee(s,h,F,P),h.child;case 14:return F=h.type,K=Na(F,h.pendingProps),K=Na(F.type,K),rt(s,h,F,K,P);case 15:return yt(s,h,h.type,h.pendingProps,P);case 17:return F=h.type,K=h.pendingProps,K=h.elementType===F?K:Na(F,K),Fr(s,h),h.tag=1,da(F)?(s=!0,us(h)):s=!1,_n(h,P),Ip(h,F,K),ah(h,F,K,P),dn(null,h,F,!0,s,P);case 19:return ea(s,h,P);case 22:return Bt(s,h,P)}throw Error(r(156,h.tag))};function fy(s,h){return Ps(s,h)}function G7(s,h,P,F){this.tag=s,this.key=P,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=F,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ol(s,h,P,F){return new G7(s,h,P,F)}function K0(s){return s=s.prototype,!(!s||!s.isReactComponent)}function $7(s){if(typeof s=="function")return K0(s)?1:0;if(s!=null){if(s=s.$$typeof,s===C)return 11;if(s===J)return 14}return 2}function Dc(s,h){var P=s.alternate;return P===null?(P=ol(s.tag,h,s.key,s.mode),P.elementType=s.elementType,P.type=s.type,P.stateNode=s.stateNode,P.alternate=s,s.alternate=P):(P.pendingProps=h,P.type=s.type,P.flags=0,P.subtreeFlags=0,P.deletions=null),P.flags=s.flags&14680064,P.childLanes=s.childLanes,P.lanes=s.lanes,P.child=s.child,P.memoizedProps=s.memoizedProps,P.memoizedState=s.memoizedState,P.updateQueue=s.updateQueue,h=s.dependencies,P.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},P.sibling=s.sibling,P.index=s.index,P.ref=s.ref,P}function Wp(s,h,P,F,K,ne){var ge=2;if(F=s,typeof s=="function")K0(s)&&(ge=1);else if(typeof s=="string")ge=5;else e:switch(s){case O:return _f(P.children,K,ne,h);case L:ge=8,K|=8;break;case R:return s=ol(12,P,h,K|2),s.elementType=R,s.lanes=ne,s;case q:return s=ol(13,P,h,K),s.elementType=q,s.lanes=ne,s;case G:return s=ol(19,P,h,K),s.elementType=G,s.lanes=ne,s;case H:return Yp(P,K,ne,h);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case T:ge=10;break e;case k:ge=9;break e;case C:ge=11;break e;case J:ge=14;break e;case ae:ge=16,F=null;break e}throw Error(r(130,s==null?s:typeof s,""))}return h=ol(ge,P,h,K),h.elementType=s,h.type=F,h.lanes=ne,h}function _f(s,h,P,F){return s=ol(7,s,F,h),s.lanes=P,s}function Yp(s,h,P,F){return s=ol(22,s,F,h),s.elementType=H,s.lanes=P,s.stateNode={isHidden:!1},s}function Z0(s,h,P){return s=ol(6,s,null,h),s.lanes=P,s}function Q0(s,h,P){return h=ol(4,s.children!==null?s.children:[],s.key,h),h.lanes=P,h.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},h}function W7(s,h,P,F,K){this.tag=h,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ea(0),this.expirationTimes=Ea(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ea(0),this.identifierPrefix=F,this.onRecoverableError=K,this.mutableSourceEagerHydrationData=null}function J0(s,h,P,F,K,ne,ge,Ie,Be){return s=new W7(s,h,P,Ie,Be),h===1?(h=1,ne===!0&&(h|=8)):h=0,ne=ol(3,null,null,h),s.current=ne,ne.stateNode=s,ne.memoizedState={element:F,isDehydrated:P,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ei(ne),s}function Y7(s,h,P){var F=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:F==null?null:""+F,children:s,containerInfo:h,implementation:P}}function hy(s){if(!s)return ls;s=s._reactInternals;e:{if(Qn(s)!==s||s.tag!==1)throw Error(r(170));var h=s;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(da(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(r(171))}if(s.tag===1){var P=s.type;if(da(P))return qu(s,P,h)}return h}function dy(s,h,P,F,K,ne,ge,Ie,Be){return s=J0(P,F,!0,s,K,ne,ge,Ie,Be),s.context=hy(null),P=s.current,F=Wo(),K=Fc(P),ne=Wn(F,K),ne.callback=h??null,In(P,ne,K),s.current.lanes=K,hl(s,K,F),vs(s,F),s}function Xp(s,h,P,F){var K=h.current,ne=Wo(),ge=Fc(K);return P=hy(P),h.context===null?h.context=P:h.pendingContext=P,h=Wn(ne,ge),h.payload={element:s},F=F===void 0?null:F,F!==null&&(h.callback=F),s=In(K,h,ge),s!==null&&(Rl(s,K,ge,ne),ga(s,K,ge)),ge}function Kp(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function py(s,h){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var P=s.retryLane;s.retryLane=P!==0&&P<h?P:h}}function eg(s,h){py(s,h),(s=s.alternate)&&py(s,h)}function X7(){return null}var gy=typeof reportError=="function"?reportError:function(s){console.error(s)};function tg(s){this._internalRoot=s}Zp.prototype.render=tg.prototype.render=function(s){var h=this._internalRoot;if(h===null)throw Error(r(409));Xp(s,h,null,null)},Zp.prototype.unmount=tg.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var h=s.containerInfo;yf(function(){Xp(null,s,null,null)}),h[Qi]=null}};function Zp(s){this._internalRoot=s}Zp.prototype.unstable_scheduleHydration=function(s){if(s){var h=hc();s={blockedOn:null,target:s,priority:h};for(var P=0;P<vo.length&&h!==0&&h<vo[P].priority;P++);vo.splice(P,0,s),P===0&&Wl(s)}};function rg(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Qp(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function vy(){}function K7(s,h,P,F,K){if(K){if(typeof F=="function"){var ne=F;F=function(){var tt=Kp(ge);ne.call(tt)}}var ge=dy(h,F,s,0,null,!1,!1,"",vy);return s._reactRootContainer=ge,s[Qi]=ge.current,Ts(s.nodeType===8?s.parentNode:s),yf(),ge}for(;K=s.lastChild;)s.removeChild(K);if(typeof F=="function"){var Ie=F;F=function(){var tt=Kp(Be);Ie.call(tt)}}var Be=J0(s,0,!1,null,null,!1,!1,"",vy);return s._reactRootContainer=Be,s[Qi]=Be.current,Ts(s.nodeType===8?s.parentNode:s),yf(function(){Xp(h,Be,P,F)}),Be}function Jp(s,h,P,F,K){var ne=P._reactRootContainer;if(ne){var ge=ne;if(typeof K=="function"){var Ie=K;K=function(){var Be=Kp(ge);Ie.call(Be)}}Xp(h,ge,s,K)}else ge=K7(P,h,s,K,F);return Kp(ge)}rs=function(s){switch(s.tag){case 3:var h=s.stateNode;if(h.current.memoizedState.isDehydrated){var P=Pn(h.pendingLanes);P!==0&&($l(h,P|1),vs(h,bn()),(nn&6)===0&&(uh=bn()+500,ie()))}break;case 13:yf(function(){var F=Gr(s,1);if(F!==null){var K=Wo();Rl(F,s,1,K)}}),eg(s,1)}},Ys=function(s){if(s.tag===13){var h=Gr(s,134217728);if(h!==null){var P=Wo();Rl(h,s,134217728,P)}eg(s,134217728)}},fc=function(s){if(s.tag===13){var h=Fc(s),P=Gr(s,h);if(P!==null){var F=Wo();Rl(P,s,h,F)}eg(s,h)}},hc=function(){return Ar},Xs=function(s,h){var P=Ar;try{return Ar=s,h()}finally{Ar=P}},er=function(s,h,P){switch(h){case"input":if(Ae(s,P),h=P.name,P.type==="radio"&&h!=null){for(P=s;P.parentNode;)P=P.parentNode;for(P=P.querySelectorAll("input[name="+JSON.stringify(""+h)+'][type="radio"]'),h=0;h<P.length;h++){var F=P[h];if(F!==s&&F.form===s.form){var K=xi(F);if(!K)throw Error(r(90));Re(F),Ae(F,K)}}}break;case"textarea":je(s,P);break;case"select":h=P.value,h!=null&&Le(s,!!P.multiple,h,!1)}},Zn=W0,vi=yf;var Z7={usingClientEntryPoint:!1,Events:[su,ci,xi,lr,Oi,W0]},Qh={findFiberByHostInstance:Ms,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Q7={bundleType:Qh.bundleType,version:Qh.version,rendererPackageName:Qh.rendererPackageName,rendererConfig:Qh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Ci(s),s===null?null:s.stateNode},findFiberByHostInstance:Qh.findFiberByHostInstance||X7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var e1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!e1.isDisabled&&e1.supportsFiber)try{po=e1.inject(Q7),oi=e1}catch{}}return ms.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z7,ms.createPortal=function(s,h){var P=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rg(h))throw Error(r(200));return Y7(s,h,null,P)},ms.createRoot=function(s,h){if(!rg(s))throw Error(r(299));var P=!1,F="",K=gy;return h!=null&&(h.unstable_strictMode===!0&&(P=!0),h.identifierPrefix!==void 0&&(F=h.identifierPrefix),h.onRecoverableError!==void 0&&(K=h.onRecoverableError)),h=J0(s,1,!1,null,null,P,!1,F,K),s[Qi]=h.current,Ts(s.nodeType===8?s.parentNode:s),new tg(h)},ms.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var h=s._reactInternals;if(h===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=Ci(h),s=s===null?null:s.stateNode,s},ms.flushSync=function(s){return yf(s)},ms.hydrate=function(s,h,P){if(!Qp(h))throw Error(r(200));return Jp(null,s,h,!0,P)},ms.hydrateRoot=function(s,h,P){if(!rg(s))throw Error(r(405));var F=P!=null&&P.hydratedSources||null,K=!1,ne="",ge=gy;if(P!=null&&(P.unstable_strictMode===!0&&(K=!0),P.identifierPrefix!==void 0&&(ne=P.identifierPrefix),P.onRecoverableError!==void 0&&(ge=P.onRecoverableError)),h=dy(h,null,s,1,P??null,K,!1,ne,ge),s[Qi]=h.current,Ts(s),F)for(s=0;s<F.length;s++)P=F[s],K=P._getVersion,K=K(P._source),h.mutableSourceEagerHydrationData==null?h.mutableSourceEagerHydrationData=[P,K]:h.mutableSourceEagerHydrationData.push(P,K);return new Zp(h)},ms.render=function(s,h,P){if(!Qp(h))throw Error(r(200));return Jp(null,s,h,!1,P)},ms.unmountComponentAtNode=function(s){if(!Qp(s))throw Error(r(40));return s._reactRootContainer?(yf(function(){Jp(null,null,s,!1,function(){s._reactRootContainer=null,s[Qi]=null})}),!0):!1},ms.unstable_batchedUpdates=W0,ms.unstable_renderSubtreeIntoContainer=function(s,h,P,F){if(!Qp(P))throw Error(r(200));if(s==null||s._reactInternals===void 0)throw Error(r(38));return Jp(s,h,P,!1,F)},ms.version="18.3.1-next-f1338f8080-20240426",ms}var xy;function zw(){if(xy)return ig.exports;xy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ig.exports=n9(),ig.exports}var Sy;function i9(){if(Sy)return t1;Sy=1;var e=zw();return t1.createRoot=e.createRoot,t1.hydrateRoot=e.hydrateRoot,t1}var a9=i9();const Uw=lc(a9);function Cr(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(r.length?" "+r.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var o9={};function n0(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:o9}var qw=Object.assign,I1=Object.getOwnPropertyDescriptor,xu=Object.defineProperty,i0=Object.prototype,bv=[];Object.freeze(bv);var tm={};Object.freeze(tm);var s9=typeof Proxy<"u",l9=Object.toString();function Hw(){s9||Cr("Proxy not available")}function Vw(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var wh=function(){};function Vs(e){return typeof e=="function"}function jf(e){var t=typeof e;switch(t){case"string":case"symbol":case"number":return!0}return!1}function a0(e){return e!==null&&typeof e=="object"}function Qc(e){if(!a0(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r.toString()===l9}function Gw(e){var t=e?.constructor;return t?t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction":!1}function o0(e,t,r){xu(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function $w(e,t,r){xu(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function af(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(n){return a0(n)&&n[r]===!0}}function jh(e){return e!=null&&Object.prototype.toString.call(e)==="[object Map]"}function u9(e){var t=Object.getPrototypeOf(e),r=Object.getPrototypeOf(t),n=Object.getPrototypeOf(r);return n===null}function ec(e){return e!=null&&Object.prototype.toString.call(e)==="[object Set]"}var Ww=typeof Object.getOwnPropertySymbols<"u";function c9(e){var t=Object.keys(e);if(!Ww)return t;var r=Object.getOwnPropertySymbols(e);return r.length?[].concat(t,r.filter(function(n){return i0.propertyIsEnumerable.call(e,n)})):t}var s0=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Ww?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function Yw(e){return e===null?null:typeof e=="object"?""+e:e}function nc(e,t){return i0.hasOwnProperty.call(e,t)}var f9=Object.getOwnPropertyDescriptors||function(t){var r={};return s0(t).forEach(function(n){r[n]=I1(t,n)}),r};function Us(e,t){return!!(e&t)}function qs(e,t,r){return r?e|=t:e&=~t,e}function Ey(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function h9(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p9(n.key),n)}}function Dh(e,t,r){return t&&h9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _h(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=g9(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
33
33
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jc.apply(null,arguments)}function Xw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wv(e,t)}function wv(e,t){return wv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},wv(e,t)}function d9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function p9(e){var t=d9(e,"string");return typeof t=="symbol"?t:t+""}function g9(e,t){if(e){if(typeof e=="string")return Ey(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ey(e,t):void 0}}var yu=Symbol("mobx-stored-annotations");function Su(e){function t(r,n){if(yp(n))return e.decorate_20223_(r,n);mp(r,n,e)}return Object.assign(t,e)}function mp(e,t,r){nc(e,yu)||o0(e,yu,Jc({},e[yu])),x9(r)||(e[yu][t]=r)}function v9(e){return nc(e,yu)||o0(e,yu,Jc({},e[yu])),e[yu]}function yp(e){return typeof e=="object"&&typeof e.kind=="string"}var ur=Symbol("mobx administration"),of=function(){function e(r){r===void 0&&(r="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=fn.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=r}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.reportObserved=function(){return h6(this)},t.reportChanged=function(){bs(),d6(this),ws()},t.toString=function(){return this.name_},Dh(e,[{key:"isBeingObserved",get:function(){return Us(this.flags_,e.isBeingObservedMask_)},set:function(n){this.flags_=qs(this.flags_,e.isBeingObservedMask_,n)}},{key:"isPendingUnobservation",get:function(){return Us(this.flags_,e.isPendingUnobservationMask_)},set:function(n){this.flags_=qs(this.flags_,e.isPendingUnobservationMask_,n)}},{key:"diffValue",get:function(){return Us(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=qs(this.flags_,e.diffValueMask_,n===1)}}])}();of.isBeingObservedMask_=1;of.isPendingUnobservationMask_=2;of.diffValueMask_=4;var rm=af("Atom",of);function F1(e,t,r){t===void 0&&(t=wh),r===void 0&&(r=wh);var n=new of(e);return t!==wh&&Ax(n,t),r!==wh&&_6(n,r),n}function m9(e,t){return D6(e,t)}function y9(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Nh={structural:m9,default:y9};function Df(e,t,r){return P6(e)?e:Array.isArray(e)?$r.array(e,{name:r}):Qc(e)?$r.object(e,void 0,{name:r}):jh(e)?$r.map(e,{name:r}):ec(e)?$r.set(e,{name:r}):typeof e=="function"&&!ap(e)&&!op(e)?Gw(e)?Lh(e):ip(r,e):e}function b9(e,t,r){if(e==null||Ul(e)||Lu(e)||fl(e)||Xo(e))return e;if(Array.isArray(e))return $r.array(e,{name:r,deep:!1});if(Qc(e))return $r.object(e,void 0,{name:r,deep:!1});if(jh(e))return $r.map(e,{name:r,deep:!1});if(ec(e))return $r.set(e,{name:r,deep:!1})}function l0(e){return e}function w9(e,t){return D6(e,t)?t:e}var _9="override";function x9(e){return e.annotationType_===_9}function bp(e,t){return{annotationType_:e,options_:t,make_:S9,extend_:E9,decorate_20223_:A9}}function S9(e,t,r,n){var i;if((i=this.options_)!=null&&i.bound)return this.extend_(e,t,r,!1)===null?0:1;if(n===e.target_)return this.extend_(e,t,r,!1)===null?0:2;if(ap(r.value))return 1;var a=Kw(e,this,t,r,!1);return xu(n,t,a),2}function E9(e,t,r,n){var i=Kw(e,this,t,r);return e.defineProperty_(t,i,n)}function A9(e,t){var r=t.kind,n=t.name,i=t.addInitializer,a=this,l=function(d){var f,v,g,c;return ef((f=(v=a.options_)==null?void 0:v.name)!=null?f:n.toString(),d,(g=(c=a.options_)==null?void 0:c.autoAction)!=null?g:!1)};if(r=="field")return function(u){var d,f=u;return ap(f)||(f=l(f)),(d=a.options_)!=null&&d.bound&&(f=f.bind(this),f.isMobxAction=!0),f};if(r=="method"){var o;return ap(e)||(e=l(e)),(o=this.options_)!=null&&o.bound&&i(function(){var u=this,d=u[n].bind(u);d.isMobxAction=!0,u[n]=d}),e}Cr("Cannot apply '"+a.annotationType_+"' to '"+String(n)+"' (kind: "+r+"):"+(`
|
|
34
34
|
'`+a.annotationType_+"' can only be used on properties with a function value."))}function P9(e,t,r,n){t.annotationType_,n.value}function Kw(e,t,r,n,i){var a,l,o,u,d,f,v;i===void 0&&(i=At.safeDescriptors),P9(e,t,r,n);var g=n.value;if((a=t.options_)!=null&&a.bound){var c;g=g.bind((c=e.proxy_)!=null?c:e.target_)}return{value:ef((l=(o=t.options_)==null?void 0:o.name)!=null?l:r.toString(),g,(u=(d=t.options_)==null?void 0:d.autoAction)!=null?u:!1,(f=t.options_)!=null&&f.bound?(v=e.proxy_)!=null?v:e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function Zw(e,t){return{annotationType_:e,options_:t,make_:k9,extend_:O9,decorate_20223_:C9}}function k9(e,t,r,n){var i;if(n===e.target_)return this.extend_(e,t,r,!1)===null?0:2;if((i=this.options_)!=null&&i.bound&&(!nc(e.target_,t)||!op(e.target_[t]))&&this.extend_(e,t,r,!1)===null)return 0;if(op(r.value))return 1;var a=Qw(e,this,t,r,!1,!1);return xu(n,t,a),2}function O9(e,t,r,n){var i,a=Qw(e,this,t,r,(i=this.options_)==null?void 0:i.bound);return e.defineProperty_(t,a,n)}function C9(e,t){var r,n=t.name,i=t.addInitializer;return op(e)||(e=Lh(e)),(r=this.options_)!=null&&r.bound&&i(function(){var a=this,l=a[n].bind(a);l.isMobXFlow=!0,a[n]=l}),e}function N9(e,t,r,n){t.annotationType_,n.value}function Qw(e,t,r,n,i,a){a===void 0&&(a=At.safeDescriptors),N9(e,t,r,n);var l=n.value;if(op(l)||(l=Lh(l)),i){var o;l=l.bind((o=e.proxy_)!=null?o:e.target_),l.isMobXFlow=!0}return{value:l,configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function nm(e,t){return{annotationType_:e,options_:t,make_:L9,extend_:T9,decorate_20223_:R9}}function L9(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function T9(e,t,r,n){return M9(e,this,t,r),e.defineComputedProperty_(t,Jc({},this.options_,{get:r.get,set:r.set}),n)}function R9(e,t){var r=this,n=t.name,i=t.addInitializer;return i(function(){var a=Bh(this)[ur],l=Jc({},r.options_,{get:e,context:this});l.name||(l.name="ObservableObject."+n.toString()),a.values_.set(n,new Dl(l))}),function(){return this[ur].getObservablePropValue_(n)}}function M9(e,t,r,n){t.annotationType_,n.get}function u0(e,t){return{annotationType_:e,options_:t,make_:I9,extend_:F9,decorate_20223_:j9}}function I9(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function F9(e,t,r,n){var i,a;return D9(e,this),e.defineObservableProperty_(t,r.value,(i=(a=this.options_)==null?void 0:a.enhancer)!=null?i:Df,n)}function j9(e,t){var r=this,n=t.kind,i=t.name,a=new WeakSet;function l(o,u){var d,f,v=Bh(o)[ur],g=new Zc(u,(d=(f=r.options_)==null?void 0:f.enhancer)!=null?d:Df,"ObservableObject."+i.toString(),!1);v.values_.set(i,g),a.add(o)}if(n=="accessor")return{get:function(){return a.has(this)||l(this,e.get.call(this)),this[ur].getObservablePropValue_(i)},set:function(u){return a.has(this)||l(this,u),this[ur].setObservablePropValue_(i,u)},init:function(u){return a.has(this)||l(this,u),u}}}function D9(e,t,r,n){t.annotationType_}var B9="true",z9=Jw();function Jw(e){return{annotationType_:B9,options_:e,make_:U9,extend_:q9,decorate_20223_:H9}}function U9(e,t,r,n){var i,a;if(r.get)return qf.make_(e,t,r,n);if(r.set){var l=ef(t.toString(),r.set);return n===e.target_?e.defineProperty_(t,{configurable:At.safeDescriptors?e.isPlainObject_:!0,set:l})===null?0:2:(xu(n,t,{configurable:!0,set:l}),2)}if(n!==e.target_&&typeof r.value=="function"){var o;if(Gw(r.value)){var u,d=(u=this.options_)!=null&&u.autoBind?Lh.bound:Lh;return d.make_(e,t,r,n)}var f=(o=this.options_)!=null&&o.autoBind?ip.bound:ip;return f.make_(e,t,r,n)}var v=((i=this.options_)==null?void 0:i.deep)===!1?$r.ref:$r;if(typeof r.value=="function"&&(a=this.options_)!=null&&a.autoBind){var g;r.value=r.value.bind((g=e.proxy_)!=null?g:e.target_)}return v.make_(e,t,r,n)}function q9(e,t,r,n){var i,a;if(r.get)return qf.extend_(e,t,r,n);if(r.set)return e.defineProperty_(t,{configurable:At.safeDescriptors?e.isPlainObject_:!0,set:ef(t.toString(),r.set)},n);if(typeof r.value=="function"&&(i=this.options_)!=null&&i.autoBind){var l;r.value=r.value.bind((l=e.proxy_)!=null?l:e.target_)}var o=((a=this.options_)==null?void 0:a.deep)===!1?$r.ref:$r;return o.extend_(e,t,r,n)}function H9(e,t){Cr("'"+this.annotationType_+"' cannot be used as a decorator")}var V9="observable",G9="observable.ref",$9="observable.shallow",W9="observable.struct",e6={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(e6);function r1(e){return e||e6}var _v=u0(V9),Y9=u0(G9,{enhancer:l0}),X9=u0($9,{enhancer:b9}),K9=u0(W9,{enhancer:w9}),t6=Su(_v);function n1(e){return e.deep===!0?Df:e.deep===!1?l0:Q9(e.defaultDecorator)}function Z9(e){var t;return e?(t=e.defaultDecorator)!=null?t:Jw(e):void 0}function Q9(e){var t,r;return e&&(t=(r=e.options_)==null?void 0:r.enhancer)!=null?t:Df}function r6(e,t,r){if(yp(t))return _v.decorate_20223_(e,t);if(jf(t)){mp(e,t,_v);return}return P6(e)?e:Qc(e)?$r.object(e,t,r):Array.isArray(e)?$r.array(e,t):jh(e)?$r.map(e,t):ec(e)?$r.set(e,t):typeof e=="object"&&e!==null?e:$r.box(e,t)}qw(r6,t6);var J9={box:function(t,r){var n=r1(r);return new Zc(t,n1(n),n.name,!0,n.equals)},array:function(t,r){var n=r1(r);return(At.useProxies===!1||n.proxy===!1?tS:Gx)(t,n1(n),n.name)},map:function(t,r){var n=r1(r);return new lm(t,n1(n),n.name)},set:function(t,r){var n=r1(r);return new R6(t,n1(n),n.name)},object:function(t,r,n){return Vf(function(){return Cx(At.useProxies===!1||n?.proxy===!1?Bh({},n):qx({},n),t,r)})},ref:Su(Y9),shallow:Su(X9),deep:t6,struct:Su(K9)},$r=qw(r6,J9),n6="computed",ex="computed.struct",xv=nm(n6),tx=nm(ex,{equals:Nh.structural}),qf=function(t,r){if(yp(r))return xv.decorate_20223_(t,r);if(jf(r))return mp(t,r,xv);if(Qc(t))return Su(nm(n6,t));var n=Qc(r)?r:{};return n.get=t,n.name||(n.name=t.name||""),new Dl(n)};Object.assign(qf,xv);qf.struct=Su(tx);var Ay,Py,j1=0,rx=1,nx=(Ay=(Py=I1(function(){},"name"))==null?void 0:Py.configurable)!=null?Ay:!1,ky={value:"action",configurable:!0,writable:!1,enumerable:!1};function ef(e,t,r,n){r===void 0&&(r=!1);function i(){return i6(e,r,t,n||this,arguments)}return i.isMobxAction=!0,i.toString=function(){return t.toString()},nx&&(ky.value=e,xu(i,"name",ky)),i}function i6(e,t,r,n,i){var a=ix(e,t);try{return r.apply(n,i)}catch(l){throw a.error_=l,l}finally{ax(a)}}function ix(e,t,r,n){var i=!1,a=0,l=At.trackingDerivation,o=!t||!l;bs();var u=At.allowStateChanges;o&&(Hf(),u=c0(!0));var d=im(!0),f={runAsAction_:o,prevDerivation_:l,prevAllowStateChanges_:u,prevAllowStateReads_:d,notifySpy_:i,startTime_:a,actionId_:rx++,parentActionId_:j1};return j1=f.actionId_,f}function ax(e){j1!==e.actionId_&&Cr(30),j1=e.parentActionId_,e.error_!==void 0&&(At.suppressReactionErrors=!0),f0(e.prevAllowStateChanges_),Xd(e.prevAllowStateReads_),ws(),e.runAsAction_&&ic(e.prevDerivation_),At.suppressReactionErrors=!1}function a6(e,t){var r=c0(e);try{return t()}finally{f0(r)}}function c0(e){var t=At.allowStateChanges;return At.allowStateChanges=e,t}function f0(e){At.allowStateChanges=e}var Zc=function(e){function t(n,i,a,l,o){var u;return a===void 0&&(a="ObservableValue"),o===void 0&&(o=Nh.default),u=e.call(this,a)||this,u.enhancer=void 0,u.name_=void 0,u.equals=void 0,u.hasUnreportedChange_=!1,u.interceptors_=void 0,u.changeListeners_=void 0,u.value_=void 0,u.dehancer=void 0,u.enhancer=i,u.name_=a,u.equals=o,u.value_=i(n,void 0,a),u}Xw(t,e);var r=t.prototype;return r.dehanceValue=function(i){return this.dehancer!==void 0?this.dehancer(i):i},r.set=function(i){this.value_,i=this.prepareNewValue_(i),i!==At.UNCHANGED&&this.setNewValue_(i)},r.prepareNewValue_=function(i){if(sl(this)){var a=ll(this,{object:this,type:Eu,newValue:i});if(!a)return At.UNCHANGED;i=a.newValue}return i=this.enhancer(i,this.value_,this.name_),this.equals(this.value_,i)?At.UNCHANGED:i},r.setNewValue_=function(i){var a=this.value_;this.value_=i,this.reportChanged(),Fl(this)&&jl(this,{type:Eu,object:this,newValue:i,oldValue:a})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(i){return wp(this,i)},r.observe_=function(i,a){return a&&i({observableKind:"value",debugObjectName:this.name_,object:this,type:Eu,newValue:this.value_,oldValue:void 0}),_p(this,i)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+"["+this.value_+"]"},r.valueOf=function(){return Yw(this.get())},r[Symbol.toPrimitive]=function(){return this.valueOf()},t}(of),ox=af("ObservableValue",Zc),Dl=function(){function e(r){this.dependenciesState_=fn.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=fn.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new B1(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=D1.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,r.get||Cr(31),this.derivation=r.get,this.name_=r.name||"ComputedValue",r.set&&(this.setter_=ef("ComputedValue-setter",r.set)),this.equals_=r.equals||(r.compareStructural||r.struct?Nh.structural:Nh.default),this.scope_=r.context,this.requiresReaction_=r.requiresReaction,this.keepAlive_=!!r.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){hx(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.get=function(){if(this.isComputing&&Cr(32,this.name_,this.derivation),At.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)Sv(this)&&(this.warnAboutUntrackedRead_(),bs(),this.value_=this.computeValue_(!1),ws());else if(h6(this),Sv(this)){var n=At.trackingContext;this.keepAlive_&&!n&&(At.trackingContext=this),this.trackAndCompute()&&fx(this),At.trackingContext=n}var i=this.value_;if(w1(i))throw i.cause;return i},t.set=function(n){if(this.setter_){this.isRunningSetter&&Cr(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,n)}finally{this.isRunningSetter=!1}}else Cr(34,this.name_)},t.trackAndCompute=function(){var n=this.value_,i=this.dependenciesState_===fn.NOT_TRACKING_,a=this.computeValue_(!0),l=i||w1(n)||w1(a)||!this.equals_(n,a);return l&&(this.value_=a),l},t.computeValue_=function(n){this.isComputing=!0;var i=c0(!1),a;if(n)a=o6(this,this.derivation,this.scope_);else if(At.disableErrorBoundaries===!0)a=this.derivation.call(this.scope_);else try{a=this.derivation.call(this.scope_)}catch(l){a=new B1(l)}return f0(i),this.isComputing=!1,a},t.suspend_=function(){this.keepAlive_||(Ev(this),this.value_=void 0)},t.observe_=function(n,i){var a=this,l=!0,o=void 0;return Ou(function(){var u=a.get();if(!l||i){var d=Hf();n({observableKind:"computed",debugObjectName:a.name_,type:Eu,object:a,newValue:u,oldValue:o}),ic(d)}l=!1,o=u})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return Yw(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},Dh(e,[{key:"isComputing",get:function(){return Us(this.flags_,e.isComputingMask_)},set:function(n){this.flags_=qs(this.flags_,e.isComputingMask_,n)}},{key:"isRunningSetter",get:function(){return Us(this.flags_,e.isRunningSetterMask_)},set:function(n){this.flags_=qs(this.flags_,e.isRunningSetterMask_,n)}},{key:"isBeingObserved",get:function(){return Us(this.flags_,e.isBeingObservedMask_)},set:function(n){this.flags_=qs(this.flags_,e.isBeingObservedMask_,n)}},{key:"isPendingUnobservation",get:function(){return Us(this.flags_,e.isPendingUnobservationMask_)},set:function(n){this.flags_=qs(this.flags_,e.isPendingUnobservationMask_,n)}},{key:"diffValue",get:function(){return Us(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=qs(this.flags_,e.diffValueMask_,n===1)}}])}();Dl.isComputingMask_=1;Dl.isRunningSetterMask_=2;Dl.isBeingObservedMask_=4;Dl.isPendingUnobservationMask_=8;Dl.diffValueMask_=16;var h0=af("ComputedValue",Dl),fn;(function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"})(fn||(fn={}));var D1;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(D1||(D1={}));var B1=function(t){this.cause=void 0,this.cause=t};function w1(e){return e instanceof B1}function Sv(e){switch(e.dependenciesState_){case fn.UP_TO_DATE_:return!1;case fn.NOT_TRACKING_:case fn.STALE_:return!0;case fn.POSSIBLY_STALE_:{for(var t=im(!0),r=Hf(),n=e.observing_,i=n.length,a=0;a<i;a++){var l=n[a];if(h0(l)){if(At.disableErrorBoundaries)l.get();else try{l.get()}catch{return ic(r),Xd(t),!0}if(e.dependenciesState_===fn.STALE_)return ic(r),Xd(t),!0}}return l6(e),ic(r),Xd(t),!1}}}function o6(e,t,r){var n=im(!0);l6(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++At.runId;var i=At.trackingDerivation;At.trackingDerivation=e,At.inBatch++;var a;if(At.disableErrorBoundaries===!0)a=t.call(r);else try{a=t.call(r)}catch(l){a=new B1(l)}return At.inBatch--,At.trackingDerivation=i,sx(e),Xd(n),a}function sx(e){for(var t=e.observing_,r=e.observing_=e.newObserving_,n=fn.UP_TO_DATE_,i=0,a=e.unboundDepsCount_,l=0;l<a;l++){var o=r[l];o.diffValue===0&&(o.diffValue=1,i!==l&&(r[i]=o),i++),o.dependenciesState_>n&&(n=o.dependenciesState_)}for(r.length=i,e.newObserving_=null,a=t.length;a--;){var u=t[a];u.diffValue===0&&c6(u,e),u.diffValue=0}for(;i--;){var d=r[i];d.diffValue===1&&(d.diffValue=0,cx(d,e))}n!==fn.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function Ev(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)c6(t[r],e);e.dependenciesState_=fn.NOT_TRACKING_}function s6(e){var t=Hf();try{return e()}finally{ic(t)}}function Hf(){var e=At.trackingDerivation;return At.trackingDerivation=null,e}function ic(e){At.trackingDerivation=e}function im(e){var t=At.allowStateReads;return At.allowStateReads=e,t}function Xd(e){At.allowStateReads=e}function l6(e){if(e.dependenciesState_!==fn.UP_TO_DATE_){e.dependenciesState_=fn.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=fn.UP_TO_DATE_}}var _1=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},x1=!0,u6=!1,At=function(){var e=n0();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(x1=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new _1().version&&(x1=!1),x1?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new _1):(setTimeout(function(){u6||Cr(35)},1),new _1)}();function lx(){if((At.pendingReactions.length||At.inBatch||At.isRunningReactions)&&Cr(36),u6=!0,x1){var e=n0();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),At=new _1}}function ux(){return At}function cx(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function c6(e,t){e.observers_.delete(t),e.observers_.size===0&&f6(e)}function f6(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,At.pendingUnobservations.push(e))}function bs(){At.inBatch++}function ws(){if(--At.inBatch===0){p6();for(var e=At.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation=!1,r.observers_.size===0&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBUO()),r instanceof Dl&&r.suspend_())}At.pendingUnobservations=[]}}function h6(e){var t=At.trackingDerivation;return t!==null?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&At.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(e.observers_.size===0&&At.inBatch>0&&f6(e),!1)}function d6(e){e.lowestObserverState_!==fn.STALE_&&(e.lowestObserverState_=fn.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===fn.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=fn.STALE_}))}function fx(e){e.lowestObserverState_!==fn.STALE_&&(e.lowestObserverState_=fn.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===fn.POSSIBLY_STALE_?t.dependenciesState_=fn.STALE_:t.dependenciesState_===fn.UP_TO_DATE_&&(e.lowestObserverState_=fn.UP_TO_DATE_)}))}function hx(e){e.lowestObserverState_===fn.UP_TO_DATE_&&(e.lowestObserverState_=fn.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===fn.UP_TO_DATE_&&(t.dependenciesState_=fn.POSSIBLY_STALE_,t.onBecomeStale_())}))}var ku=function(){function e(r,n,i,a){r===void 0&&(r="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=fn.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=D1.NONE,this.name_=r,this.onInvalidate_=n,this.errorHandler_=i,this.requiresObservable_=a}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,At.pendingReactions.push(this),p6())},t.runReaction_=function(){if(!this.isDisposed){bs(),this.isScheduled=!1;var n=At.trackingContext;if(At.trackingContext=this,Sv(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(i){this.reportExceptionInDerivation_(i)}}At.trackingContext=n,ws()}},t.track=function(n){if(!this.isDisposed){bs(),this.isRunning=!0;var i=At.trackingContext;At.trackingContext=this;var a=o6(this,n,void 0);At.trackingContext=i,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Ev(this),w1(a)&&this.reportExceptionInDerivation_(a.cause),ws()}},t.reportExceptionInDerivation_=function(n){var i=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(At.disableErrorBoundaries)throw n;var a="[mobx] uncaught error in '"+this+"'";At.suppressReactionErrors||console.error(a,n),At.globalReactionErrorHandlers.forEach(function(l){return l(n,i)})},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(bs(),Ev(this),ws()))},t.getDisposer_=function(n){var i=this,a=function l(){i.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",l)};return n==null||n.addEventListener==null||n.addEventListener("abort",a),a[ur]=this,a},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(n){},Dh(e,[{key:"isDisposed",get:function(){return Us(this.flags_,e.isDisposedMask_)},set:function(n){this.flags_=qs(this.flags_,e.isDisposedMask_,n)}},{key:"isScheduled",get:function(){return Us(this.flags_,e.isScheduledMask_)},set:function(n){this.flags_=qs(this.flags_,e.isScheduledMask_,n)}},{key:"isTrackPending",get:function(){return Us(this.flags_,e.isTrackPendingMask_)},set:function(n){this.flags_=qs(this.flags_,e.isTrackPendingMask_,n)}},{key:"isRunning",get:function(){return Us(this.flags_,e.isRunningMask_)},set:function(n){this.flags_=qs(this.flags_,e.isRunningMask_,n)}},{key:"diffValue",get:function(){return Us(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=qs(this.flags_,e.diffValueMask_,n===1)}}])}();ku.isDisposedMask_=1;ku.isScheduledMask_=2;ku.isTrackPendingMask_=4;ku.isRunningMask_=8;ku.diffValueMask_=16;var dx=100,Av=function(t){return t()};function p6(){At.inBatch>0||At.isRunningReactions||Av(px)}function px(){At.isRunningReactions=!0;for(var e=At.pendingReactions,t=0;e.length>0;){++t===dx&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,i=r.length;n<i;n++)r[n].runReaction_()}At.isRunningReactions=!1}var z1=af("Reaction",ku);function gx(e){var t=Av;Av=function(n){return e(function(){return t(n)})}}function Kd(){return!1}function vx(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var g6="action",mx="action.bound",v6="autoAction",yx="autoAction.bound",m6="<unnamed action>",Pv=bp(g6),bx=bp(mx,{bound:!0}),kv=bp(v6,{autoAction:!0}),wx=bp(yx,{autoAction:!0,bound:!0});function y6(e){var t=function(n,i){if(Vs(n))return ef(n.name||m6,n,e);if(Vs(i))return ef(n,i,e);if(yp(i))return(e?kv:Pv).decorate_20223_(n,i);if(jf(i))return mp(n,i,e?kv:Pv);if(jf(n))return Su(bp(e?v6:g6,{name:n,autoAction:e}))};return t}var Wr=y6(!1);Object.assign(Wr,Pv);var ip=y6(!0);Object.assign(ip,kv);Wr.bound=Su(bx);ip.bound=Su(wx);function tc(e){return i6(e.name||m6,!1,e,this,void 0)}function ap(e){return Vs(e)&&e.isMobxAction===!0}function Ou(e,t){var r,n,i,a;t===void 0&&(t=tm);var l=(r=(n=t)==null?void 0:n.name)!=null?r:"Autorun",o=!t.scheduler&&!t.delay,u;if(o)u=new ku(l,function(){this.track(v)},t.onError,t.requiresObservable);else{var d=b6(t),f=!1;u=new ku(l,function(){f||(f=!0,d(function(){f=!1,u.isDisposed||u.track(v)}))},t.onError,t.requiresObservable)}function v(){e(u)}return(i=t)!=null&&(i=i.signal)!=null&&i.aborted||u.schedule_(),u.getDisposer_((a=t)==null?void 0:a.signal)}var _x=function(t){return t()};function b6(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:_x}function w6(e,t,r){var n,i,a;r===void 0&&(r=tm);var l=(n=r.name)!=null?n:"Reaction",o=Wr(l,r.onError?xx(r.onError,t):t),u=!r.scheduler&&!r.delay,d=b6(r),f=!0,v=!1,g,c=r.compareStructural?Nh.structural:r.equals||Nh.default,y=new ku(l,function(){f||u?x():v||(v=!0,d(x))},r.onError,r.requiresObservable);function x(){if(v=!1,!y.isDisposed){var E=!1,S=g;y.track(function(){var b=a6(!1,function(){return e(y)});E=f||!c(g,b),g=b}),(f&&r.fireImmediately||!f&&E)&&o(g,S,y),f=!1}}return(i=r)!=null&&(i=i.signal)!=null&&i.aborted||y.schedule_(),y.getDisposer_((a=r)==null?void 0:a.signal)}function xx(e,t){return function(){try{return t.apply(this,arguments)}catch(r){e.call(this,r)}}}var Sx="onBO",Ex="onBUO";function Ax(e,t,r){return x6(Sx,e,t,r)}function _6(e,t,r){return x6(Ex,e,t,r)}function x6(e,t,r,n){var i=Th(t),a=Vs(n)?n:r,l=e+"L";return i[l]?i[l].add(a):i[l]=new Set([a]),function(){var o=i[l];o&&(o.delete(a),o.size===0&&delete i[l])}}var Px="never",i1="always",kx="observed";function Ox(e){e.isolateGlobalState===!0&&lx();var t=e.useProxies,r=e.enforceActions;if(t!==void 0&&(At.useProxies=t===i1?!0:t===Px?!1:typeof Proxy<"u"),t==="ifavailable"&&(At.verifyProxies=!0),r!==void 0){var n=r===i1?i1:r===kx;At.enforceActions=n,At.allowStateChanges=!(n===!0||n===i1)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(i){i in e&&(At[i]=!!e[i])}),At.allowStateReads=!At.observableRequiresReaction,e.reactionScheduler&&gx(e.reactionScheduler)}function Cx(e,t,r,n){var i=f9(t);return Vf(function(){var a=Bh(e,n)[ur];s0(i).forEach(function(l){a.extend_(l,i[l],r&&l in r?r[l]:!0)})}),e}function Nx(e,t){return S6(Th(e,t))}function S6(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=Lx(e.observing_).map(S6)),t}function Lx(e){return Array.from(new Set(e))}var Tx=0;function E6(){this.message="FLOW_CANCELLED"}E6.prototype=Object.create(Error.prototype);var sg=Zw("flow"),Rx=Zw("flow.bound",{bound:!0}),Lh=Object.assign(function(t,r){if(yp(r))return sg.decorate_20223_(t,r);if(jf(r))return mp(t,r,sg);var n=t,i=n.name||"<unnamed flow>",a=function(){var o=this,u=arguments,d=++Tx,f=Wr(i+" - runid: "+d+" - init",n).apply(o,u),v,g=void 0,c=new Promise(function(y,x){var E=0;v=x;function S(_){g=void 0;var A;try{A=Wr(i+" - runid: "+d+" - yield "+E++,f.next).call(f,_)}catch(M){return x(M)}w(A)}function b(_){g=void 0;var A;try{A=Wr(i+" - runid: "+d+" - yield "+E++,f.throw).call(f,_)}catch(M){return x(M)}w(A)}function w(_){if(Vs(_?.then)){_.then(w,x);return}return _.done?y(_.value):(g=Promise.resolve(_.value),g.then(S,b))}S(void 0)});return c.cancel=Wr(i+" - runid: "+d+" - cancel",function(){try{g&&Oy(g);var y=f.return(void 0),x=Promise.resolve(y.value);x.then(wh,wh),Oy(x),v(new E6)}catch(E){v(E)}}),c};return a.isMobXFlow=!0,a},sg);Lh.bound=Su(Rx);function Oy(e){Vs(e.cancel)&&e.cancel()}function op(e){return e?.isMobXFlow===!0}function A6(e,t,r){var n;return fl(e)||Lu(e)||ox(e)?n=Cu(e):Ul(e)&&(n=Cu(e,t)),n.dehancer=typeof t=="function"?t:r,function(){n.dehancer=void 0}}function am(e,t,r){return Vs(r)?Ix(e,t,r):Mx(e,t)}function Mx(e,t){return Cu(e).intercept_(t)}function Ix(e,t,r){return Cu(e,t).intercept_(r)}function Fx(e,t){return e?Ul(e)||!!e[ur]||rm(e)||z1(e)||h0(e):!1}function P6(e){return Fx(e)}function U1(e){if(Ul(e))return e[ur].keys_();if(fl(e)||Xo(e))return Array.from(e.keys());if(Lu(e))return e.map(function(t,r){return r});Cr(5)}function k6(e){if(Ul(e))return U1(e).map(function(t){return e[t]});if(fl(e))return U1(e).map(function(t){return e.get(t)});if(Xo(e))return Array.from(e.values());if(Lu(e))return e.slice();Cr(6)}function jx(e){if(Ul(e))return U1(e).map(function(t){return[t,e[t]]});if(fl(e))return U1(e).map(function(t){return[t,e.get(t)]});if(Xo(e))return Array.from(e.entries());if(Lu(e))return e.map(function(t,r){return[r,t]});Cr(7)}function O6(e,t,r){if(arguments.length===2&&!Xo(e)){bs();var n=t;try{for(var i in n)O6(e,i,n[i])}finally{ws()}return}Ul(e)?e[ur].set_(t,r):fl(e)?e.set(t,r):Xo(e)?e.add(t):Lu(e)?(typeof t!="number"&&(t=parseInt(t,10)),t<0&&Cr("Invalid index: '"+t+"'"),bs(),t>=e.length&&(e.length=t+1),e[t]=r,ws()):Cr(8)}function C6(e,t,r){if(Ul(e))return e[ur].defineProperty_(t,r);Cr(39)}function om(e,t,r,n){return Vs(r)?Bx(e,t,r,n):Dx(e,t,r)}function Dx(e,t,r){return Cu(e).observe_(t,r)}function Bx(e,t,r,n){return Cu(e,t).observe_(r,n)}function rc(e,t){t===void 0&&(t=void 0),bs();try{return e.apply(t)}finally{ws()}}function Cy(e,t,r){return arguments.length===1||t&&typeof t=="object"?zx(e,t):N6(e,t,{})}function N6(e,t,r){var n;if(typeof r.timeout=="number"){var i=new Error("WHEN_TIMEOUT");n=setTimeout(function(){if(!l[ur].isDisposed)if(l(),r.onError)r.onError(i);else throw i},r.timeout)}r.name="When";var a=ef("When-effect",t),l=Ou(function(o){var u=a6(!1,e);u&&(o.dispose(),n&&clearTimeout(n),a())},r);return l}function zx(e,t){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var n,i,a=new Promise(function(l,o){var u,d=N6(e,l,Jc({},t,{onError:o}));n=function(){d(),o(new Error("WHEN_CANCELLED"))},i=function(){d(),o(new Error("WHEN_ABORTED"))},t==null||(u=t.signal)==null||u.addEventListener==null||u.addEventListener("abort",i)}).finally(function(){var l;return t==null||(l=t.signal)==null||l.removeEventListener==null?void 0:l.removeEventListener("abort",i)});return a.cancel=n,a}function fh(e){return e[ur]}var Ux={has:function(t,r){return fh(t).has_(r)},get:function(t,r){return fh(t).get_(r)},set:function(t,r,n){var i;return jf(r)?(i=fh(t).set_(r,n,!0))!=null?i:!0:!1},deleteProperty:function(t,r){var n;return jf(r)?(n=fh(t).delete_(r,!0))!=null?n:!0:!1},defineProperty:function(t,r,n){var i;return(i=fh(t).defineProperty_(r,n))!=null?i:!0},ownKeys:function(t){return fh(t).ownKeys_()},preventExtensions:function(t){Cr(13)}};function qx(e,t){var r,n;return Hw(),e=Bh(e,t),(n=(r=e[ur]).proxy_)!=null?n:r.proxy_=new Proxy(e,Ux)}function sl(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function wp(e,t){var r=e.interceptors_||(e.interceptors_=[]);return r.push(t),Vw(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function ll(e,t){var r=Hf();try{for(var n=[].concat(e.interceptors_||[]),i=0,a=n.length;i<a&&(t=n[i](t),t&&!t.type&&Cr(14),!!t);i++);return t}finally{ic(r)}}function Fl(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function _p(e,t){var r=e.changeListeners_||(e.changeListeners_=[]);return r.push(t),Vw(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function jl(e,t){var r=Hf(),n=e.changeListeners_;if(n){n=n.slice();for(var i=0,a=n.length;i<a;i++)n[i](t);ic(r)}}function L6(e,t,r){return Vf(function(){var n,i=Bh(e,r)[ur];(n=t)!=null||(t=v9(e)),s0(t).forEach(function(a){return i.make_(a,t[a])})}),e}var Ny="splice",Eu="update",Hx=1e4,Vx={get:function(t,r){var n=t[ur];return r===ur?n:r==="length"?n.getArrayLength_():typeof r=="string"&&!isNaN(r)?n.get_(parseInt(r)):nc(q1,r)?q1[r]:t[r]},set:function(t,r,n){var i=t[ur];return r==="length"&&i.setArrayLength_(n),typeof r=="symbol"||isNaN(r)?t[r]=n:i.set_(parseInt(r),n),!0},preventExtensions:function(){Cr(15)}},sm=function(){function e(r,n,i,a){r===void 0&&(r="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=i,this.legacyMode_=a,this.atom_=new of(r),this.enhancer_=function(l,o){return n(l,o,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.dehanceValues_=function(n){return this.dehancer!==void 0&&n.length>0?n.map(this.dehancer):n},t.intercept_=function(n){return wp(this,n)},t.observe_=function(n,i){return i===void 0&&(i=!1),i&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),_p(this,n)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&Cr("Out of range: "+n);var i=this.values_.length;if(n!==i)if(n>i){for(var a=new Array(n-i),l=0;l<n-i;l++)a[l]=void 0;this.spliceWithArray_(i,0,a)}else this.spliceWithArray_(n,i-n)},t.updateArrayLength_=function(n,i){n!==this.lastKnownLength_&&Cr(16),this.lastKnownLength_+=i,this.legacyMode_&&i>0&&j6(n+i+1)},t.spliceWithArray_=function(n,i,a){var l=this;this.atom_;var o=this.values_.length;if(n===void 0?n=0:n>o?n=o:n<0&&(n=Math.max(0,o+n)),arguments.length===1?i=o-n:i==null?i=0:i=Math.max(0,Math.min(i,o-n)),a===void 0&&(a=bv),sl(this)){var u=ll(this,{object:this.proxy_,type:Ny,index:n,removedCount:i,added:a});if(!u)return bv;i=u.removedCount,a=u.added}if(a=a.length===0?a:a.map(function(v){return l.enhancer_(v,void 0)}),this.legacyMode_){var d=a.length-i;this.updateArrayLength_(o,d)}var f=this.spliceItemsIntoValues_(n,i,a);return(i!==0||a.length!==0)&&this.notifyArraySplice_(n,a,f),this.dehanceValues_(f)},t.spliceItemsIntoValues_=function(n,i,a){if(a.length<Hx){var l;return(l=this.values_).splice.apply(l,[n,i].concat(a))}else{var o=this.values_.slice(n,n+i),u=this.values_.slice(n+i);this.values_.length+=a.length-i;for(var d=0;d<a.length;d++)this.values_[n+d]=a[d];for(var f=0;f<u.length;f++)this.values_[n+a.length+f]=u[f];return o}},t.notifyArrayChildUpdate_=function(n,i,a){var l=!this.owned_&&Kd(),o=Fl(this),u=o||l?{observableKind:"array",object:this.proxy_,type:Eu,debugObjectName:this.atom_.name_,index:n,newValue:i,oldValue:a}:null;this.atom_.reportChanged(),o&&jl(this,u)},t.notifyArraySplice_=function(n,i,a){var l=!this.owned_&&Kd(),o=Fl(this),u=o||l?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Ny,index:n,removed:a,added:i,removedCount:a.length,addedCount:i.length}:null;this.atom_.reportChanged(),o&&jl(this,u)},t.get_=function(n){if(this.legacyMode_&&n>=this.values_.length){console.warn("[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},t.set_=function(n,i){var a=this.values_;if(this.legacyMode_&&n>a.length&&Cr(17,n,a.length),n<a.length){this.atom_;var l=a[n];if(sl(this)){var o=ll(this,{type:Eu,object:this.proxy_,index:n,newValue:i});if(!o)return;i=o.newValue}i=this.enhancer_(i,l);var u=i!==l;u&&(a[n]=i,this.notifyArrayChildUpdate_(n,i,l))}else{for(var d=new Array(n+1-a.length),f=0;f<d.length-1;f++)d[f]=void 0;d[d.length-1]=i,this.spliceWithArray_(a.length,0,d)}},e}();function Gx(e,t,r,n){return r===void 0&&(r="ObservableArray"),n===void 0&&(n=!1),Hw(),Vf(function(){var i=new sm(r,t,n,!1);$w(i.values_,ur,i);var a=new Proxy(i.values_,Vx);return i.proxy_=a,e&&e.length&&i.spliceWithArray_(0,0,e),a})}var q1={clear:function(){return this.splice(0)},replace:function(t){var r=this[ur];return r.spliceWithArray_(0,r.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];var l=this[ur];switch(arguments.length){case 0:return[];case 1:return l.spliceWithArray_(t);case 2:return l.spliceWithArray_(t,r)}return l.spliceWithArray_(t,r,i)},spliceWithArray:function(t,r,n){return this[ur].spliceWithArray_(t,r,n)},push:function(){for(var t=this[ur],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.spliceWithArray_(t.values_.length,0,n),t.values_.length},pop:function(){return this.splice(Math.max(this[ur].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[ur],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.spliceWithArray_(0,0,n),t.values_.length},reverse:function(){return At.trackingDerivation&&Cr(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){At.trackingDerivation&&Cr(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var r=this[ur],n=r.dehanceValues_(r.values_).indexOf(t);return n>-1?(this.splice(n,1),!0):!1}};Xn("at",Gs);Xn("concat",Gs);Xn("flat",Gs);Xn("includes",Gs);Xn("indexOf",Gs);Xn("join",Gs);Xn("lastIndexOf",Gs);Xn("slice",Gs);Xn("toString",Gs);Xn("toLocaleString",Gs);Xn("toSorted",Gs);Xn("toSpliced",Gs);Xn("with",Gs);Xn("every",zl);Xn("filter",zl);Xn("find",zl);Xn("findIndex",zl);Xn("findLast",zl);Xn("findLastIndex",zl);Xn("flatMap",zl);Xn("forEach",zl);Xn("map",zl);Xn("some",zl);Xn("toReversed",zl);Xn("reduce",T6);Xn("reduceRight",T6);function Xn(e,t){typeof Array.prototype[e]=="function"&&(q1[e]=t(e))}function Gs(e){return function(){var t=this[ur];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function zl(e){return function(t,r){var n=this,i=this[ur];i.atom_.reportObserved();var a=i.dehanceValues_(i.values_);return a[e](function(l,o){return t.call(r,l,o,n)})}}function T6(e){return function(){var t=this,r=this[ur];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),i=arguments[0];return arguments[0]=function(a,l,o){return i(a,l,o,t)},n[e].apply(n,arguments)}}var $x=af("ObservableArrayAdministration",sm);function Lu(e){return a0(e)&&$x(e[ur])}var Wx={},Wc="add",H1="delete",lm=function(){function e(r,n,i){var a=this;n===void 0&&(n=Df),i===void 0&&(i="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[ur]=Wx,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=n,this.name_=i,Vs(Map)||Cr(18),Vf(function(){a.keysAtom_=F1("ObservableMap.keys()"),a.data_=new Map,a.hasMap_=new Map,r&&a.merge(r)})}var t=e.prototype;return t.has_=function(n){return this.data_.has(n)},t.has=function(n){var i=this;if(!At.trackingDerivation)return this.has_(n);var a=this.hasMap_.get(n);if(!a){var l=a=new Zc(this.has_(n),l0,"ObservableMap.key?",!1);this.hasMap_.set(n,l),_6(l,function(){return i.hasMap_.delete(n)})}return a.get()},t.set=function(n,i){var a=this.has_(n);if(sl(this)){var l=ll(this,{type:a?Eu:Wc,object:this,newValue:i,name:n});if(!l)return this;i=l.newValue}return a?this.updateValue_(n,i):this.addValue_(n,i),this},t.delete=function(n){var i=this;if(this.keysAtom_,sl(this)){var a=ll(this,{type:H1,object:this,name:n});if(!a)return!1}if(this.has_(n)){var l=Kd(),o=Fl(this),u=o||l?{observableKind:"map",debugObjectName:this.name_,type:H1,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return rc(function(){var d;i.keysAtom_.reportChanged(),(d=i.hasMap_.get(n))==null||d.setNewValue_(!1);var f=i.data_.get(n);f.setNewValue_(void 0),i.data_.delete(n)}),o&&jl(this,u),!0}return!1},t.updateValue_=function(n,i){var a=this.data_.get(n);if(i=a.prepareNewValue_(i),i!==At.UNCHANGED){var l=Kd(),o=Fl(this),u=o||l?{observableKind:"map",debugObjectName:this.name_,type:Eu,object:this,oldValue:a.value_,name:n,newValue:i}:null;a.setNewValue_(i),o&&jl(this,u)}},t.addValue_=function(n,i){var a=this;this.keysAtom_,rc(function(){var d,f=new Zc(i,a.enhancer_,"ObservableMap.key",!1);a.data_.set(n,f),i=f.value_,(d=a.hasMap_.get(n))==null||d.setNewValue_(!0),a.keysAtom_.reportChanged()});var l=Kd(),o=Fl(this),u=o||l?{observableKind:"map",debugObjectName:this.name_,type:Wc,object:this,name:n,newValue:i}:null;o&&jl(this,u)},t.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var n=this,i=this.keys();return Ly({next:function(){var l=i.next(),o=l.done,u=l.value;return{done:o,value:o?void 0:n.get(u)}}})},t.entries=function(){var n=this,i=this.keys();return Ly({next:function(){var l=i.next(),o=l.done,u=l.value;return{done:o,value:o?void 0:[u,n.get(u)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(n,i){for(var a=_h(this),l;!(l=a()).done;){var o=l.value,u=o[0],d=o[1];n.call(i,d,u,this)}},t.merge=function(n){var i=this;return fl(n)&&(n=new Map(n)),rc(function(){Qc(n)?c9(n).forEach(function(a){return i.set(a,n[a])}):Array.isArray(n)?n.forEach(function(a){var l=a[0],o=a[1];return i.set(l,o)}):jh(n)?(u9(n)||Cr(19,n),n.forEach(function(a,l){return i.set(l,a)})):n!=null&&Cr(20,n)}),this},t.clear=function(){var n=this;rc(function(){s6(function(){for(var i=_h(n.keys()),a;!(a=i()).done;){var l=a.value;n.delete(l)}})})},t.replace=function(n){var i=this;return rc(function(){for(var a=Yx(n),l=new Map,o=!1,u=_h(i.data_.keys()),d;!(d=u()).done;){var f=d.value;if(!a.has(f)){var v=i.delete(f);if(v)o=!0;else{var g=i.data_.get(f);l.set(f,g)}}}for(var c=_h(a.entries()),y;!(y=c()).done;){var x=y.value,E=x[0],S=x[1],b=i.data_.has(E);if(i.set(E,S),i.data_.has(E)){var w=i.data_.get(E);l.set(E,w),b||(o=!0)}}if(!o)if(i.data_.size!==l.size)i.keysAtom_.reportChanged();else for(var _=i.data_.keys(),A=l.keys(),M=_.next(),O=A.next();!M.done;){if(M.value!==O.value){i.keysAtom_.reportChanged();break}M=_.next(),O=A.next()}i.data_=l}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(n,i){return _p(this,n)},t.intercept_=function(n){return wp(this,n)},Dh(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),fl=af("ObservableMap",lm);function Ly(e){return e[Symbol.toStringTag]="MapIterator",cm(e)}function Yx(e){if(jh(e)||fl(e))return e;if(Array.isArray(e))return new Map(e);if(Qc(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return Cr(21,e)}var Xx={},R6=function(){function e(r,n,i){var a=this;n===void 0&&(n=Df),i===void 0&&(i="ObservableSet"),this.name_=void 0,this[ur]=Xx,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=i,Vs(Set)||Cr(22),this.enhancer_=function(l,o){return n(l,o,i)},Vf(function(){a.atom_=F1(a.name_),r&&a.replace(r)})}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.clear=function(){var n=this;rc(function(){s6(function(){for(var i=_h(n.data_.values()),a;!(a=i()).done;){var l=a.value;n.delete(l)}})})},t.forEach=function(n,i){for(var a=_h(this),l;!(l=a()).done;){var o=l.value;n.call(i,o,o,this)}},t.add=function(n){var i=this;if(this.atom_,sl(this)){var a=ll(this,{type:Wc,object:this,newValue:n});if(!a)return this;n=a.newValue}if(!this.has(n)){rc(function(){i.data_.add(i.enhancer_(n,void 0)),i.atom_.reportChanged()});var l=!1,o=Fl(this),u=o||l?{observableKind:"set",debugObjectName:this.name_,type:Wc,object:this,newValue:n}:null;o&&jl(this,u)}return this},t.delete=function(n){var i=this;if(sl(this)){var a=ll(this,{type:H1,object:this,oldValue:n});if(!a)return!1}if(this.has(n)){var l=!1,o=Fl(this),u=o||l?{observableKind:"set",debugObjectName:this.name_,type:H1,object:this,oldValue:n}:null;return rc(function(){i.atom_.reportChanged(),i.data_.delete(n)}),o&&jl(this,u),!0}return!1},t.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},t.entries=function(){var n=this.values();return Ty({next:function(){var a=n.next(),l=a.value,o=a.done;return o?{value:void 0,done:o}:{value:[l,l],done:o}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var n=this,i=this.data_.values();return Ty({next:function(){var l=i.next(),o=l.value,u=l.done;return u?{value:void 0,done:u}:{value:n.dehanceValue_(o),done:u}}})},t.intersection=function(n){if(ec(n)&&!Xo(n))return n.intersection(this);var i=new Set(this);return i.intersection(n)},t.union=function(n){if(ec(n)&&!Xo(n))return n.union(this);var i=new Set(this);return i.union(n)},t.difference=function(n){return new Set(this).difference(n)},t.symmetricDifference=function(n){if(ec(n)&&!Xo(n))return n.symmetricDifference(this);var i=new Set(this);return i.symmetricDifference(n)},t.isSubsetOf=function(n){return new Set(this).isSubsetOf(n)},t.isSupersetOf=function(n){return new Set(this).isSupersetOf(n)},t.isDisjointFrom=function(n){if(ec(n)&&!Xo(n))return n.isDisjointFrom(this);var i=new Set(this);return i.isDisjointFrom(n)},t.replace=function(n){var i=this;return Xo(n)&&(n=new Set(n)),rc(function(){Array.isArray(n)?(i.clear(),n.forEach(function(a){return i.add(a)})):ec(n)?(i.clear(),n.forEach(function(a){return i.add(a)})):n!=null&&Cr("Cannot initialize set from "+n)}),this},t.observe_=function(n,i){return _p(this,n)},t.intercept_=function(n){return wp(this,n)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},Dh(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),Xo=af("ObservableSet",R6);function Ty(e){return e[Symbol.toStringTag]="SetIterator",cm(e)}var Ry=Object.create(null),My="remove",M6=function(){function e(r,n,i,a){n===void 0&&(n=new Map),a===void 0&&(a=z9),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=r,this.values_=n,this.name_=i,this.defaultAnnotation_=a,this.keysAtom_=new of("ObservableObject.keys"),this.isPlainObject_=Qc(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(n){return this.values_.get(n).get()},t.setObservablePropValue_=function(n,i){var a=this.values_.get(n);if(a instanceof Dl)return a.set(i),!0;if(sl(this)){var l=ll(this,{type:Eu,object:this.proxy_||this.target_,name:n,newValue:i});if(!l)return null;i=l.newValue}if(i=a.prepareNewValue_(i),i!==At.UNCHANGED){var o=Fl(this),u=!1,d=o||u?{type:Eu,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:a.value_,name:n,newValue:i}:null;a.setNewValue_(i),o&&jl(this,d)}return!0},t.get_=function(n){return At.trackingDerivation&&!nc(this.target_,n)&&this.has_(n),this.target_[n]},t.set_=function(n,i,a){return a===void 0&&(a=!1),nc(this.target_,n)?this.values_.has(n)?this.setObservablePropValue_(n,i):a?Reflect.set(this.target_,n,i):(this.target_[n]=i,!0):this.extend_(n,{value:i,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,a)},t.has_=function(n){if(!At.trackingDerivation)return n in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var i=this.pendingKeys_.get(n);return i||(i=new Zc(n in this.target_,l0,"ObservableObject.key?",!1),this.pendingKeys_.set(n,i)),i.get()},t.make_=function(n,i){if(i===!0&&(i=this.defaultAnnotation_),i!==!1){if(!(n in this.target_)){var a;if((a=this.target_[yu])!=null&&a[n])return;Cr(1,i.annotationType_,this.name_+"."+n.toString())}for(var l=this.target_;l&&l!==i0;){var o=I1(l,n);if(o){var u=i.make_(this,n,o,l);if(u===0)return;if(u===1)break}l=Object.getPrototypeOf(l)}Fy(this,i,n)}},t.extend_=function(n,i,a,l){if(l===void 0&&(l=!1),a===!0&&(a=this.defaultAnnotation_),a===!1)return this.defineProperty_(n,i,l);var o=a.extend_(this,n,i,l);return o&&Fy(this,a,n),o},t.defineProperty_=function(n,i,a){a===void 0&&(a=!1),this.keysAtom_;try{bs();var l=this.delete_(n);if(!l)return l;if(sl(this)){var o=ll(this,{object:this.proxy_||this.target_,name:n,type:Wc,newValue:i.value});if(!o)return null;var u=o.newValue;i.value!==u&&(i=Jc({},i,{value:u}))}if(a){if(!Reflect.defineProperty(this.target_,n,i))return!1}else xu(this.target_,n,i);this.notifyPropertyAddition_(n,i.value)}finally{ws()}return!0},t.defineObservableProperty_=function(n,i,a,l){l===void 0&&(l=!1),this.keysAtom_;try{bs();var o=this.delete_(n);if(!o)return o;if(sl(this)){var u=ll(this,{object:this.proxy_||this.target_,name:n,type:Wc,newValue:i});if(!u)return null;i=u.newValue}var d=Iy(n),f={configurable:At.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:d.get,set:d.set};if(l){if(!Reflect.defineProperty(this.target_,n,f))return!1}else xu(this.target_,n,f);var v=new Zc(i,a,"ObservableObject.key",!1);this.values_.set(n,v),this.notifyPropertyAddition_(n,v.value_)}finally{ws()}return!0},t.defineComputedProperty_=function(n,i,a){a===void 0&&(a=!1),this.keysAtom_;try{bs();var l=this.delete_(n);if(!l)return l;if(sl(this)){var o=ll(this,{object:this.proxy_||this.target_,name:n,type:Wc,newValue:void 0});if(!o)return null}i.name||(i.name="ObservableObject.key"),i.context=this.proxy_||this.target_;var u=Iy(n),d={configurable:At.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:u.get,set:u.set};if(a){if(!Reflect.defineProperty(this.target_,n,d))return!1}else xu(this.target_,n,d);this.values_.set(n,new Dl(i)),this.notifyPropertyAddition_(n,void 0)}finally{ws()}return!0},t.delete_=function(n,i){if(i===void 0&&(i=!1),this.keysAtom_,!nc(this.target_,n))return!0;if(sl(this)){var a=ll(this,{object:this.proxy_||this.target_,name:n,type:My});if(!a)return null}try{var l;bs();var o=Fl(this),u=!1,d=this.values_.get(n),f=void 0;if(!d&&(o||u)){var v;f=(v=I1(this.target_,n))==null?void 0:v.value}if(i){if(!Reflect.deleteProperty(this.target_,n))return!1}else delete this.target_[n];if(d&&(this.values_.delete(n),d instanceof Zc&&(f=d.value_),d6(d)),this.keysAtom_.reportChanged(),(l=this.pendingKeys_)==null||(l=l.get(n))==null||l.set(n in this.target_),o||u){var g={type:My,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:f,name:n};o&&jl(this,g)}}finally{ws()}return!0},t.observe_=function(n,i){return _p(this,n)},t.intercept_=function(n){return wp(this,n)},t.notifyPropertyAddition_=function(n,i){var a,l=Fl(this),o=!1;if(l||o){var u=l||o?{type:Wc,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:n,newValue:i}:null;l&&jl(this,u)}(a=this.pendingKeys_)==null||(a=a.get(n))==null||a.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),s0(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Bh(e,t){var r;if(nc(e,ur))return e;var n=(r=t?.name)!=null?r:"ObservableObject",i=new M6(e,new Map,String(n),Z9(t));return o0(e,ur,i),e}var Kx=af("ObservableObjectAdministration",M6);function Iy(e){return Ry[e]||(Ry[e]={get:function(){return this[ur].getObservablePropValue_(e)},set:function(r){return this[ur].setObservablePropValue_(e,r)}})}function Ul(e){return a0(e)?Kx(e[ur]):!1}function Fy(e,t,r){var n;(n=e.target_[yu])==null||delete n[r]}var Zx=F6(0),Qx=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),lg=0,I6=function(){};function Jx(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__!==void 0?e.prototype.__proto__=t:e.prototype=t}Jx(I6,Array.prototype);var um=function(e){function t(n,i,a,l){var o;return a===void 0&&(a="ObservableArray"),l===void 0&&(l=!1),o=e.call(this)||this,Vf(function(){var u=new sm(a,i,l,!0);u.proxy_=o,$w(o,ur,u),n&&n.length&&o.spliceWithArray(0,0,n),Qx&&Object.defineProperty(o,"0",Zx)}),o}Xw(t,e);var r=t.prototype;return r.concat=function(){this[ur].atom_.reportObserved();for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return Array.prototype.concat.apply(this.slice(),a.map(function(o){return Lu(o)?o.slice():o}))},r[Symbol.iterator]=function(){var n=this,i=0;return cm({next:function(){return i<n.length?{value:n[i++],done:!1}:{done:!0,value:void 0}}})},Dh(t,[{key:"length",get:function(){return this[ur].getArrayLength_()},set:function(i){this[ur].setArrayLength_(i)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(I6);Object.entries(q1).forEach(function(e){var t=e[0],r=e[1];t!=="concat"&&o0(um.prototype,t,r)});function F6(e){return{enumerable:!1,configurable:!0,get:function(){return this[ur].get_(e)},set:function(r){this[ur].set_(e,r)}}}function eS(e){xu(um.prototype,""+e,F6(e))}function j6(e){if(e>lg){for(var t=lg;t<e+100;t++)eS(t);lg=e}}j6(1e3);function tS(e,t,r){return new um(e,t,r)}function Th(e,t){if(typeof e=="object"&&e!==null){if(Lu(e))return t!==void 0&&Cr(23),e[ur].atom_;if(Xo(e))return e.atom_;if(fl(e)){if(t===void 0)return e.keysAtom_;var r=e.data_.get(t)||e.hasMap_.get(t);return r||Cr(25,t,Ov(e)),r}if(Ul(e)){if(!t)return Cr(26);var n=e[ur].values_.get(t);return n||Cr(27,t,Ov(e)),n}if(rm(e)||h0(e)||z1(e))return e}else if(Vs(e)&&z1(e[ur]))return e[ur];Cr(28)}function Cu(e,t){if(e||Cr(29),t!==void 0)return Cu(Th(e,t));if(rm(e)||h0(e)||z1(e)||fl(e)||Xo(e))return e;if(e[ur])return e[ur];Cr(24,e)}function Ov(e,t){var r;if(t!==void 0)r=Th(e,t);else{if(ap(e))return e.name;Ul(e)||fl(e)||Xo(e)?r=Cu(e):r=Th(e)}return r.name_}function Vf(e){var t=Hf(),r=c0(!0);bs();try{return e()}finally{ws(),f0(r),ic(t)}}var jy=i0.toString;function D6(e,t,r){return r===void 0&&(r=-1),Cv(e,t,r)}function Cv(e,t,r,n,i){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var a=typeof e;if(a!=="function"&&a!=="object"&&typeof t!="object")return!1;var l=jy.call(e);if(l!==jy.call(t))return!1;switch(l){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":r>=0&&r++;break}e=Dy(e),t=Dy(t);var o=l==="[object Array]";if(!o){if(typeof e!="object"||typeof t!="object")return!1;var u=e.constructor,d=t.constructor;if(u!==d&&!(Vs(u)&&u instanceof u&&Vs(d)&&d instanceof d)&&"constructor"in e&&"constructor"in t)return!1}if(r===0)return!1;r<0&&(r=-1),n=n||[],i=i||[];for(var f=n.length;f--;)if(n[f]===e)return i[f]===t;if(n.push(e),i.push(t),o){if(f=e.length,f!==t.length)return!1;for(;f--;)if(!Cv(e[f],t[f],r-1,n,i))return!1}else{var v=Object.keys(e),g=v.length;if(Object.keys(t).length!==g)return!1;for(var c=0;c<g;c++){var y=v[c];if(!(nc(t,y)&&Cv(e[y],t[y],r-1,n,i)))return!1}}return n.pop(),i.pop(),!0}function Dy(e){return Lu(e)?e.slice():jh(e)||fl(e)||ec(e)||Xo(e)?Array.from(e.entries()):e}var By,rS=((By=n0().Iterator)==null?void 0:By.prototype)||{};function cm(e){return e[Symbol.iterator]=nS,Object.assign(Object.create(rS),e)}function nS(){return this}["Symbol","Map","Set"].forEach(function(e){var t=n0();typeof t[e]>"u"&&Cr("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:vx,extras:{getDebugName:Ov},$mobx:ur});if(!Pi.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!L6)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var B6=zw();function iS(e){e()}function aS(e){e||(e=iS),Ox({reactionScheduler:e})}function oS(e){return Nx(e)}var sS=1e4,lS=1e4,uS=function(){function e(t){var r=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(n){n===void 0&&(n=sS),clearTimeout(r.sweepTimeout),r.sweepTimeout=void 0;var i=Date.now();r.registrations.forEach(function(a,l){i-a.registeredAt>=n&&(r.finalize(a.value),r.registrations.delete(l))}),r.registrations.size>0&&r.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){this.registrations.set(n,{value:r,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,lS))}}),e}(),cS=typeof FinalizationRegistry<"u"?FinalizationRegistry:uS,Nv=new cS(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),ug={exports:{}},cg={};/**
|
|
35
35
|
* @license React
|
|
@@ -48,17 +48,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the MIT license found in the
|
|
50
50
|
* LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var Eg,X5;function sE(){return X5||(X5=1,Eg=function(t){var r={},n=vp(),i=em(),a=Object.assign;function l(p){for(var m="https://reactjs.org/docs/error-decoder.html?invariant="+p,I=1;I<arguments.length;I++)m+="&args[]="+encodeURIComponent(arguments[I]);return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,u=Symbol.for("react.element"),d=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),y=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),A=Symbol.iterator;function M(p){return p===null||typeof p!="object"?null:(p=A&&p[A]||p["@@iterator"],typeof p=="function"?p:null)}function O(p){if(p==null)return null;if(typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case f:return"Fragment";case d:return"Portal";case g:return"Profiler";case v:return"StrictMode";case E:return"Suspense";case S:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case y:return(p.displayName||"Context")+".Consumer";case c:return(p._context.displayName||"Context")+".Provider";case x:var m=p.render;return p=p.displayName,p||(p=m.displayName||m.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case b:return m=p.displayName||null,m!==null?m:O(p.type)||"Memo";case w:m=p._payload,p=p._init;try{return O(p(m))}catch{}}return null}function L(p){var m=p.type;switch(p.tag){case 24:return"Cache";case 9:return(m.displayName||"Context")+".Consumer";case 10:return(m._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return p=m.render,p=p.displayName||p.name||"",m.displayName||(p!==""?"ForwardRef("+p+")":"ForwardRef");case 7:return"Fragment";case 5:return m;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return O(m);case 8:return m===v?"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(typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m}return null}function R(p){var m=p,I=p;if(p.alternate)for(;m.return;)m=m.return;else{p=m;do m=p,(m.flags&4098)!==0&&(I=m.return),p=m.return;while(p)}return m.tag===3?I:null}function T(p){if(R(p)!==p)throw Error(l(188))}function k(p){var m=p.alternate;if(!m){if(m=R(p),m===null)throw Error(l(188));return m!==p?null:p}for(var I=p,$=m;;){var ee=I.return;if(ee===null)break;var oe=ee.alternate;if(oe===null){if($=ee.return,$!==null){I=$;continue}break}if(ee.child===oe.child){for(oe=ee.child;oe;){if(oe===I)return T(ee),p;if(oe===$)return T(ee),m;oe=oe.sibling}throw Error(l(188))}if(I.return!==$.return)I=ee,$=oe;else{for(var Ee=!1,We=ee.child;We;){if(We===I){Ee=!0,I=ee,$=oe;break}if(We===$){Ee=!0,$=ee,I=oe;break}We=We.sibling}if(!Ee){for(We=oe.child;We;){if(We===I){Ee=!0,I=oe,$=ee;break}if(We===$){Ee=!0,$=oe,I=ee;break}We=We.sibling}if(!Ee)throw Error(l(189))}}if(I.alternate!==$)throw Error(l(190))}if(I.tag!==3)throw Error(l(188));return I.stateNode.current===I?p:m}function C(p){return p=k(p),p!==null?q(p):null}function q(p){if(p.tag===5||p.tag===6)return p;for(p=p.child;p!==null;){var m=q(p);if(m!==null)return m;p=p.sibling}return null}function G(p){if(p.tag===5||p.tag===6)return p;for(p=p.child;p!==null;){if(p.tag!==4){var m=G(p);if(m!==null)return m}p=p.sibling}return null}var J=Array.isArray,ae=t.getPublicInstance,H=t.getRootHostContext,V=t.getChildHostContext,Y=t.prepareForCommit,U=t.resetAfterCommit,D=t.createInstance,j=t.appendInitialChild,z=t.finalizeInitialChildren,Z=t.prepareUpdate,re=t.shouldSetTextContent,W=t.createTextInstance,Q=t.scheduleTimeout,se=t.cancelTimeout,ue=t.noTimeout,le=t.isPrimaryRenderer,ye=t.supportsMutation,Re=t.supportsPersistence,Me=t.supportsHydration,Pe=t.getInstanceFromNode,de=t.preparePortalMount,Te=t.getCurrentEventPriority,Ae=t.detachDeletedInstance,be=t.supportsMicrotasks,_e=t.scheduleMicrotask,xe=t.supportsTestSelectors,Le=t.findFiberRoot,pe=t.getBoundingRect,Ce=t.getTextContent,je=t.isHiddenSubtree,He=t.matchAccessibilityRole,st=t.setFocusIfFocusable,pt=t.setupIntersectionObserver,ct=t.appendChild,bt=t.appendChildToContainer,ht=t.commitTextUpdate,vt=t.commitMount,wr=t.commitUpdate,cr=t.insertBefore,Pt=t.insertInContainerBefore,$t=t.removeChild,$e=t.removeChildFromContainer,ze=t.resetTextContent,kt=t.hideInstance,St=t.hideTextInstance,er=t.unhideInstance,jt=t.unhideTextInstance,vr=t.clearContainer,Xt=t.cloneInstance,lr=t.createContainerChildSet,Oi=t.appendChildToContainerChildSet,Zn=t.finalizeContainerChildren,
|
|
51
|
+
*/var Eg,X5;function sE(){return X5||(X5=1,Eg=function(t){var r={},n=vp(),i=em(),a=Object.assign;function l(p){for(var m="https://reactjs.org/docs/error-decoder.html?invariant="+p,I=1;I<arguments.length;I++)m+="&args[]="+encodeURIComponent(arguments[I]);return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,u=Symbol.for("react.element"),d=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),y=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),A=Symbol.iterator;function M(p){return p===null||typeof p!="object"?null:(p=A&&p[A]||p["@@iterator"],typeof p=="function"?p:null)}function O(p){if(p==null)return null;if(typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case f:return"Fragment";case d:return"Portal";case g:return"Profiler";case v:return"StrictMode";case E:return"Suspense";case S:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case y:return(p.displayName||"Context")+".Consumer";case c:return(p._context.displayName||"Context")+".Provider";case x:var m=p.render;return p=p.displayName,p||(p=m.displayName||m.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case b:return m=p.displayName||null,m!==null?m:O(p.type)||"Memo";case w:m=p._payload,p=p._init;try{return O(p(m))}catch{}}return null}function L(p){var m=p.type;switch(p.tag){case 24:return"Cache";case 9:return(m.displayName||"Context")+".Consumer";case 10:return(m._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return p=m.render,p=p.displayName||p.name||"",m.displayName||(p!==""?"ForwardRef("+p+")":"ForwardRef");case 7:return"Fragment";case 5:return m;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return O(m);case 8:return m===v?"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(typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m}return null}function R(p){var m=p,I=p;if(p.alternate)for(;m.return;)m=m.return;else{p=m;do m=p,(m.flags&4098)!==0&&(I=m.return),p=m.return;while(p)}return m.tag===3?I:null}function T(p){if(R(p)!==p)throw Error(l(188))}function k(p){var m=p.alternate;if(!m){if(m=R(p),m===null)throw Error(l(188));return m!==p?null:p}for(var I=p,$=m;;){var ee=I.return;if(ee===null)break;var oe=ee.alternate;if(oe===null){if($=ee.return,$!==null){I=$;continue}break}if(ee.child===oe.child){for(oe=ee.child;oe;){if(oe===I)return T(ee),p;if(oe===$)return T(ee),m;oe=oe.sibling}throw Error(l(188))}if(I.return!==$.return)I=ee,$=oe;else{for(var Ee=!1,We=ee.child;We;){if(We===I){Ee=!0,I=ee,$=oe;break}if(We===$){Ee=!0,$=ee,I=oe;break}We=We.sibling}if(!Ee){for(We=oe.child;We;){if(We===I){Ee=!0,I=oe,$=ee;break}if(We===$){Ee=!0,$=oe,I=ee;break}We=We.sibling}if(!Ee)throw Error(l(189))}}if(I.alternate!==$)throw Error(l(190))}if(I.tag!==3)throw Error(l(188));return I.stateNode.current===I?p:m}function C(p){return p=k(p),p!==null?q(p):null}function q(p){if(p.tag===5||p.tag===6)return p;for(p=p.child;p!==null;){var m=q(p);if(m!==null)return m;p=p.sibling}return null}function G(p){if(p.tag===5||p.tag===6)return p;for(p=p.child;p!==null;){if(p.tag!==4){var m=G(p);if(m!==null)return m}p=p.sibling}return null}var J=Array.isArray,ae=t.getPublicInstance,H=t.getRootHostContext,V=t.getChildHostContext,Y=t.prepareForCommit,U=t.resetAfterCommit,D=t.createInstance,j=t.appendInitialChild,z=t.finalizeInitialChildren,Z=t.prepareUpdate,re=t.shouldSetTextContent,W=t.createTextInstance,Q=t.scheduleTimeout,se=t.cancelTimeout,ue=t.noTimeout,le=t.isPrimaryRenderer,ye=t.supportsMutation,Re=t.supportsPersistence,Me=t.supportsHydration,Pe=t.getInstanceFromNode,de=t.preparePortalMount,Te=t.getCurrentEventPriority,Ae=t.detachDeletedInstance,be=t.supportsMicrotasks,_e=t.scheduleMicrotask,xe=t.supportsTestSelectors,Le=t.findFiberRoot,pe=t.getBoundingRect,Ce=t.getTextContent,je=t.isHiddenSubtree,He=t.matchAccessibilityRole,st=t.setFocusIfFocusable,pt=t.setupIntersectionObserver,ct=t.appendChild,bt=t.appendChildToContainer,ht=t.commitTextUpdate,vt=t.commitMount,wr=t.commitUpdate,cr=t.insertBefore,Pt=t.insertInContainerBefore,$t=t.removeChild,$e=t.removeChildFromContainer,ze=t.resetTextContent,kt=t.hideInstance,St=t.hideTextInstance,er=t.unhideInstance,jt=t.unhideTextInstance,vr=t.clearContainer,Xt=t.cloneInstance,lr=t.createContainerChildSet,Oi=t.appendChildToContainerChildSet,Zn=t.finalizeContainerChildren,vi=t.replaceContainerChildren,mn=t.cloneHiddenInstance,Yt=t.cloneHiddenTextInstance,sa=t.canHydrateInstance,Ra=t.canHydrateTextInstance,Un=t.canHydrateSuspenseInstance,Ui=t.isSuspenseInstancePending,Rr=t.isSuspenseInstanceFallback,yn=t.getSuspenseInstanceFallbackErrorDetails,An=t.registerSuspenseInstanceRetry,ba=t.getNextHydratableSibling,Mo=t.getFirstHydratableChild,wa=t.getFirstHydratableChildWithinContainer,Ya=t.getFirstHydratableChildWithinSuspenseInstance,Qn=t.hydrateInstance,_a=t.hydrateTextInstance,xa=t.hydrateSuspenseInstance,Io=t.getNextHydratableInstanceAfterSuspenseInstance,Ci=t.commitHydratedContainer,Xa=t.commitHydratedSuspenseInstance,Ps=t.clearSuspenseBoundary,Ko=t.clearSuspenseBoundaryFromContainer,Vl=t.shouldDeleteUnhydratedTailInstances,cf=t.didNotMatchHydratedContainerTextInstance,bn=t.didNotMatchHydratedTextInstance,Gl;function Zo(p){if(Gl===void 0)try{throw Error()}catch(I){var m=I.stack.trim().match(/\n( *(at )?)/);Gl=m&&m[1]||""}return`
|
|
52
52
|
`+Gl+p}var Sa=!1;function Qo(p,m){if(!p||Sa)return"";Sa=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(m)if(m=function(){throw Error()},Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(yt){var $=yt}Reflect.construct(p,[],m)}else{try{m.call()}catch(yt){$=yt}p.call(m.prototype)}else{try{throw Error()}catch(yt){$=yt}p()}}catch(yt){if(yt&&$&&typeof yt.stack=="string"){for(var ee=yt.stack.split(`
|
|
53
53
|
`),oe=$.stack.split(`
|
|
54
54
|
`),Ee=ee.length-1,We=oe.length-1;1<=Ee&&0<=We&&ee[Ee]!==oe[We];)We--;for(;1<=Ee&&0<=We;Ee--,We--)if(ee[Ee]!==oe[We]){if(Ee!==1||We!==1)do if(Ee--,We--,0>We||ee[Ee]!==oe[We]){var rt=`
|
|
55
|
-
`+ee[Ee].replace(" at new "," at ");return p.displayName&&rt.includes("<anonymous>")&&(rt=rt.replace("<anonymous>",p.displayName)),rt}while(1<=Ee&&0<=We);break}}}finally{Sa=!1,Error.prepareStackTrace=I}return(p=p?p.displayName||p.name:"")?Zo(p):""}var cc=Object.prototype.hasOwnProperty,$s=[],po=-1;function oi(p){return{current:p}}function an(p){0>po||(p.current=$s[po],$s[po]=null,po--)}function mr(p,m){po++,$s[po]=p.current,p.current=m}var Jo={},Er=oi(Jo),qi=oi(!1),Ka=Jo;function Hi(p,m){var I=p.type.contextTypes;if(!I)return Jo;var $=p.stateNode;if($&&$.__reactInternalMemoizedUnmaskedChildContext===m)return $.__reactInternalMemoizedMaskedChildContext;var ee={},oe;for(oe in I)ee[oe]=m[oe];return $&&(p=p.stateNode,p.__reactInternalMemoizedUnmaskedChildContext=m,p.__reactInternalMemoizedMaskedChildContext=ee),ee}function Pn(p){return p=p.childContextTypes,p!=null}function Vi(){an(qi),an(Er)}function Ws(p,m,I){if(Er.current!==Jo)throw Error(l(168));mr(Er,m),mr(qi,I)}function qn(p,m,I){var $=p.stateNode;if(m=m.childContextTypes,typeof $.getChildContext!="function")return I;$=$.getChildContext();for(var ee in $)if(!(ee in m))throw Error(l(108,L(p)||"Unknown",ee));return a({},I,$)}function es(p){return p=(p=p.stateNode)&&p.__reactInternalMemoizedMergedChildContext||Jo,Ka=Er.current,mr(Er,p),mr(qi,qi.current),!0}function Ru(p,m,I){var $=p.stateNode;if(!$)throw Error(l(169));I?(p=qn(p,m,Ka),$.__reactInternalMemoizedMergedChildContext=p,an(qi),an(Er),mr(Er,p)):an(qi),mr(qi,I)}var Ea=Math.clz32?Math.clz32:$l,hl=Math.log,ts=Math.LN2;function $l(p){return p>>>=0,p===0?32:31-(hl(p)/ts|0)|0}var Ar=64,go=4194304;function rs(p){switch(p&-p){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 p&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return p&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return p}}function Ys(p,m){var I=p.pendingLanes;if(I===0)return 0;var $=0,ee=p.suspendedLanes,oe=p.pingedLanes,Ee=I&268435455;if(Ee!==0){var We=Ee&~ee;We!==0?$=rs(We):(oe&=Ee,oe!==0&&($=rs(oe)))}else Ee=I&~ee,Ee!==0?$=rs(Ee):oe!==0&&($=rs(oe));if($===0)return 0;if(m!==0&&m!==$&&(m&ee)===0&&(ee=$&-$,oe=m&-m,ee>=oe||ee===16&&(oe&4194240)!==0))return m;if(($&4)!==0&&($|=I&16),m=p.entangledLanes,m!==0)for(p=p.entanglements,m&=$;0<m;)I=31-Ea(m),ee=1<<I,$|=p[I],m&=~ee;return $}function fc(p,m){switch(p){case 1:case 2:case 4:return m+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 m+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hc(p,m){for(var I=p.suspendedLanes,$=p.pingedLanes,ee=p.expirationTimes,oe=p.pendingLanes;0<oe;){var Ee=31-Ea(oe),We=1<<Ee,rt=ee[Ee];rt===-1?((We&I)===0||(We&$)!==0)&&(ee[Ee]=fc(We,m)):rt<=m&&(p.expiredLanes|=We),oe&=~We}}function Xs(p){return p=p.pendingLanes&-1073741825,p!==0?p:p&1073741824?1073741824:0}function ns(){var p=Ar;return Ar<<=1,(Ar&4194240)===0&&(Ar=64),p}function Za(p){for(var m=[],I=0;31>I;I++)m.push(p);return m}function Ma(p,m,I){p.pendingLanes|=m,m!==536870912&&(p.suspendedLanes=0,p.pingedLanes=0),p=p.eventTimes,m=31-Ea(m),p[m]=I}function Ia(p,m){var I=p.pendingLanes&~m;p.pendingLanes=m,p.suspendedLanes=0,p.pingedLanes=0,p.expiredLanes&=m,p.mutableReadLanes&=m,p.entangledLanes&=m,m=p.entanglements;var $=p.eventTimes;for(p=p.expirationTimes;0<I;){var ee=31-Ea(I),oe=1<<ee;m[ee]=0,$[ee]=-1,p[ee]=-1,I&=~oe}}function Fa(p,m){var I=p.entangledLanes|=m;for(p=p.entanglements;I;){var $=31-Ea(I),ee=1<<$;ee&m|p[$]&m&&(p[$]|=m),I&=~ee}}var xt=0;function Ks(p){return p&=-p,1<p?4<p?(p&268435455)!==0?16:536870912:4:1}var vo=i.unstable_scheduleCallback,dc=i.unstable_cancelCallback,pc=i.unstable_shouldYield,Qa=i.unstable_requestPaint,pn=i.unstable_now,Wl=i.unstable_ImmediatePriority,Yl=i.unstable_UserBlockingPriority,ks=i.unstable_NormalPriority,Mu=i.unstable_IdlePriority,ja=null,vi=null;function Fo(p){if(vi&&typeof vi.onCommitFiberRoot=="function")try{vi.onCommitFiberRoot(ja,p,void 0,(p.current.flags&128)===128)}catch{}}function Xl(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var Aa=typeof Object.is=="function"?Object.is:Xl,Ja=null,mo=!1,yo=!1;function Zs(p){Ja===null?Ja=[p]:Ja.push(p)}function dl(p){mo=!0,Zs(p)}function Jn(){if(!yo&&Ja!==null){yo=!0;var p=0,m=xt;try{var I=Ja;for(xt=1;p<I.length;p++){var $=I[p];do $=$(!0);while($!==null)}Ja=null,mo=!1}catch(ee){throw Ja!==null&&(Ja=Ja.slice(p+1)),vo(Wl,Jn),ee}finally{xt=m,yo=!1}}return null}var Da=[],eo=0,Os=null,mi=0,kn=[],X=0,fe=null,Ne=1,Fe="";function Ge(p,m){Da[eo++]=mi,Da[eo++]=Os,Os=p,mi=m}function lt(p,m,I){kn[X++]=Ne,kn[X++]=Fe,kn[X++]=fe,fe=p;var $=Ne;p=Fe;var ee=32-Ea($)-1;$&=~(1<<ee),I+=1;var oe=32-Ea(m)+ee;if(30<oe){var Ee=ee-ee%5;oe=($&(1<<Ee)-1).toString(32),$>>=Ee,ee-=Ee,Ne=1<<32-Ea(m)+ee|I<<ee|$,Fe=oe+p}else Ne=1<<oe|I<<ee|$,Fe=p}function ft(p){p.return!==null&&(Ge(p,1),lt(p,1,0))}function Lt(p){for(;p===Os;)Os=Da[--eo],Da[eo]=null,mi=Da[--eo],Da[eo]=null;for(;p===fe;)fe=kn[--X],kn[X]=null,Fe=kn[--X],kn[X]=null,Ne=kn[--X],kn[X]=null}var Et=null,Ut=null,Rt=!1,Pr=!1,Mr=null;function ei(p,m){var I=$o(5,null,null,0);I.elementType="DELETED",I.stateNode=m,I.return=p,m=p.deletions,m===null?(p.deletions=[I],p.flags|=16):m.push(I)}function Hr(p,m){switch(p.tag){case 5:return m=sa(m,p.type,p.pendingProps),m!==null?(p.stateNode=m,Et=p,Ut=Mo(m),!0):!1;case 6:return m=Ra(m,p.pendingProps),m!==null?(p.stateNode=m,Et=p,Ut=null,!0):!1;case 13:if(m=Un(m),m!==null){var I=fe!==null?{id:Ne,overflow:Fe}:null;return p.memoizedState={dehydrated:m,treeContext:I,retryLane:1073741824},I=$o(18,null,null,0),I.stateNode=m,I.return=p,p.child=I,Et=p,Ut=null,!0}return!1;default:return!1}}function ti(p){return(p.mode&1)!==0&&(p.flags&128)===0}function Hn(p){if(Rt){var m=Ut;if(m){var I=m;if(!Hr(p,m)){if(ti(p))throw Error(l(418));m=ba(I);var $=Et;m&&Hr(p,m)?ei($,I):(p.flags=p.flags&-4097|2,Rt=!1,Et=p)}}else{if(ti(p))throw Error(l(418));p.flags=p.flags&-4097|2,Rt=!1,Et=p}}}function Ni(p){for(p=p.return;p!==null&&p.tag!==5&&p.tag!==3&&p.tag!==13;)p=p.return;Et=p}function bo(p){if(!Me||p!==Et)return!1;if(!Rt)return Ni(p),Rt=!0,!1;if(p.tag!==3&&(p.tag!==5||Vl(p.type)&&!re(p.type,p.memoizedProps))){var m=Ut;if(m){if(ti(p))throw Cs(),Error(l(418));for(;m;)ei(p,m),m=ba(m)}}if(Ni(p),p.tag===13){if(!Me)throw Error(l(316));if(p=p.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(l(317));Ut=Io(p)}else Ut=Et?ba(p.stateNode):null;return!0}function Cs(){for(var p=Ut;p;)p=ba(p)}function Ns(){Me&&(Ut=Et=null,Pr=Rt=!1)}function Kl(p){Mr===null?Mr=[p]:Mr.push(p)}var pl=o.ReactCurrentBatchConfig;function Ba(p,m){if(Aa(p,m))return!0;if(typeof p!="object"||p===null||typeof m!="object"||m===null)return!1;var I=Object.keys(p),$=Object.keys(m);if(I.length!==$.length)return!1;for($=0;$<I.length;$++){var ee=I[$];if(!cc.call(m,ee)||!Aa(p[ee],m[ee]))return!1}return!0}function Iu(p){switch(p.tag){case 5:return Zo(p.type);case 16:return Zo("Lazy");case 13:return Zo("Suspense");case 19:return Zo("SuspenseList");case 0:case 2:case 15:return p=Qo(p.type,!1),p;case 11:return p=Qo(p.type.render,!1),p;case 1:return p=Qo(p.type,!0),p;default:return""}}function wo(p,m,I){if(p=I.ref,p!==null&&typeof p!="function"&&typeof p!="object"){if(I._owner){if(I=I._owner,I){if(I.tag!==1)throw Error(l(309));var $=I.stateNode}if(!$)throw Error(l(147,p));var ee=$,oe=""+p;return m!==null&&m.ref!==null&&typeof m.ref=="function"&&m.ref._stringRef===oe?m.ref:(m=function(Ee){var We=ee.refs;Ee===null?delete We[oe]:We[oe]=Ee},m._stringRef=oe,m)}if(typeof p!="string")throw Error(l(284));if(!I._owner)throw Error(l(290,p))}return p}function jo(p,m){throw p=Object.prototype.toString.call(m),Error(l(31,p==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":p))}function yi(p){var m=p._init;return m(p._payload)}function is(p){function m(et,Xe){if(p){var at=et.deletions;at===null?(et.deletions=[Xe],et.flags|=16):at.push(Xe)}}function I(et,Xe){if(!p)return null;for(;Xe!==null;)m(et,Xe),Xe=Xe.sibling;return null}function $(et,Xe){for(et=new Map;Xe!==null;)Xe.key!==null?et.set(Xe.key,Xe):et.set(Xe.index,Xe),Xe=Xe.sibling;return et}function ee(et,Xe){return et=pu(et,Xe),et.index=0,et.sibling=null,et}function oe(et,Xe,at){return et.index=at,p?(at=et.alternate,at!==null?(at=at.index,at<Xe?(et.flags|=2,Xe):at):(et.flags|=2,Xe)):(et.flags|=1048576,Xe)}function Ee(et){return p&&et.alternate===null&&(et.flags|=2),et}function We(et,Xe,at,Ct){return Xe===null||Xe.tag!==6?(Xe=Lc(at,et.mode,Ct),Xe.return=et,Xe):(Xe=ee(Xe,at),Xe.return=et,Xe)}function rt(et,Xe,at,Ct){var Qt=at.type;return Qt===f?Bt(et,Xe,at.props.children,Ct,at.key):Xe!==null&&(Xe.elementType===Qt||typeof Qt=="object"&&Qt!==null&&Qt.$$typeof===w&&yi(Qt)===Xe.type)?(Ct=ee(Xe,at.props),Ct.ref=wo(et,Xe,at),Ct.return=et,Ct):(Ct=nh(at.type,at.key,at.props,null,et.mode,Ct),Ct.ref=wo(et,Xe,at),Ct.return=et,Ct)}function yt(et,Xe,at,Ct){return Xe===null||Xe.tag!==4||Xe.stateNode.containerInfo!==at.containerInfo||Xe.stateNode.implementation!==at.implementation?(Xe=ih(at,et.mode,Ct),Xe.return=et,Xe):(Xe=ee(Xe,at.children||[]),Xe.return=et,Xe)}function Bt(et,Xe,at,Ct,Qt){return Xe===null||Xe.tag!==7?(Xe=Na(at,et.mode,Ct,Qt),Xe.return=et,Xe):(Xe=ee(Xe,at),Xe.return=et,Xe)}function pr(et,Xe,at){if(typeof Xe=="string"&&Xe!==""||typeof Xe=="number")return Xe=Lc(""+Xe,et.mode,at),Xe.return=et,Xe;if(typeof Xe=="object"&&Xe!==null){switch(Xe.$$typeof){case u:return at=nh(Xe.type,Xe.key,Xe.props,null,et.mode,at),at.ref=wo(et,null,Xe),at.return=et,at;case d:return Xe=ih(Xe,et.mode,at),Xe.return=et,Xe;case w:var Ct=Xe._init;return pr(et,Ct(Xe._payload),at)}if(J(Xe)||M(Xe))return Xe=Na(Xe,et.mode,at,null),Xe.return=et,Xe;jo(et,Xe)}return null}function Ot(et,Xe,at,Ct){var Qt=Xe!==null?Xe.key:null;if(typeof at=="string"&&at!==""||typeof at=="number")return Qt!==null?null:We(et,Xe,""+at,Ct);if(typeof at=="object"&&at!==null){switch(at.$$typeof){case u:return at.key===Qt?rt(et,Xe,at,Ct):null;case d:return at.key===Qt?yt(et,Xe,at,Ct):null;case w:return Qt=at._init,Ot(et,Xe,Qt(at._payload),Ct)}if(J(at)||M(at))return Qt!==null?null:Bt(et,Xe,at,Ct,null);jo(et,at)}return null}function Nn(et,Xe,at,Ct,Qt){if(typeof Ct=="string"&&Ct!==""||typeof Ct=="number")return et=et.get(at)||null,We(Xe,et,""+Ct,Qt);if(typeof Ct=="object"&&Ct!==null){switch(Ct.$$typeof){case u:return et=et.get(Ct.key===null?at:Ct.key)||null,rt(Xe,et,Ct,Qt);case d:return et=et.get(Ct.key===null?at:Ct.key)||null,yt(Xe,et,Ct,Qt);case w:var xr=Ct._init;return Nn(et,Xe,at,xr(Ct._payload),Qt)}if(J(Ct)||M(Ct))return et=et.get(at)||null,Bt(Xe,et,Ct,Qt,null);jo(Xe,Ct)}return null}function dn(et,Xe,at,Ct){for(var Qt=null,xr=null,gr=Xe,Ur=Xe=0,ea=null;gr!==null&&Ur<at.length;Ur++){gr.index>Ur?(ea=gr,gr=null):ea=gr.sibling;var Fr=Ot(et,gr,at[Ur],Ct);if(Fr===null){gr===null&&(gr=ea);break}p&&gr&&Fr.alternate===null&&m(et,gr),Xe=oe(Fr,Xe,Ur),xr===null?Qt=Fr:xr.sibling=Fr,xr=Fr,gr=ea}if(Ur===at.length)return I(et,gr),Rt&&Ge(et,Ur),Qt;if(gr===null){for(;Ur<at.length;Ur++)gr=pr(et,at[Ur],Ct),gr!==null&&(Xe=oe(gr,Xe,Ur),xr===null?Qt=gr:xr.sibling=gr,xr=gr);return Rt&&Ge(et,Ur),Qt}for(gr=$(et,gr);Ur<at.length;Ur++)ea=Nn(gr,et,Ur,at[Ur],Ct),ea!==null&&(p&&ea.alternate!==null&&gr.delete(ea.key===null?Ur:ea.key),Xe=oe(ea,Xe,Ur),xr===null?Qt=ea:xr.sibling=ea,xr=ea);return p&&gr.forEach(function(Ha){return m(et,Ha)}),Rt&&Ge(et,Ur),Qt}function uo(et,Xe,at,Ct){var Qt=M(at);if(typeof Qt!="function")throw Error(l(150));if(at=Qt.call(at),at==null)throw Error(l(151));for(var xr=Qt=null,gr=Xe,Ur=Xe=0,ea=null,Fr=at.next();gr!==null&&!Fr.done;Ur++,Fr=at.next()){gr.index>Ur?(ea=gr,gr=null):ea=gr.sibling;var Ha=Ot(et,gr,Fr.value,Ct);if(Ha===null){gr===null&&(gr=ea);break}p&&gr&&Ha.alternate===null&&m(et,gr),Xe=oe(Ha,Xe,Ur),xr===null?Qt=Ha:xr.sibling=Ha,xr=Ha,gr=ea}if(Fr.done)return I(et,gr),Rt&&Ge(et,Ur),Qt;if(gr===null){for(;!Fr.done;Ur++,Fr=at.next())Fr=pr(et,Fr.value,Ct),Fr!==null&&(Xe=oe(Fr,Xe,Ur),xr===null?Qt=Fr:xr.sibling=Fr,xr=Fr);return Rt&&Ge(et,Ur),Qt}for(gr=$(et,gr);!Fr.done;Ur++,Fr=at.next())Fr=Nn(gr,et,Ur,Fr.value,Ct),Fr!==null&&(p&&Fr.alternate!==null&&gr.delete(Fr.key===null?Ur:Fr.key),Xe=oe(Fr,Xe,Ur),xr===null?Qt=Fr:xr.sibling=Fr,xr=Fr);return p&&gr.forEach(function(M0){return m(et,M0)}),Rt&&Ge(et,Ur),Qt}function il(et,Xe,at,Ct){if(typeof at=="object"&&at!==null&&at.type===f&&at.key===null&&(at=at.props.children),typeof at=="object"&&at!==null){switch(at.$$typeof){case u:e:{for(var Qt=at.key,xr=Xe;xr!==null;){if(xr.key===Qt){if(Qt=at.type,Qt===f){if(xr.tag===7){I(et,xr.sibling),Xe=ee(xr,at.props.children),Xe.return=et,et=Xe;break e}}else if(xr.elementType===Qt||typeof Qt=="object"&&Qt!==null&&Qt.$$typeof===w&&yi(Qt)===xr.type){I(et,xr.sibling),Xe=ee(xr,at.props),Xe.ref=wo(et,xr,at),Xe.return=et,et=Xe;break e}I(et,xr);break}else m(et,xr);xr=xr.sibling}at.type===f?(Xe=Na(at.props.children,et.mode,Ct,at.key),Xe.return=et,et=Xe):(Ct=nh(at.type,at.key,at.props,null,et.mode,Ct),Ct.ref=wo(et,Xe,at),Ct.return=et,et=Ct)}return Ee(et);case d:e:{for(xr=at.key;Xe!==null;){if(Xe.key===xr)if(Xe.tag===4&&Xe.stateNode.containerInfo===at.containerInfo&&Xe.stateNode.implementation===at.implementation){I(et,Xe.sibling),Xe=ee(Xe,at.children||[]),Xe.return=et,et=Xe;break e}else{I(et,Xe);break}else m(et,Xe);Xe=Xe.sibling}Xe=ih(at,et.mode,Ct),Xe.return=et,et=Xe}return Ee(et);case w:return xr=at._init,il(et,Xe,xr(at._payload),Ct)}if(J(at))return dn(et,Xe,at,Ct);if(M(at))return uo(et,Xe,at,Ct);jo(et,at)}return typeof at=="string"&&at!==""||typeof at=="number"?(at=""+at,Xe!==null&&Xe.tag===6?(I(et,Xe.sibling),Xe=ee(Xe,at),Xe.return=et,et=Xe):(I(et,Xe),Xe=Lc(at,et.mode,Ct),Xe.return=et,et=Xe),Ee(et)):I(et,Xe)}return il}var Pa=is(!0),gl=is(!1),Qs=oi(null),Li=null,Ls=null,Js=null;function Zl(){Js=Ls=Li=null}function si(p,m,I){le?(mr(Qs,m._currentValue),m._currentValue=I):(mr(Qs,m._currentValue2),m._currentValue2=I)}function la(p){var m=Qs.current;an(Qs),le?p._currentValue=m:p._currentValue2=m}function Do(p,m,I){for(;p!==null;){var $=p.alternate;if((p.childLanes&m)!==m?(p.childLanes|=m,$!==null&&($.childLanes|=m)):$!==null&&($.childLanes&m)!==m&&($.childLanes|=m),p===I)break;p=p.return}}function as(p,m){Li=p,Js=Ls=null,p=p.dependencies,p!==null&&p.firstContext!==null&&((p.lanes&m)!==0&&(ci=!0),p.firstContext=null)}function li(p){var m=le?p._currentValue:p._currentValue2;if(Js!==p)if(p={context:p,memoizedValue:m,next:null},Ls===null){if(Li===null)throw Error(l(308));Ls=p,Li.dependencies={lanes:0,firstContext:p}}else Ls=Ls.next=p;return m}var to=null;function Gi(p){to===null?to=[p]:to.push(p)}function ua(p,m,I,$){var ee=m.interleaved;return ee===null?(I.next=I,Gi(m)):(I.next=ee.next,ee.next=I),m.interleaved=I,$i(p,$)}function $i(p,m){p.lanes|=m;var I=p.alternate;for(I!==null&&(I.lanes|=m),I=p,p=p.return;p!==null;)p.childLanes|=m,I=p.alternate,I!==null&&(I.childLanes|=m),I=p,p=p.return;return I.tag===3?I.stateNode:null}var Vn=!1;function os(p){p.updateQueue={baseState:p.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ql(p,m){p=p.updateQueue,m.updateQueue===p&&(m.updateQueue={baseState:p.baseState,firstBaseUpdate:p.firstBaseUpdate,lastBaseUpdate:p.lastBaseUpdate,shared:p.shared,effects:p.effects})}function ca(p,m){return{eventTime:p,lane:m,tag:0,payload:null,callback:null,next:null}}function Jr(p,m,I){var $=p.updateQueue;if($===null)return null;if($=$.shared,(rr&2)!==0){var ee=$.pending;return ee===null?m.next=m:(m.next=ee.next,ee.next=m),$.pending=m,$i(p,I)}return ee=$.interleaved,ee===null?(m.next=m,Gi($)):(m.next=ee.next,ee.next=m),$.interleaved=m,$i(p,I)}function vl(p,m,I){if(m=m.updateQueue,m!==null&&(m=m.shared,(I&4194240)!==0)){var $=m.lanes;$&=p.pendingLanes,I|=$,m.lanes=I,Fa(p,I)}}function ka(p,m){var I=p.updateQueue,$=p.alternate;if($!==null&&($=$.updateQueue,I===$)){var ee=null,oe=null;if(I=I.firstBaseUpdate,I!==null){do{var Ee={eventTime:I.eventTime,lane:I.lane,tag:I.tag,payload:I.payload,callback:I.callback,next:null};oe===null?ee=oe=Ee:oe=oe.next=Ee,I=I.next}while(I!==null);oe===null?ee=oe=m:oe=oe.next=m}else ee=oe=m;I={baseState:$.baseState,firstBaseUpdate:ee,lastBaseUpdate:oe,shared:$.shared,effects:$.effects},p.updateQueue=I;return}p=I.lastBaseUpdate,p===null?I.firstBaseUpdate=m:p.next=m,I.lastBaseUpdate=m}function Wi(p,m,I,$){var ee=p.updateQueue;Vn=!1;var oe=ee.firstBaseUpdate,Ee=ee.lastBaseUpdate,We=ee.shared.pending;if(We!==null){ee.shared.pending=null;var rt=We,yt=rt.next;rt.next=null,Ee===null?oe=yt:Ee.next=yt,Ee=rt;var Bt=p.alternate;Bt!==null&&(Bt=Bt.updateQueue,We=Bt.lastBaseUpdate,We!==Ee&&(We===null?Bt.firstBaseUpdate=yt:We.next=yt,Bt.lastBaseUpdate=rt))}if(oe!==null){var pr=ee.baseState;Ee=0,Bt=yt=rt=null,We=oe;do{var Ot=We.lane,Nn=We.eventTime;if(($&Ot)===Ot){Bt!==null&&(Bt=Bt.next={eventTime:Nn,lane:0,tag:We.tag,payload:We.payload,callback:We.callback,next:null});e:{var dn=p,uo=We;switch(Ot=m,Nn=I,uo.tag){case 1:if(dn=uo.payload,typeof dn=="function"){pr=dn.call(Nn,pr,Ot);break e}pr=dn;break e;case 3:dn.flags=dn.flags&-65537|128;case 0:if(dn=uo.payload,Ot=typeof dn=="function"?dn.call(Nn,pr,Ot):dn,Ot==null)break e;pr=a({},pr,Ot);break e;case 2:Vn=!0}}We.callback!==null&&We.lane!==0&&(p.flags|=64,Ot=ee.effects,Ot===null?ee.effects=[We]:Ot.push(We))}else Nn={eventTime:Nn,lane:Ot,tag:We.tag,payload:We.payload,callback:We.callback,next:null},Bt===null?(yt=Bt=Nn,rt=pr):Bt=Bt.next=Nn,Ee|=Ot;if(We=We.next,We===null){if(We=ee.shared.pending,We===null)break;Ot=We,We=Ot.next,Ot.next=null,ee.lastBaseUpdate=Ot,ee.shared.pending=null}}while(!0);if(Bt===null&&(rt=pr),ee.baseState=rt,ee.firstBaseUpdate=yt,ee.lastBaseUpdate=Bt,m=ee.shared.interleaved,m!==null){ee=m;do Ee|=ee.lane,ee=ee.next;while(ee!==m)}else oe===null&&(ee.shared.lanes=0);Is|=Ee,p.lanes=Ee,p.memoizedState=pr}}function ml(p,m,I){if(p=m.effects,m.effects=null,p!==null)for(m=0;m<p.length;m++){var $=p[m],ee=$.callback;if(ee!==null){if($.callback=null,$=I,typeof ee!="function")throw Error(l(191,ee));ee.call($)}}}var _o={},Yi=oi(_o),Bo=oi(_o),za=oi(_o);function Ti(p){if(p===_o)throw Error(l(174));return p}function xo(p,m){mr(za,m),mr(Bo,p),mr(Yi,_o),p=H(m),an(Yi),mr(Yi,p)}function zo(){an(Yi),an(Bo),an(za)}function Oa(p){var m=Ti(za.current),I=Ti(Yi.current);m=V(I,p.type,m),I!==m&&(mr(Bo,p),mr(Yi,m))}function So(p){Bo.current===p&&(an(Yi),an(Bo))}var tr=oi(0);function en(p){for(var m=p;m!==null;){if(m.tag===13){var I=m.memoizedState;if(I!==null&&(I=I.dehydrated,I===null||Ui(I)||Rr(I)))return m}else if(m.tag===19&&m.memoizedProps.revealOrder!==void 0){if((m.flags&128)!==0)return m}else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===p)break;for(;m.sibling===null;){if(m.return===null||m.return===p)return null;m=m.return}m.sibling.return=m.return,m=m.sibling}return null}var Ln=[];function Tn(){for(var p=0;p<Ln.length;p++){var m=Ln[p];le?m._workInProgressVersionPrimary=null:m._workInProgressVersionSecondary=null}Ln.length=0}var Gn=o.ReactCurrentDispatcher,Eo=o.ReactCurrentBatchConfig,Xi=0,on=null,ri=null,ui=null,yl=!1,Jl=!1,eu=0,bl=0;function bi(){throw Error(l(321))}function el(p,m){if(m===null)return!1;for(var I=0;I<m.length&&I<p.length;I++)if(!Aa(p[I],m[I]))return!1;return!0}function tu(p,m,I,$,ee,oe){if(Xi=oe,on=m,m.memoizedState=null,m.updateQueue=null,m.lanes=0,Gn.current=p===null||p.memoizedState===null?zu:Al,p=I($,ee),Jl){oe=0;do{if(Jl=!1,eu=0,25<=oe)throw Error(l(301));oe+=1,ui=ri=null,m.updateQueue=null,Gn.current=df,p=I($,ee)}while(Jl)}if(Gn.current=Rs,m=ri!==null&&ri.next!==null,Xi=0,ui=ri=on=null,yl=!1,m)throw Error(l(300));return p}function Fu(){var p=eu!==0;return eu=0,p}function Ua(){var p={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ui===null?on.memoizedState=ui=p:ui=ui.next=p,ui}function Ri(){if(ri===null){var p=on.alternate;p=p!==null?p.memoizedState:null}else p=ri.next;var m=ui===null?on.memoizedState:ui.next;if(m!==null)ui=m,ri=p;else{if(p===null)throw Error(l(310));ri=p,p={memoizedState:ri.memoizedState,baseState:ri.baseState,baseQueue:ri.baseQueue,queue:ri.queue,next:null},ui===null?on.memoizedState=ui=p:ui=ui.next=p}return ui}function Uo(p,m){return typeof m=="function"?m(p):m}function ju(p){var m=Ri(),I=m.queue;if(I===null)throw Error(l(311));I.lastRenderedReducer=p;var $=ri,ee=$.baseQueue,oe=I.pending;if(oe!==null){if(ee!==null){var Ee=ee.next;ee.next=oe.next,oe.next=Ee}$.baseQueue=ee=oe,I.pending=null}if(ee!==null){oe=ee.next,$=$.baseState;var We=Ee=null,rt=null,yt=oe;do{var Bt=yt.lane;if((Xi&Bt)===Bt)rt!==null&&(rt=rt.next={lane:0,action:yt.action,hasEagerState:yt.hasEagerState,eagerState:yt.eagerState,next:null}),$=yt.hasEagerState?yt.eagerState:p($,yt.action);else{var pr={lane:Bt,action:yt.action,hasEagerState:yt.hasEagerState,eagerState:yt.eagerState,next:null};rt===null?(We=rt=pr,Ee=$):rt=rt.next=pr,on.lanes|=Bt,Is|=Bt}yt=yt.next}while(yt!==null&&yt!==oe);rt===null?Ee=$:rt.next=We,Aa($,m.memoizedState)||(ci=!0),m.memoizedState=$,m.baseState=Ee,m.baseQueue=rt,I.lastRenderedState=$}if(p=I.interleaved,p!==null){ee=p;do oe=ee.lane,on.lanes|=oe,Is|=oe,ee=ee.next;while(ee!==p)}else ee===null&&(I.lanes=0);return[m.memoizedState,I.dispatch]}function wl(p){var m=Ri(),I=m.queue;if(I===null)throw Error(l(311));I.lastRenderedReducer=p;var $=I.dispatch,ee=I.pending,oe=m.memoizedState;if(ee!==null){I.pending=null;var Ee=ee=ee.next;do oe=p(oe,Ee.action),Ee=Ee.next;while(Ee!==ee);Aa(oe,m.memoizedState)||(ci=!0),m.memoizedState=oe,m.baseQueue===null&&(m.baseState=oe),I.lastRenderedState=oe}return[oe,$]}function gc(){}function vc(p,m){var I=on,$=Ri(),ee=m(),oe=!Aa($.memoizedState,ee);if(oe&&($.memoizedState=ee,ci=!0),$=$.queue,Sl(bc.bind(null,I,$,p),[p]),$.getSnapshot!==m||oe||ui!==null&&ui.memoizedState.tag&1){if(I.flags|=2048,wi(9,yc.bind(null,I,$,ee,m),void 0,null),Or===null)throw Error(l(349));(Xi&30)!==0||mc(I,m,ee)}return ee}function mc(p,m,I){p.flags|=16384,p={getSnapshot:m,value:I},m=on.updateQueue,m===null?(m={lastEffect:null,stores:null},on.updateQueue=m,m.stores=[p]):(I=m.stores,I===null?m.stores=[p]:I.push(p))}function yc(p,m,I,$){m.value=I,m.getSnapshot=$,wc(m)&&qo(p)}function bc(p,m,I){return I(function(){wc(m)&&qo(p)})}function wc(p){var m=p.getSnapshot;p=p.value;try{var I=m();return!Aa(p,I)}catch{return!0}}function qo(p){var m=$i(p,1);m!==null&&ma(m,p,1,-1)}function _l(p){var m=Ua();return typeof p=="function"&&(p=p()),m.memoizedState=m.baseState=p,p={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:p},m.queue=p,p=p.dispatch=Hh.bind(null,on,p),[m.memoizedState,p]}function wi(p,m,I,$){return p={tag:p,create:m,destroy:I,deps:$,next:null},m=on.updateQueue,m===null?(m={lastEffect:null,stores:null},on.updateQueue=m,m.lastEffect=p.next=p):(I=m.lastEffect,I===null?m.lastEffect=p.next=p:($=I.next,I.next=p,p.next=$,m.lastEffect=p)),p}function ro(){return Ri().memoizedState}function xl(p,m,I,$){var ee=Ua();on.flags|=p,ee.memoizedState=wi(1|m,I,void 0,$===void 0?null:$)}function Ho(p,m,I,$){var ee=Ri();$=$===void 0?null:$;var oe=void 0;if(ri!==null){var Ee=ri.memoizedState;if(oe=Ee.destroy,$!==null&&el($,Ee.deps)){ee.memoizedState=wi(m,I,oe,$);return}}on.flags|=p,ee.memoizedState=wi(1|m,I,oe,$)}function ff(p,m){return xl(8390656,8,p,m)}function Sl(p,m){return Ho(2048,8,p,m)}function ru(p,m){return Ho(4,2,p,m)}function sn(p,m){return Ho(4,4,p,m)}function Du(p,m){if(typeof m=="function")return p=p(),m(p),function(){m(null)};if(m!=null)return p=p(),m.current=p,function(){m.current=null}}function El(p,m,I){return I=I!=null?I.concat([p]):null,Ho(4,4,Du.bind(null,m,p),I)}function Ts(){}function nu(p,m){var I=Ri();m=m===void 0?null:m;var $=I.memoizedState;return $!==null&&m!==null&&el(m,$[1])?$[0]:(I.memoizedState=[p,m],p)}function iu(p,m){var I=Ri();m=m===void 0?null:m;var $=I.memoizedState;return $!==null&&m!==null&&el(m,$[1])?$[0]:(p=p(),I.memoizedState=[p,m],p)}function au(p,m,I){return(Xi&21)===0?(p.baseState&&(p.baseState=!1,ci=!0),p.memoizedState=I):(Aa(I,m)||(I=ns(),on.lanes|=I,Is|=I,p.baseState=!0),m)}function _c(p,m){var I=xt;xt=I!==0&&4>I?I:4,p(!0);var $=Eo.transition;Eo.transition={};try{p(!1),m()}finally{xt=I,Eo.transition=$}}function tl(){return Ri().memoizedState}function Xf(p,m,I){var $=di(p);if(I={lane:$,action:I,hasEagerState:!1,eagerState:null,next:null},Kf(p))hf(m,I);else if(I=ua(p,m,I,$),I!==null){var ee=gn();ma(I,p,$,ee),Bu(I,m,$)}}function Hh(p,m,I){var $=di(p),ee={lane:$,action:I,hasEagerState:!1,eagerState:null,next:null};if(Kf(p))hf(m,ee);else{var oe=p.alternate;if(p.lanes===0&&(oe===null||oe.lanes===0)&&(oe=m.lastRenderedReducer,oe!==null))try{var Ee=m.lastRenderedState,We=oe(Ee,I);if(ee.hasEagerState=!0,ee.eagerState=We,Aa(We,Ee)){var rt=m.interleaved;rt===null?(ee.next=ee,Gi(m)):(ee.next=rt.next,rt.next=ee),m.interleaved=ee;return}}catch{}finally{}I=ua(p,m,ee,$),I!==null&&(ee=gn(),ma(I,p,$,ee),Bu(I,m,$))}}function Kf(p){var m=p.alternate;return p===on||m!==null&&m===on}function hf(p,m){Jl=yl=!0;var I=p.pending;I===null?m.next=m:(m.next=I.next,I.next=m),p.pending=m}function Bu(p,m,I){if((I&4194240)!==0){var $=m.lanes;$&=p.pendingLanes,I|=$,m.lanes=I,Fa(p,I)}}var Rs={readContext:li,useCallback:bi,useContext:bi,useEffect:bi,useImperativeHandle:bi,useInsertionEffect:bi,useLayoutEffect:bi,useMemo:bi,useReducer:bi,useRef:bi,useState:bi,useDebugValue:bi,useDeferredValue:bi,useTransition:bi,useMutableSource:bi,useSyncExternalStore:bi,useId:bi,unstable_isNewReconciler:!1},zu={readContext:li,useCallback:function(p,m){return Ua().memoizedState=[p,m===void 0?null:m],p},useContext:li,useEffect:ff,useImperativeHandle:function(p,m,I){return I=I!=null?I.concat([p]):null,xl(4194308,4,Du.bind(null,m,p),I)},useLayoutEffect:function(p,m){return xl(4194308,4,p,m)},useInsertionEffect:function(p,m){return xl(4,2,p,m)},useMemo:function(p,m){var I=Ua();return m=m===void 0?null:m,p=p(),I.memoizedState=[p,m],p},useReducer:function(p,m,I){var $=Ua();return m=I!==void 0?I(m):m,$.memoizedState=$.baseState=m,p={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:p,lastRenderedState:m},$.queue=p,p=p.dispatch=Xf.bind(null,on,p),[$.memoizedState,p]},useRef:function(p){var m=Ua();return p={current:p},m.memoizedState=p},useState:_l,useDebugValue:Ts,useDeferredValue:function(p){return Ua().memoizedState=p},useTransition:function(){var p=_l(!1),m=p[0];return p=_c.bind(null,p[1]),Ua().memoizedState=p,[m,p]},useMutableSource:function(){},useSyncExternalStore:function(p,m,I){var $=on,ee=Ua();if(Rt){if(I===void 0)throw Error(l(407));I=I()}else{if(I=m(),Or===null)throw Error(l(349));(Xi&30)!==0||mc($,m,I)}ee.memoizedState=I;var oe={value:I,getSnapshot:m};return ee.queue=oe,ff(bc.bind(null,$,oe,p),[p]),$.flags|=2048,wi(9,yc.bind(null,$,oe,I,m),void 0,null),I},useId:function(){var p=Ua(),m=Or.identifierPrefix;if(Rt){var I=Fe,$=Ne;I=($&~(1<<32-Ea($)-1)).toString(32)+I,m=":"+m+"R"+I,I=eu++,0<I&&(m+="H"+I.toString(32)),m+=":"}else I=bl++,m=":"+m+"r"+I.toString(32)+":";return p.memoizedState=m},unstable_isNewReconciler:!1},Al={readContext:li,useCallback:nu,useContext:li,useEffect:Sl,useImperativeHandle:El,useInsertionEffect:ru,useLayoutEffect:sn,useMemo:iu,useReducer:ju,useRef:ro,useState:function(){return ju(Uo)},useDebugValue:Ts,useDeferredValue:function(p){var m=Ri();return au(m,ri.memoizedState,p)},useTransition:function(){var p=ju(Uo)[0],m=Ri().memoizedState;return[p,m]},useMutableSource:gc,useSyncExternalStore:vc,useId:tl,unstable_isNewReconciler:!1},df={readContext:li,useCallback:nu,useContext:li,useEffect:Sl,useImperativeHandle:El,useInsertionEffect:ru,useLayoutEffect:sn,useMemo:iu,useReducer:wl,useRef:ro,useState:function(){return wl(Uo)},useDebugValue:Ts,useDeferredValue:function(p){var m=Ri();return ri===null?m.memoizedState=p:au(m,ri.memoizedState,p)},useTransition:function(){var p=wl(Uo)[0],m=Ri().memoizedState;return[p,m]},useMutableSource:gc,useSyncExternalStore:vc,useId:tl,unstable_isNewReconciler:!1};function no(p,m){if(p&&p.defaultProps){m=a({},m),p=p.defaultProps;for(var I in p)m[I]===void 0&&(m[I]=p[I]);return m}return m}function xc(p,m,I,$){m=p.memoizedState,I=I($,m),I=I==null?m:a({},m,I),p.memoizedState=I,p.lanes===0&&(p.updateQueue.baseState=I)}var Uu={isMounted:function(p){return(p=p._reactInternals)?R(p)===p:!1},enqueueSetState:function(p,m,I){p=p._reactInternals;var $=gn(),ee=di(p),oe=ca($,ee);oe.payload=m,I!=null&&(oe.callback=I),m=Jr(p,oe,ee),m!==null&&(ma(m,p,ee,$),vl(m,p,ee))},enqueueReplaceState:function(p,m,I){p=p._reactInternals;var $=gn(),ee=di(p),oe=ca($,ee);oe.tag=1,oe.payload=m,I!=null&&(oe.callback=I),m=Jr(p,oe,ee),m!==null&&(ma(m,p,ee,$),vl(m,p,ee))},enqueueForceUpdate:function(p,m){p=p._reactInternals;var I=gn(),$=di(p),ee=ca(I,$);ee.tag=2,m!=null&&(ee.callback=m),m=Jr(p,ee,$),m!==null&&(ma(m,p,$,I),vl(m,p,$))}};function Zf(p,m,I,$,ee,oe,Ee){return p=p.stateNode,typeof p.shouldComponentUpdate=="function"?p.shouldComponentUpdate($,oe,Ee):m.prototype&&m.prototype.isPureReactComponent?!Ba(I,$)||!Ba(ee,oe):!0}function Qf(p,m,I){var $=!1,ee=Jo,oe=m.contextType;return typeof oe=="object"&&oe!==null?oe=li(oe):(ee=Pn(m)?Ka:Er.current,$=m.contextTypes,oe=($=$!=null)?Hi(p,ee):Jo),m=new m(I,oe),p.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Uu,p.stateNode=m,m._reactInternals=p,$&&(p=p.stateNode,p.__reactInternalMemoizedUnmaskedChildContext=ee,p.__reactInternalMemoizedMaskedChildContext=oe),m}function Sc(p,m,I,$){p=m.state,typeof m.componentWillReceiveProps=="function"&&m.componentWillReceiveProps(I,$),typeof m.UNSAFE_componentWillReceiveProps=="function"&&m.UNSAFE_componentWillReceiveProps(I,$),m.state!==p&&Uu.enqueueReplaceState(m,m.state,null)}function Ki(p,m,I,$){var ee=p.stateNode;ee.props=I,ee.state=p.memoizedState,ee.refs={},os(p);var oe=m.contextType;typeof oe=="object"&&oe!==null?ee.context=li(oe):(oe=Pn(m)?Ka:Er.current,ee.context=Hi(p,oe)),ee.state=p.memoizedState,oe=m.getDerivedStateFromProps,typeof oe=="function"&&(xc(p,m,oe,I),ee.state=p.memoizedState),typeof m.getDerivedStateFromProps=="function"||typeof ee.getSnapshotBeforeUpdate=="function"||typeof ee.UNSAFE_componentWillMount!="function"&&typeof ee.componentWillMount!="function"||(m=ee.state,typeof ee.componentWillMount=="function"&&ee.componentWillMount(),typeof ee.UNSAFE_componentWillMount=="function"&&ee.UNSAFE_componentWillMount(),m!==ee.state&&Uu.enqueueReplaceState(ee,ee.state,null),Wi(p,I,ee,$),ee.state=p.memoizedState),typeof ee.componentDidMount=="function"&&(p.flags|=4194308)}function Zi(p,m){try{var I="",$=m;do I+=Iu($),$=$.return;while($);var ee=I}catch(oe){ee=`
|
|
55
|
+
`+ee[Ee].replace(" at new "," at ");return p.displayName&&rt.includes("<anonymous>")&&(rt=rt.replace("<anonymous>",p.displayName)),rt}while(1<=Ee&&0<=We);break}}}finally{Sa=!1,Error.prepareStackTrace=I}return(p=p?p.displayName||p.name:"")?Zo(p):""}var cc=Object.prototype.hasOwnProperty,$s=[],po=-1;function oi(p){return{current:p}}function an(p){0>po||(p.current=$s[po],$s[po]=null,po--)}function mr(p,m){po++,$s[po]=p.current,p.current=m}var Jo={},Er=oi(Jo),qi=oi(!1),Ka=Jo;function Hi(p,m){var I=p.type.contextTypes;if(!I)return Jo;var $=p.stateNode;if($&&$.__reactInternalMemoizedUnmaskedChildContext===m)return $.__reactInternalMemoizedMaskedChildContext;var ee={},oe;for(oe in I)ee[oe]=m[oe];return $&&(p=p.stateNode,p.__reactInternalMemoizedUnmaskedChildContext=m,p.__reactInternalMemoizedMaskedChildContext=ee),ee}function Pn(p){return p=p.childContextTypes,p!=null}function Vi(){an(qi),an(Er)}function Ws(p,m,I){if(Er.current!==Jo)throw Error(l(168));mr(Er,m),mr(qi,I)}function qn(p,m,I){var $=p.stateNode;if(m=m.childContextTypes,typeof $.getChildContext!="function")return I;$=$.getChildContext();for(var ee in $)if(!(ee in m))throw Error(l(108,L(p)||"Unknown",ee));return a({},I,$)}function es(p){return p=(p=p.stateNode)&&p.__reactInternalMemoizedMergedChildContext||Jo,Ka=Er.current,mr(Er,p),mr(qi,qi.current),!0}function Ru(p,m,I){var $=p.stateNode;if(!$)throw Error(l(169));I?(p=qn(p,m,Ka),$.__reactInternalMemoizedMergedChildContext=p,an(qi),an(Er),mr(Er,p)):an(qi),mr(qi,I)}var Ea=Math.clz32?Math.clz32:$l,hl=Math.log,ts=Math.LN2;function $l(p){return p>>>=0,p===0?32:31-(hl(p)/ts|0)|0}var Ar=64,go=4194304;function rs(p){switch(p&-p){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 p&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return p&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return p}}function Ys(p,m){var I=p.pendingLanes;if(I===0)return 0;var $=0,ee=p.suspendedLanes,oe=p.pingedLanes,Ee=I&268435455;if(Ee!==0){var We=Ee&~ee;We!==0?$=rs(We):(oe&=Ee,oe!==0&&($=rs(oe)))}else Ee=I&~ee,Ee!==0?$=rs(Ee):oe!==0&&($=rs(oe));if($===0)return 0;if(m!==0&&m!==$&&(m&ee)===0&&(ee=$&-$,oe=m&-m,ee>=oe||ee===16&&(oe&4194240)!==0))return m;if(($&4)!==0&&($|=I&16),m=p.entangledLanes,m!==0)for(p=p.entanglements,m&=$;0<m;)I=31-Ea(m),ee=1<<I,$|=p[I],m&=~ee;return $}function fc(p,m){switch(p){case 1:case 2:case 4:return m+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 m+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hc(p,m){for(var I=p.suspendedLanes,$=p.pingedLanes,ee=p.expirationTimes,oe=p.pendingLanes;0<oe;){var Ee=31-Ea(oe),We=1<<Ee,rt=ee[Ee];rt===-1?((We&I)===0||(We&$)!==0)&&(ee[Ee]=fc(We,m)):rt<=m&&(p.expiredLanes|=We),oe&=~We}}function Xs(p){return p=p.pendingLanes&-1073741825,p!==0?p:p&1073741824?1073741824:0}function ns(){var p=Ar;return Ar<<=1,(Ar&4194240)===0&&(Ar=64),p}function Za(p){for(var m=[],I=0;31>I;I++)m.push(p);return m}function Ma(p,m,I){p.pendingLanes|=m,m!==536870912&&(p.suspendedLanes=0,p.pingedLanes=0),p=p.eventTimes,m=31-Ea(m),p[m]=I}function Ia(p,m){var I=p.pendingLanes&~m;p.pendingLanes=m,p.suspendedLanes=0,p.pingedLanes=0,p.expiredLanes&=m,p.mutableReadLanes&=m,p.entangledLanes&=m,m=p.entanglements;var $=p.eventTimes;for(p=p.expirationTimes;0<I;){var ee=31-Ea(I),oe=1<<ee;m[ee]=0,$[ee]=-1,p[ee]=-1,I&=~oe}}function Fa(p,m){var I=p.entangledLanes|=m;for(p=p.entanglements;I;){var $=31-Ea(I),ee=1<<$;ee&m|p[$]&m&&(p[$]|=m),I&=~ee}}var xt=0;function Ks(p){return p&=-p,1<p?4<p?(p&268435455)!==0?16:536870912:4:1}var vo=i.unstable_scheduleCallback,dc=i.unstable_cancelCallback,pc=i.unstable_shouldYield,Qa=i.unstable_requestPaint,pn=i.unstable_now,Wl=i.unstable_ImmediatePriority,Yl=i.unstable_UserBlockingPriority,ks=i.unstable_NormalPriority,Mu=i.unstable_IdlePriority,ja=null,mi=null;function Fo(p){if(mi&&typeof mi.onCommitFiberRoot=="function")try{mi.onCommitFiberRoot(ja,p,void 0,(p.current.flags&128)===128)}catch{}}function Xl(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var Aa=typeof Object.is=="function"?Object.is:Xl,Ja=null,mo=!1,yo=!1;function Zs(p){Ja===null?Ja=[p]:Ja.push(p)}function dl(p){mo=!0,Zs(p)}function Jn(){if(!yo&&Ja!==null){yo=!0;var p=0,m=xt;try{var I=Ja;for(xt=1;p<I.length;p++){var $=I[p];do $=$(!0);while($!==null)}Ja=null,mo=!1}catch(ee){throw Ja!==null&&(Ja=Ja.slice(p+1)),vo(Wl,Jn),ee}finally{xt=m,yo=!1}}return null}var Da=[],eo=0,Os=null,yi=0,kn=[],X=0,fe=null,Ne=1,Fe="";function Ge(p,m){Da[eo++]=yi,Da[eo++]=Os,Os=p,yi=m}function lt(p,m,I){kn[X++]=Ne,kn[X++]=Fe,kn[X++]=fe,fe=p;var $=Ne;p=Fe;var ee=32-Ea($)-1;$&=~(1<<ee),I+=1;var oe=32-Ea(m)+ee;if(30<oe){var Ee=ee-ee%5;oe=($&(1<<Ee)-1).toString(32),$>>=Ee,ee-=Ee,Ne=1<<32-Ea(m)+ee|I<<ee|$,Fe=oe+p}else Ne=1<<oe|I<<ee|$,Fe=p}function ft(p){p.return!==null&&(Ge(p,1),lt(p,1,0))}function Lt(p){for(;p===Os;)Os=Da[--eo],Da[eo]=null,yi=Da[--eo],Da[eo]=null;for(;p===fe;)fe=kn[--X],kn[X]=null,Fe=kn[--X],kn[X]=null,Ne=kn[--X],kn[X]=null}var Et=null,Ut=null,Rt=!1,Pr=!1,Mr=null;function ei(p,m){var I=$o(5,null,null,0);I.elementType="DELETED",I.stateNode=m,I.return=p,m=p.deletions,m===null?(p.deletions=[I],p.flags|=16):m.push(I)}function Hr(p,m){switch(p.tag){case 5:return m=sa(m,p.type,p.pendingProps),m!==null?(p.stateNode=m,Et=p,Ut=Mo(m),!0):!1;case 6:return m=Ra(m,p.pendingProps),m!==null?(p.stateNode=m,Et=p,Ut=null,!0):!1;case 13:if(m=Un(m),m!==null){var I=fe!==null?{id:Ne,overflow:Fe}:null;return p.memoizedState={dehydrated:m,treeContext:I,retryLane:1073741824},I=$o(18,null,null,0),I.stateNode=m,I.return=p,p.child=I,Et=p,Ut=null,!0}return!1;default:return!1}}function ti(p){return(p.mode&1)!==0&&(p.flags&128)===0}function Hn(p){if(Rt){var m=Ut;if(m){var I=m;if(!Hr(p,m)){if(ti(p))throw Error(l(418));m=ba(I);var $=Et;m&&Hr(p,m)?ei($,I):(p.flags=p.flags&-4097|2,Rt=!1,Et=p)}}else{if(ti(p))throw Error(l(418));p.flags=p.flags&-4097|2,Rt=!1,Et=p}}}function Ni(p){for(p=p.return;p!==null&&p.tag!==5&&p.tag!==3&&p.tag!==13;)p=p.return;Et=p}function bo(p){if(!Me||p!==Et)return!1;if(!Rt)return Ni(p),Rt=!0,!1;if(p.tag!==3&&(p.tag!==5||Vl(p.type)&&!re(p.type,p.memoizedProps))){var m=Ut;if(m){if(ti(p))throw Cs(),Error(l(418));for(;m;)ei(p,m),m=ba(m)}}if(Ni(p),p.tag===13){if(!Me)throw Error(l(316));if(p=p.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(l(317));Ut=Io(p)}else Ut=Et?ba(p.stateNode):null;return!0}function Cs(){for(var p=Ut;p;)p=ba(p)}function Ns(){Me&&(Ut=Et=null,Pr=Rt=!1)}function Kl(p){Mr===null?Mr=[p]:Mr.push(p)}var pl=o.ReactCurrentBatchConfig;function Ba(p,m){if(Aa(p,m))return!0;if(typeof p!="object"||p===null||typeof m!="object"||m===null)return!1;var I=Object.keys(p),$=Object.keys(m);if(I.length!==$.length)return!1;for($=0;$<I.length;$++){var ee=I[$];if(!cc.call(m,ee)||!Aa(p[ee],m[ee]))return!1}return!0}function Iu(p){switch(p.tag){case 5:return Zo(p.type);case 16:return Zo("Lazy");case 13:return Zo("Suspense");case 19:return Zo("SuspenseList");case 0:case 2:case 15:return p=Qo(p.type,!1),p;case 11:return p=Qo(p.type.render,!1),p;case 1:return p=Qo(p.type,!0),p;default:return""}}function wo(p,m,I){if(p=I.ref,p!==null&&typeof p!="function"&&typeof p!="object"){if(I._owner){if(I=I._owner,I){if(I.tag!==1)throw Error(l(309));var $=I.stateNode}if(!$)throw Error(l(147,p));var ee=$,oe=""+p;return m!==null&&m.ref!==null&&typeof m.ref=="function"&&m.ref._stringRef===oe?m.ref:(m=function(Ee){var We=ee.refs;Ee===null?delete We[oe]:We[oe]=Ee},m._stringRef=oe,m)}if(typeof p!="string")throw Error(l(284));if(!I._owner)throw Error(l(290,p))}return p}function jo(p,m){throw p=Object.prototype.toString.call(m),Error(l(31,p==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":p))}function bi(p){var m=p._init;return m(p._payload)}function is(p){function m(et,Xe){if(p){var at=et.deletions;at===null?(et.deletions=[Xe],et.flags|=16):at.push(Xe)}}function I(et,Xe){if(!p)return null;for(;Xe!==null;)m(et,Xe),Xe=Xe.sibling;return null}function $(et,Xe){for(et=new Map;Xe!==null;)Xe.key!==null?et.set(Xe.key,Xe):et.set(Xe.index,Xe),Xe=Xe.sibling;return et}function ee(et,Xe){return et=pu(et,Xe),et.index=0,et.sibling=null,et}function oe(et,Xe,at){return et.index=at,p?(at=et.alternate,at!==null?(at=at.index,at<Xe?(et.flags|=2,Xe):at):(et.flags|=2,Xe)):(et.flags|=1048576,Xe)}function Ee(et){return p&&et.alternate===null&&(et.flags|=2),et}function We(et,Xe,at,Ct){return Xe===null||Xe.tag!==6?(Xe=Lc(at,et.mode,Ct),Xe.return=et,Xe):(Xe=ee(Xe,at),Xe.return=et,Xe)}function rt(et,Xe,at,Ct){var Qt=at.type;return Qt===f?Bt(et,Xe,at.props.children,Ct,at.key):Xe!==null&&(Xe.elementType===Qt||typeof Qt=="object"&&Qt!==null&&Qt.$$typeof===w&&bi(Qt)===Xe.type)?(Ct=ee(Xe,at.props),Ct.ref=wo(et,Xe,at),Ct.return=et,Ct):(Ct=nh(at.type,at.key,at.props,null,et.mode,Ct),Ct.ref=wo(et,Xe,at),Ct.return=et,Ct)}function yt(et,Xe,at,Ct){return Xe===null||Xe.tag!==4||Xe.stateNode.containerInfo!==at.containerInfo||Xe.stateNode.implementation!==at.implementation?(Xe=ih(at,et.mode,Ct),Xe.return=et,Xe):(Xe=ee(Xe,at.children||[]),Xe.return=et,Xe)}function Bt(et,Xe,at,Ct,Qt){return Xe===null||Xe.tag!==7?(Xe=Na(at,et.mode,Ct,Qt),Xe.return=et,Xe):(Xe=ee(Xe,at),Xe.return=et,Xe)}function pr(et,Xe,at){if(typeof Xe=="string"&&Xe!==""||typeof Xe=="number")return Xe=Lc(""+Xe,et.mode,at),Xe.return=et,Xe;if(typeof Xe=="object"&&Xe!==null){switch(Xe.$$typeof){case u:return at=nh(Xe.type,Xe.key,Xe.props,null,et.mode,at),at.ref=wo(et,null,Xe),at.return=et,at;case d:return Xe=ih(Xe,et.mode,at),Xe.return=et,Xe;case w:var Ct=Xe._init;return pr(et,Ct(Xe._payload),at)}if(J(Xe)||M(Xe))return Xe=Na(Xe,et.mode,at,null),Xe.return=et,Xe;jo(et,Xe)}return null}function Ot(et,Xe,at,Ct){var Qt=Xe!==null?Xe.key:null;if(typeof at=="string"&&at!==""||typeof at=="number")return Qt!==null?null:We(et,Xe,""+at,Ct);if(typeof at=="object"&&at!==null){switch(at.$$typeof){case u:return at.key===Qt?rt(et,Xe,at,Ct):null;case d:return at.key===Qt?yt(et,Xe,at,Ct):null;case w:return Qt=at._init,Ot(et,Xe,Qt(at._payload),Ct)}if(J(at)||M(at))return Qt!==null?null:Bt(et,Xe,at,Ct,null);jo(et,at)}return null}function Nn(et,Xe,at,Ct,Qt){if(typeof Ct=="string"&&Ct!==""||typeof Ct=="number")return et=et.get(at)||null,We(Xe,et,""+Ct,Qt);if(typeof Ct=="object"&&Ct!==null){switch(Ct.$$typeof){case u:return et=et.get(Ct.key===null?at:Ct.key)||null,rt(Xe,et,Ct,Qt);case d:return et=et.get(Ct.key===null?at:Ct.key)||null,yt(Xe,et,Ct,Qt);case w:var xr=Ct._init;return Nn(et,Xe,at,xr(Ct._payload),Qt)}if(J(Ct)||M(Ct))return et=et.get(at)||null,Bt(Xe,et,Ct,Qt,null);jo(Xe,Ct)}return null}function dn(et,Xe,at,Ct){for(var Qt=null,xr=null,gr=Xe,Ur=Xe=0,ea=null;gr!==null&&Ur<at.length;Ur++){gr.index>Ur?(ea=gr,gr=null):ea=gr.sibling;var Fr=Ot(et,gr,at[Ur],Ct);if(Fr===null){gr===null&&(gr=ea);break}p&&gr&&Fr.alternate===null&&m(et,gr),Xe=oe(Fr,Xe,Ur),xr===null?Qt=Fr:xr.sibling=Fr,xr=Fr,gr=ea}if(Ur===at.length)return I(et,gr),Rt&&Ge(et,Ur),Qt;if(gr===null){for(;Ur<at.length;Ur++)gr=pr(et,at[Ur],Ct),gr!==null&&(Xe=oe(gr,Xe,Ur),xr===null?Qt=gr:xr.sibling=gr,xr=gr);return Rt&&Ge(et,Ur),Qt}for(gr=$(et,gr);Ur<at.length;Ur++)ea=Nn(gr,et,Ur,at[Ur],Ct),ea!==null&&(p&&ea.alternate!==null&&gr.delete(ea.key===null?Ur:ea.key),Xe=oe(ea,Xe,Ur),xr===null?Qt=ea:xr.sibling=ea,xr=ea);return p&&gr.forEach(function(Ha){return m(et,Ha)}),Rt&&Ge(et,Ur),Qt}function uo(et,Xe,at,Ct){var Qt=M(at);if(typeof Qt!="function")throw Error(l(150));if(at=Qt.call(at),at==null)throw Error(l(151));for(var xr=Qt=null,gr=Xe,Ur=Xe=0,ea=null,Fr=at.next();gr!==null&&!Fr.done;Ur++,Fr=at.next()){gr.index>Ur?(ea=gr,gr=null):ea=gr.sibling;var Ha=Ot(et,gr,Fr.value,Ct);if(Ha===null){gr===null&&(gr=ea);break}p&&gr&&Ha.alternate===null&&m(et,gr),Xe=oe(Ha,Xe,Ur),xr===null?Qt=Ha:xr.sibling=Ha,xr=Ha,gr=ea}if(Fr.done)return I(et,gr),Rt&&Ge(et,Ur),Qt;if(gr===null){for(;!Fr.done;Ur++,Fr=at.next())Fr=pr(et,Fr.value,Ct),Fr!==null&&(Xe=oe(Fr,Xe,Ur),xr===null?Qt=Fr:xr.sibling=Fr,xr=Fr);return Rt&&Ge(et,Ur),Qt}for(gr=$(et,gr);!Fr.done;Ur++,Fr=at.next())Fr=Nn(gr,et,Ur,Fr.value,Ct),Fr!==null&&(p&&Fr.alternate!==null&&gr.delete(Fr.key===null?Ur:Fr.key),Xe=oe(Fr,Xe,Ur),xr===null?Qt=Fr:xr.sibling=Fr,xr=Fr);return p&&gr.forEach(function(M0){return m(et,M0)}),Rt&&Ge(et,Ur),Qt}function il(et,Xe,at,Ct){if(typeof at=="object"&&at!==null&&at.type===f&&at.key===null&&(at=at.props.children),typeof at=="object"&&at!==null){switch(at.$$typeof){case u:e:{for(var Qt=at.key,xr=Xe;xr!==null;){if(xr.key===Qt){if(Qt=at.type,Qt===f){if(xr.tag===7){I(et,xr.sibling),Xe=ee(xr,at.props.children),Xe.return=et,et=Xe;break e}}else if(xr.elementType===Qt||typeof Qt=="object"&&Qt!==null&&Qt.$$typeof===w&&bi(Qt)===xr.type){I(et,xr.sibling),Xe=ee(xr,at.props),Xe.ref=wo(et,xr,at),Xe.return=et,et=Xe;break e}I(et,xr);break}else m(et,xr);xr=xr.sibling}at.type===f?(Xe=Na(at.props.children,et.mode,Ct,at.key),Xe.return=et,et=Xe):(Ct=nh(at.type,at.key,at.props,null,et.mode,Ct),Ct.ref=wo(et,Xe,at),Ct.return=et,et=Ct)}return Ee(et);case d:e:{for(xr=at.key;Xe!==null;){if(Xe.key===xr)if(Xe.tag===4&&Xe.stateNode.containerInfo===at.containerInfo&&Xe.stateNode.implementation===at.implementation){I(et,Xe.sibling),Xe=ee(Xe,at.children||[]),Xe.return=et,et=Xe;break e}else{I(et,Xe);break}else m(et,Xe);Xe=Xe.sibling}Xe=ih(at,et.mode,Ct),Xe.return=et,et=Xe}return Ee(et);case w:return xr=at._init,il(et,Xe,xr(at._payload),Ct)}if(J(at))return dn(et,Xe,at,Ct);if(M(at))return uo(et,Xe,at,Ct);jo(et,at)}return typeof at=="string"&&at!==""||typeof at=="number"?(at=""+at,Xe!==null&&Xe.tag===6?(I(et,Xe.sibling),Xe=ee(Xe,at),Xe.return=et,et=Xe):(I(et,Xe),Xe=Lc(at,et.mode,Ct),Xe.return=et,et=Xe),Ee(et)):I(et,Xe)}return il}var Pa=is(!0),gl=is(!1),Qs=oi(null),Li=null,Ls=null,Js=null;function Zl(){Js=Ls=Li=null}function si(p,m,I){le?(mr(Qs,m._currentValue),m._currentValue=I):(mr(Qs,m._currentValue2),m._currentValue2=I)}function la(p){var m=Qs.current;an(Qs),le?p._currentValue=m:p._currentValue2=m}function Do(p,m,I){for(;p!==null;){var $=p.alternate;if((p.childLanes&m)!==m?(p.childLanes|=m,$!==null&&($.childLanes|=m)):$!==null&&($.childLanes&m)!==m&&($.childLanes|=m),p===I)break;p=p.return}}function as(p,m){Li=p,Js=Ls=null,p=p.dependencies,p!==null&&p.firstContext!==null&&((p.lanes&m)!==0&&(ci=!0),p.firstContext=null)}function li(p){var m=le?p._currentValue:p._currentValue2;if(Js!==p)if(p={context:p,memoizedValue:m,next:null},Ls===null){if(Li===null)throw Error(l(308));Ls=p,Li.dependencies={lanes:0,firstContext:p}}else Ls=Ls.next=p;return m}var to=null;function Gi(p){to===null?to=[p]:to.push(p)}function ua(p,m,I,$){var ee=m.interleaved;return ee===null?(I.next=I,Gi(m)):(I.next=ee.next,ee.next=I),m.interleaved=I,$i(p,$)}function $i(p,m){p.lanes|=m;var I=p.alternate;for(I!==null&&(I.lanes|=m),I=p,p=p.return;p!==null;)p.childLanes|=m,I=p.alternate,I!==null&&(I.childLanes|=m),I=p,p=p.return;return I.tag===3?I.stateNode:null}var Vn=!1;function os(p){p.updateQueue={baseState:p.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ql(p,m){p=p.updateQueue,m.updateQueue===p&&(m.updateQueue={baseState:p.baseState,firstBaseUpdate:p.firstBaseUpdate,lastBaseUpdate:p.lastBaseUpdate,shared:p.shared,effects:p.effects})}function ca(p,m){return{eventTime:p,lane:m,tag:0,payload:null,callback:null,next:null}}function Jr(p,m,I){var $=p.updateQueue;if($===null)return null;if($=$.shared,(rr&2)!==0){var ee=$.pending;return ee===null?m.next=m:(m.next=ee.next,ee.next=m),$.pending=m,$i(p,I)}return ee=$.interleaved,ee===null?(m.next=m,Gi($)):(m.next=ee.next,ee.next=m),$.interleaved=m,$i(p,I)}function vl(p,m,I){if(m=m.updateQueue,m!==null&&(m=m.shared,(I&4194240)!==0)){var $=m.lanes;$&=p.pendingLanes,I|=$,m.lanes=I,Fa(p,I)}}function ka(p,m){var I=p.updateQueue,$=p.alternate;if($!==null&&($=$.updateQueue,I===$)){var ee=null,oe=null;if(I=I.firstBaseUpdate,I!==null){do{var Ee={eventTime:I.eventTime,lane:I.lane,tag:I.tag,payload:I.payload,callback:I.callback,next:null};oe===null?ee=oe=Ee:oe=oe.next=Ee,I=I.next}while(I!==null);oe===null?ee=oe=m:oe=oe.next=m}else ee=oe=m;I={baseState:$.baseState,firstBaseUpdate:ee,lastBaseUpdate:oe,shared:$.shared,effects:$.effects},p.updateQueue=I;return}p=I.lastBaseUpdate,p===null?I.firstBaseUpdate=m:p.next=m,I.lastBaseUpdate=m}function Wi(p,m,I,$){var ee=p.updateQueue;Vn=!1;var oe=ee.firstBaseUpdate,Ee=ee.lastBaseUpdate,We=ee.shared.pending;if(We!==null){ee.shared.pending=null;var rt=We,yt=rt.next;rt.next=null,Ee===null?oe=yt:Ee.next=yt,Ee=rt;var Bt=p.alternate;Bt!==null&&(Bt=Bt.updateQueue,We=Bt.lastBaseUpdate,We!==Ee&&(We===null?Bt.firstBaseUpdate=yt:We.next=yt,Bt.lastBaseUpdate=rt))}if(oe!==null){var pr=ee.baseState;Ee=0,Bt=yt=rt=null,We=oe;do{var Ot=We.lane,Nn=We.eventTime;if(($&Ot)===Ot){Bt!==null&&(Bt=Bt.next={eventTime:Nn,lane:0,tag:We.tag,payload:We.payload,callback:We.callback,next:null});e:{var dn=p,uo=We;switch(Ot=m,Nn=I,uo.tag){case 1:if(dn=uo.payload,typeof dn=="function"){pr=dn.call(Nn,pr,Ot);break e}pr=dn;break e;case 3:dn.flags=dn.flags&-65537|128;case 0:if(dn=uo.payload,Ot=typeof dn=="function"?dn.call(Nn,pr,Ot):dn,Ot==null)break e;pr=a({},pr,Ot);break e;case 2:Vn=!0}}We.callback!==null&&We.lane!==0&&(p.flags|=64,Ot=ee.effects,Ot===null?ee.effects=[We]:Ot.push(We))}else Nn={eventTime:Nn,lane:Ot,tag:We.tag,payload:We.payload,callback:We.callback,next:null},Bt===null?(yt=Bt=Nn,rt=pr):Bt=Bt.next=Nn,Ee|=Ot;if(We=We.next,We===null){if(We=ee.shared.pending,We===null)break;Ot=We,We=Ot.next,Ot.next=null,ee.lastBaseUpdate=Ot,ee.shared.pending=null}}while(!0);if(Bt===null&&(rt=pr),ee.baseState=rt,ee.firstBaseUpdate=yt,ee.lastBaseUpdate=Bt,m=ee.shared.interleaved,m!==null){ee=m;do Ee|=ee.lane,ee=ee.next;while(ee!==m)}else oe===null&&(ee.shared.lanes=0);Is|=Ee,p.lanes=Ee,p.memoizedState=pr}}function ml(p,m,I){if(p=m.effects,m.effects=null,p!==null)for(m=0;m<p.length;m++){var $=p[m],ee=$.callback;if(ee!==null){if($.callback=null,$=I,typeof ee!="function")throw Error(l(191,ee));ee.call($)}}}var _o={},Yi=oi(_o),Bo=oi(_o),za=oi(_o);function Ti(p){if(p===_o)throw Error(l(174));return p}function xo(p,m){mr(za,m),mr(Bo,p),mr(Yi,_o),p=H(m),an(Yi),mr(Yi,p)}function zo(){an(Yi),an(Bo),an(za)}function Oa(p){var m=Ti(za.current),I=Ti(Yi.current);m=V(I,p.type,m),I!==m&&(mr(Bo,p),mr(Yi,m))}function So(p){Bo.current===p&&(an(Yi),an(Bo))}var tr=oi(0);function en(p){for(var m=p;m!==null;){if(m.tag===13){var I=m.memoizedState;if(I!==null&&(I=I.dehydrated,I===null||Ui(I)||Rr(I)))return m}else if(m.tag===19&&m.memoizedProps.revealOrder!==void 0){if((m.flags&128)!==0)return m}else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===p)break;for(;m.sibling===null;){if(m.return===null||m.return===p)return null;m=m.return}m.sibling.return=m.return,m=m.sibling}return null}var Ln=[];function Tn(){for(var p=0;p<Ln.length;p++){var m=Ln[p];le?m._workInProgressVersionPrimary=null:m._workInProgressVersionSecondary=null}Ln.length=0}var Gn=o.ReactCurrentDispatcher,Eo=o.ReactCurrentBatchConfig,Xi=0,on=null,ri=null,ui=null,yl=!1,Jl=!1,eu=0,bl=0;function wi(){throw Error(l(321))}function el(p,m){if(m===null)return!1;for(var I=0;I<m.length&&I<p.length;I++)if(!Aa(p[I],m[I]))return!1;return!0}function tu(p,m,I,$,ee,oe){if(Xi=oe,on=m,m.memoizedState=null,m.updateQueue=null,m.lanes=0,Gn.current=p===null||p.memoizedState===null?zu:Al,p=I($,ee),Jl){oe=0;do{if(Jl=!1,eu=0,25<=oe)throw Error(l(301));oe+=1,ui=ri=null,m.updateQueue=null,Gn.current=df,p=I($,ee)}while(Jl)}if(Gn.current=Rs,m=ri!==null&&ri.next!==null,Xi=0,ui=ri=on=null,yl=!1,m)throw Error(l(300));return p}function Fu(){var p=eu!==0;return eu=0,p}function Ua(){var p={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ui===null?on.memoizedState=ui=p:ui=ui.next=p,ui}function Ri(){if(ri===null){var p=on.alternate;p=p!==null?p.memoizedState:null}else p=ri.next;var m=ui===null?on.memoizedState:ui.next;if(m!==null)ui=m,ri=p;else{if(p===null)throw Error(l(310));ri=p,p={memoizedState:ri.memoizedState,baseState:ri.baseState,baseQueue:ri.baseQueue,queue:ri.queue,next:null},ui===null?on.memoizedState=ui=p:ui=ui.next=p}return ui}function Uo(p,m){return typeof m=="function"?m(p):m}function ju(p){var m=Ri(),I=m.queue;if(I===null)throw Error(l(311));I.lastRenderedReducer=p;var $=ri,ee=$.baseQueue,oe=I.pending;if(oe!==null){if(ee!==null){var Ee=ee.next;ee.next=oe.next,oe.next=Ee}$.baseQueue=ee=oe,I.pending=null}if(ee!==null){oe=ee.next,$=$.baseState;var We=Ee=null,rt=null,yt=oe;do{var Bt=yt.lane;if((Xi&Bt)===Bt)rt!==null&&(rt=rt.next={lane:0,action:yt.action,hasEagerState:yt.hasEagerState,eagerState:yt.eagerState,next:null}),$=yt.hasEagerState?yt.eagerState:p($,yt.action);else{var pr={lane:Bt,action:yt.action,hasEagerState:yt.hasEagerState,eagerState:yt.eagerState,next:null};rt===null?(We=rt=pr,Ee=$):rt=rt.next=pr,on.lanes|=Bt,Is|=Bt}yt=yt.next}while(yt!==null&&yt!==oe);rt===null?Ee=$:rt.next=We,Aa($,m.memoizedState)||(ci=!0),m.memoizedState=$,m.baseState=Ee,m.baseQueue=rt,I.lastRenderedState=$}if(p=I.interleaved,p!==null){ee=p;do oe=ee.lane,on.lanes|=oe,Is|=oe,ee=ee.next;while(ee!==p)}else ee===null&&(I.lanes=0);return[m.memoizedState,I.dispatch]}function wl(p){var m=Ri(),I=m.queue;if(I===null)throw Error(l(311));I.lastRenderedReducer=p;var $=I.dispatch,ee=I.pending,oe=m.memoizedState;if(ee!==null){I.pending=null;var Ee=ee=ee.next;do oe=p(oe,Ee.action),Ee=Ee.next;while(Ee!==ee);Aa(oe,m.memoizedState)||(ci=!0),m.memoizedState=oe,m.baseQueue===null&&(m.baseState=oe),I.lastRenderedState=oe}return[oe,$]}function gc(){}function vc(p,m){var I=on,$=Ri(),ee=m(),oe=!Aa($.memoizedState,ee);if(oe&&($.memoizedState=ee,ci=!0),$=$.queue,Sl(bc.bind(null,I,$,p),[p]),$.getSnapshot!==m||oe||ui!==null&&ui.memoizedState.tag&1){if(I.flags|=2048,_i(9,yc.bind(null,I,$,ee,m),void 0,null),Or===null)throw Error(l(349));(Xi&30)!==0||mc(I,m,ee)}return ee}function mc(p,m,I){p.flags|=16384,p={getSnapshot:m,value:I},m=on.updateQueue,m===null?(m={lastEffect:null,stores:null},on.updateQueue=m,m.stores=[p]):(I=m.stores,I===null?m.stores=[p]:I.push(p))}function yc(p,m,I,$){m.value=I,m.getSnapshot=$,wc(m)&&qo(p)}function bc(p,m,I){return I(function(){wc(m)&&qo(p)})}function wc(p){var m=p.getSnapshot;p=p.value;try{var I=m();return!Aa(p,I)}catch{return!0}}function qo(p){var m=$i(p,1);m!==null&&ma(m,p,1,-1)}function _l(p){var m=Ua();return typeof p=="function"&&(p=p()),m.memoizedState=m.baseState=p,p={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:p},m.queue=p,p=p.dispatch=Hh.bind(null,on,p),[m.memoizedState,p]}function _i(p,m,I,$){return p={tag:p,create:m,destroy:I,deps:$,next:null},m=on.updateQueue,m===null?(m={lastEffect:null,stores:null},on.updateQueue=m,m.lastEffect=p.next=p):(I=m.lastEffect,I===null?m.lastEffect=p.next=p:($=I.next,I.next=p,p.next=$,m.lastEffect=p)),p}function ro(){return Ri().memoizedState}function xl(p,m,I,$){var ee=Ua();on.flags|=p,ee.memoizedState=_i(1|m,I,void 0,$===void 0?null:$)}function Ho(p,m,I,$){var ee=Ri();$=$===void 0?null:$;var oe=void 0;if(ri!==null){var Ee=ri.memoizedState;if(oe=Ee.destroy,$!==null&&el($,Ee.deps)){ee.memoizedState=_i(m,I,oe,$);return}}on.flags|=p,ee.memoizedState=_i(1|m,I,oe,$)}function ff(p,m){return xl(8390656,8,p,m)}function Sl(p,m){return Ho(2048,8,p,m)}function ru(p,m){return Ho(4,2,p,m)}function sn(p,m){return Ho(4,4,p,m)}function Du(p,m){if(typeof m=="function")return p=p(),m(p),function(){m(null)};if(m!=null)return p=p(),m.current=p,function(){m.current=null}}function El(p,m,I){return I=I!=null?I.concat([p]):null,Ho(4,4,Du.bind(null,m,p),I)}function Ts(){}function nu(p,m){var I=Ri();m=m===void 0?null:m;var $=I.memoizedState;return $!==null&&m!==null&&el(m,$[1])?$[0]:(I.memoizedState=[p,m],p)}function iu(p,m){var I=Ri();m=m===void 0?null:m;var $=I.memoizedState;return $!==null&&m!==null&&el(m,$[1])?$[0]:(p=p(),I.memoizedState=[p,m],p)}function au(p,m,I){return(Xi&21)===0?(p.baseState&&(p.baseState=!1,ci=!0),p.memoizedState=I):(Aa(I,m)||(I=ns(),on.lanes|=I,Is|=I,p.baseState=!0),m)}function _c(p,m){var I=xt;xt=I!==0&&4>I?I:4,p(!0);var $=Eo.transition;Eo.transition={};try{p(!1),m()}finally{xt=I,Eo.transition=$}}function tl(){return Ri().memoizedState}function Xf(p,m,I){var $=di(p);if(I={lane:$,action:I,hasEagerState:!1,eagerState:null,next:null},Kf(p))hf(m,I);else if(I=ua(p,m,I,$),I!==null){var ee=gn();ma(I,p,$,ee),Bu(I,m,$)}}function Hh(p,m,I){var $=di(p),ee={lane:$,action:I,hasEagerState:!1,eagerState:null,next:null};if(Kf(p))hf(m,ee);else{var oe=p.alternate;if(p.lanes===0&&(oe===null||oe.lanes===0)&&(oe=m.lastRenderedReducer,oe!==null))try{var Ee=m.lastRenderedState,We=oe(Ee,I);if(ee.hasEagerState=!0,ee.eagerState=We,Aa(We,Ee)){var rt=m.interleaved;rt===null?(ee.next=ee,Gi(m)):(ee.next=rt.next,rt.next=ee),m.interleaved=ee;return}}catch{}finally{}I=ua(p,m,ee,$),I!==null&&(ee=gn(),ma(I,p,$,ee),Bu(I,m,$))}}function Kf(p){var m=p.alternate;return p===on||m!==null&&m===on}function hf(p,m){Jl=yl=!0;var I=p.pending;I===null?m.next=m:(m.next=I.next,I.next=m),p.pending=m}function Bu(p,m,I){if((I&4194240)!==0){var $=m.lanes;$&=p.pendingLanes,I|=$,m.lanes=I,Fa(p,I)}}var Rs={readContext:li,useCallback:wi,useContext:wi,useEffect:wi,useImperativeHandle:wi,useInsertionEffect:wi,useLayoutEffect:wi,useMemo:wi,useReducer:wi,useRef:wi,useState:wi,useDebugValue:wi,useDeferredValue:wi,useTransition:wi,useMutableSource:wi,useSyncExternalStore:wi,useId:wi,unstable_isNewReconciler:!1},zu={readContext:li,useCallback:function(p,m){return Ua().memoizedState=[p,m===void 0?null:m],p},useContext:li,useEffect:ff,useImperativeHandle:function(p,m,I){return I=I!=null?I.concat([p]):null,xl(4194308,4,Du.bind(null,m,p),I)},useLayoutEffect:function(p,m){return xl(4194308,4,p,m)},useInsertionEffect:function(p,m){return xl(4,2,p,m)},useMemo:function(p,m){var I=Ua();return m=m===void 0?null:m,p=p(),I.memoizedState=[p,m],p},useReducer:function(p,m,I){var $=Ua();return m=I!==void 0?I(m):m,$.memoizedState=$.baseState=m,p={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:p,lastRenderedState:m},$.queue=p,p=p.dispatch=Xf.bind(null,on,p),[$.memoizedState,p]},useRef:function(p){var m=Ua();return p={current:p},m.memoizedState=p},useState:_l,useDebugValue:Ts,useDeferredValue:function(p){return Ua().memoizedState=p},useTransition:function(){var p=_l(!1),m=p[0];return p=_c.bind(null,p[1]),Ua().memoizedState=p,[m,p]},useMutableSource:function(){},useSyncExternalStore:function(p,m,I){var $=on,ee=Ua();if(Rt){if(I===void 0)throw Error(l(407));I=I()}else{if(I=m(),Or===null)throw Error(l(349));(Xi&30)!==0||mc($,m,I)}ee.memoizedState=I;var oe={value:I,getSnapshot:m};return ee.queue=oe,ff(bc.bind(null,$,oe,p),[p]),$.flags|=2048,_i(9,yc.bind(null,$,oe,I,m),void 0,null),I},useId:function(){var p=Ua(),m=Or.identifierPrefix;if(Rt){var I=Fe,$=Ne;I=($&~(1<<32-Ea($)-1)).toString(32)+I,m=":"+m+"R"+I,I=eu++,0<I&&(m+="H"+I.toString(32)),m+=":"}else I=bl++,m=":"+m+"r"+I.toString(32)+":";return p.memoizedState=m},unstable_isNewReconciler:!1},Al={readContext:li,useCallback:nu,useContext:li,useEffect:Sl,useImperativeHandle:El,useInsertionEffect:ru,useLayoutEffect:sn,useMemo:iu,useReducer:ju,useRef:ro,useState:function(){return ju(Uo)},useDebugValue:Ts,useDeferredValue:function(p){var m=Ri();return au(m,ri.memoizedState,p)},useTransition:function(){var p=ju(Uo)[0],m=Ri().memoizedState;return[p,m]},useMutableSource:gc,useSyncExternalStore:vc,useId:tl,unstable_isNewReconciler:!1},df={readContext:li,useCallback:nu,useContext:li,useEffect:Sl,useImperativeHandle:El,useInsertionEffect:ru,useLayoutEffect:sn,useMemo:iu,useReducer:wl,useRef:ro,useState:function(){return wl(Uo)},useDebugValue:Ts,useDeferredValue:function(p){var m=Ri();return ri===null?m.memoizedState=p:au(m,ri.memoizedState,p)},useTransition:function(){var p=wl(Uo)[0],m=Ri().memoizedState;return[p,m]},useMutableSource:gc,useSyncExternalStore:vc,useId:tl,unstable_isNewReconciler:!1};function no(p,m){if(p&&p.defaultProps){m=a({},m),p=p.defaultProps;for(var I in p)m[I]===void 0&&(m[I]=p[I]);return m}return m}function xc(p,m,I,$){m=p.memoizedState,I=I($,m),I=I==null?m:a({},m,I),p.memoizedState=I,p.lanes===0&&(p.updateQueue.baseState=I)}var Uu={isMounted:function(p){return(p=p._reactInternals)?R(p)===p:!1},enqueueSetState:function(p,m,I){p=p._reactInternals;var $=gn(),ee=di(p),oe=ca($,ee);oe.payload=m,I!=null&&(oe.callback=I),m=Jr(p,oe,ee),m!==null&&(ma(m,p,ee,$),vl(m,p,ee))},enqueueReplaceState:function(p,m,I){p=p._reactInternals;var $=gn(),ee=di(p),oe=ca($,ee);oe.tag=1,oe.payload=m,I!=null&&(oe.callback=I),m=Jr(p,oe,ee),m!==null&&(ma(m,p,ee,$),vl(m,p,ee))},enqueueForceUpdate:function(p,m){p=p._reactInternals;var I=gn(),$=di(p),ee=ca(I,$);ee.tag=2,m!=null&&(ee.callback=m),m=Jr(p,ee,$),m!==null&&(ma(m,p,$,I),vl(m,p,$))}};function Zf(p,m,I,$,ee,oe,Ee){return p=p.stateNode,typeof p.shouldComponentUpdate=="function"?p.shouldComponentUpdate($,oe,Ee):m.prototype&&m.prototype.isPureReactComponent?!Ba(I,$)||!Ba(ee,oe):!0}function Qf(p,m,I){var $=!1,ee=Jo,oe=m.contextType;return typeof oe=="object"&&oe!==null?oe=li(oe):(ee=Pn(m)?Ka:Er.current,$=m.contextTypes,oe=($=$!=null)?Hi(p,ee):Jo),m=new m(I,oe),p.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Uu,p.stateNode=m,m._reactInternals=p,$&&(p=p.stateNode,p.__reactInternalMemoizedUnmaskedChildContext=ee,p.__reactInternalMemoizedMaskedChildContext=oe),m}function Sc(p,m,I,$){p=m.state,typeof m.componentWillReceiveProps=="function"&&m.componentWillReceiveProps(I,$),typeof m.UNSAFE_componentWillReceiveProps=="function"&&m.UNSAFE_componentWillReceiveProps(I,$),m.state!==p&&Uu.enqueueReplaceState(m,m.state,null)}function Ki(p,m,I,$){var ee=p.stateNode;ee.props=I,ee.state=p.memoizedState,ee.refs={},os(p);var oe=m.contextType;typeof oe=="object"&&oe!==null?ee.context=li(oe):(oe=Pn(m)?Ka:Er.current,ee.context=Hi(p,oe)),ee.state=p.memoizedState,oe=m.getDerivedStateFromProps,typeof oe=="function"&&(xc(p,m,oe,I),ee.state=p.memoizedState),typeof m.getDerivedStateFromProps=="function"||typeof ee.getSnapshotBeforeUpdate=="function"||typeof ee.UNSAFE_componentWillMount!="function"&&typeof ee.componentWillMount!="function"||(m=ee.state,typeof ee.componentWillMount=="function"&&ee.componentWillMount(),typeof ee.UNSAFE_componentWillMount=="function"&&ee.UNSAFE_componentWillMount(),m!==ee.state&&Uu.enqueueReplaceState(ee,ee.state,null),Wi(p,I,ee,$),ee.state=p.memoizedState),typeof ee.componentDidMount=="function"&&(p.flags|=4194308)}function Zi(p,m){try{var I="",$=m;do I+=Iu($),$=$.return;while($);var ee=I}catch(oe){ee=`
|
|
56
56
|
Error generating stack: `+oe.message+`
|
|
57
|
-
`+oe.stack}return{value:p,source:m,stack:ee,digest:null}}function fa(p,m,I){return{value:p,source:null,stack:I??null,digest:m??null}}function Ao(p,m){try{console.error(m.value)}catch(I){setTimeout(function(){throw I})}}var ou=typeof WeakMap=="function"?WeakMap:Map;function Qi(p,m,I){I=ca(-1,I),I.tag=3,I.payload={element:null};var $=m.value;return I.callback=function(){Fn||(Fn=!0,jn=$),Ao(p,m)},I}function Ca(p,m,I){I=ca(-1,I),I.tag=3;var $=p.type.getDerivedStateFromError;if(typeof $=="function"){var ee=m.value;I.payload=function(){return $(ee)},I.callback=function(){Ao(p,m)}}var oe=p.stateNode;return oe!==null&&typeof oe.componentDidCatch=="function"&&(I.callback=function(){Ao(p,m),typeof $!="function"&&(ao===null?ao=new Set([this]):ao.add(this));var Ee=m.stack;this.componentDidCatch(m.value,{componentStack:Ee!==null?Ee:""})}),I}function Jf(p,m,I){var $=p.pingCache;if($===null){$=p.pingCache=new ou;var ee=new Set;$.set(m,ee)}else ee=$.get(m),ee===void 0&&(ee=new Set,$.set(m,ee));ee.has(I)||(ee.add(I),p=Np.bind(null,p,m,I),m.then(p,p))}function eh(p){do{var m;if((m=p.tag===13)&&(m=p.memoizedState,m=m!==null?m.dehydrated!==null:!0),m)return p;p=p.return}while(p!==null);return null}function Ms(p,m,I,$,ee){return(p.mode&1)===0?(p===m?p.flags|=65536:(p.flags|=128,I.flags|=131072,I.flags&=-52805,I.tag===1&&(I.alternate===null?I.tag=17:(m=ca(-1,1),m.tag=2,Jr(I,m,1))),I.lanes|=1),p):(p.flags|=65536,p.lanes=ee,p)}var su=o.ReactCurrentOwner,ci=!1;function _i(p,m,I,$){m.child=p===null?gl(m,null,I,$):Pa(m,p.child,I,$)}function Ec(p,m,I,$,ee){I=I.render;var oe=m.ref;return as(m,ee),$=tu(p,m,I,$,oe,ee),I=Fu(),p!==null&&!ci?(m.updateQueue=p.updateQueue,m.flags&=-2053,p.lanes&=~ee,te(p,m,ee)):(Rt&&I&&ft(m),m.flags|=1,_i(p,m,$,ee),m.child)}function ss(p,m,I,$,ee){if(p===null){var oe=I.type;return typeof oe=="function"&&!Cc(oe)&&oe.defaultProps===void 0&&I.compare===null&&I.defaultProps===void 0?(m.tag=15,m.type=oe,Po(p,m,oe,$,ee)):(p=nh(I.type,null,$,m,m.mode,ee),p.ref=m.ref,p.return=m,m.child=p)}if(oe=p.child,(p.lanes&ee)===0){var Ee=oe.memoizedProps;if(I=I.compare,I=I!==null?I:Ba,I(Ee,$)&&p.ref===m.ref)return te(p,m,ee)}return m.flags|=1,p=pu(oe,$),p.ref=m.ref,p.return=m,m.child=p}function Po(p,m,I,$,ee){if(p!==null){var oe=p.memoizedProps;if(Ba(oe,$)&&p.ref===m.ref)if(ci=!1,m.pendingProps=$=oe,(p.lanes&ee)!==0)(p.flags&131072)!==0&&(ci=!0);else return m.lanes=p.lanes,te(p,m,ee)}return ls(p,m,I,$,ee)}function Yr(p,m,I){var $=m.pendingProps,ee=$.children,oe=p!==null?p.memoizedState:null;if($.mode==="hidden")if((m.mode&1)===0)m.memoizedState={baseLanes:0,cachePool:null,transitions:null},mr(Vo,ii),ii|=I;else{if((I&1073741824)===0)return p=oe!==null?oe.baseLanes|I:I,m.lanes=m.childLanes=1073741824,m.memoizedState={baseLanes:p,cachePool:null,transitions:null},m.updateQueue=null,mr(Vo,ii),ii|=p,null;m.memoizedState={baseLanes:0,cachePool:null,transitions:null},$=oe!==null?oe.baseLanes:I,mr(Vo,ii),ii|=$}else oe!==null?($=oe.baseLanes|I,m.memoizedState=null):$=I,mr(Vo,ii),ii|=$;return _i(p,m,ee,I),m.child}function tn(p,m){var I=m.ref;(p===null&&I!==null||p!==null&&p.ref!==I)&&(m.flags|=512,m.flags|=2097152)}function ls(p,m,I,$,ee){var oe=Pn(I)?Ka:Er.current;return oe=Hi(m,oe),as(m,ee),I=tu(p,m,I,$,oe,ee),$=Fu(),p!==null&&!ci?(m.updateQueue=p.updateQueue,m.flags&=-2053,p.lanes&=~ee,te(p,m,ee)):(Rt&&$&&ft(m),m.flags|=1,_i(p,m,I,ee),m.child)}function Mi(p,m,I,$,ee){if(Pn(I)){var oe=!0;es(m)}else oe=!1;if(as(m,ee),m.stateNode===null)B(p,m),Qf(m,I,$),Ki(m,I,$,ee),$=!0;else if(p===null){var Ee=m.stateNode,We=m.memoizedProps;Ee.props=We;var rt=Ee.context,yt=I.contextType;typeof yt=="object"&&yt!==null?yt=li(yt):(yt=Pn(I)?Ka:Er.current,yt=Hi(m,yt));var Bt=I.getDerivedStateFromProps,pr=typeof Bt=="function"||typeof Ee.getSnapshotBeforeUpdate=="function";pr||typeof Ee.UNSAFE_componentWillReceiveProps!="function"&&typeof Ee.componentWillReceiveProps!="function"||(We!==$||rt!==yt)&&Sc(m,Ee,$,yt),Vn=!1;var Ot=m.memoizedState;Ee.state=Ot,Wi(m,$,Ee,ee),rt=m.memoizedState,We!==$||Ot!==rt||qi.current||Vn?(typeof Bt=="function"&&(xc(m,I,Bt,$),rt=m.memoizedState),(We=Vn||Zf(m,I,We,$,Ot,rt,yt))?(pr||typeof Ee.UNSAFE_componentWillMount!="function"&&typeof Ee.componentWillMount!="function"||(typeof Ee.componentWillMount=="function"&&Ee.componentWillMount(),typeof Ee.UNSAFE_componentWillMount=="function"&&Ee.UNSAFE_componentWillMount()),typeof Ee.componentDidMount=="function"&&(m.flags|=4194308)):(typeof Ee.componentDidMount=="function"&&(m.flags|=4194308),m.memoizedProps=$,m.memoizedState=rt),Ee.props=$,Ee.state=rt,Ee.context=yt,$=We):(typeof Ee.componentDidMount=="function"&&(m.flags|=4194308),$=!1)}else{Ee=m.stateNode,Ql(p,m),We=m.memoizedProps,yt=m.type===m.elementType?We:no(m.type,We),Ee.props=yt,pr=m.pendingProps,Ot=Ee.context,rt=I.contextType,typeof rt=="object"&&rt!==null?rt=li(rt):(rt=Pn(I)?Ka:Er.current,rt=Hi(m,rt));var Nn=I.getDerivedStateFromProps;(Bt=typeof Nn=="function"||typeof Ee.getSnapshotBeforeUpdate=="function")||typeof Ee.UNSAFE_componentWillReceiveProps!="function"&&typeof Ee.componentWillReceiveProps!="function"||(We!==pr||Ot!==rt)&&Sc(m,Ee,$,rt),Vn=!1,Ot=m.memoizedState,Ee.state=Ot,Wi(m,$,Ee,ee);var dn=m.memoizedState;We!==pr||Ot!==dn||qi.current||Vn?(typeof Nn=="function"&&(xc(m,I,Nn,$),dn=m.memoizedState),(yt=Vn||Zf(m,I,yt,$,Ot,dn,rt)||!1)?(Bt||typeof Ee.UNSAFE_componentWillUpdate!="function"&&typeof Ee.componentWillUpdate!="function"||(typeof Ee.componentWillUpdate=="function"&&Ee.componentWillUpdate($,dn,rt),typeof Ee.UNSAFE_componentWillUpdate=="function"&&Ee.UNSAFE_componentWillUpdate($,dn,rt)),typeof Ee.componentDidUpdate=="function"&&(m.flags|=4),typeof Ee.getSnapshotBeforeUpdate=="function"&&(m.flags|=1024)):(typeof Ee.componentDidUpdate!="function"||We===p.memoizedProps&&Ot===p.memoizedState||(m.flags|=4),typeof Ee.getSnapshotBeforeUpdate!="function"||We===p.memoizedProps&&Ot===p.memoizedState||(m.flags|=1024),m.memoizedProps=$,m.memoizedState=dn),Ee.props=$,Ee.state=dn,Ee.context=rt,$=yt):(typeof Ee.componentDidUpdate!="function"||We===p.memoizedProps&&Ot===p.memoizedState||(m.flags|=4),typeof Ee.getSnapshotBeforeUpdate!="function"||We===p.memoizedProps&&Ot===p.memoizedState||(m.flags|=1024),$=!1)}return ha(p,m,I,$,oe,ee)}function ha(p,m,I,$,ee,oe){tn(p,m);var Ee=(m.flags&128)!==0;if(!$&&!Ee)return ee&&Ru(m,I,!1),te(p,m,oe);$=m.stateNode,su.current=m;var We=Ee&&typeof I.getDerivedStateFromError!="function"?null:$.render();return m.flags|=1,p!==null&&Ee?(m.child=Pa(m,p.child,null,oe),m.child=Pa(m,null,We,oe)):_i(p,m,We,oe),m.memoizedState=$.state,ee&&Ru(m,I,!0),m.child}function rl(p){var m=p.stateNode;m.pendingContext?Ws(p,m.pendingContext,m.pendingContext!==m.context):m.context&&Ws(p,m.context,!1),xo(p,m.containerInfo)}function Pl(p,m,I,$,ee){return Ns(),Kl(ee),m.flags|=256,_i(p,m,I,$),m.child}var da={dehydrated:null,treeContext:null,retryLane:0};function lu(p){return{baseLanes:p,cachePool:null,transitions:null}}function pf(p,m,I){var $=m.pendingProps,ee=tr.current,oe=!1,Ee=(m.flags&128)!==0,We;if((We=Ee)||(We=p!==null&&p.memoizedState===null?!1:(ee&2)!==0),We?(oe=!0,m.flags&=-129):(p===null||p.memoizedState!==null)&&(ee|=1),mr(tr,ee&1),p===null)return Hn(m),p=m.memoizedState,p!==null&&(p=p.dehydrated,p!==null)?((m.mode&1)===0?m.lanes=1:Rr(p)?m.lanes=8:m.lanes=1073741824,null):(Ee=$.children,p=$.fallback,oe?($=m.mode,oe=m.child,Ee={mode:"hidden",children:Ee},($&1)===0&&oe!==null?(oe.childLanes=0,oe.pendingProps=Ee):oe=Nc(Ee,$,0,null),p=Na(p,$,I,null),oe.return=m,p.return=m,oe.sibling=p,m.child=oe,m.child.memoizedState=lu(I),m.memoizedState=da,p):qu(m,Ee));if(ee=p.memoizedState,ee!==null&&(We=ee.dehydrated,We!==null))return th(p,m,Ee,$,We,ee,I);if(oe){oe=$.fallback,Ee=m.mode,ee=p.child,We=ee.sibling;var rt={mode:"hidden",children:$.children};return(Ee&1)===0&&m.child!==ee?($=m.child,$.childLanes=0,$.pendingProps=rt,m.deletions=null):($=pu(ee,rt),$.subtreeFlags=ee.subtreeFlags&14680064),We!==null?oe=pu(We,oe):(oe=Na(oe,Ee,I,null),oe.flags|=2),oe.return=m,$.return=m,$.sibling=oe,m.child=$,$=oe,oe=m.child,Ee=p.child.memoizedState,Ee=Ee===null?lu(I):{baseLanes:Ee.baseLanes|I,cachePool:null,transitions:Ee.transitions},oe.memoizedState=Ee,oe.childLanes=p.childLanes&~I,m.memoizedState=da,$}return oe=p.child,p=oe.sibling,$=pu(oe,{mode:"visible",children:$.children}),(m.mode&1)===0&&($.lanes=I),$.return=m,$.sibling=null,p!==null&&(I=m.deletions,I===null?(m.deletions=[p],m.flags|=16):I.push(p)),m.child=$,m.memoizedState=null,$}function qu(p,m){return m=Nc({mode:"visible",children:m},p.mode,0,null),m.return=p,p.child=m}function us(p,m,I,$){return $!==null&&Kl($),Pa(m,p.child,null,I),p=qu(m,m.pendingProps.children),p.flags|=2,m.memoizedState=null,p}function th(p,m,I,$,ee,oe,Ee){if(I)return m.flags&256?(m.flags&=-257,$=fa(Error(l(422))),us(p,m,Ee,$)):m.memoizedState!==null?(m.child=p.child,m.flags|=128,null):(oe=$.fallback,ee=m.mode,$=Nc({mode:"visible",children:$.children},ee,0,null),oe=Na(oe,ee,Ee,null),oe.flags|=2,$.return=m,oe.return=m,$.sibling=oe,m.child=$,(m.mode&1)!==0&&Pa(m,p.child,null,Ee),m.child.memoizedState=lu(Ee),m.memoizedState=da,oe);if((m.mode&1)===0)return us(p,m,Ee,null);if(Rr(ee))return $=yn(ee).digest,oe=Error(l(419)),$=fa(oe,$,void 0),us(p,m,Ee,$);if(I=(Ee&p.childLanes)!==0,ci||I){if($=Or,$!==null){switch(Ee&-Ee){case 4:ee=2;break;case 16:ee=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:ee=32;break;case 536870912:ee=268435456;break;default:ee=0}ee=(ee&($.suspendedLanes|Ee))!==0?0:ee,ee!==0&&ee!==oe.retryLane&&(oe.retryLane=ee,$i(p,ee),ma($,p,ee,-1))}return lo(),$=fa(Error(l(421))),us(p,m,Ee,$)}return Ui(ee)?(m.flags|=128,m.child=p.child,m=Tp.bind(null,p),An(ee,m),null):(p=oe.treeContext,Me&&(Ut=Ya(ee),Et=m,Rt=!0,Mr=null,Pr=!1,p!==null&&(kn[X++]=Ne,kn[X++]=Fe,kn[X++]=fe,Ne=p.id,Fe=p.overflow,fe=m)),m=qu(m,$.children),m.flags|=4096,m)}function cs(p,m,I){p.lanes|=m;var $=p.alternate;$!==null&&($.lanes|=m),Do(p.return,m,I)}function kl(p,m,I,$,ee){var oe=p.memoizedState;oe===null?p.memoizedState={isBackwards:m,rendering:null,renderingStartTime:0,last:$,tail:I,tailMode:ee}:(oe.isBackwards=m,oe.rendering=null,oe.renderingStartTime=0,oe.last=$,oe.tail=I,oe.tailMode=ee)}function N(p,m,I){var $=m.pendingProps,ee=$.revealOrder,oe=$.tail;if(_i(p,m,$.children,I),$=tr.current,($&2)!==0)$=$&1|2,m.flags|=128;else{if(p!==null&&(p.flags&128)!==0)e:for(p=m.child;p!==null;){if(p.tag===13)p.memoizedState!==null&&cs(p,I,m);else if(p.tag===19)cs(p,I,m);else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===m)break e;for(;p.sibling===null;){if(p.return===null||p.return===m)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}$&=1}if(mr(tr,$),(m.mode&1)===0)m.memoizedState=null;else switch(ee){case"forwards":for(I=m.child,ee=null;I!==null;)p=I.alternate,p!==null&&en(p)===null&&(ee=I),I=I.sibling;I=ee,I===null?(ee=m.child,m.child=null):(ee=I.sibling,I.sibling=null),kl(m,!1,ee,I,oe);break;case"backwards":for(I=null,ee=m.child,m.child=null;ee!==null;){if(p=ee.alternate,p!==null&&en(p)===null){m.child=ee;break}p=ee.sibling,ee.sibling=I,I=ee,ee=p}kl(m,!0,I,null,oe);break;case"together":kl(m,!1,null,null,void 0);break;default:m.memoizedState=null}return m.child}function B(p,m){(m.mode&1)===0&&p!==null&&(p.alternate=null,m.alternate=null,m.flags|=2)}function te(p,m,I){if(p!==null&&(m.dependencies=p.dependencies),Is|=m.lanes,(I&m.childLanes)===0)return null;if(p!==null&&m.child!==p.child)throw Error(l(153));if(m.child!==null){for(p=m.child,I=pu(p,p.pendingProps),m.child=I,I.return=m;p.sibling!==null;)p=p.sibling,I=I.sibling=pu(p,p.pendingProps),I.return=m;I.sibling=null}return m.child}function ie(p,m,I){switch(m.tag){case 3:rl(m),Ns();break;case 5:Oa(m);break;case 1:Pn(m.type)&&es(m);break;case 4:xo(m,m.stateNode.containerInfo);break;case 10:si(m,m.type._context,m.memoizedProps.value);break;case 13:var $=m.memoizedState;if($!==null)return $.dehydrated!==null?(mr(tr,tr.current&1),m.flags|=128,null):(I&m.child.childLanes)!==0?pf(p,m,I):(mr(tr,tr.current&1),p=te(p,m,I),p!==null?p.sibling:null);mr(tr,tr.current&1);break;case 19:if($=(I&m.childLanes)!==0,(p.flags&128)!==0){if($)return N(p,m,I);m.flags|=128}var ee=m.memoizedState;if(ee!==null&&(ee.rendering=null,ee.tail=null,ee.lastEffect=null),mr(tr,tr.current),$)break;return null;case 22:case 23:return m.lanes=0,Yr(p,m,I)}return te(p,m,I)}function he(p){p.flags|=4}function ve(p,m){if(p!==null&&p.child===m.child)return!0;if((m.flags&16)!==0)return!1;for(p=m.child;p!==null;){if((p.flags&12854)!==0||(p.subtreeFlags&12854)!==0)return!1;p=p.sibling}return!0}var me,we,Se,Oe;if(ye)me=function(p,m){for(var I=m.child;I!==null;){if(I.tag===5||I.tag===6)j(p,I.stateNode);else if(I.tag!==4&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===m)break;for(;I.sibling===null;){if(I.return===null||I.return===m)return;I=I.return}I.sibling.return=I.return,I=I.sibling}},we=function(){},Se=function(p,m,I,$,ee){if(p=p.memoizedProps,p!==$){var oe=m.stateNode,Ee=Ti(Yi.current);I=Z(oe,I,p,$,ee,Ee),(m.updateQueue=I)&&he(m)}},Oe=function(p,m,I,$){I!==$&&he(m)};else if(Re){me=function(p,m,I,$){for(var ee=m.child;ee!==null;){if(ee.tag===5){var oe=ee.stateNode;I&&$&&(oe=mn(oe,ee.type,ee.memoizedProps,ee)),j(p,oe)}else if(ee.tag===6)oe=ee.stateNode,I&&$&&(oe=Yt(oe,ee.memoizedProps,ee)),j(p,oe);else if(ee.tag!==4){if(ee.tag===22&&ee.memoizedState!==null)oe=ee.child,oe!==null&&(oe.return=ee),me(p,ee,!0,!0);else if(ee.child!==null){ee.child.return=ee,ee=ee.child;continue}}if(ee===m)break;for(;ee.sibling===null;){if(ee.return===null||ee.return===m)return;ee=ee.return}ee.sibling.return=ee.return,ee=ee.sibling}};var De=function(p,m,I,$){for(var ee=m.child;ee!==null;){if(ee.tag===5){var oe=ee.stateNode;I&&$&&(oe=mn(oe,ee.type,ee.memoizedProps,ee)),Oi(p,oe)}else if(ee.tag===6)oe=ee.stateNode,I&&$&&(oe=Yt(oe,ee.memoizedProps,ee)),Oi(p,oe);else if(ee.tag!==4){if(ee.tag===22&&ee.memoizedState!==null)oe=ee.child,oe!==null&&(oe.return=ee),De(p,ee,!0,!0);else if(ee.child!==null){ee.child.return=ee,ee=ee.child;continue}}if(ee===m)break;for(;ee.sibling===null;){if(ee.return===null||ee.return===m)return;ee=ee.return}ee.sibling.return=ee.return,ee=ee.sibling}};we=function(p,m){var I=m.stateNode;if(!ve(p,m)){p=I.containerInfo;var $=lr(p);De($,m,!1,!1),I.pendingChildren=$,he(m),Zn(p,$)}},Se=function(p,m,I,$,ee){var oe=p.stateNode,Ee=p.memoizedProps;if((p=ve(p,m))&&Ee===$)m.stateNode=oe;else{var We=m.stateNode,rt=Ti(Yi.current),yt=null;Ee!==$&&(yt=Z(We,I,Ee,$,ee,rt)),p&&yt===null?m.stateNode=oe:(oe=Xt(oe,yt,I,Ee,$,m,p,We),z(oe,I,$,ee,rt)&&he(m),m.stateNode=oe,p?he(m):me(oe,m,!1,!1))}},Oe=function(p,m,I,$){I!==$?(p=Ti(za.current),I=Ti(Yi.current),m.stateNode=W($,p,I,m),he(m)):m.stateNode=p.stateNode}}else we=function(){},Se=function(){},Oe=function(){};function Ze(p,m){if(!Rt)switch(p.tailMode){case"hidden":m=p.tail;for(var I=null;m!==null;)m.alternate!==null&&(I=m),m=m.sibling;I===null?p.tail=null:I.sibling=null;break;case"collapsed":I=p.tail;for(var $=null;I!==null;)I.alternate!==null&&($=I),I=I.sibling;$===null?m||p.tail===null?p.tail=null:p.tail.sibling=null:$.sibling=null}}function ke(p){var m=p.alternate!==null&&p.alternate.child===p.child,I=0,$=0;if(m)for(var ee=p.child;ee!==null;)I|=ee.lanes|ee.childLanes,$|=ee.subtreeFlags&14680064,$|=ee.flags&14680064,ee.return=p,ee=ee.sibling;else for(ee=p.child;ee!==null;)I|=ee.lanes|ee.childLanes,$|=ee.subtreeFlags,$|=ee.flags,ee.return=p,ee=ee.sibling;return p.subtreeFlags|=$,p.childLanes=I,m}function qe(p,m,I){var $=m.pendingProps;switch(Lt(m),m.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ke(m),null;case 1:return Pn(m.type)&&Vi(),ke(m),null;case 3:return I=m.stateNode,zo(),an(qi),an(Er),Tn(),I.pendingContext&&(I.context=I.pendingContext,I.pendingContext=null),(p===null||p.child===null)&&(bo(m)?he(m):p===null||p.memoizedState.isDehydrated&&(m.flags&256)===0||(m.flags|=1024,Mr!==null&&(Hu(Mr),Mr=null))),we(p,m),ke(m),null;case 5:So(m),I=Ti(za.current);var ee=m.type;if(p!==null&&m.stateNode!=null)Se(p,m,ee,$,I),p.ref!==m.ref&&(m.flags|=512,m.flags|=2097152);else{if(!$){if(m.stateNode===null)throw Error(l(166));return ke(m),null}if(p=Ti(Yi.current),bo(m)){if(!Me)throw Error(l(175));p=Qn(m.stateNode,m.type,m.memoizedProps,I,p,m,!Pr),m.updateQueue=p,p!==null&&he(m)}else{var oe=D(ee,$,I,p,m);me(oe,m,!1,!1),m.stateNode=oe,z(oe,ee,$,I,p)&&he(m)}m.ref!==null&&(m.flags|=512,m.flags|=2097152)}return ke(m),null;case 6:if(p&&m.stateNode!=null)Oe(p,m,p.memoizedProps,$);else{if(typeof $!="string"&&m.stateNode===null)throw Error(l(166));if(p=Ti(za.current),I=Ti(Yi.current),bo(m)){if(!Me)throw Error(l(176));if(p=m.stateNode,I=m.memoizedProps,($=_a(p,I,m,!Pr))&&(ee=Et,ee!==null))switch(ee.tag){case 3:cf(ee.stateNode.containerInfo,p,I,(ee.mode&1)!==0);break;case 5:bn(ee.type,ee.memoizedProps,ee.stateNode,p,I,(ee.mode&1)!==0)}$&&he(m)}else m.stateNode=W($,p,I,m)}return ke(m),null;case 13:if(an(tr),$=m.memoizedState,p===null||p.memoizedState!==null&&p.memoizedState.dehydrated!==null){if(Rt&&Ut!==null&&(m.mode&1)!==0&&(m.flags&128)===0)Cs(),Ns(),m.flags|=98560,ee=!1;else if(ee=bo(m),$!==null&&$.dehydrated!==null){if(p===null){if(!ee)throw Error(l(318));if(!Me)throw Error(l(344));if(ee=m.memoizedState,ee=ee!==null?ee.dehydrated:null,!ee)throw Error(l(317));xa(ee,m)}else Ns(),(m.flags&128)===0&&(m.memoizedState=null),m.flags|=4;ke(m),ee=!1}else Mr!==null&&(Hu(Mr),Mr=null),ee=!0;if(!ee)return m.flags&65536?m:null}return(m.flags&128)!==0?(m.lanes=I,m):(I=$!==null,I!==(p!==null&&p.memoizedState!==null)&&I&&(m.child.flags|=8192,(m.mode&1)!==0&&(p===null||(tr.current&1)!==0?ln===0&&(ln=3):lo())),m.updateQueue!==null&&(m.flags|=4),ke(m),null);case 4:return zo(),we(p,m),p===null&&de(m.stateNode.containerInfo),ke(m),null;case 10:return la(m.type._context),ke(m),null;case 17:return Pn(m.type)&&Vi(),ke(m),null;case 19:if(an(tr),ee=m.memoizedState,ee===null)return ke(m),null;if($=(m.flags&128)!==0,oe=ee.rendering,oe===null)if($)Ze(ee,!1);else{if(ln!==0||p!==null&&(p.flags&128)!==0)for(p=m.child;p!==null;){if(oe=en(p),oe!==null){for(m.flags|=128,Ze(ee,!1),p=oe.updateQueue,p!==null&&(m.updateQueue=p,m.flags|=4),m.subtreeFlags=0,p=I,I=m.child;I!==null;)$=I,ee=p,$.flags&=14680066,oe=$.alternate,oe===null?($.childLanes=0,$.lanes=ee,$.child=null,$.subtreeFlags=0,$.memoizedProps=null,$.memoizedState=null,$.updateQueue=null,$.dependencies=null,$.stateNode=null):($.childLanes=oe.childLanes,$.lanes=oe.lanes,$.child=oe.child,$.subtreeFlags=0,$.deletions=null,$.memoizedProps=oe.memoizedProps,$.memoizedState=oe.memoizedState,$.updateQueue=oe.updateQueue,$.type=oe.type,ee=oe.dependencies,$.dependencies=ee===null?null:{lanes:ee.lanes,firstContext:ee.firstContext}),I=I.sibling;return mr(tr,tr.current&1|2),m.child}p=p.sibling}ee.tail!==null&&pn()>fu&&(m.flags|=128,$=!0,Ze(ee,!1),m.lanes=4194304)}else{if(!$)if(p=en(oe),p!==null){if(m.flags|=128,$=!0,p=p.updateQueue,p!==null&&(m.updateQueue=p,m.flags|=4),Ze(ee,!0),ee.tail===null&&ee.tailMode==="hidden"&&!oe.alternate&&!Rt)return ke(m),null}else 2*pn()-ee.renderingStartTime>fu&&I!==1073741824&&(m.flags|=128,$=!0,Ze(ee,!1),m.lanes=4194304);ee.isBackwards?(oe.sibling=m.child,m.child=oe):(p=ee.last,p!==null?p.sibling=oe:m.child=oe,ee.last=oe)}return ee.tail!==null?(m=ee.tail,ee.rendering=m,ee.tail=m.sibling,ee.renderingStartTime=pn(),m.sibling=null,p=tr.current,mr(tr,$?p&1|2:p&1),m):(ke(m),null);case 22:case 23:return du(),I=m.memoizedState!==null,p!==null&&p.memoizedState!==null!==I&&(m.flags|=8192),I&&(m.mode&1)!==0?(ii&1073741824)!==0&&(ke(m),ye&&m.subtreeFlags&6&&(m.flags|=8192)):ke(m),null;case 24:return null;case 25:return null}throw Error(l(156,m.tag))}function Ke(p,m){switch(Lt(m),m.tag){case 1:return Pn(m.type)&&Vi(),p=m.flags,p&65536?(m.flags=p&-65537|128,m):null;case 3:return zo(),an(qi),an(Er),Tn(),p=m.flags,(p&65536)!==0&&(p&128)===0?(m.flags=p&-65537|128,m):null;case 5:return So(m),null;case 13:if(an(tr),p=m.memoizedState,p!==null&&p.dehydrated!==null){if(m.alternate===null)throw Error(l(340));Ns()}return p=m.flags,p&65536?(m.flags=p&-65537|128,m):null;case 19:return an(tr),null;case 4:return zo(),null;case 10:return la(m.type._context),null;case 22:case 23:return du(),null;case 24:return null;default:return null}}var it=!1,Ye=!1,nt=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function ot(p,m){var I=p.ref;if(I!==null)if(typeof I=="function")try{I(null)}catch($){Bn(p,m,$)}else I.current=null}function ut(p,m,I){try{I()}catch($){Bn(p,m,$)}}var qt=!1;function Mt(p,m){for(Y(p.containerInfo),Ue=m;Ue!==null;)if(p=Ue,m=p.child,(p.subtreeFlags&1028)!==0&&m!==null)m.return=p,Ue=m;else for(;Ue!==null;){p=Ue;try{var I=p.alternate;if((p.flags&1024)!==0)switch(p.tag){case 0:case 11:case 15:break;case 1:if(I!==null){var $=I.memoizedProps,ee=I.memoizedState,oe=p.stateNode,Ee=oe.getSnapshotBeforeUpdate(p.elementType===p.type?$:no(p.type,$),ee);oe.__reactInternalSnapshotBeforeUpdate=Ee}break;case 3:ye&&vr(p.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(We){Bn(p,p.return,We)}if(m=p.sibling,m!==null){m.return=p.return,Ue=m;break}Ue=p.return}return I=qt,qt=!1,I}function ar(p,m,I){var $=m.updateQueue;if($=$!==null?$.lastEffect:null,$!==null){var ee=$=$.next;do{if((ee.tag&p)===p){var oe=ee.destroy;ee.destroy=void 0,oe!==void 0&&ut(m,I,oe)}ee=ee.next}while(ee!==$)}}function It(p,m){if(m=m.updateQueue,m=m!==null?m.lastEffect:null,m!==null){var I=m=m.next;do{if((I.tag&p)===p){var $=I.create;I.destroy=$()}I=I.next}while(I!==m)}}function _r(p){var m=p.ref;if(m!==null){var I=p.stateNode;switch(p.tag){case 5:p=ae(I);break;default:p=I}typeof m=="function"?m(p):m.current=p}}function Rn(p){var m=p.alternate;m!==null&&(p.alternate=null,Rn(m)),p.child=null,p.deletions=null,p.sibling=null,p.tag===5&&(m=p.stateNode,m!==null&&Ae(m)),p.stateNode=null,p.return=null,p.dependencies=null,p.memoizedProps=null,p.memoizedState=null,p.pendingProps=null,p.stateNode=null,p.updateQueue=null}function fr(p){return p.tag===5||p.tag===3||p.tag===4}function Tt(p){e:for(;;){for(;p.sibling===null;){if(p.return===null||fr(p.return))return null;p=p.return}for(p.sibling.return=p.return,p=p.sibling;p.tag!==5&&p.tag!==6&&p.tag!==18;){if(p.flags&2||p.child===null||p.tag===4)continue e;p.child.return=p,p=p.child}if(!(p.flags&2))return p.stateNode}}function _t(p,m,I){var $=p.tag;if($===5||$===6)p=p.stateNode,m?Pt(I,p,m):bt(I,p);else if($!==4&&(p=p.child,p!==null))for(_t(p,m,I),p=p.sibling;p!==null;)_t(p,m,I),p=p.sibling}function Mn(p,m,I){var $=p.tag;if($===5||$===6)p=p.stateNode,m?cr(I,p,m):ct(I,p);else if($!==4&&(p=p.child,p!==null))for(Mn(p,m,I),p=p.sibling;p!==null;)Mn(p,m,I),p=p.sibling}var Dt=null,or=!1;function kr(p,m,I){for(I=I.child;I!==null;)fi(p,m,I),I=I.sibling}function fi(p,m,I){if(vi&&typeof vi.onCommitFiberUnmount=="function")try{vi.onCommitFiberUnmount(ja,I)}catch{}switch(I.tag){case 5:Ye||ot(I,m);case 6:if(ye){var $=Dt,ee=or;Dt=null,kr(p,m,I),Dt=$,or=ee,Dt!==null&&(or?$e(Dt,I.stateNode):$t(Dt,I.stateNode))}else kr(p,m,I);break;case 18:ye&&Dt!==null&&(or?Ko(Dt,I.stateNode):Ps(Dt,I.stateNode));break;case 4:ye?($=Dt,ee=or,Dt=I.stateNode.containerInfo,or=!0,kr(p,m,I),Dt=$,or=ee):(Re&&($=I.stateNode.containerInfo,ee=lr($),gi($,ee)),kr(p,m,I));break;case 0:case 11:case 14:case 15:if(!Ye&&($=I.updateQueue,$!==null&&($=$.lastEffect,$!==null))){ee=$=$.next;do{var oe=ee,Ee=oe.destroy;oe=oe.tag,Ee!==void 0&&((oe&2)!==0||(oe&4)!==0)&&ut(I,m,Ee),ee=ee.next}while(ee!==$)}kr(p,m,I);break;case 1:if(!Ye&&(ot(I,m),$=I.stateNode,typeof $.componentWillUnmount=="function"))try{$.props=I.memoizedProps,$.state=I.memoizedState,$.componentWillUnmount()}catch(We){Bn(I,m,We)}kr(p,m,I);break;case 21:kr(p,m,I);break;case 22:I.mode&1?(Ye=($=Ye)||I.memoizedState!==null,kr(p,m,I),Ye=$):kr(p,m,I);break;default:kr(p,m,I)}}function ni(p){var m=p.updateQueue;if(m!==null){p.updateQueue=null;var I=p.stateNode;I===null&&(I=p.stateNode=new nt),m.forEach(function($){var ee=L0.bind(null,p,$);I.has($)||(I.add($),$.then(ee,ee))})}}function Ir(p,m){var I=m.deletions;if(I!==null)for(var $=0;$<I.length;$++){var ee=I[$];try{var oe=p,Ee=m;if(ye){var We=Ee;e:for(;We!==null;){switch(We.tag){case 5:Dt=We.stateNode,or=!1;break e;case 3:Dt=We.stateNode.containerInfo,or=!0;break e;case 4:Dt=We.stateNode.containerInfo,or=!0;break e}We=We.return}if(Dt===null)throw Error(l(160));fi(oe,Ee,ee),Dt=null,or=!1}else fi(oe,Ee,ee);var rt=ee.alternate;rt!==null&&(rt.return=null),ee.return=null}catch(yt){Bn(ee,m,yt)}}if(m.subtreeFlags&12854)for(m=m.child;m!==null;)hi(m,p),m=m.sibling}function hi(p,m){var I=p.alternate,$=p.flags;switch(p.tag){case 0:case 11:case 14:case 15:if(Ir(m,p),hn(p),$&4){try{ar(3,p,p.return),It(3,p)}catch(Ot){Bn(p,p.return,Ot)}try{ar(5,p,p.return)}catch(Ot){Bn(p,p.return,Ot)}}break;case 1:Ir(m,p),hn(p),$&512&&I!==null&&ot(I,I.return);break;case 5:if(Ir(m,p),hn(p),$&512&&I!==null&&ot(I,I.return),ye){if(p.flags&32){var ee=p.stateNode;try{ze(ee)}catch(Ot){Bn(p,p.return,Ot)}}if($&4&&(ee=p.stateNode,ee!=null)){var oe=p.memoizedProps;if(I=I!==null?I.memoizedProps:oe,$=p.type,m=p.updateQueue,p.updateQueue=null,m!==null)try{wr(ee,m,$,I,oe,p)}catch(Ot){Bn(p,p.return,Ot)}}}break;case 6:if(Ir(m,p),hn(p),$&4&&ye){if(p.stateNode===null)throw Error(l(162));ee=p.stateNode,oe=p.memoizedProps,I=I!==null?I.memoizedProps:oe;try{ht(ee,I,oe)}catch(Ot){Bn(p,p.return,Ot)}}break;case 3:if(Ir(m,p),hn(p),$&4){if(ye&&Me&&I!==null&&I.memoizedState.isDehydrated)try{Ci(m.containerInfo)}catch(Ot){Bn(p,p.return,Ot)}if(Re){ee=m.containerInfo,oe=m.pendingChildren;try{gi(ee,oe)}catch(Ot){Bn(p,p.return,Ot)}}}break;case 4:if(Ir(m,p),hn(p),$&4&&Re){oe=p.stateNode,ee=oe.containerInfo,oe=oe.pendingChildren;try{gi(ee,oe)}catch(Ot){Bn(p,p.return,Ot)}}break;case 13:Ir(m,p),hn(p),ee=p.child,ee.flags&8192&&(oe=ee.memoizedState!==null,ee.stateNode.isHidden=oe,!oe||ee.alternate!==null&&ee.alternate.memoizedState!==null||(cu=pn())),$&4&&ni(p);break;case 22:var Ee=I!==null&&I.memoizedState!==null;if(p.mode&1?(Ye=(I=Ye)||Ee,Ir(m,p),Ye=I):Ir(m,p),hn(p),$&8192){if(I=p.memoizedState!==null,(p.stateNode.isHidden=I)&&!Ee&&(p.mode&1)!==0)for(Ue=p,$=p.child;$!==null;){for(m=Ue=$;Ue!==null;){Ee=Ue;var We=Ee.child;switch(Ee.tag){case 0:case 11:case 14:case 15:ar(4,Ee,Ee.return);break;case 1:ot(Ee,Ee.return);var rt=Ee.stateNode;if(typeof rt.componentWillUnmount=="function"){var yt=Ee,Bt=Ee.return;try{var pr=yt;rt.props=pr.memoizedProps,rt.state=pr.memoizedState,rt.componentWillUnmount()}catch(Ot){Bn(yt,Bt,Ot)}}break;case 5:ot(Ee,Ee.return);break;case 22:if(Ee.memoizedState!==null){wn(m);continue}}We!==null?(We.return=Ee,Ue=We):wn(m)}$=$.sibling}if(ye){e:if($=null,ye)for(m=p;;){if(m.tag===5){if($===null){$=m;try{ee=m.stateNode,I?kt(ee):er(m.stateNode,m.memoizedProps)}catch(Ot){Bn(p,p.return,Ot)}}}else if(m.tag===6){if($===null)try{oe=m.stateNode,I?St(oe):jt(oe,m.memoizedProps)}catch(Ot){Bn(p,p.return,Ot)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===p)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===p)break e;for(;m.sibling===null;){if(m.return===null||m.return===p)break e;$===m&&($=null),m=m.return}$===m&&($=null),m.sibling.return=m.return,m=m.sibling}}}break;case 19:Ir(m,p),hn(p),$&4&&ni(p);break;case 21:break;default:Ir(m,p),hn(p)}}function hn(p){var m=p.flags;if(m&2){try{if(ye){e:{for(var I=p.return;I!==null;){if(fr(I)){var $=I;break e}I=I.return}throw Error(l(160))}switch($.tag){case 5:var ee=$.stateNode;$.flags&32&&(ze(ee),$.flags&=-33);var oe=Tt(p);Mn(p,oe,ee);break;case 3:case 4:var Ee=$.stateNode.containerInfo,We=Tt(p);_t(p,We,Ee);break;default:throw Error(l(161))}}}catch(rt){Bn(p,p.return,rt)}p.flags&=-3}m&4096&&(p.flags&=-4097)}function On(p,m,I){Ue=p,Sr(p)}function Sr(p,m,I){for(var $=(p.mode&1)!==0;Ue!==null;){var ee=Ue,oe=ee.child;if(ee.tag===22&&$){var Ee=ee.memoizedState!==null||it;if(!Ee){var We=ee.alternate,rt=We!==null&&We.memoizedState!==null||Ye;We=it;var yt=Ye;if(it=Ee,(Ye=rt)&&!yt)for(Ue=ee;Ue!==null;)Ee=Ue,rt=Ee.child,Ee.tag===22&&Ee.memoizedState!==null?Br(ee):rt!==null?(rt.return=Ee,Ue=rt):Br(ee);for(;oe!==null;)Ue=oe,Sr(oe),oe=oe.sibling;Ue=ee,it=We,Ye=yt}Dr(p)}else(ee.subtreeFlags&8772)!==0&&oe!==null?(oe.return=ee,Ue=oe):Dr(p)}}function Dr(p){for(;Ue!==null;){var m=Ue;if((m.flags&8772)!==0){var I=m.alternate;try{if((m.flags&8772)!==0)switch(m.tag){case 0:case 11:case 15:Ye||It(5,m);break;case 1:var $=m.stateNode;if(m.flags&4&&!Ye)if(I===null)$.componentDidMount();else{var ee=m.elementType===m.type?I.memoizedProps:no(m.type,I.memoizedProps);$.componentDidUpdate(ee,I.memoizedState,$.__reactInternalSnapshotBeforeUpdate)}var oe=m.updateQueue;oe!==null&&ml(m,oe,$);break;case 3:var Ee=m.updateQueue;if(Ee!==null){if(I=null,m.child!==null)switch(m.child.tag){case 5:I=ae(m.child.stateNode);break;case 1:I=m.child.stateNode}ml(m,Ee,I)}break;case 5:var We=m.stateNode;I===null&&m.flags&4&&vt(We,m.type,m.memoizedProps,m);break;case 6:break;case 4:break;case 12:break;case 13:if(Me&&m.memoizedState===null){var rt=m.alternate;if(rt!==null){var yt=rt.memoizedState;if(yt!==null){var Bt=yt.dehydrated;Bt!==null&&Xa(Bt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(l(163))}Ye||m.flags&512&&_r(m)}catch(pr){Bn(m,m.return,pr)}}if(m===p){Ue=null;break}if(I=m.sibling,I!==null){I.return=m.return,Ue=I;break}Ue=m.return}}function wn(p){for(;Ue!==null;){var m=Ue;if(m===p){Ue=null;break}var I=m.sibling;if(I!==null){I.return=m.return,Ue=I;break}Ue=m.return}}function Br(p){for(;Ue!==null;){var m=Ue;try{switch(m.tag){case 0:case 11:case 15:var I=m.return;try{It(4,m)}catch(rt){Bn(m,I,rt)}break;case 1:var $=m.stateNode;if(typeof $.componentDidMount=="function"){var ee=m.return;try{$.componentDidMount()}catch(rt){Bn(m,ee,rt)}}var oe=m.return;try{_r(m)}catch(rt){Bn(m,oe,rt)}break;case 5:var Ee=m.return;try{_r(m)}catch(rt){Bn(m,Ee,rt)}}}catch(rt){Bn(m,m.return,rt)}if(m===p){Ue=null;break}var We=m.sibling;if(We!==null){We.return=m.return,Ue=We;break}Ue=m.return}}var _n=0,xn=1,Xr=2,xi=3,Vr=4;if(typeof Symbol=="function"&&Symbol.for){var Gr=Symbol.for;_n=Gr("selector.component"),xn=Gr("selector.has_pseudo_class"),Xr=Gr("selector.role"),xi=Gr("selector.test_id"),Vr=Gr("selector.text")}function $n(p){var m=Pe(p);if(m!=null){if(typeof m.memoizedProps["data-testname"]!="string")throw Error(l(364));return m}if(p=Le(p),p===null)throw Error(l(362));return p.stateNode.current}function Si(p,m){switch(m.$$typeof){case _n:if(p.type===m.value)return!0;break;case xn:e:{m=m.value,p=[p,0];for(var I=0;I<p.length;){var $=p[I++],ee=p[I++],oe=m[ee];if($.tag!==5||!je($)){for(;oe!=null&&Si($,oe);)ee++,oe=m[ee];if(ee===m.length){m=!0;break e}else for($=$.child;$!==null;)p.push($,ee),$=$.sibling}}m=!1}return m;case Xr:if(p.tag===5&&He(p.stateNode,m.value))return!0;break;case Vr:if((p.tag===5||p.tag===6)&&(p=Ce(p),p!==null&&0<=p.indexOf(m.value)))return!0;break;case xi:if(p.tag===5&&(p=p.memoizedProps["data-testname"],typeof p=="string"&&p.toLowerCase()===m.value.toLowerCase()))return!0;break;default:throw Error(l(365))}return!1}function pa(p){switch(p.$$typeof){case _n:return"<"+(O(p.value)||"Unknown")+">";case xn:return":has("+(pa(p)||"")+")";case Xr:return'[role="'+p.value+'"]';case Vr:return'"'+p.value+'"';case xi:return'[data-testname="'+p.value+'"]';default:throw Error(l(365))}}function Wn(p,m){var I=[];p=[p,0];for(var $=0;$<p.length;){var ee=p[$++],oe=p[$++],Ee=m[oe];if(ee.tag!==5||!je(ee)){for(;Ee!=null&&Si(ee,Ee);)oe++,Ee=m[oe];if(oe===m.length)I.push(ee);else for(ee=ee.child;ee!==null;)p.push(ee,oe),ee=ee.sibling}}return I}function In(p,m){if(!xe)throw Error(l(363));p=$n(p),p=Wn(p,m),m=[],p=Array.from(p);for(var I=0;I<p.length;){var $=p[I++];if($.tag===5)je($)||m.push($.stateNode);else for($=$.child;$!==null;)p.push($),$=$.sibling}return m}var ga=Math.ceil,Kr=o.ReactCurrentDispatcher,Ii=o.ReactCurrentOwner,zr=o.ReactCurrentBatchConfig,rr=0,Or=null,yr=null,Cn=0,ii=0,Vo=oi(0),ln=0,uu=null,Is=0,un=0,io=0,Ol=null,va=null,cu=0,fu=1/0,Fi=null;function rn(){fu=pn()+500}var Fn=!1,jn=null,ao=null,ko=!1,oo=null,Ac=0,Dn=0,hu=null,nl=-1,so=0;function gn(){return(rr&6)!==0?pn():nl!==-1?nl:nl=pn()}function di(p){return(p.mode&1)===0?1:(rr&2)!==0&&Cn!==0?Cn&-Cn:pl.transition!==null?(so===0&&(so=ns()),so):(p=xt,p!==0?p:Te())}function ma(p,m,I,$){if(50<Dn)throw Dn=0,hu=null,Error(l(185));Ma(p,I,$),((rr&2)===0||p!==Or)&&(p===Or&&((rr&2)===0&&(un|=I),ln===4&&fs(p,Cn)),Ji(p,$),I===1&&rr===0&&(m.mode&1)===0&&(rn(),mo&&Jn()))}function Ji(p,m){var I=p.callbackNode;hc(p,m);var $=Ys(p,p===Or?Cn:0);if($===0)I!==null&&dc(I),p.callbackNode=null,p.callbackPriority=0;else if(m=$&-$,p.callbackPriority!==m){if(I!=null&&dc(I),m===1)p.tag===0?dl(gf.bind(null,p)):Zs(gf.bind(null,p)),be?_e(function(){(rr&6)===0&&Jn()}):vo(Wl,Jn),I=null;else{switch(Ks($)){case 1:I=Wl;break;case 4:I=Yl;break;case 16:I=ks;break;case 536870912:I=Mu;break;default:I=ks}I=Gh(I,Fs.bind(null,p))}p.callbackPriority=m,p.callbackNode=I}}function Fs(p,m){if(nl=-1,so=0,(rr&6)!==0)throw Error(l(327));var I=p.callbackNode;if(Nl()&&p.callbackNode!==I)return null;var $=Ys(p,p===Or?Cn:0);if($===0)return null;if(($&30)!==0||($&p.expiredLanes)!==0||m)m=ds(p,$);else{m=$;var ee=rr;rr|=2;var oe=hs();(Or!==p||Cn!==m)&&(Fi=null,rn(),Go(p,m));do try{Oc();break}catch(We){qa(p,We)}while(!0);Zl(),Kr.current=oe,rr=ee,yr!==null?m=0:(Or=null,Cn=0,m=ln)}if(m!==0){if(m===2&&(ee=Xs(p),ee!==0&&($=ee,m=Pc(p,ee))),m===1)throw I=uu,Go(p,0),fs(p,$),Ji(p,pn()),I;if(m===6)fs(p,$);else{if(ee=p.current.alternate,($&30)===0&&!rh(ee)&&(m=ds(p,$),m===2&&(oe=Xs(p),oe!==0&&($=oe,m=Pc(p,oe))),m===1))throw I=uu,Go(p,0),fs(p,$),Ji(p,pn()),I;switch(p.finishedWork=ee,p.finishedLanes=$,m){case 0:case 1:throw Error(l(345));case 2:ps(p,va,Fi);break;case 3:if(fs(p,$),($&130023424)===$&&(m=cu+500-pn(),10<m)){if(Ys(p,0)!==0)break;if(ee=p.suspendedLanes,(ee&$)!==$){gn(),p.pingedLanes|=p.suspendedLanesⅇbreak}p.timeoutHandle=Q(ps.bind(null,p,va,Fi),m);break}ps(p,va,Fi);break;case 4:if(fs(p,$),($&4194240)===$)break;for(m=p.eventTimes,ee=-1;0<$;){var Ee=31-Ea($);oe=1<<Ee,Ee=m[Ee],Ee>ee&&(ee=Ee),$&=~oe}if($=ee,$=pn()-$,$=(120>$?120:480>$?480:1080>$?1080:1920>$?1920:3e3>$?3e3:4320>$?4320:1960*ga($/1960))-$,10<$){p.timeoutHandle=Q(ps.bind(null,p,va,Fi),$);break}ps(p,va,Fi);break;case 5:ps(p,va,Fi);break;default:throw Error(l(329))}}}return Ji(p,pn()),p.callbackNode===I?Fs.bind(null,p):null}function Pc(p,m){var I=Ol;return p.current.memoizedState.isDehydrated&&(Go(p,m).flags|=256),p=ds(p,m),p!==2&&(m=va,va=I,m!==null&&Hu(m)),p}function Hu(p){va===null?va=p:va.push.apply(va,p)}function rh(p){for(var m=p;;){if(m.flags&16384){var I=m.updateQueue;if(I!==null&&(I=I.stores,I!==null))for(var $=0;$<I.length;$++){var ee=I[$],oe=ee.getSnapshot;ee=ee.value;try{if(!Aa(oe(),ee))return!1}catch{return!1}}}if(I=m.child,m.subtreeFlags&16384&&I!==null)I.return=m,m=I;else{if(m===p)break;for(;m.sibling===null;){if(m.return===null||m.return===p)return!0;m=m.return}m.sibling.return=m.return,m=m.sibling}}return!0}function fs(p,m){for(m&=~io,m&=~un,p.suspendedLanes|=m,p.pingedLanes&=~m,p=p.expirationTimes;0<m;){var I=31-Ea(m),$=1<<I;p[I]=-1,m&=~$}}function gf(p){if((rr&6)!==0)throw Error(l(327));Nl();var m=Ys(p,0);if((m&1)===0)return Ji(p,pn()),null;var I=ds(p,m);if(p.tag!==0&&I===2){var $=Xs(p);$!==0&&(m=$,I=Pc(p,$))}if(I===1)throw I=uu,Go(p,0),fs(p,m),Ji(p,pn()),I;if(I===6)throw Error(l(345));return p.finishedWork=p.current.alternate,p.finishedLanes=m,ps(p,va,Fi),Ji(p,pn()),null}function Cl(p){oo!==null&&oo.tag===0&&(rr&6)===0&&Nl();var m=rr;rr|=1;var I=zr.transition,$=xt;try{if(zr.transition=null,xt=1,p)return p()}finally{xt=$,zr.transition=I,rr=m,(rr&6)===0&&Jn()}}function du(){ii=Vo.current,an(Vo)}function Go(p,m){p.finishedWork=null,p.finishedLanes=0;var I=p.timeoutHandle;if(I!==ue&&(p.timeoutHandle=ue,se(I)),yr!==null)for(I=yr.return;I!==null;){var $=I;switch(Lt($),$.tag){case 1:$=$.type.childContextTypes,$!=null&&Vi();break;case 3:zo(),an(qi),an(Er),Tn();break;case 5:So($);break;case 4:zo();break;case 13:an(tr);break;case 19:an(tr);break;case 10:la($.type._context);break;case 22:case 23:du()}I=I.return}if(Or=p,yr=p=pu(p.current,null),Cn=ii=m,ln=0,uu=null,io=un=Is=0,va=Ol=null,to!==null){for(m=0;m<to.length;m++)if(I=to[m],$=I.interleaved,$!==null){I.interleaved=null;var ee=$.next,oe=I.pending;if(oe!==null){var Ee=oe.next;oe.next=ee,$.next=Ee}I.pending=$}to=null}return p}function qa(p,m){do{var I=yr;try{if(Zl(),Gn.current=Rs,yl){for(var $=on.memoizedState;$!==null;){var ee=$.queue;ee!==null&&(ee.pending=null),$=$.next}yl=!1}if(Xi=0,ui=ri=on=null,Jl=!1,eu=0,Ii.current=null,I===null||I.return===null){ln=1,uu=m,yr=null;break}e:{var oe=p,Ee=I.return,We=I,rt=m;if(m=Cn,We.flags|=32768,rt!==null&&typeof rt=="object"&&typeof rt.then=="function"){var yt=rt,Bt=We,pr=Bt.tag;if((Bt.mode&1)===0&&(pr===0||pr===11||pr===15)){var Ot=Bt.alternate;Ot?(Bt.updateQueue=Ot.updateQueue,Bt.memoizedState=Ot.memoizedState,Bt.lanes=Ot.lanes):(Bt.updateQueue=null,Bt.memoizedState=null)}var Nn=eh(Ee);if(Nn!==null){Nn.flags&=-257,Ms(Nn,Ee,We,oe,m),Nn.mode&1&&Jf(oe,yt,m),m=Nn,rt=yt;var dn=m.updateQueue;if(dn===null){var uo=new Set;uo.add(rt),m.updateQueue=uo}else dn.add(rt);break e}else{if((m&1)===0){Jf(oe,yt,m),lo();break e}rt=Error(l(426))}}else if(Rt&&We.mode&1){var il=eh(Ee);if(il!==null){(il.flags&65536)===0&&(il.flags|=256),Ms(il,Ee,We,oe,m),Kl(Zi(rt,We));break e}}oe=rt=Zi(rt,We),ln!==4&&(ln=2),Ol===null?Ol=[oe]:Ol.push(oe),oe=Ee;do{switch(oe.tag){case 3:oe.flags|=65536,m&=-m,oe.lanes|=m;var et=Qi(oe,rt,m);ka(oe,et);break e;case 1:We=rt;var Xe=oe.type,at=oe.stateNode;if((oe.flags&128)===0&&(typeof Xe.getDerivedStateFromError=="function"||at!==null&&typeof at.componentDidCatch=="function"&&(ao===null||!ao.has(at)))){oe.flags|=65536,m&=-m,oe.lanes|=m;var Ct=Ca(oe,We,m);ka(oe,Ct);break e}}oe=oe.return}while(oe!==null)}Vu(I)}catch(Qt){m=Qt,yr===I&&I!==null&&(yr=I=I.return);continue}break}while(!0)}function hs(){var p=Kr.current;return Kr.current=Rs,p===null?Rs:p}function lo(){(ln===0||ln===3||ln===2)&&(ln=4),Or===null||(Is&268435455)===0&&(un&268435455)===0||fs(Or,Cn)}function ds(p,m){var I=rr;rr|=2;var $=hs();(Or!==p||Cn!==m)&&(Fi=null,Go(p,m));do try{kc();break}catch(ee){qa(p,ee)}while(!0);if(Zl(),rr=I,Kr.current=$,yr!==null)throw Error(l(261));return Or=null,Cn=0,ln}function kc(){for(;yr!==null;)vf(yr)}function Oc(){for(;yr!==null&&!pc();)vf(yr)}function vf(p){var m=Rp(p.alternate,p,ii);p.memoizedProps=p.pendingProps,m===null?Vu(p):yr=m,Ii.current=null}function Vu(p){var m=p;do{var I=m.alternate;if(p=m.return,(m.flags&32768)===0){if(I=qe(I,m,ii),I!==null){yr=I;return}}else{if(I=Ke(I,m),I!==null){I.flags&=32767,yr=I;return}if(p!==null)p.flags|=32768,p.subtreeFlags=0,p.deletions=null;else{ln=6,yr=null;return}}if(m=m.sibling,m!==null){yr=m;return}yr=m=p}while(m!==null);ln===0&&(ln=5)}function ps(p,m,I){var $=xt,ee=zr.transition;try{zr.transition=null,xt=1,Cp(p,m,I,$)}finally{zr.transition=ee,xt=$}return null}function Cp(p,m,I,$){do Nl();while(oo!==null);if((rr&6)!==0)throw Error(l(327));I=p.finishedWork;var ee=p.finishedLanes;if(I===null)return null;if(p.finishedWork=null,p.finishedLanes=0,I===p.current)throw Error(l(177));p.callbackNode=null,p.callbackPriority=0;var oe=I.lanes|I.childLanes;if(Ia(p,oe),p===Or&&(yr=Or=null,Cn=0),(I.subtreeFlags&2064)===0&&(I.flags&2064)===0||ko||(ko=!0,Gh(ks,function(){return Nl(),null})),oe=(I.flags&15990)!==0,(I.subtreeFlags&15990)!==0||oe){oe=zr.transition,zr.transition=null;var Ee=xt;xt=1;var We=rr;rr|=4,Ii.current=null,Mt(p,I),hi(I,p),U(p.containerInfo),p.current=I,On(I),Qa(),rr=We,xt=Ee,zr.transition=oe}else p.current=I;if(ko&&(ko=!1,oo=p,Ac=ee),oe=p.pendingLanes,oe===0&&(ao=null),Fo(I.stateNode),Ji(p,pn()),m!==null)for($=p.onRecoverableError,I=0;I<m.length;I++)ee=m[I],$(ee.value,{componentStack:ee.stack,digest:ee.digest});if(Fn)throw Fn=!1,p=jn,jn=null,p;return(Ac&1)!==0&&p.tag!==0&&Nl(),oe=p.pendingLanes,(oe&1)!==0?p===hu?Dn++:(Dn=0,hu=p):Dn=0,Jn(),null}function Nl(){if(oo!==null){var p=Ks(Ac),m=zr.transition,I=xt;try{if(zr.transition=null,xt=16>p?16:p,oo===null)var $=!1;else{if(p=oo,oo=null,Ac=0,(rr&6)!==0)throw Error(l(331));var ee=rr;for(rr|=4,Ue=p.current;Ue!==null;){var oe=Ue,Ee=oe.child;if((Ue.flags&16)!==0){var We=oe.deletions;if(We!==null){for(var rt=0;rt<We.length;rt++){var yt=We[rt];for(Ue=yt;Ue!==null;){var Bt=Ue;switch(Bt.tag){case 0:case 11:case 15:ar(8,Bt,oe)}var pr=Bt.child;if(pr!==null)pr.return=Bt,Ue=pr;else for(;Ue!==null;){Bt=Ue;var Ot=Bt.sibling,Nn=Bt.return;if(Rn(Bt),Bt===yt){Ue=null;break}if(Ot!==null){Ot.return=Nn,Ue=Ot;break}Ue=Nn}}}var dn=oe.alternate;if(dn!==null){var uo=dn.child;if(uo!==null){dn.child=null;do{var il=uo.sibling;uo.sibling=null,uo=il}while(uo!==null)}}Ue=oe}}if((oe.subtreeFlags&2064)!==0&&Ee!==null)Ee.return=oe,Ue=Ee;else e:for(;Ue!==null;){if(oe=Ue,(oe.flags&2048)!==0)switch(oe.tag){case 0:case 11:case 15:ar(9,oe,oe.return)}var et=oe.sibling;if(et!==null){et.return=oe.return,Ue=et;break e}Ue=oe.return}}var Xe=p.current;for(Ue=Xe;Ue!==null;){Ee=Ue;var at=Ee.child;if((Ee.subtreeFlags&2064)!==0&&at!==null)at.return=Ee,Ue=at;else e:for(Ee=Xe;Ue!==null;){if(We=Ue,(We.flags&2048)!==0)try{switch(We.tag){case 0:case 11:case 15:It(9,We)}}catch(Qt){Bn(We,We.return,Qt)}if(We===Ee){Ue=null;break e}var Ct=We.sibling;if(Ct!==null){Ct.return=We.return,Ue=Ct;break e}Ue=We.return}}if(rr=ee,Jn(),vi&&typeof vi.onPostCommitFiberRoot=="function")try{vi.onPostCommitFiberRoot(ja,p)}catch{}$=!0}return $}finally{xt=I,zr.transition=m}}return!1}function Vh(p,m,I){m=Zi(I,m),m=Qi(p,m,1),p=Jr(p,m,1),m=gn(),p!==null&&(Ma(p,1,m),Ji(p,m))}function Bn(p,m,I){if(p.tag===3)Vh(p,p,I);else for(;m!==null;){if(m.tag===3){Vh(m,p,I);break}else if(m.tag===1){var $=m.stateNode;if(typeof m.type.getDerivedStateFromError=="function"||typeof $.componentDidCatch=="function"&&(ao===null||!ao.has($))){p=Zi(I,p),p=Ca(m,p,1),m=Jr(m,p,1),p=gn(),m!==null&&(Ma(m,1,p),Ji(m,p));break}}m=m.return}}function Np(p,m,I){var $=p.pingCache;$!==null&&$.delete(m),m=gn(),p.pingedLanes|=p.suspendedLanes&I,Or===p&&(Cn&I)===I&&(ln===4||ln===3&&(Cn&130023424)===Cn&&500>pn()-cu?Go(p,0):io|=I),Ji(p,m)}function Lp(p,m){m===0&&((p.mode&1)===0?m=1:(m=go,go<<=1,(go&130023424)===0&&(go=4194304)));var I=gn();p=$i(p,m),p!==null&&(Ma(p,m,I),Ji(p,I))}function Tp(p){var m=p.memoizedState,I=0;m!==null&&(I=m.retryLane),Lp(p,I)}function L0(p,m){var I=0;switch(p.tag){case 13:var $=p.stateNode,ee=p.memoizedState;ee!==null&&(I=ee.retryLane);break;case 19:$=p.stateNode;break;default:throw Error(l(314))}$!==null&&$.delete(m),Lp(p,I)}var Rp;Rp=function(p,m,I){if(p!==null)if(p.memoizedProps!==m.pendingProps||qi.current)ci=!0;else{if((p.lanes&I)===0&&(m.flags&128)===0)return ci=!1,ie(p,m,I);ci=(p.flags&131072)!==0}else ci=!1,Rt&&(m.flags&1048576)!==0&<(m,mi,m.index);switch(m.lanes=0,m.tag){case 2:var $=m.type;B(p,m),p=m.pendingProps;var ee=Hi(m,Er.current);as(m,I),ee=tu(null,m,$,p,ee,I);var oe=Fu();return m.flags|=1,typeof ee=="object"&&ee!==null&&typeof ee.render=="function"&&ee.$$typeof===void 0?(m.tag=1,m.memoizedState=null,m.updateQueue=null,Pn($)?(oe=!0,es(m)):oe=!1,m.memoizedState=ee.state!==null&&ee.state!==void 0?ee.state:null,os(m),ee.updater=Uu,m.stateNode=ee,ee._reactInternals=m,Ki(m,$,p,I),m=ha(null,m,$,!0,oe,I)):(m.tag=0,Rt&&oe&&ft(m),_i(null,m,ee,I),m=m.child),m;case 16:$=m.elementType;e:{switch(B(p,m),p=m.pendingProps,ee=$._init,$=ee($._payload),m.type=$,ee=m.tag=T0($),p=no($,p),ee){case 0:m=ls(null,m,$,p,I);break e;case 1:m=Mi(null,m,$,p,I);break e;case 11:m=Ec(null,m,$,p,I);break e;case 14:m=ss(null,m,$,no($.type,p),I);break e}throw Error(l(306,$,""))}return m;case 0:return $=m.type,ee=m.pendingProps,ee=m.elementType===$?ee:no($,ee),ls(p,m,$,ee,I);case 1:return $=m.type,ee=m.pendingProps,ee=m.elementType===$?ee:no($,ee),Mi(p,m,$,ee,I);case 3:e:{if(rl(m),p===null)throw Error(l(387));$=m.pendingProps,oe=m.memoizedState,ee=oe.element,Ql(p,m),Wi(m,$,null,I);var Ee=m.memoizedState;if($=Ee.element,Me&&oe.isDehydrated)if(oe={element:$,isDehydrated:!1,cache:Ee.cache,pendingSuspenseBoundaries:Ee.pendingSuspenseBoundaries,transitions:Ee.transitions},m.updateQueue.baseState=oe,m.memoizedState=oe,m.flags&256){ee=Zi(Error(l(423)),m),m=Pl(p,m,$,I,ee);break e}else if($!==ee){ee=Zi(Error(l(424)),m),m=Pl(p,m,$,I,ee);break e}else for(Me&&(Ut=wa(m.stateNode.containerInfo),Et=m,Rt=!0,Mr=null,Pr=!1),I=gl(m,null,$,I),m.child=I;I;)I.flags=I.flags&-3|4096,I=I.sibling;else{if(Ns(),$===ee){m=te(p,m,I);break e}_i(p,m,$,I)}m=m.child}return m;case 5:return Oa(m),p===null&&Hn(m),$=m.type,ee=m.pendingProps,oe=p!==null?p.memoizedProps:null,Ee=ee.children,re($,ee)?Ee=null:oe!==null&&re($,oe)&&(m.flags|=32),tn(p,m),_i(p,m,Ee,I),m.child;case 6:return p===null&&Hn(m),null;case 13:return pf(p,m,I);case 4:return xo(m,m.stateNode.containerInfo),$=m.pendingProps,p===null?m.child=Pa(m,null,$,I):_i(p,m,$,I),m.child;case 11:return $=m.type,ee=m.pendingProps,ee=m.elementType===$?ee:no($,ee),Ec(p,m,$,ee,I);case 7:return _i(p,m,m.pendingProps,I),m.child;case 8:return _i(p,m,m.pendingProps.children,I),m.child;case 12:return _i(p,m,m.pendingProps.children,I),m.child;case 10:e:{if($=m.type._context,ee=m.pendingProps,oe=m.memoizedProps,Ee=ee.value,si(m,$,Ee),oe!==null)if(Aa(oe.value,Ee)){if(oe.children===ee.children&&!qi.current){m=te(p,m,I);break e}}else for(oe=m.child,oe!==null&&(oe.return=m);oe!==null;){var We=oe.dependencies;if(We!==null){Ee=oe.child;for(var rt=We.firstContext;rt!==null;){if(rt.context===$){if(oe.tag===1){rt=ca(-1,I&-I),rt.tag=2;var yt=oe.updateQueue;if(yt!==null){yt=yt.shared;var Bt=yt.pending;Bt===null?rt.next=rt:(rt.next=Bt.next,Bt.next=rt),yt.pending=rt}}oe.lanes|=I,rt=oe.alternate,rt!==null&&(rt.lanes|=I),Do(oe.return,I,m),We.lanes|=I;break}rt=rt.next}}else if(oe.tag===10)Ee=oe.type===m.type?null:oe.child;else if(oe.tag===18){if(Ee=oe.return,Ee===null)throw Error(l(341));Ee.lanes|=I,We=Ee.alternate,We!==null&&(We.lanes|=I),Do(Ee,I,m),Ee=oe.sibling}else Ee=oe.child;if(Ee!==null)Ee.return=oe;else for(Ee=oe;Ee!==null;){if(Ee===m){Ee=null;break}if(oe=Ee.sibling,oe!==null){oe.return=Ee.return,Ee=oe;break}Ee=Ee.return}oe=Ee}_i(p,m,ee.children,I),m=m.child}return m;case 9:return ee=m.type,$=m.pendingProps.children,as(m,I),ee=li(ee),$=$(ee),m.flags|=1,_i(p,m,$,I),m.child;case 14:return $=m.type,ee=no($,m.pendingProps),ee=no($.type,ee),ss(p,m,$,ee,I);case 15:return Po(p,m,m.type,m.pendingProps,I);case 17:return $=m.type,ee=m.pendingProps,ee=m.elementType===$?ee:no($,ee),B(p,m),m.tag=1,Pn($)?(p=!0,es(m)):p=!1,as(m,I),Qf(m,$,ee),Ki(m,$,ee,I),ha(null,m,$,!0,p,I);case 19:return N(p,m,I);case 22:return Yr(p,m,I)}throw Error(l(156,m.tag))};function Gh(p,m){return vo(p,m)}function Mp(p,m,I,$){this.tag=p,this.key=I,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=m,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=$,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $o(p,m,I,$){return new Mp(p,m,I,$)}function Cc(p){return p=p.prototype,!(!p||!p.isReactComponent)}function T0(p){if(typeof p=="function")return Cc(p)?1:0;if(p!=null){if(p=p.$$typeof,p===x)return 11;if(p===b)return 14}return 2}function pu(p,m){var I=p.alternate;return I===null?(I=$o(p.tag,m,p.key,p.mode),I.elementType=p.elementType,I.type=p.type,I.stateNode=p.stateNode,I.alternate=p,p.alternate=I):(I.pendingProps=m,I.type=p.type,I.flags=0,I.subtreeFlags=0,I.deletions=null),I.flags=p.flags&14680064,I.childLanes=p.childLanes,I.lanes=p.lanes,I.child=p.child,I.memoizedProps=p.memoizedProps,I.memoizedState=p.memoizedState,I.updateQueue=p.updateQueue,m=p.dependencies,I.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},I.sibling=p.sibling,I.index=p.index,I.ref=p.ref,I}function nh(p,m,I,$,ee,oe){var Ee=2;if($=p,typeof p=="function")Cc(p)&&(Ee=1);else if(typeof p=="string")Ee=5;else e:switch(p){case f:return Na(I.children,ee,oe,m);case v:Ee=8,ee|=8;break;case g:return p=$o(12,I,m,ee|2),p.elementType=g,p.lanes=oe,p;case E:return p=$o(13,I,m,ee),p.elementType=E,p.lanes=oe,p;case S:return p=$o(19,I,m,ee),p.elementType=S,p.lanes=oe,p;case _:return Nc(I,ee,oe,m);default:if(typeof p=="object"&&p!==null)switch(p.$$typeof){case c:Ee=10;break e;case y:Ee=9;break e;case x:Ee=11;break e;case b:Ee=14;break e;case w:Ee=16,$=null;break e}throw Error(l(130,p==null?p:typeof p,""))}return m=$o(Ee,I,m,ee),m.elementType=p,m.type=$,m.lanes=oe,m}function Na(p,m,I,$){return p=$o(7,p,$,m),p.lanes=I,p}function Nc(p,m,I,$){return p=$o(22,p,$,m),p.elementType=_,p.lanes=I,p.stateNode={isHidden:!1},p}function Lc(p,m,I){return p=$o(6,p,null,m),p.lanes=I,p}function ih(p,m,I){return m=$o(4,p.children!==null?p.children:[],p.key,m),m.lanes=I,m.stateNode={containerInfo:p.containerInfo,pendingChildren:null,implementation:p.implementation},m}function Ip(p,m,I,$,ee){this.tag=m,this.containerInfo=p,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ue,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Za(0),this.expirationTimes=Za(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Za(0),this.identifierPrefix=$,this.onRecoverableError=ee,Me&&(this.mutableSourceEagerHydrationData=null)}function $h(p,m,I,$,ee,oe,Ee,We,rt){return p=new Ip(p,m,I,We,rt),m===1?(m=1,oe===!0&&(m|=8)):m=0,oe=$o(3,null,null,m),p.current=oe,oe.stateNode=p,oe.memoizedState={element:$,isDehydrated:I,cache:null,transitions:null,pendingSuspenseBoundaries:null},os(oe),p}function ah(p){if(!p)return Jo;p=p._reactInternals;e:{if(R(p)!==p||p.tag!==1)throw Error(l(170));var m=p;do{switch(m.tag){case 3:m=m.stateNode.context;break e;case 1:if(Pn(m.type)){m=m.stateNode.__reactInternalMemoizedMergedChildContext;break e}}m=m.return}while(m!==null);throw Error(l(171))}if(p.tag===1){var I=p.type;if(Pn(I))return qn(p,I,m)}return m}function Gu(p){var m=p._reactInternals;if(m===void 0)throw typeof p.render=="function"?Error(l(188)):(p=Object.keys(p).join(","),Error(l(268,p)));return p=C(m),p===null?null:p.stateNode}function oh(p,m){if(p=p.memoizedState,p!==null&&p.dehydrated!==null){var I=p.retryLane;p.retryLane=I!==0&&I<m?I:m}}function Tc(p,m){oh(p,m),(p=p.alternate)&&oh(p,m)}function R0(p){return p=C(p),p===null?null:p.stateNode}function Fp(){return null}return r.attemptContinuousHydration=function(p){if(p.tag===13){var m=$i(p,134217728);if(m!==null){var I=gn();ma(m,p,134217728,I)}Tc(p,134217728)}},r.attemptDiscreteHydration=function(p){if(p.tag===13){var m=$i(p,1);if(m!==null){var I=gn();ma(m,p,1,I)}Tc(p,1)}},r.attemptHydrationAtCurrentPriority=function(p){if(p.tag===13){var m=di(p),I=$i(p,m);if(I!==null){var $=gn();ma(I,p,m,$)}Tc(p,m)}},r.attemptSynchronousHydration=function(p){switch(p.tag){case 3:var m=p.stateNode;if(m.current.memoizedState.isDehydrated){var I=rs(m.pendingLanes);I!==0&&(Fa(m,I|1),Ji(m,pn()),(rr&6)===0&&(rn(),Jn()))}break;case 13:Cl(function(){var $=$i(p,1);if($!==null){var ee=gn();ma($,p,1,ee)}}),Tc(p,1)}},r.batchedUpdates=function(p,m){var I=rr;rr|=1;try{return p(m)}finally{rr=I,rr===0&&(rn(),mo&&Jn())}},r.createComponentSelector=function(p){return{$$typeof:_n,value:p}},r.createContainer=function(p,m,I,$,ee,oe,Ee){return $h(p,m,!1,null,I,$,ee,oe,Ee)},r.createHasPseudoClassSelector=function(p){return{$$typeof:xn,value:p}},r.createHydrationContainer=function(p,m,I,$,ee,oe,Ee,We,rt){return p=$h(I,$,!0,p,ee,oe,Ee,We,rt),p.context=ah(null),I=p.current,$=gn(),ee=di(I),oe=ca($,ee),oe.callback=m??null,Jr(I,oe,ee),p.current.lanes=ee,Ma(p,ee,$),Ji(p,$),p},r.createPortal=function(p,m,I){var $=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:$==null?null:""+$,children:p,containerInfo:m,implementation:I}},r.createRoleSelector=function(p){return{$$typeof:Xr,value:p}},r.createTestNameSelector=function(p){return{$$typeof:xi,value:p}},r.createTextSelector=function(p){return{$$typeof:Vr,value:p}},r.deferredUpdates=function(p){var m=xt,I=zr.transition;try{return zr.transition=null,xt=16,p()}finally{xt=m,zr.transition=I}},r.discreteUpdates=function(p,m,I,$,ee){var oe=xt,Ee=zr.transition;try{return zr.transition=null,xt=1,p(m,I,$,ee)}finally{xt=oe,zr.transition=Ee,rr===0&&rn()}},r.findAllNodes=In,r.findBoundingRects=function(p,m){if(!xe)throw Error(l(363));m=In(p,m),p=[];for(var I=0;I<m.length;I++)p.push(pe(m[I]));for(m=p.length-1;0<m;m--){I=p[m];for(var $=I.x,ee=$+I.width,oe=I.y,Ee=oe+I.height,We=m-1;0<=We;We--)if(m!==We){var rt=p[We],yt=rt.x,Bt=yt+rt.width,pr=rt.y,Ot=pr+rt.height;if($>=yt&&oe>=pr&&ee<=Bt&&Ee<=Ot){p.splice(m,1);break}else if($!==yt||I.width!==rt.width||Ot<oe||pr>Ee){if(!(oe!==pr||I.height!==rt.height||Bt<$||yt>ee)){yt>$&&(rt.width+=yt-$,rt.x=$),Bt<ee&&(rt.width=ee-yt),p.splice(m,1);break}}else{pr>oe&&(rt.height+=pr-oe,rt.y=oe),Ot<Ee&&(rt.height=Ee-pr),p.splice(m,1);break}}}return p},r.findHostInstance=Gu,r.findHostInstanceWithNoPortals=function(p){return p=k(p),p=p!==null?G(p):null,p===null?null:p.stateNode},r.findHostInstanceWithWarning=function(p){return Gu(p)},r.flushControlled=function(p){var m=rr;rr|=1;var I=zr.transition,$=xt;try{zr.transition=null,xt=1,p()}finally{xt=$,zr.transition=I,rr=m,rr===0&&(rn(),Jn())}},r.flushPassiveEffects=Nl,r.flushSync=Cl,r.focusWithin=function(p,m){if(!xe)throw Error(l(363));for(p=$n(p),m=Wn(p,m),m=Array.from(m),p=0;p<m.length;){var I=m[p++];if(!je(I)){if(I.tag===5&&st(I.stateNode))return!0;for(I=I.child;I!==null;)m.push(I),I=I.sibling}}return!1},r.getCurrentUpdatePriority=function(){return xt},r.getFindAllNodesFailureDescription=function(p,m){if(!xe)throw Error(l(363));var I=0,$=[];p=[$n(p),0];for(var ee=0;ee<p.length;){var oe=p[ee++],Ee=p[ee++],We=m[Ee];if((oe.tag!==5||!je(oe))&&(Si(oe,We)&&($.push(pa(We)),Ee++,Ee>I&&(I=Ee)),Ee<m.length))for(oe=oe.child;oe!==null;)p.push(oe,Ee),oe=oe.sibling}if(I<m.length){for(p=[];I<m.length;I++)p.push(pa(m[I]));return`findAllNodes was able to match part of the selector:
|
|
57
|
+
`+oe.stack}return{value:p,source:m,stack:ee,digest:null}}function fa(p,m,I){return{value:p,source:null,stack:I??null,digest:m??null}}function Ao(p,m){try{console.error(m.value)}catch(I){setTimeout(function(){throw I})}}var ou=typeof WeakMap=="function"?WeakMap:Map;function Qi(p,m,I){I=ca(-1,I),I.tag=3,I.payload={element:null};var $=m.value;return I.callback=function(){Fn||(Fn=!0,jn=$),Ao(p,m)},I}function Ca(p,m,I){I=ca(-1,I),I.tag=3;var $=p.type.getDerivedStateFromError;if(typeof $=="function"){var ee=m.value;I.payload=function(){return $(ee)},I.callback=function(){Ao(p,m)}}var oe=p.stateNode;return oe!==null&&typeof oe.componentDidCatch=="function"&&(I.callback=function(){Ao(p,m),typeof $!="function"&&(ao===null?ao=new Set([this]):ao.add(this));var Ee=m.stack;this.componentDidCatch(m.value,{componentStack:Ee!==null?Ee:""})}),I}function Jf(p,m,I){var $=p.pingCache;if($===null){$=p.pingCache=new ou;var ee=new Set;$.set(m,ee)}else ee=$.get(m),ee===void 0&&(ee=new Set,$.set(m,ee));ee.has(I)||(ee.add(I),p=Np.bind(null,p,m,I),m.then(p,p))}function eh(p){do{var m;if((m=p.tag===13)&&(m=p.memoizedState,m=m!==null?m.dehydrated!==null:!0),m)return p;p=p.return}while(p!==null);return null}function Ms(p,m,I,$,ee){return(p.mode&1)===0?(p===m?p.flags|=65536:(p.flags|=128,I.flags|=131072,I.flags&=-52805,I.tag===1&&(I.alternate===null?I.tag=17:(m=ca(-1,1),m.tag=2,Jr(I,m,1))),I.lanes|=1),p):(p.flags|=65536,p.lanes=ee,p)}var su=o.ReactCurrentOwner,ci=!1;function xi(p,m,I,$){m.child=p===null?gl(m,null,I,$):Pa(m,p.child,I,$)}function Ec(p,m,I,$,ee){I=I.render;var oe=m.ref;return as(m,ee),$=tu(p,m,I,$,oe,ee),I=Fu(),p!==null&&!ci?(m.updateQueue=p.updateQueue,m.flags&=-2053,p.lanes&=~ee,te(p,m,ee)):(Rt&&I&&ft(m),m.flags|=1,xi(p,m,$,ee),m.child)}function ss(p,m,I,$,ee){if(p===null){var oe=I.type;return typeof oe=="function"&&!Cc(oe)&&oe.defaultProps===void 0&&I.compare===null&&I.defaultProps===void 0?(m.tag=15,m.type=oe,Po(p,m,oe,$,ee)):(p=nh(I.type,null,$,m,m.mode,ee),p.ref=m.ref,p.return=m,m.child=p)}if(oe=p.child,(p.lanes&ee)===0){var Ee=oe.memoizedProps;if(I=I.compare,I=I!==null?I:Ba,I(Ee,$)&&p.ref===m.ref)return te(p,m,ee)}return m.flags|=1,p=pu(oe,$),p.ref=m.ref,p.return=m,m.child=p}function Po(p,m,I,$,ee){if(p!==null){var oe=p.memoizedProps;if(Ba(oe,$)&&p.ref===m.ref)if(ci=!1,m.pendingProps=$=oe,(p.lanes&ee)!==0)(p.flags&131072)!==0&&(ci=!0);else return m.lanes=p.lanes,te(p,m,ee)}return ls(p,m,I,$,ee)}function Yr(p,m,I){var $=m.pendingProps,ee=$.children,oe=p!==null?p.memoizedState:null;if($.mode==="hidden")if((m.mode&1)===0)m.memoizedState={baseLanes:0,cachePool:null,transitions:null},mr(Vo,ii),ii|=I;else{if((I&1073741824)===0)return p=oe!==null?oe.baseLanes|I:I,m.lanes=m.childLanes=1073741824,m.memoizedState={baseLanes:p,cachePool:null,transitions:null},m.updateQueue=null,mr(Vo,ii),ii|=p,null;m.memoizedState={baseLanes:0,cachePool:null,transitions:null},$=oe!==null?oe.baseLanes:I,mr(Vo,ii),ii|=$}else oe!==null?($=oe.baseLanes|I,m.memoizedState=null):$=I,mr(Vo,ii),ii|=$;return xi(p,m,ee,I),m.child}function tn(p,m){var I=m.ref;(p===null&&I!==null||p!==null&&p.ref!==I)&&(m.flags|=512,m.flags|=2097152)}function ls(p,m,I,$,ee){var oe=Pn(I)?Ka:Er.current;return oe=Hi(m,oe),as(m,ee),I=tu(p,m,I,$,oe,ee),$=Fu(),p!==null&&!ci?(m.updateQueue=p.updateQueue,m.flags&=-2053,p.lanes&=~ee,te(p,m,ee)):(Rt&&$&&ft(m),m.flags|=1,xi(p,m,I,ee),m.child)}function Mi(p,m,I,$,ee){if(Pn(I)){var oe=!0;es(m)}else oe=!1;if(as(m,ee),m.stateNode===null)B(p,m),Qf(m,I,$),Ki(m,I,$,ee),$=!0;else if(p===null){var Ee=m.stateNode,We=m.memoizedProps;Ee.props=We;var rt=Ee.context,yt=I.contextType;typeof yt=="object"&&yt!==null?yt=li(yt):(yt=Pn(I)?Ka:Er.current,yt=Hi(m,yt));var Bt=I.getDerivedStateFromProps,pr=typeof Bt=="function"||typeof Ee.getSnapshotBeforeUpdate=="function";pr||typeof Ee.UNSAFE_componentWillReceiveProps!="function"&&typeof Ee.componentWillReceiveProps!="function"||(We!==$||rt!==yt)&&Sc(m,Ee,$,yt),Vn=!1;var Ot=m.memoizedState;Ee.state=Ot,Wi(m,$,Ee,ee),rt=m.memoizedState,We!==$||Ot!==rt||qi.current||Vn?(typeof Bt=="function"&&(xc(m,I,Bt,$),rt=m.memoizedState),(We=Vn||Zf(m,I,We,$,Ot,rt,yt))?(pr||typeof Ee.UNSAFE_componentWillMount!="function"&&typeof Ee.componentWillMount!="function"||(typeof Ee.componentWillMount=="function"&&Ee.componentWillMount(),typeof Ee.UNSAFE_componentWillMount=="function"&&Ee.UNSAFE_componentWillMount()),typeof Ee.componentDidMount=="function"&&(m.flags|=4194308)):(typeof Ee.componentDidMount=="function"&&(m.flags|=4194308),m.memoizedProps=$,m.memoizedState=rt),Ee.props=$,Ee.state=rt,Ee.context=yt,$=We):(typeof Ee.componentDidMount=="function"&&(m.flags|=4194308),$=!1)}else{Ee=m.stateNode,Ql(p,m),We=m.memoizedProps,yt=m.type===m.elementType?We:no(m.type,We),Ee.props=yt,pr=m.pendingProps,Ot=Ee.context,rt=I.contextType,typeof rt=="object"&&rt!==null?rt=li(rt):(rt=Pn(I)?Ka:Er.current,rt=Hi(m,rt));var Nn=I.getDerivedStateFromProps;(Bt=typeof Nn=="function"||typeof Ee.getSnapshotBeforeUpdate=="function")||typeof Ee.UNSAFE_componentWillReceiveProps!="function"&&typeof Ee.componentWillReceiveProps!="function"||(We!==pr||Ot!==rt)&&Sc(m,Ee,$,rt),Vn=!1,Ot=m.memoizedState,Ee.state=Ot,Wi(m,$,Ee,ee);var dn=m.memoizedState;We!==pr||Ot!==dn||qi.current||Vn?(typeof Nn=="function"&&(xc(m,I,Nn,$),dn=m.memoizedState),(yt=Vn||Zf(m,I,yt,$,Ot,dn,rt)||!1)?(Bt||typeof Ee.UNSAFE_componentWillUpdate!="function"&&typeof Ee.componentWillUpdate!="function"||(typeof Ee.componentWillUpdate=="function"&&Ee.componentWillUpdate($,dn,rt),typeof Ee.UNSAFE_componentWillUpdate=="function"&&Ee.UNSAFE_componentWillUpdate($,dn,rt)),typeof Ee.componentDidUpdate=="function"&&(m.flags|=4),typeof Ee.getSnapshotBeforeUpdate=="function"&&(m.flags|=1024)):(typeof Ee.componentDidUpdate!="function"||We===p.memoizedProps&&Ot===p.memoizedState||(m.flags|=4),typeof Ee.getSnapshotBeforeUpdate!="function"||We===p.memoizedProps&&Ot===p.memoizedState||(m.flags|=1024),m.memoizedProps=$,m.memoizedState=dn),Ee.props=$,Ee.state=dn,Ee.context=rt,$=yt):(typeof Ee.componentDidUpdate!="function"||We===p.memoizedProps&&Ot===p.memoizedState||(m.flags|=4),typeof Ee.getSnapshotBeforeUpdate!="function"||We===p.memoizedProps&&Ot===p.memoizedState||(m.flags|=1024),$=!1)}return ha(p,m,I,$,oe,ee)}function ha(p,m,I,$,ee,oe){tn(p,m);var Ee=(m.flags&128)!==0;if(!$&&!Ee)return ee&&Ru(m,I,!1),te(p,m,oe);$=m.stateNode,su.current=m;var We=Ee&&typeof I.getDerivedStateFromError!="function"?null:$.render();return m.flags|=1,p!==null&&Ee?(m.child=Pa(m,p.child,null,oe),m.child=Pa(m,null,We,oe)):xi(p,m,We,oe),m.memoizedState=$.state,ee&&Ru(m,I,!0),m.child}function rl(p){var m=p.stateNode;m.pendingContext?Ws(p,m.pendingContext,m.pendingContext!==m.context):m.context&&Ws(p,m.context,!1),xo(p,m.containerInfo)}function Pl(p,m,I,$,ee){return Ns(),Kl(ee),m.flags|=256,xi(p,m,I,$),m.child}var da={dehydrated:null,treeContext:null,retryLane:0};function lu(p){return{baseLanes:p,cachePool:null,transitions:null}}function pf(p,m,I){var $=m.pendingProps,ee=tr.current,oe=!1,Ee=(m.flags&128)!==0,We;if((We=Ee)||(We=p!==null&&p.memoizedState===null?!1:(ee&2)!==0),We?(oe=!0,m.flags&=-129):(p===null||p.memoizedState!==null)&&(ee|=1),mr(tr,ee&1),p===null)return Hn(m),p=m.memoizedState,p!==null&&(p=p.dehydrated,p!==null)?((m.mode&1)===0?m.lanes=1:Rr(p)?m.lanes=8:m.lanes=1073741824,null):(Ee=$.children,p=$.fallback,oe?($=m.mode,oe=m.child,Ee={mode:"hidden",children:Ee},($&1)===0&&oe!==null?(oe.childLanes=0,oe.pendingProps=Ee):oe=Nc(Ee,$,0,null),p=Na(p,$,I,null),oe.return=m,p.return=m,oe.sibling=p,m.child=oe,m.child.memoizedState=lu(I),m.memoizedState=da,p):qu(m,Ee));if(ee=p.memoizedState,ee!==null&&(We=ee.dehydrated,We!==null))return th(p,m,Ee,$,We,ee,I);if(oe){oe=$.fallback,Ee=m.mode,ee=p.child,We=ee.sibling;var rt={mode:"hidden",children:$.children};return(Ee&1)===0&&m.child!==ee?($=m.child,$.childLanes=0,$.pendingProps=rt,m.deletions=null):($=pu(ee,rt),$.subtreeFlags=ee.subtreeFlags&14680064),We!==null?oe=pu(We,oe):(oe=Na(oe,Ee,I,null),oe.flags|=2),oe.return=m,$.return=m,$.sibling=oe,m.child=$,$=oe,oe=m.child,Ee=p.child.memoizedState,Ee=Ee===null?lu(I):{baseLanes:Ee.baseLanes|I,cachePool:null,transitions:Ee.transitions},oe.memoizedState=Ee,oe.childLanes=p.childLanes&~I,m.memoizedState=da,$}return oe=p.child,p=oe.sibling,$=pu(oe,{mode:"visible",children:$.children}),(m.mode&1)===0&&($.lanes=I),$.return=m,$.sibling=null,p!==null&&(I=m.deletions,I===null?(m.deletions=[p],m.flags|=16):I.push(p)),m.child=$,m.memoizedState=null,$}function qu(p,m){return m=Nc({mode:"visible",children:m},p.mode,0,null),m.return=p,p.child=m}function us(p,m,I,$){return $!==null&&Kl($),Pa(m,p.child,null,I),p=qu(m,m.pendingProps.children),p.flags|=2,m.memoizedState=null,p}function th(p,m,I,$,ee,oe,Ee){if(I)return m.flags&256?(m.flags&=-257,$=fa(Error(l(422))),us(p,m,Ee,$)):m.memoizedState!==null?(m.child=p.child,m.flags|=128,null):(oe=$.fallback,ee=m.mode,$=Nc({mode:"visible",children:$.children},ee,0,null),oe=Na(oe,ee,Ee,null),oe.flags|=2,$.return=m,oe.return=m,$.sibling=oe,m.child=$,(m.mode&1)!==0&&Pa(m,p.child,null,Ee),m.child.memoizedState=lu(Ee),m.memoizedState=da,oe);if((m.mode&1)===0)return us(p,m,Ee,null);if(Rr(ee))return $=yn(ee).digest,oe=Error(l(419)),$=fa(oe,$,void 0),us(p,m,Ee,$);if(I=(Ee&p.childLanes)!==0,ci||I){if($=Or,$!==null){switch(Ee&-Ee){case 4:ee=2;break;case 16:ee=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:ee=32;break;case 536870912:ee=268435456;break;default:ee=0}ee=(ee&($.suspendedLanes|Ee))!==0?0:ee,ee!==0&&ee!==oe.retryLane&&(oe.retryLane=ee,$i(p,ee),ma($,p,ee,-1))}return lo(),$=fa(Error(l(421))),us(p,m,Ee,$)}return Ui(ee)?(m.flags|=128,m.child=p.child,m=Tp.bind(null,p),An(ee,m),null):(p=oe.treeContext,Me&&(Ut=Ya(ee),Et=m,Rt=!0,Mr=null,Pr=!1,p!==null&&(kn[X++]=Ne,kn[X++]=Fe,kn[X++]=fe,Ne=p.id,Fe=p.overflow,fe=m)),m=qu(m,$.children),m.flags|=4096,m)}function cs(p,m,I){p.lanes|=m;var $=p.alternate;$!==null&&($.lanes|=m),Do(p.return,m,I)}function kl(p,m,I,$,ee){var oe=p.memoizedState;oe===null?p.memoizedState={isBackwards:m,rendering:null,renderingStartTime:0,last:$,tail:I,tailMode:ee}:(oe.isBackwards=m,oe.rendering=null,oe.renderingStartTime=0,oe.last=$,oe.tail=I,oe.tailMode=ee)}function N(p,m,I){var $=m.pendingProps,ee=$.revealOrder,oe=$.tail;if(xi(p,m,$.children,I),$=tr.current,($&2)!==0)$=$&1|2,m.flags|=128;else{if(p!==null&&(p.flags&128)!==0)e:for(p=m.child;p!==null;){if(p.tag===13)p.memoizedState!==null&&cs(p,I,m);else if(p.tag===19)cs(p,I,m);else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===m)break e;for(;p.sibling===null;){if(p.return===null||p.return===m)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}$&=1}if(mr(tr,$),(m.mode&1)===0)m.memoizedState=null;else switch(ee){case"forwards":for(I=m.child,ee=null;I!==null;)p=I.alternate,p!==null&&en(p)===null&&(ee=I),I=I.sibling;I=ee,I===null?(ee=m.child,m.child=null):(ee=I.sibling,I.sibling=null),kl(m,!1,ee,I,oe);break;case"backwards":for(I=null,ee=m.child,m.child=null;ee!==null;){if(p=ee.alternate,p!==null&&en(p)===null){m.child=ee;break}p=ee.sibling,ee.sibling=I,I=ee,ee=p}kl(m,!0,I,null,oe);break;case"together":kl(m,!1,null,null,void 0);break;default:m.memoizedState=null}return m.child}function B(p,m){(m.mode&1)===0&&p!==null&&(p.alternate=null,m.alternate=null,m.flags|=2)}function te(p,m,I){if(p!==null&&(m.dependencies=p.dependencies),Is|=m.lanes,(I&m.childLanes)===0)return null;if(p!==null&&m.child!==p.child)throw Error(l(153));if(m.child!==null){for(p=m.child,I=pu(p,p.pendingProps),m.child=I,I.return=m;p.sibling!==null;)p=p.sibling,I=I.sibling=pu(p,p.pendingProps),I.return=m;I.sibling=null}return m.child}function ie(p,m,I){switch(m.tag){case 3:rl(m),Ns();break;case 5:Oa(m);break;case 1:Pn(m.type)&&es(m);break;case 4:xo(m,m.stateNode.containerInfo);break;case 10:si(m,m.type._context,m.memoizedProps.value);break;case 13:var $=m.memoizedState;if($!==null)return $.dehydrated!==null?(mr(tr,tr.current&1),m.flags|=128,null):(I&m.child.childLanes)!==0?pf(p,m,I):(mr(tr,tr.current&1),p=te(p,m,I),p!==null?p.sibling:null);mr(tr,tr.current&1);break;case 19:if($=(I&m.childLanes)!==0,(p.flags&128)!==0){if($)return N(p,m,I);m.flags|=128}var ee=m.memoizedState;if(ee!==null&&(ee.rendering=null,ee.tail=null,ee.lastEffect=null),mr(tr,tr.current),$)break;return null;case 22:case 23:return m.lanes=0,Yr(p,m,I)}return te(p,m,I)}function he(p){p.flags|=4}function ve(p,m){if(p!==null&&p.child===m.child)return!0;if((m.flags&16)!==0)return!1;for(p=m.child;p!==null;){if((p.flags&12854)!==0||(p.subtreeFlags&12854)!==0)return!1;p=p.sibling}return!0}var me,we,Se,Oe;if(ye)me=function(p,m){for(var I=m.child;I!==null;){if(I.tag===5||I.tag===6)j(p,I.stateNode);else if(I.tag!==4&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===m)break;for(;I.sibling===null;){if(I.return===null||I.return===m)return;I=I.return}I.sibling.return=I.return,I=I.sibling}},we=function(){},Se=function(p,m,I,$,ee){if(p=p.memoizedProps,p!==$){var oe=m.stateNode,Ee=Ti(Yi.current);I=Z(oe,I,p,$,ee,Ee),(m.updateQueue=I)&&he(m)}},Oe=function(p,m,I,$){I!==$&&he(m)};else if(Re){me=function(p,m,I,$){for(var ee=m.child;ee!==null;){if(ee.tag===5){var oe=ee.stateNode;I&&$&&(oe=mn(oe,ee.type,ee.memoizedProps,ee)),j(p,oe)}else if(ee.tag===6)oe=ee.stateNode,I&&$&&(oe=Yt(oe,ee.memoizedProps,ee)),j(p,oe);else if(ee.tag!==4){if(ee.tag===22&&ee.memoizedState!==null)oe=ee.child,oe!==null&&(oe.return=ee),me(p,ee,!0,!0);else if(ee.child!==null){ee.child.return=ee,ee=ee.child;continue}}if(ee===m)break;for(;ee.sibling===null;){if(ee.return===null||ee.return===m)return;ee=ee.return}ee.sibling.return=ee.return,ee=ee.sibling}};var De=function(p,m,I,$){for(var ee=m.child;ee!==null;){if(ee.tag===5){var oe=ee.stateNode;I&&$&&(oe=mn(oe,ee.type,ee.memoizedProps,ee)),Oi(p,oe)}else if(ee.tag===6)oe=ee.stateNode,I&&$&&(oe=Yt(oe,ee.memoizedProps,ee)),Oi(p,oe);else if(ee.tag!==4){if(ee.tag===22&&ee.memoizedState!==null)oe=ee.child,oe!==null&&(oe.return=ee),De(p,ee,!0,!0);else if(ee.child!==null){ee.child.return=ee,ee=ee.child;continue}}if(ee===m)break;for(;ee.sibling===null;){if(ee.return===null||ee.return===m)return;ee=ee.return}ee.sibling.return=ee.return,ee=ee.sibling}};we=function(p,m){var I=m.stateNode;if(!ve(p,m)){p=I.containerInfo;var $=lr(p);De($,m,!1,!1),I.pendingChildren=$,he(m),Zn(p,$)}},Se=function(p,m,I,$,ee){var oe=p.stateNode,Ee=p.memoizedProps;if((p=ve(p,m))&&Ee===$)m.stateNode=oe;else{var We=m.stateNode,rt=Ti(Yi.current),yt=null;Ee!==$&&(yt=Z(We,I,Ee,$,ee,rt)),p&&yt===null?m.stateNode=oe:(oe=Xt(oe,yt,I,Ee,$,m,p,We),z(oe,I,$,ee,rt)&&he(m),m.stateNode=oe,p?he(m):me(oe,m,!1,!1))}},Oe=function(p,m,I,$){I!==$?(p=Ti(za.current),I=Ti(Yi.current),m.stateNode=W($,p,I,m),he(m)):m.stateNode=p.stateNode}}else we=function(){},Se=function(){},Oe=function(){};function Ze(p,m){if(!Rt)switch(p.tailMode){case"hidden":m=p.tail;for(var I=null;m!==null;)m.alternate!==null&&(I=m),m=m.sibling;I===null?p.tail=null:I.sibling=null;break;case"collapsed":I=p.tail;for(var $=null;I!==null;)I.alternate!==null&&($=I),I=I.sibling;$===null?m||p.tail===null?p.tail=null:p.tail.sibling=null:$.sibling=null}}function ke(p){var m=p.alternate!==null&&p.alternate.child===p.child,I=0,$=0;if(m)for(var ee=p.child;ee!==null;)I|=ee.lanes|ee.childLanes,$|=ee.subtreeFlags&14680064,$|=ee.flags&14680064,ee.return=p,ee=ee.sibling;else for(ee=p.child;ee!==null;)I|=ee.lanes|ee.childLanes,$|=ee.subtreeFlags,$|=ee.flags,ee.return=p,ee=ee.sibling;return p.subtreeFlags|=$,p.childLanes=I,m}function qe(p,m,I){var $=m.pendingProps;switch(Lt(m),m.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ke(m),null;case 1:return Pn(m.type)&&Vi(),ke(m),null;case 3:return I=m.stateNode,zo(),an(qi),an(Er),Tn(),I.pendingContext&&(I.context=I.pendingContext,I.pendingContext=null),(p===null||p.child===null)&&(bo(m)?he(m):p===null||p.memoizedState.isDehydrated&&(m.flags&256)===0||(m.flags|=1024,Mr!==null&&(Hu(Mr),Mr=null))),we(p,m),ke(m),null;case 5:So(m),I=Ti(za.current);var ee=m.type;if(p!==null&&m.stateNode!=null)Se(p,m,ee,$,I),p.ref!==m.ref&&(m.flags|=512,m.flags|=2097152);else{if(!$){if(m.stateNode===null)throw Error(l(166));return ke(m),null}if(p=Ti(Yi.current),bo(m)){if(!Me)throw Error(l(175));p=Qn(m.stateNode,m.type,m.memoizedProps,I,p,m,!Pr),m.updateQueue=p,p!==null&&he(m)}else{var oe=D(ee,$,I,p,m);me(oe,m,!1,!1),m.stateNode=oe,z(oe,ee,$,I,p)&&he(m)}m.ref!==null&&(m.flags|=512,m.flags|=2097152)}return ke(m),null;case 6:if(p&&m.stateNode!=null)Oe(p,m,p.memoizedProps,$);else{if(typeof $!="string"&&m.stateNode===null)throw Error(l(166));if(p=Ti(za.current),I=Ti(Yi.current),bo(m)){if(!Me)throw Error(l(176));if(p=m.stateNode,I=m.memoizedProps,($=_a(p,I,m,!Pr))&&(ee=Et,ee!==null))switch(ee.tag){case 3:cf(ee.stateNode.containerInfo,p,I,(ee.mode&1)!==0);break;case 5:bn(ee.type,ee.memoizedProps,ee.stateNode,p,I,(ee.mode&1)!==0)}$&&he(m)}else m.stateNode=W($,p,I,m)}return ke(m),null;case 13:if(an(tr),$=m.memoizedState,p===null||p.memoizedState!==null&&p.memoizedState.dehydrated!==null){if(Rt&&Ut!==null&&(m.mode&1)!==0&&(m.flags&128)===0)Cs(),Ns(),m.flags|=98560,ee=!1;else if(ee=bo(m),$!==null&&$.dehydrated!==null){if(p===null){if(!ee)throw Error(l(318));if(!Me)throw Error(l(344));if(ee=m.memoizedState,ee=ee!==null?ee.dehydrated:null,!ee)throw Error(l(317));xa(ee,m)}else Ns(),(m.flags&128)===0&&(m.memoizedState=null),m.flags|=4;ke(m),ee=!1}else Mr!==null&&(Hu(Mr),Mr=null),ee=!0;if(!ee)return m.flags&65536?m:null}return(m.flags&128)!==0?(m.lanes=I,m):(I=$!==null,I!==(p!==null&&p.memoizedState!==null)&&I&&(m.child.flags|=8192,(m.mode&1)!==0&&(p===null||(tr.current&1)!==0?ln===0&&(ln=3):lo())),m.updateQueue!==null&&(m.flags|=4),ke(m),null);case 4:return zo(),we(p,m),p===null&&de(m.stateNode.containerInfo),ke(m),null;case 10:return la(m.type._context),ke(m),null;case 17:return Pn(m.type)&&Vi(),ke(m),null;case 19:if(an(tr),ee=m.memoizedState,ee===null)return ke(m),null;if($=(m.flags&128)!==0,oe=ee.rendering,oe===null)if($)Ze(ee,!1);else{if(ln!==0||p!==null&&(p.flags&128)!==0)for(p=m.child;p!==null;){if(oe=en(p),oe!==null){for(m.flags|=128,Ze(ee,!1),p=oe.updateQueue,p!==null&&(m.updateQueue=p,m.flags|=4),m.subtreeFlags=0,p=I,I=m.child;I!==null;)$=I,ee=p,$.flags&=14680066,oe=$.alternate,oe===null?($.childLanes=0,$.lanes=ee,$.child=null,$.subtreeFlags=0,$.memoizedProps=null,$.memoizedState=null,$.updateQueue=null,$.dependencies=null,$.stateNode=null):($.childLanes=oe.childLanes,$.lanes=oe.lanes,$.child=oe.child,$.subtreeFlags=0,$.deletions=null,$.memoizedProps=oe.memoizedProps,$.memoizedState=oe.memoizedState,$.updateQueue=oe.updateQueue,$.type=oe.type,ee=oe.dependencies,$.dependencies=ee===null?null:{lanes:ee.lanes,firstContext:ee.firstContext}),I=I.sibling;return mr(tr,tr.current&1|2),m.child}p=p.sibling}ee.tail!==null&&pn()>fu&&(m.flags|=128,$=!0,Ze(ee,!1),m.lanes=4194304)}else{if(!$)if(p=en(oe),p!==null){if(m.flags|=128,$=!0,p=p.updateQueue,p!==null&&(m.updateQueue=p,m.flags|=4),Ze(ee,!0),ee.tail===null&&ee.tailMode==="hidden"&&!oe.alternate&&!Rt)return ke(m),null}else 2*pn()-ee.renderingStartTime>fu&&I!==1073741824&&(m.flags|=128,$=!0,Ze(ee,!1),m.lanes=4194304);ee.isBackwards?(oe.sibling=m.child,m.child=oe):(p=ee.last,p!==null?p.sibling=oe:m.child=oe,ee.last=oe)}return ee.tail!==null?(m=ee.tail,ee.rendering=m,ee.tail=m.sibling,ee.renderingStartTime=pn(),m.sibling=null,p=tr.current,mr(tr,$?p&1|2:p&1),m):(ke(m),null);case 22:case 23:return du(),I=m.memoizedState!==null,p!==null&&p.memoizedState!==null!==I&&(m.flags|=8192),I&&(m.mode&1)!==0?(ii&1073741824)!==0&&(ke(m),ye&&m.subtreeFlags&6&&(m.flags|=8192)):ke(m),null;case 24:return null;case 25:return null}throw Error(l(156,m.tag))}function Ke(p,m){switch(Lt(m),m.tag){case 1:return Pn(m.type)&&Vi(),p=m.flags,p&65536?(m.flags=p&-65537|128,m):null;case 3:return zo(),an(qi),an(Er),Tn(),p=m.flags,(p&65536)!==0&&(p&128)===0?(m.flags=p&-65537|128,m):null;case 5:return So(m),null;case 13:if(an(tr),p=m.memoizedState,p!==null&&p.dehydrated!==null){if(m.alternate===null)throw Error(l(340));Ns()}return p=m.flags,p&65536?(m.flags=p&-65537|128,m):null;case 19:return an(tr),null;case 4:return zo(),null;case 10:return la(m.type._context),null;case 22:case 23:return du(),null;case 24:return null;default:return null}}var it=!1,Ye=!1,nt=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function ot(p,m){var I=p.ref;if(I!==null)if(typeof I=="function")try{I(null)}catch($){Bn(p,m,$)}else I.current=null}function ut(p,m,I){try{I()}catch($){Bn(p,m,$)}}var qt=!1;function Mt(p,m){for(Y(p.containerInfo),Ue=m;Ue!==null;)if(p=Ue,m=p.child,(p.subtreeFlags&1028)!==0&&m!==null)m.return=p,Ue=m;else for(;Ue!==null;){p=Ue;try{var I=p.alternate;if((p.flags&1024)!==0)switch(p.tag){case 0:case 11:case 15:break;case 1:if(I!==null){var $=I.memoizedProps,ee=I.memoizedState,oe=p.stateNode,Ee=oe.getSnapshotBeforeUpdate(p.elementType===p.type?$:no(p.type,$),ee);oe.__reactInternalSnapshotBeforeUpdate=Ee}break;case 3:ye&&vr(p.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(We){Bn(p,p.return,We)}if(m=p.sibling,m!==null){m.return=p.return,Ue=m;break}Ue=p.return}return I=qt,qt=!1,I}function ar(p,m,I){var $=m.updateQueue;if($=$!==null?$.lastEffect:null,$!==null){var ee=$=$.next;do{if((ee.tag&p)===p){var oe=ee.destroy;ee.destroy=void 0,oe!==void 0&&ut(m,I,oe)}ee=ee.next}while(ee!==$)}}function It(p,m){if(m=m.updateQueue,m=m!==null?m.lastEffect:null,m!==null){var I=m=m.next;do{if((I.tag&p)===p){var $=I.create;I.destroy=$()}I=I.next}while(I!==m)}}function _r(p){var m=p.ref;if(m!==null){var I=p.stateNode;switch(p.tag){case 5:p=ae(I);break;default:p=I}typeof m=="function"?m(p):m.current=p}}function Rn(p){var m=p.alternate;m!==null&&(p.alternate=null,Rn(m)),p.child=null,p.deletions=null,p.sibling=null,p.tag===5&&(m=p.stateNode,m!==null&&Ae(m)),p.stateNode=null,p.return=null,p.dependencies=null,p.memoizedProps=null,p.memoizedState=null,p.pendingProps=null,p.stateNode=null,p.updateQueue=null}function fr(p){return p.tag===5||p.tag===3||p.tag===4}function Tt(p){e:for(;;){for(;p.sibling===null;){if(p.return===null||fr(p.return))return null;p=p.return}for(p.sibling.return=p.return,p=p.sibling;p.tag!==5&&p.tag!==6&&p.tag!==18;){if(p.flags&2||p.child===null||p.tag===4)continue e;p.child.return=p,p=p.child}if(!(p.flags&2))return p.stateNode}}function _t(p,m,I){var $=p.tag;if($===5||$===6)p=p.stateNode,m?Pt(I,p,m):bt(I,p);else if($!==4&&(p=p.child,p!==null))for(_t(p,m,I),p=p.sibling;p!==null;)_t(p,m,I),p=p.sibling}function Mn(p,m,I){var $=p.tag;if($===5||$===6)p=p.stateNode,m?cr(I,p,m):ct(I,p);else if($!==4&&(p=p.child,p!==null))for(Mn(p,m,I),p=p.sibling;p!==null;)Mn(p,m,I),p=p.sibling}var Dt=null,or=!1;function kr(p,m,I){for(I=I.child;I!==null;)fi(p,m,I),I=I.sibling}function fi(p,m,I){if(mi&&typeof mi.onCommitFiberUnmount=="function")try{mi.onCommitFiberUnmount(ja,I)}catch{}switch(I.tag){case 5:Ye||ot(I,m);case 6:if(ye){var $=Dt,ee=or;Dt=null,kr(p,m,I),Dt=$,or=ee,Dt!==null&&(or?$e(Dt,I.stateNode):$t(Dt,I.stateNode))}else kr(p,m,I);break;case 18:ye&&Dt!==null&&(or?Ko(Dt,I.stateNode):Ps(Dt,I.stateNode));break;case 4:ye?($=Dt,ee=or,Dt=I.stateNode.containerInfo,or=!0,kr(p,m,I),Dt=$,or=ee):(Re&&($=I.stateNode.containerInfo,ee=lr($),vi($,ee)),kr(p,m,I));break;case 0:case 11:case 14:case 15:if(!Ye&&($=I.updateQueue,$!==null&&($=$.lastEffect,$!==null))){ee=$=$.next;do{var oe=ee,Ee=oe.destroy;oe=oe.tag,Ee!==void 0&&((oe&2)!==0||(oe&4)!==0)&&ut(I,m,Ee),ee=ee.next}while(ee!==$)}kr(p,m,I);break;case 1:if(!Ye&&(ot(I,m),$=I.stateNode,typeof $.componentWillUnmount=="function"))try{$.props=I.memoizedProps,$.state=I.memoizedState,$.componentWillUnmount()}catch(We){Bn(I,m,We)}kr(p,m,I);break;case 21:kr(p,m,I);break;case 22:I.mode&1?(Ye=($=Ye)||I.memoizedState!==null,kr(p,m,I),Ye=$):kr(p,m,I);break;default:kr(p,m,I)}}function ni(p){var m=p.updateQueue;if(m!==null){p.updateQueue=null;var I=p.stateNode;I===null&&(I=p.stateNode=new nt),m.forEach(function($){var ee=L0.bind(null,p,$);I.has($)||(I.add($),$.then(ee,ee))})}}function Ir(p,m){var I=m.deletions;if(I!==null)for(var $=0;$<I.length;$++){var ee=I[$];try{var oe=p,Ee=m;if(ye){var We=Ee;e:for(;We!==null;){switch(We.tag){case 5:Dt=We.stateNode,or=!1;break e;case 3:Dt=We.stateNode.containerInfo,or=!0;break e;case 4:Dt=We.stateNode.containerInfo,or=!0;break e}We=We.return}if(Dt===null)throw Error(l(160));fi(oe,Ee,ee),Dt=null,or=!1}else fi(oe,Ee,ee);var rt=ee.alternate;rt!==null&&(rt.return=null),ee.return=null}catch(yt){Bn(ee,m,yt)}}if(m.subtreeFlags&12854)for(m=m.child;m!==null;)hi(m,p),m=m.sibling}function hi(p,m){var I=p.alternate,$=p.flags;switch(p.tag){case 0:case 11:case 14:case 15:if(Ir(m,p),hn(p),$&4){try{ar(3,p,p.return),It(3,p)}catch(Ot){Bn(p,p.return,Ot)}try{ar(5,p,p.return)}catch(Ot){Bn(p,p.return,Ot)}}break;case 1:Ir(m,p),hn(p),$&512&&I!==null&&ot(I,I.return);break;case 5:if(Ir(m,p),hn(p),$&512&&I!==null&&ot(I,I.return),ye){if(p.flags&32){var ee=p.stateNode;try{ze(ee)}catch(Ot){Bn(p,p.return,Ot)}}if($&4&&(ee=p.stateNode,ee!=null)){var oe=p.memoizedProps;if(I=I!==null?I.memoizedProps:oe,$=p.type,m=p.updateQueue,p.updateQueue=null,m!==null)try{wr(ee,m,$,I,oe,p)}catch(Ot){Bn(p,p.return,Ot)}}}break;case 6:if(Ir(m,p),hn(p),$&4&&ye){if(p.stateNode===null)throw Error(l(162));ee=p.stateNode,oe=p.memoizedProps,I=I!==null?I.memoizedProps:oe;try{ht(ee,I,oe)}catch(Ot){Bn(p,p.return,Ot)}}break;case 3:if(Ir(m,p),hn(p),$&4){if(ye&&Me&&I!==null&&I.memoizedState.isDehydrated)try{Ci(m.containerInfo)}catch(Ot){Bn(p,p.return,Ot)}if(Re){ee=m.containerInfo,oe=m.pendingChildren;try{vi(ee,oe)}catch(Ot){Bn(p,p.return,Ot)}}}break;case 4:if(Ir(m,p),hn(p),$&4&&Re){oe=p.stateNode,ee=oe.containerInfo,oe=oe.pendingChildren;try{vi(ee,oe)}catch(Ot){Bn(p,p.return,Ot)}}break;case 13:Ir(m,p),hn(p),ee=p.child,ee.flags&8192&&(oe=ee.memoizedState!==null,ee.stateNode.isHidden=oe,!oe||ee.alternate!==null&&ee.alternate.memoizedState!==null||(cu=pn())),$&4&&ni(p);break;case 22:var Ee=I!==null&&I.memoizedState!==null;if(p.mode&1?(Ye=(I=Ye)||Ee,Ir(m,p),Ye=I):Ir(m,p),hn(p),$&8192){if(I=p.memoizedState!==null,(p.stateNode.isHidden=I)&&!Ee&&(p.mode&1)!==0)for(Ue=p,$=p.child;$!==null;){for(m=Ue=$;Ue!==null;){Ee=Ue;var We=Ee.child;switch(Ee.tag){case 0:case 11:case 14:case 15:ar(4,Ee,Ee.return);break;case 1:ot(Ee,Ee.return);var rt=Ee.stateNode;if(typeof rt.componentWillUnmount=="function"){var yt=Ee,Bt=Ee.return;try{var pr=yt;rt.props=pr.memoizedProps,rt.state=pr.memoizedState,rt.componentWillUnmount()}catch(Ot){Bn(yt,Bt,Ot)}}break;case 5:ot(Ee,Ee.return);break;case 22:if(Ee.memoizedState!==null){wn(m);continue}}We!==null?(We.return=Ee,Ue=We):wn(m)}$=$.sibling}if(ye){e:if($=null,ye)for(m=p;;){if(m.tag===5){if($===null){$=m;try{ee=m.stateNode,I?kt(ee):er(m.stateNode,m.memoizedProps)}catch(Ot){Bn(p,p.return,Ot)}}}else if(m.tag===6){if($===null)try{oe=m.stateNode,I?St(oe):jt(oe,m.memoizedProps)}catch(Ot){Bn(p,p.return,Ot)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===p)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===p)break e;for(;m.sibling===null;){if(m.return===null||m.return===p)break e;$===m&&($=null),m=m.return}$===m&&($=null),m.sibling.return=m.return,m=m.sibling}}}break;case 19:Ir(m,p),hn(p),$&4&&ni(p);break;case 21:break;default:Ir(m,p),hn(p)}}function hn(p){var m=p.flags;if(m&2){try{if(ye){e:{for(var I=p.return;I!==null;){if(fr(I)){var $=I;break e}I=I.return}throw Error(l(160))}switch($.tag){case 5:var ee=$.stateNode;$.flags&32&&(ze(ee),$.flags&=-33);var oe=Tt(p);Mn(p,oe,ee);break;case 3:case 4:var Ee=$.stateNode.containerInfo,We=Tt(p);_t(p,We,Ee);break;default:throw Error(l(161))}}}catch(rt){Bn(p,p.return,rt)}p.flags&=-3}m&4096&&(p.flags&=-4097)}function On(p,m,I){Ue=p,Sr(p)}function Sr(p,m,I){for(var $=(p.mode&1)!==0;Ue!==null;){var ee=Ue,oe=ee.child;if(ee.tag===22&&$){var Ee=ee.memoizedState!==null||it;if(!Ee){var We=ee.alternate,rt=We!==null&&We.memoizedState!==null||Ye;We=it;var yt=Ye;if(it=Ee,(Ye=rt)&&!yt)for(Ue=ee;Ue!==null;)Ee=Ue,rt=Ee.child,Ee.tag===22&&Ee.memoizedState!==null?Br(ee):rt!==null?(rt.return=Ee,Ue=rt):Br(ee);for(;oe!==null;)Ue=oe,Sr(oe),oe=oe.sibling;Ue=ee,it=We,Ye=yt}Dr(p)}else(ee.subtreeFlags&8772)!==0&&oe!==null?(oe.return=ee,Ue=oe):Dr(p)}}function Dr(p){for(;Ue!==null;){var m=Ue;if((m.flags&8772)!==0){var I=m.alternate;try{if((m.flags&8772)!==0)switch(m.tag){case 0:case 11:case 15:Ye||It(5,m);break;case 1:var $=m.stateNode;if(m.flags&4&&!Ye)if(I===null)$.componentDidMount();else{var ee=m.elementType===m.type?I.memoizedProps:no(m.type,I.memoizedProps);$.componentDidUpdate(ee,I.memoizedState,$.__reactInternalSnapshotBeforeUpdate)}var oe=m.updateQueue;oe!==null&&ml(m,oe,$);break;case 3:var Ee=m.updateQueue;if(Ee!==null){if(I=null,m.child!==null)switch(m.child.tag){case 5:I=ae(m.child.stateNode);break;case 1:I=m.child.stateNode}ml(m,Ee,I)}break;case 5:var We=m.stateNode;I===null&&m.flags&4&&vt(We,m.type,m.memoizedProps,m);break;case 6:break;case 4:break;case 12:break;case 13:if(Me&&m.memoizedState===null){var rt=m.alternate;if(rt!==null){var yt=rt.memoizedState;if(yt!==null){var Bt=yt.dehydrated;Bt!==null&&Xa(Bt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(l(163))}Ye||m.flags&512&&_r(m)}catch(pr){Bn(m,m.return,pr)}}if(m===p){Ue=null;break}if(I=m.sibling,I!==null){I.return=m.return,Ue=I;break}Ue=m.return}}function wn(p){for(;Ue!==null;){var m=Ue;if(m===p){Ue=null;break}var I=m.sibling;if(I!==null){I.return=m.return,Ue=I;break}Ue=m.return}}function Br(p){for(;Ue!==null;){var m=Ue;try{switch(m.tag){case 0:case 11:case 15:var I=m.return;try{It(4,m)}catch(rt){Bn(m,I,rt)}break;case 1:var $=m.stateNode;if(typeof $.componentDidMount=="function"){var ee=m.return;try{$.componentDidMount()}catch(rt){Bn(m,ee,rt)}}var oe=m.return;try{_r(m)}catch(rt){Bn(m,oe,rt)}break;case 5:var Ee=m.return;try{_r(m)}catch(rt){Bn(m,Ee,rt)}}}catch(rt){Bn(m,m.return,rt)}if(m===p){Ue=null;break}var We=m.sibling;if(We!==null){We.return=m.return,Ue=We;break}Ue=m.return}}var _n=0,xn=1,Xr=2,Si=3,Vr=4;if(typeof Symbol=="function"&&Symbol.for){var Gr=Symbol.for;_n=Gr("selector.component"),xn=Gr("selector.has_pseudo_class"),Xr=Gr("selector.role"),Si=Gr("selector.test_id"),Vr=Gr("selector.text")}function $n(p){var m=Pe(p);if(m!=null){if(typeof m.memoizedProps["data-testname"]!="string")throw Error(l(364));return m}if(p=Le(p),p===null)throw Error(l(362));return p.stateNode.current}function Ei(p,m){switch(m.$$typeof){case _n:if(p.type===m.value)return!0;break;case xn:e:{m=m.value,p=[p,0];for(var I=0;I<p.length;){var $=p[I++],ee=p[I++],oe=m[ee];if($.tag!==5||!je($)){for(;oe!=null&&Ei($,oe);)ee++,oe=m[ee];if(ee===m.length){m=!0;break e}else for($=$.child;$!==null;)p.push($,ee),$=$.sibling}}m=!1}return m;case Xr:if(p.tag===5&&He(p.stateNode,m.value))return!0;break;case Vr:if((p.tag===5||p.tag===6)&&(p=Ce(p),p!==null&&0<=p.indexOf(m.value)))return!0;break;case Si:if(p.tag===5&&(p=p.memoizedProps["data-testname"],typeof p=="string"&&p.toLowerCase()===m.value.toLowerCase()))return!0;break;default:throw Error(l(365))}return!1}function pa(p){switch(p.$$typeof){case _n:return"<"+(O(p.value)||"Unknown")+">";case xn:return":has("+(pa(p)||"")+")";case Xr:return'[role="'+p.value+'"]';case Vr:return'"'+p.value+'"';case Si:return'[data-testname="'+p.value+'"]';default:throw Error(l(365))}}function Wn(p,m){var I=[];p=[p,0];for(var $=0;$<p.length;){var ee=p[$++],oe=p[$++],Ee=m[oe];if(ee.tag!==5||!je(ee)){for(;Ee!=null&&Ei(ee,Ee);)oe++,Ee=m[oe];if(oe===m.length)I.push(ee);else for(ee=ee.child;ee!==null;)p.push(ee,oe),ee=ee.sibling}}return I}function In(p,m){if(!xe)throw Error(l(363));p=$n(p),p=Wn(p,m),m=[],p=Array.from(p);for(var I=0;I<p.length;){var $=p[I++];if($.tag===5)je($)||m.push($.stateNode);else for($=$.child;$!==null;)p.push($),$=$.sibling}return m}var ga=Math.ceil,Kr=o.ReactCurrentDispatcher,Ii=o.ReactCurrentOwner,zr=o.ReactCurrentBatchConfig,rr=0,Or=null,yr=null,Cn=0,ii=0,Vo=oi(0),ln=0,uu=null,Is=0,un=0,io=0,Ol=null,va=null,cu=0,fu=1/0,Fi=null;function rn(){fu=pn()+500}var Fn=!1,jn=null,ao=null,ko=!1,oo=null,Ac=0,Dn=0,hu=null,nl=-1,so=0;function gn(){return(rr&6)!==0?pn():nl!==-1?nl:nl=pn()}function di(p){return(p.mode&1)===0?1:(rr&2)!==0&&Cn!==0?Cn&-Cn:pl.transition!==null?(so===0&&(so=ns()),so):(p=xt,p!==0?p:Te())}function ma(p,m,I,$){if(50<Dn)throw Dn=0,hu=null,Error(l(185));Ma(p,I,$),((rr&2)===0||p!==Or)&&(p===Or&&((rr&2)===0&&(un|=I),ln===4&&fs(p,Cn)),Ji(p,$),I===1&&rr===0&&(m.mode&1)===0&&(rn(),mo&&Jn()))}function Ji(p,m){var I=p.callbackNode;hc(p,m);var $=Ys(p,p===Or?Cn:0);if($===0)I!==null&&dc(I),p.callbackNode=null,p.callbackPriority=0;else if(m=$&-$,p.callbackPriority!==m){if(I!=null&&dc(I),m===1)p.tag===0?dl(gf.bind(null,p)):Zs(gf.bind(null,p)),be?_e(function(){(rr&6)===0&&Jn()}):vo(Wl,Jn),I=null;else{switch(Ks($)){case 1:I=Wl;break;case 4:I=Yl;break;case 16:I=ks;break;case 536870912:I=Mu;break;default:I=ks}I=Gh(I,Fs.bind(null,p))}p.callbackPriority=m,p.callbackNode=I}}function Fs(p,m){if(nl=-1,so=0,(rr&6)!==0)throw Error(l(327));var I=p.callbackNode;if(Nl()&&p.callbackNode!==I)return null;var $=Ys(p,p===Or?Cn:0);if($===0)return null;if(($&30)!==0||($&p.expiredLanes)!==0||m)m=ds(p,$);else{m=$;var ee=rr;rr|=2;var oe=hs();(Or!==p||Cn!==m)&&(Fi=null,rn(),Go(p,m));do try{Oc();break}catch(We){qa(p,We)}while(!0);Zl(),Kr.current=oe,rr=ee,yr!==null?m=0:(Or=null,Cn=0,m=ln)}if(m!==0){if(m===2&&(ee=Xs(p),ee!==0&&($=ee,m=Pc(p,ee))),m===1)throw I=uu,Go(p,0),fs(p,$),Ji(p,pn()),I;if(m===6)fs(p,$);else{if(ee=p.current.alternate,($&30)===0&&!rh(ee)&&(m=ds(p,$),m===2&&(oe=Xs(p),oe!==0&&($=oe,m=Pc(p,oe))),m===1))throw I=uu,Go(p,0),fs(p,$),Ji(p,pn()),I;switch(p.finishedWork=ee,p.finishedLanes=$,m){case 0:case 1:throw Error(l(345));case 2:ps(p,va,Fi);break;case 3:if(fs(p,$),($&130023424)===$&&(m=cu+500-pn(),10<m)){if(Ys(p,0)!==0)break;if(ee=p.suspendedLanes,(ee&$)!==$){gn(),p.pingedLanes|=p.suspendedLanesⅇbreak}p.timeoutHandle=Q(ps.bind(null,p,va,Fi),m);break}ps(p,va,Fi);break;case 4:if(fs(p,$),($&4194240)===$)break;for(m=p.eventTimes,ee=-1;0<$;){var Ee=31-Ea($);oe=1<<Ee,Ee=m[Ee],Ee>ee&&(ee=Ee),$&=~oe}if($=ee,$=pn()-$,$=(120>$?120:480>$?480:1080>$?1080:1920>$?1920:3e3>$?3e3:4320>$?4320:1960*ga($/1960))-$,10<$){p.timeoutHandle=Q(ps.bind(null,p,va,Fi),$);break}ps(p,va,Fi);break;case 5:ps(p,va,Fi);break;default:throw Error(l(329))}}}return Ji(p,pn()),p.callbackNode===I?Fs.bind(null,p):null}function Pc(p,m){var I=Ol;return p.current.memoizedState.isDehydrated&&(Go(p,m).flags|=256),p=ds(p,m),p!==2&&(m=va,va=I,m!==null&&Hu(m)),p}function Hu(p){va===null?va=p:va.push.apply(va,p)}function rh(p){for(var m=p;;){if(m.flags&16384){var I=m.updateQueue;if(I!==null&&(I=I.stores,I!==null))for(var $=0;$<I.length;$++){var ee=I[$],oe=ee.getSnapshot;ee=ee.value;try{if(!Aa(oe(),ee))return!1}catch{return!1}}}if(I=m.child,m.subtreeFlags&16384&&I!==null)I.return=m,m=I;else{if(m===p)break;for(;m.sibling===null;){if(m.return===null||m.return===p)return!0;m=m.return}m.sibling.return=m.return,m=m.sibling}}return!0}function fs(p,m){for(m&=~io,m&=~un,p.suspendedLanes|=m,p.pingedLanes&=~m,p=p.expirationTimes;0<m;){var I=31-Ea(m),$=1<<I;p[I]=-1,m&=~$}}function gf(p){if((rr&6)!==0)throw Error(l(327));Nl();var m=Ys(p,0);if((m&1)===0)return Ji(p,pn()),null;var I=ds(p,m);if(p.tag!==0&&I===2){var $=Xs(p);$!==0&&(m=$,I=Pc(p,$))}if(I===1)throw I=uu,Go(p,0),fs(p,m),Ji(p,pn()),I;if(I===6)throw Error(l(345));return p.finishedWork=p.current.alternate,p.finishedLanes=m,ps(p,va,Fi),Ji(p,pn()),null}function Cl(p){oo!==null&&oo.tag===0&&(rr&6)===0&&Nl();var m=rr;rr|=1;var I=zr.transition,$=xt;try{if(zr.transition=null,xt=1,p)return p()}finally{xt=$,zr.transition=I,rr=m,(rr&6)===0&&Jn()}}function du(){ii=Vo.current,an(Vo)}function Go(p,m){p.finishedWork=null,p.finishedLanes=0;var I=p.timeoutHandle;if(I!==ue&&(p.timeoutHandle=ue,se(I)),yr!==null)for(I=yr.return;I!==null;){var $=I;switch(Lt($),$.tag){case 1:$=$.type.childContextTypes,$!=null&&Vi();break;case 3:zo(),an(qi),an(Er),Tn();break;case 5:So($);break;case 4:zo();break;case 13:an(tr);break;case 19:an(tr);break;case 10:la($.type._context);break;case 22:case 23:du()}I=I.return}if(Or=p,yr=p=pu(p.current,null),Cn=ii=m,ln=0,uu=null,io=un=Is=0,va=Ol=null,to!==null){for(m=0;m<to.length;m++)if(I=to[m],$=I.interleaved,$!==null){I.interleaved=null;var ee=$.next,oe=I.pending;if(oe!==null){var Ee=oe.next;oe.next=ee,$.next=Ee}I.pending=$}to=null}return p}function qa(p,m){do{var I=yr;try{if(Zl(),Gn.current=Rs,yl){for(var $=on.memoizedState;$!==null;){var ee=$.queue;ee!==null&&(ee.pending=null),$=$.next}yl=!1}if(Xi=0,ui=ri=on=null,Jl=!1,eu=0,Ii.current=null,I===null||I.return===null){ln=1,uu=m,yr=null;break}e:{var oe=p,Ee=I.return,We=I,rt=m;if(m=Cn,We.flags|=32768,rt!==null&&typeof rt=="object"&&typeof rt.then=="function"){var yt=rt,Bt=We,pr=Bt.tag;if((Bt.mode&1)===0&&(pr===0||pr===11||pr===15)){var Ot=Bt.alternate;Ot?(Bt.updateQueue=Ot.updateQueue,Bt.memoizedState=Ot.memoizedState,Bt.lanes=Ot.lanes):(Bt.updateQueue=null,Bt.memoizedState=null)}var Nn=eh(Ee);if(Nn!==null){Nn.flags&=-257,Ms(Nn,Ee,We,oe,m),Nn.mode&1&&Jf(oe,yt,m),m=Nn,rt=yt;var dn=m.updateQueue;if(dn===null){var uo=new Set;uo.add(rt),m.updateQueue=uo}else dn.add(rt);break e}else{if((m&1)===0){Jf(oe,yt,m),lo();break e}rt=Error(l(426))}}else if(Rt&&We.mode&1){var il=eh(Ee);if(il!==null){(il.flags&65536)===0&&(il.flags|=256),Ms(il,Ee,We,oe,m),Kl(Zi(rt,We));break e}}oe=rt=Zi(rt,We),ln!==4&&(ln=2),Ol===null?Ol=[oe]:Ol.push(oe),oe=Ee;do{switch(oe.tag){case 3:oe.flags|=65536,m&=-m,oe.lanes|=m;var et=Qi(oe,rt,m);ka(oe,et);break e;case 1:We=rt;var Xe=oe.type,at=oe.stateNode;if((oe.flags&128)===0&&(typeof Xe.getDerivedStateFromError=="function"||at!==null&&typeof at.componentDidCatch=="function"&&(ao===null||!ao.has(at)))){oe.flags|=65536,m&=-m,oe.lanes|=m;var Ct=Ca(oe,We,m);ka(oe,Ct);break e}}oe=oe.return}while(oe!==null)}Vu(I)}catch(Qt){m=Qt,yr===I&&I!==null&&(yr=I=I.return);continue}break}while(!0)}function hs(){var p=Kr.current;return Kr.current=Rs,p===null?Rs:p}function lo(){(ln===0||ln===3||ln===2)&&(ln=4),Or===null||(Is&268435455)===0&&(un&268435455)===0||fs(Or,Cn)}function ds(p,m){var I=rr;rr|=2;var $=hs();(Or!==p||Cn!==m)&&(Fi=null,Go(p,m));do try{kc();break}catch(ee){qa(p,ee)}while(!0);if(Zl(),rr=I,Kr.current=$,yr!==null)throw Error(l(261));return Or=null,Cn=0,ln}function kc(){for(;yr!==null;)vf(yr)}function Oc(){for(;yr!==null&&!pc();)vf(yr)}function vf(p){var m=Rp(p.alternate,p,ii);p.memoizedProps=p.pendingProps,m===null?Vu(p):yr=m,Ii.current=null}function Vu(p){var m=p;do{var I=m.alternate;if(p=m.return,(m.flags&32768)===0){if(I=qe(I,m,ii),I!==null){yr=I;return}}else{if(I=Ke(I,m),I!==null){I.flags&=32767,yr=I;return}if(p!==null)p.flags|=32768,p.subtreeFlags=0,p.deletions=null;else{ln=6,yr=null;return}}if(m=m.sibling,m!==null){yr=m;return}yr=m=p}while(m!==null);ln===0&&(ln=5)}function ps(p,m,I){var $=xt,ee=zr.transition;try{zr.transition=null,xt=1,Cp(p,m,I,$)}finally{zr.transition=ee,xt=$}return null}function Cp(p,m,I,$){do Nl();while(oo!==null);if((rr&6)!==0)throw Error(l(327));I=p.finishedWork;var ee=p.finishedLanes;if(I===null)return null;if(p.finishedWork=null,p.finishedLanes=0,I===p.current)throw Error(l(177));p.callbackNode=null,p.callbackPriority=0;var oe=I.lanes|I.childLanes;if(Ia(p,oe),p===Or&&(yr=Or=null,Cn=0),(I.subtreeFlags&2064)===0&&(I.flags&2064)===0||ko||(ko=!0,Gh(ks,function(){return Nl(),null})),oe=(I.flags&15990)!==0,(I.subtreeFlags&15990)!==0||oe){oe=zr.transition,zr.transition=null;var Ee=xt;xt=1;var We=rr;rr|=4,Ii.current=null,Mt(p,I),hi(I,p),U(p.containerInfo),p.current=I,On(I),Qa(),rr=We,xt=Ee,zr.transition=oe}else p.current=I;if(ko&&(ko=!1,oo=p,Ac=ee),oe=p.pendingLanes,oe===0&&(ao=null),Fo(I.stateNode),Ji(p,pn()),m!==null)for($=p.onRecoverableError,I=0;I<m.length;I++)ee=m[I],$(ee.value,{componentStack:ee.stack,digest:ee.digest});if(Fn)throw Fn=!1,p=jn,jn=null,p;return(Ac&1)!==0&&p.tag!==0&&Nl(),oe=p.pendingLanes,(oe&1)!==0?p===hu?Dn++:(Dn=0,hu=p):Dn=0,Jn(),null}function Nl(){if(oo!==null){var p=Ks(Ac),m=zr.transition,I=xt;try{if(zr.transition=null,xt=16>p?16:p,oo===null)var $=!1;else{if(p=oo,oo=null,Ac=0,(rr&6)!==0)throw Error(l(331));var ee=rr;for(rr|=4,Ue=p.current;Ue!==null;){var oe=Ue,Ee=oe.child;if((Ue.flags&16)!==0){var We=oe.deletions;if(We!==null){for(var rt=0;rt<We.length;rt++){var yt=We[rt];for(Ue=yt;Ue!==null;){var Bt=Ue;switch(Bt.tag){case 0:case 11:case 15:ar(8,Bt,oe)}var pr=Bt.child;if(pr!==null)pr.return=Bt,Ue=pr;else for(;Ue!==null;){Bt=Ue;var Ot=Bt.sibling,Nn=Bt.return;if(Rn(Bt),Bt===yt){Ue=null;break}if(Ot!==null){Ot.return=Nn,Ue=Ot;break}Ue=Nn}}}var dn=oe.alternate;if(dn!==null){var uo=dn.child;if(uo!==null){dn.child=null;do{var il=uo.sibling;uo.sibling=null,uo=il}while(uo!==null)}}Ue=oe}}if((oe.subtreeFlags&2064)!==0&&Ee!==null)Ee.return=oe,Ue=Ee;else e:for(;Ue!==null;){if(oe=Ue,(oe.flags&2048)!==0)switch(oe.tag){case 0:case 11:case 15:ar(9,oe,oe.return)}var et=oe.sibling;if(et!==null){et.return=oe.return,Ue=et;break e}Ue=oe.return}}var Xe=p.current;for(Ue=Xe;Ue!==null;){Ee=Ue;var at=Ee.child;if((Ee.subtreeFlags&2064)!==0&&at!==null)at.return=Ee,Ue=at;else e:for(Ee=Xe;Ue!==null;){if(We=Ue,(We.flags&2048)!==0)try{switch(We.tag){case 0:case 11:case 15:It(9,We)}}catch(Qt){Bn(We,We.return,Qt)}if(We===Ee){Ue=null;break e}var Ct=We.sibling;if(Ct!==null){Ct.return=We.return,Ue=Ct;break e}Ue=We.return}}if(rr=ee,Jn(),mi&&typeof mi.onPostCommitFiberRoot=="function")try{mi.onPostCommitFiberRoot(ja,p)}catch{}$=!0}return $}finally{xt=I,zr.transition=m}}return!1}function Vh(p,m,I){m=Zi(I,m),m=Qi(p,m,1),p=Jr(p,m,1),m=gn(),p!==null&&(Ma(p,1,m),Ji(p,m))}function Bn(p,m,I){if(p.tag===3)Vh(p,p,I);else for(;m!==null;){if(m.tag===3){Vh(m,p,I);break}else if(m.tag===1){var $=m.stateNode;if(typeof m.type.getDerivedStateFromError=="function"||typeof $.componentDidCatch=="function"&&(ao===null||!ao.has($))){p=Zi(I,p),p=Ca(m,p,1),m=Jr(m,p,1),p=gn(),m!==null&&(Ma(m,1,p),Ji(m,p));break}}m=m.return}}function Np(p,m,I){var $=p.pingCache;$!==null&&$.delete(m),m=gn(),p.pingedLanes|=p.suspendedLanes&I,Or===p&&(Cn&I)===I&&(ln===4||ln===3&&(Cn&130023424)===Cn&&500>pn()-cu?Go(p,0):io|=I),Ji(p,m)}function Lp(p,m){m===0&&((p.mode&1)===0?m=1:(m=go,go<<=1,(go&130023424)===0&&(go=4194304)));var I=gn();p=$i(p,m),p!==null&&(Ma(p,m,I),Ji(p,I))}function Tp(p){var m=p.memoizedState,I=0;m!==null&&(I=m.retryLane),Lp(p,I)}function L0(p,m){var I=0;switch(p.tag){case 13:var $=p.stateNode,ee=p.memoizedState;ee!==null&&(I=ee.retryLane);break;case 19:$=p.stateNode;break;default:throw Error(l(314))}$!==null&&$.delete(m),Lp(p,I)}var Rp;Rp=function(p,m,I){if(p!==null)if(p.memoizedProps!==m.pendingProps||qi.current)ci=!0;else{if((p.lanes&I)===0&&(m.flags&128)===0)return ci=!1,ie(p,m,I);ci=(p.flags&131072)!==0}else ci=!1,Rt&&(m.flags&1048576)!==0&<(m,yi,m.index);switch(m.lanes=0,m.tag){case 2:var $=m.type;B(p,m),p=m.pendingProps;var ee=Hi(m,Er.current);as(m,I),ee=tu(null,m,$,p,ee,I);var oe=Fu();return m.flags|=1,typeof ee=="object"&&ee!==null&&typeof ee.render=="function"&&ee.$$typeof===void 0?(m.tag=1,m.memoizedState=null,m.updateQueue=null,Pn($)?(oe=!0,es(m)):oe=!1,m.memoizedState=ee.state!==null&&ee.state!==void 0?ee.state:null,os(m),ee.updater=Uu,m.stateNode=ee,ee._reactInternals=m,Ki(m,$,p,I),m=ha(null,m,$,!0,oe,I)):(m.tag=0,Rt&&oe&&ft(m),xi(null,m,ee,I),m=m.child),m;case 16:$=m.elementType;e:{switch(B(p,m),p=m.pendingProps,ee=$._init,$=ee($._payload),m.type=$,ee=m.tag=T0($),p=no($,p),ee){case 0:m=ls(null,m,$,p,I);break e;case 1:m=Mi(null,m,$,p,I);break e;case 11:m=Ec(null,m,$,p,I);break e;case 14:m=ss(null,m,$,no($.type,p),I);break e}throw Error(l(306,$,""))}return m;case 0:return $=m.type,ee=m.pendingProps,ee=m.elementType===$?ee:no($,ee),ls(p,m,$,ee,I);case 1:return $=m.type,ee=m.pendingProps,ee=m.elementType===$?ee:no($,ee),Mi(p,m,$,ee,I);case 3:e:{if(rl(m),p===null)throw Error(l(387));$=m.pendingProps,oe=m.memoizedState,ee=oe.element,Ql(p,m),Wi(m,$,null,I);var Ee=m.memoizedState;if($=Ee.element,Me&&oe.isDehydrated)if(oe={element:$,isDehydrated:!1,cache:Ee.cache,pendingSuspenseBoundaries:Ee.pendingSuspenseBoundaries,transitions:Ee.transitions},m.updateQueue.baseState=oe,m.memoizedState=oe,m.flags&256){ee=Zi(Error(l(423)),m),m=Pl(p,m,$,I,ee);break e}else if($!==ee){ee=Zi(Error(l(424)),m),m=Pl(p,m,$,I,ee);break e}else for(Me&&(Ut=wa(m.stateNode.containerInfo),Et=m,Rt=!0,Mr=null,Pr=!1),I=gl(m,null,$,I),m.child=I;I;)I.flags=I.flags&-3|4096,I=I.sibling;else{if(Ns(),$===ee){m=te(p,m,I);break e}xi(p,m,$,I)}m=m.child}return m;case 5:return Oa(m),p===null&&Hn(m),$=m.type,ee=m.pendingProps,oe=p!==null?p.memoizedProps:null,Ee=ee.children,re($,ee)?Ee=null:oe!==null&&re($,oe)&&(m.flags|=32),tn(p,m),xi(p,m,Ee,I),m.child;case 6:return p===null&&Hn(m),null;case 13:return pf(p,m,I);case 4:return xo(m,m.stateNode.containerInfo),$=m.pendingProps,p===null?m.child=Pa(m,null,$,I):xi(p,m,$,I),m.child;case 11:return $=m.type,ee=m.pendingProps,ee=m.elementType===$?ee:no($,ee),Ec(p,m,$,ee,I);case 7:return xi(p,m,m.pendingProps,I),m.child;case 8:return xi(p,m,m.pendingProps.children,I),m.child;case 12:return xi(p,m,m.pendingProps.children,I),m.child;case 10:e:{if($=m.type._context,ee=m.pendingProps,oe=m.memoizedProps,Ee=ee.value,si(m,$,Ee),oe!==null)if(Aa(oe.value,Ee)){if(oe.children===ee.children&&!qi.current){m=te(p,m,I);break e}}else for(oe=m.child,oe!==null&&(oe.return=m);oe!==null;){var We=oe.dependencies;if(We!==null){Ee=oe.child;for(var rt=We.firstContext;rt!==null;){if(rt.context===$){if(oe.tag===1){rt=ca(-1,I&-I),rt.tag=2;var yt=oe.updateQueue;if(yt!==null){yt=yt.shared;var Bt=yt.pending;Bt===null?rt.next=rt:(rt.next=Bt.next,Bt.next=rt),yt.pending=rt}}oe.lanes|=I,rt=oe.alternate,rt!==null&&(rt.lanes|=I),Do(oe.return,I,m),We.lanes|=I;break}rt=rt.next}}else if(oe.tag===10)Ee=oe.type===m.type?null:oe.child;else if(oe.tag===18){if(Ee=oe.return,Ee===null)throw Error(l(341));Ee.lanes|=I,We=Ee.alternate,We!==null&&(We.lanes|=I),Do(Ee,I,m),Ee=oe.sibling}else Ee=oe.child;if(Ee!==null)Ee.return=oe;else for(Ee=oe;Ee!==null;){if(Ee===m){Ee=null;break}if(oe=Ee.sibling,oe!==null){oe.return=Ee.return,Ee=oe;break}Ee=Ee.return}oe=Ee}xi(p,m,ee.children,I),m=m.child}return m;case 9:return ee=m.type,$=m.pendingProps.children,as(m,I),ee=li(ee),$=$(ee),m.flags|=1,xi(p,m,$,I),m.child;case 14:return $=m.type,ee=no($,m.pendingProps),ee=no($.type,ee),ss(p,m,$,ee,I);case 15:return Po(p,m,m.type,m.pendingProps,I);case 17:return $=m.type,ee=m.pendingProps,ee=m.elementType===$?ee:no($,ee),B(p,m),m.tag=1,Pn($)?(p=!0,es(m)):p=!1,as(m,I),Qf(m,$,ee),Ki(m,$,ee,I),ha(null,m,$,!0,p,I);case 19:return N(p,m,I);case 22:return Yr(p,m,I)}throw Error(l(156,m.tag))};function Gh(p,m){return vo(p,m)}function Mp(p,m,I,$){this.tag=p,this.key=I,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=m,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=$,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $o(p,m,I,$){return new Mp(p,m,I,$)}function Cc(p){return p=p.prototype,!(!p||!p.isReactComponent)}function T0(p){if(typeof p=="function")return Cc(p)?1:0;if(p!=null){if(p=p.$$typeof,p===x)return 11;if(p===b)return 14}return 2}function pu(p,m){var I=p.alternate;return I===null?(I=$o(p.tag,m,p.key,p.mode),I.elementType=p.elementType,I.type=p.type,I.stateNode=p.stateNode,I.alternate=p,p.alternate=I):(I.pendingProps=m,I.type=p.type,I.flags=0,I.subtreeFlags=0,I.deletions=null),I.flags=p.flags&14680064,I.childLanes=p.childLanes,I.lanes=p.lanes,I.child=p.child,I.memoizedProps=p.memoizedProps,I.memoizedState=p.memoizedState,I.updateQueue=p.updateQueue,m=p.dependencies,I.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},I.sibling=p.sibling,I.index=p.index,I.ref=p.ref,I}function nh(p,m,I,$,ee,oe){var Ee=2;if($=p,typeof p=="function")Cc(p)&&(Ee=1);else if(typeof p=="string")Ee=5;else e:switch(p){case f:return Na(I.children,ee,oe,m);case v:Ee=8,ee|=8;break;case g:return p=$o(12,I,m,ee|2),p.elementType=g,p.lanes=oe,p;case E:return p=$o(13,I,m,ee),p.elementType=E,p.lanes=oe,p;case S:return p=$o(19,I,m,ee),p.elementType=S,p.lanes=oe,p;case _:return Nc(I,ee,oe,m);default:if(typeof p=="object"&&p!==null)switch(p.$$typeof){case c:Ee=10;break e;case y:Ee=9;break e;case x:Ee=11;break e;case b:Ee=14;break e;case w:Ee=16,$=null;break e}throw Error(l(130,p==null?p:typeof p,""))}return m=$o(Ee,I,m,ee),m.elementType=p,m.type=$,m.lanes=oe,m}function Na(p,m,I,$){return p=$o(7,p,$,m),p.lanes=I,p}function Nc(p,m,I,$){return p=$o(22,p,$,m),p.elementType=_,p.lanes=I,p.stateNode={isHidden:!1},p}function Lc(p,m,I){return p=$o(6,p,null,m),p.lanes=I,p}function ih(p,m,I){return m=$o(4,p.children!==null?p.children:[],p.key,m),m.lanes=I,m.stateNode={containerInfo:p.containerInfo,pendingChildren:null,implementation:p.implementation},m}function Ip(p,m,I,$,ee){this.tag=m,this.containerInfo=p,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ue,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Za(0),this.expirationTimes=Za(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Za(0),this.identifierPrefix=$,this.onRecoverableError=ee,Me&&(this.mutableSourceEagerHydrationData=null)}function $h(p,m,I,$,ee,oe,Ee,We,rt){return p=new Ip(p,m,I,We,rt),m===1?(m=1,oe===!0&&(m|=8)):m=0,oe=$o(3,null,null,m),p.current=oe,oe.stateNode=p,oe.memoizedState={element:$,isDehydrated:I,cache:null,transitions:null,pendingSuspenseBoundaries:null},os(oe),p}function ah(p){if(!p)return Jo;p=p._reactInternals;e:{if(R(p)!==p||p.tag!==1)throw Error(l(170));var m=p;do{switch(m.tag){case 3:m=m.stateNode.context;break e;case 1:if(Pn(m.type)){m=m.stateNode.__reactInternalMemoizedMergedChildContext;break e}}m=m.return}while(m!==null);throw Error(l(171))}if(p.tag===1){var I=p.type;if(Pn(I))return qn(p,I,m)}return m}function Gu(p){var m=p._reactInternals;if(m===void 0)throw typeof p.render=="function"?Error(l(188)):(p=Object.keys(p).join(","),Error(l(268,p)));return p=C(m),p===null?null:p.stateNode}function oh(p,m){if(p=p.memoizedState,p!==null&&p.dehydrated!==null){var I=p.retryLane;p.retryLane=I!==0&&I<m?I:m}}function Tc(p,m){oh(p,m),(p=p.alternate)&&oh(p,m)}function R0(p){return p=C(p),p===null?null:p.stateNode}function Fp(){return null}return r.attemptContinuousHydration=function(p){if(p.tag===13){var m=$i(p,134217728);if(m!==null){var I=gn();ma(m,p,134217728,I)}Tc(p,134217728)}},r.attemptDiscreteHydration=function(p){if(p.tag===13){var m=$i(p,1);if(m!==null){var I=gn();ma(m,p,1,I)}Tc(p,1)}},r.attemptHydrationAtCurrentPriority=function(p){if(p.tag===13){var m=di(p),I=$i(p,m);if(I!==null){var $=gn();ma(I,p,m,$)}Tc(p,m)}},r.attemptSynchronousHydration=function(p){switch(p.tag){case 3:var m=p.stateNode;if(m.current.memoizedState.isDehydrated){var I=rs(m.pendingLanes);I!==0&&(Fa(m,I|1),Ji(m,pn()),(rr&6)===0&&(rn(),Jn()))}break;case 13:Cl(function(){var $=$i(p,1);if($!==null){var ee=gn();ma($,p,1,ee)}}),Tc(p,1)}},r.batchedUpdates=function(p,m){var I=rr;rr|=1;try{return p(m)}finally{rr=I,rr===0&&(rn(),mo&&Jn())}},r.createComponentSelector=function(p){return{$$typeof:_n,value:p}},r.createContainer=function(p,m,I,$,ee,oe,Ee){return $h(p,m,!1,null,I,$,ee,oe,Ee)},r.createHasPseudoClassSelector=function(p){return{$$typeof:xn,value:p}},r.createHydrationContainer=function(p,m,I,$,ee,oe,Ee,We,rt){return p=$h(I,$,!0,p,ee,oe,Ee,We,rt),p.context=ah(null),I=p.current,$=gn(),ee=di(I),oe=ca($,ee),oe.callback=m??null,Jr(I,oe,ee),p.current.lanes=ee,Ma(p,ee,$),Ji(p,$),p},r.createPortal=function(p,m,I){var $=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:$==null?null:""+$,children:p,containerInfo:m,implementation:I}},r.createRoleSelector=function(p){return{$$typeof:Xr,value:p}},r.createTestNameSelector=function(p){return{$$typeof:Si,value:p}},r.createTextSelector=function(p){return{$$typeof:Vr,value:p}},r.deferredUpdates=function(p){var m=xt,I=zr.transition;try{return zr.transition=null,xt=16,p()}finally{xt=m,zr.transition=I}},r.discreteUpdates=function(p,m,I,$,ee){var oe=xt,Ee=zr.transition;try{return zr.transition=null,xt=1,p(m,I,$,ee)}finally{xt=oe,zr.transition=Ee,rr===0&&rn()}},r.findAllNodes=In,r.findBoundingRects=function(p,m){if(!xe)throw Error(l(363));m=In(p,m),p=[];for(var I=0;I<m.length;I++)p.push(pe(m[I]));for(m=p.length-1;0<m;m--){I=p[m];for(var $=I.x,ee=$+I.width,oe=I.y,Ee=oe+I.height,We=m-1;0<=We;We--)if(m!==We){var rt=p[We],yt=rt.x,Bt=yt+rt.width,pr=rt.y,Ot=pr+rt.height;if($>=yt&&oe>=pr&&ee<=Bt&&Ee<=Ot){p.splice(m,1);break}else if($!==yt||I.width!==rt.width||Ot<oe||pr>Ee){if(!(oe!==pr||I.height!==rt.height||Bt<$||yt>ee)){yt>$&&(rt.width+=yt-$,rt.x=$),Bt<ee&&(rt.width=ee-yt),p.splice(m,1);break}}else{pr>oe&&(rt.height+=pr-oe,rt.y=oe),Ot<Ee&&(rt.height=Ee-pr),p.splice(m,1);break}}}return p},r.findHostInstance=Gu,r.findHostInstanceWithNoPortals=function(p){return p=k(p),p=p!==null?G(p):null,p===null?null:p.stateNode},r.findHostInstanceWithWarning=function(p){return Gu(p)},r.flushControlled=function(p){var m=rr;rr|=1;var I=zr.transition,$=xt;try{zr.transition=null,xt=1,p()}finally{xt=$,zr.transition=I,rr=m,rr===0&&(rn(),Jn())}},r.flushPassiveEffects=Nl,r.flushSync=Cl,r.focusWithin=function(p,m){if(!xe)throw Error(l(363));for(p=$n(p),m=Wn(p,m),m=Array.from(m),p=0;p<m.length;){var I=m[p++];if(!je(I)){if(I.tag===5&&st(I.stateNode))return!0;for(I=I.child;I!==null;)m.push(I),I=I.sibling}}return!1},r.getCurrentUpdatePriority=function(){return xt},r.getFindAllNodesFailureDescription=function(p,m){if(!xe)throw Error(l(363));var I=0,$=[];p=[$n(p),0];for(var ee=0;ee<p.length;){var oe=p[ee++],Ee=p[ee++],We=m[Ee];if((oe.tag!==5||!je(oe))&&(Ei(oe,We)&&($.push(pa(We)),Ee++,Ee>I&&(I=Ee)),Ee<m.length))for(oe=oe.child;oe!==null;)p.push(oe,Ee),oe=oe.sibling}if(I<m.length){for(p=[];I<m.length;I++)p.push(pa(m[I]));return`findAllNodes was able to match part of the selector:
|
|
58
58
|
`+($.join(" > ")+`
|
|
59
59
|
|
|
60
60
|
No matching component was found for:
|
|
61
|
-
`)+p.join(" > ")}return null},r.getPublicRootInstance=function(p){if(p=p.current,!p.child)return null;switch(p.child.tag){case 5:return ae(p.child.stateNode);default:return p.child.stateNode}},r.injectIntoDevTools=function(p){if(p={bundleType:p.bundleType,version:p.version,rendererPackageName:p.rendererPackageName,rendererConfig:p.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:R0,findFiberByHostInstance:p.findFiberByHostInstance||Fp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")p=!1;else{var m=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(m.isDisabled||!m.supportsFiber)p=!0;else{try{ja=m.inject(p),
|
|
61
|
+
`)+p.join(" > ")}return null},r.getPublicRootInstance=function(p){if(p=p.current,!p.child)return null;switch(p.child.tag){case 5:return ae(p.child.stateNode);default:return p.child.stateNode}},r.injectIntoDevTools=function(p){if(p={bundleType:p.bundleType,version:p.version,rendererPackageName:p.rendererPackageName,rendererConfig:p.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:R0,findFiberByHostInstance:p.findFiberByHostInstance||Fp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")p=!1;else{var m=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(m.isDisabled||!m.supportsFiber)p=!0;else{try{ja=m.inject(p),mi=m}catch{}p=!!m.checkDCE}}return p},r.isAlreadyRendering=function(){return!1},r.observeVisibleRects=function(p,m,I,$){if(!xe)throw Error(l(363));p=In(p,m);var ee=pt(p,I,$).disconnect;return{disconnect:function(){ee()}}},r.registerMutableSourceForHydration=function(p,m){var I=m._getVersion;I=I(m._source),p.mutableSourceEagerHydrationData==null?p.mutableSourceEagerHydrationData=[m,I]:p.mutableSourceEagerHydrationData.push(m,I)},r.runWithPriority=function(p,m){var I=xt;try{return xt=p,m()}finally{xt=I}},r.shouldError=function(){return null},r.shouldSuspend=function(){return!1},r.updateContainer=function(p,m,I,$){var ee=m.current,oe=gn(),Ee=di(ee);return I=ah(I),m.context===null?m.context=I:m.pendingContext=I,m=ca(oe,Ee),m.payload={element:p},$=$===void 0?null:$,$!==null&&(m.callback=$),p=Jr(ee,m,Ee),p!==null&&(ma(p,ee,Ee,oe),vl(p,ee,Ee)),Ee},r}),Eg}var K5;function lE(){return K5||(K5=1,Sg.exports=sE()),Sg.exports}var uE=lE();const cE=lc(uE);var Ag={exports:{}},Uc={};/**
|
|
62
62
|
* @license React
|
|
63
63
|
* react-reconciler-constants.production.min.js
|
|
64
64
|
*
|
|
@@ -80,7 +80,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
80
80
|
font-style:${i.fontStyle||"normal"};
|
|
81
81
|
font-weight:${i.fontWeight||"normal"};
|
|
82
82
|
font-display:swap; /* optional but recommended */
|
|
83
|
-
}`,n.cssRules.length)}),yb[e.fontFamily]=!0}const
|
|
83
|
+
}`,n.cssRules.length)}),yb[e.fontFamily]=!0}const gi=$r({imageDownScalingEnabled:!0,removeBackgroundEnabled:!0,htmlRenderEnabled:!1,forceTextFitEnabled:!1,textVerticalResizeEnabled:!1,textOverflow:"resize",textSplitAllowed:!1,animationsEnabled:!1}),UA=Wr(e=>{gi.textVerticalResizeEnabled=e}),qA=Wr(e=>{gi.removeBackgroundEnabled=e}),HA=Wr(e=>{gi.htmlRenderEnabled=e}),VA=Wr(e=>{gi.imageDownScalingEnabled=e});Wr(e=>{console.warn("useDownScaling is deprecated. Use setDownScalingEnabled instead."),VA(e)});Wr(e=>{console.warn("setForceTextFit is deprecated. Use setTextOverflow instead."),gi.textOverflow="change-font-size"});const f8=Wr(e=>{gi.textOverflow=e}),GA=Wr(e=>{gi.textSplitAllowed=e});Wr(e=>{gi.animationsEnabled=e});function Pu(e=""){return(e.match(/<\/p>/gi)||[]).length>1&&(e=e.replace(/<\/p>/gi,(t,r,n)=>(n.slice(r+t.length).match(/<\/p>/gi)||[]).length>0?`
|
|
84
84
|
`:t)),e.replace(/(<([^>]+)>)/gi,"")}function $A(e){return e?/<[a-z][a-z0-9]*(\s[^>]*)?>[^<]*<\/[a-z][a-z0-9]*>/i.test(e)?e=(e=e.replace(/<(?![a-z/!])/gi,"<")).replace(/([^a-z0-9"'\s/])>/gi,"$1>"):e.replace(/</g,"<").replace(/>/g,">"):""}const WA={warm:e=>t=>{const r=t.data;e=Math.max(0,Math.min(1,e));for(let n=0;n<r.length;n+=4)r[n]=Math.min(r[n]+30*e,255),r[n+1]=Math.min(r[n+1]+15*e,255);return t},cold:e=>t=>{const r=t.data;e=Math.max(0,Math.min(1,e));for(let n=0;n<r.length;n+=4)r[n]=Math.min(r[n]-15*e,255),r[n+1]=Math.min(r[n+1]-10*e,255),r[n+2]=Math.min(r[n+2]+15*e,255);return t},natural:e=>t=>{const r=t.data;e=Math.max(0,Math.min(1,e));for(let n=0;n<r.length;n+=4){r[n]=Math.min(r[n]*(1+.1*e),255),r[n+1]=Math.min(r[n+1]*(1+.1*e),255),r[n+2]=Math.min(r[n+2]*(1+.1*e),255);const i=(r[n]+r[n+1]+r[n+2])/3;r[n]=Math.min((r[n]-i)*(1+.2*e)+i,255),r[n+1]=Math.min((r[n+1]-i)*(1+.2*e)+i,255),r[n+2]=Math.min((r[n+2]-i)*(1+.2*e)+i,255)}return t},temperature:e=>t=>{const r=t.data;e=Math.max(-1,Math.min(1,e));for(let n=0;n<r.length;n+=4){const i=r[n],a=(r[n+1],r[n+2]);r[n]=Math.min(Math.max(i+15*e,0),255),r[n+2]=Math.min(Math.max(a-15*e,0),255)}return t},contrast:e=>t=>{const r=t.data,n=100*(e=Math.max(-1,Math.min(1,e))),i=259*(n+255)/(255*(259-n));for(let a=0;a<r.length;a+=4)r[a]=Math.min(Math.max(i*(r[a]-128)+128,0),255),r[a+1]=Math.min(Math.max(i*(r[a+1]-128)+128,0),255),r[a+2]=Math.min(Math.max(i*(r[a+2]-128)+128,0),255);return t},shadows:e=>t=>{const r=t.data;e=Math.max(-1,Math.min(1,e));for(let n=0;n<r.length;n+=4){const i=(r[n]+r[n+1]+r[n+2])/3;if(i<128){const a=1+e*(1-i/128)*2;r[n]=Math.min(Math.max(r[n]*a,0),255),r[n+1]=Math.min(Math.max(r[n+1]*a,0),255),r[n+2]=Math.min(Math.max(r[n+2]*a,0),255)}}return t},white:e=>t=>{const r=t.data;e=Math.max(-1,Math.min(1,e));for(let n=0;n<r.length;n+=4){const i=r[n],a=r[n+1],l=r[n+2],o=(i+a+l)/3;if(o>128){const u=1+e*((o-128)/127);r[n]=Math.min(Math.max(i*u,0),255),r[n+1]=Math.min(Math.max(a*u,0),255),r[n+2]=Math.min(Math.max(l*u,0),255)}}return t},black:e=>t=>{const r=t.data;e=Math.max(-1,Math.min(1,e));for(let n=0;n<r.length;n+=4){const i=r[n],a=r[n+1],l=r[n+2],o=(i+a+l)/3;if(o<128){const u=1+e*((128-o)/128);r[n]=Math.min(Math.max(i*u,0),255),r[n+1]=Math.min(Math.max(a*u,0),255),r[n+2]=Math.min(Math.max(l*u,0),255)}}return t},vibrance:e=>t=>{const r=t.data;e=Math.max(-1,Math.min(1,e));for(let n=0;n<r.length;n+=4){const i=r[n],a=r[n+1],l=r[n+2],o=Math.max(i,a,l),u=e<0?(1-(o===0?0:(o-(i+a+l)/3)/o))*e*1.5:.5*e;r[n]=Math.min(Math.max(i-(o-i)*u,0),255),r[n+1]=Math.min(Math.max(a-(o-a)*u,0),255),r[n+2]=Math.min(Math.max(l-(o-l)*u,0),255)}return t},saturation:e=>t=>{const r=t.data;e=Math.max(-1,Math.min(1,e));for(let n=0;n<r.length;n+=4){const i=r[n],a=r[n+1],l=r[n+2],o=.2126*i+.7152*a+.0722*l;r[n]=Math.min(Math.max(o+(i-o)*(1+e),0),255),r[n+1]=Math.min(Math.max(o+(a-o)*(1+e),0),255),r[n+2]=Math.min(Math.max(o+(l-o)*(1+e),0),255)}return t}};function _s(e,t){var r;const n={filters:[]},i={};t.brightnessEnabled&&(n.filters.push(sr.Filters.Brighten),n.brightness=t.brightness),t.blurEnabled&&(n.filters.push(sr.Filters.Blur),n.blurRadius=t.blurRadius,t.type==="text"&&t.lineHeight<1&&(i.offset=t.fontSize)),t.sepiaEnabled&&n.filters.push(sr.Filters.Sepia),t.grayscaleEnabled&&n.filters.push(sr.Filters.Grayscale),t.filters.forEach((a,l)=>{const o=WA[l];o&&n.filters.push(o(a.intensity))}),e.setAttrs(n),n.filters.length?e.cache(Object.assign(Object.assign({},i),{pixelRatio:t.store._elementsPixelRatio})):e.clearCache(),(r=e.getLayer())===null||r===void 0||r.batchDraw()}const lf=()=>"ontouchstart"in window||navigator.maxTouchPoints>0;var bb={},h8="warn";function YA(e){h8=e}function XA(){return h8}var Ta;(function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"})(Ta||(Ta={}));var Iv=function(e,t){return Iv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Iv(e,t)};function Kn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Iv(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Nu=function(){return Nu=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Nu.apply(this,arguments)};function KA(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Zd(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function rf(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],l;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(o){l={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(l)throw l.error}}return a}function Bf(e,t,r){if(arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function d8(e){return Tr(e).type}function p8(e,t){return Tr(e).onSnapshot(t)}function wb(e,t){Tr(e).applyPatches(S8(t))}function Fv(e,t){return Tr(e).applySnapshot(t)}function wu(e,t){t===void 0&&(t=!0);var r=Tr(e);return t?r.snapshot:r.type.getSnapshot(r,!1)}function s1(e,t){for(var r=Tr(e).parent;r;){if(t.is(r.storedValue))return!0;r=r.parent}return!1}function kf(e,t){for(var r=Tr(e).parent;r;){if(t.is(r.storedValue))return r.storedValue;r=r.parent}throw new Zt("Failed to find the parent of ".concat(Tr(e)," of a given type"))}function ZA(e){return Tr(e).root.storedValue}function QA(e){return Tr(e).path}function JA(e,t){var r=wP(Tr(e),t);return r?r.value:void 0}function eP(e){return Tr(e).identifier}function Lf(e){return Tr(e).detach(),e}function Cg(e){var t=Tr(e);t.isRoot?t.die():t.parent.removeChild(t.subpath)}function _b(e){return Tr(e).observableIsAlive}var g8=function(){function e(t,r,n,i){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"_escapedSubpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storedValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"aliveAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_state",{enumerable:!0,configurable:!0,writable:!0,value:ho.INITIALIZING}),Object.defineProperty(this,"_hookSubscribers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.environment=i,this.baseSetParent(r,n)}return Object.defineProperty(e.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(t){var r=this.isAlive;this._state=t;var n=this.isAlive;this.aliveAtom&&r!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._hookSubscribers&&this._hookSubscribers.emit(t,this,t)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return this._hookSubscribers||(this._hookSubscribers=new P8),this._hookSubscribers.register(t,r)}}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getReconciliationType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type}}),Object.defineProperty(e.prototype,"baseSetParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){this._parent=t,this._subpath=r,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()}}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getEscapedPath",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t&&(this.pathAtom||(this.pathAtom=F1("path")),this.pathAtom.reportObserved()),this.parent?(this._escapedSubpath===void 0&&(this._escapedSubpath=this._subpath?Rf(this._subpath):""),this.parent.getEscapedPath(t)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return this.parent===null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==ho.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===ho.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=F1("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.state===ho.CREATED){if(this.parent){if(this.parent.state!==ho.FINALIZED)return;this.fireHook(Ta.afterAttach)}this.state=ho.FINALIZED,t&&t()}}}),Object.defineProperty(e.prototype,"baseFinalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=ho.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(Ta.beforeDestroy)}}),e}(),up=function(e){Kn(t,e);function t(r,n,i,a,l){var o=e.call(this,r,n,i,a)||this;try{o.storedValue=r.createNewInstance(l)}catch(u){throw o.state=ho.DEAD,u}return o.state=ho.CREATED,o.finalizeCreation(),o}return Object.defineProperty(t.prototype,"root",{get:function(){if(!this.parent)throw new Zt("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this.parent!==r,a=this.subpath!==n;!i&&!a||(this.environment=void 0,this.baseSetParent(this.parent,n))}}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.getSnapshot()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(t.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return"".concat(this.type.name,"@").concat(r).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(t.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===ho.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(t.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(t.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(t.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(t.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.fireInternalHook(r)}}),t}(g8);up.prototype.die=Wr(up.prototype.die);var tP=1,Il;(function(e){e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.CREATING=1]="CREATING",e[e.CREATED=2]="CREATED"})(Il||(Il={}));var Bs;(function(e){e.Dispose="dispose",e.Patch="patch",e.Snapshot="snapshot"})(Bs||(Bs={}));var rP={onError:function(e){throw e}},xs=function(e){Kn(t,e);function t(r,n,i,a,l){var o=e.call(this,r,n,i,a)||this;if(Object.defineProperty(o,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++tP}),Object.defineProperty(o,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(o,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"hasSnapshotPostProcessor",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(o,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(o,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(o,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(o,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:Il.UNINITIALIZED}),Object.defineProperty(o,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(o,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),o._snapshotComputed=qf(function(){return o.getSnapshot()}),o.unbox=o.unbox.bind(o),o._initialSnapshot=l,o.identifierAttribute=r.identifierAttribute,n||(o.identifierCache=new mP),o._childNodes=r.initializeChildNodes(o,o._initialSnapshot),o.identifier=null,o.unnormalizedIdentifier=null,o.identifierAttribute&&o._initialSnapshot){var u=o._initialSnapshot[o.identifierAttribute];if(u===void 0){var d=o._childNodes[o.identifierAttribute];d&&(u=d.value)}if(typeof u!="string"&&typeof u!="number")throw new Zt("Instance identifier '".concat(o.identifierAttribute,"' for type '").concat(o.type.name,"' must be a string or a number"));o.identifier=Ep(u),o.unnormalizedIdentifier=u}return n?n.root.identifierCache.addNodeToCache(o):o.identifierCache.addNodeToCache(o),o}return Object.defineProperty(t.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.createObservableInstanceIfNeeded(),this._applyPatches(r)}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.createObservableInstanceIfNeeded(),this._applySnapshot(r)}}),Object.defineProperty(t.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(r){r===void 0&&(r=!0),this._observableInstanceState===Il.UNINITIALIZED&&this.createObservableInstance(r)}}),Object.defineProperty(t.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n,i,a,l;r===void 0&&(r=!0),this._observableInstanceState=Il.CREATING;for(var o=[],u=this.parent;u&&u._observableInstanceState===Il.UNINITIALIZED;)o.unshift(u),u=u.parent;try{for(var d=Zd(o),f=d.next();!f.done;f=d.next()){var v=f.value;v.createObservableInstanceIfNeeded(!1)}}catch(x){n={error:x}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}var g=this.type;try{this.storedValue=g.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,g.finalizeNewInstance(this,this.storedValue)}catch(x){throw this.state=ho.DEAD,x}finally{this._isRunningAction=!1}if(this._observableInstanceState=Il.CREATED,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=Fh,this.state=ho.CREATED,r){this.fireHook(Ta.afterCreate),this.finalizeCreation();try{for(var c=Zd(o.reverse()),y=c.next();!y.done;y=c.next()){var v=y.value;v.fireHook(Ta.afterCreate),v.finalizeCreation()}}catch(x){a={error:x}}finally{try{y&&!y.done&&(l=c.return)&&l.call(c)}finally{if(a)throw a.error}}}}}),Object.defineProperty(t.prototype,"root",{get:function(){var r=this.parent;return r?r.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(Ta.beforeDetach);var r=this.state;this.state=ho.DETACHING;var n=this.root,i=n.environment,a=n.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=i,this.identifierCache=a}finally{this.state=r}}}}),Object.defineProperty(t.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=r!==this.parent,a=n!==this.subpath;!i&&!a||(i?(this.environment=void 0,r.root.identifierCache.mergeCache(this),this.baseSetParent(r,n),this.fireHook(Ta.afterAttach)):a&&this.baseSetParent(this.parent,n))}}),Object.defineProperty(t.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;this.fireInternalHook(r);var i=this.storedValue&&typeof this.storedValue=="object"&&this.storedValue[r];typeof i=="function"&&(tc?tc(function(){i.apply(n.storedValue)}):i.apply(this.storedValue))}}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.hasSnapshotPostProcessor&&this.createObservableInstanceIfNeeded(),this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?this._observableInstanceState===Il.CREATED?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(t.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(t.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var r=this.type,n=this._childNodes,i=this._initialSnapshot;this._cachedInitialSnapshot=r.processInitialSnapshot(n,i),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(t.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isRunningAction?!0:this.isRoot?!1:this.parent.isRunningAction()}}),Object.defineProperty(t.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=XA();if(!this.isAlive&&n!=="ignore"){var i=this._getAssertAliveError(r);switch(n){case"error":throw new Zt(i);case"warn":NP(i)}}}}),Object.defineProperty(t.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.getEscapedPath(!1)||this.pathUponDeath||"",i=r.subpath&&Rf(r.subpath)||"",a=r.actionContext||aP();a&&a.type!=="action"&&a.parentActionEvent&&(a=a.parentActionEvent);var l="";if(a&&a.name!=null){var o=a&&a.context&&QA(a.context)||n;l="".concat(o,".").concat(a.name,"()")}return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '".concat(this.type.name,"', Path upon death: '").concat(n,"', Subpath: '").concat(i,"', Action: '").concat(l,"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree.")}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.assertAlive({subpath:r}),this._autoUnbox=!1;try{return this._observableInstanceState===Il.CREATED?this.type.getChildNode(this,r):this._childNodes[r]}finally{this._autoUnbox=!0}}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(Fh),this._autoUnbox=!1;try{return this._observableInstanceState===Il.CREATED?this.type.getChildren(this):_8(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.type.getChildType(r)}}),Object.defineProperty(t.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(this.assertAlive(r),!this.isRunningAction()&&this.isProtected)throw new Zt("Cannot modify '".concat(this,"', the object is protected and can only be modified by using an action."))}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.type.removeChild(this,r)}}),Object.defineProperty(t.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r&&(this.assertAlive({subpath:r.subpath||r.subpathUponDeath}),this._autoUnbox?r.value:r)}}),Object.defineProperty(t.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=(this.isAlive?this.path:this.pathUponDeath)||"<root>",n=this.identifier?"(id: ".concat(this.identifier,")"):"";return"".concat(this.type.name,"@").concat(r).concat(n).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(t.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;this.baseFinalizeCreation(function(){var n,i;try{for(var a=Zd(r.getChildren()),l=a.next();!l.done;l=a.next()){var o=l.value;o.finalizeCreation()}}catch(u){n={error:u}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}r.fireInternalHook(Ta.afterCreationFinalization)})}}),Object.defineProperty(t.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw new Zt("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(t.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;this._applyPatches=cp(this.storedValue,"@APPLY_PATCHES",function(n){n.forEach(function(i){if(!i.path){r.type.applySnapshot(r,i.value);return}var a=k8(i.path),l=w8(r,a.slice(0,-1));l.applyPatchLocally(a[a.length-1],i)})}),this._applySnapshot=cp(this.storedValue,"@APPLY_SNAPSHOT",function(n){if(n!==r.snapshot)return r.type.applySnapshot(r,n)}),Tf(this.storedValue,"$treenode",this),Tf(this.storedValue,"toJSON",bP)}}),Object.defineProperty(t.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===ho.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(t.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._observableInstanceState!==Il.UNINITIALIZED&&(this.getChildren().forEach(function(r){r.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit(Bs.Dispose),this._internalEventsClear(Bs.Dispose))}}),Object.defineProperty(t.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach(function(n){n.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var r=this.snapshot;this._snapshotUponDeath=r,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(t.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._addSnapshotReaction(),this._internalEventsRegister(Bs.Snapshot,r)}}),Object.defineProperty(t.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this._internalEventsEmit(Bs.Snapshot,r)}}),Object.defineProperty(t.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._internalEventsRegister(Bs.Patch,r)}}),Object.defineProperty(t.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this._internalEventsHasSubscribers(Bs.Patch)){var i=n.path.substr(this.path.length)+(r.path?"/"+r.path:""),a=PP({},r,{path:i}),l=rf(TP(a),2),o=l[0],u=l[1];this._internalEventsEmit(Bs.Patch,o,u)}this.parent&&this.parent.emitPatch(r,n)}}),Object.defineProperty(t.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._internalEventsHas(Bs.Dispose,r)}}),Object.defineProperty(t.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!this.hasDisposer(r)){this._internalEventsRegister(Bs.Dispose,r,!0);return}throw new Zt("cannot add a disposer when it is already registered for execution")}}),Object.defineProperty(t.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!this._internalEventsHas(Bs.Dispose,r))throw new Zt("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister(Bs.Dispose,r)}}),Object.defineProperty(t.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(this.middlewares){var n=this.middlewares.indexOf(r);n>=0&&this.middlewares.splice(n,1)}}}),Object.defineProperty(t.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;n===void 0&&(n=!0);var a={handler:r,includeHooks:n};return this.middlewares?this.middlewares.push(a):this.middlewares=[a],function(){i.removeMiddleware(a)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){this.assertWritable({subpath:r}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,r,n)}}),Object.defineProperty(t.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;if(!this._hasSnapshotReaction){var n=w6(function(){return r.snapshot},function(i){return r.emitSnapshot(i)},rP);this.addDisposer(n),this._hasSnapshotReaction=!0}}}),Object.defineProperty(t.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return!!this._internalEvents&&this._internalEvents.hasSubscribers(r)}}),Object.defineProperty(t.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){return i===void 0&&(i=!1),this._internalEvents||(this._internalEvents=new P8),this._internalEvents.register(r,n,i)}}),Object.defineProperty(t.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return!!this._internalEvents&&this._internalEvents.has(r,n)}}),Object.defineProperty(t.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){this._internalEvents&&this._internalEvents.unregister(r,n)}}),Object.defineProperty(t.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(r){for(var n,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];this._internalEvents&&(n=this._internalEvents).emit.apply(n,Bf([r],rf(i),!1))}}),Object.defineProperty(t.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this._internalEvents&&this._internalEvents.clear(r)}}),Object.defineProperty(t.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),t}(g8);xs.prototype.createObservableInstance=Wr(xs.prototype.createObservableInstance);xs.prototype.detach=Wr(xs.prototype.detach);xs.prototype.die=Wr(xs.prototype.die);var v8,Qr;(function(e){e[e.String=1]="String",e[e.Number=2]="Number",e[e.Boolean=4]="Boolean",e[e.Date=8]="Date",e[e.Literal=16]="Literal",e[e.Array=32]="Array",e[e.Map=64]="Map",e[e.Object=128]="Object",e[e.Frozen=256]="Frozen",e[e.Optional=512]="Optional",e[e.Reference=1024]="Reference",e[e.Identifier=2048]="Identifier",e[e.Late=4096]="Late",e[e.Refinement=8192]="Refinement",e[e.Union=16384]="Union",e[e.Null=32768]="Null",e[e.Undefined=65536]="Undefined",e[e.Integer=131072]="Integer",e[e.Custom=262144]="Custom",e[e.SnapshotProcessor=524288]="SnapshotProcessor",e[e.Lazy=1048576]="Lazy",e[e.Finite=2097152]="Finite",e[e.Float=4194304]="Float"})(Qr||(Qr={}));var m8="cannotDetermine",nP=Symbol("$type"),oc=function(){function e(t){Object.defineProperty(this,v8,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"C",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"S",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"N",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isType",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=t}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return ac(this,t),this.instantiate(null,"",r,t).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){throw new Zt("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=b8(t);if(n){var i=d8(t);return this.isAssignableFrom(i)?Ss():Es(r,t)}return this.isValidSnapshot(t,r)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.validate(t,[{path:"",type:this}]).length===0}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw new Zt("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"TypeWithoutSTN",{get:function(){throw new Zt("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SnapshotType",{get:function(){throw new Zt("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CreationType",{get:function(){throw new Zt("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),e}();v8=nP;oc.prototype.create=Wr(oc.prototype.create);var Mh=function(e){Kn(t,e);function t(r){var n=e.call(this,r)||this;return Object.defineProperty(n,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return Object.defineProperty(t.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return r===void 0&&(r=this.getDefaultSnapshot()),e.prototype.create.call(this,r,n)}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.createObservableInstanceIfNeeded(),r.storedValue}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return!r.identifierAttribute||r.identifier===Ep(n[r.identifierAttribute])}}),Object.defineProperty(t.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return r.isDetaching?!1:r.snapshot===n||ki(n)&&Tr(n)===r?!0:r.type===this&&E8(n)&&!ki(n)&&this.isMatchingSnapshotId(r,n)?(r.applySnapshot(n),!0):!1}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var l=this.tryToReconcileNode(r,n);if(l)return r.setParent(i,a),r;if(r.die(),ki(n)&&this.isAssignableFrom(d8(n))){var o=Tr(n);return o.setParent(i,a),o}return this.instantiate(i,a,void 0,n)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(oc);Mh.prototype.create=Wr(Mh.prototype.create);var Gf=function(e){Kn(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){if(!r.isDetaching&&r.type===this&&r.storedValue===n)return r;var l=this.instantiate(i,a,void 0,n);return r.die(),l}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(oc);function sc(e){return typeof e=="object"&&e&&e.isType===!0}var iP=1,Qd;function aP(){return Qd}function oP(){return iP++}function sP(e,t){var r=Tr(e.context);e.type==="action"&&r.assertAlive({actionContext:e});var n=r._isRunningAction;r._isRunningAction=!0;var i=Qd;Qd=e;try{return cP(r,e,t)}finally{Qd=i,r._isRunningAction=n}}function lP(e){if(e)return e.type==="action"?e:e.parentActionEvent}function cp(e,t,r){var n=function(){var i=oP(),a=Qd,l=lP(a);return sP({type:"action",name:t,id:i,args:CP(arguments),context:e,tree:ZA(e),rootId:a?a.rootId:i,parentId:a?a.id:0,allParentIds:a?Bf(Bf([],rf(a.allParentIds),!1),[a.id],!1):[],parentEvent:a,parentActionEvent:l},r)};return n._isMSTAction=!0,n._isFlowAction=r._isFlowAction,n}var uP=function(){function e(t,r){Object.defineProperty(this,"arrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"inArrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:[]}),r.$mst_middleware&&this.middlewares.push(r.$mst_middleware);for(var n=t;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getNextMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.middlewares[this.arrayIndex];if(t){var r=t[this.inArrayIndex++];return r||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function cP(e,t,r){var n=new uP(e,r);if(n.isEmpty)return Wr(r).apply(null,t.args);var i=null;function a(l){var o=n.getNextMiddleware(),u=o&&o.handler;if(!u)return Wr(r).apply(null,l.args);if(!o.includeHooks&&Ta[l.name])return a(l);function d(v,g){i=a(v),g&&(i=g(i))}function f(v){i=v}return u(l,d,f),i}return a(t)}function fP(e){try{return JSON.stringify(e)}catch(t){return"<Unserializable: ".concat(t,">")}}function y8(e){return typeof e=="function"?"<function".concat(e.name?" "+e.name:"",">"):ki(e)?"<".concat(e,">"):"`".concat(fP(e),"`")}function hP(e){return e.length<280?e:"".concat(e.substring(0,272),"......").concat(e.substring(e.length-8))}function dP(e){var t=e.value,r=e.context[e.context.length-1].type,n=e.context.map(function(o){var u=o.path;return u}).filter(function(o){return o.length>0}).join("/"),i=n.length>0?'at path "/'.concat(n,'" '):"",a=ki(t)?"value of type ".concat(Tr(t).type.name,":"):fp(t)?"value":"snapshot",l=r&&ki(t)&&r.is(Tr(t).snapshot);return"".concat(i).concat(a," ").concat(y8(t)," is not assignable ").concat(r?"to type: `".concat(r.name,"`"):"")+(e.message?" (".concat(e.message,")"):"")+(r?QP(r)||fp(t)?".":", expected an instance of `".concat(r.name,"` or a snapshot like `").concat(r.describe(),"` instead.")+(l?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function _m(e,t,r){return e.concat([{path:t,type:r}])}function Ss(){return Ih}function Es(e,t,r){return[{context:e,value:t,message:r}]}function m0(e){return e.reduce(function(t,r){return t.concat(r)},[])}function ac(e,t){LP()&&pP(e,t)}function pP(e,t){var r=e.validate(t,[{path:"",type:e}]);if(r.length>0)throw new Zt(gP(e,t,r))}function gP(e,t,r){if(r.length!==0)return"Error while converting ".concat(hP(y8(t))," to `").concat(e.name,`\`:
|
|
85
85
|
|
|
86
86
|
`)+r.map(dP).join(`
|
|
@@ -89,15 +89,15 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
89
89
|
color: ${a.color};
|
|
90
90
|
opacity: 0.6;
|
|
91
91
|
}
|
|
92
|
-
`,y=Ok();y.innerHTML="",y.appendChild(document.createTextNode(c)),JSON.stringify(g)!==JSON.stringify(a)&&l(g)});const u=ce.useRef(null);ce.useLayoutEffect(()=>{var g;const c=u.current;if(!c)return;(g=u.current)===null||g===void 0||g.focus();const y=i||c.value.length;c.selectionStart=c.selectionEnd=y,n&&(c?.select(),document.execCommand("selectAll",!1,null))},[]),ce.useEffect(()=>{window.addEventListener("blur",r);const g=c=>{var y;!((y=u.current)===null||y===void 0)&&y.contains(c.target)||r()};return window.addEventListener("touchstart",g),()=>{window.removeEventListener("blur",r),window.removeEventListener("touchstart",g)}},[]);let d=0;const f=o.textArr.length*o.lineHeight()*o.fontSize();t.verticalAlign==="middle"&&(d=(t.a.height-f)/2),t.verticalAlign==="bottom"&&(d=t.a.height-f);const v=Pu(t.text);return ce.createElement("textarea",{className:"polotno-input",ref:u,dir:w0(v),style:Object.assign(Object.assign(Object.assign({},Nb),a),{paddingTop:d+"px"}),value:v,onChange:g=>{const c=q8({oldText:t.text,newText:g.target.value,element:t});t.set({text:g.target.value,fontSize:c})},placeholder:t.placeholder,onBlur:r})}),Tk=e=>ce.createElement($1,null,ce.createElement(Lk,Object.assign({},e))),H8=(e,t)=>{const[r,n]=ce.useReducer(l=>l+1,0),i=ce.useRef(vb(t)),a=ce.useRef(null);return ce.useLayoutEffect(()=>{if(i.current=vb(t),i.current)return;let l=!0;return(async()=>{i.current=!1,n();const o=Rh(`text ${t}`);await e.loadFont(t),l?(a.current=o,i.current=!0,n()):o()})(),()=>{a.current&&(a.current(),a.current=null),l=!1}},[t]),ce.useEffect(()=>{i.current&&setTimeout(()=>{a.current&&(a.current(),a.current=null)})},[i.current]),[i.current]},V8=({fontLoaded:e,fontFamily:t,fontSize:r,lineHeight:n})=>ce.useMemo(()=>{if(typeof n=="number")return n;const i=document.createElement("div");i.style.fontFamily=t,i.style.fontSize=r+"px",i.style.lineHeight=n,i.innerText="Test text",document.body.appendChild(i);const a=i.offsetHeight;return document.body.removeChild(i),a/r},[e,t,r,n]);function G8(e){const t=ce.useRef(e),r=ce.useRef(e);return ce.useMemo(()=>{r.current=t.current,t.current=e},[e]),r.current}const Rk=Yn(({element:e,store:t})=>{const r=ce.useRef(null),n=ce.useRef(null),{editorEnabled:i,selectAll:a}=(C=>{const[q,G]=ce.useState(!1),J=ce.useRef(!1);return ce.useEffect(()=>{var ae=!0;return setTimeout(()=>{ae&&(C._editModeEnabled&&(J.current=!0),G(!0),setTimeout(()=>{J.current=!1},50))},50),()=>{ae=!1}},[]),{editorEnabled:q&&C._editModeEnabled,selectAll:J.current}})(e),[l,o]=ce.useState(!1),u=ce.useRef(e.a.height),d=t.selectedShapes.indexOf(e)>=0&&e.selectable,{textVerticalResizeEnabled:f}=
|
|
93
|
-
`).join(" ").split(/[\s-]+/).reduce((ue,le)=>/[\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF\uAC00-\uD7AF]/.test(le)?ue.concat(le.split("")):ue.concat(le),[]),Q=ae.textArr.map(ue=>ue.text).join(";");const se=W.find(ue=>!Q.includes(ue)||(Q=Q.replace(ue,""),!1));if(!(re||se&&!V))break;j-=.5,ae.fontSize(j)}return ae.fontSize(Y),ae.height(U),j}(r.current,e,q);if(G!==e.a.fontSize)return void t.history.ignore(()=>{e.set({fontSize:G})},!1,!0);const J=E();e.a.height===J||f||t.history.ignore(()=>{e.set({height:J})},!1,!0)}}),ce.useLayoutEffect(()=>{const C=r.current;C&&(C.width(C.width()+1e-8),C.width(C.width()-1e-8),C._setTextData(),_s(C,e))},[y]);const S=ce.useRef(null),b=ce.useRef(0),w=C=>{C.evt.preventDefault(),t.selectedShapes.find(G=>G===e)&&e.contentEditable&&(b.current=function(G){var J;const ae=G.target,H=function(z){var Z=z.getAbsoluteTransform().copy();Z.invert();var re=z.getStage().getPointerPosition();return Z.point(re)}(ae),V=ae.textArr,Y=Math.floor(H.y/(ae.fontSize()*ae.lineHeight())),U=V.slice(0,Y).reduce((z,Z)=>z+Z.text.length,Y),D=(J=V[Y])!==null&&J!==void 0?J:V[0];let j=0;return ae.align()==="right"?j=ae.width()-D.width:ae.align()==="center"&&(j=ae.width()/2-D.width/2),U+Math.round((H.x-j)/D.width*D.text.length)}(C),e.toggleEditMode())},_=!x&&e.placeholder?.6:e.a.opacity;xp(r,_);const A=V8({fontLoaded:y,fontFamily:e.fontFamily,fontSize:e.a.fontSize,lineHeight:e.lineHeight}),M=e.selectable||t.role==="admin",O=tf(e),L=ce.useMemo(()=>e.backgroundEnabled?function({lines:C,lineHeight:q,width:G,align:J="left",padding:ae=0,cornerRadius:H=0}){var V;C.forEach((j,z)=>{j.cx=G/2,J==="right"?j.cx=G-j.width/2:J==="left"&&(j.cx=j.width/2),J!=="justify"||j.lastInParagraph||(j.width=G),J==="justify"&&(j.cx=j.width/2)});let Y=`M ${(V=C[0])===null||V===void 0?void 0:V.cx} ${-ae}`;C.forEach((j,z)=>{const{cx:Z}=j,re=C[z-1];re&&re.width>j.width?Y+=` L ${Z+j.width/2+ae} ${z*q+ae}`:Y+=` L ${Z+j.width/2+ae} ${z*q-ae}`;const W=C[z+1];W&&W.width>j.width?Y+=` L ${Z+j.width/2+ae} ${(z+1)*q-ae}`:Y+=` L ${Z+j.width/2+ae} ${(z+1)*q+ae}`});for(var U=C.length-1;U>=0;U--){const j=C[U],{cx:z}=j,Z=C[U+1];Z&&Z.width>j.width?Y+=` L ${z-j.width/2-ae} ${(U+1)*q-ae}`:Y+=` L ${z-j.width/2-ae} ${(U+1)*q+ae}`;const re=C[U-1];re&&re.width>j.width?Y+=` L ${z-j.width/2-ae} ${U*q+ae}`:Y+=` L ${z-j.width/2-ae} ${U*q-ae}`}Y+=" Z";const D=AA(Y);return PA(D,H).path}({lines:JSON.parse(JSON.stringify(g)),cornerRadius:e.backgroundCornerRadius*(e.a.fontSize*A*.5),lineHeight:A*e.a.fontSize,padding:e.backgroundPadding*(e.a.fontSize*A*.5),width:e.a.width,align:e.align}):"",[e.backgroundEnabled,e.backgroundCornerRadius,e.a.fontSize,A,e.backgroundPadding,e.a.width,e.align,g]),R=lf();let T=0;e.verticalAlign==="middle"?T=(e.a.height-g.length*A*e.a.fontSize)/2:e.verticalAlign==="bottom"&&(T=e.a.height-g.length*A*e.a.fontSize);const k=y?e.fontFamily:v===e.fontFamily?"Arial":e.fontFamily;return ce.createElement(ce.Fragment,null,ce.createElement(Tv,{ref:n,x:e.a.x,y:e.a.y,rotation:e.a.rotation,hideInExport:!e.showInExport,listening:!1,visible:e.backgroundEnabled,opacity:e.backgroundOpacity*_,data:L,fill:e.backgroundColor,offsetY:-T}),ce.createElement(Au,Object.assign({ref:r,id:e.id,name:"element",hideInExport:!e.showInExport,editModeEnabled:e._editModeEnabled,x:e.a.x,y:e.a.y,rotation:e.a.rotation,width:e.a.width,height:e.a.height,text:x||e.placeholder,direction:w0(x)},O,{stroke:e.stroke,lineJoin:"round",strokeWidth:e.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:e.a.fontSize,fontFamily:k,fontStyle:e.fontStyle+" "+e.fontWeight,textDecoration:e.textDecoration,align:e.align,verticalAlign:e.verticalAlign,draggable:R?e.draggable&&d:e.draggable,preventDefault:!R||d,opacity:_,visible:!e._editModeEnabled,ellipsis:
|
|
92
|
+
`,y=Ok();y.innerHTML="",y.appendChild(document.createTextNode(c)),JSON.stringify(g)!==JSON.stringify(a)&&l(g)});const u=ce.useRef(null);ce.useLayoutEffect(()=>{var g;const c=u.current;if(!c)return;(g=u.current)===null||g===void 0||g.focus();const y=i||c.value.length;c.selectionStart=c.selectionEnd=y,n&&(c?.select(),document.execCommand("selectAll",!1,null))},[]),ce.useEffect(()=>{window.addEventListener("blur",r);const g=c=>{var y;!((y=u.current)===null||y===void 0)&&y.contains(c.target)||r()};return window.addEventListener("touchstart",g),()=>{window.removeEventListener("blur",r),window.removeEventListener("touchstart",g)}},[]);let d=0;const f=o.textArr.length*o.lineHeight()*o.fontSize();t.verticalAlign==="middle"&&(d=(t.a.height-f)/2),t.verticalAlign==="bottom"&&(d=t.a.height-f);const v=Pu(t.text);return ce.createElement("textarea",{className:"polotno-input",ref:u,dir:w0(v),style:Object.assign(Object.assign(Object.assign({},Nb),a),{paddingTop:d+"px"}),value:v,onChange:g=>{const c=q8({oldText:t.text,newText:g.target.value,element:t});t.set({text:g.target.value,fontSize:c})},placeholder:t.placeholder,onBlur:r})}),Tk=e=>ce.createElement($1,null,ce.createElement(Lk,Object.assign({},e))),H8=(e,t)=>{const[r,n]=ce.useReducer(l=>l+1,0),i=ce.useRef(vb(t)),a=ce.useRef(null);return ce.useLayoutEffect(()=>{if(i.current=vb(t),i.current)return;let l=!0;return(async()=>{i.current=!1,n();const o=Rh(`text ${t}`);await e.loadFont(t),l?(a.current=o,i.current=!0,n()):o()})(),()=>{a.current&&(a.current(),a.current=null),l=!1}},[t]),ce.useEffect(()=>{i.current&&setTimeout(()=>{a.current&&(a.current(),a.current=null)})},[i.current]),[i.current]},V8=({fontLoaded:e,fontFamily:t,fontSize:r,lineHeight:n})=>ce.useMemo(()=>{if(typeof n=="number")return n;const i=document.createElement("div");i.style.fontFamily=t,i.style.fontSize=r+"px",i.style.lineHeight=n,i.innerText="Test text",document.body.appendChild(i);const a=i.offsetHeight;return document.body.removeChild(i),a/r},[e,t,r,n]);function G8(e){const t=ce.useRef(e),r=ce.useRef(e);return ce.useMemo(()=>{r.current=t.current,t.current=e},[e]),r.current}const Rk=Yn(({element:e,store:t})=>{const r=ce.useRef(null),n=ce.useRef(null),{editorEnabled:i,selectAll:a}=(C=>{const[q,G]=ce.useState(!1),J=ce.useRef(!1);return ce.useEffect(()=>{var ae=!0;return setTimeout(()=>{ae&&(C._editModeEnabled&&(J.current=!0),G(!0),setTimeout(()=>{J.current=!1},50))},50),()=>{ae=!1}},[]),{editorEnabled:q&&C._editModeEnabled,selectAll:J.current}})(e),[l,o]=ce.useState(!1),u=ce.useRef(e.a.height),d=t.selectedShapes.indexOf(e)>=0&&e.selectable,{textVerticalResizeEnabled:f}=gi,v=G8(e.fontFamily),[g,c]=ce.useState([]);ce.useEffect(()=>{var C,q;const G=(q=(C=r.current)===null||C===void 0?void 0:C.textArr)!==null&&q!==void 0?q:[];JSON.stringify(G)!==JSON.stringify(g)&&c(G)}),ce.useEffect(()=>{if(e.a.width)return;const C=r.current;C.width(600),e.set({width:1.4*C.getTextWidth()})},[]),ce.useEffect(()=>{d||e.text!==""||!e.removable||e.placeholder||t.deleteElements([e.id])},[d]),ce.useLayoutEffect(()=>Ou(()=>{const C=r.current;_s(C,e)}));const[y]=H8(t,e.fontFamily);let x=Pu(e.text);e.textTransform==="uppercase"&&(x=x.toUpperCase());const E=()=>{const C=r.current.clone({height:void 0}),q=Math.ceil(C.fontSize()*C.lineHeight()*C.textArr.length+1);return C.destroy(),q};ce.useLayoutEffect(()=>{if(!y)return;const{textOverflow:C,textSplitAllowed:q}=gi;if(!e.a.height){const G=E();return void t.history.ignore(()=>{e.set({height:G})})}if(!t.isPlaying)if(C!=="change-font-size"||l){if(C==="resize"){const G=E();f&&e.a.height<G&&t.history.ignore(()=>{var J;_b(e)&&e.set({height:G}),(J=r.current)===null||J===void 0||J.height(G)},!1,!0),f||e.a.height===G||l||t.history.ignore(()=>{var J;_b(e)&&e.set({height:G}),(J=r.current)===null||J===void 0||J.height(G)},!1,!0)}}else{const G=function(ae,H,V=!1){const Y=ae.fontSize(),U=ae.height(),D=Pu(H.text);let j=H.a.fontSize;ae.height(void 0);const z=Math.round(2*H.a.fontSize)-1;for(let Z=1;Z<z;Z++){const re=H.a.height&&ae.height()>H.a.height;let W=D.split(`
|
|
93
|
+
`).join(" ").split(/[\s-]+/).reduce((ue,le)=>/[\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF\uAC00-\uD7AF]/.test(le)?ue.concat(le.split("")):ue.concat(le),[]),Q=ae.textArr.map(ue=>ue.text).join(";");const se=W.find(ue=>!Q.includes(ue)||(Q=Q.replace(ue,""),!1));if(!(re||se&&!V))break;j-=.5,ae.fontSize(j)}return ae.fontSize(Y),ae.height(U),j}(r.current,e,q);if(G!==e.a.fontSize)return void t.history.ignore(()=>{e.set({fontSize:G})},!1,!0);const J=E();e.a.height===J||f||t.history.ignore(()=>{e.set({height:J})},!1,!0)}}),ce.useLayoutEffect(()=>{const C=r.current;C&&(C.width(C.width()+1e-8),C.width(C.width()-1e-8),C._setTextData(),_s(C,e))},[y]);const S=ce.useRef(null),b=ce.useRef(0),w=C=>{C.evt.preventDefault(),t.selectedShapes.find(G=>G===e)&&e.contentEditable&&(b.current=function(G){var J;const ae=G.target,H=function(z){var Z=z.getAbsoluteTransform().copy();Z.invert();var re=z.getStage().getPointerPosition();return Z.point(re)}(ae),V=ae.textArr,Y=Math.floor(H.y/(ae.fontSize()*ae.lineHeight())),U=V.slice(0,Y).reduce((z,Z)=>z+Z.text.length,Y),D=(J=V[Y])!==null&&J!==void 0?J:V[0];let j=0;return ae.align()==="right"?j=ae.width()-D.width:ae.align()==="center"&&(j=ae.width()/2-D.width/2),U+Math.round((H.x-j)/D.width*D.text.length)}(C),e.toggleEditMode())},_=!x&&e.placeholder?.6:e.a.opacity;xp(r,_);const A=V8({fontLoaded:y,fontFamily:e.fontFamily,fontSize:e.a.fontSize,lineHeight:e.lineHeight}),M=e.selectable||t.role==="admin",O=tf(e),L=ce.useMemo(()=>e.backgroundEnabled?function({lines:C,lineHeight:q,width:G,align:J="left",padding:ae=0,cornerRadius:H=0}){var V;C.forEach((j,z)=>{j.cx=G/2,J==="right"?j.cx=G-j.width/2:J==="left"&&(j.cx=j.width/2),J!=="justify"||j.lastInParagraph||(j.width=G),J==="justify"&&(j.cx=j.width/2)});let Y=`M ${(V=C[0])===null||V===void 0?void 0:V.cx} ${-ae}`;C.forEach((j,z)=>{const{cx:Z}=j,re=C[z-1];re&&re.width>j.width?Y+=` L ${Z+j.width/2+ae} ${z*q+ae}`:Y+=` L ${Z+j.width/2+ae} ${z*q-ae}`;const W=C[z+1];W&&W.width>j.width?Y+=` L ${Z+j.width/2+ae} ${(z+1)*q-ae}`:Y+=` L ${Z+j.width/2+ae} ${(z+1)*q+ae}`});for(var U=C.length-1;U>=0;U--){const j=C[U],{cx:z}=j,Z=C[U+1];Z&&Z.width>j.width?Y+=` L ${z-j.width/2-ae} ${(U+1)*q-ae}`:Y+=` L ${z-j.width/2-ae} ${(U+1)*q+ae}`;const re=C[U-1];re&&re.width>j.width?Y+=` L ${z-j.width/2-ae} ${U*q+ae}`:Y+=` L ${z-j.width/2-ae} ${U*q-ae}`}Y+=" Z";const D=AA(Y);return PA(D,H).path}({lines:JSON.parse(JSON.stringify(g)),cornerRadius:e.backgroundCornerRadius*(e.a.fontSize*A*.5),lineHeight:A*e.a.fontSize,padding:e.backgroundPadding*(e.a.fontSize*A*.5),width:e.a.width,align:e.align}):"",[e.backgroundEnabled,e.backgroundCornerRadius,e.a.fontSize,A,e.backgroundPadding,e.a.width,e.align,g]),R=lf();let T=0;e.verticalAlign==="middle"?T=(e.a.height-g.length*A*e.a.fontSize)/2:e.verticalAlign==="bottom"&&(T=e.a.height-g.length*A*e.a.fontSize);const k=y?e.fontFamily:v===e.fontFamily?"Arial":e.fontFamily;return ce.createElement(ce.Fragment,null,ce.createElement(Tv,{ref:n,x:e.a.x,y:e.a.y,rotation:e.a.rotation,hideInExport:!e.showInExport,listening:!1,visible:e.backgroundEnabled,opacity:e.backgroundOpacity*_,data:L,fill:e.backgroundColor,offsetY:-T}),ce.createElement(Au,Object.assign({ref:r,id:e.id,name:"element",hideInExport:!e.showInExport,editModeEnabled:e._editModeEnabled,x:e.a.x,y:e.a.y,rotation:e.a.rotation,width:e.a.width,height:e.a.height,text:x||e.placeholder,direction:w0(x)},O,{stroke:e.stroke,lineJoin:"round",strokeWidth:e.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:e.a.fontSize,fontFamily:k,fontStyle:e.fontStyle+" "+e.fontWeight,textDecoration:e.textDecoration,align:e.align,verticalAlign:e.verticalAlign,draggable:R?e.draggable&&d:e.draggable,preventDefault:!R||d,opacity:_,visible:!e._editModeEnabled,ellipsis:gi.textOverflow==="ellipsis",shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,lineHeight:A,letterSpacing:e.letterSpacing*e.a.fontSize,listening:M,onDragMove:C=>{e.set({x:C.target.x(),y:C.target.y()})},onDragEnd:C=>{e.set({x:C.target.x(),y:C.target.y()})},onClick:w,onTap:w,onTransformStart:()=>{o(!0),u.current=r.current.height()},onTransform:C=>{var q,G,J;const ae=C.target;(q=n.current)===null||q===void 0||q.setAttrs({x:ae.x(),y:ae.y(),rotation:ae.rotation(),scale:ae.scale()});const H=((G=ae.getStage())===null||G===void 0?void 0:G.findOne("Transformer")).getActiveAnchor();if(H==="middle-left"||H==="middle-right"){const Y=ae.scaleX(),U=ae.width()*Y,D=e.a.fontSize;let j=U;U<D&&(j=D,S.current&&ae.position(S.current)),ae.width(j),ae.scaleX(1),ae.scaleY(1);const z=E();if(gi.textOverflow!=="ellipsis"){const re=Math.max(z,u.current);ae.height(re),e.set({height:ae.height()})}const Z=gi.textVerticalResizeEnabled?Math.max(z,u.current):E();e.set({x:ae.x(),width:ae.width(),rotation:ae.rotation(),height:Z}),_s(ae,e)}if(H==="top-center"||H==="bottom-center"){let Y=gi.textOverflow==="resize"?E():A*e.a.fontSize;C.target.height(Math.max(Y,C.target.height()*C.target.scaleY())),C.target.scaleY(1)}S.current=C.target.position();const V=C.target.scaleX();(J=n.current)===null||J===void 0||J.setAttrs({scaleX:1,scaleY:1}),C.target.scaleX(1),C.target.scaleY(1),e.set({fontSize:e.a.fontSize*V,width:C.target.width()*V,x:C.target.x(),y:C.target.y(),rotation:C.target.rotation(),height:C.target.height()*V,shadowBlur:e.shadowBlur*V,shadowOffsetX:e.shadowOffsetX*V,shadowOffsetY:e.shadowOffsetY*V,strokeWidth:e.strokeWidth*V})},onTransformEnd:C=>{var q;const G=C.target.scaleX();C.target.scaleX(1),C.target.scaleY(1),e.set({fontSize:Math.round(e.a.fontSize*G),width:Math.ceil(C.target.width()*G),x:C.target.x(),y:C.target.y(),rotation:C.target.rotation(),height:C.target.height()*G,shadowBlur:e.shadowBlur*G,shadowOffsetX:e.shadowOffsetX*G,shadowOffsetY:e.shadowOffsetY*G,strokeWidth:e.strokeWidth*G}),(q=n.current)===null||q===void 0||q.setAttrs({scaleX:1,scaleY:1}),o(!1)}})),i&&ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation},ce.createElement(Tk,{textNodeRef:r,element:e,selectAll:a,cursorPosition:b.current,onBlur:()=>{e.toggleEditMode(!1)}})))});var Rg={exports:{}},Mg={exports:{}},Lb;function Em(){return Lb||(Lb=1,function(e,t){e.exports=r;function r(i){return n.bind(null,i)}function n(i){var a=[].slice.call(arguments,1);a.unshift("["+i+"]"),process.stderr.write(a.join(" ")+`
|
|
94
94
|
`)}}(Mg)),Mg.exports}var Tb;function $8(){return Tb||(Tb=1,function(e,t){Em()("lex"),e.exports=r;function r(n){var i="",a,l=0,o=-1,u=0,d=1,f="before-selector",v=[f],g={},c=[],y=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function x(){return L(),n[o]}function E(H){return H?v[v.length-1-H]:f}function S(H){var V=o+1;return H===n.slice(V,V+H.length)}function b(H){var V=n.slice(o).indexOf(H);return V>0?V:!1}function w(H){return H===_(1)}function _(H){return n[o+(H||1)]}function A(){var H=v.pop();return f=v[v.length-1],H}function M(H){return f=H,v.push(f),v.length}function O(H){var V=f;return v[v.length-1]=f=H,V}function L(H){if((H||1)==1)n[o]==`
|
|
95
95
|
`?(d++,l=1):l++,o++;else{var V=n.slice(o,o+H).split(`
|
|
96
96
|
`);V.length>1&&(d+=V.length-1,l=1),l+=V[V.length-1].length,o=o+H}}function R(){g.end={line:d,col:l},c.push(g),i="",g={}}function T(H){g={type:H,start:{line:d,col:l}}}for(;a=x();)switch(a){case" ":switch(E()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":i+=a;break}break;case`
|
|
97
97
|
`:case" ":case"\r":case"\f":switch(E()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":i+=a;break;case"at-value":a===`
|
|
98
98
|
`&&(g.value=i.trim(),R(),A());break}break;case":":switch(E()){case"name":g.name=i.trim(),i="",O("before-value");break;case"before-selector":i+=a,T("selector"),M("selector");break;case"before-value":O("value"),i+=a;break;default:i+=a;break}break;case";":switch(E()){case"name":case"before-value":case"value":i.trim().length>0&&(g.value=i.trim(),R()),O("before-name");break;case"value-paren":i+=a;break;case"at-value":g.value=i.trim(),R(),A();break;case"before-name":break;default:i+=a;break}break;case"{":switch(E()){case"selector":if(_(-1)==="\\"){i+=a;break}g.text=i.trim(),R(),O("before-name"),u=u+1;break;case"at-group":switch(g.name=i.trim(),g.type){case"font-face":case"viewport":case"page":M("before-name");break;default:M("before-selector")}R(),u=u+1;break;case"name":case"at-rule":g.name=i.trim(),R(),M("before-name"),u=u+1;break;case"comment":case"double-string":case"single-string":i+=a;break;case"before-value":O("value"),i+=a;break}break;case"}":switch(E()){case"before-name":case"name":case"before-value":case"value":i&&(g.value=i.trim()),g.name&&g.value&&R(),T("end"),R(),A(),E()==="at-group"&&(T("at-group-end"),R(),A()),u>0&&(u=u-1);break;case"at-group":case"before-selector":case"selector":if(_(-1)==="\\"){i+=a;break}u>0&&E(1)==="at-group"&&(T("at-group-end"),R()),u>1&&A(),u>0&&(u=u-1);break;case"double-string":case"single-string":case"comment":i+=a;break}break;case'"':case"'":switch(E()){case"double-string":a==='"'&&_(-1)!=="\\"&&A();break;case"single-string":a==="'"&&_(-1)!=="\\"&&A();break;case"before-at-value":O("at-value"),M(a==='"'?"double-string":"single-string");break;case"before-value":O("value"),M(a==='"'?"double-string":"single-string");break;case"comment":break;default:_(-1)!=="\\"&&M(a==='"'?"double-string":"single-string")}i+=a;break;case"/":switch(E()){case"comment":case"double-string":case"single-string":i+=a;break;case"before-value":case"selector":case"name":case"value":if(w("*")){var k=b("*/");k&&L(k+1)}else E()=="before-value"&&O("value"),i+=a;break;default:w("*")?(T("comment"),M("comment"),L()):i+=a;break}break;case"*":switch(E()){case"comment":w("/")?(g.text=i,L(),R(),A()):i+=a;break;case"before-selector":i+=a,T("selector"),M("selector");break;case"before-value":O("value"),i+=a;break;default:i+=a}break;case"@":switch(E()){case"comment":case"double-string":case"single-string":i+=a;break;case"before-value":O("value"),i+=a;break;default:for(var C=!1,q,G,J=0,ae=y.length;!C&&J<ae;++J)G=y[J],q=G.name||G,S(q)&&(C=!0,T(q),M(G.state||"at-group"),L(q.length),G.prefix&&(g.prefix=G.prefix),G.type&&(g.type=G.type));C||(i+=a);break}break;case"(":switch(E()){case"value":M("value-paren");break;case"before-value":O("value");break}i+=a;break;case")":switch(E()){case"value-paren":A();break;case"before-value":O("value");break}i+=a;break;default:switch(E()){case"before-selector":T("selector"),M("selector");break;case"before-name":T("property"),O("name");break;case"before-value":O("value");break;case"before-at-value":O("at-value");break}i+=a;break}return c}}(Rg)),Rg.exports}var Ig={exports:{}},Rb;function Mk(){return Rb||(Rb=1,function(e,t){Em()("parse");var r=$8();e.exports=o;var n,i,a,l;function o(A,M){M||(M={}),n=!!M.comments,a=!!M.position,i=0,l=Array.isArray(A)?A.slice():r(A);for(var O,L=[],R;R=d();)O=S(R),O&&L.push(O);return{type:"stylesheet",stylesheet:{rules:L}}}function u(A,M){M||(M={});for(var O,L=["type","name","value"],R={},T=0;T<L.length;++T)O=L[T],A[O]&&(R[O]=M[O]||A[O]);for(L=Object.keys(M),T=0;T<L.length;++T)O=L[T],R[O]||(R[O]=M[O]);return a&&(R.position={start:A.start,end:A.end}),R}function d(){var A=l.shift();return A}function f(A){i=i+1;var M={};switch(A.type){case"font-face":case"viewport":M.declarations=w();break;case"page":M.prefix=A.prefix,M.declarations=w();break;default:M.prefix=A.prefix,M.rules=_()}return u(A,M)}function v(A){return u(A)}function g(A){return u(A)}function c(A){return u(A,{text:A.text})}function y(A){return u(A)}function x(A){return u(A)}function E(A){function M(O){return O.trim()}return u(A,{type:"rule",selectors:A.text.split(",").map(M),declarations:w()})}function S(A){switch(A.type){case"property":return x(A);case"selector":return E(A);case"at-group-end":i=i-1;return;case"media":case"keyframes":return f(A);case"comment":if(n)return c(A);break;case"charset":return g(A);case"import":return v(A);case"namespace":return y(A);case"font-face":case"supports":case"viewport":case"document":case"page":return f(A)}}function b(A){for(var M,O=[],L;(L=d())&&A&&A(L);)M=S(L),M&&O.push(M);return L&&L.type!=="end"&&l.unshift(L),O}function w(){return b(function(A){return A.type==="property"||A.type==="comment"})}function _(){return b(function(){return i})}}(Ig)),Ig.exports}var Fg={exports:{}},Mb;function Ik(){return Mb||(Mb=1,function(e,t){Em()("stringify");var r,n,i,a,l,o;e.exports=u;function u(_,A){A||(A={}),i=A.indentation||"",n=!!A.compress,r=!!A.comments,a=1,n?l=o="":(l=`
|
|
99
99
|
`,o=" ");var M=y(_.stylesheet.rules,b).join(`
|
|
100
|
-
`).trim();return M}function d(_){if(_){a+=_;return}return n?"":Array(a).join(i||"")}function f(_){return"@"+_.type+" "+_.value+";"+l}function v(_){var A="",M=_.prefix||"";_.name&&(A=" "+_.name);var O=_.type!=="page";return"@"+M+_.type+A+o+x(_,O)+l}function g(_){return r?"/*"+(_.text||"")+"*/"+l:""}function c(_){var A;return _.selectors?A=_.selectors.join(","+l):(A="@"+_.type,A+=_.name?" "+_.name:""),d()+A+o+x(_)+l}function y(_,A){return _.reduce(function(M,O){var L=O.type==="comment"?g(O):A(O);return L&&M.push(L),M},[])}function x(_,A){var M=_.declarations,O=S;return _.rules&&(M=_.rules,O=c),M=E(M,O),M&&(M=l+M+(A?"":l)),"{"+M+d()+"}"}function E(_,A){if(!_)return"";d(1);var M=y(_,A);return d(-1),M.length?M.join(l):""}function S(_){if(_.type==="property")return w(_)}function b(_){switch(_.type){case"rule":return c(_);case"media":case"keyframes":return v(_);case"comment":return g(_);case"import":case"charset":case"namespace":return f(_);case"font-face":case"supports":case"viewport":case"document":case"page":return v(_)}}function w(_){var A=_.name?_.name+":"+o:"";return d()+A+_.value+";"}}(Fg)),Fg.exports}var jg,Ib;function Fk(){return Ib||(Ib=1,jg={lex:$8(),parse:Mk(),stringify:Ik()}),jg}var jk=Fk();const Dk=lc(jk);function Bk(e){for(;e.parentNode;){if(e.nodeName==="defs")return!0;e=e.parentNode}return!1}function zk(e){const t={};return e.querySelectorAll("style").forEach(r=>{const n=Dk.parse(r.textContent).stylesheet.rules;for(let i of n)i.selectors&&i.selectors.forEach(a=>{const l=t[a]||{};i.declarations.forEach(o=>{l[o.name]=o.value}),t[a]=l})}),t}function W8(e,t){var r;const n={fill:"",stroke:""},i=((r=e.getAttribute("class"))===null||r===void 0?void 0:r.split(" "))||[],a=e.getAttribute("id");let l={};if(a&&t[`#${a}`]?l=t[`#${a}`]:i.forEach(o=>{t[`.${o}`]&&(l=Object.assign(Object.assign({},l),t[`.${o}`]))}),t[e.nodeName]&&(l=Object.assign(Object.assign({},l),t[e.nodeName])),e.getAttribute("fill")&&e.getAttribute("fill")!=="none"?n.fill=e.getAttribute("fill"):l.fill&&l.fill!=="none"&&(n.fill=l.fill),e.getAttribute("stroke")&&e.getAttribute("stroke")!=="none"?n.stroke=e.getAttribute("stroke"):l.stroke&&l.stroke!=="none"&&(n.stroke=l.stroke),!n.fill&&e.style.fill&&e.style.fill!=="none"&&(n.fill=e.style.fill),!n.stroke&&e.style.stroke&&e.style.stroke!=="none"&&(n.stroke=e.style.stroke),!n.stroke&&!n.fill){const o=e.ownerSVGElement,u=o&&o!==e&&W8(o,t);u?.fill==="currentColor"||u?.stroke==="currentColor"||(n.fill="black")}return n}const Uk=["path","rect","circle","line","polygon","polyline","ellipse","text"];function qk(e){for(var t=[],r=e.getElementsByTagName("*"),n=0,i=r.length;n<i;n++){const a=r[n];Bk(a)||(a.getAttribute("fill")!==null&&t.push(a),(a.getAttribute("stroke")!==null||a.style&&a.style.fill||Uk.indexOf(a.nodeName)>=0)&&t.push(a))}return t}async function Hk(e){const t=await fetch(e);return $f(await t.text())}async function Ap(e){return await(await fetch(e,{mode:"cors"})).text()}function $f(e){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(e)))}function Am(e){var t=new DOMParser().parseFromString(e,"image/svg+xml");const r=t.documentElement.getAttribute("viewBox"),[n,i,a,l]=r?.split(" ")||[],o=t.documentElement.getAttribute("width");!o&&t.documentElement.setAttribute("width",a+"px");const u=t.documentElement.getAttribute("height");if((!u||u.indexOf("%")>=0)&&t.documentElement.setAttribute("height",l+"px"),o&&o.indexOf("%")>=0&&u&&u.indexOf("%")===-1){const d=parseFloat(u)/parseFloat(l);t.documentElement.setAttribute("width",d*parseFloat(a)+"px")}if(u&&u.indexOf("%")>=0&&o&&o.indexOf("%")===-1){const d=parseFloat(o)/parseFloat(a);t.documentElement.setAttribute("height",d*parseFloat(l)+"px")}return o==="100%"&&u==="100%"&&(t.documentElement.setAttribute("width",a+"px"),t.documentElement.setAttribute("height",l+"px")),new XMLSerializer().serializeToString(t)}const Vk=(e,t)=>{if(!e||!t)return!1;if(t==="currentColor"&&e==="black")return!0;const r=sr.Util.colorToRGBA(e),n=sr.Util.colorToRGBA(t);return r&&n?r.r===n.r&&r.g===n.g&&r.b===n.b&&r.a===n.a:void 0};function Pm(e,t){var r=new DOMParser().parseFromString(e,"image/svg+xml");const n=qk(r),i=Array.from(t.keys()),a=zk(r);return n.forEach(l=>{const{fill:o,stroke:u}=W8(l,a);[{prop:"fill",color:o},{prop:"stroke",color:u}].forEach(({prop:d,color:f})=>{const v=i.find(g=>Vk(g,f));if(v){const g=t.get(v);if(v0(g)){const{rotation:c,stops:y}=n8(g),x=y.map(S=>({offset:100*S.offset+"%","stop-color":S.color})),E="color"+Math.round(1e8*Math.random());(function(S,b,w,_){var A=S.namespaceURI,M=document.createElementNS(A,"linearGradient");const O=sr.Util.degToRad(w+90),L=(Math.cos(O)+1)/2,R=(Math.sin(O)+1)/2,T=(Math.cos(O+Math.PI)+1)/2,k=(Math.sin(O+Math.PI)+1)/2;M.setAttribute("x1",100*L+"%"),M.setAttribute("y1",100*R+"%"),M.setAttribute("x2",100*T+"%"),M.setAttribute("y2",100*k+"%"),M.setAttribute("gradientUnits","userSpaceOnUse"),M.setAttribute("id",b);for(var C=0;C<_.length;C++){var q=_[C],G=document.createElementNS(A,"stop");for(var J in q)q.hasOwnProperty(J)&&G.setAttribute(J,q[J]);M.appendChild(G)}(S.querySelector("defs")||S.insertBefore(document.createElementNS(A,"defs"),S.firstChild)).appendChild(M)})(r.children[0],E,c,x),l.style[d]=null,l.setAttribute(d,`url('#${E}')`)}else l.style[d]=t.get(v)}})}),$f(new XMLSerializer().serializeToString(r))}const km=(e,t,r)=>{let n=t,i=r,a=1;for(;n>0&&i>0;){e.width=n,e.height=i;const l=e.getContext("2d");if(!l)return;if(l.fillStyle="rgba(0,0,0,0.1)",l.fillRect(0,0,1,1),l.getImageData(0,0,1,1).data[3]!==0)return void l.clearRect(0,0,e.width,e.height);if(a*=.9,n=Math.floor(t*a),i=Math.floor(r*a),n=Math.max(n,1),i=Math.max(i,1),n<=1&&i<=1)return e.width=1,void(e.height=1)}},jv=(e,t=100,r=!1,n)=>{const i=ce.useRef(n??e),[,a]=ce.useReducer(u=>u+1,0),l=ce.useCallback(u=>{i.current!==u&&(i.current=u,a())},[i]),o=ce.useRef(null);return e===r&&(o.current&&(clearTimeout(o.current),o.current=null),i.current=r),ce.useEffect(()=>(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{l(e),o.current=null},t),()=>{o.current&&clearTimeout(o.current)}),[e,t,r]),[i.current,l]};function Nf(){return document.createElement("canvas")}const Y8=e=>e.indexOf("data:image/svg+xml")>=0||e.indexOf(".svg")>=0,Fb=e=>{const[t,r]=ce.useState(e);return ce.useEffect(()=>{(async()=>{const n=await async function(i){if(!Y8(i))return i;const a=await Ap(i),l=Am(a);return $f(l)}(e);n!==t&&r(n)})()},[e]),t};function jb(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}const Gk={boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2},$k={boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2},Db=(e,t,r)=>Math.max(t,Math.min(r,e)),Wk=(e,t,r,n,i=0,a=!1,l=!0)=>{const o=Math.floor(Db(e.a.width*n,1,1e4)),u=Math.floor(Db(e.a.height*n,1,1e4)),d=Math.min(i*n,o/2,u/2),f=Math.max(e.a.width/r.width,e.a.height/r.height)*n,v=e.page._exportingOrRendering&&Ai.imageDownScalingEnabled&&f<1&&!a,g=r.x===0&&r.y===0&&r.width===t?.width&&r.height===t?.height,c=ce.useMemo(()=>{if(t&&t.width&&t.height)return g&&d===0&&!v?void 0:Nf()},[t,d,v,g]);return ce.useLayoutEffect(()=>{if(!c||!t)return;km(c,o,u);const y=c.getContext("2d");if(!y)return;d&&(y.beginPath(),y.moveTo(d,0),y.lineTo(o-d,0),y.arc(o-d,d,d,3*Math.PI/2,0,!1),y.lineTo(o,u-d),y.arc(o-d,u-d,d,0,Math.PI/2,!1),y.lineTo(d,u),y.arc(d,u-d,d,Math.PI/2,Math.PI,!1),y.lineTo(0,d),y.arc(d,d,d,Math.PI,3*Math.PI/2,!1),y.clip());const x=v?function(S,b){var w,_;const A=Nf();A.width=S.width,A.height=S.height;const M=Math.max(1,Math.floor(A.width*b)),O=Math.max(1,Math.floor(A.height*b));(w=A.getContext("2d"))===null||w===void 0||w.drawImage(S,0,0,A.width,A.height);const L=function(R,T,k,C,q,G,J){for(var ae=new ImageData(T,k),H=new Int32Array(R.data.buffer),V=R.width,Y=new Int32Array(ae.data.buffer),U=ae.width,D=T/G,j=k/J,z=Math.round(1/D),Z=Math.round(1/j),re=z*Z,W=0;W<ae.height;W++)for(var Q=0;Q<U;Q++){for(var se=0+Math.round(Q/D)+(0+Math.round(W/j))*V,ue=0,le=0,ye=0,Re=0,Me=0;Me<Z;Me++)for(var Pe=0;Pe<z;Pe++){var de=H[se+Pe+Me*V];ue+=de<<24>>>24,le+=de<<16>>>24,ye+=de<<8>>>24,Re+=de>>>24}ue=Math.round(ue/re),le=Math.round(le/re),ye=Math.round(ye/re),Re=Math.round(Re/re),Y[Q+W*U]=Re<<24|ye<<16|le<<8|ue}return ae}(A.getContext("2d").getImageData(0,0,A.width,A.height),M,O,0,0,A.width,A.height);return A.width=M,A.height=O,(_=A.getContext("2d"))===null||_===void 0||_.putImageData(L,0,0),A}(t,f):t,E=v?{x:Math.floor(r.x*f),y:Math.floor(r.y*f),width:Math.floor(r.width*f),height:Math.floor(r.height*f)}:r;y.drawImage(x,E.x,E.y,E.width,E.height,0,0,c.width,c.height)},[c,e.a.width,e.a.height,r.x,r.y,r.width,r.height,i,n,a,e.page._exportingOrRendering,v]),ce.useEffect(()=>()=>{c&&c.nodeName==="CANVAS"&&sr.Util.releaseCanvas(c)},[c]),c||t},Yk=Nf(),Xk=Yn(({element:e})=>{const t=Math.min(30,e.a.width/4,e.a.height/4),r=ce.useRef(null);return ce.useEffect(()=>{const n=r.current;if(!n)return;const i=new sr.Animation(a=>{n.rotate((a?.timeDiff||0)/2)},n.getLayer());return i.start(),()=>{i.stop()}}),ce.createElement(vn,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport},ce.createElement(En,{width:e.a.width,height:e.a.height,fill:"rgba(124, 173, 212, 0.8)"}),ce.createElement(mm,{ref:r,x:e.a.width/2,y:e.a.height/2,fill:"white",outerRadius:Math.abs(t),innerRadius:Math.max(1,t-5),angle:270}))}),Kk=Yn(({element:e})=>{const t=Math.max(10,Math.min(30,e.a.width/25));return ce.createElement(vn,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport},ce.createElement(En,{width:e.a.width,height:e.a.height,fill:"rgba(223, 102, 102, 0.8)"}),ce.createElement(Au,{text:"Can not load the image...",fontSize:t,width:e.a.width,height:e.a.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let Dg=ym;const Jd=(e,t="",r="")=>{const n=ce.useRef(),i=()=>{var a;(a=n.current)===null||a===void 0||a.call(n),n.current=void 0};ce.useEffect(()=>i,[]),ce.useLayoutEffect(()=>{const a=t.slice(0,200),l=`image with id ${r} url: ${a}`;e!=="loading"||n.current||(n.current=Rh(l)),e!=="loading"&&i(),e==="failed"&&Sp(l)},[e])},Bb=Yn(({element:e,store:t})=>{var r;const[n,i]=ce.useState(!1),a=ce.useRef(null),l=ce.useRef(null),o=t.selectedShapes.indexOf(e)>=0&&e.selectable,[u,d]=(Te=>{const[Ae,be]=ce.useReducer(Ce=>Ce+1,0),_e=ce.useRef("loading"),xe=ce.useRef(Te.src),Le=ce.useRef(Te.src);Le.current!==Te.src&&(Le.current=Te.src,_e.current="loading");const pe=ce.useMemo(()=>Y8(Te.src)||Te.type==="svg",[Te.src,Te.type]);return ce.useEffect(()=>{if(!pe||!Te.src)return;let Ce=!1;return(async()=>{_e.current="loading",be();const je=await Ap(Te.src),He=Am(je);let st;st=Te.colorsReplace?Pm(He,Te.colorsReplace||new Map):$f(He),Ce||(xe.current=st,_e.current="loaded",be())})(),()=>{Ce=!0}},[Te.src,JSON.stringify(Te.colorsReplace)]),pe?[xe.current,_e.current]:[Te.src,"loaded"]})(e),[f,v]=Dg(u,"anonymous"),g=e.type!=="svg"||d==="loaded"?v:"loading";Jd(g,e.src,e.id);const c=e.page._exportingOrRendering?1:Math.max(1,t.scale),y=t._elementsPixelRatio*c,x=(({image:Te,status:Ae,type:be})=>{const _e=ce.useRef();return ce.useEffect(()=>{_e.current=Te||_e.current},[Te]),Ae!=="failed"||Ae!=="failed"&&be==="svg"?_e.current:void 0})({image:f,status:v,type:e.type}),E=((Te,Ae,be)=>{const _e=ce.useMemo(()=>{var xe,Le;const{flipX:pe,flipY:Ce}=Te,je=Te.type==="svg"||Te.src.indexOf("data:image/svg+xml")>=0||Te.src.indexOf(".svg")>=0,He=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,st=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||He)&&je||Te.maskSrc;if(!pe&&!Ce&&!st)return Ae;if(!Ae||!Ae.width||!Ae.height)return null;const pt=Nf();let ct=1;Te.type==="svg"&&(ct=Math.max(Te.a.width/Ae.width*be,Te.a.height/Ae.height*be)),km(pt,Math.max(Ae.width*ct,1),Math.max(Ae.height*ct,1));let bt=pe?-pt.width:0,ht=Ce?-pt.height:0;return(xe=pt.getContext("2d"))===null||xe===void 0||xe.scale(pe?-1:1,Ce?-1:1),(Le=pt.getContext("2d"))===null||Le===void 0||Le.drawImage(Ae,bt,ht,pt.width,pt.height),pt},[Te.maskSrc,Te.flipX,Te.flipY,Ae,Te.a.width,Te.a.height,be]);return ce.useEffect(()=>()=>{_e&&_e.nodeName==="CANVAS"&&sr.Util.releaseCanvas(_e)},[_e]),_e})(e,f||x,y),S=((Te,Ae)=>{const be=Fb(Te.maskSrc||""),[_e,xe]=Dg(be,"anonymous");return Jd(be?xe:"loaded",be||"",Te.id),ce.useMemo(()=>{if(!_e||!Ae||!Ae.width||!Ae.height)return Ae;const Le=Nf();Le.width=Math.max(Ae.width,1),Le.height=Math.max(Ae.height,1);const pe=Le.getContext("2d");if(!pe)return Ae;pe.drawImage(Ae,0,0),pe.globalCompositeOperation="source-in";const Ce=function(je,He){const st=He.width/He.height;let pt,ct;return st>=je.width/je.height?(pt=je.width,ct=je.width/st):(pt=je.height*st,ct=je.height),{x:(je.width-pt)/2,y:(je.height-ct)/2,width:pt,height:ct}}(_e,Te);return pe.drawImage(_e,Ce.x,Ce.y,Ce.width,Ce.height,0,0,Ae.width,Ae.height),Le},[Ae,_e,Te.a.width,Te.a.height])})(e,E)||Yk;let{cropX:b,cropY:w,cropWidth:_,cropHeight:A}=e.a;v!=="loaded"&&(b=w=0,_=A=1);const M=S.width*_,O=S.height*A,L=e.a.width/e.a.height;let R,T;const k=M/O,C=e.stretchEnabled;C?(R=M,T=O):L>=k?(R=M,T=M/L):(R=O*L,T=O);const q={x:S.width*b,y:S.height*w,width:R,height:T},G=(r=e.cornerRadius)!==null&&r!==void 0?r:0,J=e.page._exportingOrRendering?1:Math.min(2,t.scale),ae=t._elementsPixelRatio*J;let H=((Te,Ae,be,_e)=>{const xe=Fb(Te.clipSrc||""),[Le,pe]=Dg(xe,"anonymous"),Ce=Te.clipSrc?pe:"loaded";Jd(Ce,Te.clipSrc,Te.id);const je=ce.useMemo(()=>{if(Ae&&Le)return Nf()},[Ae,Le]);return ce.useLayoutEffect(()=>{var He;if(!Le||!Ae||!Ae.width||!Ae.height||!Le||!Le.width||!Le.height||!je)return;const st=Nf(),pt=Math.max(Te.a.width/Le.width*be,Te.a.height/Le.height*be);st.width=Math.max(Le.width*pt,1),st.height=Math.max(Le.height*pt,1),(He=st.getContext("2d"))===null||He===void 0||He.drawImage(Le,0,0,st.width,st.height),je.width=Math.max(Ae.width,1),je.height=Math.max(Ae.height,1);const ct=je.getContext("2d");ct&&(ct.save(),ct.drawImage(st,0,0,Ae.width,Ae.height),sr.Util.releaseCanvas(st),ct.globalCompositeOperation="source-in",ct.drawImage(Ae,0,0,je.width,je.height),ct.restore())},[je,Ae,Le,Te.a.width,Te.a.height,be,..._e]),Te.clipSrc&&Le?je:Ae})(e,Wk(e,S,q,ae,G,n||e._cropModeEnabled||e.type==="svg",!0),ae,[q,G,ae]);const V=Math.max(e.a.width/R,e.a.height/T);ce.useEffect(()=>{var Te;if(!e._cropModeEnabled)return;const Ae=(Te=a.current)===null||Te===void 0?void 0:Te.getStage();function be(xe){e._cropModeEnabled&&xe.target!==l.current&&e.toggleCropMode(!1)}function _e(xe){e._cropModeEnabled&&xe.target.parentNode!==Ae.content&&e.toggleCropMode(!1)}return document.body.addEventListener("click",_e),Ae?.on("click",be),Ae?.on("tap",be),()=>{document.body.removeEventListener("click",_e),document.body.removeEventListener("touchstart",_e),Ae?.off("click",be),Ae?.off("click",be)}},[e._cropModeEnabled]),ce.useLayoutEffect(()=>{if(!n&&!e._cropModeEnabled)return _s(a.current,e),Ou(()=>{_s(a.current,e)},{delay:100})},[H,e.page._exportingOrRendering,n,_,A,e._cropModeEnabled]),ce.useLayoutEffect(()=>{var Te;n||e._cropModeEnabled?(Te=a.current)===null||Te===void 0||Te.clearCache():_s(a.current,e)},[n,e.a.width,e.a.height,e._cropModeEnabled]),ce.useEffect(()=>{_s(a.current,e)},[e.shadowEnabled,e.shadowBlur,e.cornerRadius,e.shadowColor,e.shadowOffsetX,e.shadowOffsetY,e.shadowOpacity]);const Y=ce.useRef(null),U=ce.useRef(null),D=ce.useRef(null);ce.useLayoutEffect(()=>{e._cropModeEnabled&&(U.current.nodes([Y.current]),D.current.nodes([l.current]))},[e._cropModeEnabled]);var j=ce.useRef(null),z=ce.useRef(0),Z=ce.useRef(!1);const re=Te=>{var Ae;((Ae=Te.evt.touches)===null||Ae===void 0?void 0:Ae.length)>2&&Te.target.stopDrag(),Math.round(Te.target.x())>0&&(Te.target.x(0),Te.target.scaleX(1)),Math.round(Te.target.y())>0&&(Te.target.y(0),Te.target.scaleY(1));const be=Te.target.width()*Te.target.scaleX(),_e=Te.target.height()*Te.target.scaleY(),xe=Math.min(1,R/be),Le=Math.min(1,T/_e),pe=1-xe,Ce=Math.min(pe,Math.max(0,Math.round(-Te.target.x())/be)),je=1-Le,He=Math.min(je,Math.max(0,Math.round(-Te.target.y())/_e));Te.target.setAttrs({x:-Ce*S.width,y:-He*S.height,scaleX:1,scaleY:1}),e.set({cropX:Ce,cropY:He,cropWidth:xe,cropHeight:Le})},W=()=>{e.type!=="svg"&&e.contentEditable&&(e.stretchEnabled||setTimeout(()=>{e.toggleCropMode(!0)}))},Q=e.type==="svg"&&x,se=v==="loading"&&!Q,[ue]=jv(se,100,!1,!1),le=v==="failed",ye=!ue&&!le,Re=ce.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),Me=ye?e.a.opacity:0;xp(a,Me);const Pe=e.selectable||t.role==="admin",de=lf();return ce.createElement(ce.Fragment,null,ue&&ce.createElement(Xk,{element:e}),le&&ce.createElement(Kk,{element:e}),ce.createElement(bu,{ref:a,name:"element",id:e.id,image:H,x:e.a.x,y:e.a.y,width:e.a.width||1,height:e.a.height||1,rotation:e.a.rotation,opacity:Me,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,customCrop:q,listening:Pe,draggable:de?e.draggable&&o:e.draggable,preventDefault:!de||o,hideInExport:!e.showInExport,onDragMove:Te=>{e.set({x:Te.target.x(),y:Te.target.y()})},onDragEnd:Te=>{e.set({x:Te.target.x(),y:Te.target.y()})},onDblClick:W,onDblTap:W,onTransformStart:()=>{i(!0),Re.current={cropX:e.cropX,cropY:e.cropY,cropWidth:e.cropWidth,cropHeight:e.cropHeight}},onTransform:Te=>{var Ae;const be=Te.currentTarget,_e=Math.abs(be.scaleX()-1)<1e-7?1:be.scaleX(),xe=Math.abs(be.scaleY()-1)<1e-7?1:be.scaleY();be.scaleX(1),be.scaleY(1);const Le=(Ae=Te.target.getStage())===null||Ae===void 0?void 0:Ae.findOne("Transformer"),pe=1-R/S.width,Ce=Math.min(pe,Math.max(0,e.cropX)),je=1-T/S.height,He=Math.min(je,Math.max(0,e.cropY)),st=Le.getActiveAnchor(),pt=!(st.indexOf("middle")>=0||st.indexOf("center")>=0),ct=!pt&&_e<1&&Re.current.cropHeight>T/S.height;let bt=pt?e.cropWidth:e.cropWidth*_e;ct&&(bt=e.cropWidth);const ht=!pt&&xe<1&&Re.current.cropWidth>R/S.width;let vt=pt?e.cropHeight:e.cropHeight*xe;ht&&(vt=e.cropHeight),C&&(bt=e.cropWidth,vt=e.cropHeight),e.set({cropX:Ce,cropY:He,x:be.x(),y:be.y(),width:be.width()*_e,height:be.height()*xe,rotation:Te.target.rotation(),cropWidth:Math.min(bt,1-Ce),cropHeight:Math.min(vt,1-He)})},onTransformEnd:Te=>{const Ae=Te.currentTarget;e.set({width:Ae.width(),height:Ae.height(),x:Ae.x(),y:Ae.y(),rotation:Te.target.rotation(),cropWidth:R/S.width,cropHeight:T/S.height}),i(!1)}}),ce.createElement(En,{x:e.x,y:e.y,width:Math.max(e.a.width-e.borderSize,0),height:Math.max(e.a.height-e.borderSize,0),opacity:Me,offsetX:-e.borderSize/2,offsetY:-e.borderSize/2,stroke:e.borderColor,strokeWidth:e.borderSize,listening:!1,visible:!!e.borderSize,rotation:e.rotation,cornerRadius:Math.max(0,G-e.borderSize),hideInExport:!e.showInExport}),e._cropModeEnabled&&ce.createElement(bm,{selector:".page-abs-container",enabled:!0},ce.createElement(En,{x:-window.innerWidth/t.scale,y:-window.innerWidth/t.scale,width:window.innerWidth/t.scale*3,height:window.innerWidth/t.scale*3,fill:"rgba(0,0,0,0.3)"}),ce.createElement(bu,{listening:!1,image:H,x:e.x,y:e.y,width:e.a.width,height:e.a.height,rotation:e.rotation,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur}),ce.createElement(vn,{x:e.x,y:e.y,rotation:e.rotation,scaleX:V,scaleY:V},ce.createElement(bu,{image:S,ref:l,opacity:.4,draggable:!0,x:-e.cropX*S.width,y:-e.cropY*S.height,onDragMove:re,onTransform:re,onTouchMove:Te=>{Te.evt.preventDefault();const Ae=Te.target.getStage().getPointersPositions();var be=Ae[0],_e=Ae[1];const xe=Te.target;if(be&&!_e&&!xe.isDragging()&&Z.current&&(xe.startDrag(),Z.current=!1),be&&_e){sr.hitOnDragEnabled=!0,xe.isDragging()&&(Z.current=!0,xe.stopDrag());const ht=Te.target.getAbsoluteTransform().copy();ht.invert();var Le={x:be.x,y:be.y},pe={x:_e.x,y:_e.y};if(!j.current)return void(j.current=jb(Le,pe));var Ce=jb(Le,pe),je=function(Pt,$t){return Math.sqrt(Math.pow($t.x-Pt.x,2)+Math.pow($t.y-Pt.y,2))}(Le,pe);z.current||(z.current=je);const vt=xe.position();var He={x:Ce.x-vt.x,y:Ce.y-vt.y},st=je/z.current;xe.scaleX(st),xe.scaleY(st);const wr=ht.point(Ce),cr=ht.point(j.current);var pt=wr.x-cr.x,ct=wr.y-cr.y,bt={x:Math.min(0,Ce.x-He.x*st+pt),y:Math.min(0,Ce.y-He.y*st+ct)};xe.position(bt),z.current=je,j.current=Ce,re(Te)}},onTouchEnd:Te=>{z.current=0,j.current=null,sr.hitOnDragEnabled=!1}}),ce.createElement(lp,Object.assign({ref:D},$k)),ce.createElement(En,{width:R,height:T,ref:Y,listening:!1,onTransform:Te=>{if(e.cropX<Math.abs(Te.target.x()/S.width)&&Te.target.x()<0&&e.cropX>0){const je=(e.cropWidth+e.cropX)*S.width;Te.target.scaleX(1),Te.target.width(je)}if(e.cropY<Math.abs(Te.target.y()/S.height)&&Te.target.y()<0&&e.cropY>0){const je=(e.cropHeight+e.cropY)*S.height;Te.target.scaleY(1),Te.target.height(je)}Te.target.x()<-e.cropX*S.width-1e-9&&(Te.target.x(-e.cropX*S.width),Te.target.scaleX(1)),Te.target.y()<-e.cropY*S.height-1e-9&&(Te.target.y(-e.cropY*S.height),Te.target.scaleY(1));const Ae=Math.min(1,Math.max(0,e.cropX+Te.target.x()/S.width)),be=Math.min(1,Math.max(0,Te.target.y()/S.height+e.cropY)),_e=Te.target.width()*Te.target.scaleX(),xe=Te.target.height()*Te.target.scaleY(),Le=Math.min(1-Ae,_e/S.width),pe=Math.min(1-be,xe/S.height),Ce=Te.target.getAbsolutePosition(Te.target.getParent().getParent());Te.target.scale({x:1,y:1}),Te.target.position({x:0,y:0}),e.set({x:Ce.x,y:Ce.y,cropX:Ae,cropY:be,cropWidth:Le,cropHeight:pe,width:Math.min(_e*V,S.width*(1-Ae)*V),height:Math.min(xe*V,S.height*(1-be)*V)})}}),ce.createElement(lp,Object.assign({ref:U},Gk,{visible:e.resizable})))))});var A1={exports:{}};/*!
|
|
100
|
+
`).trim();return M}function d(_){if(_){a+=_;return}return n?"":Array(a).join(i||"")}function f(_){return"@"+_.type+" "+_.value+";"+l}function v(_){var A="",M=_.prefix||"";_.name&&(A=" "+_.name);var O=_.type!=="page";return"@"+M+_.type+A+o+x(_,O)+l}function g(_){return r?"/*"+(_.text||"")+"*/"+l:""}function c(_){var A;return _.selectors?A=_.selectors.join(","+l):(A="@"+_.type,A+=_.name?" "+_.name:""),d()+A+o+x(_)+l}function y(_,A){return _.reduce(function(M,O){var L=O.type==="comment"?g(O):A(O);return L&&M.push(L),M},[])}function x(_,A){var M=_.declarations,O=S;return _.rules&&(M=_.rules,O=c),M=E(M,O),M&&(M=l+M+(A?"":l)),"{"+M+d()+"}"}function E(_,A){if(!_)return"";d(1);var M=y(_,A);return d(-1),M.length?M.join(l):""}function S(_){if(_.type==="property")return w(_)}function b(_){switch(_.type){case"rule":return c(_);case"media":case"keyframes":return v(_);case"comment":return g(_);case"import":case"charset":case"namespace":return f(_);case"font-face":case"supports":case"viewport":case"document":case"page":return v(_)}}function w(_){var A=_.name?_.name+":"+o:"";return d()+A+_.value+";"}}(Fg)),Fg.exports}var jg,Ib;function Fk(){return Ib||(Ib=1,jg={lex:$8(),parse:Mk(),stringify:Ik()}),jg}var jk=Fk();const Dk=lc(jk);function Bk(e){for(;e.parentNode;){if(e.nodeName==="defs")return!0;e=e.parentNode}return!1}function zk(e){const t={};return e.querySelectorAll("style").forEach(r=>{const n=Dk.parse(r.textContent).stylesheet.rules;for(let i of n)i.selectors&&i.selectors.forEach(a=>{const l=t[a]||{};i.declarations.forEach(o=>{l[o.name]=o.value}),t[a]=l})}),t}function W8(e,t){var r;const n={fill:"",stroke:""},i=((r=e.getAttribute("class"))===null||r===void 0?void 0:r.split(" "))||[],a=e.getAttribute("id");let l={};if(a&&t[`#${a}`]?l=t[`#${a}`]:i.forEach(o=>{t[`.${o}`]&&(l=Object.assign(Object.assign({},l),t[`.${o}`]))}),t[e.nodeName]&&(l=Object.assign(Object.assign({},l),t[e.nodeName])),e.getAttribute("fill")&&e.getAttribute("fill")!=="none"?n.fill=e.getAttribute("fill"):l.fill&&l.fill!=="none"&&(n.fill=l.fill),e.getAttribute("stroke")&&e.getAttribute("stroke")!=="none"?n.stroke=e.getAttribute("stroke"):l.stroke&&l.stroke!=="none"&&(n.stroke=l.stroke),!n.fill&&e.style.fill&&e.style.fill!=="none"&&(n.fill=e.style.fill),!n.stroke&&e.style.stroke&&e.style.stroke!=="none"&&(n.stroke=e.style.stroke),!n.stroke&&!n.fill){const o=e.ownerSVGElement,u=o&&o!==e&&W8(o,t);u?.fill==="currentColor"||u?.stroke==="currentColor"||(n.fill="black")}return n}const Uk=["path","rect","circle","line","polygon","polyline","ellipse","text"];function qk(e){for(var t=[],r=e.getElementsByTagName("*"),n=0,i=r.length;n<i;n++){const a=r[n];Bk(a)||(a.getAttribute("fill")!==null&&t.push(a),(a.getAttribute("stroke")!==null||a.style&&a.style.fill||Uk.indexOf(a.nodeName)>=0)&&t.push(a))}return t}async function Hk(e){const t=await fetch(e);return $f(await t.text())}async function Ap(e){return await(await fetch(e,{mode:"cors"})).text()}function $f(e){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(e)))}function Am(e){var t=new DOMParser().parseFromString(e,"image/svg+xml");const r=t.documentElement.getAttribute("viewBox"),[n,i,a,l]=r?.split(" ")||[],o=t.documentElement.getAttribute("width");!o&&t.documentElement.setAttribute("width",a+"px");const u=t.documentElement.getAttribute("height");if((!u||u.indexOf("%")>=0)&&t.documentElement.setAttribute("height",l+"px"),o&&o.indexOf("%")>=0&&u&&u.indexOf("%")===-1){const d=parseFloat(u)/parseFloat(l);t.documentElement.setAttribute("width",d*parseFloat(a)+"px")}if(u&&u.indexOf("%")>=0&&o&&o.indexOf("%")===-1){const d=parseFloat(o)/parseFloat(a);t.documentElement.setAttribute("height",d*parseFloat(l)+"px")}return o==="100%"&&u==="100%"&&(t.documentElement.setAttribute("width",a+"px"),t.documentElement.setAttribute("height",l+"px")),new XMLSerializer().serializeToString(t)}const Vk=(e,t)=>{if(!e||!t)return!1;if(t==="currentColor"&&e==="black")return!0;const r=sr.Util.colorToRGBA(e),n=sr.Util.colorToRGBA(t);return r&&n?r.r===n.r&&r.g===n.g&&r.b===n.b&&r.a===n.a:void 0};function Pm(e,t){var r=new DOMParser().parseFromString(e,"image/svg+xml");const n=qk(r),i=Array.from(t.keys()),a=zk(r);return n.forEach(l=>{const{fill:o,stroke:u}=W8(l,a);[{prop:"fill",color:o},{prop:"stroke",color:u}].forEach(({prop:d,color:f})=>{const v=i.find(g=>Vk(g,f));if(v){const g=t.get(v);if(v0(g)){const{rotation:c,stops:y}=n8(g),x=y.map(S=>({offset:100*S.offset+"%","stop-color":S.color})),E="color"+Math.round(1e8*Math.random());(function(S,b,w,_){var A=S.namespaceURI,M=document.createElementNS(A,"linearGradient");const O=sr.Util.degToRad(w+90),L=(Math.cos(O)+1)/2,R=(Math.sin(O)+1)/2,T=(Math.cos(O+Math.PI)+1)/2,k=(Math.sin(O+Math.PI)+1)/2;M.setAttribute("x1",100*L+"%"),M.setAttribute("y1",100*R+"%"),M.setAttribute("x2",100*T+"%"),M.setAttribute("y2",100*k+"%"),M.setAttribute("gradientUnits","userSpaceOnUse"),M.setAttribute("id",b);for(var C=0;C<_.length;C++){var q=_[C],G=document.createElementNS(A,"stop");for(var J in q)q.hasOwnProperty(J)&&G.setAttribute(J,q[J]);M.appendChild(G)}(S.querySelector("defs")||S.insertBefore(document.createElementNS(A,"defs"),S.firstChild)).appendChild(M)})(r.children[0],E,c,x),l.style[d]=null,l.setAttribute(d,`url('#${E}')`)}else l.style[d]=t.get(v)}})}),$f(new XMLSerializer().serializeToString(r))}const km=(e,t,r)=>{let n=t,i=r,a=1;for(;n>0&&i>0;){e.width=n,e.height=i;const l=e.getContext("2d");if(!l)return;if(l.fillStyle="rgba(0,0,0,0.1)",l.fillRect(0,0,1,1),l.getImageData(0,0,1,1).data[3]!==0)return void l.clearRect(0,0,e.width,e.height);if(a*=.9,n=Math.floor(t*a),i=Math.floor(r*a),n=Math.max(n,1),i=Math.max(i,1),n<=1&&i<=1)return e.width=1,void(e.height=1)}},jv=(e,t=100,r=!1,n)=>{const i=ce.useRef(n??e),[,a]=ce.useReducer(u=>u+1,0),l=ce.useCallback(u=>{i.current!==u&&(i.current=u,a())},[i]),o=ce.useRef(null);return e===r&&(o.current&&(clearTimeout(o.current),o.current=null),i.current=r),ce.useEffect(()=>(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{l(e),o.current=null},t),()=>{o.current&&clearTimeout(o.current)}),[e,t,r]),[i.current,l]};function Nf(){return document.createElement("canvas")}const Y8=e=>e.indexOf("data:image/svg+xml")>=0||e.indexOf(".svg")>=0,Fb=e=>{const[t,r]=ce.useState(e);return ce.useEffect(()=>{(async()=>{const n=await async function(i){if(!Y8(i))return i;const a=await Ap(i),l=Am(a);return $f(l)}(e);n!==t&&r(n)})()},[e]),t};function jb(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}const Gk={boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2},$k={boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2},Db=(e,t,r)=>Math.max(t,Math.min(r,e)),Wk=(e,t,r,n,i=0,a=!1,l=!0)=>{const o=Math.floor(Db(e.a.width*n,1,1e4)),u=Math.floor(Db(e.a.height*n,1,1e4)),d=Math.min(i*n,o/2,u/2),f=Math.max(e.a.width/r.width,e.a.height/r.height)*n,v=e.page._exportingOrRendering&&gi.imageDownScalingEnabled&&f<1&&!a,g=r.x===0&&r.y===0&&r.width===t?.width&&r.height===t?.height,c=ce.useMemo(()=>{if(t&&t.width&&t.height)return g&&d===0&&!v?void 0:Nf()},[t,d,v,g]);return ce.useLayoutEffect(()=>{if(!c||!t)return;km(c,o,u);const y=c.getContext("2d");if(!y)return;d&&(y.beginPath(),y.moveTo(d,0),y.lineTo(o-d,0),y.arc(o-d,d,d,3*Math.PI/2,0,!1),y.lineTo(o,u-d),y.arc(o-d,u-d,d,0,Math.PI/2,!1),y.lineTo(d,u),y.arc(d,u-d,d,Math.PI/2,Math.PI,!1),y.lineTo(0,d),y.arc(d,d,d,Math.PI,3*Math.PI/2,!1),y.clip());const x=v?function(S,b){var w,_;const A=Nf();A.width=S.width,A.height=S.height;const M=Math.max(1,Math.floor(A.width*b)),O=Math.max(1,Math.floor(A.height*b));(w=A.getContext("2d"))===null||w===void 0||w.drawImage(S,0,0,A.width,A.height);const L=function(R,T,k,C,q,G,J){for(var ae=new ImageData(T,k),H=new Int32Array(R.data.buffer),V=R.width,Y=new Int32Array(ae.data.buffer),U=ae.width,D=T/G,j=k/J,z=Math.round(1/D),Z=Math.round(1/j),re=z*Z,W=0;W<ae.height;W++)for(var Q=0;Q<U;Q++){for(var se=0+Math.round(Q/D)+(0+Math.round(W/j))*V,ue=0,le=0,ye=0,Re=0,Me=0;Me<Z;Me++)for(var Pe=0;Pe<z;Pe++){var de=H[se+Pe+Me*V];ue+=de<<24>>>24,le+=de<<16>>>24,ye+=de<<8>>>24,Re+=de>>>24}ue=Math.round(ue/re),le=Math.round(le/re),ye=Math.round(ye/re),Re=Math.round(Re/re),Y[Q+W*U]=Re<<24|ye<<16|le<<8|ue}return ae}(A.getContext("2d").getImageData(0,0,A.width,A.height),M,O,0,0,A.width,A.height);return A.width=M,A.height=O,(_=A.getContext("2d"))===null||_===void 0||_.putImageData(L,0,0),A}(t,f):t,E=v?{x:Math.floor(r.x*f),y:Math.floor(r.y*f),width:Math.floor(r.width*f),height:Math.floor(r.height*f)}:r;y.drawImage(x,E.x,E.y,E.width,E.height,0,0,c.width,c.height)},[c,e.a.width,e.a.height,r.x,r.y,r.width,r.height,i,n,a,e.page._exportingOrRendering,v]),ce.useEffect(()=>()=>{c&&c.nodeName==="CANVAS"&&sr.Util.releaseCanvas(c)},[c]),c||t},Yk=Nf(),Xk=Yn(({element:e})=>{const t=Math.min(30,e.a.width/4,e.a.height/4),r=ce.useRef(null);return ce.useEffect(()=>{const n=r.current;if(!n)return;const i=new sr.Animation(a=>{n.rotate((a?.timeDiff||0)/2)},n.getLayer());return i.start(),()=>{i.stop()}}),ce.createElement(vn,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport},ce.createElement(En,{width:e.a.width,height:e.a.height,fill:"rgba(124, 173, 212, 0.8)"}),ce.createElement(mm,{ref:r,x:e.a.width/2,y:e.a.height/2,fill:"white",outerRadius:Math.abs(t),innerRadius:Math.max(1,t-5),angle:270}))}),Kk=Yn(({element:e})=>{const t=Math.max(10,Math.min(30,e.a.width/25));return ce.createElement(vn,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport},ce.createElement(En,{width:e.a.width,height:e.a.height,fill:"rgba(223, 102, 102, 0.8)"}),ce.createElement(Au,{text:"Can not load the image...",fontSize:t,width:e.a.width,height:e.a.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let Dg=ym;const Jd=(e,t="",r="")=>{const n=ce.useRef(),i=()=>{var a;(a=n.current)===null||a===void 0||a.call(n),n.current=void 0};ce.useEffect(()=>i,[]),ce.useLayoutEffect(()=>{const a=t.slice(0,200),l=`image with id ${r} url: ${a}`;e!=="loading"||n.current||(n.current=Rh(l)),e!=="loading"&&i(),e==="failed"&&Sp(l)},[e])},Bb=Yn(({element:e,store:t})=>{var r;const[n,i]=ce.useState(!1),a=ce.useRef(null),l=ce.useRef(null),o=t.selectedShapes.indexOf(e)>=0&&e.selectable,[u,d]=(Te=>{const[Ae,be]=ce.useReducer(Ce=>Ce+1,0),_e=ce.useRef("loading"),xe=ce.useRef(Te.src),Le=ce.useRef(Te.src);Le.current!==Te.src&&(Le.current=Te.src,_e.current="loading");const pe=ce.useMemo(()=>Y8(Te.src)||Te.type==="svg",[Te.src,Te.type]);return ce.useEffect(()=>{if(!pe||!Te.src)return;let Ce=!1;return(async()=>{_e.current="loading",be();const je=await Ap(Te.src),He=Am(je);let st;st=Te.colorsReplace?Pm(He,Te.colorsReplace||new Map):$f(He),Ce||(xe.current=st,_e.current="loaded",be())})(),()=>{Ce=!0}},[Te.src,JSON.stringify(Te.colorsReplace)]),pe?[xe.current,_e.current]:[Te.src,"loaded"]})(e),[f,v]=Dg(u,"anonymous"),g=e.type!=="svg"||d==="loaded"?v:"loading";Jd(g,e.src,e.id);const c=e.page._exportingOrRendering?1:Math.max(1,t.scale),y=t._elementsPixelRatio*c,x=(({image:Te,status:Ae,type:be})=>{const _e=ce.useRef();return ce.useEffect(()=>{_e.current=Te||_e.current},[Te]),Ae!=="failed"||Ae!=="failed"&&be==="svg"?_e.current:void 0})({image:f,status:v,type:e.type}),E=((Te,Ae,be)=>{const _e=ce.useMemo(()=>{var xe,Le;const{flipX:pe,flipY:Ce}=Te,je=Te.type==="svg"||Te.src.indexOf("data:image/svg+xml")>=0||Te.src.indexOf(".svg")>=0,He=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,st=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||He)&&je||Te.maskSrc;if(!pe&&!Ce&&!st)return Ae;if(!Ae||!Ae.width||!Ae.height)return null;const pt=Nf();let ct=1;Te.type==="svg"&&(ct=Math.max(Te.a.width/Ae.width*be,Te.a.height/Ae.height*be)),km(pt,Math.max(Ae.width*ct,1),Math.max(Ae.height*ct,1));let bt=pe?-pt.width:0,ht=Ce?-pt.height:0;return(xe=pt.getContext("2d"))===null||xe===void 0||xe.scale(pe?-1:1,Ce?-1:1),(Le=pt.getContext("2d"))===null||Le===void 0||Le.drawImage(Ae,bt,ht,pt.width,pt.height),pt},[Te.maskSrc,Te.flipX,Te.flipY,Ae,Te.a.width,Te.a.height,be]);return ce.useEffect(()=>()=>{_e&&_e.nodeName==="CANVAS"&&sr.Util.releaseCanvas(_e)},[_e]),_e})(e,f||x,y),S=((Te,Ae)=>{const be=Fb(Te.maskSrc||""),[_e,xe]=Dg(be,"anonymous");return Jd(be?xe:"loaded",be||"",Te.id),ce.useMemo(()=>{if(!_e||!Ae||!Ae.width||!Ae.height)return Ae;const Le=Nf();Le.width=Math.max(Ae.width,1),Le.height=Math.max(Ae.height,1);const pe=Le.getContext("2d");if(!pe)return Ae;pe.drawImage(Ae,0,0),pe.globalCompositeOperation="source-in";const Ce=function(je,He){const st=He.width/He.height;let pt,ct;return st>=je.width/je.height?(pt=je.width,ct=je.width/st):(pt=je.height*st,ct=je.height),{x:(je.width-pt)/2,y:(je.height-ct)/2,width:pt,height:ct}}(_e,Te);return pe.drawImage(_e,Ce.x,Ce.y,Ce.width,Ce.height,0,0,Ae.width,Ae.height),Le},[Ae,_e,Te.a.width,Te.a.height])})(e,E)||Yk;let{cropX:b,cropY:w,cropWidth:_,cropHeight:A}=e.a;v!=="loaded"&&(b=w=0,_=A=1);const M=S.width*_,O=S.height*A,L=e.a.width/e.a.height;let R,T;const k=M/O,C=e.stretchEnabled;C?(R=M,T=O):L>=k?(R=M,T=M/L):(R=O*L,T=O);const q={x:S.width*b,y:S.height*w,width:R,height:T},G=(r=e.cornerRadius)!==null&&r!==void 0?r:0,J=e.page._exportingOrRendering?1:Math.min(2,t.scale),ae=t._elementsPixelRatio*J;let H=((Te,Ae,be,_e)=>{const xe=Fb(Te.clipSrc||""),[Le,pe]=Dg(xe,"anonymous"),Ce=Te.clipSrc?pe:"loaded";Jd(Ce,Te.clipSrc,Te.id);const je=ce.useMemo(()=>{if(Ae&&Le)return Nf()},[Ae,Le]);return ce.useLayoutEffect(()=>{var He;if(!Le||!Ae||!Ae.width||!Ae.height||!Le||!Le.width||!Le.height||!je)return;const st=Nf(),pt=Math.max(Te.a.width/Le.width*be,Te.a.height/Le.height*be);st.width=Math.max(Le.width*pt,1),st.height=Math.max(Le.height*pt,1),(He=st.getContext("2d"))===null||He===void 0||He.drawImage(Le,0,0,st.width,st.height),je.width=Math.max(Ae.width,1),je.height=Math.max(Ae.height,1);const ct=je.getContext("2d");ct&&(ct.save(),ct.drawImage(st,0,0,Ae.width,Ae.height),sr.Util.releaseCanvas(st),ct.globalCompositeOperation="source-in",ct.drawImage(Ae,0,0,je.width,je.height),ct.restore())},[je,Ae,Le,Te.a.width,Te.a.height,be,..._e]),Te.clipSrc&&Le?je:Ae})(e,Wk(e,S,q,ae,G,n||e._cropModeEnabled||e.type==="svg",!0),ae,[q,G,ae]);const V=Math.max(e.a.width/R,e.a.height/T);ce.useEffect(()=>{var Te;if(!e._cropModeEnabled)return;const Ae=(Te=a.current)===null||Te===void 0?void 0:Te.getStage();function be(xe){e._cropModeEnabled&&xe.target!==l.current&&e.toggleCropMode(!1)}function _e(xe){e._cropModeEnabled&&xe.target.parentNode!==Ae.content&&e.toggleCropMode(!1)}return document.body.addEventListener("click",_e),Ae?.on("click",be),Ae?.on("tap",be),()=>{document.body.removeEventListener("click",_e),document.body.removeEventListener("touchstart",_e),Ae?.off("click",be),Ae?.off("click",be)}},[e._cropModeEnabled]),ce.useLayoutEffect(()=>{if(!n&&!e._cropModeEnabled)return _s(a.current,e),Ou(()=>{_s(a.current,e)},{delay:100})},[H,e.page._exportingOrRendering,n,_,A,e._cropModeEnabled]),ce.useLayoutEffect(()=>{var Te;n||e._cropModeEnabled?(Te=a.current)===null||Te===void 0||Te.clearCache():_s(a.current,e)},[n,e.a.width,e.a.height,e._cropModeEnabled]),ce.useEffect(()=>{_s(a.current,e)},[e.shadowEnabled,e.shadowBlur,e.cornerRadius,e.shadowColor,e.shadowOffsetX,e.shadowOffsetY,e.shadowOpacity]);const Y=ce.useRef(null),U=ce.useRef(null),D=ce.useRef(null);ce.useLayoutEffect(()=>{e._cropModeEnabled&&(U.current.nodes([Y.current]),D.current.nodes([l.current]))},[e._cropModeEnabled]);var j=ce.useRef(null),z=ce.useRef(0),Z=ce.useRef(!1);const re=Te=>{var Ae;((Ae=Te.evt.touches)===null||Ae===void 0?void 0:Ae.length)>2&&Te.target.stopDrag(),Math.round(Te.target.x())>0&&(Te.target.x(0),Te.target.scaleX(1)),Math.round(Te.target.y())>0&&(Te.target.y(0),Te.target.scaleY(1));const be=Te.target.width()*Te.target.scaleX(),_e=Te.target.height()*Te.target.scaleY(),xe=Math.min(1,R/be),Le=Math.min(1,T/_e),pe=1-xe,Ce=Math.min(pe,Math.max(0,Math.round(-Te.target.x())/be)),je=1-Le,He=Math.min(je,Math.max(0,Math.round(-Te.target.y())/_e));Te.target.setAttrs({x:-Ce*S.width,y:-He*S.height,scaleX:1,scaleY:1}),e.set({cropX:Ce,cropY:He,cropWidth:xe,cropHeight:Le})},W=()=>{e.type!=="svg"&&e.contentEditable&&(e.stretchEnabled||setTimeout(()=>{e.toggleCropMode(!0)}))},Q=e.type==="svg"&&x,se=v==="loading"&&!Q,[ue]=jv(se,100,!1,!1),le=v==="failed",ye=!ue&&!le,Re=ce.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),Me=ye?e.a.opacity:0;xp(a,Me);const Pe=e.selectable||t.role==="admin",de=lf();return ce.createElement(ce.Fragment,null,ue&&ce.createElement(Xk,{element:e}),le&&ce.createElement(Kk,{element:e}),ce.createElement(bu,{ref:a,name:"element",id:e.id,image:H,x:e.a.x,y:e.a.y,width:e.a.width||1,height:e.a.height||1,rotation:e.a.rotation,opacity:Me,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,customCrop:q,listening:Pe,draggable:de?e.draggable&&o:e.draggable,preventDefault:!de||o,hideInExport:!e.showInExport,onDragMove:Te=>{e.set({x:Te.target.x(),y:Te.target.y()})},onDragEnd:Te=>{e.set({x:Te.target.x(),y:Te.target.y()})},onDblClick:W,onDblTap:W,onTransformStart:()=>{i(!0),Re.current={cropX:e.cropX,cropY:e.cropY,cropWidth:e.cropWidth,cropHeight:e.cropHeight}},onTransform:Te=>{var Ae;const be=Te.currentTarget,_e=Math.abs(be.scaleX()-1)<1e-7?1:be.scaleX(),xe=Math.abs(be.scaleY()-1)<1e-7?1:be.scaleY();be.scaleX(1),be.scaleY(1);const Le=(Ae=Te.target.getStage())===null||Ae===void 0?void 0:Ae.findOne("Transformer"),pe=1-R/S.width,Ce=Math.min(pe,Math.max(0,e.cropX)),je=1-T/S.height,He=Math.min(je,Math.max(0,e.cropY)),st=Le.getActiveAnchor(),pt=!(st.indexOf("middle")>=0||st.indexOf("center")>=0),ct=!pt&&_e<1&&Re.current.cropHeight>T/S.height;let bt=pt?e.cropWidth:e.cropWidth*_e;ct&&(bt=e.cropWidth);const ht=!pt&&xe<1&&Re.current.cropWidth>R/S.width;let vt=pt?e.cropHeight:e.cropHeight*xe;ht&&(vt=e.cropHeight),C&&(bt=e.cropWidth,vt=e.cropHeight),e.set({cropX:Ce,cropY:He,x:be.x(),y:be.y(),width:be.width()*_e,height:be.height()*xe,rotation:Te.target.rotation(),cropWidth:Math.min(bt,1-Ce),cropHeight:Math.min(vt,1-He)})},onTransformEnd:Te=>{const Ae=Te.currentTarget;e.set({width:Ae.width(),height:Ae.height(),x:Ae.x(),y:Ae.y(),rotation:Te.target.rotation(),cropWidth:R/S.width,cropHeight:T/S.height}),i(!1)}}),ce.createElement(En,{x:e.x,y:e.y,width:Math.max(e.a.width-e.borderSize,0),height:Math.max(e.a.height-e.borderSize,0),opacity:Me,offsetX:-e.borderSize/2,offsetY:-e.borderSize/2,stroke:e.borderColor,strokeWidth:e.borderSize,listening:!1,visible:!!e.borderSize,rotation:e.rotation,cornerRadius:Math.max(0,G-e.borderSize),hideInExport:!e.showInExport}),e._cropModeEnabled&&ce.createElement(bm,{selector:".page-abs-container",enabled:!0},ce.createElement(En,{x:-window.innerWidth/t.scale,y:-window.innerWidth/t.scale,width:window.innerWidth/t.scale*3,height:window.innerWidth/t.scale*3,fill:"rgba(0,0,0,0.3)"}),ce.createElement(bu,{listening:!1,image:H,x:e.x,y:e.y,width:e.a.width,height:e.a.height,rotation:e.rotation,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur}),ce.createElement(vn,{x:e.x,y:e.y,rotation:e.rotation,scaleX:V,scaleY:V},ce.createElement(bu,{image:S,ref:l,opacity:.4,draggable:!0,x:-e.cropX*S.width,y:-e.cropY*S.height,onDragMove:re,onTransform:re,onTouchMove:Te=>{Te.evt.preventDefault();const Ae=Te.target.getStage().getPointersPositions();var be=Ae[0],_e=Ae[1];const xe=Te.target;if(be&&!_e&&!xe.isDragging()&&Z.current&&(xe.startDrag(),Z.current=!1),be&&_e){sr.hitOnDragEnabled=!0,xe.isDragging()&&(Z.current=!0,xe.stopDrag());const ht=Te.target.getAbsoluteTransform().copy();ht.invert();var Le={x:be.x,y:be.y},pe={x:_e.x,y:_e.y};if(!j.current)return void(j.current=jb(Le,pe));var Ce=jb(Le,pe),je=function(Pt,$t){return Math.sqrt(Math.pow($t.x-Pt.x,2)+Math.pow($t.y-Pt.y,2))}(Le,pe);z.current||(z.current=je);const vt=xe.position();var He={x:Ce.x-vt.x,y:Ce.y-vt.y},st=je/z.current;xe.scaleX(st),xe.scaleY(st);const wr=ht.point(Ce),cr=ht.point(j.current);var pt=wr.x-cr.x,ct=wr.y-cr.y,bt={x:Math.min(0,Ce.x-He.x*st+pt),y:Math.min(0,Ce.y-He.y*st+ct)};xe.position(bt),z.current=je,j.current=Ce,re(Te)}},onTouchEnd:Te=>{z.current=0,j.current=null,sr.hitOnDragEnabled=!1}}),ce.createElement(lp,Object.assign({ref:D},$k)),ce.createElement(En,{width:R,height:T,ref:Y,listening:!1,onTransform:Te=>{if(e.cropX<Math.abs(Te.target.x()/S.width)&&Te.target.x()<0&&e.cropX>0){const je=(e.cropWidth+e.cropX)*S.width;Te.target.scaleX(1),Te.target.width(je)}if(e.cropY<Math.abs(Te.target.y()/S.height)&&Te.target.y()<0&&e.cropY>0){const je=(e.cropHeight+e.cropY)*S.height;Te.target.scaleY(1),Te.target.height(je)}Te.target.x()<-e.cropX*S.width-1e-9&&(Te.target.x(-e.cropX*S.width),Te.target.scaleX(1)),Te.target.y()<-e.cropY*S.height-1e-9&&(Te.target.y(-e.cropY*S.height),Te.target.scaleY(1));const Ae=Math.min(1,Math.max(0,e.cropX+Te.target.x()/S.width)),be=Math.min(1,Math.max(0,Te.target.y()/S.height+e.cropY)),_e=Te.target.width()*Te.target.scaleX(),xe=Te.target.height()*Te.target.scaleY(),Le=Math.min(1-Ae,_e/S.width),pe=Math.min(1-be,xe/S.height),Ce=Te.target.getAbsolutePosition(Te.target.getParent().getParent());Te.target.scale({x:1,y:1}),Te.target.position({x:0,y:0}),e.set({x:Ce.x,y:Ce.y,cropX:Ae,cropY:be,cropWidth:Le,cropHeight:pe,width:Math.min(_e*V,S.width*(1-Ae)*V),height:Math.min(xe*V,S.height*(1-be)*V)})}}),ce.createElement(lp,Object.assign({ref:U},Gk,{visible:e.resizable})))))});var A1={exports:{}};/*!
|
|
101
101
|
* Quill Editor v1.3.7
|
|
102
102
|
* https://quilljs.com/
|
|
103
103
|
* Copyright (c) 2014, Jason Chen
|
|
@@ -137,7 +137,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
137
137
|
`),_e}function de(be,_e){if(W(be)&&be.nextElementSibling!=null&&!re(_e,`
|
|
138
138
|
|
|
139
139
|
`)){var xe=be.offsetHeight+parseFloat(Z(be).marginTop)+parseFloat(Z(be).marginBottom);be.nextElementSibling.offsetTop>be.offsetTop+xe*1.5&&_e.insert(`
|
|
140
|
-
`)}return _e}function Te(be,_e){var xe={},Le=be.style||{};return Le.fontStyle&&Z(be).fontStyle==="italic"&&(xe.italic=!0),Le.fontWeight&&(Z(be).fontWeight.startsWith("bold")||parseInt(Z(be).fontWeight)>=700)&&(xe.bold=!0),Object.keys(xe).length>0&&(_e=z(_e,xe)),parseFloat(Le.textIndent||0)>0&&(_e=new v.default().insert(" ").concat(_e)),_e}function Ae(be,_e){var xe=be.data;if(be.parentNode.tagName==="O:P")return _e.insert(xe.trim());if(xe.trim().length===0&&be.parentNode.classList.contains("ql-clipboard"))return _e;if(!Z(be.parentNode).whiteSpace.startsWith("pre")){var Le=function(Ce,je){return je=je.replace(/[^\u00a0]/g,""),je.length<1&&Ce?" ":je};xe=xe.replace(/\r\n/g," ").replace(/\n/g," "),xe=xe.replace(/\s\s+/g,Le.bind(Le,!0)),(be.previousSibling==null&&W(be.parentNode)||be.previousSibling!=null&&W(be.previousSibling))&&(xe=xe.replace(/^\s+/,Le.bind(Le,!1))),(be.nextSibling==null&&W(be.parentNode)||be.nextSibling!=null&&W(be.nextSibling))&&(xe=xe.replace(/\s+$/,Le.bind(Le,!1)))}return _e.insert(xe)}n.default=j,n.matchAttributor=ue,n.matchBlot=le,n.matchNewline=Pe,n.matchSpacing=de,n.matchText=Ae},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(x,E){for(var S=0;S<E.length;S++){var b=E[S];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,E,S){return E&&y(x.prototype,E),S&&y(x,S),x}}(),l=function y(x,E,S){x===null&&(x=Function.prototype);var b=Object.getOwnPropertyDescriptor(x,E);if(b===void 0){var w=Object.getPrototypeOf(x);return w===null?void 0:y(w,E,S)}else{if("value"in b)return b.value;var _=b.get;return _===void 0?void 0:_.call(S)}},o=i(6),u=d(o);function d(y){return y&&y.__esModule?y:{default:y}}function f(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function v(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function g(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var c=function(y){g(x,y);function x(){return f(this,x),v(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,[{key:"optimize",value:function(S){l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,S),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return l(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),x}(u.default);c.blotName="bold",c.tagName=["STRONG","B"],n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var a=function(){function k(C,q){var G=[],J=!0,ae=!1,H=void 0;try{for(var V=C[Symbol.iterator](),Y;!(J=(Y=V.next()).done)&&(G.push(Y.value),!(q&&G.length===q));J=!0);}catch(U){ae=!0,H=U}finally{try{!J&&V.return&&V.return()}finally{if(ae)throw H}}return G}return function(C,q){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return k(C,q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function k(C,q){for(var G=0;G<q.length;G++){var J=q[G];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(C,J.key,J)}}return function(C,q,G){return q&&k(C.prototype,q),G&&k(C,G),C}}(),o=i(2),u=S(o),d=i(0),f=S(d),v=i(5),g=S(v),c=i(10),y=S(c),x=i(9),E=S(x);function S(k){return k&&k.__esModule?k:{default:k}}function b(k,C,q){return C in k?Object.defineProperty(k,C,{value:q,enumerable:!0,configurable:!0,writable:!0}):k[C]=q,k}function w(k,C){if(!(k instanceof C))throw new TypeError("Cannot call a class as a function")}function _(k,C){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:k}function A(k,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);k.prototype=Object.create(C&&C.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(k,C):k.__proto__=C)}var M=(0,y.default)("quill:toolbar"),O=function(k){A(C,k);function C(q,G){w(this,C);var J=_(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,q,G));if(Array.isArray(J.options.container)){var ae=document.createElement("div");R(ae,J.options.container),q.container.parentNode.insertBefore(ae,q.container),J.container=ae}else typeof J.options.container=="string"?J.container=document.querySelector(J.options.container):J.container=J.options.container;if(!(J.container instanceof HTMLElement)){var H;return H=M.error("Container required for toolbar",J.options),_(J,H)}return J.container.classList.add("ql-toolbar"),J.controls=[],J.handlers={},Object.keys(J.options.handlers).forEach(function(V){J.addHandler(V,J.options.handlers[V])}),[].forEach.call(J.container.querySelectorAll("button, select"),function(V){J.attach(V)}),J.quill.on(g.default.events.EDITOR_CHANGE,function(V,Y){V===g.default.events.SELECTION_CHANGE&&J.update(Y)}),J.quill.on(g.default.events.SCROLL_OPTIMIZE,function(){var V=J.quill.selection.getRange(),Y=a(V,1),U=Y[0];J.update(U)}),J}return l(C,[{key:"addHandler",value:function(G,J){this.handlers[G]=J}},{key:"attach",value:function(G){var J=this,ae=[].find.call(G.classList,function(V){return V.indexOf("ql-")===0});if(ae){if(ae=ae.slice(3),G.tagName==="BUTTON"&&G.setAttribute("type","button"),this.handlers[ae]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[ae]==null){M.warn("ignoring attaching to disabled format",ae,G);return}if(f.default.query(ae)==null){M.warn("ignoring attaching to nonexistent format",ae,G);return}}var H=G.tagName==="SELECT"?"change":"click";G.addEventListener(H,function(V){var Y=void 0;if(G.tagName==="SELECT"){if(G.selectedIndex<0)return;var U=G.options[G.selectedIndex];U.hasAttribute("selected")?Y=!1:Y=U.value||!1}else G.classList.contains("ql-active")?Y=!1:Y=G.value||!G.hasAttribute("value"),V.preventDefault();J.quill.focus();var D=J.quill.selection.getRange(),j=a(D,1),z=j[0];if(J.handlers[ae]!=null)J.handlers[ae].call(J,Y);else if(f.default.query(ae).prototype instanceof f.default.Embed){if(Y=prompt("Enter "+ae),!Y)return;J.quill.updateContents(new u.default().retain(z.index).delete(z.length).insert(b({},ae,Y)),g.default.sources.USER)}else J.quill.format(ae,Y,g.default.sources.USER);J.update(z)}),this.controls.push([ae,G])}}},{key:"update",value:function(G){var J=G==null?{}:this.quill.getFormat(G);this.controls.forEach(function(ae){var H=a(ae,2),V=H[0],Y=H[1];if(Y.tagName==="SELECT"){var U=void 0;if(G==null)U=null;else if(J[V]==null)U=Y.querySelector("option[selected]");else if(!Array.isArray(J[V])){var D=J[V];typeof D=="string"&&(D=D.replace(/\"/g,'\\"')),U=Y.querySelector('option[value="'+D+'"]')}U==null?(Y.value="",Y.selectedIndex=-1):U.selected=!0}else if(G==null)Y.classList.remove("ql-active");else if(Y.hasAttribute("value")){var j=J[V]===Y.getAttribute("value")||J[V]!=null&&J[V].toString()===Y.getAttribute("value")||J[V]==null&&!Y.getAttribute("value");Y.classList.toggle("ql-active",j)}else Y.classList.toggle("ql-active",J[V]!=null)})}}]),C}(E.default);O.DEFAULTS={};function L(k,C,q){var G=document.createElement("button");G.setAttribute("type","button"),G.classList.add("ql-"+C),q!=null&&(G.value=q),k.appendChild(G)}function R(k,C){Array.isArray(C[0])||(C=[C]),C.forEach(function(q){var G=document.createElement("span");G.classList.add("ql-formats"),q.forEach(function(J){if(typeof J=="string")L(G,J);else{var ae=Object.keys(J)[0],H=J[ae];Array.isArray(H)?T(G,ae,H):L(G,ae,H)}}),k.appendChild(G)})}function T(k,C,q){var G=document.createElement("select");G.classList.add("ql-"+C),q.forEach(function(J){var ae=document.createElement("option");J!==!1?ae.setAttribute("value",J):ae.setAttribute("selected","selected"),G.appendChild(ae)}),k.appendChild(G)}O.DEFAULTS={container:null,handlers:{clean:function(){var C=this,q=this.quill.getSelection();if(q!=null)if(q.length==0){var G=this.quill.getFormat();Object.keys(G).forEach(function(J){f.default.query(J,f.default.Scope.INLINE)!=null&&C.quill.format(J,!1)})}else this.quill.removeFormat(q,g.default.sources.USER)},direction:function(C){var q=this.quill.getFormat().align;C==="rtl"&&q==null?this.quill.format("align","right",g.default.sources.USER):!C&&q==="right"&&this.quill.format("align",!1,g.default.sources.USER),this.quill.format("direction",C,g.default.sources.USER)},indent:function(C){var q=this.quill.getSelection(),G=this.quill.getFormat(q),J=parseInt(G.indent||0);if(C==="+1"||C==="-1"){var ae=C==="+1"?1:-1;G.direction==="rtl"&&(ae*=-1),this.quill.format("indent",J+ae,g.default.sources.USER)}},link:function(C){C===!0&&(C=prompt("Enter link URL:")),this.quill.format("link",C,g.default.sources.USER)},list:function(C){var q=this.quill.getSelection(),G=this.quill.getFormat(q);C==="check"?G.list==="checked"||G.list==="unchecked"?this.quill.format("list",!1,g.default.sources.USER):this.quill.format("list","unchecked",g.default.sources.USER):this.quill.format("list",C,g.default.sources.USER)}}},n.default=O,n.addControls=R},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(x,E){for(var S=0;S<E.length;S++){var b=E[S];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,E,S){return E&&y(x.prototype,E),S&&y(x,S),x}}(),l=function y(x,E,S){x===null&&(x=Function.prototype);var b=Object.getOwnPropertyDescriptor(x,E);if(b===void 0){var w=Object.getPrototypeOf(x);return w===null?void 0:y(w,E,S)}else{if("value"in b)return b.value;var _=b.get;return _===void 0?void 0:_.call(S)}},o=i(28),u=d(o);function d(y){return y&&y.__esModule?y:{default:y}}function f(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function v(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function g(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var c=function(y){g(x,y);function x(E,S){f(this,x);var b=v(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,E));return b.label.innerHTML=S,b.container.classList.add("ql-color-picker"),[].slice.call(b.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(w){w.classList.add("ql-primary")}),b}return a(x,[{key:"buildItem",value:function(S){var b=l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"buildItem",this).call(this,S);return b.style.backgroundColor=S.getAttribute("value")||"",b}},{key:"selectItem",value:function(S,b){l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"selectItem",this).call(this,S,b);var w=this.label.querySelector(".ql-color-label"),_=S&&S.getAttribute("data-value")||"";w&&(w.tagName==="line"?w.style.stroke=_:w.style.fill=_)}}]),x}(u.default);n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(x,E){for(var S=0;S<E.length;S++){var b=E[S];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,E,S){return E&&y(x.prototype,E),S&&y(x,S),x}}(),l=function y(x,E,S){x===null&&(x=Function.prototype);var b=Object.getOwnPropertyDescriptor(x,E);if(b===void 0){var w=Object.getPrototypeOf(x);return w===null?void 0:y(w,E,S)}else{if("value"in b)return b.value;var _=b.get;return _===void 0?void 0:_.call(S)}},o=i(28),u=d(o);function d(y){return y&&y.__esModule?y:{default:y}}function f(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function v(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function g(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var c=function(y){g(x,y);function x(E,S){f(this,x);var b=v(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,E));return b.container.classList.add("ql-icon-picker"),[].forEach.call(b.container.querySelectorAll(".ql-picker-item"),function(w){w.innerHTML=S[w.getAttribute("data-value")||""]}),b.defaultItem=b.container.querySelector(".ql-selected"),b.selectItem(b.defaultItem),b}return a(x,[{key:"selectItem",value:function(S,b){l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"selectItem",this).call(this,S,b),S=S||this.defaultItem,this.label.innerHTML=S.innerHTML}}]),x}(u.default);n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function u(d,f){for(var v=0;v<f.length;v++){var g=f[v];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(d,g.key,g)}}return function(d,f,v){return f&&u(d.prototype,f),v&&u(d,v),d}}();function l(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}var o=function(){function u(d,f){var v=this;l(this,u),this.quill=d,this.boundsContainer=f||document.body,this.root=d.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){v.root.style.marginTop=-1*v.quill.root.scrollTop+"px"}),this.hide()}return a(u,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(f){var v=f.left+f.width/2-this.root.offsetWidth/2,g=f.bottom+this.quill.root.scrollTop;this.root.style.left=v+"px",this.root.style.top=g+"px",this.root.classList.remove("ql-flip");var c=this.boundsContainer.getBoundingClientRect(),y=this.root.getBoundingClientRect(),x=0;if(y.right>c.right&&(x=c.right-y.right,this.root.style.left=v+x+"px"),y.left<c.left&&(x=c.left-y.left,this.root.style.left=v+x+"px"),y.bottom>c.bottom){var E=y.bottom-y.top,S=f.bottom-f.top+E;this.root.style.top=g-S+"px",this.root.classList.add("ql-flip")}return x}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),u}();n.default=o},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function T(k,C){var q=[],G=!0,J=!1,ae=void 0;try{for(var H=k[Symbol.iterator](),V;!(G=(V=H.next()).done)&&(q.push(V.value),!(C&&q.length===C));G=!0);}catch(Y){J=!0,ae=Y}finally{try{!G&&H.return&&H.return()}finally{if(J)throw ae}}return q}return function(k,C){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return T(k,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function T(k,C,q){k===null&&(k=Function.prototype);var G=Object.getOwnPropertyDescriptor(k,C);if(G===void 0){var J=Object.getPrototypeOf(k);return J===null?void 0:T(J,C,q)}else{if("value"in G)return G.value;var ae=G.get;return ae===void 0?void 0:ae.call(q)}},o=function(){function T(k,C){for(var q=0;q<C.length;q++){var G=C[q];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(k,G.key,G)}}return function(k,C,q){return C&&T(k.prototype,C),q&&T(k,q),k}}(),u=i(3),d=w(u),f=i(8),v=w(f),g=i(43),c=w(g),y=i(27),x=w(y),E=i(15),S=i(41),b=w(S);function w(T){return T&&T.__esModule?T:{default:T}}function _(T,k){if(!(T instanceof k))throw new TypeError("Cannot call a class as a function")}function A(T,k){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:T}function M(T,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);T.prototype=Object.create(k&&k.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(T,k):T.__proto__=k)}var O=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],L=function(T){M(k,T);function k(C,q){_(this,k),q.modules.toolbar!=null&&q.modules.toolbar.container==null&&(q.modules.toolbar.container=O);var G=A(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,C,q));return G.quill.container.classList.add("ql-snow"),G}return o(k,[{key:"extendToolbar",value:function(q){q.container.classList.add("ql-snow"),this.buildButtons([].slice.call(q.container.querySelectorAll("button")),b.default),this.buildPickers([].slice.call(q.container.querySelectorAll("select")),b.default),this.tooltip=new R(this.quill,this.options.bounds),q.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(G,J){q.handlers.link.call(q,!J.format.link)})}}]),k}(c.default);L.DEFAULTS=(0,d.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(k){if(k){var C=this.quill.getSelection();if(C==null||C.length==0)return;var q=this.quill.getText(C);/^\S+@\S+\.\S+$/.test(q)&&q.indexOf("mailto:")!==0&&(q="mailto:"+q);var G=this.quill.theme.tooltip;G.edit("link",q)}else this.quill.format("link",!1)}}}}});var R=function(T){M(k,T);function k(C,q){_(this,k);var G=A(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,C,q));return G.preview=G.root.querySelector("a.ql-preview"),G}return o(k,[{key:"listen",value:function(){var q=this;l(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(G){q.root.classList.contains("ql-editing")?q.save():q.edit("link",q.preview.textContent),G.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(G){if(q.linkRange!=null){var J=q.linkRange;q.restoreFocus(),q.quill.formatText(J,"link",!1,v.default.sources.USER),delete q.linkRange}G.preventDefault(),q.hide()}),this.quill.on(v.default.events.SELECTION_CHANGE,function(G,J,ae){if(G!=null){if(G.length===0&&ae===v.default.sources.USER){var H=q.quill.scroll.descendant(x.default,G.index),V=a(H,2),Y=V[0],U=V[1];if(Y!=null){q.linkRange=new E.Range(G.index-U,Y.length());var D=x.default.formats(Y.domNode);q.preview.textContent=D,q.preview.setAttribute("href",D),q.show(),q.position(q.quill.getBounds(q.linkRange));return}}else delete q.linkRange;q.hide()}})}},{key:"show",value:function(){l(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),k}(g.BaseTooltip);R.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(29),l=pe(a),o=i(36),u=i(38),d=i(64),f=i(65),v=pe(f),g=i(66),c=pe(g),y=i(67),x=pe(y),E=i(37),S=i(26),b=i(39),w=i(40),_=i(56),A=pe(_),M=i(68),O=pe(M),L=i(27),R=pe(L),T=i(69),k=pe(T),C=i(70),q=pe(C),G=i(71),J=pe(G),ae=i(72),H=pe(ae),V=i(73),Y=pe(V),U=i(13),D=pe(U),j=i(74),z=pe(j),Z=i(75),re=pe(Z),W=i(57),Q=pe(W),se=i(41),ue=pe(se),le=i(28),ye=pe(le),Re=i(59),Me=pe(Re),Pe=i(60),de=pe(Pe),Te=i(61),Ae=pe(Te),be=i(108),_e=pe(be),xe=i(62),Le=pe(xe);function pe(Ce){return Ce&&Ce.__esModule?Ce:{default:Ce}}l.default.register({"attributors/attribute/direction":u.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":E.BackgroundClass,"attributors/class/color":S.ColorClass,"attributors/class/direction":u.DirectionClass,"attributors/class/font":b.FontClass,"attributors/class/size":w.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":E.BackgroundStyle,"attributors/style/color":S.ColorStyle,"attributors/style/direction":u.DirectionStyle,"attributors/style/font":b.FontStyle,"attributors/style/size":w.SizeStyle},!0),l.default.register({"formats/align":o.AlignClass,"formats/direction":u.DirectionClass,"formats/indent":d.IndentClass,"formats/background":E.BackgroundStyle,"formats/color":S.ColorStyle,"formats/font":b.FontClass,"formats/size":w.SizeClass,"formats/blockquote":v.default,"formats/code-block":D.default,"formats/header":c.default,"formats/list":x.default,"formats/bold":A.default,"formats/code":U.Code,"formats/italic":O.default,"formats/link":R.default,"formats/script":k.default,"formats/strike":q.default,"formats/underline":J.default,"formats/image":H.default,"formats/video":Y.default,"formats/list/item":y.ListItem,"modules/formula":z.default,"modules/syntax":re.default,"modules/toolbar":Q.default,"themes/bubble":_e.default,"themes/snow":Le.default,"ui/icons":ue.default,"ui/picker":ye.default,"ui/icon-picker":de.default,"ui/color-picker":Me.default,"ui/tooltip":Ae.default},!0),n.default=l.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var a=function(){function x(E,S){for(var b=0;b<S.length;b++){var w=S[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(E,w.key,w)}}return function(E,S,b){return S&&x(E.prototype,S),b&&x(E,b),E}}(),l=function x(E,S,b){E===null&&(E=Function.prototype);var w=Object.getOwnPropertyDescriptor(E,S);if(w===void 0){var _=Object.getPrototypeOf(E);return _===null?void 0:x(_,S,b)}else{if("value"in w)return w.value;var A=w.get;return A===void 0?void 0:A.call(b)}},o=i(0),u=d(o);function d(x){return x&&x.__esModule?x:{default:x}}function f(x,E){if(!(x instanceof E))throw new TypeError("Cannot call a class as a function")}function v(x,E){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:x}function g(x,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);x.prototype=Object.create(E&&E.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(x,E):x.__proto__=E)}var c=function(x){g(E,x);function E(){return f(this,E),v(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return a(E,[{key:"add",value:function(b,w){if(w==="+1"||w==="-1"){var _=this.value(b)||0;w=w==="+1"?_+1:_-1}return w===0?(this.remove(b),!0):l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"add",this).call(this,b,w)}},{key:"canAdd",value:function(b,w){return l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"canAdd",this).call(this,b,w)||l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"canAdd",this).call(this,b,parseInt(w))}},{key:"value",value:function(b){return parseInt(l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"value",this).call(this,b))||void 0}}]),E}(u.default.Attributor.Class),y=new c("indent","ql-indent",{scope:u.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(4),l=o(a);function o(g){return g&&g.__esModule?g:{default:g}}function u(g,c){if(!(g instanceof c))throw new TypeError("Cannot call a class as a function")}function d(g,c){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:g}function f(g,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);g.prototype=Object.create(c&&c.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(g,c):g.__proto__=c)}var v=function(g){f(c,g);function c(){return u(this,c),d(this,(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments))}return c}(l.default);v.blotName="blockquote",v.tagName="blockquote",n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function c(y,x){for(var E=0;E<x.length;E++){var S=x[E];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(y,S.key,S)}}return function(y,x,E){return x&&c(y.prototype,x),E&&c(y,E),y}}(),l=i(4),o=u(l);function u(c){return c&&c.__esModule?c:{default:c}}function d(c,y){if(!(c instanceof y))throw new TypeError("Cannot call a class as a function")}function f(c,y){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:c}function v(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(c,y):c.__proto__=y)}var g=function(c){v(y,c);function y(){return d(this,y),f(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,null,[{key:"formats",value:function(E){return this.tagName.indexOf(E.tagName)+1}}]),y}(o.default);g.blotName="header",g.tagName=["H1","H2","H3","H4","H5","H6"],n.default=g},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var a=function(){function _(A,M){for(var O=0;O<M.length;O++){var L=M[O];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(A,L.key,L)}}return function(A,M,O){return M&&_(A.prototype,M),O&&_(A,O),A}}(),l=function _(A,M,O){A===null&&(A=Function.prototype);var L=Object.getOwnPropertyDescriptor(A,M);if(L===void 0){var R=Object.getPrototypeOf(A);return R===null?void 0:_(R,M,O)}else{if("value"in L)return L.value;var T=L.get;return T===void 0?void 0:T.call(O)}},o=i(0),u=c(o),d=i(4),f=c(d),v=i(25),g=c(v);function c(_){return _&&_.__esModule?_:{default:_}}function y(_,A,M){return A in _?Object.defineProperty(_,A,{value:M,enumerable:!0,configurable:!0,writable:!0}):_[A]=M,_}function x(_,A){if(!(_ instanceof A))throw new TypeError("Cannot call a class as a function")}function E(_,A){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:_}function S(_,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);_.prototype=Object.create(A&&A.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(_,A):_.__proto__=A)}var b=function(_){S(A,_);function A(){return x(this,A),E(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return a(A,[{key:"format",value:function(O,L){O===w.blotName&&!L?this.replaceWith(u.default.create(this.statics.scope)):l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"format",this).call(this,O,L)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(O,L){return this.parent.isolate(this.offset(this.parent),this.length()),O===this.parent.statics.blotName?(this.parent.replaceWith(O,L),this):(this.parent.unwrap(),l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replaceWith",this).call(this,O,L))}}],[{key:"formats",value:function(O){return O.tagName===this.tagName?void 0:l(A.__proto__||Object.getPrototypeOf(A),"formats",this).call(this,O)}}]),A}(f.default);b.blotName="list-item",b.tagName="LI";var w=function(_){S(A,_),a(A,null,[{key:"create",value:function(O){var L=O==="ordered"?"OL":"UL",R=l(A.__proto__||Object.getPrototypeOf(A),"create",this).call(this,L);return(O==="checked"||O==="unchecked")&&R.setAttribute("data-checked",O==="checked"),R}},{key:"formats",value:function(O){if(O.tagName==="OL")return"ordered";if(O.tagName==="UL")return O.hasAttribute("data-checked")?O.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function A(M){x(this,A);var O=E(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,M)),L=function(T){if(T.target.parentNode===M){var k=O.statics.formats(M),C=u.default.find(T.target);k==="checked"?C.format("list","unchecked"):k==="unchecked"&&C.format("list","checked")}};return M.addEventListener("touchstart",L),M.addEventListener("mousedown",L),O}return a(A,[{key:"format",value:function(O,L){this.children.length>0&&this.children.tail.format(O,L)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(O,L){if(O instanceof b)l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,O,L);else{var R=L==null?this.length():L.offset(this),T=this.split(R);T.parent.insertBefore(O,T)}}},{key:"optimize",value:function(O){l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,O);var L=this.next;L!=null&&L.prev===this&&L.statics.blotName===this.statics.blotName&&L.domNode.tagName===this.domNode.tagName&&L.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(L.moveChildren(this),L.remove())}},{key:"replace",value:function(O){if(O.statics.blotName!==this.statics.blotName){var L=u.default.create(this.statics.defaultChild);O.moveChildren(L),this.appendChild(L)}l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replace",this).call(this,O)}}]),A}(g.default);w.blotName="list",w.scope=u.default.Scope.BLOCK_BLOT,w.tagName=["OL","UL"],w.defaultChild="list-item",w.allowedChildren=[b],n.ListItem=b,n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(56),l=o(a);function o(g){return g&&g.__esModule?g:{default:g}}function u(g,c){if(!(g instanceof c))throw new TypeError("Cannot call a class as a function")}function d(g,c){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:g}function f(g,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);g.prototype=Object.create(c&&c.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(g,c):g.__proto__=c)}var v=function(g){f(c,g);function c(){return u(this,c),d(this,(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments))}return c}(l.default);v.blotName="italic",v.tagName=["EM","I"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(x,E){for(var S=0;S<E.length;S++){var b=E[S];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,E,S){return E&&y(x.prototype,E),S&&y(x,S),x}}(),l=function y(x,E,S){x===null&&(x=Function.prototype);var b=Object.getOwnPropertyDescriptor(x,E);if(b===void 0){var w=Object.getPrototypeOf(x);return w===null?void 0:y(w,E,S)}else{if("value"in b)return b.value;var _=b.get;return _===void 0?void 0:_.call(S)}},o=i(6),u=d(o);function d(y){return y&&y.__esModule?y:{default:y}}function f(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function v(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function g(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var c=function(y){g(x,y);function x(){return f(this,x),v(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,null,[{key:"create",value:function(S){return S==="super"?document.createElement("sup"):S==="sub"?document.createElement("sub"):l(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,S)}},{key:"formats",value:function(S){if(S.tagName==="SUB")return"sub";if(S.tagName==="SUP")return"super"}}]),x}(u.default);c.blotName="script",c.tagName=["SUB","SUP"],n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(6),l=o(a);function o(g){return g&&g.__esModule?g:{default:g}}function u(g,c){if(!(g instanceof c))throw new TypeError("Cannot call a class as a function")}function d(g,c){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:g}function f(g,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);g.prototype=Object.create(c&&c.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(g,c):g.__proto__=c)}var v=function(g){f(c,g);function c(){return u(this,c),d(this,(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments))}return c}(l.default);v.blotName="strike",v.tagName="S",n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(6),l=o(a);function o(g){return g&&g.__esModule?g:{default:g}}function u(g,c){if(!(g instanceof c))throw new TypeError("Cannot call a class as a function")}function d(g,c){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:g}function f(g,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);g.prototype=Object.create(c&&c.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(g,c):g.__proto__=c)}var v=function(g){f(c,g);function c(){return u(this,c),d(this,(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments))}return c}(l.default);v.blotName="underline",v.tagName="U",n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function E(S,b){for(var w=0;w<b.length;w++){var _=b[w];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(S,_.key,_)}}return function(S,b,w){return b&&E(S.prototype,b),w&&E(S,w),S}}(),l=function E(S,b,w){S===null&&(S=Function.prototype);var _=Object.getOwnPropertyDescriptor(S,b);if(_===void 0){var A=Object.getPrototypeOf(S);return A===null?void 0:E(A,b,w)}else{if("value"in _)return _.value;var M=_.get;return M===void 0?void 0:M.call(w)}},o=i(0),u=f(o),d=i(27);function f(E){return E&&E.__esModule?E:{default:E}}function v(E,S){if(!(E instanceof S))throw new TypeError("Cannot call a class as a function")}function g(E,S){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:E}function c(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);E.prototype=Object.create(S&&S.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(E,S):E.__proto__=S)}var y=["alt","height","width"],x=function(E){c(S,E);function S(){return v(this,S),g(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return a(S,[{key:"format",value:function(w,_){y.indexOf(w)>-1?_?this.domNode.setAttribute(w,_):this.domNode.removeAttribute(w):l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"format",this).call(this,w,_)}}],[{key:"create",value:function(w){var _=l(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,w);return typeof w=="string"&&_.setAttribute("src",this.sanitize(w)),_}},{key:"formats",value:function(w){return y.reduce(function(_,A){return w.hasAttribute(A)&&(_[A]=w.getAttribute(A)),_},{})}},{key:"match",value:function(w){return/\.(jpe?g|gif|png)$/.test(w)||/^data:image\/.+;base64/.test(w)}},{key:"sanitize",value:function(w){return(0,d.sanitize)(w,["http","https","data"])?w:"//:0"}},{key:"value",value:function(w){return w.getAttribute("src")}}]),S}(u.default.Embed);x.blotName="image",x.tagName="IMG",n.default=x},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function E(S,b){for(var w=0;w<b.length;w++){var _=b[w];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(S,_.key,_)}}return function(S,b,w){return b&&E(S.prototype,b),w&&E(S,w),S}}(),l=function E(S,b,w){S===null&&(S=Function.prototype);var _=Object.getOwnPropertyDescriptor(S,b);if(_===void 0){var A=Object.getPrototypeOf(S);return A===null?void 0:E(A,b,w)}else{if("value"in _)return _.value;var M=_.get;return M===void 0?void 0:M.call(w)}},o=i(4),u=i(27),d=f(u);function f(E){return E&&E.__esModule?E:{default:E}}function v(E,S){if(!(E instanceof S))throw new TypeError("Cannot call a class as a function")}function g(E,S){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:E}function c(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);E.prototype=Object.create(S&&S.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(E,S):E.__proto__=S)}var y=["height","width"],x=function(E){c(S,E);function S(){return v(this,S),g(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return a(S,[{key:"format",value:function(w,_){y.indexOf(w)>-1?_?this.domNode.setAttribute(w,_):this.domNode.removeAttribute(w):l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"format",this).call(this,w,_)}}],[{key:"create",value:function(w){var _=l(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,w);return _.setAttribute("frameborder","0"),_.setAttribute("allowfullscreen",!0),_.setAttribute("src",this.sanitize(w)),_}},{key:"formats",value:function(w){return y.reduce(function(_,A){return w.hasAttribute(A)&&(_[A]=w.getAttribute(A)),_},{})}},{key:"sanitize",value:function(w){return d.default.sanitize(w)}},{key:"value",value:function(w){return w.getAttribute("src")}}]),S}(o.BlockEmbed);x.blotName="video",x.className="ql-video",x.tagName="IFRAME",n.default=x},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var a=function(){function w(_,A){for(var M=0;M<A.length;M++){var O=A[M];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(_,O.key,O)}}return function(_,A,M){return A&&w(_.prototype,A),M&&w(_,M),_}}(),l=function w(_,A,M){_===null&&(_=Function.prototype);var O=Object.getOwnPropertyDescriptor(_,A);if(O===void 0){var L=Object.getPrototypeOf(_);return L===null?void 0:w(L,A,M)}else{if("value"in O)return O.value;var R=O.get;return R===void 0?void 0:R.call(M)}},o=i(35),u=c(o),d=i(5),f=c(d),v=i(9),g=c(v);function c(w){return w&&w.__esModule?w:{default:w}}function y(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}function x(w,_){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:w}function E(w,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);w.prototype=Object.create(_&&_.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(w,_):w.__proto__=_)}var S=function(w){E(_,w);function _(){return y(this,_),x(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,null,[{key:"create",value:function(M){var O=l(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,M);return typeof M=="string"&&(window.katex.render(M,O,{throwOnError:!1,errorColor:"#f00"}),O.setAttribute("data-value",M)),O}},{key:"value",value:function(M){return M.getAttribute("data-value")}}]),_}(u.default);S.blotName="formula",S.className="ql-formula",S.tagName="SPAN";var b=function(w){E(_,w),a(_,null,[{key:"register",value:function(){f.default.register(S,!0)}}]);function _(){y(this,_);var A=x(this,(_.__proto__||Object.getPrototypeOf(_)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return A}return _}(g.default);n.FormulaBlot=S,n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var a=function(){function M(O,L){for(var R=0;R<L.length;R++){var T=L[R];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(O,T.key,T)}}return function(O,L,R){return L&&M(O.prototype,L),R&&M(O,R),O}}(),l=function M(O,L,R){O===null&&(O=Function.prototype);var T=Object.getOwnPropertyDescriptor(O,L);if(T===void 0){var k=Object.getPrototypeOf(O);return k===null?void 0:M(k,L,R)}else{if("value"in T)return T.value;var C=T.get;return C===void 0?void 0:C.call(R)}},o=i(0),u=x(o),d=i(5),f=x(d),v=i(9),g=x(v),c=i(13),y=x(c);function x(M){return M&&M.__esModule?M:{default:M}}function E(M,O){if(!(M instanceof O))throw new TypeError("Cannot call a class as a function")}function S(M,O){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:M}function b(M,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);M.prototype=Object.create(O&&O.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(M,O):M.__proto__=O)}var w=function(M){b(O,M);function O(){return E(this,O),S(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return a(O,[{key:"replaceWith",value:function(R){this.domNode.textContent=this.domNode.textContent,this.attach(),l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replaceWith",this).call(this,R)}},{key:"highlight",value:function(R){var T=this.domNode.textContent;this.cachedText!==T&&((T.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=R(T),this.domNode.normalize(),this.attach()),this.cachedText=T)}}]),O}(y.default);w.className="ql-syntax";var _=new u.default.Attributor.Class("token","hljs",{scope:u.default.Scope.INLINE}),A=function(M){b(O,M),a(O,null,[{key:"register",value:function(){f.default.register(_,!0),f.default.register(w,!0)}}]);function O(L,R){E(this,O);var T=S(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));if(typeof T.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var k=null;return T.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(k),k=setTimeout(function(){T.highlight(),k=null},T.options.interval)}),T.highlight(),T}return a(O,[{key:"highlight",value:function(){var R=this;if(!this.quill.selection.composing){this.quill.update(f.default.sources.USER);var T=this.quill.getSelection();this.quill.scroll.descendants(w).forEach(function(k){k.highlight(R.options.highlight)}),this.quill.update(f.default.sources.SILENT),T!=null&&this.quill.setSelection(T,f.default.sources.SILENT)}}}]),O}(g.default);A.DEFAULTS={highlight:function(){return window.hljs==null?null:function(M){var O=window.hljs.highlightAuto(M);return O.value}}(),interval:1e3},n.CodeBlock=w,n.CodeToken=_,n.default=A},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var a=function O(L,R,T){L===null&&(L=Function.prototype);var k=Object.getOwnPropertyDescriptor(L,R);if(k===void 0){var C=Object.getPrototypeOf(L);return C===null?void 0:O(C,R,T)}else{if("value"in k)return k.value;var q=k.get;return q===void 0?void 0:q.call(T)}},l=function(){function O(L,R){for(var T=0;T<R.length;T++){var k=R[T];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(L,k.key,k)}}return function(L,R,T){return R&&O(L.prototype,R),T&&O(L,T),L}}(),o=i(3),u=E(o),d=i(8),f=E(d),v=i(43),g=E(v),c=i(15),y=i(41),x=E(y);function E(O){return O&&O.__esModule?O:{default:O}}function S(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}function b(O,L){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:O}function w(O,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);O.prototype=Object.create(L&&L.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(O,L):O.__proto__=L)}var _=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],A=function(O){w(L,O);function L(R,T){S(this,L),T.modules.toolbar!=null&&T.modules.toolbar.container==null&&(T.modules.toolbar.container=_);var k=b(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,R,T));return k.quill.container.classList.add("ql-bubble"),k}return l(L,[{key:"extendToolbar",value:function(T){this.tooltip=new M(this.quill,this.options.bounds),this.tooltip.root.appendChild(T.container),this.buildButtons([].slice.call(T.container.querySelectorAll("button")),x.default),this.buildPickers([].slice.call(T.container.querySelectorAll("select")),x.default)}}]),L}(g.default);A.DEFAULTS=(0,u.default)(!0,{},g.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(L){L?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var M=function(O){w(L,O);function L(R,T){S(this,L);var k=b(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,R,T));return k.quill.on(f.default.events.EDITOR_CHANGE,function(C,q,G,J){if(C===f.default.events.SELECTION_CHANGE)if(q!=null&&q.length>0&&J===f.default.sources.USER){k.show(),k.root.style.left="0px",k.root.style.width="",k.root.style.width=k.root.offsetWidth+"px";var ae=k.quill.getLines(q.index,q.length);if(ae.length===1)k.position(k.quill.getBounds(q));else{var H=ae[ae.length-1],V=k.quill.getIndex(H),Y=Math.min(H.length()-1,q.index+q.length-V),U=k.quill.getBounds(new c.Range(V,Y));k.position(U)}}else document.activeElement!==k.textbox&&k.quill.hasFocus()&&k.hide()}),k}return l(L,[{key:"listen",value:function(){var T=this;a(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){T.root.classList.remove("ql-editing")}),this.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!T.root.classList.contains("ql-hidden")){var k=T.quill.getSelection();k!=null&&T.position(T.quill.getBounds(k))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(T){var k=a(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"position",this).call(this,T),C=this.root.querySelector(".ql-tooltip-arrow");if(C.style.marginLeft="",k===0)return k;C.style.marginLeft=-1*k-C.offsetWidth/2+"px"}}]),L}(v.BaseTooltip);M.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=M,n.default=A},function(r,n,i){r.exports=i(63)}]).default})}(A1)),A1.exports}var Jk=Qk();const X8=lc(Jk);var P1={exports:{}},Af={},Wd={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var eO=Wd.exports,Ub;function tO(){return Ub||(Ub=1,function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,a=typeof Ch=="object"&&Ch;(a.global===a||a.window===a||a.self===a)&&(r=a);var l,o=2147483647,u=36,d=1,f=26,v=38,g=700,c=72,y=128,x="-",E=/^xn--/,S=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=u-d,A=Math.floor,M=String.fromCharCode,O;function L(U){throw new RangeError(w[U])}function R(U,D){for(var j=U.length,z=[];j--;)z[j]=D(U[j]);return z}function T(U,D){var j=U.split("@"),z="";j.length>1&&(z=j[0]+"@",U=j[1]),U=U.replace(b,".");var Z=U.split("."),re=R(Z,D).join(".");return z+re}function k(U){for(var D=[],j=0,z=U.length,Z,re;j<z;)Z=U.charCodeAt(j++),Z>=55296&&Z<=56319&&j<z?(re=U.charCodeAt(j++),(re&64512)==56320?D.push(((Z&1023)<<10)+(re&1023)+65536):(D.push(Z),j--)):D.push(Z);return D}function C(U){return R(U,function(D){var j="";return D>65535&&(D-=65536,j+=M(D>>>10&1023|55296),D=56320|D&1023),j+=M(D),j}).join("")}function q(U){return U-48<10?U-22:U-65<26?U-65:U-97<26?U-97:u}function G(U,D){return U+22+75*(U<26)-((D!=0)<<5)}function J(U,D,j){var z=0;for(U=j?A(U/g):U>>1,U+=A(U/D);U>_*f>>1;z+=u)U=A(U/_);return A(z+(_+1)*U/(U+v))}function ae(U){var D=[],j=U.length,z,Z=0,re=y,W=c,Q,se,ue,le,ye,Re,Me,Pe,de;for(Q=U.lastIndexOf(x),Q<0&&(Q=0),se=0;se<Q;++se)U.charCodeAt(se)>=128&&L("not-basic"),D.push(U.charCodeAt(se));for(ue=Q>0?Q+1:0;ue<j;){for(le=Z,ye=1,Re=u;ue>=j&&L("invalid-input"),Me=q(U.charCodeAt(ue++)),(Me>=u||Me>A((o-Z)/ye))&&L("overflow"),Z+=Me*ye,Pe=Re<=W?d:Re>=W+f?f:Re-W,!(Me<Pe);Re+=u)de=u-Pe,ye>A(o/de)&&L("overflow"),ye*=de;z=D.length+1,W=J(Z-le,z,le==0),A(Z/z)>o-re&&L("overflow"),re+=A(Z/z),Z%=z,D.splice(Z++,0,re)}return C(D)}function H(U){var D,j,z,Z,re,W,Q,se,ue,le,ye,Re=[],Me,Pe,de,Te;for(U=k(U),Me=U.length,D=y,j=0,re=c,W=0;W<Me;++W)ye=U[W],ye<128&&Re.push(M(ye));for(z=Z=Re.length,Z&&Re.push(x);z<Me;){for(Q=o,W=0;W<Me;++W)ye=U[W],ye>=D&&ye<Q&&(Q=ye);for(Pe=z+1,Q-D>A((o-j)/Pe)&&L("overflow"),j+=(Q-D)*Pe,D=Q,W=0;W<Me;++W)if(ye=U[W],ye<D&&++j>o&&L("overflow"),ye==D){for(se=j,ue=u;le=ue<=re?d:ue>=re+f?f:ue-re,!(se<le);ue+=u)Te=se-le,de=u-le,Re.push(M(G(le+Te%de,0))),se=A(Te/de);Re.push(M(G(se,0))),re=J(j,Pe,z==Z),j=0,++z}++j,++D}return Re.join("")}function V(U){return T(U,function(D){return E.test(D)?ae(D.slice(4).toLowerCase()):D})}function Y(U){return T(U,function(D){return S.test(D)?"xn--"+H(D):D})}if(l={version:"1.4.1",ucs2:{decode:k,encode:C},decode:ae,encode:H,toASCII:Y,toUnicode:V},n&&i)if(e.exports==n)i.exports=l;else for(O in l)l.hasOwnProperty(O)&&(n[O]=l[O]);else r.punycode=l})(eO)}(Wd,Wd.exports)),Wd.exports}var Bg,qb;function zh(){return qb||(qb=1,Bg=TypeError),Bg}const rO={},nO=Object.freeze(Object.defineProperty({__proto__:null,default:rO},Symbol.toStringTag,{value:"Module"})),iO=e9(nO);var zg,Hb;function _0(){if(Hb)return zg;Hb=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&typeof t.get=="function"?t.get:null,n=e&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=i&&a&&typeof a.get=="function"?a.get:null,o=i&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,d=u?WeakMap.prototype.has:null,f=typeof WeakSet=="function"&&WeakSet.prototype,v=f?WeakSet.prototype.has:null,g=typeof WeakRef=="function"&&WeakRef.prototype,c=g?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,x=Object.prototype.toString,E=Function.prototype.toString,S=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,_=String.prototype.toUpperCase,A=String.prototype.toLowerCase,M=RegExp.prototype.test,O=Array.prototype.concat,L=Array.prototype.join,R=Array.prototype.slice,T=Math.floor,k=typeof BigInt=="function"?BigInt.prototype.valueOf:null,C=Object.getOwnPropertySymbols,q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,G=typeof Symbol=="function"&&typeof Symbol.iterator=="object",J=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===G||!0)?Symbol.toStringTag:null,ae=Object.prototype.propertyIsEnumerable,H=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function($e){return $e.__proto__}:null);function V($e,ze){if($e===1/0||$e===-1/0||$e!==$e||$e&&$e>-1e3&&$e<1e3||M.call(/e/,ze))return ze;var kt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof $e=="number"){var St=$e<0?-T(-$e):T($e);if(St!==$e){var er=String(St),jt=b.call(ze,er.length+1);return w.call(er,kt,"$&_")+"."+w.call(w.call(jt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(ze,kt,"$&_")}var Y=iO,U=Y.custom,D=Pe(U)?U:null,j={__proto__:null,double:'"',single:"'"},z={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};zg=function $e(ze,kt,St,er){var jt=kt||{};if(Ae(jt,"quoteStyle")&&!Ae(j,jt.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ae(jt,"maxStringLength")&&(typeof jt.maxStringLength=="number"?jt.maxStringLength<0&&jt.maxStringLength!==1/0:jt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var vr=Ae(jt,"customInspect")?jt.customInspect:!0;if(typeof vr!="boolean"&&vr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ae(jt,"indent")&&jt.indent!==null&&jt.indent!==" "&&!(parseInt(jt.indent,10)===jt.indent&&jt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ae(jt,"numericSeparator")&&typeof jt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Xt=jt.numericSeparator;if(typeof ze>"u")return"undefined";if(ze===null)return"null";if(typeof ze=="boolean")return ze?"true":"false";if(typeof ze=="string")return pt(ze,jt);if(typeof ze=="number"){if(ze===0)return 1/0/ze>0?"0":"-0";var lr=String(ze);return Xt?V(ze,lr):lr}if(typeof ze=="bigint"){var Oi=String(ze)+"n";return Xt?V(ze,Oi):Oi}var Zn=typeof jt.depth>"u"?5:jt.depth;if(typeof St>"u"&&(St=0),St>=Zn&&Zn>0&&typeof ze=="object")return Q(ze)?"[Array]":"[Object]";var gi=cr(jt,St);if(typeof er>"u")er=[];else if(xe(er,ze)>=0)return"[Circular]";function mn(Ci,Xa,Ps){if(Xa&&(er=R.call(er),er.push(Xa)),Ps){var Ko={depth:jt.depth};return Ae(jt,"quoteStyle")&&(Ko.quoteStyle=jt.quoteStyle),$e(Ci,Ko,St+1,er)}return $e(Ci,jt,St+1,er)}if(typeof ze=="function"&&!ue(ze)){var Yt=_e(ze),sa=$t(ze,mn);return"[Function"+(Yt?": "+Yt:" (anonymous)")+"]"+(sa.length>0?" { "+L.call(sa,", ")+" }":"")}if(Pe(ze)){var Ra=G?w.call(String(ze),/^(Symbol\(.*\))_[^)]*$/,"$1"):q.call(ze);return typeof ze=="object"&&!G?bt(Ra):Ra}if(st(ze)){for(var Un="<"+A.call(String(ze.nodeName)),Ui=ze.attributes||[],Rr=0;Rr<Ui.length;Rr++)Un+=" "+Ui[Rr].name+"="+Z(re(Ui[Rr].value),"double",jt);return Un+=">",ze.childNodes&&ze.childNodes.length&&(Un+="..."),Un+="</"+A.call(String(ze.nodeName))+">",Un}if(Q(ze)){if(ze.length===0)return"[]";var yn=$t(ze,mn);return gi&&!wr(yn)?"["+Pt(yn,gi)+"]":"[ "+L.call(yn,", ")+" ]"}if(le(ze)){var An=$t(ze,mn);return!("cause"in Error.prototype)&&"cause"in ze&&!ae.call(ze,"cause")?"{ ["+String(ze)+"] "+L.call(O.call("[cause]: "+mn(ze.cause),An),", ")+" }":An.length===0?"["+String(ze)+"]":"{ ["+String(ze)+"] "+L.call(An,", ")+" }"}if(typeof ze=="object"&&vr){if(D&&typeof ze[D]=="function"&&Y)return Y(ze,{depth:Zn-St});if(vr!=="symbol"&&typeof ze.inspect=="function")return ze.inspect()}if(Le(ze)){var ba=[];return n&&n.call(ze,function(Ci,Xa){ba.push(mn(Xa,ze,!0)+" => "+mn(Ci,ze))}),vt("Map",r.call(ze),ba,gi)}if(je(ze)){var Mo=[];return o&&o.call(ze,function(Ci){Mo.push(mn(Ci,ze))}),vt("Set",l.call(ze),Mo,gi)}if(pe(ze))return ht("WeakMap");if(He(ze))return ht("WeakSet");if(Ce(ze))return ht("WeakRef");if(Re(ze))return bt(mn(Number(ze)));if(de(ze))return bt(mn(k.call(ze)));if(Me(ze))return bt(y.call(ze));if(ye(ze))return bt(mn(String(ze)));if(typeof window<"u"&&ze===window)return"{ [object Window] }";if(typeof globalThis<"u"&&ze===globalThis||typeof Ch<"u"&&ze===Ch)return"{ [object globalThis] }";if(!se(ze)&&!ue(ze)){var wa=$t(ze,mn),Ya=H?H(ze)===Object.prototype:ze instanceof Object||ze.constructor===Object,Qn=ze instanceof Object?"":"null prototype",_a=!Ya&&J&&Object(ze)===ze&&J in ze?b.call(be(ze),8,-1):Qn?"Object":"",xa=Ya||typeof ze.constructor!="function"?"":ze.constructor.name?ze.constructor.name+" ":"",Io=xa+(_a||Qn?"["+L.call(O.call([],_a||[],Qn||[]),": ")+"] ":"");return wa.length===0?Io+"{}":gi?Io+"{"+Pt(wa,gi)+"}":Io+"{ "+L.call(wa,", ")+" }"}return String(ze)};function Z($e,ze,kt){var St=kt.quoteStyle||ze,er=j[St];return er+$e+er}function re($e){return w.call(String($e),/"/g,""")}function W($e){return!J||!(typeof $e=="object"&&(J in $e||typeof $e[J]<"u"))}function Q($e){return be($e)==="[object Array]"&&W($e)}function se($e){return be($e)==="[object Date]"&&W($e)}function ue($e){return be($e)==="[object RegExp]"&&W($e)}function le($e){return be($e)==="[object Error]"&&W($e)}function ye($e){return be($e)==="[object String]"&&W($e)}function Re($e){return be($e)==="[object Number]"&&W($e)}function Me($e){return be($e)==="[object Boolean]"&&W($e)}function Pe($e){if(G)return $e&&typeof $e=="object"&&$e instanceof Symbol;if(typeof $e=="symbol")return!0;if(!$e||typeof $e!="object"||!q)return!1;try{return q.call($e),!0}catch{}return!1}function de($e){if(!$e||typeof $e!="object"||!k)return!1;try{return k.call($e),!0}catch{}return!1}var Te=Object.prototype.hasOwnProperty||function($e){return $e in this};function Ae($e,ze){return Te.call($e,ze)}function be($e){return x.call($e)}function _e($e){if($e.name)return $e.name;var ze=S.call(E.call($e),/^function\s*([\w$]+)/);return ze?ze[1]:null}function xe($e,ze){if($e.indexOf)return $e.indexOf(ze);for(var kt=0,St=$e.length;kt<St;kt++)if($e[kt]===ze)return kt;return-1}function Le($e){if(!r||!$e||typeof $e!="object")return!1;try{r.call($e);try{l.call($e)}catch{return!0}return $e instanceof Map}catch{}return!1}function pe($e){if(!d||!$e||typeof $e!="object")return!1;try{d.call($e,d);try{v.call($e,v)}catch{return!0}return $e instanceof WeakMap}catch{}return!1}function Ce($e){if(!c||!$e||typeof $e!="object")return!1;try{return c.call($e),!0}catch{}return!1}function je($e){if(!l||!$e||typeof $e!="object")return!1;try{l.call($e);try{r.call($e)}catch{return!0}return $e instanceof Set}catch{}return!1}function He($e){if(!v||!$e||typeof $e!="object")return!1;try{v.call($e,v);try{d.call($e,d)}catch{return!0}return $e instanceof WeakSet}catch{}return!1}function st($e){return!$e||typeof $e!="object"?!1:typeof HTMLElement<"u"&&$e instanceof HTMLElement?!0:typeof $e.nodeName=="string"&&typeof $e.getAttribute=="function"}function pt($e,ze){if($e.length>ze.maxStringLength){var kt=$e.length-ze.maxStringLength,St="... "+kt+" more character"+(kt>1?"s":"");return pt(b.call($e,0,ze.maxStringLength),ze)+St}var er=z[ze.quoteStyle||"single"];er.lastIndex=0;var jt=w.call(w.call($e,er,"\\$1"),/[\x00-\x1f]/g,ct);return Z(jt,"single",ze)}function ct($e){var ze=$e.charCodeAt(0),kt={8:"b",9:"t",10:"n",12:"f",13:"r"}[ze];return kt?"\\"+kt:"\\x"+(ze<16?"0":"")+_.call(ze.toString(16))}function bt($e){return"Object("+$e+")"}function ht($e){return $e+" { ? }"}function vt($e,ze,kt,St){var er=St?Pt(kt,St):L.call(kt,", ");return $e+" ("+ze+") {"+er+"}"}function wr($e){for(var ze=0;ze<$e.length;ze++)if(xe($e[ze],`
|
|
140
|
+
`)}return _e}function Te(be,_e){var xe={},Le=be.style||{};return Le.fontStyle&&Z(be).fontStyle==="italic"&&(xe.italic=!0),Le.fontWeight&&(Z(be).fontWeight.startsWith("bold")||parseInt(Z(be).fontWeight)>=700)&&(xe.bold=!0),Object.keys(xe).length>0&&(_e=z(_e,xe)),parseFloat(Le.textIndent||0)>0&&(_e=new v.default().insert(" ").concat(_e)),_e}function Ae(be,_e){var xe=be.data;if(be.parentNode.tagName==="O:P")return _e.insert(xe.trim());if(xe.trim().length===0&&be.parentNode.classList.contains("ql-clipboard"))return _e;if(!Z(be.parentNode).whiteSpace.startsWith("pre")){var Le=function(Ce,je){return je=je.replace(/[^\u00a0]/g,""),je.length<1&&Ce?" ":je};xe=xe.replace(/\r\n/g," ").replace(/\n/g," "),xe=xe.replace(/\s\s+/g,Le.bind(Le,!0)),(be.previousSibling==null&&W(be.parentNode)||be.previousSibling!=null&&W(be.previousSibling))&&(xe=xe.replace(/^\s+/,Le.bind(Le,!1))),(be.nextSibling==null&&W(be.parentNode)||be.nextSibling!=null&&W(be.nextSibling))&&(xe=xe.replace(/\s+$/,Le.bind(Le,!1)))}return _e.insert(xe)}n.default=j,n.matchAttributor=ue,n.matchBlot=le,n.matchNewline=Pe,n.matchSpacing=de,n.matchText=Ae},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(x,E){for(var S=0;S<E.length;S++){var b=E[S];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,E,S){return E&&y(x.prototype,E),S&&y(x,S),x}}(),l=function y(x,E,S){x===null&&(x=Function.prototype);var b=Object.getOwnPropertyDescriptor(x,E);if(b===void 0){var w=Object.getPrototypeOf(x);return w===null?void 0:y(w,E,S)}else{if("value"in b)return b.value;var _=b.get;return _===void 0?void 0:_.call(S)}},o=i(6),u=d(o);function d(y){return y&&y.__esModule?y:{default:y}}function f(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function v(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function g(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var c=function(y){g(x,y);function x(){return f(this,x),v(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,[{key:"optimize",value:function(S){l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,S),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return l(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),x}(u.default);c.blotName="bold",c.tagName=["STRONG","B"],n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var a=function(){function k(C,q){var G=[],J=!0,ae=!1,H=void 0;try{for(var V=C[Symbol.iterator](),Y;!(J=(Y=V.next()).done)&&(G.push(Y.value),!(q&&G.length===q));J=!0);}catch(U){ae=!0,H=U}finally{try{!J&&V.return&&V.return()}finally{if(ae)throw H}}return G}return function(C,q){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return k(C,q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function k(C,q){for(var G=0;G<q.length;G++){var J=q[G];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(C,J.key,J)}}return function(C,q,G){return q&&k(C.prototype,q),G&&k(C,G),C}}(),o=i(2),u=S(o),d=i(0),f=S(d),v=i(5),g=S(v),c=i(10),y=S(c),x=i(9),E=S(x);function S(k){return k&&k.__esModule?k:{default:k}}function b(k,C,q){return C in k?Object.defineProperty(k,C,{value:q,enumerable:!0,configurable:!0,writable:!0}):k[C]=q,k}function w(k,C){if(!(k instanceof C))throw new TypeError("Cannot call a class as a function")}function _(k,C){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:k}function A(k,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);k.prototype=Object.create(C&&C.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(k,C):k.__proto__=C)}var M=(0,y.default)("quill:toolbar"),O=function(k){A(C,k);function C(q,G){w(this,C);var J=_(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,q,G));if(Array.isArray(J.options.container)){var ae=document.createElement("div");R(ae,J.options.container),q.container.parentNode.insertBefore(ae,q.container),J.container=ae}else typeof J.options.container=="string"?J.container=document.querySelector(J.options.container):J.container=J.options.container;if(!(J.container instanceof HTMLElement)){var H;return H=M.error("Container required for toolbar",J.options),_(J,H)}return J.container.classList.add("ql-toolbar"),J.controls=[],J.handlers={},Object.keys(J.options.handlers).forEach(function(V){J.addHandler(V,J.options.handlers[V])}),[].forEach.call(J.container.querySelectorAll("button, select"),function(V){J.attach(V)}),J.quill.on(g.default.events.EDITOR_CHANGE,function(V,Y){V===g.default.events.SELECTION_CHANGE&&J.update(Y)}),J.quill.on(g.default.events.SCROLL_OPTIMIZE,function(){var V=J.quill.selection.getRange(),Y=a(V,1),U=Y[0];J.update(U)}),J}return l(C,[{key:"addHandler",value:function(G,J){this.handlers[G]=J}},{key:"attach",value:function(G){var J=this,ae=[].find.call(G.classList,function(V){return V.indexOf("ql-")===0});if(ae){if(ae=ae.slice(3),G.tagName==="BUTTON"&&G.setAttribute("type","button"),this.handlers[ae]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[ae]==null){M.warn("ignoring attaching to disabled format",ae,G);return}if(f.default.query(ae)==null){M.warn("ignoring attaching to nonexistent format",ae,G);return}}var H=G.tagName==="SELECT"?"change":"click";G.addEventListener(H,function(V){var Y=void 0;if(G.tagName==="SELECT"){if(G.selectedIndex<0)return;var U=G.options[G.selectedIndex];U.hasAttribute("selected")?Y=!1:Y=U.value||!1}else G.classList.contains("ql-active")?Y=!1:Y=G.value||!G.hasAttribute("value"),V.preventDefault();J.quill.focus();var D=J.quill.selection.getRange(),j=a(D,1),z=j[0];if(J.handlers[ae]!=null)J.handlers[ae].call(J,Y);else if(f.default.query(ae).prototype instanceof f.default.Embed){if(Y=prompt("Enter "+ae),!Y)return;J.quill.updateContents(new u.default().retain(z.index).delete(z.length).insert(b({},ae,Y)),g.default.sources.USER)}else J.quill.format(ae,Y,g.default.sources.USER);J.update(z)}),this.controls.push([ae,G])}}},{key:"update",value:function(G){var J=G==null?{}:this.quill.getFormat(G);this.controls.forEach(function(ae){var H=a(ae,2),V=H[0],Y=H[1];if(Y.tagName==="SELECT"){var U=void 0;if(G==null)U=null;else if(J[V]==null)U=Y.querySelector("option[selected]");else if(!Array.isArray(J[V])){var D=J[V];typeof D=="string"&&(D=D.replace(/\"/g,'\\"')),U=Y.querySelector('option[value="'+D+'"]')}U==null?(Y.value="",Y.selectedIndex=-1):U.selected=!0}else if(G==null)Y.classList.remove("ql-active");else if(Y.hasAttribute("value")){var j=J[V]===Y.getAttribute("value")||J[V]!=null&&J[V].toString()===Y.getAttribute("value")||J[V]==null&&!Y.getAttribute("value");Y.classList.toggle("ql-active",j)}else Y.classList.toggle("ql-active",J[V]!=null)})}}]),C}(E.default);O.DEFAULTS={};function L(k,C,q){var G=document.createElement("button");G.setAttribute("type","button"),G.classList.add("ql-"+C),q!=null&&(G.value=q),k.appendChild(G)}function R(k,C){Array.isArray(C[0])||(C=[C]),C.forEach(function(q){var G=document.createElement("span");G.classList.add("ql-formats"),q.forEach(function(J){if(typeof J=="string")L(G,J);else{var ae=Object.keys(J)[0],H=J[ae];Array.isArray(H)?T(G,ae,H):L(G,ae,H)}}),k.appendChild(G)})}function T(k,C,q){var G=document.createElement("select");G.classList.add("ql-"+C),q.forEach(function(J){var ae=document.createElement("option");J!==!1?ae.setAttribute("value",J):ae.setAttribute("selected","selected"),G.appendChild(ae)}),k.appendChild(G)}O.DEFAULTS={container:null,handlers:{clean:function(){var C=this,q=this.quill.getSelection();if(q!=null)if(q.length==0){var G=this.quill.getFormat();Object.keys(G).forEach(function(J){f.default.query(J,f.default.Scope.INLINE)!=null&&C.quill.format(J,!1)})}else this.quill.removeFormat(q,g.default.sources.USER)},direction:function(C){var q=this.quill.getFormat().align;C==="rtl"&&q==null?this.quill.format("align","right",g.default.sources.USER):!C&&q==="right"&&this.quill.format("align",!1,g.default.sources.USER),this.quill.format("direction",C,g.default.sources.USER)},indent:function(C){var q=this.quill.getSelection(),G=this.quill.getFormat(q),J=parseInt(G.indent||0);if(C==="+1"||C==="-1"){var ae=C==="+1"?1:-1;G.direction==="rtl"&&(ae*=-1),this.quill.format("indent",J+ae,g.default.sources.USER)}},link:function(C){C===!0&&(C=prompt("Enter link URL:")),this.quill.format("link",C,g.default.sources.USER)},list:function(C){var q=this.quill.getSelection(),G=this.quill.getFormat(q);C==="check"?G.list==="checked"||G.list==="unchecked"?this.quill.format("list",!1,g.default.sources.USER):this.quill.format("list","unchecked",g.default.sources.USER):this.quill.format("list",C,g.default.sources.USER)}}},n.default=O,n.addControls=R},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(x,E){for(var S=0;S<E.length;S++){var b=E[S];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,E,S){return E&&y(x.prototype,E),S&&y(x,S),x}}(),l=function y(x,E,S){x===null&&(x=Function.prototype);var b=Object.getOwnPropertyDescriptor(x,E);if(b===void 0){var w=Object.getPrototypeOf(x);return w===null?void 0:y(w,E,S)}else{if("value"in b)return b.value;var _=b.get;return _===void 0?void 0:_.call(S)}},o=i(28),u=d(o);function d(y){return y&&y.__esModule?y:{default:y}}function f(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function v(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function g(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var c=function(y){g(x,y);function x(E,S){f(this,x);var b=v(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,E));return b.label.innerHTML=S,b.container.classList.add("ql-color-picker"),[].slice.call(b.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(w){w.classList.add("ql-primary")}),b}return a(x,[{key:"buildItem",value:function(S){var b=l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"buildItem",this).call(this,S);return b.style.backgroundColor=S.getAttribute("value")||"",b}},{key:"selectItem",value:function(S,b){l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"selectItem",this).call(this,S,b);var w=this.label.querySelector(".ql-color-label"),_=S&&S.getAttribute("data-value")||"";w&&(w.tagName==="line"?w.style.stroke=_:w.style.fill=_)}}]),x}(u.default);n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(x,E){for(var S=0;S<E.length;S++){var b=E[S];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,E,S){return E&&y(x.prototype,E),S&&y(x,S),x}}(),l=function y(x,E,S){x===null&&(x=Function.prototype);var b=Object.getOwnPropertyDescriptor(x,E);if(b===void 0){var w=Object.getPrototypeOf(x);return w===null?void 0:y(w,E,S)}else{if("value"in b)return b.value;var _=b.get;return _===void 0?void 0:_.call(S)}},o=i(28),u=d(o);function d(y){return y&&y.__esModule?y:{default:y}}function f(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function v(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function g(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var c=function(y){g(x,y);function x(E,S){f(this,x);var b=v(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,E));return b.container.classList.add("ql-icon-picker"),[].forEach.call(b.container.querySelectorAll(".ql-picker-item"),function(w){w.innerHTML=S[w.getAttribute("data-value")||""]}),b.defaultItem=b.container.querySelector(".ql-selected"),b.selectItem(b.defaultItem),b}return a(x,[{key:"selectItem",value:function(S,b){l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"selectItem",this).call(this,S,b),S=S||this.defaultItem,this.label.innerHTML=S.innerHTML}}]),x}(u.default);n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function u(d,f){for(var v=0;v<f.length;v++){var g=f[v];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(d,g.key,g)}}return function(d,f,v){return f&&u(d.prototype,f),v&&u(d,v),d}}();function l(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}var o=function(){function u(d,f){var v=this;l(this,u),this.quill=d,this.boundsContainer=f||document.body,this.root=d.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){v.root.style.marginTop=-1*v.quill.root.scrollTop+"px"}),this.hide()}return a(u,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(f){var v=f.left+f.width/2-this.root.offsetWidth/2,g=f.bottom+this.quill.root.scrollTop;this.root.style.left=v+"px",this.root.style.top=g+"px",this.root.classList.remove("ql-flip");var c=this.boundsContainer.getBoundingClientRect(),y=this.root.getBoundingClientRect(),x=0;if(y.right>c.right&&(x=c.right-y.right,this.root.style.left=v+x+"px"),y.left<c.left&&(x=c.left-y.left,this.root.style.left=v+x+"px"),y.bottom>c.bottom){var E=y.bottom-y.top,S=f.bottom-f.top+E;this.root.style.top=g-S+"px",this.root.classList.add("ql-flip")}return x}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),u}();n.default=o},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function T(k,C){var q=[],G=!0,J=!1,ae=void 0;try{for(var H=k[Symbol.iterator](),V;!(G=(V=H.next()).done)&&(q.push(V.value),!(C&&q.length===C));G=!0);}catch(Y){J=!0,ae=Y}finally{try{!G&&H.return&&H.return()}finally{if(J)throw ae}}return q}return function(k,C){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return T(k,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function T(k,C,q){k===null&&(k=Function.prototype);var G=Object.getOwnPropertyDescriptor(k,C);if(G===void 0){var J=Object.getPrototypeOf(k);return J===null?void 0:T(J,C,q)}else{if("value"in G)return G.value;var ae=G.get;return ae===void 0?void 0:ae.call(q)}},o=function(){function T(k,C){for(var q=0;q<C.length;q++){var G=C[q];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(k,G.key,G)}}return function(k,C,q){return C&&T(k.prototype,C),q&&T(k,q),k}}(),u=i(3),d=w(u),f=i(8),v=w(f),g=i(43),c=w(g),y=i(27),x=w(y),E=i(15),S=i(41),b=w(S);function w(T){return T&&T.__esModule?T:{default:T}}function _(T,k){if(!(T instanceof k))throw new TypeError("Cannot call a class as a function")}function A(T,k){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:T}function M(T,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);T.prototype=Object.create(k&&k.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(T,k):T.__proto__=k)}var O=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],L=function(T){M(k,T);function k(C,q){_(this,k),q.modules.toolbar!=null&&q.modules.toolbar.container==null&&(q.modules.toolbar.container=O);var G=A(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,C,q));return G.quill.container.classList.add("ql-snow"),G}return o(k,[{key:"extendToolbar",value:function(q){q.container.classList.add("ql-snow"),this.buildButtons([].slice.call(q.container.querySelectorAll("button")),b.default),this.buildPickers([].slice.call(q.container.querySelectorAll("select")),b.default),this.tooltip=new R(this.quill,this.options.bounds),q.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(G,J){q.handlers.link.call(q,!J.format.link)})}}]),k}(c.default);L.DEFAULTS=(0,d.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(k){if(k){var C=this.quill.getSelection();if(C==null||C.length==0)return;var q=this.quill.getText(C);/^\S+@\S+\.\S+$/.test(q)&&q.indexOf("mailto:")!==0&&(q="mailto:"+q);var G=this.quill.theme.tooltip;G.edit("link",q)}else this.quill.format("link",!1)}}}}});var R=function(T){M(k,T);function k(C,q){_(this,k);var G=A(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,C,q));return G.preview=G.root.querySelector("a.ql-preview"),G}return o(k,[{key:"listen",value:function(){var q=this;l(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(G){q.root.classList.contains("ql-editing")?q.save():q.edit("link",q.preview.textContent),G.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(G){if(q.linkRange!=null){var J=q.linkRange;q.restoreFocus(),q.quill.formatText(J,"link",!1,v.default.sources.USER),delete q.linkRange}G.preventDefault(),q.hide()}),this.quill.on(v.default.events.SELECTION_CHANGE,function(G,J,ae){if(G!=null){if(G.length===0&&ae===v.default.sources.USER){var H=q.quill.scroll.descendant(x.default,G.index),V=a(H,2),Y=V[0],U=V[1];if(Y!=null){q.linkRange=new E.Range(G.index-U,Y.length());var D=x.default.formats(Y.domNode);q.preview.textContent=D,q.preview.setAttribute("href",D),q.show(),q.position(q.quill.getBounds(q.linkRange));return}}else delete q.linkRange;q.hide()}})}},{key:"show",value:function(){l(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),k}(g.BaseTooltip);R.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(29),l=pe(a),o=i(36),u=i(38),d=i(64),f=i(65),v=pe(f),g=i(66),c=pe(g),y=i(67),x=pe(y),E=i(37),S=i(26),b=i(39),w=i(40),_=i(56),A=pe(_),M=i(68),O=pe(M),L=i(27),R=pe(L),T=i(69),k=pe(T),C=i(70),q=pe(C),G=i(71),J=pe(G),ae=i(72),H=pe(ae),V=i(73),Y=pe(V),U=i(13),D=pe(U),j=i(74),z=pe(j),Z=i(75),re=pe(Z),W=i(57),Q=pe(W),se=i(41),ue=pe(se),le=i(28),ye=pe(le),Re=i(59),Me=pe(Re),Pe=i(60),de=pe(Pe),Te=i(61),Ae=pe(Te),be=i(108),_e=pe(be),xe=i(62),Le=pe(xe);function pe(Ce){return Ce&&Ce.__esModule?Ce:{default:Ce}}l.default.register({"attributors/attribute/direction":u.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":E.BackgroundClass,"attributors/class/color":S.ColorClass,"attributors/class/direction":u.DirectionClass,"attributors/class/font":b.FontClass,"attributors/class/size":w.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":E.BackgroundStyle,"attributors/style/color":S.ColorStyle,"attributors/style/direction":u.DirectionStyle,"attributors/style/font":b.FontStyle,"attributors/style/size":w.SizeStyle},!0),l.default.register({"formats/align":o.AlignClass,"formats/direction":u.DirectionClass,"formats/indent":d.IndentClass,"formats/background":E.BackgroundStyle,"formats/color":S.ColorStyle,"formats/font":b.FontClass,"formats/size":w.SizeClass,"formats/blockquote":v.default,"formats/code-block":D.default,"formats/header":c.default,"formats/list":x.default,"formats/bold":A.default,"formats/code":U.Code,"formats/italic":O.default,"formats/link":R.default,"formats/script":k.default,"formats/strike":q.default,"formats/underline":J.default,"formats/image":H.default,"formats/video":Y.default,"formats/list/item":y.ListItem,"modules/formula":z.default,"modules/syntax":re.default,"modules/toolbar":Q.default,"themes/bubble":_e.default,"themes/snow":Le.default,"ui/icons":ue.default,"ui/picker":ye.default,"ui/icon-picker":de.default,"ui/color-picker":Me.default,"ui/tooltip":Ae.default},!0),n.default=l.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var a=function(){function x(E,S){for(var b=0;b<S.length;b++){var w=S[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(E,w.key,w)}}return function(E,S,b){return S&&x(E.prototype,S),b&&x(E,b),E}}(),l=function x(E,S,b){E===null&&(E=Function.prototype);var w=Object.getOwnPropertyDescriptor(E,S);if(w===void 0){var _=Object.getPrototypeOf(E);return _===null?void 0:x(_,S,b)}else{if("value"in w)return w.value;var A=w.get;return A===void 0?void 0:A.call(b)}},o=i(0),u=d(o);function d(x){return x&&x.__esModule?x:{default:x}}function f(x,E){if(!(x instanceof E))throw new TypeError("Cannot call a class as a function")}function v(x,E){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:x}function g(x,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);x.prototype=Object.create(E&&E.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(x,E):x.__proto__=E)}var c=function(x){g(E,x);function E(){return f(this,E),v(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return a(E,[{key:"add",value:function(b,w){if(w==="+1"||w==="-1"){var _=this.value(b)||0;w=w==="+1"?_+1:_-1}return w===0?(this.remove(b),!0):l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"add",this).call(this,b,w)}},{key:"canAdd",value:function(b,w){return l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"canAdd",this).call(this,b,w)||l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"canAdd",this).call(this,b,parseInt(w))}},{key:"value",value:function(b){return parseInt(l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"value",this).call(this,b))||void 0}}]),E}(u.default.Attributor.Class),y=new c("indent","ql-indent",{scope:u.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(4),l=o(a);function o(g){return g&&g.__esModule?g:{default:g}}function u(g,c){if(!(g instanceof c))throw new TypeError("Cannot call a class as a function")}function d(g,c){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:g}function f(g,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);g.prototype=Object.create(c&&c.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(g,c):g.__proto__=c)}var v=function(g){f(c,g);function c(){return u(this,c),d(this,(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments))}return c}(l.default);v.blotName="blockquote",v.tagName="blockquote",n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function c(y,x){for(var E=0;E<x.length;E++){var S=x[E];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(y,S.key,S)}}return function(y,x,E){return x&&c(y.prototype,x),E&&c(y,E),y}}(),l=i(4),o=u(l);function u(c){return c&&c.__esModule?c:{default:c}}function d(c,y){if(!(c instanceof y))throw new TypeError("Cannot call a class as a function")}function f(c,y){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:c}function v(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(c,y):c.__proto__=y)}var g=function(c){v(y,c);function y(){return d(this,y),f(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,null,[{key:"formats",value:function(E){return this.tagName.indexOf(E.tagName)+1}}]),y}(o.default);g.blotName="header",g.tagName=["H1","H2","H3","H4","H5","H6"],n.default=g},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var a=function(){function _(A,M){for(var O=0;O<M.length;O++){var L=M[O];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(A,L.key,L)}}return function(A,M,O){return M&&_(A.prototype,M),O&&_(A,O),A}}(),l=function _(A,M,O){A===null&&(A=Function.prototype);var L=Object.getOwnPropertyDescriptor(A,M);if(L===void 0){var R=Object.getPrototypeOf(A);return R===null?void 0:_(R,M,O)}else{if("value"in L)return L.value;var T=L.get;return T===void 0?void 0:T.call(O)}},o=i(0),u=c(o),d=i(4),f=c(d),v=i(25),g=c(v);function c(_){return _&&_.__esModule?_:{default:_}}function y(_,A,M){return A in _?Object.defineProperty(_,A,{value:M,enumerable:!0,configurable:!0,writable:!0}):_[A]=M,_}function x(_,A){if(!(_ instanceof A))throw new TypeError("Cannot call a class as a function")}function E(_,A){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:_}function S(_,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);_.prototype=Object.create(A&&A.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(_,A):_.__proto__=A)}var b=function(_){S(A,_);function A(){return x(this,A),E(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return a(A,[{key:"format",value:function(O,L){O===w.blotName&&!L?this.replaceWith(u.default.create(this.statics.scope)):l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"format",this).call(this,O,L)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(O,L){return this.parent.isolate(this.offset(this.parent),this.length()),O===this.parent.statics.blotName?(this.parent.replaceWith(O,L),this):(this.parent.unwrap(),l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replaceWith",this).call(this,O,L))}}],[{key:"formats",value:function(O){return O.tagName===this.tagName?void 0:l(A.__proto__||Object.getPrototypeOf(A),"formats",this).call(this,O)}}]),A}(f.default);b.blotName="list-item",b.tagName="LI";var w=function(_){S(A,_),a(A,null,[{key:"create",value:function(O){var L=O==="ordered"?"OL":"UL",R=l(A.__proto__||Object.getPrototypeOf(A),"create",this).call(this,L);return(O==="checked"||O==="unchecked")&&R.setAttribute("data-checked",O==="checked"),R}},{key:"formats",value:function(O){if(O.tagName==="OL")return"ordered";if(O.tagName==="UL")return O.hasAttribute("data-checked")?O.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function A(M){x(this,A);var O=E(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,M)),L=function(T){if(T.target.parentNode===M){var k=O.statics.formats(M),C=u.default.find(T.target);k==="checked"?C.format("list","unchecked"):k==="unchecked"&&C.format("list","checked")}};return M.addEventListener("touchstart",L),M.addEventListener("mousedown",L),O}return a(A,[{key:"format",value:function(O,L){this.children.length>0&&this.children.tail.format(O,L)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(O,L){if(O instanceof b)l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,O,L);else{var R=L==null?this.length():L.offset(this),T=this.split(R);T.parent.insertBefore(O,T)}}},{key:"optimize",value:function(O){l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,O);var L=this.next;L!=null&&L.prev===this&&L.statics.blotName===this.statics.blotName&&L.domNode.tagName===this.domNode.tagName&&L.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(L.moveChildren(this),L.remove())}},{key:"replace",value:function(O){if(O.statics.blotName!==this.statics.blotName){var L=u.default.create(this.statics.defaultChild);O.moveChildren(L),this.appendChild(L)}l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replace",this).call(this,O)}}]),A}(g.default);w.blotName="list",w.scope=u.default.Scope.BLOCK_BLOT,w.tagName=["OL","UL"],w.defaultChild="list-item",w.allowedChildren=[b],n.ListItem=b,n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(56),l=o(a);function o(g){return g&&g.__esModule?g:{default:g}}function u(g,c){if(!(g instanceof c))throw new TypeError("Cannot call a class as a function")}function d(g,c){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:g}function f(g,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);g.prototype=Object.create(c&&c.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(g,c):g.__proto__=c)}var v=function(g){f(c,g);function c(){return u(this,c),d(this,(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments))}return c}(l.default);v.blotName="italic",v.tagName=["EM","I"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(x,E){for(var S=0;S<E.length;S++){var b=E[S];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,E,S){return E&&y(x.prototype,E),S&&y(x,S),x}}(),l=function y(x,E,S){x===null&&(x=Function.prototype);var b=Object.getOwnPropertyDescriptor(x,E);if(b===void 0){var w=Object.getPrototypeOf(x);return w===null?void 0:y(w,E,S)}else{if("value"in b)return b.value;var _=b.get;return _===void 0?void 0:_.call(S)}},o=i(6),u=d(o);function d(y){return y&&y.__esModule?y:{default:y}}function f(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function v(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function g(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var c=function(y){g(x,y);function x(){return f(this,x),v(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,null,[{key:"create",value:function(S){return S==="super"?document.createElement("sup"):S==="sub"?document.createElement("sub"):l(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,S)}},{key:"formats",value:function(S){if(S.tagName==="SUB")return"sub";if(S.tagName==="SUP")return"super"}}]),x}(u.default);c.blotName="script",c.tagName=["SUB","SUP"],n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(6),l=o(a);function o(g){return g&&g.__esModule?g:{default:g}}function u(g,c){if(!(g instanceof c))throw new TypeError("Cannot call a class as a function")}function d(g,c){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:g}function f(g,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);g.prototype=Object.create(c&&c.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(g,c):g.__proto__=c)}var v=function(g){f(c,g);function c(){return u(this,c),d(this,(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments))}return c}(l.default);v.blotName="strike",v.tagName="S",n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(6),l=o(a);function o(g){return g&&g.__esModule?g:{default:g}}function u(g,c){if(!(g instanceof c))throw new TypeError("Cannot call a class as a function")}function d(g,c){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:g}function f(g,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);g.prototype=Object.create(c&&c.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(g,c):g.__proto__=c)}var v=function(g){f(c,g);function c(){return u(this,c),d(this,(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments))}return c}(l.default);v.blotName="underline",v.tagName="U",n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function E(S,b){for(var w=0;w<b.length;w++){var _=b[w];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(S,_.key,_)}}return function(S,b,w){return b&&E(S.prototype,b),w&&E(S,w),S}}(),l=function E(S,b,w){S===null&&(S=Function.prototype);var _=Object.getOwnPropertyDescriptor(S,b);if(_===void 0){var A=Object.getPrototypeOf(S);return A===null?void 0:E(A,b,w)}else{if("value"in _)return _.value;var M=_.get;return M===void 0?void 0:M.call(w)}},o=i(0),u=f(o),d=i(27);function f(E){return E&&E.__esModule?E:{default:E}}function v(E,S){if(!(E instanceof S))throw new TypeError("Cannot call a class as a function")}function g(E,S){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:E}function c(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);E.prototype=Object.create(S&&S.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(E,S):E.__proto__=S)}var y=["alt","height","width"],x=function(E){c(S,E);function S(){return v(this,S),g(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return a(S,[{key:"format",value:function(w,_){y.indexOf(w)>-1?_?this.domNode.setAttribute(w,_):this.domNode.removeAttribute(w):l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"format",this).call(this,w,_)}}],[{key:"create",value:function(w){var _=l(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,w);return typeof w=="string"&&_.setAttribute("src",this.sanitize(w)),_}},{key:"formats",value:function(w){return y.reduce(function(_,A){return w.hasAttribute(A)&&(_[A]=w.getAttribute(A)),_},{})}},{key:"match",value:function(w){return/\.(jpe?g|gif|png)$/.test(w)||/^data:image\/.+;base64/.test(w)}},{key:"sanitize",value:function(w){return(0,d.sanitize)(w,["http","https","data"])?w:"//:0"}},{key:"value",value:function(w){return w.getAttribute("src")}}]),S}(u.default.Embed);x.blotName="image",x.tagName="IMG",n.default=x},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function E(S,b){for(var w=0;w<b.length;w++){var _=b[w];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(S,_.key,_)}}return function(S,b,w){return b&&E(S.prototype,b),w&&E(S,w),S}}(),l=function E(S,b,w){S===null&&(S=Function.prototype);var _=Object.getOwnPropertyDescriptor(S,b);if(_===void 0){var A=Object.getPrototypeOf(S);return A===null?void 0:E(A,b,w)}else{if("value"in _)return _.value;var M=_.get;return M===void 0?void 0:M.call(w)}},o=i(4),u=i(27),d=f(u);function f(E){return E&&E.__esModule?E:{default:E}}function v(E,S){if(!(E instanceof S))throw new TypeError("Cannot call a class as a function")}function g(E,S){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:E}function c(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);E.prototype=Object.create(S&&S.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(E,S):E.__proto__=S)}var y=["height","width"],x=function(E){c(S,E);function S(){return v(this,S),g(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return a(S,[{key:"format",value:function(w,_){y.indexOf(w)>-1?_?this.domNode.setAttribute(w,_):this.domNode.removeAttribute(w):l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"format",this).call(this,w,_)}}],[{key:"create",value:function(w){var _=l(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,w);return _.setAttribute("frameborder","0"),_.setAttribute("allowfullscreen",!0),_.setAttribute("src",this.sanitize(w)),_}},{key:"formats",value:function(w){return y.reduce(function(_,A){return w.hasAttribute(A)&&(_[A]=w.getAttribute(A)),_},{})}},{key:"sanitize",value:function(w){return d.default.sanitize(w)}},{key:"value",value:function(w){return w.getAttribute("src")}}]),S}(o.BlockEmbed);x.blotName="video",x.className="ql-video",x.tagName="IFRAME",n.default=x},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var a=function(){function w(_,A){for(var M=0;M<A.length;M++){var O=A[M];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(_,O.key,O)}}return function(_,A,M){return A&&w(_.prototype,A),M&&w(_,M),_}}(),l=function w(_,A,M){_===null&&(_=Function.prototype);var O=Object.getOwnPropertyDescriptor(_,A);if(O===void 0){var L=Object.getPrototypeOf(_);return L===null?void 0:w(L,A,M)}else{if("value"in O)return O.value;var R=O.get;return R===void 0?void 0:R.call(M)}},o=i(35),u=c(o),d=i(5),f=c(d),v=i(9),g=c(v);function c(w){return w&&w.__esModule?w:{default:w}}function y(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}function x(w,_){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:w}function E(w,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);w.prototype=Object.create(_&&_.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(w,_):w.__proto__=_)}var S=function(w){E(_,w);function _(){return y(this,_),x(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,null,[{key:"create",value:function(M){var O=l(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,M);return typeof M=="string"&&(window.katex.render(M,O,{throwOnError:!1,errorColor:"#f00"}),O.setAttribute("data-value",M)),O}},{key:"value",value:function(M){return M.getAttribute("data-value")}}]),_}(u.default);S.blotName="formula",S.className="ql-formula",S.tagName="SPAN";var b=function(w){E(_,w),a(_,null,[{key:"register",value:function(){f.default.register(S,!0)}}]);function _(){y(this,_);var A=x(this,(_.__proto__||Object.getPrototypeOf(_)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return A}return _}(g.default);n.FormulaBlot=S,n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var a=function(){function M(O,L){for(var R=0;R<L.length;R++){var T=L[R];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(O,T.key,T)}}return function(O,L,R){return L&&M(O.prototype,L),R&&M(O,R),O}}(),l=function M(O,L,R){O===null&&(O=Function.prototype);var T=Object.getOwnPropertyDescriptor(O,L);if(T===void 0){var k=Object.getPrototypeOf(O);return k===null?void 0:M(k,L,R)}else{if("value"in T)return T.value;var C=T.get;return C===void 0?void 0:C.call(R)}},o=i(0),u=x(o),d=i(5),f=x(d),v=i(9),g=x(v),c=i(13),y=x(c);function x(M){return M&&M.__esModule?M:{default:M}}function E(M,O){if(!(M instanceof O))throw new TypeError("Cannot call a class as a function")}function S(M,O){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:M}function b(M,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);M.prototype=Object.create(O&&O.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(M,O):M.__proto__=O)}var w=function(M){b(O,M);function O(){return E(this,O),S(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return a(O,[{key:"replaceWith",value:function(R){this.domNode.textContent=this.domNode.textContent,this.attach(),l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replaceWith",this).call(this,R)}},{key:"highlight",value:function(R){var T=this.domNode.textContent;this.cachedText!==T&&((T.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=R(T),this.domNode.normalize(),this.attach()),this.cachedText=T)}}]),O}(y.default);w.className="ql-syntax";var _=new u.default.Attributor.Class("token","hljs",{scope:u.default.Scope.INLINE}),A=function(M){b(O,M),a(O,null,[{key:"register",value:function(){f.default.register(_,!0),f.default.register(w,!0)}}]);function O(L,R){E(this,O);var T=S(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));if(typeof T.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var k=null;return T.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(k),k=setTimeout(function(){T.highlight(),k=null},T.options.interval)}),T.highlight(),T}return a(O,[{key:"highlight",value:function(){var R=this;if(!this.quill.selection.composing){this.quill.update(f.default.sources.USER);var T=this.quill.getSelection();this.quill.scroll.descendants(w).forEach(function(k){k.highlight(R.options.highlight)}),this.quill.update(f.default.sources.SILENT),T!=null&&this.quill.setSelection(T,f.default.sources.SILENT)}}}]),O}(g.default);A.DEFAULTS={highlight:function(){return window.hljs==null?null:function(M){var O=window.hljs.highlightAuto(M);return O.value}}(),interval:1e3},n.CodeBlock=w,n.CodeToken=_,n.default=A},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var a=function O(L,R,T){L===null&&(L=Function.prototype);var k=Object.getOwnPropertyDescriptor(L,R);if(k===void 0){var C=Object.getPrototypeOf(L);return C===null?void 0:O(C,R,T)}else{if("value"in k)return k.value;var q=k.get;return q===void 0?void 0:q.call(T)}},l=function(){function O(L,R){for(var T=0;T<R.length;T++){var k=R[T];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(L,k.key,k)}}return function(L,R,T){return R&&O(L.prototype,R),T&&O(L,T),L}}(),o=i(3),u=E(o),d=i(8),f=E(d),v=i(43),g=E(v),c=i(15),y=i(41),x=E(y);function E(O){return O&&O.__esModule?O:{default:O}}function S(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}function b(O,L){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:O}function w(O,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);O.prototype=Object.create(L&&L.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(O,L):O.__proto__=L)}var _=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],A=function(O){w(L,O);function L(R,T){S(this,L),T.modules.toolbar!=null&&T.modules.toolbar.container==null&&(T.modules.toolbar.container=_);var k=b(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,R,T));return k.quill.container.classList.add("ql-bubble"),k}return l(L,[{key:"extendToolbar",value:function(T){this.tooltip=new M(this.quill,this.options.bounds),this.tooltip.root.appendChild(T.container),this.buildButtons([].slice.call(T.container.querySelectorAll("button")),x.default),this.buildPickers([].slice.call(T.container.querySelectorAll("select")),x.default)}}]),L}(g.default);A.DEFAULTS=(0,u.default)(!0,{},g.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(L){L?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var M=function(O){w(L,O);function L(R,T){S(this,L);var k=b(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,R,T));return k.quill.on(f.default.events.EDITOR_CHANGE,function(C,q,G,J){if(C===f.default.events.SELECTION_CHANGE)if(q!=null&&q.length>0&&J===f.default.sources.USER){k.show(),k.root.style.left="0px",k.root.style.width="",k.root.style.width=k.root.offsetWidth+"px";var ae=k.quill.getLines(q.index,q.length);if(ae.length===1)k.position(k.quill.getBounds(q));else{var H=ae[ae.length-1],V=k.quill.getIndex(H),Y=Math.min(H.length()-1,q.index+q.length-V),U=k.quill.getBounds(new c.Range(V,Y));k.position(U)}}else document.activeElement!==k.textbox&&k.quill.hasFocus()&&k.hide()}),k}return l(L,[{key:"listen",value:function(){var T=this;a(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){T.root.classList.remove("ql-editing")}),this.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!T.root.classList.contains("ql-hidden")){var k=T.quill.getSelection();k!=null&&T.position(T.quill.getBounds(k))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(T){var k=a(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"position",this).call(this,T),C=this.root.querySelector(".ql-tooltip-arrow");if(C.style.marginLeft="",k===0)return k;C.style.marginLeft=-1*k-C.offsetWidth/2+"px"}}]),L}(v.BaseTooltip);M.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=M,n.default=A},function(r,n,i){r.exports=i(63)}]).default})}(A1)),A1.exports}var Jk=Qk();const X8=lc(Jk);var P1={exports:{}},Af={},Wd={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var eO=Wd.exports,Ub;function tO(){return Ub||(Ub=1,function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,a=typeof Ch=="object"&&Ch;(a.global===a||a.window===a||a.self===a)&&(r=a);var l,o=2147483647,u=36,d=1,f=26,v=38,g=700,c=72,y=128,x="-",E=/^xn--/,S=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=u-d,A=Math.floor,M=String.fromCharCode,O;function L(U){throw new RangeError(w[U])}function R(U,D){for(var j=U.length,z=[];j--;)z[j]=D(U[j]);return z}function T(U,D){var j=U.split("@"),z="";j.length>1&&(z=j[0]+"@",U=j[1]),U=U.replace(b,".");var Z=U.split("."),re=R(Z,D).join(".");return z+re}function k(U){for(var D=[],j=0,z=U.length,Z,re;j<z;)Z=U.charCodeAt(j++),Z>=55296&&Z<=56319&&j<z?(re=U.charCodeAt(j++),(re&64512)==56320?D.push(((Z&1023)<<10)+(re&1023)+65536):(D.push(Z),j--)):D.push(Z);return D}function C(U){return R(U,function(D){var j="";return D>65535&&(D-=65536,j+=M(D>>>10&1023|55296),D=56320|D&1023),j+=M(D),j}).join("")}function q(U){return U-48<10?U-22:U-65<26?U-65:U-97<26?U-97:u}function G(U,D){return U+22+75*(U<26)-((D!=0)<<5)}function J(U,D,j){var z=0;for(U=j?A(U/g):U>>1,U+=A(U/D);U>_*f>>1;z+=u)U=A(U/_);return A(z+(_+1)*U/(U+v))}function ae(U){var D=[],j=U.length,z,Z=0,re=y,W=c,Q,se,ue,le,ye,Re,Me,Pe,de;for(Q=U.lastIndexOf(x),Q<0&&(Q=0),se=0;se<Q;++se)U.charCodeAt(se)>=128&&L("not-basic"),D.push(U.charCodeAt(se));for(ue=Q>0?Q+1:0;ue<j;){for(le=Z,ye=1,Re=u;ue>=j&&L("invalid-input"),Me=q(U.charCodeAt(ue++)),(Me>=u||Me>A((o-Z)/ye))&&L("overflow"),Z+=Me*ye,Pe=Re<=W?d:Re>=W+f?f:Re-W,!(Me<Pe);Re+=u)de=u-Pe,ye>A(o/de)&&L("overflow"),ye*=de;z=D.length+1,W=J(Z-le,z,le==0),A(Z/z)>o-re&&L("overflow"),re+=A(Z/z),Z%=z,D.splice(Z++,0,re)}return C(D)}function H(U){var D,j,z,Z,re,W,Q,se,ue,le,ye,Re=[],Me,Pe,de,Te;for(U=k(U),Me=U.length,D=y,j=0,re=c,W=0;W<Me;++W)ye=U[W],ye<128&&Re.push(M(ye));for(z=Z=Re.length,Z&&Re.push(x);z<Me;){for(Q=o,W=0;W<Me;++W)ye=U[W],ye>=D&&ye<Q&&(Q=ye);for(Pe=z+1,Q-D>A((o-j)/Pe)&&L("overflow"),j+=(Q-D)*Pe,D=Q,W=0;W<Me;++W)if(ye=U[W],ye<D&&++j>o&&L("overflow"),ye==D){for(se=j,ue=u;le=ue<=re?d:ue>=re+f?f:ue-re,!(se<le);ue+=u)Te=se-le,de=u-le,Re.push(M(G(le+Te%de,0))),se=A(Te/de);Re.push(M(G(se,0))),re=J(j,Pe,z==Z),j=0,++z}++j,++D}return Re.join("")}function V(U){return T(U,function(D){return E.test(D)?ae(D.slice(4).toLowerCase()):D})}function Y(U){return T(U,function(D){return S.test(D)?"xn--"+H(D):D})}if(l={version:"1.4.1",ucs2:{decode:k,encode:C},decode:ae,encode:H,toASCII:Y,toUnicode:V},n&&i)if(e.exports==n)i.exports=l;else for(O in l)l.hasOwnProperty(O)&&(n[O]=l[O]);else r.punycode=l})(eO)}(Wd,Wd.exports)),Wd.exports}var Bg,qb;function zh(){return qb||(qb=1,Bg=TypeError),Bg}const rO={},nO=Object.freeze(Object.defineProperty({__proto__:null,default:rO},Symbol.toStringTag,{value:"Module"})),iO=e9(nO);var zg,Hb;function _0(){if(Hb)return zg;Hb=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&typeof t.get=="function"?t.get:null,n=e&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=i&&a&&typeof a.get=="function"?a.get:null,o=i&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,d=u?WeakMap.prototype.has:null,f=typeof WeakSet=="function"&&WeakSet.prototype,v=f?WeakSet.prototype.has:null,g=typeof WeakRef=="function"&&WeakRef.prototype,c=g?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,x=Object.prototype.toString,E=Function.prototype.toString,S=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,_=String.prototype.toUpperCase,A=String.prototype.toLowerCase,M=RegExp.prototype.test,O=Array.prototype.concat,L=Array.prototype.join,R=Array.prototype.slice,T=Math.floor,k=typeof BigInt=="function"?BigInt.prototype.valueOf:null,C=Object.getOwnPropertySymbols,q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,G=typeof Symbol=="function"&&typeof Symbol.iterator=="object",J=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===G||!0)?Symbol.toStringTag:null,ae=Object.prototype.propertyIsEnumerable,H=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function($e){return $e.__proto__}:null);function V($e,ze){if($e===1/0||$e===-1/0||$e!==$e||$e&&$e>-1e3&&$e<1e3||M.call(/e/,ze))return ze;var kt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof $e=="number"){var St=$e<0?-T(-$e):T($e);if(St!==$e){var er=String(St),jt=b.call(ze,er.length+1);return w.call(er,kt,"$&_")+"."+w.call(w.call(jt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(ze,kt,"$&_")}var Y=iO,U=Y.custom,D=Pe(U)?U:null,j={__proto__:null,double:'"',single:"'"},z={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};zg=function $e(ze,kt,St,er){var jt=kt||{};if(Ae(jt,"quoteStyle")&&!Ae(j,jt.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ae(jt,"maxStringLength")&&(typeof jt.maxStringLength=="number"?jt.maxStringLength<0&&jt.maxStringLength!==1/0:jt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var vr=Ae(jt,"customInspect")?jt.customInspect:!0;if(typeof vr!="boolean"&&vr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ae(jt,"indent")&&jt.indent!==null&&jt.indent!==" "&&!(parseInt(jt.indent,10)===jt.indent&&jt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ae(jt,"numericSeparator")&&typeof jt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Xt=jt.numericSeparator;if(typeof ze>"u")return"undefined";if(ze===null)return"null";if(typeof ze=="boolean")return ze?"true":"false";if(typeof ze=="string")return pt(ze,jt);if(typeof ze=="number"){if(ze===0)return 1/0/ze>0?"0":"-0";var lr=String(ze);return Xt?V(ze,lr):lr}if(typeof ze=="bigint"){var Oi=String(ze)+"n";return Xt?V(ze,Oi):Oi}var Zn=typeof jt.depth>"u"?5:jt.depth;if(typeof St>"u"&&(St=0),St>=Zn&&Zn>0&&typeof ze=="object")return Q(ze)?"[Array]":"[Object]";var vi=cr(jt,St);if(typeof er>"u")er=[];else if(xe(er,ze)>=0)return"[Circular]";function mn(Ci,Xa,Ps){if(Xa&&(er=R.call(er),er.push(Xa)),Ps){var Ko={depth:jt.depth};return Ae(jt,"quoteStyle")&&(Ko.quoteStyle=jt.quoteStyle),$e(Ci,Ko,St+1,er)}return $e(Ci,jt,St+1,er)}if(typeof ze=="function"&&!ue(ze)){var Yt=_e(ze),sa=$t(ze,mn);return"[Function"+(Yt?": "+Yt:" (anonymous)")+"]"+(sa.length>0?" { "+L.call(sa,", ")+" }":"")}if(Pe(ze)){var Ra=G?w.call(String(ze),/^(Symbol\(.*\))_[^)]*$/,"$1"):q.call(ze);return typeof ze=="object"&&!G?bt(Ra):Ra}if(st(ze)){for(var Un="<"+A.call(String(ze.nodeName)),Ui=ze.attributes||[],Rr=0;Rr<Ui.length;Rr++)Un+=" "+Ui[Rr].name+"="+Z(re(Ui[Rr].value),"double",jt);return Un+=">",ze.childNodes&&ze.childNodes.length&&(Un+="..."),Un+="</"+A.call(String(ze.nodeName))+">",Un}if(Q(ze)){if(ze.length===0)return"[]";var yn=$t(ze,mn);return vi&&!wr(yn)?"["+Pt(yn,vi)+"]":"[ "+L.call(yn,", ")+" ]"}if(le(ze)){var An=$t(ze,mn);return!("cause"in Error.prototype)&&"cause"in ze&&!ae.call(ze,"cause")?"{ ["+String(ze)+"] "+L.call(O.call("[cause]: "+mn(ze.cause),An),", ")+" }":An.length===0?"["+String(ze)+"]":"{ ["+String(ze)+"] "+L.call(An,", ")+" }"}if(typeof ze=="object"&&vr){if(D&&typeof ze[D]=="function"&&Y)return Y(ze,{depth:Zn-St});if(vr!=="symbol"&&typeof ze.inspect=="function")return ze.inspect()}if(Le(ze)){var ba=[];return n&&n.call(ze,function(Ci,Xa){ba.push(mn(Xa,ze,!0)+" => "+mn(Ci,ze))}),vt("Map",r.call(ze),ba,vi)}if(je(ze)){var Mo=[];return o&&o.call(ze,function(Ci){Mo.push(mn(Ci,ze))}),vt("Set",l.call(ze),Mo,vi)}if(pe(ze))return ht("WeakMap");if(He(ze))return ht("WeakSet");if(Ce(ze))return ht("WeakRef");if(Re(ze))return bt(mn(Number(ze)));if(de(ze))return bt(mn(k.call(ze)));if(Me(ze))return bt(y.call(ze));if(ye(ze))return bt(mn(String(ze)));if(typeof window<"u"&&ze===window)return"{ [object Window] }";if(typeof globalThis<"u"&&ze===globalThis||typeof Ch<"u"&&ze===Ch)return"{ [object globalThis] }";if(!se(ze)&&!ue(ze)){var wa=$t(ze,mn),Ya=H?H(ze)===Object.prototype:ze instanceof Object||ze.constructor===Object,Qn=ze instanceof Object?"":"null prototype",_a=!Ya&&J&&Object(ze)===ze&&J in ze?b.call(be(ze),8,-1):Qn?"Object":"",xa=Ya||typeof ze.constructor!="function"?"":ze.constructor.name?ze.constructor.name+" ":"",Io=xa+(_a||Qn?"["+L.call(O.call([],_a||[],Qn||[]),": ")+"] ":"");return wa.length===0?Io+"{}":vi?Io+"{"+Pt(wa,vi)+"}":Io+"{ "+L.call(wa,", ")+" }"}return String(ze)};function Z($e,ze,kt){var St=kt.quoteStyle||ze,er=j[St];return er+$e+er}function re($e){return w.call(String($e),/"/g,""")}function W($e){return!J||!(typeof $e=="object"&&(J in $e||typeof $e[J]<"u"))}function Q($e){return be($e)==="[object Array]"&&W($e)}function se($e){return be($e)==="[object Date]"&&W($e)}function ue($e){return be($e)==="[object RegExp]"&&W($e)}function le($e){return be($e)==="[object Error]"&&W($e)}function ye($e){return be($e)==="[object String]"&&W($e)}function Re($e){return be($e)==="[object Number]"&&W($e)}function Me($e){return be($e)==="[object Boolean]"&&W($e)}function Pe($e){if(G)return $e&&typeof $e=="object"&&$e instanceof Symbol;if(typeof $e=="symbol")return!0;if(!$e||typeof $e!="object"||!q)return!1;try{return q.call($e),!0}catch{}return!1}function de($e){if(!$e||typeof $e!="object"||!k)return!1;try{return k.call($e),!0}catch{}return!1}var Te=Object.prototype.hasOwnProperty||function($e){return $e in this};function Ae($e,ze){return Te.call($e,ze)}function be($e){return x.call($e)}function _e($e){if($e.name)return $e.name;var ze=S.call(E.call($e),/^function\s*([\w$]+)/);return ze?ze[1]:null}function xe($e,ze){if($e.indexOf)return $e.indexOf(ze);for(var kt=0,St=$e.length;kt<St;kt++)if($e[kt]===ze)return kt;return-1}function Le($e){if(!r||!$e||typeof $e!="object")return!1;try{r.call($e);try{l.call($e)}catch{return!0}return $e instanceof Map}catch{}return!1}function pe($e){if(!d||!$e||typeof $e!="object")return!1;try{d.call($e,d);try{v.call($e,v)}catch{return!0}return $e instanceof WeakMap}catch{}return!1}function Ce($e){if(!c||!$e||typeof $e!="object")return!1;try{return c.call($e),!0}catch{}return!1}function je($e){if(!l||!$e||typeof $e!="object")return!1;try{l.call($e);try{r.call($e)}catch{return!0}return $e instanceof Set}catch{}return!1}function He($e){if(!v||!$e||typeof $e!="object")return!1;try{v.call($e,v);try{d.call($e,d)}catch{return!0}return $e instanceof WeakSet}catch{}return!1}function st($e){return!$e||typeof $e!="object"?!1:typeof HTMLElement<"u"&&$e instanceof HTMLElement?!0:typeof $e.nodeName=="string"&&typeof $e.getAttribute=="function"}function pt($e,ze){if($e.length>ze.maxStringLength){var kt=$e.length-ze.maxStringLength,St="... "+kt+" more character"+(kt>1?"s":"");return pt(b.call($e,0,ze.maxStringLength),ze)+St}var er=z[ze.quoteStyle||"single"];er.lastIndex=0;var jt=w.call(w.call($e,er,"\\$1"),/[\x00-\x1f]/g,ct);return Z(jt,"single",ze)}function ct($e){var ze=$e.charCodeAt(0),kt={8:"b",9:"t",10:"n",12:"f",13:"r"}[ze];return kt?"\\"+kt:"\\x"+(ze<16?"0":"")+_.call(ze.toString(16))}function bt($e){return"Object("+$e+")"}function ht($e){return $e+" { ? }"}function vt($e,ze,kt,St){var er=St?Pt(kt,St):L.call(kt,", ");return $e+" ("+ze+") {"+er+"}"}function wr($e){for(var ze=0;ze<$e.length;ze++)if(xe($e[ze],`
|
|
141
141
|
`)>=0)return!1;return!0}function cr($e,ze){var kt;if($e.indent===" ")kt=" ";else if(typeof $e.indent=="number"&&$e.indent>0)kt=L.call(Array($e.indent+1)," ");else return null;return{base:kt,prev:L.call(Array(ze+1),kt)}}function Pt($e,ze){if($e.length===0)return"";var kt=`
|
|
142
142
|
`+ze.prev+ze.base;return kt+L.call($e,","+kt)+`
|
|
143
143
|
`+ze.prev}function $t($e,ze){var kt=Q($e),St=[];if(kt){St.length=$e.length;for(var er=0;er<$e.length;er++)St[er]=Ae($e,er)?ze($e[er],$e):""}var jt=typeof C=="function"?C($e):[],vr;if(G){vr={};for(var Xt=0;Xt<jt.length;Xt++)vr["$"+jt[Xt]]=jt[Xt]}for(var lr in $e)Ae($e,lr)&&(kt&&String(Number(lr))===lr&&lr<$e.length||G&&vr["$"+lr]instanceof Symbol||(M.call(/[^\w$]/,lr)?St.push(ze(lr,$e)+": "+ze($e[lr],$e)):St.push(lr+": "+ze($e[lr],$e))));if(typeof C=="function")for(var Oi=0;Oi<jt.length;Oi++)ae.call($e,jt[Oi])&&St.push("["+ze(jt[Oi])+"]: "+ze($e[jt[Oi]],$e));return St}return zg}var Ug,Vb;function aO(){if(Vb)return Ug;Vb=1;var e=_0(),t=zh(),r=function(o,u,d){for(var f=o,v;(v=f.next)!=null;f=v)if(v.key===u)return f.next=v.next,d||(v.next=o.next,o.next=v),v},n=function(o,u){if(o){var d=r(o,u);return d&&d.value}},i=function(o,u,d){var f=r(o,u);f?f.value=d:o.next={key:u,next:o.next,value:d}},a=function(o,u){return o?!!r(o,u):!1},l=function(o,u){if(o)return r(o,u,!0)};return Ug=function(){var u,d={assert:function(f){if(!d.has(f))throw new t("Side channel does not contain "+e(f))},delete:function(f){var v=u&&u.next,g=l(u,f);return g&&v&&v===g&&(u=void 0),!!g},get:function(f){return n(u,f)},has:function(f){return a(u,f)},set:function(f,v){u||(u={next:void 0}),i(u,f,v)}};return d},Ug}var qg,Gb;function K8(){return Gb||(Gb=1,qg=Object),qg}var Hg,$b;function oO(){return $b||($b=1,Hg=Error),Hg}var Vg,Wb;function sO(){return Wb||(Wb=1,Vg=EvalError),Vg}var Gg,Yb;function lO(){return Yb||(Yb=1,Gg=RangeError),Gg}var $g,Xb;function uO(){return Xb||(Xb=1,$g=ReferenceError),$g}var Wg,Kb;function cO(){return Kb||(Kb=1,Wg=SyntaxError),Wg}var Yg,Zb;function fO(){return Zb||(Zb=1,Yg=URIError),Yg}var Xg,Qb;function hO(){return Qb||(Qb=1,Xg=Math.abs),Xg}var Kg,Jb;function dO(){return Jb||(Jb=1,Kg=Math.floor),Kg}var Zg,e3;function pO(){return e3||(e3=1,Zg=Math.max),Zg}var Qg,t3;function gO(){return t3||(t3=1,Qg=Math.min),Qg}var Jg,r3;function vO(){return r3||(r3=1,Jg=Math.pow),Jg}var e2,n3;function mO(){return n3||(n3=1,e2=Math.round),e2}var t2,i3;function yO(){return i3||(i3=1,t2=Number.isNaN||function(t){return t!==t}),t2}var r2,a3;function bO(){if(a3)return r2;a3=1;var e=yO();return r2=function(r){return e(r)||r===0?r:r<0?-1:1},r2}var n2,o3;function wO(){return o3||(o3=1,n2=Object.getOwnPropertyDescriptor),n2}var i2,s3;function Z8(){if(s3)return i2;s3=1;var e=wO();if(e)try{e([],"length")}catch{e=null}return i2=e,i2}var a2,l3;function _O(){if(l3)return a2;l3=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return a2=e,a2}var o2,u3;function xO(){return u3||(u3=1,o2=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var l=Object.getOwnPropertySymbols(t);if(l.length!==1||l[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}),o2}var s2,c3;function SO(){if(c3)return s2;c3=1;var e=typeof Symbol<"u"&&Symbol,t=xO();return s2=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},s2}var l2,f3;function Q8(){return f3||(f3=1,l2=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),l2}var u2,h3;function J8(){if(h3)return u2;h3=1;var e=K8();return u2=e.getPrototypeOf||null,u2}var c2,d3;function EO(){if(d3)return c2;d3=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,n="[object Function]",i=function(u,d){for(var f=[],v=0;v<u.length;v+=1)f[v]=u[v];for(var g=0;g<d.length;g+=1)f[g+u.length]=d[g];return f},a=function(u,d){for(var f=[],v=d,g=0;v<u.length;v+=1,g+=1)f[g]=u[v];return f},l=function(o,u){for(var d="",f=0;f<o.length;f+=1)d+=o[f],f+1<o.length&&(d+=u);return d};return c2=function(u){var d=this;if(typeof d!="function"||t.apply(d)!==n)throw new TypeError(e+d);for(var f=a(arguments,1),v,g=function(){if(this instanceof v){var S=d.apply(this,i(f,arguments));return Object(S)===S?S:this}return d.apply(u,i(f,arguments))},c=r(0,d.length-f.length),y=[],x=0;x<c;x++)y[x]="$"+x;if(v=Function("binder","return function ("+l(y,",")+"){ return binder.apply(this,arguments); }")(g),d.prototype){var E=function(){};E.prototype=d.prototype,v.prototype=new E,E.prototype=null}return v},c2}var f2,p3;function x0(){if(p3)return f2;p3=1;var e=EO();return f2=Function.prototype.bind||e,f2}var h2,g3;function Om(){return g3||(g3=1,h2=Function.prototype.call),h2}var d2,v3;function e_(){return v3||(v3=1,d2=Function.prototype.apply),d2}var p2,m3;function AO(){return m3||(m3=1,p2=typeof Reflect<"u"&&Reflect&&Reflect.apply),p2}var g2,y3;function PO(){if(y3)return g2;y3=1;var e=x0(),t=e_(),r=Om(),n=AO();return g2=n||e.call(r,t),g2}var v2,b3;function t_(){if(b3)return v2;b3=1;var e=x0(),t=zh(),r=Om(),n=PO();return v2=function(a){if(a.length<1||typeof a[0]!="function")throw new t("a function is required");return n(e,r,a)},v2}var m2,w3;function kO(){if(w3)return m2;w3=1;var e=t_(),t=Z8(),r;try{r=[].__proto__===Array.prototype}catch(l){if(!l||typeof l!="object"||!("code"in l)||l.code!=="ERR_PROTO_ACCESS")throw l}var n=!!r&&t&&t(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return m2=n&&typeof n.get=="function"?e([n.get]):typeof a=="function"?function(o){return a(o==null?o:i(o))}:!1,m2}var y2,_3;function OO(){if(_3)return y2;_3=1;var e=Q8(),t=J8(),r=kO();return y2=e?function(i){return e(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:r?function(i){return r(i)}:null,y2}var b2,x3;function CO(){if(x3)return b2;x3=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=x0();return b2=r.call(e,t),b2}var w2,S3;function Cm(){if(S3)return w2;S3=1;var e,t=K8(),r=oO(),n=sO(),i=lO(),a=uO(),l=cO(),o=zh(),u=fO(),d=hO(),f=dO(),v=pO(),g=gO(),c=vO(),y=mO(),x=bO(),E=Function,S=function(ue){try{return E('"use strict"; return ('+ue+").constructor;")()}catch{}},b=Z8(),w=_O(),_=function(){throw new o},A=b?function(){try{return arguments.callee,_}catch{try{return b(arguments,"callee").get}catch{return _}}}():_,M=SO()(),O=OO(),L=J8(),R=Q8(),T=e_(),k=Om(),C={},q=typeof Uint8Array>"u"||!O?e:O(Uint8Array),G={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":M&&O?O([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":E,"%GeneratorFunction%":C,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&O?O(O([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!M||!O?e:O(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":i,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!M||!O?e:O(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&O?O(""[Symbol.iterator]()):e,"%Symbol%":M?Symbol:e,"%SyntaxError%":l,"%ThrowTypeError%":A,"%TypedArray%":q,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":T,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":L,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":v,"%Math.min%":g,"%Math.pow%":c,"%Math.round%":y,"%Math.sign%":x,"%Reflect.getPrototypeOf%":R};if(O)try{null.error}catch(ue){var J=O(O(ue));G["%Error.prototype%"]=J}var ae=function ue(le){var ye;if(le==="%AsyncFunction%")ye=S("async function () {}");else if(le==="%GeneratorFunction%")ye=S("function* () {}");else if(le==="%AsyncGeneratorFunction%")ye=S("async function* () {}");else if(le==="%AsyncGenerator%"){var Re=ue("%AsyncGeneratorFunction%");Re&&(ye=Re.prototype)}else if(le==="%AsyncIteratorPrototype%"){var Me=ue("%AsyncGenerator%");Me&&O&&(ye=O(Me.prototype))}return G[le]=ye,ye},H={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},V=x0(),Y=CO(),U=V.call(k,Array.prototype.concat),D=V.call(T,Array.prototype.splice),j=V.call(k,String.prototype.replace),z=V.call(k,String.prototype.slice),Z=V.call(k,RegExp.prototype.exec),re=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,Q=function(le){var ye=z(le,0,1),Re=z(le,-1);if(ye==="%"&&Re!=="%")throw new l("invalid intrinsic syntax, expected closing `%`");if(Re==="%"&&ye!=="%")throw new l("invalid intrinsic syntax, expected opening `%`");var Me=[];return j(le,re,function(Pe,de,Te,Ae){Me[Me.length]=Te?j(Ae,W,"$1"):de||Pe}),Me},se=function(le,ye){var Re=le,Me;if(Y(H,Re)&&(Me=H[Re],Re="%"+Me[0]+"%"),Y(G,Re)){var Pe=G[Re];if(Pe===C&&(Pe=ae(Re)),typeof Pe>"u"&&!ye)throw new o("intrinsic "+le+" exists, but is not available. Please file an issue!");return{alias:Me,name:Re,value:Pe}}throw new l("intrinsic "+le+" does not exist!")};return w2=function(le,ye){if(typeof le!="string"||le.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ye!="boolean")throw new o('"allowMissing" argument must be a boolean');if(Z(/^%?[^%]*%?$/,le)===null)throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Re=Q(le),Me=Re.length>0?Re[0]:"",Pe=se("%"+Me+"%",ye),de=Pe.name,Te=Pe.value,Ae=!1,be=Pe.alias;be&&(Me=be[0],D(Re,U([0,1],be)));for(var _e=1,xe=!0;_e<Re.length;_e+=1){var Le=Re[_e],pe=z(Le,0,1),Ce=z(Le,-1);if((pe==='"'||pe==="'"||pe==="`"||Ce==='"'||Ce==="'"||Ce==="`")&&pe!==Ce)throw new l("property names with quotes must have matching quotes");if((Le==="constructor"||!xe)&&(Ae=!0),Me+="."+Le,de="%"+Me+"%",Y(G,de))Te=G[de];else if(Te!=null){if(!(Le in Te)){if(!ye)throw new o("base intrinsic for "+le+" exists, but the property is not available.");return}if(b&&_e+1>=Re.length){var je=b(Te,Le);xe=!!je,xe&&"get"in je&&!("originalValue"in je.get)?Te=je.get:Te=Te[Le]}else xe=Y(Te,Le),Te=Te[Le];xe&&!Ae&&(G[de]=Te)}}return Te},w2}var _2,E3;function r_(){if(E3)return _2;E3=1;var e=Cm(),t=t_(),r=t([e("%String.prototype.indexOf%")]);return _2=function(i,a){var l=e(i,!!a);return typeof l=="function"&&r(i,".prototype.")>-1?t([l]):l},_2}var x2,A3;function n_(){if(A3)return x2;A3=1;var e=Cm(),t=r_(),r=_0(),n=zh(),i=e("%Map%",!0),a=t("Map.prototype.get",!0),l=t("Map.prototype.set",!0),o=t("Map.prototype.has",!0),u=t("Map.prototype.delete",!0),d=t("Map.prototype.size",!0);return x2=!!i&&function(){var v,g={assert:function(c){if(!g.has(c))throw new n("Side channel does not contain "+r(c))},delete:function(c){if(v){var y=u(v,c);return d(v)===0&&(v=void 0),y}return!1},get:function(c){if(v)return a(v,c)},has:function(c){return v?o(v,c):!1},set:function(c,y){v||(v=new i),l(v,c,y)}};return g},x2}var S2,P3;function NO(){if(P3)return S2;P3=1;var e=Cm(),t=r_(),r=_0(),n=n_(),i=zh(),a=e("%WeakMap%",!0),l=t("WeakMap.prototype.get",!0),o=t("WeakMap.prototype.set",!0),u=t("WeakMap.prototype.has",!0),d=t("WeakMap.prototype.delete",!0);return S2=a?function(){var v,g,c={assert:function(y){if(!c.has(y))throw new i("Side channel does not contain "+r(y))},delete:function(y){if(a&&y&&(typeof y=="object"||typeof y=="function")){if(v)return d(v,y)}else if(n&&g)return g.delete(y);return!1},get:function(y){return a&&y&&(typeof y=="object"||typeof y=="function")&&v?l(v,y):g&&g.get(y)},has:function(y){return a&&y&&(typeof y=="object"||typeof y=="function")&&v?u(v,y):!!g&&g.has(y)},set:function(y,x){a&&y&&(typeof y=="object"||typeof y=="function")?(v||(v=new a),o(v,y,x)):n&&(g||(g=n()),g.set(y,x))}};return c}:n,S2}var E2,k3;function LO(){if(k3)return E2;k3=1;var e=zh(),t=_0(),r=aO(),n=n_(),i=NO(),a=i||n||r;return E2=function(){var o,u={assert:function(d){if(!u.has(d))throw new e("Side channel does not contain "+t(d))},delete:function(d){return!!o&&o.delete(d)},get:function(d){return o&&o.get(d)},has:function(d){return!!o&&o.has(d)},set:function(d,f){o||(o=a()),o.set(d,f)}};return u},E2}var A2,O3;function Nm(){if(O3)return A2;O3=1;var e=String.prototype.replace,t=/%20/g,r={RFC1738:"RFC1738",RFC3986:"RFC3986"};return A2={default:r.RFC3986,formatters:{RFC1738:function(n){return e.call(n,t,"+")},RFC3986:function(n){return String(n)}},RFC1738:r.RFC1738,RFC3986:r.RFC3986},A2}var P2,C3;function i_(){if(C3)return P2;C3=1;var e=Nm(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n=function(){for(var E=[],S=0;S<256;++S)E.push("%"+((S<16?"0":"")+S.toString(16)).toUpperCase());return E}(),i=function(S){for(;S.length>1;){var b=S.pop(),w=b.obj[b.prop];if(r(w)){for(var _=[],A=0;A<w.length;++A)typeof w[A]<"u"&&_.push(w[A]);b.obj[b.prop]=_}}},a=function(S,b){for(var w=b&&b.plainObjects?{__proto__:null}:{},_=0;_<S.length;++_)typeof S[_]<"u"&&(w[_]=S[_]);return w},l=function E(S,b,w){if(!b)return S;if(typeof b!="object"&&typeof b!="function"){if(r(S))S.push(b);else if(S&&typeof S=="object")(w&&(w.plainObjects||w.allowPrototypes)||!t.call(Object.prototype,b))&&(S[b]=!0);else return[S,b];return S}if(!S||typeof S!="object")return[S].concat(b);var _=S;return r(S)&&!r(b)&&(_=a(S,w)),r(S)&&r(b)?(b.forEach(function(A,M){if(t.call(S,M)){var O=S[M];O&&typeof O=="object"&&A&&typeof A=="object"?S[M]=E(O,A,w):S.push(A)}else S[M]=A}),S):Object.keys(b).reduce(function(A,M){var O=b[M];return t.call(A,M)?A[M]=E(A[M],O,w):A[M]=O,A},_)},o=function(S,b){return Object.keys(b).reduce(function(w,_){return w[_]=b[_],w},S)},u=function(E,S,b){var w=E.replace(/\+/g," ");if(b==="iso-8859-1")return w.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(w)}catch{return w}},d=1024,f=function(S,b,w,_,A){if(S.length===0)return S;var M=S;if(typeof S=="symbol"?M=Symbol.prototype.toString.call(S):typeof S!="string"&&(M=String(S)),w==="iso-8859-1")return escape(M).replace(/%u[0-9a-f]{4}/gi,function(q){return"%26%23"+parseInt(q.slice(2),16)+"%3B"});for(var O="",L=0;L<M.length;L+=d){for(var R=M.length>=d?M.slice(L,L+d):M,T=[],k=0;k<R.length;++k){var C=R.charCodeAt(k);if(C===45||C===46||C===95||C===126||C>=48&&C<=57||C>=65&&C<=90||C>=97&&C<=122||A===e.RFC1738&&(C===40||C===41)){T[T.length]=R.charAt(k);continue}if(C<128){T[T.length]=n[C];continue}if(C<2048){T[T.length]=n[192|C>>6]+n[128|C&63];continue}if(C<55296||C>=57344){T[T.length]=n[224|C>>12]+n[128|C>>6&63]+n[128|C&63];continue}k+=1,C=65536+((C&1023)<<10|R.charCodeAt(k)&1023),T[T.length]=n[240|C>>18]+n[128|C>>12&63]+n[128|C>>6&63]+n[128|C&63]}O+=T.join("")}return O},v=function(S){for(var b=[{obj:{o:S},prop:"o"}],w=[],_=0;_<b.length;++_)for(var A=b[_],M=A.obj[A.prop],O=Object.keys(M),L=0;L<O.length;++L){var R=O[L],T=M[R];typeof T=="object"&&T!==null&&w.indexOf(T)===-1&&(b.push({obj:M,prop:R}),w.push(T))}return i(b),S},g=function(S){return Object.prototype.toString.call(S)==="[object RegExp]"},c=function(S){return!S||typeof S!="object"?!1:!!(S.constructor&&S.constructor.isBuffer&&S.constructor.isBuffer(S))},y=function(S,b){return[].concat(S,b)},x=function(S,b){if(r(S)){for(var w=[],_=0;_<S.length;_+=1)w.push(b(S[_]));return w}return b(S)};return P2={arrayToObject:a,assign:o,combine:y,compact:v,decode:u,encode:f,isBuffer:c,isRegExp:g,maybeMap:x,merge:l},P2}var k2,N3;function TO(){if(N3)return k2;N3=1;var e=LO(),t=i_(),r=Nm(),n=Object.prototype.hasOwnProperty,i={brackets:function(E){return E+"[]"},comma:"comma",indices:function(E,S){return E+"["+S+"]"},repeat:function(E){return E}},a=Array.isArray,l=Array.prototype.push,o=function(x,E){l.apply(x,a(E)?E:[E])},u=Date.prototype.toISOString,d=r.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:r.formatters[d],indices:!1,serializeDate:function(E){return u.call(E)},skipNulls:!1,strictNullHandling:!1},v=function(E){return typeof E=="string"||typeof E=="number"||typeof E=="boolean"||typeof E=="symbol"||typeof E=="bigint"},g={},c=function x(E,S,b,w,_,A,M,O,L,R,T,k,C,q,G,J,ae,H){for(var V=E,Y=H,U=0,D=!1;(Y=Y.get(g))!==void 0&&!D;){var j=Y.get(E);if(U+=1,typeof j<"u"){if(j===U)throw new RangeError("Cyclic object value");D=!0}typeof Y.get(g)>"u"&&(U=0)}if(typeof R=="function"?V=R(S,V):V instanceof Date?V=C(V):b==="comma"&&a(V)&&(V=t.maybeMap(V,function(de){return de instanceof Date?C(de):de})),V===null){if(A)return L&&!J?L(S,f.encoder,ae,"key",q):S;V=""}if(v(V)||t.isBuffer(V)){if(L){var z=J?S:L(S,f.encoder,ae,"key",q);return[G(z)+"="+G(L(V,f.encoder,ae,"value",q))]}return[G(S)+"="+G(String(V))]}var Z=[];if(typeof V>"u")return Z;var re;if(b==="comma"&&a(V))J&&L&&(V=t.maybeMap(V,L)),re=[{value:V.length>0?V.join(",")||null:void 0}];else if(a(R))re=R;else{var W=Object.keys(V);re=T?W.sort(T):W}var Q=O?String(S).replace(/\./g,"%2E"):String(S),se=w&&a(V)&&V.length===1?Q+"[]":Q;if(_&&a(V)&&V.length===0)return se+"[]";for(var ue=0;ue<re.length;++ue){var le=re[ue],ye=typeof le=="object"&&le&&typeof le.value<"u"?le.value:V[le];if(!(M&&ye===null)){var Re=k&&O?String(le).replace(/\./g,"%2E"):String(le),Me=a(V)?typeof b=="function"?b(se,Re):se:se+(k?"."+Re:"["+Re+"]");H.set(E,U);var Pe=e();Pe.set(g,H),o(Z,x(ye,Me,b,w,_,A,M,O,b==="comma"&&J&&a(V)?null:L,R,T,k,C,q,G,J,ae,Pe))}}return Z},y=function(E){if(!E)return f;if(typeof E.allowEmptyArrays<"u"&&typeof E.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof E.encodeDotInKeys<"u"&&typeof E.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(E.encoder!==null&&typeof E.encoder<"u"&&typeof E.encoder!="function")throw new TypeError("Encoder has to be a function.");var S=E.charset||f.charset;if(typeof E.charset<"u"&&E.charset!=="utf-8"&&E.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=r.default;if(typeof E.format<"u"){if(!n.call(r.formatters,E.format))throw new TypeError("Unknown format option provided.");b=E.format}var w=r.formatters[b],_=f.filter;(typeof E.filter=="function"||a(E.filter))&&(_=E.filter);var A;if(E.arrayFormat in i?A=E.arrayFormat:"indices"in E?A=E.indices?"indices":"repeat":A=f.arrayFormat,"commaRoundTrip"in E&&typeof E.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var M=typeof E.allowDots>"u"?E.encodeDotInKeys===!0?!0:f.allowDots:!!E.allowDots;return{addQueryPrefix:typeof E.addQueryPrefix=="boolean"?E.addQueryPrefix:f.addQueryPrefix,allowDots:M,allowEmptyArrays:typeof E.allowEmptyArrays=="boolean"?!!E.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:A,charset:S,charsetSentinel:typeof E.charsetSentinel=="boolean"?E.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!E.commaRoundTrip,delimiter:typeof E.delimiter>"u"?f.delimiter:E.delimiter,encode:typeof E.encode=="boolean"?E.encode:f.encode,encodeDotInKeys:typeof E.encodeDotInKeys=="boolean"?E.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof E.encoder=="function"?E.encoder:f.encoder,encodeValuesOnly:typeof E.encodeValuesOnly=="boolean"?E.encodeValuesOnly:f.encodeValuesOnly,filter:_,format:b,formatter:w,serializeDate:typeof E.serializeDate=="function"?E.serializeDate:f.serializeDate,skipNulls:typeof E.skipNulls=="boolean"?E.skipNulls:f.skipNulls,sort:typeof E.sort=="function"?E.sort:null,strictNullHandling:typeof E.strictNullHandling=="boolean"?E.strictNullHandling:f.strictNullHandling}};return k2=function(x,E){var S=x,b=y(E),w,_;typeof b.filter=="function"?(_=b.filter,S=_("",S)):a(b.filter)&&(_=b.filter,w=_);var A=[];if(typeof S!="object"||S===null)return"";var M=i[b.arrayFormat],O=M==="comma"&&b.commaRoundTrip;w||(w=Object.keys(S)),b.sort&&w.sort(b.sort);for(var L=e(),R=0;R<w.length;++R){var T=w[R],k=S[T];b.skipNulls&&k===null||o(A,c(k,T,M,O,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,L))}var C=A.join(b.delimiter),q=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?q+="utf8=%26%2310003%3B&":q+="utf8=%E2%9C%93&"),C.length>0?q+C:""},k2}var O2,L3;function RO(){if(L3)return O2;L3=1;var e=i_(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},i=function(g){return g.replace(/&#(\d+);/g,function(c,y){return String.fromCharCode(parseInt(y,10))})},a=function(g,c,y){if(g&&typeof g=="string"&&c.comma&&g.indexOf(",")>-1)return g.split(",");if(c.throwOnLimitExceeded&&y>=c.arrayLimit)throw new RangeError("Array limit exceeded. Only "+c.arrayLimit+" element"+(c.arrayLimit===1?"":"s")+" allowed in an array.");return g},l="utf8=%26%2310003%3B",o="utf8=%E2%9C%93",u=function(c,y){var x={__proto__:null},E=y.ignoreQueryPrefix?c.replace(/^\?/,""):c;E=E.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var S=y.parameterLimit===1/0?void 0:y.parameterLimit,b=E.split(y.delimiter,y.throwOnLimitExceeded?S+1:S);if(y.throwOnLimitExceeded&&b.length>S)throw new RangeError("Parameter limit exceeded. Only "+S+" parameter"+(S===1?"":"s")+" allowed.");var w=-1,_,A=y.charset;if(y.charsetSentinel)for(_=0;_<b.length;++_)b[_].indexOf("utf8=")===0&&(b[_]===o?A="utf-8":b[_]===l&&(A="iso-8859-1"),w=_,_=b.length);for(_=0;_<b.length;++_)if(_!==w){var M=b[_],O=M.indexOf("]="),L=O===-1?M.indexOf("="):O+1,R,T;L===-1?(R=y.decoder(M,n.decoder,A,"key"),T=y.strictNullHandling?null:""):(R=y.decoder(M.slice(0,L),n.decoder,A,"key"),T=e.maybeMap(a(M.slice(L+1),y,r(x[R])?x[R].length:0),function(C){return y.decoder(C,n.decoder,A,"value")})),T&&y.interpretNumericEntities&&A==="iso-8859-1"&&(T=i(String(T))),M.indexOf("[]=")>-1&&(T=r(T)?[T]:T);var k=t.call(x,R);k&&y.duplicates==="combine"?x[R]=e.combine(x[R],T):(!k||y.duplicates==="last")&&(x[R]=T)}return x},d=function(g,c,y,x){var E=0;if(g.length>0&&g[g.length-1]==="[]"){var S=g.slice(0,-1).join("");E=Array.isArray(c)&&c[S]?c[S].length:0}for(var b=x?c:a(c,y,E),w=g.length-1;w>=0;--w){var _,A=g[w];if(A==="[]"&&y.parseArrays)_=y.allowEmptyArrays&&(b===""||y.strictNullHandling&&b===null)?[]:e.combine([],b);else{_=y.plainObjects?{__proto__:null}:{};var M=A.charAt(0)==="["&&A.charAt(A.length-1)==="]"?A.slice(1,-1):A,O=y.decodeDotInKeys?M.replace(/%2E/g,"."):M,L=parseInt(O,10);!y.parseArrays&&O===""?_={0:b}:!isNaN(L)&&A!==O&&String(L)===O&&L>=0&&y.parseArrays&&L<=y.arrayLimit?(_=[],_[L]=b):O!=="__proto__"&&(_[O]=b)}b=_}return b},f=function(c,y,x,E){if(c){var S=x.allowDots?c.replace(/\.([^.[]+)/g,"[$1]"):c,b=/(\[[^[\]]*])/,w=/(\[[^[\]]*])/g,_=x.depth>0&&b.exec(S),A=_?S.slice(0,_.index):S,M=[];if(A){if(!x.plainObjects&&t.call(Object.prototype,A)&&!x.allowPrototypes)return;M.push(A)}for(var O=0;x.depth>0&&(_=w.exec(S))!==null&&O<x.depth;){if(O+=1,!x.plainObjects&&t.call(Object.prototype,_[1].slice(1,-1))&&!x.allowPrototypes)return;M.push(_[1])}if(_){if(x.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+x.depth+" and strictDepth is true");M.push("["+S.slice(_.index)+"]")}return d(M,y,x,E)}},v=function(c){if(!c)return n;if(typeof c.allowEmptyArrays<"u"&&typeof c.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof c.decodeDotInKeys<"u"&&typeof c.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(c.decoder!==null&&typeof c.decoder<"u"&&typeof c.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof c.charset<"u"&&c.charset!=="utf-8"&&c.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof c.throwOnLimitExceeded<"u"&&typeof c.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var y=typeof c.charset>"u"?n.charset:c.charset,x=typeof c.duplicates>"u"?n.duplicates:c.duplicates;if(x!=="combine"&&x!=="first"&&x!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var E=typeof c.allowDots>"u"?c.decodeDotInKeys===!0?!0:n.allowDots:!!c.allowDots;return{allowDots:E,allowEmptyArrays:typeof c.allowEmptyArrays=="boolean"?!!c.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof c.allowPrototypes=="boolean"?c.allowPrototypes:n.allowPrototypes,allowSparse:typeof c.allowSparse=="boolean"?c.allowSparse:n.allowSparse,arrayLimit:typeof c.arrayLimit=="number"?c.arrayLimit:n.arrayLimit,charset:y,charsetSentinel:typeof c.charsetSentinel=="boolean"?c.charsetSentinel:n.charsetSentinel,comma:typeof c.comma=="boolean"?c.comma:n.comma,decodeDotInKeys:typeof c.decodeDotInKeys=="boolean"?c.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof c.decoder=="function"?c.decoder:n.decoder,delimiter:typeof c.delimiter=="string"||e.isRegExp(c.delimiter)?c.delimiter:n.delimiter,depth:typeof c.depth=="number"||c.depth===!1?+c.depth:n.depth,duplicates:x,ignoreQueryPrefix:c.ignoreQueryPrefix===!0,interpretNumericEntities:typeof c.interpretNumericEntities=="boolean"?c.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof c.parameterLimit=="number"?c.parameterLimit:n.parameterLimit,parseArrays:c.parseArrays!==!1,plainObjects:typeof c.plainObjects=="boolean"?c.plainObjects:n.plainObjects,strictDepth:typeof c.strictDepth=="boolean"?!!c.strictDepth:n.strictDepth,strictNullHandling:typeof c.strictNullHandling=="boolean"?c.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:typeof c.throwOnLimitExceeded=="boolean"?c.throwOnLimitExceeded:!1}};return O2=function(g,c){var y=v(c);if(g===""||g===null||typeof g>"u")return y.plainObjects?{__proto__:null}:{};for(var x=typeof g=="string"?u(g,y):g,E=y.plainObjects?{__proto__:null}:{},S=Object.keys(x),b=0;b<S.length;++b){var w=S[b],_=f(w,x[w],y,typeof g=="string");E=e.merge(E,_,y)}return y.allowSparse===!0?E:e.compact(E)},O2}var C2,T3;function MO(){if(T3)return C2;T3=1;var e=TO(),t=RO(),r=Nm();return C2={formats:r,parse:t,stringify:e},C2}var R3;function a_(){if(R3)return Af;R3=1;var e=tO();function t(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,a=["<",">",'"',"`"," ","\r",`
|
|
@@ -235,7 +235,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
235
235
|
}
|
|
236
236
|
${E0}
|
|
237
237
|
</style>
|
|
238
|
-
`;let qc;const o_=()=>(qc||(qc=document.createElement("div"),qc.id="polotno-hidden-do-not-touch",qc.style.overflow="hidden",qc.style.position="relative",document.body.appendChild(qc),qc.innerHTML=`<style>#polotno-hidden-do-not-touch {${E0}}</style>`),qc);navigator.userAgent.includes("Firefox");function XO({html:e}){const t=document.createElement("div");t.innerHTML=e,t.style.display="inline-block",t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.zIndex="1000",t.style.whiteSpace="nowrap",t.style.visibility="hidden";const r=o_();r.appendChild(t);const n=t.textContent,i=t.childNodes[0]
|
|
238
|
+
`;let qc;const o_=()=>(qc||(qc=document.createElement("div"),qc.id="polotno-hidden-do-not-touch",qc.style.overflow="hidden",qc.style.position="relative",document.body.appendChild(qc),qc.innerHTML=`<style>#polotno-hidden-do-not-touch {${E0}}</style>`),qc);navigator.userAgent.includes("Firefox");function XO({html:e}){const t=document.createElement("div");t.innerHTML=e,t.style.display="inline-block",t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.zIndex="1000",t.style.whiteSpace="nowrap",t.style.visibility="hidden";const r=o_();r.appendChild(t);const n=t.textContent,i=t.childNodes[0];i.style.whiteSpace="nowrap";const a=n?.split(/\s+/)||[];let l=!1;for(let o=0;o<a.length;o++){const u=a[o];if(i&&(i.textContent=u,l=i.scrollWidth>t.clientWidth,l))break}return r.removeChild(t),l}function G3(e){const t=document.createElement("div");t.innerHTML=e,t.style.display="inline-block",t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.zIndex="1000";const r=o_();r.appendChild(t);const n=t.getBoundingClientRect();return r.removeChild(t),{width:n.width,height:n.height}}const KO={},B2={},z2=new Map;async function $3({html:e,width:t,height:r,fontFamily:n,padding:i,font:a,pixelRatio:l}){let o="";if(n!=="Arial"&&!a){const y=zA();o=await async function(x,E){const S=`${x}|${E}`;if(z2.has(S))return z2.get(S);const b=`https://fonts.googleapis.com/css?family=${x}:${E}&display=swap`,w=await(await fetch(b)).text();return z2.set(S,w),w}(n,y)}if(a){const y=a.styles||(a.url?[{src:`url("${a.url}")`}]:(x=>{if(B2[x])return B2[x];const E=function(b){const w=[];for(let _=0;_<document.styleSheets.length;_++){const A=document.styleSheets[_];try{const M=A.cssRules;if(M)for(let O=0;O<M.length;O++){const L=M[O];L instanceof CSSFontFaceRule&&L.style.fontFamily.replace(/['"]/g,"")===b&&w.push(L)}}catch(M){console.warn(`Could not access stylesheet: ${A.href}`,M)}}return w}(x),S=E.filter(b=>b.style.fontFamily.replace(/['"]/g,"")===x).map(b=>({src:b.style.getPropertyValue("src"),fontStyle:b.style.getPropertyValue("font-style")||"normal",fontWeight:b.style.getPropertyValue("font-weight")||"normal"}));return B2[x]=S,S})(n));o="",y.forEach(x=>{o+=`
|
|
239
239
|
@font-face {
|
|
240
240
|
font-family: '${n}';
|
|
241
241
|
src: ${x.src};
|
|
@@ -265,7 +265,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
265
265
|
-moz-background-clip: text;
|
|
266
266
|
-webkit-text-fill-color: transparent;
|
|
267
267
|
-moz-text-fill-color: transparent;
|
|
268
|
-
`),`<div style="${["white-space: pre-wrap",`width: ${Math.round(e.width||100)}px`,n,`font-size: ${e.fontSize}px`,`font-family: '${t}'`,`text-align: ${e.align}`,`text-transform: ${e.textTransform}`,e.textDecoration?`text-decoration: ${e.textDecoration}; text-decoration-color: ${r||e.fill}; text-decoration-layer: over`:"",e.lineHeight?`line-height: ${e.lineHeight}`:"",e.letterSpacing?`letter-spacing: ${e.letterSpacing*e.fontSize}px`:"",e.fontStyle?`font-style: ${e.fontStyle}`:"",e.fontWeight?`font-weight: ${e.fontWeight}`:"",e.strokeWidth?`-webkit-text-stroke: ${e.strokeWidth}px ${e.stroke}`:"",e.strokeWidth?"paint-order: stroke fill":""].filter(Boolean).join("; ")}" contentEditable dir="${w0(Pu(e.text))}">${$A(e.text).replace(/\n/g,"</br>")}</div>`}const K3=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),oC=Yn(({element:e,store:t})=>{const r=ce.useRef(null),[n,i]=ce.useState(),[a,l]=ce.useState(!1),[o,u]=ce.useState(!1),d=ce.useRef(e.height),f=t.selectedShapes.indexOf(e)>=0&&e.selectable,v=e.fontSize/3,{textVerticalResizeEnabled:g}=Ai,c=G8(e.fontFamily),[y]=H8(t,e.fontFamily),x=e._editModeEnabled;xp(r);const E=y?e.fontFamily:c!==e.fontFamily?c:"Arial",S=tf(e).fill,b=X3(e,{fontFamily:E,color:S}),{width:w,height:_}=function(V,Y,U){return ce.useMemo(()=>G3(V),[V,Y.width,U])}(b,e,y);ce.useEffect(()=>{if(!y)return;if(!e.height)return void t.history.ignore(()=>{e.set({height:_})});const{textOverflow:V}=Ai;if(V!=="change-font-size"||a)V==="resize"&&(g&&e.height<_&&t.history.ignore(()=>{e.set({height:_})}),g||e.height===_||t.history.ignore(()=>{e.set({height:_})}));else{const Y=(U=>{let D=U.fontSize;for(let j=1;j<50;j++){const z=X3(Object.assign(Object.assign({},U.toJSON()),{fontSize:D}),{fontFamily:U.fontFamily}),{height:Z}=G3(z),re=U.height&&Z>U.height,W=XO({html:z});if(!re&&!W)break;D-=.5}return D})(e);Y!==e.fontSize?t.history.ignore(()=>{e.set({fontSize:Y})}):e.height!==_&&(g&&e.height<_?t.history.ignore(()=>{e.set({height:_})}):g||t.history.ignore(()=>{e.set({height:_})}))}});const A=ce.useMemo(()=>{const V={lastArgs:null,lastResult:null};return async function(Y){return V.lastArgs&&V.lastResult&&(U=V.lastArgs,D=Y,JSON.stringify(U)===JSON.stringify(D))||(V.lastResult=await $3(Y),V.lastArgs=Object.assign({},Y)),V.lastResult;var U,D}},[]),M=ce.useRef(0),O=ce.useRef(null);ce.useEffect(()=>{a||x||(async()=>{M.current++;const V=M.current;let Y=Rh(`text ${e.id} ${V}`);O.current&&O.current(),O.current=Y,u(!0);let U=null;const D=K3?5:1;for(let j=0;j<D;j++){const z=j>0?A:$3;try{if(U=await z({skipCache:j>0,html:b,width:e.width||1,height:e.height||_||1,fontFamily:E,padding:v,pixelRatio:t._elementsPixelRatio,font:t.fonts.find(Z=>Z.fontFamily===E)||wm.find(Z=>Z.fontFamily===E)}),V!==M.current)return;if(K3&&aC(U)){await new Promise(Z=>setTimeout(Z,50*(j+1)));continue}break}catch(Z){console.error(Z),Sp(`Error rendering rich text with id ${e.id}`);break}}U?i(U):Y?(Y(),Y=null):console.error("Finish function is called twice!"),u(!1)})()},[b,a,_,x,E,e.height,t._elementsPixelRatio,y]);const[L,R]=jv(o,300),[T]=jv(a,300,!0),k=T||L;ce.useEffect(()=>{var V;if(!k)return Ou(()=>{const Y=r.current;_s(Y,e)});(V=r.current)===null||V===void 0||V.clearCache()},[n,k,e.shadowColor,e.shadowOffsetX,e.shadowOffsetY,e.shadowOpacity]),ce.useEffect(()=>{n&&!o&&O.current&&(O.current(),O.current=null)},[n,o]),ce.useEffect(()=>()=>{O.current&&O.current()},[]),ce.useEffect(()=>{f||Pu(e.text)!==""||!e.removable||e.placeholder||t.deleteElements([e.id])},[f]);let C=0;e.verticalAlign==="middle"&&(C=(e.height-_)/2),e.verticalAlign==="bottom"&&(C=e.height-_);const q=V8({fontLoaded:y,fontFamily:e.fontFamily,fontSize:e.fontSize,lineHeight:e.lineHeight}),G=lf(),J=ce.useRef(null),ae=ce.useRef(null),H=x&&e.strokeWidth>0;return ce.createElement(ce.Fragment,null,ce.createElement(En,{x:e.a.x,y:e.a.y,offsetX:e.backgroundPadding*(e.fontSize*q*.5),offsetY:e.backgroundPadding*(e.fontSize*q*.5),rotation:e.a.rotation,hideInExport:!e.showInExport,listening:!1,visible:e.backgroundEnabled,opacity:e.backgroundOpacity*e.a.opacity,fill:e.backgroundColor,width:e.a.width+e.backgroundPadding*(e.fontSize*q),height:e.a.height+e.backgroundPadding*(e.fontSize*q),cornerRadius:e.backgroundCornerRadius*(e.fontSize*q*.5)}),ce.createElement(En,{ref:r,name:"element",x:e.a.x,y:e.a.y,listening:e.selectable,rotation:e.a.rotation,width:e.a.width,height:e.a.height,visible:!k,draggable:G?e.draggable&&f:e.draggable,preventDefault:!G||f,opacity:x?0:e.a.opacity,hideInExport:!e.showInExport,onDragMove:V=>{e.set({x:V.target.x(),y:V.target.y()})},onDragEnd:V=>{e.set({x:V.target.x(),y:V.target.y()})},id:e.id,onDblClick:V=>{e.contentEditable&&(ae.current={x:V.evt.clientX,y:V.evt.clientY},e.toggleEditMode(!0))},onDblTap:V=>{var Y;if(e.contentEditable){const U=(Y=V.evt.changedTouches)===null||Y===void 0?void 0:Y[0];ae.current=U?{x:U.clientX,y:U.clientY}:null,e.toggleEditMode(!0)}},onTransformStart:V=>{l(!0),d.current=e.height},onTransform:V=>{var Y;const U=V.target,D=((Y=U.getStage())===null||Y===void 0?void 0:Y.findOne("Transformer")).getActiveAnchor(),j=D==="middle-left"||D==="middle-right",z=D==="top-center"||D==="bottom-center",Z=U.scaleX();if(j){const re=U.scaleX(),W=U.width()*re,Q=e.fontSize;let se=W;if(W<Q&&(se=Q,J.current&&U.position(J.current)),U.width(se),U.scaleX(1),Ai.textVerticalResizeEnabled){const ue=Math.max(_,d.current);e.set({height:ue})}e.set({width:U.width(),x:U.x(),y:U.y()})}else if(z){let re=Ai.textOverflow==="resize"?_:e.lineHeight*e.fontSize;const W=Math.max(re,V.target.height()*V.target.scaleY());U.scaleY(1),e.set({x:U.x(),y:U.y(),height:W,rotation:U.rotation()})}else U.scaleX(1),U.scaleY(1),e.set({fontSize:e.fontSize*Z,letterSpacing:e.letterSpacing,width:U.width()*Z,x:U.x(),y:U.y(),rotation:U.rotation(),height:U.height()*Z});J.current=V.target.position()},onTransformEnd:V=>{l(!1),u(!0);const Y=V.target.scaleX();V.target.scaleX(1),V.target.scaleY(1),e.set({fontSize:e.fontSize*Y,width:V.target.width()*Y,x:V.target.x(),y:V.target.y(),rotation:V.target.rotation(),shadowBlur:e.shadowBlur*Y,shadowOffsetX:e.shadowOffsetX*Y,shadowOffsetY:e.shadowOffsetY*Y,strokeWidth:e.strokeWidth*Y})}}),ce.createElement(bu,{ref:r,image:n,x:e.a.x,y:e.a.y,offsetX:v,offsetY:v-C,listening:!1,rotation:e.a.rotation,width:e.a.width+2*v,height:(e.a.width+2*v)*(n?.height/n?.width||1),visible:!k&&!x,opacity:e.a.opacity,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,hideInExport:!e.showInExport,editModeEnabled:e._editModeEnabled||a||k}),(k||H)&&ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,offsetY:-C},ce.createElement($1,{divProps:{style:{pointerEvents:"none"}}},ce.createElement(u_,{dangerouslySetInnerHTML:{__html:b},style:{pointerEvents:"none",opacity:e.a.opacity,textShadow:e.shadowEnabled?`${e.shadowOffsetX}px ${e.shadowOffsetY}px ${e.shadowBlur}px ${e.shadowColor}`:void 0}}))),x&&ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,offsetY:-C},ce.createElement($1,null,ce.createElement(iC,{html:b,element:e,onChange:V=>{const Y=q8({oldText:Pu(e.text),newText:Pu(V),element:e});e.set({text:V,fontSize:Y})},onBlur:V=>{e.toggleEditMode(!1),R(!0)},clickCoords:ae.current}))))});function sC(e,t){if(!e||!t)return;const{x:r,y:n}=t;try{let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(r,n);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(r,n);a&&(i=document.createRange(),i.setStart(a.offsetNode,a.offset))}if(i){const a=X8.find(i.startContainer,!0);if(a){const l=a.offset(e.scroll)+i.startOffset;return void e.setSelection(l,0,"api")}}}catch{}e.setSelection(0,0,"api")}function Rm(e){return e/180*Math.PI}function u1(e,t,r,n,i){const a=Math.sqrt(r*r+n*n);return i+=Math.atan2(n,r),{x:e+a*Math.cos(i),y:t+a*Math.sin(i)}}function A0(e){const{x:t,y:r,width:n,height:i}=e,a=Rm(e.rotation),l=u1(t,r,0,0,a),o=u1(t,r,n,0,a),u=u1(t,r,n,i,a),d=u1(t,r,0,i,a),f=Math.min(l.x,o.x,u.x,d.x),v=Math.min(l.y,o.y,u.y,d.y),g=Math.max(l.x,o.x,u.x,d.x),c=Math.max(l.y,o.y,u.y,d.y);return{x:f,y:v,width:g-f,height:c-v,minX:f,minY:v,maxX:g,maxY:c}}function P0(e){const t=e.map(l=>A0(l)),r=Math.min(...t.map(l=>l.minX)),n=Math.min(...t.map(l=>l.minY)),i=Math.max(...t.map(l=>l.maxX)),a=Math.max(...t.map(l=>l.maxY));return{x:r,y:n,width:i-r,height:a-n,minX:r,minY:n,maxX:i,maxY:a}}function lC(e){const t=Rm(e.rotation||0);return{x:e.x+e.width/2*Math.cos(t)+e.height/2*Math.sin(-t),y:e.y+e.height/2*Math.cos(t)+e.width/2*Math.sin(t)}}function uC(e,t,r){const n=Rm(t),i=r.x+(e.x-r.x)*Math.cos(n)-(e.y-r.y)*Math.sin(n),a=r.y+(e.x-r.x)*Math.sin(n)+(e.y-r.y)*Math.cos(n);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:i,y:a})}function cC(e,t){return uC(e,t,lC(e))}const Yo={stroke:"rgb(0, 161, 255)",strokeWidth:1,dash:[4,6]},fC=({stroke:e,strokeWidth:t,dash:r})=>{e!==void 0&&(Yo.stroke=e),t!==void 0&&(Yo.strokeWidth=t),r!==void 0&&(Yo.dash=r)};let Z3=({targetKonvaNodes:e,guideKonvaNode:t,distance:r,snapDirection:n})=>r<5;function zv(e,t){var r=[],n=[];e.vertical.forEach(d=>{t.vertical.forEach(f=>{var v=Math.abs(d.offset-f.guide);Z3({targetKonvaNodes:f.nodes,guideKonvaNode:d.node,distance:v,snapDirection:d.snap})&&r.push({lineGuide:d.offset,diff:v,snap:f.snap,offset:f.offset})})}),e.horizontal.forEach(d=>{t.horizontal.forEach(f=>{var v=Math.abs(d.offset-f.guide);Z3({targetKonvaNodes:f.nodes,guideKonvaNode:d.node,distance:v,snapDirection:d.snap})&&n.push({lineGuide:d.offset,diff:v,snap:f.snap,offset:f.offset})})});var i=[];const a=r.sort((d,f)=>d.diff-f.diff),l=n.sort((d,f)=>d.diff-f.diff);var o=a[0],u=l[0];return o&&a.filter(d=>Math.abs(d.diff-o.diff)<.1).forEach(d=>{i.push(Object.assign({orientation:"V"},d))}),u&&l.filter(d=>Math.abs(d.diff-u.diff)<.1).forEach(d=>{i.push(Object.assign({orientation:"H"},d))}),i}const c_=()=>{if(sr.DD._dragElements.size===0)return;const e=[...sr.DD._dragElements.entries()],t=e.find(([r,n])=>n.node instanceof sr.Transformer);t&&(e.splice(e.indexOf(t),1),e.unshift(t),sr.DD._dragElements.clear(),e.forEach(([r,n])=>{sr.DD._dragElements.set(r,n)}))};function hC(e,t,r){const n=ce.useRef(null);fC(r);const i=f=>f.hasName("element")||f.hasName("page-background")||!n.current&&f.hasName("elements-area");function a(f){var v;const g=(v=e.current)===null||v===void 0?void 0:v.getStage(),c=[],y=[];return g.find(i).forEach(x=>{if(!(f.indexOf(x)>=0)){var E=x.getClientRect({skipShadow:!0,skipStroke:!0});c.push({offset:E.x,node:x,snap:"start"},{offset:E.x+E.width,node:x,snap:"end"},{offset:E.x+E.width/2,node:x,snap:"center"}),y.push({offset:E.y,node:x,snap:"start"},{offset:E.y+E.height,node:x,snap:"end"},{offset:E.y+E.height/2,node:x,snap:"center"})}}),{vertical:c,horizontal:y}}function l(f){var v;const g=(v=e.current)===null||v===void 0?void 0:v.getLayer(),c=g?.children.find(y=>y.name()==="line-guides");f.forEach(y=>{if(y.orientation==="H"){var x=new sr.Line({x:-g.getStage().x(),y:-g.getStage().y(),points:[-6e3,y.lineGuide,6e3,y.lineGuide],stroke:Yo.stroke,strokeWidth:Yo.strokeWidth,name:"guid-line",dash:Yo.dash});c?.add(x),g.batchDraw()}else y.orientation==="V"&&(x=new sr.Line({x:-g.getStage().x(),y:-g.getStage().y(),points:[y.lineGuide,-6e3,y.lineGuide,6e3],stroke:Yo.stroke,strokeWidth:Yo.strokeWidth,name:"guid-line",dash:Yo.dash}),c?.add(x))})}const o=f=>{const v=f.target.getLayer().children.find(w=>w.name()==="line-guides");v?.destroyChildren();var g=a(f.target.nodes()),c=function(w){const _=w.__getNodeRect(),A=A0(Object.assign(Object.assign({},_),{rotation:sr.Util.radToDeg(_.rotation)})),M=w.getAbsolutePosition();return{vertical:[{guide:A.x,offset:M.x-A.x,snap:"start",nodes:w.nodes()},{guide:A.x+A.width/2,offset:M.x-A.x-A.width/2,snap:"center",nodes:w.nodes()},{guide:A.x+A.width,offset:M.x-A.x-A.width,snap:"end",nodes:w.nodes()}],horizontal:[{guide:A.y,offset:M.y-A.y,snap:"start",nodes:w.nodes()},{guide:A.y+A.height/2,offset:M.y-A.y-A.height/2,snap:"center",nodes:w.nodes()},{guide:A.y+A.height,offset:M.y-A.y-A.height,snap:"end",nodes:w.nodes()}]}}(f.target),y=zv(g,c);if(!y.length)return;l(y);const x=f.target.getAbsolutePosition(),E=(f.target.nodes().map(w=>w.getAbsolutePosition()),Object.assign({},x));y.forEach(w=>{switch(w.snap){case"start":case"center":case"end":switch(w.orientation){case"V":E.x=w.lineGuide+w.offset;break;case"H":E.y=w.lineGuide+w.offset}}});const S=E.x-x.x,b=E.y-x.y;f.evt.ctrlKey||f.evt.metaKey||f.target.nodes().forEach(w=>{const _=w.getAbsolutePosition();w.setAbsolutePosition({x:_.x+S,y:_.y+b})})},u=(f,v,g)=>{var c;const y=e.current,x=y.getLayer().children.find(L=>L.name()==="line-guides");if(x?.destroyChildren(),y.getActiveAnchor()==="rotater")return v;const E=y.getActiveAnchor(),S=dC[E],b=(c=y.findOne(`.${S}`))===null||c===void 0?void 0:c.getAbsolutePosition();if(!b)return v;const w={x:f.x-b.x,y:f.y-b.y},_=function(L,R){const T=J3(L,R)/J3(R,R);return{x:T*R.x,y:T*R.y}}({x:v.x-f.x,y:v.y-f.y},w),A={x:f.x+_.x,y:f.y+_.y};var M=zv(a(y.nodes()),{vertical:[{guide:A.x,offset:0,snap:"start",nodes:y.nodes()}],horizontal:[{guide:A.y,offset:0,snap:"start",nodes:y.nodes()}]});if(!M.length||(l(M),g.ctrlKey||g.metaKey))return v;const O=[];if(M.forEach(L=>{const R=function(T,k,C){if(C.orientation==="V"){const q=C.lineGuide;if(Math.abs(k.x-T.x)<1e-4)return null;const G=(k.y-T.y)/(k.x-T.x);return{x:q,y:G*q+(T.y-G*T.x)}}{const q=C.lineGuide;if(Math.abs(k.y-T.y)<1e-4)return null;const G=(k.y-T.y)/(k.x-T.x);return{x:(q-T.y)/G+T.x,y:q}}}(A,b,{orientation:L.orientation,lineGuide:L.lineGuide});R&&O.push(R)}),O.length>0){let L=O[0],R=Math.sqrt(Math.pow(A.x-L.x,2)+Math.pow(A.y-L.y,2));if(O.forEach(T=>{const k=Math.sqrt(Math.pow(A.x-T.x,2)+Math.pow(A.y-T.y,2));k<R&&(R=k,L=T)}),R<10)return L}return A},d=f=>{if(!f.target)return;const v=f.target.getLayer(),g=v.children.find(c=>c.name()==="line-guides");g?.destroyChildren(),v.batchDraw()};ce.useEffect(()=>{e.current&&(e.current.anchorDragBoundFunc(u),e.current.on("dragstart",f=>{setTimeout(()=>{c_()})}),e.current.on("dragmove",o),e.current.on("dragend",d),e.current.on("transformend",d),e.current.on("transform",f=>{var v,g;f.evt.ctrlKey||f.evt.metaKey?(v=e.current)===null||v===void 0||v.rotationSnapTolerance(0):(g=e.current)===null||g===void 0||g.rotationSnapTolerance(5)}))},[])}function Q3(e,t,r){const n=l=>l.hasName("element")||l.hasName("line-anchor")||l.hasName("page-background")||l.hasName("elements-area"),i=l=>{const o=l.target.getLayer().children.find(y=>y.name()==="line-guides");o?.destroyChildren();var u,d=zv(function(y){var x;const E=(x=e.current)===null||x===void 0?void 0:x.getStage();var S=[],b=[];return E.find(n).forEach(w=>{if(!(y.indexOf(w)>=0)){var _=w.getClientRect({skipShadow:!0,skipStroke:!0});w.hasName("line-anchor")&&(_={x:w.absolutePosition().x,y:w.absolutePosition().y,width:0,height:0}),S.push({offset:_.x,node:w,snap:"start"},{offset:_.x+_.width,node:w,snap:"end"},{offset:_.x+_.width/2,node:w,snap:"center"}),b.push({offset:_.y,node:w,snap:"start"},{offset:_.y+_.height,node:w,snap:"end"},{offset:_.y+_.height/2,node:w,snap:"center"})}}),{vertical:S,horizontal:b}}([l.target,...t.map(y=>y.current)]),{vertical:[{guide:(u=l.target).absolutePosition().x,offset:0,snap:"center",nodes:[u]}],horizontal:[{guide:u.absolutePosition().y,offset:0,snap:"center",nodes:[u]}]});if(!d.length)return;(function(y){var x;const E=(x=e.current)===null||x===void 0?void 0:x.getLayer(),S=E?.children.find(b=>b.name()==="line-guides");y.forEach(b=>{if(b.orientation==="H"){var w=new sr.Line({points:[-6e3,b.lineGuide,6e3,b.lineGuide],stroke:Yo.stroke,strokeWidth:Yo.strokeWidth,name:"guid-line",dash:Yo.dash});S?.add(w),E.batchDraw()}else b.orientation==="V"&&(w=new sr.Line({points:[b.lineGuide,-6e3,b.lineGuide,6e3],stroke:Yo.stroke,strokeWidth:Yo.strokeWidth,name:"guid-line",dash:Yo.dash}),S?.add(w))})})(d);const f=l.target.getAbsolutePosition(),v=Object.assign({},f);d.forEach(y=>{switch(y.snap){case"start":case"center":case"end":switch(y.orientation){case"V":v.x=y.lineGuide+y.offset;break;case"H":v.y=y.lineGuide+y.offset}}});const g=v.x-f.x,c=v.y-f.y;if(!l.evt.ctrlKey&&!l.evt.metaKey){const y=l.target.getAbsolutePosition();l.target.absolutePosition({x:y.x+g,y:y.y+c})}},a=l=>{if(!l.target)return;const o=l.target.getLayer(),u=o.children.find(d=>d.name()==="line-guides");u?.destroyChildren(),o.batchDraw()};ce.useEffect(()=>{e.current&&(e.current.on("dragmove",i),e.current.on("dragend",a))},r)}function J3(e,t){return e.x*t.x+e.y*t.y}const dC={"top-left":"bottom-right","top-center":"bottom-center","top-right":"bottom-left","middle-right":"middle-left","bottom-right":"top-left","bottom-center":"top-center","bottom-left":"top-right","middle-left":"middle-right"};function pC(e){const{x:t,y:r,width:n,height:i,rotation:a}=e.a,l=a*Math.PI/180,o={x:t+i/2*Math.cos(l+Math.PI/2),y:r+i/2*Math.sin(l+Math.PI/2)};return{middleLeft:o,middleRight:{x:o.x+n*Math.cos(l),y:o.y+n*Math.sin(l)}}}function e4(e,t,r){const n=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),i=Math.atan2(t.y-e.y,t.x-e.x),a=180*i/Math.PI;return{x:e.x+Math.cos(i-Math.PI/2)*r/2,y:e.y+Math.sin(i-Math.PI/2)*r/2,width:n,height:r,rotation:a}}const t4=(e,t)=>({offsetX:5/e,offsetY:5/e,width:10/e,height:10/e,fill:"white",stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1,draggable:!0,dragDistance:0,onMouseEnter:r=>{r.target.getStage().container().style.cursor="crosshair"},onMouseLeave:r=>{r.target.getStage().container().style.cursor=""},onDragStart:r=>{t.history.startTransaction()},onDragEnd:r=>{t.history.endTransaction()}}),r4=Yn(({element:e,type:t})=>{const r=tf(e,e.a.color,"fill"),n=tf(e,e.a.color,"stroke"),i=Object.assign(Object.assign(Object.assign({strokeWidth:e.height,lineCap:"round",lineJoin:"round"},n),r),{opacity:e.a.opacity,hideInExport:!e.showInExport});return ce.createElement(ce.Fragment,null,t==="arrow"&&ce.createElement(Yc,Object.assign({points:[3*e.height,2*-e.height,0,0,3*e.height,2*e.height]},i)),t==="triangle"&&ce.createElement(Yc,Object.assign({points:[3*e.height,2*-e.height,0,0,3*e.height,2*e.height],closed:!0},i)),t==="bar"&&ce.createElement(Yc,Object.assign({points:[0,2*-e.height,0,2*e.height],closed:!0},i)),t==="square"&&ce.createElement(Yc,Object.assign({points:[0,2*-e.height,4*e.height,2*-e.height,4*e.height,2*e.height,0,2*e.height],closed:!0},i)),t==="circle"&&ce.createElement(fA,Object.assign({x:2*e.height,y:0,radius:2*e.height},i)))}),gC=Yn(({element:e,store:t})=>{const r=ce.useRef(null),n=ce.useRef(null),i=ce.useRef(null),a=e.selectable||t.role==="admin",l=lf(),o=t.selectedElements.indexOf(e)>=0&&t.selectedElements.length===1,u=t.selectedShapes.indexOf(e)>=0&&e.selectable,{middleLeft:d,middleRight:f}=pC(e);Q3(n,[r],[o]),Q3(i,[r],[o]);const v=tf(e,e.a.color,"stroke");return ce.createElement(ce.Fragment,null,ce.createElement(Yc,Object.assign({ref:r,name:"element",id:e.id,x:e.a.x,y:e.a.y,points:[0,0,e.a.width,0],offsetY:-e.a.height/2,strokeWidth:e.a.height,hitStrokeWidth:Math.max(e.a.height,20),dash:e.dash.map(g=>g*e.a.height)},v,{rotation:e.a.rotation,opacity:e.animated("opacity"),shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,listening:a,draggable:l?e.draggable&&u:e.draggable,preventDefault:!l||u,hideInExport:!e.showInExport,onDragMove:g=>{e.set({x:g.target.x(),y:g.target.y()})},onDragEnd:g=>{e.set({x:g.target.x(),y:g.target.y()})},onTransform:g=>{const c=g.target.scaleX();g.target.scaleX(1),g.target.scaleY(1),e.set({height:e.height*c,width:e.width*c,x:g.target.x(),y:g.target.y(),rotation:g.target.rotation()})}})),ce.createElement(vn,{x:d.x,y:d.y,rotation:e.rotation,hideInExport:!e.showInExport},ce.createElement(r4,{element:e,type:e.startHead})),ce.createElement(vn,{x:f.x,y:f.y,rotation:e.rotation+180},ce.createElement(r4,{element:e,type:e.endHead})),o&&e.resizable&&ce.createElement(bm,{selector:".page-abs-container",enabled:!0},ce.createElement(vn,{visible:o},ce.createElement(En,Object.assign({x:d.x,y:d.y,ref:n,name:"line-anchor"},t4(t.scale,t),{onDragMove:g=>{const c=e4(g.target.position(),f,e.height);e.set({x:c.x,y:c.y,width:c.width,rotation:c.rotation})}})),ce.createElement(En,Object.assign({x:f.x,y:f.y,ref:i,name:"line-anchor"},t4(t.scale,t),{onDragMove:g=>{const c=e4(d,g.target.position(),e.height);e.set({x:c.x,y:c.y,width:c.width,rotation:c.rotation})}})))))});function dp(){return document.createElement("canvas")}const f_=new window.Image;f_.src=$f(`
|
|
268
|
+
`),`<div style="${["white-space: pre-wrap",`width: ${Math.round(e.width||100)}px`,n,`font-size: ${e.fontSize}px`,`font-family: '${t}'`,`text-align: ${e.align}`,`text-transform: ${e.textTransform}`,e.textDecoration?`text-decoration: ${e.textDecoration}; text-decoration-color: ${r||e.fill}; text-decoration-layer: over`:"",e.lineHeight?`line-height: ${e.lineHeight}`:"",e.letterSpacing?`letter-spacing: ${e.letterSpacing*e.fontSize}px`:"",e.fontStyle?`font-style: ${e.fontStyle}`:"",e.fontWeight?`font-weight: ${e.fontWeight}`:"",e.strokeWidth?`-webkit-text-stroke: ${e.strokeWidth}px ${e.stroke}`:"",e.strokeWidth?"paint-order: stroke fill":""].filter(Boolean).join("; ")}" contentEditable dir="${w0(Pu(e.text))}">${$A(e.text).replace(/\n/g,"</br>")}</div>`}const K3=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),oC=Yn(({element:e,store:t})=>{const r=ce.useRef(null),[n,i]=ce.useState(),[a,l]=ce.useState(!1),[o,u]=ce.useState(!1),d=ce.useRef(e.height),f=t.selectedShapes.indexOf(e)>=0&&e.selectable,v=e.fontSize/3,{textVerticalResizeEnabled:g}=gi,c=G8(e.fontFamily),[y]=H8(t,e.fontFamily),x=e._editModeEnabled;xp(r);const E=y?e.fontFamily:c!==e.fontFamily?c:"Arial",S=tf(e).fill,b=X3(e,{fontFamily:E,color:S}),{width:w,height:_}=function(V,Y,U){return ce.useMemo(()=>G3(V),[V,Y.width,U])}(b,e,y);ce.useEffect(()=>{if(!y)return;if(!e.height)return void t.history.ignore(()=>{e.set({height:_})});const{textOverflow:V}=gi;if(V!=="change-font-size"||a)V==="resize"&&(g&&e.height<_&&t.history.ignore(()=>{e.set({height:_})}),g||e.height===_||t.history.ignore(()=>{e.set({height:_})}));else{const Y=(U=>{let D=U.fontSize;for(let j=1;j<50;j++){const z=X3(Object.assign(Object.assign({},U.toJSON()),{fontSize:D}),{fontFamily:U.fontFamily}),{height:Z}=G3(z),re=U.height&&Z>U.height,W=XO({html:z});if(!(re||W&&!gi.textSplitAllowed))break;D-=.5}return D})(e);Y!==e.fontSize?t.history.ignore(()=>{e.set({fontSize:Y})}):e.height!==_&&(g&&e.height<_?t.history.ignore(()=>{e.set({height:_})}):g||t.history.ignore(()=>{e.set({height:_})}))}});const A=ce.useMemo(()=>{const V={lastArgs:null,lastResult:null};return async function(Y){return V.lastArgs&&V.lastResult&&(U=V.lastArgs,D=Y,JSON.stringify(U)===JSON.stringify(D))||(V.lastResult=await $3(Y),V.lastArgs=Object.assign({},Y)),V.lastResult;var U,D}},[]),M=ce.useRef(0),O=ce.useRef(null);ce.useEffect(()=>{a||x||(async()=>{M.current++;const V=M.current;let Y=Rh(`text ${e.id} ${V}`);O.current&&O.current(),O.current=Y,u(!0);let U=null;const D=K3?5:1;for(let j=0;j<D;j++){const z=j>0?A:$3;try{if(U=await z({skipCache:j>0,html:b,width:e.width||1,height:e.height||_||1,fontFamily:E,padding:v,pixelRatio:t._elementsPixelRatio,font:t.fonts.find(Z=>Z.fontFamily===E)||wm.find(Z=>Z.fontFamily===E)}),V!==M.current)return;if(K3&&aC(U)){await new Promise(Z=>setTimeout(Z,50*(j+1)));continue}break}catch(Z){console.error(Z),Sp(`Error rendering rich text with id ${e.id}`);break}}U?i(U):Y?(Y(),Y=null):console.error("Finish function is called twice!"),u(!1)})()},[b,a,_,x,E,e.height,t._elementsPixelRatio,y]);const[L,R]=jv(o,300),[T]=jv(a,300,!0),k=T||L;ce.useEffect(()=>{var V;if(!k)return Ou(()=>{const Y=r.current;_s(Y,e)});(V=r.current)===null||V===void 0||V.clearCache()},[n,k,e.shadowColor,e.shadowOffsetX,e.shadowOffsetY,e.shadowOpacity]),ce.useEffect(()=>{n&&!o&&O.current&&(O.current(),O.current=null)},[n,o]),ce.useEffect(()=>()=>{O.current&&O.current()},[]),ce.useEffect(()=>{f||Pu(e.text)!==""||!e.removable||e.placeholder||t.deleteElements([e.id])},[f]);let C=0;e.verticalAlign==="middle"&&(C=(e.height-_)/2),e.verticalAlign==="bottom"&&(C=e.height-_);const q=V8({fontLoaded:y,fontFamily:e.fontFamily,fontSize:e.fontSize,lineHeight:e.lineHeight}),G=lf(),J=ce.useRef(null),ae=ce.useRef(null),H=x&&e.strokeWidth>0;return ce.createElement(ce.Fragment,null,ce.createElement(En,{x:e.a.x,y:e.a.y,offsetX:e.backgroundPadding*(e.fontSize*q*.5),offsetY:e.backgroundPadding*(e.fontSize*q*.5),rotation:e.a.rotation,hideInExport:!e.showInExport,listening:!1,visible:e.backgroundEnabled,opacity:e.backgroundOpacity*e.a.opacity,fill:e.backgroundColor,width:e.a.width+e.backgroundPadding*(e.fontSize*q),height:e.a.height+e.backgroundPadding*(e.fontSize*q),cornerRadius:e.backgroundCornerRadius*(e.fontSize*q*.5)}),ce.createElement(En,{ref:r,name:"element",x:e.a.x,y:e.a.y,listening:e.selectable,rotation:e.a.rotation,width:e.a.width,height:e.a.height,visible:!k,draggable:G?e.draggable&&f:e.draggable,preventDefault:!G||f,opacity:x?0:e.a.opacity,hideInExport:!e.showInExport,onDragMove:V=>{e.set({x:V.target.x(),y:V.target.y()})},onDragEnd:V=>{e.set({x:V.target.x(),y:V.target.y()})},id:e.id,onDblClick:V=>{e.contentEditable&&(ae.current={x:V.evt.clientX,y:V.evt.clientY},e.toggleEditMode(!0))},onDblTap:V=>{var Y;if(e.contentEditable){const U=(Y=V.evt.changedTouches)===null||Y===void 0?void 0:Y[0];ae.current=U?{x:U.clientX,y:U.clientY}:null,e.toggleEditMode(!0)}},onTransformStart:V=>{l(!0),d.current=e.height},onTransform:V=>{var Y;const U=V.target,D=((Y=U.getStage())===null||Y===void 0?void 0:Y.findOne("Transformer")).getActiveAnchor(),j=D==="middle-left"||D==="middle-right",z=D==="top-center"||D==="bottom-center",Z=U.scaleX();if(j){const re=U.scaleX(),W=U.width()*re,Q=e.fontSize;let se=W;if(W<Q&&(se=Q,J.current&&U.position(J.current)),U.width(se),U.scaleX(1),gi.textVerticalResizeEnabled){const ue=Math.max(_,d.current);e.set({height:ue})}e.set({width:U.width(),x:U.x(),y:U.y()})}else if(z){let re=gi.textOverflow==="resize"?_:e.lineHeight*e.fontSize;const W=Math.max(re,V.target.height()*V.target.scaleY());U.scaleY(1),e.set({x:U.x(),y:U.y(),height:W,rotation:U.rotation()})}else U.scaleX(1),U.scaleY(1),e.set({fontSize:e.fontSize*Z,letterSpacing:e.letterSpacing,width:U.width()*Z,x:U.x(),y:U.y(),rotation:U.rotation(),height:U.height()*Z});J.current=V.target.position()},onTransformEnd:V=>{l(!1),u(!0);const Y=V.target.scaleX();V.target.scaleX(1),V.target.scaleY(1),e.set({fontSize:e.fontSize*Y,width:V.target.width()*Y,x:V.target.x(),y:V.target.y(),rotation:V.target.rotation(),shadowBlur:e.shadowBlur*Y,shadowOffsetX:e.shadowOffsetX*Y,shadowOffsetY:e.shadowOffsetY*Y,strokeWidth:e.strokeWidth*Y})}}),ce.createElement(bu,{ref:r,image:n,x:e.a.x,y:e.a.y,offsetX:v,offsetY:v-C,listening:!1,rotation:e.a.rotation,width:e.a.width+2*v,height:(e.a.width+2*v)*(n?.height/n?.width||1),visible:!k&&!x,opacity:e.a.opacity,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,hideInExport:!e.showInExport,editModeEnabled:e._editModeEnabled||a||k}),(k||H)&&ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,offsetY:-C},ce.createElement($1,{divProps:{style:{pointerEvents:"none"}}},ce.createElement(u_,{dangerouslySetInnerHTML:{__html:b},style:{pointerEvents:"none",opacity:e.a.opacity,textShadow:e.shadowEnabled?`${e.shadowOffsetX}px ${e.shadowOffsetY}px ${e.shadowBlur}px ${e.shadowColor}`:void 0}}))),x&&ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,offsetY:-C},ce.createElement($1,null,ce.createElement(iC,{html:b,element:e,onChange:V=>{const Y=q8({oldText:Pu(e.text),newText:Pu(V),element:e});e.set({text:V,fontSize:Y})},onBlur:V=>{e.toggleEditMode(!1),R(!0)},clickCoords:ae.current}))))});function sC(e,t){if(!e||!t)return;const{x:r,y:n}=t;try{let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(r,n);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(r,n);a&&(i=document.createRange(),i.setStart(a.offsetNode,a.offset))}if(i){const a=X8.find(i.startContainer,!0);if(a){const l=a.offset(e.scroll)+i.startOffset;return void e.setSelection(l,0,"api")}}}catch{}e.setSelection(0,0,"api")}function Rm(e){return e/180*Math.PI}function u1(e,t,r,n,i){const a=Math.sqrt(r*r+n*n);return i+=Math.atan2(n,r),{x:e+a*Math.cos(i),y:t+a*Math.sin(i)}}function A0(e){const{x:t,y:r,width:n,height:i}=e,a=Rm(e.rotation),l=u1(t,r,0,0,a),o=u1(t,r,n,0,a),u=u1(t,r,n,i,a),d=u1(t,r,0,i,a),f=Math.min(l.x,o.x,u.x,d.x),v=Math.min(l.y,o.y,u.y,d.y),g=Math.max(l.x,o.x,u.x,d.x),c=Math.max(l.y,o.y,u.y,d.y);return{x:f,y:v,width:g-f,height:c-v,minX:f,minY:v,maxX:g,maxY:c}}function P0(e){const t=e.map(l=>A0(l)),r=Math.min(...t.map(l=>l.minX)),n=Math.min(...t.map(l=>l.minY)),i=Math.max(...t.map(l=>l.maxX)),a=Math.max(...t.map(l=>l.maxY));return{x:r,y:n,width:i-r,height:a-n,minX:r,minY:n,maxX:i,maxY:a}}function lC(e){const t=Rm(e.rotation||0);return{x:e.x+e.width/2*Math.cos(t)+e.height/2*Math.sin(-t),y:e.y+e.height/2*Math.cos(t)+e.width/2*Math.sin(t)}}function uC(e,t,r){const n=Rm(t),i=r.x+(e.x-r.x)*Math.cos(n)-(e.y-r.y)*Math.sin(n),a=r.y+(e.x-r.x)*Math.sin(n)+(e.y-r.y)*Math.cos(n);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:i,y:a})}function cC(e,t){return uC(e,t,lC(e))}const Yo={stroke:"rgb(0, 161, 255)",strokeWidth:1,dash:[4,6]},fC=({stroke:e,strokeWidth:t,dash:r})=>{e!==void 0&&(Yo.stroke=e),t!==void 0&&(Yo.strokeWidth=t),r!==void 0&&(Yo.dash=r)};let Z3=({targetKonvaNodes:e,guideKonvaNode:t,distance:r,snapDirection:n})=>r<5;function zv(e,t){var r=[],n=[];e.vertical.forEach(d=>{t.vertical.forEach(f=>{var v=Math.abs(d.offset-f.guide);Z3({targetKonvaNodes:f.nodes,guideKonvaNode:d.node,distance:v,snapDirection:d.snap})&&r.push({lineGuide:d.offset,diff:v,snap:f.snap,offset:f.offset})})}),e.horizontal.forEach(d=>{t.horizontal.forEach(f=>{var v=Math.abs(d.offset-f.guide);Z3({targetKonvaNodes:f.nodes,guideKonvaNode:d.node,distance:v,snapDirection:d.snap})&&n.push({lineGuide:d.offset,diff:v,snap:f.snap,offset:f.offset})})});var i=[];const a=r.sort((d,f)=>d.diff-f.diff),l=n.sort((d,f)=>d.diff-f.diff);var o=a[0],u=l[0];return o&&a.filter(d=>Math.abs(d.diff-o.diff)<.1).forEach(d=>{i.push(Object.assign({orientation:"V"},d))}),u&&l.filter(d=>Math.abs(d.diff-u.diff)<.1).forEach(d=>{i.push(Object.assign({orientation:"H"},d))}),i}const c_=()=>{if(sr.DD._dragElements.size===0)return;const e=[...sr.DD._dragElements.entries()],t=e.find(([r,n])=>n.node instanceof sr.Transformer);t&&(e.splice(e.indexOf(t),1),e.unshift(t),sr.DD._dragElements.clear(),e.forEach(([r,n])=>{sr.DD._dragElements.set(r,n)}))};function hC(e,t,r){const n=ce.useRef(null);fC(r);const i=f=>f.hasName("element")||f.hasName("page-background")||!n.current&&f.hasName("elements-area");function a(f){var v;const g=(v=e.current)===null||v===void 0?void 0:v.getStage(),c=[],y=[];return g.find(i).forEach(x=>{if(!(f.indexOf(x)>=0)){var E=x.getClientRect({skipShadow:!0,skipStroke:!0});c.push({offset:E.x,node:x,snap:"start"},{offset:E.x+E.width,node:x,snap:"end"},{offset:E.x+E.width/2,node:x,snap:"center"}),y.push({offset:E.y,node:x,snap:"start"},{offset:E.y+E.height,node:x,snap:"end"},{offset:E.y+E.height/2,node:x,snap:"center"})}}),{vertical:c,horizontal:y}}function l(f){var v;const g=(v=e.current)===null||v===void 0?void 0:v.getLayer(),c=g?.children.find(y=>y.name()==="line-guides");f.forEach(y=>{if(y.orientation==="H"){var x=new sr.Line({x:-g.getStage().x(),y:-g.getStage().y(),points:[-6e3,y.lineGuide,6e3,y.lineGuide],stroke:Yo.stroke,strokeWidth:Yo.strokeWidth,name:"guid-line",dash:Yo.dash});c?.add(x),g.batchDraw()}else y.orientation==="V"&&(x=new sr.Line({x:-g.getStage().x(),y:-g.getStage().y(),points:[y.lineGuide,-6e3,y.lineGuide,6e3],stroke:Yo.stroke,strokeWidth:Yo.strokeWidth,name:"guid-line",dash:Yo.dash}),c?.add(x))})}const o=f=>{const v=f.target.getLayer().children.find(w=>w.name()==="line-guides");v?.destroyChildren();var g=a(f.target.nodes()),c=function(w){const _=w.__getNodeRect(),A=A0(Object.assign(Object.assign({},_),{rotation:sr.Util.radToDeg(_.rotation)})),M=w.getAbsolutePosition();return{vertical:[{guide:A.x,offset:M.x-A.x,snap:"start",nodes:w.nodes()},{guide:A.x+A.width/2,offset:M.x-A.x-A.width/2,snap:"center",nodes:w.nodes()},{guide:A.x+A.width,offset:M.x-A.x-A.width,snap:"end",nodes:w.nodes()}],horizontal:[{guide:A.y,offset:M.y-A.y,snap:"start",nodes:w.nodes()},{guide:A.y+A.height/2,offset:M.y-A.y-A.height/2,snap:"center",nodes:w.nodes()},{guide:A.y+A.height,offset:M.y-A.y-A.height,snap:"end",nodes:w.nodes()}]}}(f.target),y=zv(g,c);if(!y.length)return;l(y);const x=f.target.getAbsolutePosition(),E=(f.target.nodes().map(w=>w.getAbsolutePosition()),Object.assign({},x));y.forEach(w=>{switch(w.snap){case"start":case"center":case"end":switch(w.orientation){case"V":E.x=w.lineGuide+w.offset;break;case"H":E.y=w.lineGuide+w.offset}}});const S=E.x-x.x,b=E.y-x.y;f.evt.ctrlKey||f.evt.metaKey||f.target.nodes().forEach(w=>{const _=w.getAbsolutePosition();w.setAbsolutePosition({x:_.x+S,y:_.y+b})})},u=(f,v,g)=>{var c;const y=e.current,x=y.getLayer().children.find(L=>L.name()==="line-guides");if(x?.destroyChildren(),y.getActiveAnchor()==="rotater")return v;const E=y.getActiveAnchor(),S=dC[E],b=(c=y.findOne(`.${S}`))===null||c===void 0?void 0:c.getAbsolutePosition();if(!b)return v;const w={x:f.x-b.x,y:f.y-b.y},_=function(L,R){const T=J3(L,R)/J3(R,R);return{x:T*R.x,y:T*R.y}}({x:v.x-f.x,y:v.y-f.y},w),A={x:f.x+_.x,y:f.y+_.y};var M=zv(a(y.nodes()),{vertical:[{guide:A.x,offset:0,snap:"start",nodes:y.nodes()}],horizontal:[{guide:A.y,offset:0,snap:"start",nodes:y.nodes()}]});if(!M.length||(l(M),g.ctrlKey||g.metaKey))return v;const O=[];if(M.forEach(L=>{const R=function(T,k,C){if(C.orientation==="V"){const q=C.lineGuide;if(Math.abs(k.x-T.x)<1e-4)return null;const G=(k.y-T.y)/(k.x-T.x);return{x:q,y:G*q+(T.y-G*T.x)}}{const q=C.lineGuide;if(Math.abs(k.y-T.y)<1e-4)return null;const G=(k.y-T.y)/(k.x-T.x);return{x:(q-T.y)/G+T.x,y:q}}}(A,b,{orientation:L.orientation,lineGuide:L.lineGuide});R&&O.push(R)}),O.length>0){let L=O[0],R=Math.sqrt(Math.pow(A.x-L.x,2)+Math.pow(A.y-L.y,2));if(O.forEach(T=>{const k=Math.sqrt(Math.pow(A.x-T.x,2)+Math.pow(A.y-T.y,2));k<R&&(R=k,L=T)}),R<10)return L}return A},d=f=>{if(!f.target)return;const v=f.target.getLayer(),g=v.children.find(c=>c.name()==="line-guides");g?.destroyChildren(),v.batchDraw()};ce.useEffect(()=>{e.current&&(e.current.anchorDragBoundFunc(u),e.current.on("dragstart",f=>{setTimeout(()=>{c_()})}),e.current.on("dragmove",o),e.current.on("dragend",d),e.current.on("transformend",d),e.current.on("transform",f=>{var v,g;f.evt.ctrlKey||f.evt.metaKey?(v=e.current)===null||v===void 0||v.rotationSnapTolerance(0):(g=e.current)===null||g===void 0||g.rotationSnapTolerance(5)}))},[])}function Q3(e,t,r){const n=l=>l.hasName("element")||l.hasName("line-anchor")||l.hasName("page-background")||l.hasName("elements-area"),i=l=>{const o=l.target.getLayer().children.find(y=>y.name()==="line-guides");o?.destroyChildren();var u,d=zv(function(y){var x;const E=(x=e.current)===null||x===void 0?void 0:x.getStage();var S=[],b=[];return E.find(n).forEach(w=>{if(!(y.indexOf(w)>=0)){var _=w.getClientRect({skipShadow:!0,skipStroke:!0});w.hasName("line-anchor")&&(_={x:w.absolutePosition().x,y:w.absolutePosition().y,width:0,height:0}),S.push({offset:_.x,node:w,snap:"start"},{offset:_.x+_.width,node:w,snap:"end"},{offset:_.x+_.width/2,node:w,snap:"center"}),b.push({offset:_.y,node:w,snap:"start"},{offset:_.y+_.height,node:w,snap:"end"},{offset:_.y+_.height/2,node:w,snap:"center"})}}),{vertical:S,horizontal:b}}([l.target,...t.map(y=>y.current)]),{vertical:[{guide:(u=l.target).absolutePosition().x,offset:0,snap:"center",nodes:[u]}],horizontal:[{guide:u.absolutePosition().y,offset:0,snap:"center",nodes:[u]}]});if(!d.length)return;(function(y){var x;const E=(x=e.current)===null||x===void 0?void 0:x.getLayer(),S=E?.children.find(b=>b.name()==="line-guides");y.forEach(b=>{if(b.orientation==="H"){var w=new sr.Line({points:[-6e3,b.lineGuide,6e3,b.lineGuide],stroke:Yo.stroke,strokeWidth:Yo.strokeWidth,name:"guid-line",dash:Yo.dash});S?.add(w),E.batchDraw()}else b.orientation==="V"&&(w=new sr.Line({points:[b.lineGuide,-6e3,b.lineGuide,6e3],stroke:Yo.stroke,strokeWidth:Yo.strokeWidth,name:"guid-line",dash:Yo.dash}),S?.add(w))})})(d);const f=l.target.getAbsolutePosition(),v=Object.assign({},f);d.forEach(y=>{switch(y.snap){case"start":case"center":case"end":switch(y.orientation){case"V":v.x=y.lineGuide+y.offset;break;case"H":v.y=y.lineGuide+y.offset}}});const g=v.x-f.x,c=v.y-f.y;if(!l.evt.ctrlKey&&!l.evt.metaKey){const y=l.target.getAbsolutePosition();l.target.absolutePosition({x:y.x+g,y:y.y+c})}},a=l=>{if(!l.target)return;const o=l.target.getLayer(),u=o.children.find(d=>d.name()==="line-guides");u?.destroyChildren(),o.batchDraw()};ce.useEffect(()=>{e.current&&(e.current.on("dragmove",i),e.current.on("dragend",a))},r)}function J3(e,t){return e.x*t.x+e.y*t.y}const dC={"top-left":"bottom-right","top-center":"bottom-center","top-right":"bottom-left","middle-right":"middle-left","bottom-right":"top-left","bottom-center":"top-center","bottom-left":"top-right","middle-left":"middle-right"};function pC(e){const{x:t,y:r,width:n,height:i,rotation:a}=e.a,l=a*Math.PI/180,o={x:t+i/2*Math.cos(l+Math.PI/2),y:r+i/2*Math.sin(l+Math.PI/2)};return{middleLeft:o,middleRight:{x:o.x+n*Math.cos(l),y:o.y+n*Math.sin(l)}}}function e4(e,t,r){const n=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),i=Math.atan2(t.y-e.y,t.x-e.x),a=180*i/Math.PI;return{x:e.x+Math.cos(i-Math.PI/2)*r/2,y:e.y+Math.sin(i-Math.PI/2)*r/2,width:n,height:r,rotation:a}}const t4=(e,t)=>({offsetX:5/e,offsetY:5/e,width:10/e,height:10/e,fill:"white",stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1,draggable:!0,dragDistance:0,onMouseEnter:r=>{r.target.getStage().container().style.cursor="crosshair"},onMouseLeave:r=>{r.target.getStage().container().style.cursor=""},onDragStart:r=>{t.history.startTransaction()},onDragEnd:r=>{t.history.endTransaction()}}),r4=Yn(({element:e,type:t})=>{const r=tf(e,e.a.color,"fill"),n=tf(e,e.a.color,"stroke"),i=Object.assign(Object.assign(Object.assign({strokeWidth:e.height,lineCap:"round",lineJoin:"round"},n),r),{opacity:e.a.opacity,hideInExport:!e.showInExport});return ce.createElement(ce.Fragment,null,t==="arrow"&&ce.createElement(Yc,Object.assign({points:[3*e.height,2*-e.height,0,0,3*e.height,2*e.height]},i)),t==="triangle"&&ce.createElement(Yc,Object.assign({points:[3*e.height,2*-e.height,0,0,3*e.height,2*e.height],closed:!0},i)),t==="bar"&&ce.createElement(Yc,Object.assign({points:[0,2*-e.height,0,2*e.height],closed:!0},i)),t==="square"&&ce.createElement(Yc,Object.assign({points:[0,2*-e.height,4*e.height,2*-e.height,4*e.height,2*e.height,0,2*e.height],closed:!0},i)),t==="circle"&&ce.createElement(fA,Object.assign({x:2*e.height,y:0,radius:2*e.height},i)))}),gC=Yn(({element:e,store:t})=>{const r=ce.useRef(null),n=ce.useRef(null),i=ce.useRef(null),a=e.selectable||t.role==="admin",l=lf(),o=t.selectedElements.indexOf(e)>=0&&t.selectedElements.length===1,u=t.selectedShapes.indexOf(e)>=0&&e.selectable,{middleLeft:d,middleRight:f}=pC(e);Q3(n,[r],[o]),Q3(i,[r],[o]);const v=tf(e,e.a.color,"stroke");return ce.createElement(ce.Fragment,null,ce.createElement(Yc,Object.assign({ref:r,name:"element",id:e.id,x:e.a.x,y:e.a.y,points:[0,0,e.a.width,0],offsetY:-e.a.height/2,strokeWidth:e.a.height,hitStrokeWidth:Math.max(e.a.height,20),dash:e.dash.map(g=>g*e.a.height)},v,{rotation:e.a.rotation,opacity:e.animated("opacity"),shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,listening:a,draggable:l?e.draggable&&u:e.draggable,preventDefault:!l||u,hideInExport:!e.showInExport,onDragMove:g=>{e.set({x:g.target.x(),y:g.target.y()})},onDragEnd:g=>{e.set({x:g.target.x(),y:g.target.y()})},onTransform:g=>{const c=g.target.scaleX();g.target.scaleX(1),g.target.scaleY(1),e.set({height:e.height*c,width:e.width*c,x:g.target.x(),y:g.target.y(),rotation:g.target.rotation()})}})),ce.createElement(vn,{x:d.x,y:d.y,rotation:e.rotation,hideInExport:!e.showInExport},ce.createElement(r4,{element:e,type:e.startHead})),ce.createElement(vn,{x:f.x,y:f.y,rotation:e.rotation+180},ce.createElement(r4,{element:e,type:e.endHead})),o&&e.resizable&&ce.createElement(bm,{selector:".page-abs-container",enabled:!0},ce.createElement(vn,{visible:o},ce.createElement(En,Object.assign({x:d.x,y:d.y,ref:n,name:"line-anchor"},t4(t.scale,t),{onDragMove:g=>{const c=e4(g.target.position(),f,e.height);e.set({x:c.x,y:c.y,width:c.width,rotation:c.rotation})}})),ce.createElement(En,Object.assign({x:f.x,y:f.y,ref:i,name:"line-anchor"},t4(t.scale,t),{onDragMove:g=>{const c=e4(d,g.target.position(),e.height);e.set({x:c.x,y:c.y,width:c.width,rotation:c.rotation})}})))))});function dp(){return document.createElement("canvas")}const f_=new window.Image;f_.src=$f(`
|
|
269
269
|
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
270
270
|
<path opacity="0.6" d="M4 5.49683V18.5032C4 20.05 5.68077 21.0113 7.01404 20.227L18.0694 13.7239C19.384 12.9506 19.384 11.0494 18.0694 10.2761L7.01404 3.77296C5.68077 2.98869 4 3.95 4 5.49683Z" fill="white"/>
|
|
271
271
|
<path d="M4 5.49683V18.5032C4 20.05 5.68077 21.0113 7.01404 20.227L18.0694 13.7239C19.384 12.9506 19.384 11.0494 18.0694 10.2761L7.01404 3.77296C5.68077 2.98869 4 3.95 4 5.49683Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -277,7 +277,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
277
277
|
<path d="M14 19L14 5C14 3.89543 14.8954 3 16 3L17 3C18.1046 3 19 3.89543 19 5L19 19C19 20.1046 18.1046 21 17 21L16 21C14.8954 21 14 20.1046 14 19Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
278
278
|
<path d="M10 19L10 5C10 3.89543 9.10457 3 8 3L7 3C5.89543 3 5 3.89543 5 5L5 19C5 20.1046 5.89543 21 7 21L8 21C9.10457 21 10 20.1046 10 19Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
279
279
|
</svg>
|
|
280
|
-
`);const d_=(e,t,r,n,i=0,a=!1)=>{const l=Math.floor(Math.max(e.width*n,1)),o=Math.floor(Math.max(e.height*n,1)),u=Math.min(i*n,l/2,o/2),d=Math.max(e.width/r.width,e.height/r.height)*n,f=e.page._exportingOrRendering&&Ai.imageDownScalingEnabled&&d<1&&!a,v=r.x===0&&r.y===0&&r.width===t?.width&&r.height===t?.height,g=ce.useMemo(()=>{if(t&&t.width&&t.height)return v&&u===0&&!f?void 0:dp()},[t,u,f,v]),c=()=>{if(!g||!t)return;g.width=l,g.height=o;const y=g.getContext("2d");if(!y)return;u&&(y.beginPath(),y.moveTo(u,0),y.lineTo(l-u,0),y.arc(l-u,u,u,3*Math.PI/2,0,!1),y.lineTo(l,o-u),y.arc(l-u,o-u,u,0,Math.PI/2,!1),y.lineTo(u,o),y.arc(u,o-u,u,Math.PI/2,Math.PI,!1),y.lineTo(0,u),y.arc(u,u,u,Math.PI,3*Math.PI/2,!1),y.clip());const x=f?function(S,b){var w,_;const A=dp();A.width=S.width,A.height=S.height,(w=A.getContext("2d"))===null||w===void 0||w.drawImage(S,0,0,A.width,A.height);const M=function(O,L,R,T,k,C,q){for(var G=new ImageData(L,R),J=new Int32Array(O.data.buffer),ae=O.width,H=new Int32Array(G.data.buffer),V=G.width,Y=L/C,U=R/q,D=Math.round(1/Y),j=Math.round(1/U),z=D*j,Z=0;Z<G.height;Z++)for(var re=0;re<V;re++){for(var W=0+Math.round(re/Y)+(0+Math.round(Z/U))*ae,Q=0,se=0,ue=0,le=0,ye=0;ye<j;ye++)for(var Re=0;Re<D;Re++){var Me=J[W+Re+ye*ae];Q+=Me<<24>>>24,se+=Me<<16>>>24,ue+=Me<<8>>>24,le+=Me>>>24}Q=Math.round(Q/z),se=Math.round(se/z),ue=Math.round(ue/z),le=Math.round(le/z),H[re+Z*V]=le<<24|ue<<16|se<<8|Q}return G}(A.getContext("2d").getImageData(0,0,A.width,A.height),Math.floor(A.width*b),Math.floor(A.height*b),0,0,A.width,A.height);return A.width=Math.floor(A.width*b),A.height=Math.floor(A.height*b),(_=A.getContext("2d"))===null||_===void 0||_.putImageData(M,0,0),A}(t,d):t,E=f?{x:Math.floor(r.x*d),y:Math.floor(r.y*d),width:Math.floor(r.width*d),height:Math.floor(r.height*d)}:r;y.drawImage(x,E.x,E.y,E.width,E.height,0,0,g.width,g.height)};return ce.useLayoutEffect(()=>{c()},[g,e.width,e.height,r.x,r.y,r.width,r.height,i,n,a,e.page._exportingOrRendering,f]),ce.useEffect(()=>()=>{g&&g.nodeName==="CANVAS"&&sr.Util.releaseCanvas(g)},[g]),[g||t,c]},vC=dp(),mC=Yn(({element:e})=>{const t=Math.min(30,e.width/4,e.height/4),r=ce.useRef(null);return ce.useEffect(()=>{const n=r.current;if(!n)return;const i=new sr.Animation(a=>{n.rotate((a?.timeDiff||0)/2)},n.getLayer());return i.start(),()=>{i.stop()}}),ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport},ce.createElement(En,{width:e.width,height:e.height,fill:"rgba(124, 173, 212, 0.8)"}),ce.createElement(mm,{ref:r,x:e.width/2,y:e.height/2,fill:"white",outerRadius:Math.abs(t),innerRadius:Math.max(1,t-5),angle:270}))}),yC=Yn(({element:e})=>{const t=Math.max(10,Math.min(30,e.width/25));return ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport},ce.createElement(En,{width:e.width,height:e.height,fill:"rgba(223, 102, 102, 0.8)"}),ce.createElement(Au,{text:"Can not load the video...",fontSize:t,width:e.width,height:e.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let bC=function(e,t,r){const n=ce.useRef("loading"),i=ce.useRef(null),[a,l]=ce.useState(0),o=ce.useRef(),u=ce.useRef(),d=ce.useRef();return o.current===e&&u.current===t&&d.current===r||(n.current="loading",i.current=void 0,o.current=e,u.current=t,d.current=r),ce.useLayoutEffect(function(){if(e){var f=document.createElement("video");return f.addEventListener("canplay",v),f.addEventListener("error",g),f.crossOrigin=t,f.src=e,f.load(),function(){f.removeEventListener("canplay",v),f.removeEventListener("error",g)}}function v(){n.current="loaded",i.current=f,i.current.currentTime=0,l(Math.random()),i.current.removeEventListener("canplay",v)}function g(c){var y;const x=f.readyState===4,E=f.buffered&&f.buffered.length>0&&f.buffered.end(f.buffered.length-1)/f.duration*100>=100;if(x&&E)return;const S=c.message||((y=f.error)===null||y===void 0?void 0:y.message)||"Unknown error",b=new Error("Video failed to load: "+S);console.error(b),n.current="failed",i.current=void 0,l(Math.random())}},[e,t,r]),[i.current,n.current]};function n4(e){return e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA}const i4=(e,t,r)=>{const n=ce.useRef(),i=()=>{var a;(a=n.current)===null||a===void 0||a.call(n),n.current=void 0};ce.useEffect(()=>i,[]),ce.useLayoutEffect(()=>{const a=t.slice(0,200),l=`video with id ${r} url: ${a}`;e!=="loading"||n.current||(n.current=Rh(l)),e!=="loading"&&i(),e==="failed"&&Sp(l)},[e])},wC=Yn(({element:e,store:t})=>{var r;const[n,i]=ce.useState(!1),a=ce.useRef(null),l=ce.useRef(null),o=t.selectedShapes.indexOf(e)>=0&&e.selectable,[u,d]=ce.useState(!1),[f,v]=bC(e.src,"anonymous"),g=t.activePage===e.page;i4(v,e.src,e.id),f&&(f.width=f.videoWidth,f.height=f.videoHeight,f.playsInline=!0);const c=f||vC;ce.useEffect(()=>{f&&t.history.ignore(()=>{e.set({duration:1e3*f.duration})})},[f]),ce.useEffect(()=>{var le;if(!f)return;const ye=t.animatedElementsIds,Re=(!ye.length||ye.includes(e.id))&&t.isPlaying,Me=g&&(Re||u);if(!Me)return void f.pause();Me&&(f.currentTime=e.startTime*f.duration,f.play());const Pe=new sr.Animation(()=>{ae()},(le=a.current)===null||le===void 0?void 0:le.getLayer());Pe.start();const de=()=>{d(!1),f.currentTime=e.startTime*f.duration},Te=()=>{f.currentTime>=e.endTime*f.duration&&(f.pause(),f.currentTime=e.startTime*f.duration,d(!1))};return f.addEventListener("ended",de),f.addEventListener("timeupdate",Te),()=>{f.pause(),Pe.stop(),f.removeEventListener("ended",de),f.removeEventListener("timeupdate",Te)}},[f,u,t.isPlaying,g]),ce.useEffect(()=>{f&&(f.volume=e.volume)},[f,e.volume]);const y=ce.useRef();ce.useEffect(()=>{const le=Ou(()=>{var ye,Re;if(f){const Me=t.animatedElementsIds;if(Me.length&&!Me.includes(e.id))return;const Pe=e.startTime*f.duration*1e3,de=f.duration*(e.endTime-e.startTime)*1e3,Te=((t.currentTime||e.page.startTime)-e.page.startTime)%de+Pe;if(Math.abs(1e3*f.currentTime-Te)>500||!t.isPlaying){const Ae=Te/1e3;Ae!==f.currentTime&&(f.currentTime=Ae),!n4(f)&&!t.isPlaying&&!y.current&&(y.current=Rh(`video ${e.id}`))}ae(),(Re=(ye=a.current)===null||ye===void 0?void 0:ye.getLayer())===null||Re===void 0||Re.batchDraw()}});return()=>{le(),y.current&&(y.current(),y.current=null)}},[t,f]),ce.useEffect(()=>{if(!f)return;const le=()=>{var Re,Me;!n4(f)&&e.page._exportingOrRendering||y.current&&(ae(),(Me=(Re=a.current)===null||Re===void 0?void 0:Re.getLayer())===null||Me===void 0||Me.batchDraw(),y.current(),y.current=null)};let ye;return e.page._exportingOrRendering&&(ye=setInterval(le,20)),f.addEventListener("timeupdate",le),f.addEventListener("canplay",le),()=>{clearInterval(ye),f.removeEventListener("timeupdate",le),f.removeEventListener("canplay",le)}},[e.page._exportingOrRendering,f,e.id,Rh]);let{cropX:x,cropY:E,cropWidth:S,cropHeight:b}=e;v!=="loaded"&&(x=E=0,S=b=1);const w=c.width*S,_=c.height*b,A=e.width/e.height;let M,O;const L=w/_,R=e.type==="svg";R?(M=w,O=_):A>=L?(M=w,O=w/A):(M=_*A,O=_);const T={x:c.width*x,y:c.height*E,width:M,height:O},k=(r=e.cornerRadius)!==null&&r!==void 0?r:0,[C,q]=d_(e,c,T,t._elementsPixelRatio,k,n||e._cropModeEnabled||e.type==="svg");let[G,J]=((le,ye,Re,Me)=>{const Pe=(xe=>{const[Le,pe]=ce.useState(xe);return ce.useEffect(()=>{(async()=>{const Ce=await async function(je){if(!(je.indexOf("data:image/svg+xml")>=0||je.indexOf(".svg")>=0))return je;const He=await Ap(je),st=Am(He);return $f(st)}(xe);Ce!==Le&&pe(Ce)})()},[xe]),Le})(le.clipSrc||""),[de,Te]=ym(Pe,"anonymous"),Ae=le.clipSrc?Te:"loaded";i4(Ae,le.clipSrc,le.id);const be=ce.useMemo(()=>{if(ye&&de)return dp()},[ye,de]);function _e(){var xe;if(!de||!ye||!ye.width||!ye.height||!de||!de.width||!de.height||!be)return;const Le=dp(),pe=Math.max(le.width/de.width*Re,le.height/de.height*Re);Le.width=de.width*pe,Le.height=de.height*pe,(xe=Le.getContext("2d"))===null||xe===void 0||xe.drawImage(de,0,0,Le.width,Le.height),be.width=Math.max(ye.width,1),be.height=Math.max(ye.height,1);const Ce=be.getContext("2d");Ce&&(Ce.save(),Ce.drawImage(Le,0,0,ye.width,ye.height),sr.Util.releaseCanvas(Le),Ce.globalCompositeOperation="source-in",Ce.drawImage(ye,0,0,be.width,be.height),Ce.restore())}return ce.useLayoutEffect(()=>{_e()},[be,ye,de,le.width,le.height,Re,...Me]),[le.clipSrc&&de?be:ye,_e]})(e,C,t._elementsPixelRatio,[T,k,t._elementsPixelRatio]);function ae(){q(),J()}const H=Math.max(e.width/M,e.height/O);ce.useEffect(()=>{var le;if(!e._cropModeEnabled)return;const ye=(le=a.current)===null||le===void 0?void 0:le.getStage();function Re(Pe){e._cropModeEnabled&&Pe.target!==l.current&&e.toggleCropMode(!1)}function Me(Pe){e._cropModeEnabled&&Pe.target.parentNode!==ye.content&&e.toggleCropMode(!1)}return document.body.addEventListener("click",Me),ye?.on("click",Re),ye?.on("tap",Re),()=>{document.body.removeEventListener("click",Me),document.body.removeEventListener("touchstart",Me),ye?.off("click",Re),ye?.off("click",Re)}},[e._cropModeEnabled]),ce.useLayoutEffect(()=>{if(!n&&!e._cropModeEnabled)return _s(a.current,e),Ou(()=>{_s(a.current,e)},{delay:100})},[c,n,S,b,e._cropModeEnabled]),ce.useLayoutEffect(()=>{var le;n||e._cropModeEnabled?(le=a.current)===null||le===void 0||le.clearCache():_s(a.current,e)},[n,e.width,e.height,e._cropModeEnabled]),ce.useEffect(()=>{_s(a.current,e)},[e.shadowEnabled,e.shadowBlur,e.cornerRadius,e.shadowColor,e.shadowOffsetX,e.shadowOffsetY,e.shadowOpacity]);const V=ce.useRef(null),Y=ce.useRef(null),U=ce.useRef(null);ce.useLayoutEffect(()=>{e._cropModeEnabled&&(Y.current.nodes([V.current]),U.current.nodes([l.current]))},[e._cropModeEnabled]);const D=le=>{Math.round(le.target.x())>0&&(le.target.x(0),le.target.scaleX(1)),Math.round(le.target.y())>0&&(le.target.y(0),le.target.scaleY(1));const ye=le.target.width()*le.target.scaleX(),Re=le.target.height()*le.target.scaleY(),Me=Math.min(1,M/ye),Pe=Math.min(1,O/Re),de=1-Me,Te=Math.min(de,Math.max(0,Math.round(-le.target.x())/ye)),Ae=1-Pe,be=Math.min(Ae,Math.max(0,Math.round(-le.target.y())/Re));le.target.setAttrs({x:-Te*c.width,y:-be*c.height,scaleX:1,scaleY:1}),e.set({cropX:Te,cropY:be,cropWidth:Me,cropHeight:Pe})},j=()=>{e.type!=="svg"&&e.contentEditable&&setTimeout(()=>{e.toggleCropMode(!0)})},z=v==="loading",Z=v==="failed",re=!z&&!Z,W=ce.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),Q=re?e.a.opacity:0;xp(a,Q);const se=e.selectable||t.role==="admin",ue=lf();return ce.createElement(ce.Fragment,null,z&&ce.createElement(mC,{element:e}),Z&&ce.createElement(yC,{element:e}),ce.createElement(bu,{ref:a,name:"element",id:e.id,image:G,x:e.a.x,y:e.a.y,width:e.a.width||1,height:e.a.height||1,rotation:e.a.rotation,opacity:Q,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,customCrop:T,listening:se,draggable:ue?e.draggable&&o:e.draggable,preventDefault:!ue||o,hideInExport:!e.showInExport,onDragMove:le=>{e.set({x:le.target.x(),y:le.target.y()})},onDragEnd:le=>{e.set({x:le.target.x(),y:le.target.y()})},onDblClick:j,onDblTap:j,onTransformStart:()=>{i(!0),W.current={cropX:e.cropX,cropY:e.cropY,cropWidth:e.cropWidth,cropHeight:e.cropHeight}},onTransform:le=>{var ye;const Re=le.currentTarget,Me=Math.abs(Re.scaleX()-1)<1e-7?1:Re.scaleX(),Pe=Math.abs(Re.scaleY()-1)<1e-7?1:Re.scaleY();Re.scaleX(1),Re.scaleY(1);const de=(ye=le.target.getStage())===null||ye===void 0?void 0:ye.findOne("Transformer"),Te=1-M/c.width,Ae=Math.min(Te,Math.max(0,e.cropX)),be=1-O/c.height,_e=Math.min(be,Math.max(0,e.cropY)),xe=de.getActiveAnchor(),Le=!(xe.indexOf("middle")>=0||xe.indexOf("center")>=0),pe=!Le&&Me<1&&W.current.cropHeight>O/c.height;let Ce=Le?e.cropWidth:e.cropWidth*Me;pe&&(Ce=e.cropWidth);const je=!Le&&Pe<1&&W.current.cropWidth>M/c.width;let He=Le?e.cropHeight:e.cropHeight*Pe;je&&(He=e.cropHeight),R&&(Ce=e.cropWidth,He=e.cropHeight),e.set({cropX:Ae,cropY:_e,x:Re.x(),y:Re.y(),width:Re.width()*Me,height:Re.height()*Pe,rotation:le.target.rotation(),cropWidth:Math.min(Ce,1-Ae),cropHeight:Math.min(He,1-_e)})},onTransformEnd:le=>{const ye=le.currentTarget;e.set({width:ye.width(),height:ye.height(),x:ye.x(),y:ye.y(),rotation:le.target.rotation(),cropWidth:M/c.width,cropHeight:O/c.height}),i(!1)}}),ce.createElement(En,{x:e.a.x,y:e.a.y,width:Math.max(e.a.width-e.borderSize,0),height:Math.max(e.a.height-e.borderSize,0),opacity:Q,offsetX:-e.borderSize/2,offsetY:-e.borderSize/2,stroke:e.borderColor,strokeWidth:e.borderSize,listening:!1,visible:!!e.borderSize,rotation:e.rotation,cornerRadius:Math.max(0,k-e.borderSize),hideInExport:!e.showInExport}),!t.isPlaying&&ce.createElement(bu,{image:u?h_:f_,x:e.a.x,y:e.a.y,offsetX:-e.a.width/2+15/t.scale,offsetY:-e.a.height/2+15/t.scale,rotation:e.a.rotation,width:30/t.scale,height:30/t.scale,hideInExport:!0,onClick:()=>d(!u),onTap:()=>d(!u)}),e._cropModeEnabled&&ce.createElement(bm,{selector:".page-abs-container",enabled:!0},ce.createElement(En,{x:-window.innerWidth/t.scale,y:-window.innerWidth/t.scale,width:window.innerWidth/t.scale*3,height:window.innerWidth/t.scale*3,fill:"rgba(0,0,0,0.3)"}),ce.createElement(bu,{listening:!1,image:G,x:e.a.x,y:e.a.y,width:e.a.width,height:e.a.height,rotation:e.a.rotation,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur}),ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,scaleX:H,scaleY:H},ce.createElement(bu,{image:c,ref:l,opacity:.4,draggable:!0,x:-e.cropX*c.width,y:-e.cropY*c.height,onDragMove:D,onTransform:D}),ce.createElement(lp,{ref:U,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(le,ye)=>ye.width<5||ye.height<5?le:ye,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),ce.createElement(En,{width:M,height:O,ref:V,listening:!1,onTransform:le=>{le.target.x()<-e.cropX*c.width-1e-9&&(le.target.x(-e.cropX*c.width),le.target.scaleX(1)),le.target.y()<-e.cropY*c.height-1e-9&&(le.target.y(-e.cropY*c.height),le.target.scaleY(1));const ye=Math.min(1,Math.max(0,e.cropX+le.target.x()/c.width)),Re=Math.min(1,Math.max(0,le.target.y()/c.height+e.cropY)),Me=le.target.width()*le.target.scaleX(),Pe=le.target.height()*le.target.scaleY(),de=Math.min(1-ye,Me/c.width),Te=Math.min(1-Re,Pe/c.height),Ae=le.target.getAbsolutePosition(le.target.getParent().getParent());le.target.scale({x:1,y:1}),le.target.position({x:0,y:0}),e.set({x:Ae.x,y:Ae.y,cropX:ye,cropY:Re,cropWidth:de,cropHeight:Te,width:Math.min(Me*H,c.width*(1-ye)*H),height:Math.min(Pe*H,c.height*(1-Re)*H)})}}),ce.createElement(lp,{ref:Y,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(le,ye)=>ye.width<5||ye.height<5?le:ye,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2,visible:e.resizable}))))}),Mm=({width:e,height:t,cornerRadius:r})=>{if(r>0){const n=Math.min(r,e/2,t/2);return`M 0 ${n} A ${n} ${n} 0 0 1 ${n} 0 L ${e-n} 0 A ${n} ${n} 0 0 1 ${e} ${n} L ${e} ${t-n} A ${n} ${n} 0 0 1 ${e-n} ${t} L ${n} ${t} A ${n} ${n} 0 0 1 0 ${t-n} Z`}return`M 0 0 L ${e} 0 L ${e} ${t} L 0 ${t} Z`},_C=({width:e,height:t})=>`M ${e/2} 0 L ${e} ${t} L 0 ${t} Z`,xC=({width:e,height:t})=>`M 0 0 L ${e} 0 L 0 ${t} Z`,SC=({width:e,height:t})=>`M ${e/2} ${t/2} m -${e/2}, 0 a ${e/2},${t/2} 0 1,0 ${e},0 a ${e/2},${t/2} 0 1,0 -${e},0`;function EC({width:e,height:t}){const r=e/2,n=t/2,i=e/2,a=t/2,l=i/2,o=a/2;let u="",d=Math.PI/5;for(let f=0;f<10;f++){const v=f%2==0?a:o,g=r+(f%2==0?i:l)*Math.sin(f*d),c=n-v*Math.cos(f*d);f===0?u=`M ${g} ${c}`:u+=` L ${g} ${c}`}return u+" Z"}function AC({width:e,height:t}){const r=e/2,n=t/2;return`M ${r} 0 L ${e} ${n} L ${r} ${t} L 0 ${n} Z`}function PC({width:e,height:t}){const r=e/2,n=t/2,i=e/2,a=t/2;let l="",o=2*Math.PI/5;for(let u=0;u<5;u++){const d=a,f=r+i*Math.sin(u*o),v=n-d*Math.cos(u*o);u===0?l=`M ${f} ${v}`:l+=` L ${f} ${v}`}return l+" Z"}function kC({width:e,height:t}){const r=e/2,n=t/2,i=e/2,a=t/2;let l="",o=2*Math.PI/6;for(let u=0;u<6;u++){const d=a,f=r+i*Math.sin(u*o),v=n-d*Math.cos(u*o);u===0?l=`M ${f} ${v}`:l+=` L ${f} ${v}`}return l+" Z"}function Nt({path:e,aspectRatio:t,width:r,height:n}){return{path:e,scaleX:r/t.width,scaleY:n/t.height}}function OC({width:e,height:t}){const r=.1*Math.min(e,t),n=.2*e,i=.2*t,a=.5*e;let l=`M ${r},0`;return l+=" H "+(e-r),l+=` A ${r},${r} 0 0 1 ${e},${r}`,l+=" V "+(t-r-i),l+=` A ${r},${r} 0 0 1 ${e-r},${t-i}`,l+=` H ${a+n/2}`,l+=` L ${a},${t}`,l+=` L ${a-n/2},${t-i}`,l+=` H ${r}`,l+=` A ${r},${r} 0 0 1 0,${t-r-i}`,l+=` V ${r}`,l+=` A ${r},${r} 0 0 1 ${r},0`,l+=" Z",l}function CC({width:e,height:t}){const r=.3*e,n=.3*t,i=e/2,a=t/2,l=i-r/2,o=i+r/2,u=a-n/2,d=a+n/2;let f=`M ${l},0 `;return f+=`H ${o} `,f+=`V ${u} `,f+=`H ${e} `,f+=`V ${d} `,f+=`H ${o} `,f+=`V ${t} `,f+=`H ${l} `,f+=`V ${d} `,f+="H 0 ",f+=`V ${u} `,f+=`H ${l} `,f+="V 0 ",f+="Z",f}const NC={rect:Mm,circle:SC,star:EC,triangle:_C,rightTriangle:xC,diamond:AC,pentagon:PC,hexagon:kC,speechBubble:OC,cross:CC,arc:({width:e,height:t})=>Nt({path:"M234 117C234 85.97 221.673 56.21 199.731 34.269C177.79 12.327 148.03 0 117 0C85.97 0 56.2103 12.327 34.2685 34.268C12.3268 56.21 0 85.97 0 117H117H234Z",aspectRatio:{width:234,height:117},width:e,height:t}),cloud:({width:e,height:t})=>Nt({path:"M216.41 57.006C216.961 54.084 217.249 51.069 217.249 47.986C217.249 21.4841 195.972 0 169.725 0C153.666 0 139.467 8.043 130.865 20.3575C122.606 13.3566 111.954 9.1402 100.327 9.1402C74.3322 9.1402 53.2123 30.2136 52.8094 56.364H52.8035C23.6407 56.364 0 80.235 0 109.682C0 139.129 23.6407 163 52.8035 163H208.197C237.359 163 261 139.129 261 109.682C261 83.056 241.672 60.99 216.41 57.006Z",aspectRatio:{width:261,height:163},width:e,height:t}),rightArrow:({width:e,height:t})=>{const r=.6*e;return`M 0 ${t/4} L ${r} ${t/4} L ${r} 0 L ${e} ${t/2} L ${r} ${t} L ${r} ${.75*t} L 0 ${.75*t} Z`},leftArrow:({width:e,height:t})=>{const r=.4*e;return`M ${e} ${t/4} L ${r} ${t/4} L ${r} 0 L 0 ${t/2} L ${r} ${t} L ${r} ${.75*t} L ${e} ${.75*t} Z`},downArrow:({width:e,height:t})=>{const r=.6*t;return`M ${e/4} 0 L ${e/4} ${r} L 0 ${r} L ${e/2} ${t} L ${e} ${r} L ${.75*e} ${r} L ${.75*e} 0 Z`},upArrow:({width:e,height:t})=>{const r=.4*t;return`M ${e/4} ${t} L ${e/4} ${r} L 0 ${r} L ${e/2} 0 L ${e} ${r} L ${.75*e} ${r} L ${.75*e} ${t} Z`},asterisk1:({width:e,height:t})=>Nt({path:"M45.5265 218.498C51.5466 222.87 58.5359 224.98 65.4742 224.98C75.916 224.98 86.221 220.2 92.853 211.217C92.872 211.198 92.89 211.178 92.907 211.157C92.923 211.136 92.939 211.115 92.954 211.094L92.977 211.061C92.993 211.039 93.008 211.017 93.023 210.996L116.491 178.725L139.959 210.996C139.982 211.031 140.006 211.058 140.029 211.088C140.04 211.102 140.05 211.116 140.061 211.132C151.115 226.188 172.355 229.505 187.473 218.515C202.608 207.526 205.992 186.278 195.074 171.104L195.05 171.066C195.03 171.034 195.014 171.01 194.989 170.985L171.572 138.696L209.512 126.346C227.334 120.545 237.129 101.305 231.33 83.476C225.532 65.648 206.315 55.8493 188.476 61.6334L150.537 73.933L150.52 34.0064C150.502 15.2594 135.248 0 116.508 0C97.768 0 82.514 15.2594 82.497 34.0234L82.463 73.916L44.5233 61.6163C44.5083 61.6163 44.49 61.613 44.4716 61.6078C44.4477 61.6014 44.4232 61.5918 44.4041 61.5823C26.5992 55.8664 7.45076 65.665 1.66886 83.46C-4.11314 101.254 5.61427 120.426 23.3511 126.278C23.3675 126.283 23.3822 126.289 23.3963 126.295L23.4588 126.319L23.4873 126.329L61.4098 138.679L37.9929 170.968C37.9844 170.985 37.9718 171.002 37.9591 171.019C37.9462 171.036 37.9336 171.053 37.9251 171.07C26.9903 186.244 30.3915 207.509 45.5265 218.498Z",aspectRatio:{width:233,height:225},width:e,height:t}),asterisk2:({width:e,height:t})=>Nt({path:"M46.0556 112L0 85.388L33.9456 26.6121L80.028 53.1781L80.054 0H147.946L147.972 53.1781L194.054 26.6121L228 85.388L181.944 112L228 138.612L194.054 197.388L147.972 170.822L147.946 224H80.054L80.028 170.822L33.9456 197.388L0 138.612L46.0556 112Z",aspectRatio:{width:228,height:224},width:e,height:t}),bookmark:({width:e,height:t})=>Nt({path:"M0 0H199V238L99.5 142.8L0 238V0Z",aspectRatio:{width:199,height:238},width:e,height:t}),butterfly:({width:e,height:t})=>Nt({path:"M94.5 100.713C91.935 150.916 50.703 190.909 0 191.493V0C50.703 0.5845 91.935 40.5767 94.5 90.78C97.031 41.2385 137.217 1.6407 187 0.0438004V191.45C137.217 189.853 97.031 150.255 94.5 100.713Z",aspectRatio:{width:187,height:192},width:e,height:t}),cylinder:({width:e,height:t})=>Nt({path:"M169 36.8497V218.15C169 238.502 131.168 255 84.5 255C37.832 255 0 238.502 0 218.15V36.8497C0 16.4982 37.832 0 84.5 0C131.168 0 169 16.4982 169 36.8497Z",aspectRatio:{width:169,height:255},width:e,height:t}),diamond2:({width:e,height:t})=>Nt({path:"M0 55.5L124 185L248 55.5L189.307 0H58.6933L0 55.5Z",aspectRatio:{width:248,height:185},width:e,height:t}),door:({width:e,height:t})=>Nt({path:"M140 69.697C140 31.2044 108.66 0 70 0C31.34 0 0 31.2044 0 69.697V207H140V69.697Z",aspectRatio:{width:140,height:207},width:e,height:t}),drop1:({width:e,height:t})=>Nt({path:"M167 150.687C167 196.328 129.407 234 83.139 234C37.593 234 0 196.328 0 150.687C0 100.7 51.329 36.9474 83.139 0C114.948 39.1207 167 98.526 167 150.687Z",aspectRatio:{width:167,height:234},width:e,height:t}),drop2:({width:e,height:t})=>Nt({path:"M73 239C53.64 239 35.071 231.315 21.3812 217.634C7.691 203.954 0 185.4 0 166.054C0 136.091 13.8696 113.633 30.768 86.27C43.912 64.9877 58.888 40.7377 70.597 7.6816C71.281 5.7496 72.989 0 72.989 0C72.989 0 72.993 0.0124998 73 0.0363998C73.007 0.0124998 73.011 0 73.011 0C73.011 0 74.719 5.7496 75.403 7.6816C87.112 40.7377 102.088 64.9877 115.232 86.27C132.13 113.633 146 136.091 146 166.054C146 185.4 138.309 203.954 124.619 217.634C111.025 231.218 92.225 239 73 239Z",aspectRatio:{width:146,height:239},width:e,height:t}),explosion:({width:e,height:t})=>Nt({path:"M165.802 184.465L118.997 260L125.343 182.079L34.9058 219.45L99.164 159.817L0 163.792L78.538 134.373L0 74.7401L86.471 89.052V0L118.997 89.052L165.802 10.3364L149.143 97.798L217.368 29.419L165.802 112.905L245.927 81.101L165.802 143.914H261L165.802 184.465Z",aspectRatio:{width:261,height:260},width:e,height:t}),flag:({width:e,height:t})=>Nt({path:"M0 142.161C0 142.161 51.9956 118.626 103 137.469C159.992 158.525 206 141.31 206 141.31V11.1373C206 11.1373 160 28.3218 103.016 7.28273C52 -11.553 0 12.0974 0 12.0974V142.161Z",aspectRatio:{width:206,height:148},width:e,height:t}),flower:({width:e,height:t})=>Nt({path:"M135.351 66.1893C196.683 -5.00591 256.536 100.304 164.908 117.361C256.536 135.16 195.944 239.728 135.351 168.532C166.386 257.526 45.9394 256.785 76.975 168.532C15.643 239.728 -44.2109 135.16 47.4173 117.361C-44.9498 100.304 15.643 -4.26431 76.975 66.1893C45.2005 -22.0631 166.386 -22.0631 135.351 66.1893ZM105.793 104.012C113.183 104.012 119.833 109.945 119.833 117.361C119.833 124.777 113.183 131.452 105.793 131.452C98.404 131.452 92.492 124.777 92.492 117.361C92.492 109.945 98.404 104.012 105.793 104.012Z",aspectRatio:{width:212,height:235},width:e,height:t}),frame:({width:e,height:t})=>Nt({path:"M0 0H240L200 88L240 176H0L40 88L0 0Z",aspectRatio:{width:240,height:176},width:e,height:t}),heart1:({width:e,height:t})=>Nt({path:"M215.886 56.157C215.886 24.729 191.112 0 160.584 0C135.933 0 115.08 16.983 107.937 39.93C100.788 16.986 79.935 0.591 55.284 0.591C24.75 0.591 0 24.615 0 56.055C0 71.919 6.321 83.127 16.494 95.121L107.988 189.447L199.377 95.121C209.559 83.127 215.886 72.009 215.886 56.157Z",aspectRatio:{width:216,height:190},width:e,height:t}),home:({width:e,height:t})=>Nt({path:"M0 62.143L95.5 0L191 62.143V195H0V62.143Z",aspectRatio:{width:191,height:195},width:e,height:t}),home2:({width:e,height:t})=>Nt({path:"M206 94.076L103 0L0 94.076H31.2377V189H175.607V94.076H206Z",aspectRatio:{width:206,height:189},width:e,height:t}),hourglass:({width:e,height:t})=>Nt({path:"M0.392782 0H187.607C193.014 43.3688 140.804 53.797 140.804 97.5C140.804 141.203 193.014 151.631 187.607 195H0.392782C-5.01452 151.631 47.196 141.203 47.196 97.5C47.196 53.797 -5.01452 43.3688 0.392782 0Z",aspectRatio:{width:188,height:195},width:e,height:t}),house:({width:e,height:t})=>Nt({path:"M0 92.367L95 0L190 92.367V223H0V92.367Z",aspectRatio:{width:190,height:223},width:e,height:t}),keyhole:({width:e,height:t})=>Nt({path:"M115 57.0494C115 25.5387 89.416 0 57.863 0C26.311 0 0.726898 25.5414 0.726898 57.0494C0.726898 78.652 12.759 97.451 30.505 107.136L0 219H114.845L84.448 107.524C102.608 97.962 115 78.959 115 57.0494Z",aspectRatio:{width:115,height:219},width:e,height:t}),kiss:({width:e,height:t})=>Nt({path:"M124.5 17.1468C80.036 -36.5162 0 52.9218 0 52.9218C0 52.9218 44.4643 120 124.5 120C204.536 120 249 52.9218 249 52.9218C249 52.9218 168.964 -36.5162 124.5 17.1468Z",aspectRatio:{width:249,height:120},width:e,height:t}),leaf:({width:e,height:t})=>Nt({path:"M204.414 0.0151567C204.414 0.0151567 206.837 93.9509 150.394 150.394C93.9507 206.837 0.0151569 204.413 0.0151569 204.413C0.0151569 204.413 -2.40835 110.478 54.0347 54.0349C110.478 -2.40834 204.414 0.0151567 204.414 0.0151567Z",aspectRatio:{width:205,height:205},width:e,height:t}),lightning1:({width:e,height:t})=>Nt({path:"M111.5 0L0 142H51.433L31.5 253L143 111H91.567L111.5 0Z",aspectRatio:{width:143,height:253},width:e,height:t}),lightning2:({width:e,height:t})=>Nt({path:"M126 0H43L0 120.531H36L6 227L110 80.354H73L126 0Z",aspectRatio:{width:126,height:227},width:e,height:t}),magnet:({width:e,height:t})=>Nt({path:"M88.402 0H0V67.669H88.402C105.271 67.669 118.957 81.308 118.957 98C118.957 114.689 105.271 128.331 88.402 128.331H0V196H88.402C142.747 196 187 152.072 187 98C187 43.9279 142.747 0 88.402 0Z",aspectRatio:{width:187,height:196},width:e,height:t}),mithosis:({width:e,height:t})=>Nt({path:"M150.996 136.45C137.141 128.926 117.559 128.7 103.532 135.896C93.843 140.867 82.875 143.67 71.2577 143.67C31.9033 143.67 0 111.508 0 71.835C0 32.161 31.9033 0 71.2577 0C83.467 0 94.959 3.0955 105.004 8.5504C118.859 16.0745 138.441 16.3 152.467 9.1038C162.157 4.1328 173.125 1.3303 184.742 1.3303C224.097 1.3303 256 33.492 256 73.165C256 112.839 224.097 145 184.742 145C172.533 145 161.041 141.905 150.996 136.45Z",aspectRatio:{width:256,height:145},width:e,height:t}),orangeRicky:({width:e,height:t})=>Nt({path:"M69 0H0V69V138V207H69H138V138H69V69V0Z",aspectRatio:{width:138,height:207},width:e,height:t}),party:({width:e,height:t})=>Nt({path:"M134.622 0L144.682 68.2539L174.415 5.9977L163.91 74.1846L210.671 23.4578L180.535 85.519L240.169 50.8289L193.079 101.25L260.29 85.679L200.43 119.98L269.245 124.911L201.934 140.044L266.237 165.04L197.456 159.661L251.535 202.5L187.396 177.086L226.445 233.962L172.646 190.771L193.197 256.631L154.518 199.501L154.743 268.492L134.622 202.5L114.501 268.492L114.727 199.501L76.0482 256.631L96.5985 190.771L42.7992 233.962L81.8489 177.086L17.7091 202.5L71.7885 159.661L3.0072 165.04L67.3112 140.044L0 124.911L68.8149 119.98L8.9545 85.679L76.1658 101.25L29.0753 50.8289L88.7105 85.519L58.5743 23.4578L105.335 74.1846L94.8305 5.9977L124.562 68.2539L134.622 0Z",aspectRatio:{width:270,height:269},width:e,height:t}),pillow:({width:e,height:t})=>Nt({path:"M176 0.00169945C157.812 16.9062 125.203 28.174 88.001 28.174C50.798 28.174 18.1881 16.9054 0 0V258.421C18.1882 241.516 50.798 230.248 88 230.248C125.202 230.248 157.812 241.516 176 258.421V0.00169945Z",aspectRatio:{width:176,height:259},width:e,height:t}),polygon:({width:e,height:t})=>Nt({path:"M110 0L219.119 63V189L110 252L0.880798 189V63L110 0Z",aspectRatio:{width:220,height:252},width:e,height:t}),rainbow:({width:e,height:t})=>Nt({path:"M186.907 141H282C282 63.128 218.872 0 141 0C63.1278 0 0 63.128 0 141H95.093C95.093 115.646 115.646 95.093 141 95.093C166.354 95.093 186.907 115.646 186.907 141Z",aspectRatio:{width:282,height:141},width:e,height:t}),rhodeIsland:({width:e,height:t})=>Nt({path:"M69 0H0V69V138H69V207H138V138V69H69V0Z",aspectRatio:{width:138,height:207},width:e,height:t}),shell:({width:e,height:t})=>Nt({path:"M109 0C169.199 0 218 48.743 218 108.87C185.392 108.87 158.958 135.273 158.958 167.842C158.958 179.736 158.958 191 158.958 191H59.042C59.042 191 59.042 179.736 59.042 167.842C59.042 135.273 32.6077 108.87 0 108.87C0 48.743 48.8007 0 109 0Z",aspectRatio:{width:218,height:191},width:e,height:t}),shield1:({width:e,height:t})=>Nt({path:"M203.184 30.7277C142.457 30.7277 102.853 0 102.853 0C102.853 0 63.249 30.7277 3.05098 30.7277C3.05098 30.7277 -3.81372 128.209 3.05098 162.115C9.38758 193.902 102.853 249 102.853 249C102.853 249 196.319 193.902 203.184 162.115C209.52 128.738 203.184 30.7277 203.184 30.7277Z",aspectRatio:{width:206,height:249},width:e,height:t}),shield2:({width:e,height:t})=>Nt({path:"M0 12.9585C64.624 -4.3195 136.376 -4.3195 201 12.9585C201 51.0564 201 89.154 201 127.252C201 184.396 100.498 240 100.498 240C100.498 240 0 184.406 0 127.252C0 89.154 0 51.0564 0 12.9585Z",aspectRatio:{width:201,height:240},width:e,height:t}),skewedRectangle:({width:e,height:t})=>Nt({path:"M85.9799 0H290L204.02 141H0L85.9799 0Z",aspectRatio:{width:290,height:141},width:e,height:t}),softFlower:({width:e,height:t})=>Nt({path:"M109 0C80.073 0 56.6234 23.4498 56.6234 52.3766C56.6234 54.722 54.722 56.6234 52.3766 56.6234C23.4498 56.6234 0 80.073 0 109C0 137.927 23.4498 161.377 52.3766 161.377C54.722 161.377 56.6234 163.278 56.6234 165.623C56.6234 194.55 80.073 218 109 218C137.927 218 161.377 194.55 161.377 165.623C161.377 163.278 163.278 161.377 165.623 161.377C194.55 161.377 218 137.927 218 109C218 80.073 194.55 56.6234 165.623 56.6234C163.278 56.6234 161.377 54.722 161.377 52.3766C161.377 23.4498 137.927 0 109 0Z",aspectRatio:{width:218,height:218},width:e,height:t}),softStar:({width:e,height:t})=>Nt({path:"M130.424 3.17662C130.927 -1.05888 137.073 -1.05888 137.576 3.17662L141.792 38.7086C147.236 84.59 183.41 120.764 229.291 126.208L264.823 130.424C269.059 130.927 269.059 137.073 264.823 137.576L229.291 141.792C183.41 147.236 147.236 183.41 141.792 229.291L137.576 264.823C137.073 269.059 130.927 269.059 130.424 264.823L126.208 229.291C120.764 183.41 84.59 147.236 38.7086 141.792L3.17662 137.576C-1.05888 137.073 -1.05888 130.927 3.17662 130.424L38.7086 126.208C84.59 120.764 120.764 84.59 126.208 38.7086L130.424 3.17662Z",aspectRatio:{width:268,height:268},width:e,height:t}),stairs1:({width:e,height:t})=>Nt({path:"M0 0H67.667V67.667H135.333V135.333H203V203H0V0Z",aspectRatio:{width:203,height:203},width:e,height:t}),stairs2:({width:e,height:t})=>Nt({path:"M50 0H0V200H200V150H150V100H100V50H50V0Z",aspectRatio:{width:200,height:200},width:e,height:t}),teewee:({width:e,height:t})=>Nt({path:"M69 0H138V69H207V138H138H69H0V69H69V0Z",aspectRatio:{width:207,height:138},width:e,height:t}),blob1:({width:e,height:t})=>Nt({path:"M172.979 19.611C191.285 33.0858 204.505 54.442 210.861 78.5949C217.471 103.002 217.471 130.46 205.776 151.816C194.335 173.427 171.454 189.444 147.047 196.054C122.639 202.919 96.7069 200.631 75.3506 190.715C54.2486 180.546 37.7229 163.003 23.4855 142.155C9.5022 121.307 -2.19289 97.4087 0.349524 74.7813C3.14617 52.1538 19.9261 30.7976 40.2654 17.8313C60.6046 4.61077 84.5033 -0.474048 108.148 0.0344341C131.538 0.542916 154.928 6.13621 172.979 19.611Z",aspectRatio:{width:216,height:200},width:e,height:t}),blob10:({width:e,height:t})=>Nt({path:"M188.684 8.95173C205.601 24.3309 200.988 63.0866 191.453 99.3816C182.225 135.677 168.076 169.511 146.238 175.355C124.399 181.507 94.871 159.668 66.5733 143.059C37.9679 126.449 10.5929 115.068 2.59569 95.0754C-5.4015 75.0824 5.97912 46.1694 24.4342 30.4826C42.8893 14.7958 68.4188 12.0276 100.715 6.79864C132.704 1.5697 171.767 -6.42749 188.684 8.95173Z",aspectRatio:{width:200,height:177},width:e,height:t}),blob11:({width:e,height:t})=>Nt({path:"M137.368 29.4923C148.97 46.7605 146.542 72.1231 148.161 99.1046C149.779 126.086 155.715 154.956 144.113 174.383C132.781 193.81 103.911 203.793 80.4369 198.666C56.963 193.27 38.6156 173.034 28.3626 153.607C17.8398 134.181 15.4115 115.833 9.47555 91.5498C3.53961 67.2664 -5.63411 37.3169 4.61887 20.0488C15.1417 2.51078 45.0911 -1.80626 72.8821 0.622074C100.673 2.78059 126.036 12.2241 137.368 29.4923Z",aspectRatio:{width:152,height:200},width:e,height:t}),blob12:({width:e,height:t})=>Nt({path:"M158.391 17.923C172.491 28.5703 180.261 48.1384 187.743 70.5842C194.937 93.3177 202.419 118.641 194.649 138.785C187.167 158.928 164.146 173.317 138.535 184.54C112.923 196.05 84.4347 204.108 58.8235 197.777C33.2123 191.446 10.191 170.439 2.99688 146.267C-4.48504 121.807 3.57241 94.181 10.4788 68.282C17.0974 42.0953 22.565 17.6352 37.8166 7.27563C53.0682 -3.37171 78.1038 0.081487 100.837 2.67138C123.859 5.26127 144.29 7.27563 158.391 17.923Z",aspectRatio:{width:198,height:200},width:e,height:t}),blob13:({width:e,height:t})=>Nt({path:"M149.668 1.37595C170.663 5.22017 193.728 17.3442 198.755 34.7911C204.078 52.2379 191.363 75.3032 178.943 93.9329C166.819 112.563 154.99 126.757 140.501 145.386C126.011 164.312 108.86 187.673 92.5957 186.194C76.3317 185.011 60.9549 159.285 45.8737 140.655C30.4968 122.321 15.7114 110.788 7.43151 95.1157C-0.848339 79.4432 -2.32688 59.0392 3.5873 41.5924C9.50148 23.8498 23.1041 8.76868 38.7767 3.44592C54.745 -1.87685 73.3746 2.55879 91.7086 2.26308C110.338 2.26308 128.968 -2.17256 149.668 1.37595Z",aspectRatio:{width:200,height:187},width:e,height:t}),blob14:({width:e,height:t})=>Nt({path:"M137.838 28.6426C150.711 40.5617 165.014 46.5213 178.363 58.2021C191.474 69.8828 203.87 87.0464 198.864 99.6807C193.858 112.315 171.689 120.42 157.862 135.676C144.275 151.171 139.269 173.579 126.873 182.161C114.477 190.505 94.9294 185.022 76.8123 178.109C58.4568 171.196 41.5316 163.091 28.1822 150.456C14.5943 137.822 4.58225 120.42 1.24488 101.826C-2.09248 83.2322 1.00651 62.9697 13.8792 52.4809C26.7519 41.992 49.1598 41.0385 65.6083 30.788C82.0567 20.5376 92.0688 0.990158 103.034 0.0366268C113.762 -0.916905 125.204 16.9618 137.838 28.6426Z",aspectRatio:{width:200,height:187},width:e,height:t}),blob15:({width:e,height:t})=>Nt({path:"M185.203 1.52939C197.679 7.62217 200 32.2835 200 51.7223C200 71.1612 197.389 85.3777 197.679 100.175C198.259 114.681 201.741 129.768 198.259 143.114C194.778 156.46 184.623 168.356 171.567 173.868C158.801 179.671 143.134 179.091 130.368 174.739C117.312 170.387 106.867 162.263 86.8482 160.812C66.539 159.362 36.9454 164.294 18.9572 155.3C0.968966 146.306 -5.41395 123.095 5.03083 105.977C15.4756 88.5692 42.4579 77.5442 55.5139 59.5559C68.2798 41.8578 67.1192 17.4867 76.9837 9.6531C86.5581 2.10965 107.158 11.3939 128.627 9.6531C150.097 8.20244 172.728 -4.27327 185.203 1.52939Z",aspectRatio:{width:200,height:179},width:e,height:t}),blob16:({width:e,height:t})=>Nt({path:"M158.441 55.3221C167.253 80.2399 160.264 105.462 147.501 134.938C134.738 164.717 116.81 199.055 97.0576 199.967C77.3057 201.182 55.7305 168.668 34.4592 133.722C13.1879 99.0802 -7.77953 62.3112 2.85612 36.4818C13.4918 10.6523 56.0344 -3.93369 90.0685 0.928322C123.799 6.09421 149.324 30.7081 158.441 55.3221Z",aspectRatio:{width:163,height:200},width:e,height:t}),blob17:({width:e,height:t})=>Nt({path:"M168.917 36.7587C178.871 53.2457 175.138 76.5764 172.961 106.129C170.472 135.37 169.85 170.832 150.563 187.63C131.276 204.739 93.3252 203.495 65.0173 187.63C36.7095 172.077 18.0449 142.213 7.77943 107.373C-2.79714 72.2213 -4.35252 32.7147 14.312 14.0502C32.9765 -4.3033 72.1721 -1.50361 103.591 4.7179C135.32 10.6283 158.962 20.2717 168.917 36.7587Z",aspectRatio:{width:176,height:200},width:e,height:t}),blob18:({width:e,height:t})=>Nt({path:"M178.188 21.1464C193.012 36.3069 196.381 62.9219 198.739 88.1893C200.76 113.12 201.771 136.366 190.316 149.168C178.862 162.307 155.279 164.665 135.065 167.697C115.188 170.73 99.0168 174.098 72.4018 177.131C46.1237 180.163 9.40176 182.521 1.65309 168.371C-6.09559 154.221 15.4659 123.564 23.5515 92.9059C31.6371 62.2481 26.2467 31.2534 38.3751 15.4192C50.1665 -0.0781831 79.8136 -1.08888 107.776 0.595609C136.076 1.9432 163.028 5.64909 178.188 21.1464Z",aspectRatio:{width:200,height:180},width:e,height:t}),blob19:({width:e,height:t})=>Nt({path:"M148.621 13.3857C171.945 24.3818 194.937 41.3756 192.938 60.702C190.605 80.3615 163.282 101.687 149.953 123.346C136.958 145.005 137.958 166.664 128.295 174.661C118.631 182.325 98.3054 175.994 73.6476 181.991C48.9899 187.989 20.0004 205.983 11.0036 197.986C1.67366 189.989 12.6697 156.001 12.3365 131.343C12.0033 106.685 0.340809 91.0243 0.00759636 75.0301C-0.325616 59.0359 10.3372 42.3753 25.3318 28.7135C39.9931 15.0518 58.9863 4.05578 80.3119 1.05687C101.638 -2.27526 124.962 2.38972 148.621 13.3857Z",aspectRatio:{width:194,height:200},width:e,height:t}),blob2:({width:e,height:t})=>Nt({path:"M140.464 18.6393C156.081 28.3718 169.887 39.9149 178.714 54.853C187.541 69.5649 191.389 87.6717 189.578 104.421C187.768 121.396 180.525 137.239 172.377 153.535C164.455 169.832 155.854 186.58 142.048 194.276C128.241 201.971 109.456 200.613 92.4804 197.671C75.2789 194.502 60.1144 189.749 45.1762 182.733C30.4644 175.716 16.2052 166.21 8.28346 153.083C0.361703 139.729 -1.44898 122.527 1.04072 106.91C3.30408 91.2931 9.64147 76.8076 15.9789 60.5114C22.0899 44.2153 28.201 26.1084 40.6495 14.7916C53.0979 3.24849 71.8838 -1.27823 89.7643 0.306124C107.871 1.66414 124.846 9.13322 140.464 18.6393Z",aspectRatio:{width:191,height:200},width:e,height:t}),blob20:({width:e,height:t})=>Nt({path:"M150.035 13.2464C157.376 24.9386 153.026 48.323 157.92 65.7254C163.087 83.1277 177.498 94.2761 182.392 108.415C187.287 122.555 182.392 139.957 173.147 156.272C163.63 172.587 149.763 187.814 132.089 195.155C114.414 202.225 93.2053 201.137 73.6276 194.611C54.3219 188.357 36.9196 176.937 25.7712 161.438C14.8947 145.667 10.5441 126.09 5.92163 105.696C1.57105 85.0311 -3.05145 63.5501 2.65869 45.0601C8.64075 26.5701 24.6835 11.0711 43.1735 4.54524C61.6635 -1.98064 82.6007 0.194657 102.722 1.01039C122.844 1.82613 142.421 1.55421 150.035 13.2464Z",aspectRatio:{width:185,height:200},width:e,height:t}),blob21:({width:e,height:t})=>Nt({path:"M152.611 0.184799C172.596 -0.723643 197.73 1.39606 199.85 13.8114C201.969 26.2268 181.075 48.9379 174.716 68.0151C168.357 87.0924 176.533 102.536 174.11 114.649C171.991 127.064 159.575 136.148 146.252 139.782C132.928 143.719 118.696 141.902 105.977 139.176C93.562 136.451 82.6606 132.212 63.2805 131.909C43.9004 131.606 16.0416 135.24 5.44306 125.853C-5.15543 116.465 1.50648 94.0572 10.2881 76.4939C18.7669 59.2335 29.6682 46.8182 38.7526 35.3112C48.1398 23.5015 56.3158 12.903 66.9143 8.36078C77.5128 4.12138 91.1394 6.24108 104.766 5.63546C118.696 4.72701 132.928 1.09324 152.611 0.184799Z",aspectRatio:{width:200,height:143},width:e,height:t}),blob22:({width:e,height:t})=>Nt({path:"M195.507 15.5715C206.818 33.1668 193.622 69.3001 190.166 101.663C186.71 134.34 193.308 163.561 181.996 178.014C170.685 192.153 141.464 191.525 114.443 189.326C87.1072 187.44 62.2852 183.67 40.6052 169.531C19.2395 155.077 1.6441 130.255 0.0730908 103.862C-1.18372 77.4694 13.898 49.5054 35.2638 31.91C56.6296 14.0004 84.5936 6.45958 116.328 2.37494C148.063 -1.70969 184.196 -2.3381 195.507 15.5715Z",aspectRatio:{width:200,height:191},width:e,height:t}),blob23:({width:e,height:t})=>Nt({path:"M135.742 9.14189C157.815 19.2326 179.258 38.4681 176.105 56.7576C172.951 74.7317 145.202 92.0751 127.858 109.734C110.83 127.077 104.523 145.052 87.4953 164.918C70.4672 184.468 42.7177 206.227 27.5816 198.343C12.4455 190.46 9.60747 153.566 6.45411 126.762C2.98542 100.274 -0.798607 84.1917 0.147399 67.1636C0.77807 50.4508 6.76944 32.4767 19.0675 20.8093C31.0503 9.14189 49.6551 3.78119 70.4672 1.2585C90.964 -1.26418 113.668 -0.633508 135.742 9.14189Z",aspectRatio:{width:177,height:200},width:e,height:t}),blob24:({width:e,height:t})=>Nt({path:"M165.663 24.3715C171.555 44.4059 158.003 76.2254 151.816 96.2598C145.923 116.294 147.691 124.544 148.28 135.445C148.575 146.346 147.396 159.309 140.62 170.8C133.549 181.996 120.88 191.424 104.381 196.432C87.8821 201.441 67.553 202.03 54.8841 192.602C41.9207 183.469 36.6174 164.023 25.1271 143.105C13.3421 122.187 -4.33535 99.7953 0.967891 85.0641C6.27113 70.6275 34.2604 63.8511 56.0626 48.5307C77.5702 33.5048 92.8907 9.93489 113.22 2.56928C133.843 -4.79633 159.77 4.04241 165.663 24.3715Z",aspectRatio:{width:168,height:200},width:e,height:t}),blob25:({width:e,height:t})=>Nt({path:"M180.115 1.256C192.651 2.1962 189.83 34.163 190.771 58.2947C191.711 82.4265 196.098 98.4099 198.606 117.214C201.113 136.018 201.426 157.642 189.204 165.791C177.294 173.626 153.163 167.671 135.299 163.91C117.749 159.836 106.466 157.956 85.7818 162.97C65.0974 168.298 35.3244 180.521 18.7143 174.253C1.79068 167.985 -1.97012 142.913 0.850478 120.975C3.67107 99.0367 13.0731 79.6059 18.4009 54.8473C23.7287 30.0888 24.9823 -0.310996 40.0254 0.00240332C54.7552 0.00240332 82.9612 31.029 111.167 31.029C139.373 31.029 167.579 0.315802 180.115 1.256Z",aspectRatio:{width:200,height:176},width:e,height:t}),blob26:({width:e,height:t})=>Nt({path:"M142.571 0.586925C159.976 3.39414 176.258 15.1844 184.96 30.9048C193.662 46.6253 194.224 66.8372 189.171 83.6805C183.837 100.805 172.327 114.56 163.064 129.157C153.8 143.755 146.501 158.914 134.43 173.231C122.359 187.828 105.516 201.303 89.5146 199.899C73.2327 198.776 58.0738 182.775 42.9148 169.862C28.0366 157.23 13.7198 147.685 6.42103 134.491C-0.877729 121.297 -1.15845 103.892 1.64876 88.4528C4.45598 72.7324 10.0704 58.6963 18.4921 47.4674C27.1944 36.2386 38.4233 27.8169 50.4943 22.2025C62.846 16.3073 75.7592 13.5001 91.1989 8.72785C106.919 4.23631 125.166 -1.93957 142.571 0.586925Z",aspectRatio:{width:193,height:200},width:e,height:t}),blob27:({width:e,height:t})=>Nt({path:"M112.602 54.9337C129.225 71.8646 155.391 78.9448 158.777 89.719C162.471 100.493 143.693 114.654 127.07 135.586C110.447 156.519 96.2866 184.224 71.0442 194.998C46.1096 205.465 10.4008 199.308 2.0893 178.375C-6.22223 157.443 12.5557 121.734 18.4045 92.1817C24.5612 62.6296 17.7889 38.9263 26.4082 21.9954C34.7197 5.06454 58.423 -5.40183 73.5069 2.9097C88.8986 10.9134 95.9788 38.0028 112.602 54.9337Z",aspectRatio:{width:160,height:200},width:e,height:t}),blob28:({width:e,height:t})=>Nt({path:"M125.281 68.5835C142.15 82.9923 165.344 90.021 181.862 108.998C198.028 127.624 207.516 158.902 192.405 166.634C177.293 174.716 137.581 159.605 112.629 156.442C87.326 152.928 77.1344 161.713 59.9142 165.579C43.0453 169.445 19.1478 168.391 11.7677 157.496C4.73907 146.25 14.2278 124.813 11.4163 94.2382C8.2534 63.6634 -6.85825 23.9514 3.68476 8.48836C14.2278 -7.32615 50.4254 1.10826 73.9715 16.2199C97.5175 31.683 108.412 54.1747 125.281 68.5835Z",aspectRatio:{width:200,height:169},width:e,height:t}),blob29:({width:e,height:t})=>Nt({path:"M162.987 10.2348C169.16 25.1809 154.864 58.6471 147.066 79.4417C139.268 100.236 138.293 108.359 134.719 114.532C131.47 120.706 125.297 124.93 119.448 143.45C113.6 161.97 107.426 194.461 98.004 199.335C88.5814 204.209 75.5849 181.14 55.7651 167.494C35.6203 153.522 8.65241 148.648 1.8292 135.327C-4.994 122.33 8.65241 100.561 20.0244 82.041C31.3964 63.5208 40.1691 48.2498 53.4906 35.5782C66.8122 22.9065 84.0326 13.159 106.452 6.33584C128.871 -0.812285 156.489 -4.71127 162.987 10.2348Z",aspectRatio:{width:165,height:200},width:e,height:t}),blob3:({width:e,height:t})=>Nt({path:"M158.095 64.2637C176.543 95.19 192.277 129.1 181.697 155.686C171.117 182.001 133.951 201.533 99.4982 199.905C64.7739 198.549 33.0338 176.032 15.4004 145.377C-2.23296 114.994 -5.75963 76.2002 10.2461 46.6303C26.2518 17.0605 61.5185 -3.557 89.732 0.512241C118.217 4.58149 139.377 33.0662 158.095 64.2637Z",aspectRatio:{width:186,height:200},width:e,height:t}),blob30:({width:e,height:t})=>Nt({path:"M146.076 34.4585C157.052 54.582 155.833 80.1936 164.675 100.622C173.212 121.355 191.201 136.905 189.372 149.711C187.542 162.212 165.285 171.969 146.99 175.018C129.001 178.372 114.671 174.713 103.39 175.018C92.1083 175.018 83.876 178.982 66.8015 186.299C49.7271 193.617 23.8105 204.288 14.3586 198.19C4.90665 191.787 11.6145 168.615 10.3949 147.882C8.87037 127.148 -0.581561 108.549 0.0282404 89.3407C0.638042 70.1319 11.6145 50.6182 28.384 32.934C44.8487 15.5546 67.4113 0.309578 89.974 0.00467694C112.537 -0.300224 135.099 14.335 146.076 34.4585Z",aspectRatio:{width:190,height:200},width:e,height:t}),blob31:({width:e,height:t})=>Nt({path:"M134.218 44.0392C153.568 36.4264 184.97 26.9105 195.755 33.2544C206.222 39.9156 195.755 62.1194 181.481 76.3933C166.89 90.35 148.175 96.0596 145.638 116.36C143.1 136.661 156.74 171.235 151.664 183.923C146.589 196.928 123.434 187.413 105.036 178.531C86.6388 169.967 73.3165 161.72 52.0643 158.548C30.812 155.058 1.62986 156.644 0.0438693 145.225C-1.22492 133.806 25.4197 109.382 29.2261 86.8609C32.7152 64.3398 13.6834 44.0392 11.7802 26.9105C9.877 9.46461 24.7853 -4.80928 42.5484 1.53467C59.9942 7.87863 79.9777 34.5232 93.6172 45.308C107.257 56.4099 114.869 51.3347 134.218 44.0392Z",aspectRatio:{width:200,height:191},width:e,height:t}),blob32:({width:e,height:t})=>Nt({path:"M200 100.339C200 149.831 145.763 197.966 95.5932 197.966C45.7627 197.966 0 149.831 0 100.339C0 50.8475 45.7627 0 95.5932 0C145.763 0 200 50.8475 200 100.339Z",aspectRatio:{width:200,height:198},width:e,height:t}),blob4:({width:e,height:t})=>Nt({path:"M183.427 38.712C198.21 63.2519 196.141 95.1833 189.341 126.523C182.836 157.863 171.305 188.908 150.609 197.482C130.208 205.76 100.642 192.16 69.8936 177.968C39.4405 164.072 7.80478 150.176 1.30024 128.593C-5.2043 107.01 13.718 77.7393 35.3012 51.7211C56.5888 25.9986 81.1287 3.23272 108.921 0.276112C137.009 -2.38484 168.349 14.4678 183.427 38.712Z",aspectRatio:{width:195,height:200},width:e,height:t}),blob5:({width:e,height:t})=>Nt({path:"M166.251 30.6913C183.816 48.5185 195.875 71.8512 199.021 98.8542C202.429 125.595 197.186 155.744 179.359 169.115C161.794 182.223 131.645 178.815 103.331 176.979C75.0171 175.144 48.8006 174.882 29.6625 161.512C10.7866 148.141 -0.748681 121.925 0.0378149 96.2326C0.824311 70.8025 14.1947 46.159 33.0706 28.3318C52.2087 10.5045 76.8522 -0.5064 100.971 0.0179307C125.091 0.804426 148.423 12.864 166.251 30.6913Z",aspectRatio:{width:200,height:179},width:e,height:t}),blob6:({width:e,height:t})=>Nt({path:"M149.146 50.5452C161.911 68.0278 171.901 81.9028 176.619 97.9979C181.336 114.37 180.781 133.241 173.011 149.891C165.519 166.541 151.366 180.693 133.051 189.851C114.736 199.008 92.2586 202.893 71.446 197.621C50.6334 192.348 30.9308 177.918 18.1658 158.216C5.12323 138.791 -0.981801 113.815 0.128204 87.7304C1.51571 61.6453 10.6733 34.1726 29.2658 17.5226C48.1359 1.14999 76.996 -4.40004 98.9186 3.6475C120.841 11.695 136.381 32.7851 149.146 50.5452Z",aspectRatio:{width:180,height:200},width:e,height:t}),blob7:({width:e,height:t})=>Nt({path:"M158.662 41.8295C178.593 57.8305 204.138 64.5677 213.402 79.7266C222.666 94.6047 215.367 118.466 203.015 135.028C190.383 151.871 172.698 161.977 156.416 168.434C140.134 174.89 124.975 177.697 104.483 185.277C83.9903 192.856 58.1642 205.208 44.9704 197.629C31.4959 190.33 31.2152 163.1 21.9514 138.116C12.9684 112.851 -4.71688 90.1132 1.17822 75.5158C7.35404 61.1991 36.8295 55.5847 58.7256 40.1452C80.9024 24.7056 95.4998 -0.278374 109.816 0.00234533C124.414 0.283064 138.45 25.8285 158.662 41.8295Z",aspectRatio:{width:218,height:200},width:e,height:t}),blob8:({width:e,height:t})=>Nt({path:"M153.53 11.0108C168.179 18.1858 181.931 29.5461 192.993 44.4939C203.755 59.4417 212.425 78.2759 210.631 96.5122C209.136 114.748 197.477 132.088 182.529 142.252C167.581 152.716 148.747 156.004 128.717 168.262C108.687 180.22 87.1622 201.147 69.8228 199.951C52.7823 198.456 39.6283 174.54 32.4533 153.015C25.2784 131.49 24.0826 112.357 16.6087 91.131C9.13477 70.2041 -4.31825 46.8855 1.36191 31.9377C7.04207 16.691 31.8554 9.51607 52.7823 5.33069C73.4103 0.846349 90.4507 -0.648433 106.594 0.248435C123.037 1.1453 138.882 4.13486 153.53 11.0108Z",aspectRatio:{width:211,height:200},width:e,height:t}),blob9:({width:e,height:t})=>Nt({path:"M140.289 20.2182C156.96 27.7956 176.661 32.0895 189.29 43.9608C201.667 55.5796 206.718 75.0283 202.424 91.6987C198.131 108.622 184.491 122.766 175.651 140.952C166.81 158.885 162.769 180.607 150.393 191.216C138.016 201.824 117.052 201.572 98.866 197.025C80.6802 192.479 65.2727 183.891 48.3497 175.808C31.4268 167.726 13.2409 160.148 5.1583 146.761C-2.67172 133.122 -0.398493 113.673 4.14797 96.7504C8.69444 80.08 15.5141 65.6828 23.3442 52.296C31.4268 38.6566 40.5197 25.775 52.6436 15.6717C65.0201 5.82101 80.6802 -1.50385 95.3299 0.264221C109.98 1.77971 123.619 12.6407 140.289 20.2182Z",aspectRatio:{width:204,height:200},width:e,height:t})};function p_(e){return NC[e]||Mm}function g_(e){const{subType:t}=e,r=p_(t);return r?function(n,i){const{width:a,height:l,fill:o,stroke:u,strokeWidth:d,dash:f}=n,v=(f||[]).map(E=>E*d);let g=i(n),c=1,y=1;typeof g!="string"&&(c=g.scaleX,y=g.scaleY,g=g.path);const x=`clip-${n.id||Math.random()}`;return`
|
|
280
|
+
`);const d_=(e,t,r,n,i=0,a=!1)=>{const l=Math.floor(Math.max(e.width*n,1)),o=Math.floor(Math.max(e.height*n,1)),u=Math.min(i*n,l/2,o/2),d=Math.max(e.width/r.width,e.height/r.height)*n,f=e.page._exportingOrRendering&&gi.imageDownScalingEnabled&&d<1&&!a,v=r.x===0&&r.y===0&&r.width===t?.width&&r.height===t?.height,g=ce.useMemo(()=>{if(t&&t.width&&t.height)return v&&u===0&&!f?void 0:dp()},[t,u,f,v]),c=()=>{if(!g||!t)return;g.width=l,g.height=o;const y=g.getContext("2d");if(!y)return;u&&(y.beginPath(),y.moveTo(u,0),y.lineTo(l-u,0),y.arc(l-u,u,u,3*Math.PI/2,0,!1),y.lineTo(l,o-u),y.arc(l-u,o-u,u,0,Math.PI/2,!1),y.lineTo(u,o),y.arc(u,o-u,u,Math.PI/2,Math.PI,!1),y.lineTo(0,u),y.arc(u,u,u,Math.PI,3*Math.PI/2,!1),y.clip());const x=f?function(S,b){var w,_;const A=dp();A.width=S.width,A.height=S.height,(w=A.getContext("2d"))===null||w===void 0||w.drawImage(S,0,0,A.width,A.height);const M=function(O,L,R,T,k,C,q){for(var G=new ImageData(L,R),J=new Int32Array(O.data.buffer),ae=O.width,H=new Int32Array(G.data.buffer),V=G.width,Y=L/C,U=R/q,D=Math.round(1/Y),j=Math.round(1/U),z=D*j,Z=0;Z<G.height;Z++)for(var re=0;re<V;re++){for(var W=0+Math.round(re/Y)+(0+Math.round(Z/U))*ae,Q=0,se=0,ue=0,le=0,ye=0;ye<j;ye++)for(var Re=0;Re<D;Re++){var Me=J[W+Re+ye*ae];Q+=Me<<24>>>24,se+=Me<<16>>>24,ue+=Me<<8>>>24,le+=Me>>>24}Q=Math.round(Q/z),se=Math.round(se/z),ue=Math.round(ue/z),le=Math.round(le/z),H[re+Z*V]=le<<24|ue<<16|se<<8|Q}return G}(A.getContext("2d").getImageData(0,0,A.width,A.height),Math.floor(A.width*b),Math.floor(A.height*b),0,0,A.width,A.height);return A.width=Math.floor(A.width*b),A.height=Math.floor(A.height*b),(_=A.getContext("2d"))===null||_===void 0||_.putImageData(M,0,0),A}(t,d):t,E=f?{x:Math.floor(r.x*d),y:Math.floor(r.y*d),width:Math.floor(r.width*d),height:Math.floor(r.height*d)}:r;y.drawImage(x,E.x,E.y,E.width,E.height,0,0,g.width,g.height)};return ce.useLayoutEffect(()=>{c()},[g,e.width,e.height,r.x,r.y,r.width,r.height,i,n,a,e.page._exportingOrRendering,f]),ce.useEffect(()=>()=>{g&&g.nodeName==="CANVAS"&&sr.Util.releaseCanvas(g)},[g]),[g||t,c]},vC=dp(),mC=Yn(({element:e})=>{const t=Math.min(30,e.width/4,e.height/4),r=ce.useRef(null);return ce.useEffect(()=>{const n=r.current;if(!n)return;const i=new sr.Animation(a=>{n.rotate((a?.timeDiff||0)/2)},n.getLayer());return i.start(),()=>{i.stop()}}),ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport},ce.createElement(En,{width:e.width,height:e.height,fill:"rgba(124, 173, 212, 0.8)"}),ce.createElement(mm,{ref:r,x:e.width/2,y:e.height/2,fill:"white",outerRadius:Math.abs(t),innerRadius:Math.max(1,t-5),angle:270}))}),yC=Yn(({element:e})=>{const t=Math.max(10,Math.min(30,e.width/25));return ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport},ce.createElement(En,{width:e.width,height:e.height,fill:"rgba(223, 102, 102, 0.8)"}),ce.createElement(Au,{text:"Can not load the video...",fontSize:t,width:e.width,height:e.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let bC=function(e,t,r){const n=ce.useRef("loading"),i=ce.useRef(null),[a,l]=ce.useState(0),o=ce.useRef(),u=ce.useRef(),d=ce.useRef();return o.current===e&&u.current===t&&d.current===r||(n.current="loading",i.current=void 0,o.current=e,u.current=t,d.current=r),ce.useLayoutEffect(function(){if(e){var f=document.createElement("video");return f.addEventListener("canplay",v),f.addEventListener("error",g),f.crossOrigin=t,f.src=e,f.load(),function(){f.removeEventListener("canplay",v),f.removeEventListener("error",g)}}function v(){n.current="loaded",i.current=f,i.current.currentTime=0,l(Math.random()),i.current.removeEventListener("canplay",v)}function g(c){var y;const x=f.readyState===4,E=f.buffered&&f.buffered.length>0&&f.buffered.end(f.buffered.length-1)/f.duration*100>=100;if(x&&E)return;const S=c.message||((y=f.error)===null||y===void 0?void 0:y.message)||"Unknown error",b=new Error("Video failed to load: "+S);console.error(b),n.current="failed",i.current=void 0,l(Math.random())}},[e,t,r]),[i.current,n.current]};function n4(e){return e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA}const i4=(e,t,r)=>{const n=ce.useRef(),i=()=>{var a;(a=n.current)===null||a===void 0||a.call(n),n.current=void 0};ce.useEffect(()=>i,[]),ce.useLayoutEffect(()=>{const a=t.slice(0,200),l=`video with id ${r} url: ${a}`;e!=="loading"||n.current||(n.current=Rh(l)),e!=="loading"&&i(),e==="failed"&&Sp(l)},[e])},wC=Yn(({element:e,store:t})=>{var r;const[n,i]=ce.useState(!1),a=ce.useRef(null),l=ce.useRef(null),o=t.selectedShapes.indexOf(e)>=0&&e.selectable,[u,d]=ce.useState(!1),[f,v]=bC(e.src,"anonymous"),g=t.activePage===e.page;i4(v,e.src,e.id),f&&(f.width=f.videoWidth,f.height=f.videoHeight,f.playsInline=!0);const c=f||vC;ce.useEffect(()=>{f&&t.history.ignore(()=>{e.set({duration:1e3*f.duration})})},[f]),ce.useEffect(()=>{var le;if(!f)return;const ye=t.animatedElementsIds,Re=(!ye.length||ye.includes(e.id))&&t.isPlaying,Me=g&&(Re||u);if(!Me)return void f.pause();Me&&(f.currentTime=e.startTime*f.duration,f.play());const Pe=new sr.Animation(()=>{ae()},(le=a.current)===null||le===void 0?void 0:le.getLayer());Pe.start();const de=()=>{d(!1),f.currentTime=e.startTime*f.duration},Te=()=>{f.currentTime>=e.endTime*f.duration&&(f.pause(),f.currentTime=e.startTime*f.duration,d(!1))};return f.addEventListener("ended",de),f.addEventListener("timeupdate",Te),()=>{f.pause(),Pe.stop(),f.removeEventListener("ended",de),f.removeEventListener("timeupdate",Te)}},[f,u,t.isPlaying,g]),ce.useEffect(()=>{f&&(f.volume=e.volume)},[f,e.volume]);const y=ce.useRef();ce.useEffect(()=>{const le=Ou(()=>{var ye,Re;if(f){const Me=t.animatedElementsIds;if(Me.length&&!Me.includes(e.id))return;const Pe=e.startTime*f.duration*1e3,de=f.duration*(e.endTime-e.startTime)*1e3,Te=((t.currentTime||e.page.startTime)-e.page.startTime)%de+Pe;if(Math.abs(1e3*f.currentTime-Te)>500||!t.isPlaying){const Ae=Te/1e3;Ae!==f.currentTime&&(f.currentTime=Ae),!n4(f)&&!t.isPlaying&&!y.current&&(y.current=Rh(`video ${e.id}`))}ae(),(Re=(ye=a.current)===null||ye===void 0?void 0:ye.getLayer())===null||Re===void 0||Re.batchDraw()}});return()=>{le(),y.current&&(y.current(),y.current=null)}},[t,f]),ce.useEffect(()=>{if(!f)return;const le=()=>{var Re,Me;!n4(f)&&e.page._exportingOrRendering||y.current&&(ae(),(Me=(Re=a.current)===null||Re===void 0?void 0:Re.getLayer())===null||Me===void 0||Me.batchDraw(),y.current(),y.current=null)};let ye;return e.page._exportingOrRendering&&(ye=setInterval(le,20)),f.addEventListener("timeupdate",le),f.addEventListener("canplay",le),()=>{clearInterval(ye),f.removeEventListener("timeupdate",le),f.removeEventListener("canplay",le)}},[e.page._exportingOrRendering,f,e.id,Rh]);let{cropX:x,cropY:E,cropWidth:S,cropHeight:b}=e;v!=="loaded"&&(x=E=0,S=b=1);const w=c.width*S,_=c.height*b,A=e.width/e.height;let M,O;const L=w/_,R=e.type==="svg";R?(M=w,O=_):A>=L?(M=w,O=w/A):(M=_*A,O=_);const T={x:c.width*x,y:c.height*E,width:M,height:O},k=(r=e.cornerRadius)!==null&&r!==void 0?r:0,[C,q]=d_(e,c,T,t._elementsPixelRatio,k,n||e._cropModeEnabled||e.type==="svg");let[G,J]=((le,ye,Re,Me)=>{const Pe=(xe=>{const[Le,pe]=ce.useState(xe);return ce.useEffect(()=>{(async()=>{const Ce=await async function(je){if(!(je.indexOf("data:image/svg+xml")>=0||je.indexOf(".svg")>=0))return je;const He=await Ap(je),st=Am(He);return $f(st)}(xe);Ce!==Le&&pe(Ce)})()},[xe]),Le})(le.clipSrc||""),[de,Te]=ym(Pe,"anonymous"),Ae=le.clipSrc?Te:"loaded";i4(Ae,le.clipSrc,le.id);const be=ce.useMemo(()=>{if(ye&&de)return dp()},[ye,de]);function _e(){var xe;if(!de||!ye||!ye.width||!ye.height||!de||!de.width||!de.height||!be)return;const Le=dp(),pe=Math.max(le.width/de.width*Re,le.height/de.height*Re);Le.width=de.width*pe,Le.height=de.height*pe,(xe=Le.getContext("2d"))===null||xe===void 0||xe.drawImage(de,0,0,Le.width,Le.height),be.width=Math.max(ye.width,1),be.height=Math.max(ye.height,1);const Ce=be.getContext("2d");Ce&&(Ce.save(),Ce.drawImage(Le,0,0,ye.width,ye.height),sr.Util.releaseCanvas(Le),Ce.globalCompositeOperation="source-in",Ce.drawImage(ye,0,0,be.width,be.height),Ce.restore())}return ce.useLayoutEffect(()=>{_e()},[be,ye,de,le.width,le.height,Re,...Me]),[le.clipSrc&&de?be:ye,_e]})(e,C,t._elementsPixelRatio,[T,k,t._elementsPixelRatio]);function ae(){q(),J()}const H=Math.max(e.width/M,e.height/O);ce.useEffect(()=>{var le;if(!e._cropModeEnabled)return;const ye=(le=a.current)===null||le===void 0?void 0:le.getStage();function Re(Pe){e._cropModeEnabled&&Pe.target!==l.current&&e.toggleCropMode(!1)}function Me(Pe){e._cropModeEnabled&&Pe.target.parentNode!==ye.content&&e.toggleCropMode(!1)}return document.body.addEventListener("click",Me),ye?.on("click",Re),ye?.on("tap",Re),()=>{document.body.removeEventListener("click",Me),document.body.removeEventListener("touchstart",Me),ye?.off("click",Re),ye?.off("click",Re)}},[e._cropModeEnabled]),ce.useLayoutEffect(()=>{if(!n&&!e._cropModeEnabled)return _s(a.current,e),Ou(()=>{_s(a.current,e)},{delay:100})},[c,n,S,b,e._cropModeEnabled]),ce.useLayoutEffect(()=>{var le;n||e._cropModeEnabled?(le=a.current)===null||le===void 0||le.clearCache():_s(a.current,e)},[n,e.width,e.height,e._cropModeEnabled]),ce.useEffect(()=>{_s(a.current,e)},[e.shadowEnabled,e.shadowBlur,e.cornerRadius,e.shadowColor,e.shadowOffsetX,e.shadowOffsetY,e.shadowOpacity]);const V=ce.useRef(null),Y=ce.useRef(null),U=ce.useRef(null);ce.useLayoutEffect(()=>{e._cropModeEnabled&&(Y.current.nodes([V.current]),U.current.nodes([l.current]))},[e._cropModeEnabled]);const D=le=>{Math.round(le.target.x())>0&&(le.target.x(0),le.target.scaleX(1)),Math.round(le.target.y())>0&&(le.target.y(0),le.target.scaleY(1));const ye=le.target.width()*le.target.scaleX(),Re=le.target.height()*le.target.scaleY(),Me=Math.min(1,M/ye),Pe=Math.min(1,O/Re),de=1-Me,Te=Math.min(de,Math.max(0,Math.round(-le.target.x())/ye)),Ae=1-Pe,be=Math.min(Ae,Math.max(0,Math.round(-le.target.y())/Re));le.target.setAttrs({x:-Te*c.width,y:-be*c.height,scaleX:1,scaleY:1}),e.set({cropX:Te,cropY:be,cropWidth:Me,cropHeight:Pe})},j=()=>{e.type!=="svg"&&e.contentEditable&&setTimeout(()=>{e.toggleCropMode(!0)})},z=v==="loading",Z=v==="failed",re=!z&&!Z,W=ce.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),Q=re?e.a.opacity:0;xp(a,Q);const se=e.selectable||t.role==="admin",ue=lf();return ce.createElement(ce.Fragment,null,z&&ce.createElement(mC,{element:e}),Z&&ce.createElement(yC,{element:e}),ce.createElement(bu,{ref:a,name:"element",id:e.id,image:G,x:e.a.x,y:e.a.y,width:e.a.width||1,height:e.a.height||1,rotation:e.a.rotation,opacity:Q,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,customCrop:T,listening:se,draggable:ue?e.draggable&&o:e.draggable,preventDefault:!ue||o,hideInExport:!e.showInExport,onDragMove:le=>{e.set({x:le.target.x(),y:le.target.y()})},onDragEnd:le=>{e.set({x:le.target.x(),y:le.target.y()})},onDblClick:j,onDblTap:j,onTransformStart:()=>{i(!0),W.current={cropX:e.cropX,cropY:e.cropY,cropWidth:e.cropWidth,cropHeight:e.cropHeight}},onTransform:le=>{var ye;const Re=le.currentTarget,Me=Math.abs(Re.scaleX()-1)<1e-7?1:Re.scaleX(),Pe=Math.abs(Re.scaleY()-1)<1e-7?1:Re.scaleY();Re.scaleX(1),Re.scaleY(1);const de=(ye=le.target.getStage())===null||ye===void 0?void 0:ye.findOne("Transformer"),Te=1-M/c.width,Ae=Math.min(Te,Math.max(0,e.cropX)),be=1-O/c.height,_e=Math.min(be,Math.max(0,e.cropY)),xe=de.getActiveAnchor(),Le=!(xe.indexOf("middle")>=0||xe.indexOf("center")>=0),pe=!Le&&Me<1&&W.current.cropHeight>O/c.height;let Ce=Le?e.cropWidth:e.cropWidth*Me;pe&&(Ce=e.cropWidth);const je=!Le&&Pe<1&&W.current.cropWidth>M/c.width;let He=Le?e.cropHeight:e.cropHeight*Pe;je&&(He=e.cropHeight),R&&(Ce=e.cropWidth,He=e.cropHeight),e.set({cropX:Ae,cropY:_e,x:Re.x(),y:Re.y(),width:Re.width()*Me,height:Re.height()*Pe,rotation:le.target.rotation(),cropWidth:Math.min(Ce,1-Ae),cropHeight:Math.min(He,1-_e)})},onTransformEnd:le=>{const ye=le.currentTarget;e.set({width:ye.width(),height:ye.height(),x:ye.x(),y:ye.y(),rotation:le.target.rotation(),cropWidth:M/c.width,cropHeight:O/c.height}),i(!1)}}),ce.createElement(En,{x:e.a.x,y:e.a.y,width:Math.max(e.a.width-e.borderSize,0),height:Math.max(e.a.height-e.borderSize,0),opacity:Q,offsetX:-e.borderSize/2,offsetY:-e.borderSize/2,stroke:e.borderColor,strokeWidth:e.borderSize,listening:!1,visible:!!e.borderSize,rotation:e.rotation,cornerRadius:Math.max(0,k-e.borderSize),hideInExport:!e.showInExport}),!t.isPlaying&&ce.createElement(bu,{image:u?h_:f_,x:e.a.x,y:e.a.y,offsetX:-e.a.width/2+15/t.scale,offsetY:-e.a.height/2+15/t.scale,rotation:e.a.rotation,width:30/t.scale,height:30/t.scale,hideInExport:!0,onClick:()=>d(!u),onTap:()=>d(!u)}),e._cropModeEnabled&&ce.createElement(bm,{selector:".page-abs-container",enabled:!0},ce.createElement(En,{x:-window.innerWidth/t.scale,y:-window.innerWidth/t.scale,width:window.innerWidth/t.scale*3,height:window.innerWidth/t.scale*3,fill:"rgba(0,0,0,0.3)"}),ce.createElement(bu,{listening:!1,image:G,x:e.a.x,y:e.a.y,width:e.a.width,height:e.a.height,rotation:e.a.rotation,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur}),ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,scaleX:H,scaleY:H},ce.createElement(bu,{image:c,ref:l,opacity:.4,draggable:!0,x:-e.cropX*c.width,y:-e.cropY*c.height,onDragMove:D,onTransform:D}),ce.createElement(lp,{ref:U,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(le,ye)=>ye.width<5||ye.height<5?le:ye,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),ce.createElement(En,{width:M,height:O,ref:V,listening:!1,onTransform:le=>{le.target.x()<-e.cropX*c.width-1e-9&&(le.target.x(-e.cropX*c.width),le.target.scaleX(1)),le.target.y()<-e.cropY*c.height-1e-9&&(le.target.y(-e.cropY*c.height),le.target.scaleY(1));const ye=Math.min(1,Math.max(0,e.cropX+le.target.x()/c.width)),Re=Math.min(1,Math.max(0,le.target.y()/c.height+e.cropY)),Me=le.target.width()*le.target.scaleX(),Pe=le.target.height()*le.target.scaleY(),de=Math.min(1-ye,Me/c.width),Te=Math.min(1-Re,Pe/c.height),Ae=le.target.getAbsolutePosition(le.target.getParent().getParent());le.target.scale({x:1,y:1}),le.target.position({x:0,y:0}),e.set({x:Ae.x,y:Ae.y,cropX:ye,cropY:Re,cropWidth:de,cropHeight:Te,width:Math.min(Me*H,c.width*(1-ye)*H),height:Math.min(Pe*H,c.height*(1-Re)*H)})}}),ce.createElement(lp,{ref:Y,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(le,ye)=>ye.width<5||ye.height<5?le:ye,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2,visible:e.resizable}))))}),Mm=({width:e,height:t,cornerRadius:r})=>{if(r>0){const n=Math.min(r,e/2,t/2);return`M 0 ${n} A ${n} ${n} 0 0 1 ${n} 0 L ${e-n} 0 A ${n} ${n} 0 0 1 ${e} ${n} L ${e} ${t-n} A ${n} ${n} 0 0 1 ${e-n} ${t} L ${n} ${t} A ${n} ${n} 0 0 1 0 ${t-n} Z`}return`M 0 0 L ${e} 0 L ${e} ${t} L 0 ${t} Z`},_C=({width:e,height:t})=>`M ${e/2} 0 L ${e} ${t} L 0 ${t} Z`,xC=({width:e,height:t})=>`M 0 0 L ${e} 0 L 0 ${t} Z`,SC=({width:e,height:t})=>`M ${e/2} ${t/2} m -${e/2}, 0 a ${e/2},${t/2} 0 1,0 ${e},0 a ${e/2},${t/2} 0 1,0 -${e},0`;function EC({width:e,height:t}){const r=e/2,n=t/2,i=e/2,a=t/2,l=i/2,o=a/2;let u="",d=Math.PI/5;for(let f=0;f<10;f++){const v=f%2==0?a:o,g=r+(f%2==0?i:l)*Math.sin(f*d),c=n-v*Math.cos(f*d);f===0?u=`M ${g} ${c}`:u+=` L ${g} ${c}`}return u+" Z"}function AC({width:e,height:t}){const r=e/2,n=t/2;return`M ${r} 0 L ${e} ${n} L ${r} ${t} L 0 ${n} Z`}function PC({width:e,height:t}){const r=e/2,n=t/2,i=e/2,a=t/2;let l="",o=2*Math.PI/5;for(let u=0;u<5;u++){const d=a,f=r+i*Math.sin(u*o),v=n-d*Math.cos(u*o);u===0?l=`M ${f} ${v}`:l+=` L ${f} ${v}`}return l+" Z"}function kC({width:e,height:t}){const r=e/2,n=t/2,i=e/2,a=t/2;let l="",o=2*Math.PI/6;for(let u=0;u<6;u++){const d=a,f=r+i*Math.sin(u*o),v=n-d*Math.cos(u*o);u===0?l=`M ${f} ${v}`:l+=` L ${f} ${v}`}return l+" Z"}function Nt({path:e,aspectRatio:t,width:r,height:n}){return{path:e,scaleX:r/t.width,scaleY:n/t.height}}function OC({width:e,height:t}){const r=.1*Math.min(e,t),n=.2*e,i=.2*t,a=.5*e;let l=`M ${r},0`;return l+=" H "+(e-r),l+=` A ${r},${r} 0 0 1 ${e},${r}`,l+=" V "+(t-r-i),l+=` A ${r},${r} 0 0 1 ${e-r},${t-i}`,l+=` H ${a+n/2}`,l+=` L ${a},${t}`,l+=` L ${a-n/2},${t-i}`,l+=` H ${r}`,l+=` A ${r},${r} 0 0 1 0,${t-r-i}`,l+=` V ${r}`,l+=` A ${r},${r} 0 0 1 ${r},0`,l+=" Z",l}function CC({width:e,height:t}){const r=.3*e,n=.3*t,i=e/2,a=t/2,l=i-r/2,o=i+r/2,u=a-n/2,d=a+n/2;let f=`M ${l},0 `;return f+=`H ${o} `,f+=`V ${u} `,f+=`H ${e} `,f+=`V ${d} `,f+=`H ${o} `,f+=`V ${t} `,f+=`H ${l} `,f+=`V ${d} `,f+="H 0 ",f+=`V ${u} `,f+=`H ${l} `,f+="V 0 ",f+="Z",f}const NC={rect:Mm,circle:SC,star:EC,triangle:_C,rightTriangle:xC,diamond:AC,pentagon:PC,hexagon:kC,speechBubble:OC,cross:CC,arc:({width:e,height:t})=>Nt({path:"M234 117C234 85.97 221.673 56.21 199.731 34.269C177.79 12.327 148.03 0 117 0C85.97 0 56.2103 12.327 34.2685 34.268C12.3268 56.21 0 85.97 0 117H117H234Z",aspectRatio:{width:234,height:117},width:e,height:t}),cloud:({width:e,height:t})=>Nt({path:"M216.41 57.006C216.961 54.084 217.249 51.069 217.249 47.986C217.249 21.4841 195.972 0 169.725 0C153.666 0 139.467 8.043 130.865 20.3575C122.606 13.3566 111.954 9.1402 100.327 9.1402C74.3322 9.1402 53.2123 30.2136 52.8094 56.364H52.8035C23.6407 56.364 0 80.235 0 109.682C0 139.129 23.6407 163 52.8035 163H208.197C237.359 163 261 139.129 261 109.682C261 83.056 241.672 60.99 216.41 57.006Z",aspectRatio:{width:261,height:163},width:e,height:t}),rightArrow:({width:e,height:t})=>{const r=.6*e;return`M 0 ${t/4} L ${r} ${t/4} L ${r} 0 L ${e} ${t/2} L ${r} ${t} L ${r} ${.75*t} L 0 ${.75*t} Z`},leftArrow:({width:e,height:t})=>{const r=.4*e;return`M ${e} ${t/4} L ${r} ${t/4} L ${r} 0 L 0 ${t/2} L ${r} ${t} L ${r} ${.75*t} L ${e} ${.75*t} Z`},downArrow:({width:e,height:t})=>{const r=.6*t;return`M ${e/4} 0 L ${e/4} ${r} L 0 ${r} L ${e/2} ${t} L ${e} ${r} L ${.75*e} ${r} L ${.75*e} 0 Z`},upArrow:({width:e,height:t})=>{const r=.4*t;return`M ${e/4} ${t} L ${e/4} ${r} L 0 ${r} L ${e/2} 0 L ${e} ${r} L ${.75*e} ${r} L ${.75*e} ${t} Z`},asterisk1:({width:e,height:t})=>Nt({path:"M45.5265 218.498C51.5466 222.87 58.5359 224.98 65.4742 224.98C75.916 224.98 86.221 220.2 92.853 211.217C92.872 211.198 92.89 211.178 92.907 211.157C92.923 211.136 92.939 211.115 92.954 211.094L92.977 211.061C92.993 211.039 93.008 211.017 93.023 210.996L116.491 178.725L139.959 210.996C139.982 211.031 140.006 211.058 140.029 211.088C140.04 211.102 140.05 211.116 140.061 211.132C151.115 226.188 172.355 229.505 187.473 218.515C202.608 207.526 205.992 186.278 195.074 171.104L195.05 171.066C195.03 171.034 195.014 171.01 194.989 170.985L171.572 138.696L209.512 126.346C227.334 120.545 237.129 101.305 231.33 83.476C225.532 65.648 206.315 55.8493 188.476 61.6334L150.537 73.933L150.52 34.0064C150.502 15.2594 135.248 0 116.508 0C97.768 0 82.514 15.2594 82.497 34.0234L82.463 73.916L44.5233 61.6163C44.5083 61.6163 44.49 61.613 44.4716 61.6078C44.4477 61.6014 44.4232 61.5918 44.4041 61.5823C26.5992 55.8664 7.45076 65.665 1.66886 83.46C-4.11314 101.254 5.61427 120.426 23.3511 126.278C23.3675 126.283 23.3822 126.289 23.3963 126.295L23.4588 126.319L23.4873 126.329L61.4098 138.679L37.9929 170.968C37.9844 170.985 37.9718 171.002 37.9591 171.019C37.9462 171.036 37.9336 171.053 37.9251 171.07C26.9903 186.244 30.3915 207.509 45.5265 218.498Z",aspectRatio:{width:233,height:225},width:e,height:t}),asterisk2:({width:e,height:t})=>Nt({path:"M46.0556 112L0 85.388L33.9456 26.6121L80.028 53.1781L80.054 0H147.946L147.972 53.1781L194.054 26.6121L228 85.388L181.944 112L228 138.612L194.054 197.388L147.972 170.822L147.946 224H80.054L80.028 170.822L33.9456 197.388L0 138.612L46.0556 112Z",aspectRatio:{width:228,height:224},width:e,height:t}),bookmark:({width:e,height:t})=>Nt({path:"M0 0H199V238L99.5 142.8L0 238V0Z",aspectRatio:{width:199,height:238},width:e,height:t}),butterfly:({width:e,height:t})=>Nt({path:"M94.5 100.713C91.935 150.916 50.703 190.909 0 191.493V0C50.703 0.5845 91.935 40.5767 94.5 90.78C97.031 41.2385 137.217 1.6407 187 0.0438004V191.45C137.217 189.853 97.031 150.255 94.5 100.713Z",aspectRatio:{width:187,height:192},width:e,height:t}),cylinder:({width:e,height:t})=>Nt({path:"M169 36.8497V218.15C169 238.502 131.168 255 84.5 255C37.832 255 0 238.502 0 218.15V36.8497C0 16.4982 37.832 0 84.5 0C131.168 0 169 16.4982 169 36.8497Z",aspectRatio:{width:169,height:255},width:e,height:t}),diamond2:({width:e,height:t})=>Nt({path:"M0 55.5L124 185L248 55.5L189.307 0H58.6933L0 55.5Z",aspectRatio:{width:248,height:185},width:e,height:t}),door:({width:e,height:t})=>Nt({path:"M140 69.697C140 31.2044 108.66 0 70 0C31.34 0 0 31.2044 0 69.697V207H140V69.697Z",aspectRatio:{width:140,height:207},width:e,height:t}),drop1:({width:e,height:t})=>Nt({path:"M167 150.687C167 196.328 129.407 234 83.139 234C37.593 234 0 196.328 0 150.687C0 100.7 51.329 36.9474 83.139 0C114.948 39.1207 167 98.526 167 150.687Z",aspectRatio:{width:167,height:234},width:e,height:t}),drop2:({width:e,height:t})=>Nt({path:"M73 239C53.64 239 35.071 231.315 21.3812 217.634C7.691 203.954 0 185.4 0 166.054C0 136.091 13.8696 113.633 30.768 86.27C43.912 64.9877 58.888 40.7377 70.597 7.6816C71.281 5.7496 72.989 0 72.989 0C72.989 0 72.993 0.0124998 73 0.0363998C73.007 0.0124998 73.011 0 73.011 0C73.011 0 74.719 5.7496 75.403 7.6816C87.112 40.7377 102.088 64.9877 115.232 86.27C132.13 113.633 146 136.091 146 166.054C146 185.4 138.309 203.954 124.619 217.634C111.025 231.218 92.225 239 73 239Z",aspectRatio:{width:146,height:239},width:e,height:t}),explosion:({width:e,height:t})=>Nt({path:"M165.802 184.465L118.997 260L125.343 182.079L34.9058 219.45L99.164 159.817L0 163.792L78.538 134.373L0 74.7401L86.471 89.052V0L118.997 89.052L165.802 10.3364L149.143 97.798L217.368 29.419L165.802 112.905L245.927 81.101L165.802 143.914H261L165.802 184.465Z",aspectRatio:{width:261,height:260},width:e,height:t}),flag:({width:e,height:t})=>Nt({path:"M0 142.161C0 142.161 51.9956 118.626 103 137.469C159.992 158.525 206 141.31 206 141.31V11.1373C206 11.1373 160 28.3218 103.016 7.28273C52 -11.553 0 12.0974 0 12.0974V142.161Z",aspectRatio:{width:206,height:148},width:e,height:t}),flower:({width:e,height:t})=>Nt({path:"M135.351 66.1893C196.683 -5.00591 256.536 100.304 164.908 117.361C256.536 135.16 195.944 239.728 135.351 168.532C166.386 257.526 45.9394 256.785 76.975 168.532C15.643 239.728 -44.2109 135.16 47.4173 117.361C-44.9498 100.304 15.643 -4.26431 76.975 66.1893C45.2005 -22.0631 166.386 -22.0631 135.351 66.1893ZM105.793 104.012C113.183 104.012 119.833 109.945 119.833 117.361C119.833 124.777 113.183 131.452 105.793 131.452C98.404 131.452 92.492 124.777 92.492 117.361C92.492 109.945 98.404 104.012 105.793 104.012Z",aspectRatio:{width:212,height:235},width:e,height:t}),frame:({width:e,height:t})=>Nt({path:"M0 0H240L200 88L240 176H0L40 88L0 0Z",aspectRatio:{width:240,height:176},width:e,height:t}),heart1:({width:e,height:t})=>Nt({path:"M215.886 56.157C215.886 24.729 191.112 0 160.584 0C135.933 0 115.08 16.983 107.937 39.93C100.788 16.986 79.935 0.591 55.284 0.591C24.75 0.591 0 24.615 0 56.055C0 71.919 6.321 83.127 16.494 95.121L107.988 189.447L199.377 95.121C209.559 83.127 215.886 72.009 215.886 56.157Z",aspectRatio:{width:216,height:190},width:e,height:t}),home:({width:e,height:t})=>Nt({path:"M0 62.143L95.5 0L191 62.143V195H0V62.143Z",aspectRatio:{width:191,height:195},width:e,height:t}),home2:({width:e,height:t})=>Nt({path:"M206 94.076L103 0L0 94.076H31.2377V189H175.607V94.076H206Z",aspectRatio:{width:206,height:189},width:e,height:t}),hourglass:({width:e,height:t})=>Nt({path:"M0.392782 0H187.607C193.014 43.3688 140.804 53.797 140.804 97.5C140.804 141.203 193.014 151.631 187.607 195H0.392782C-5.01452 151.631 47.196 141.203 47.196 97.5C47.196 53.797 -5.01452 43.3688 0.392782 0Z",aspectRatio:{width:188,height:195},width:e,height:t}),house:({width:e,height:t})=>Nt({path:"M0 92.367L95 0L190 92.367V223H0V92.367Z",aspectRatio:{width:190,height:223},width:e,height:t}),keyhole:({width:e,height:t})=>Nt({path:"M115 57.0494C115 25.5387 89.416 0 57.863 0C26.311 0 0.726898 25.5414 0.726898 57.0494C0.726898 78.652 12.759 97.451 30.505 107.136L0 219H114.845L84.448 107.524C102.608 97.962 115 78.959 115 57.0494Z",aspectRatio:{width:115,height:219},width:e,height:t}),kiss:({width:e,height:t})=>Nt({path:"M124.5 17.1468C80.036 -36.5162 0 52.9218 0 52.9218C0 52.9218 44.4643 120 124.5 120C204.536 120 249 52.9218 249 52.9218C249 52.9218 168.964 -36.5162 124.5 17.1468Z",aspectRatio:{width:249,height:120},width:e,height:t}),leaf:({width:e,height:t})=>Nt({path:"M204.414 0.0151567C204.414 0.0151567 206.837 93.9509 150.394 150.394C93.9507 206.837 0.0151569 204.413 0.0151569 204.413C0.0151569 204.413 -2.40835 110.478 54.0347 54.0349C110.478 -2.40834 204.414 0.0151567 204.414 0.0151567Z",aspectRatio:{width:205,height:205},width:e,height:t}),lightning1:({width:e,height:t})=>Nt({path:"M111.5 0L0 142H51.433L31.5 253L143 111H91.567L111.5 0Z",aspectRatio:{width:143,height:253},width:e,height:t}),lightning2:({width:e,height:t})=>Nt({path:"M126 0H43L0 120.531H36L6 227L110 80.354H73L126 0Z",aspectRatio:{width:126,height:227},width:e,height:t}),magnet:({width:e,height:t})=>Nt({path:"M88.402 0H0V67.669H88.402C105.271 67.669 118.957 81.308 118.957 98C118.957 114.689 105.271 128.331 88.402 128.331H0V196H88.402C142.747 196 187 152.072 187 98C187 43.9279 142.747 0 88.402 0Z",aspectRatio:{width:187,height:196},width:e,height:t}),mithosis:({width:e,height:t})=>Nt({path:"M150.996 136.45C137.141 128.926 117.559 128.7 103.532 135.896C93.843 140.867 82.875 143.67 71.2577 143.67C31.9033 143.67 0 111.508 0 71.835C0 32.161 31.9033 0 71.2577 0C83.467 0 94.959 3.0955 105.004 8.5504C118.859 16.0745 138.441 16.3 152.467 9.1038C162.157 4.1328 173.125 1.3303 184.742 1.3303C224.097 1.3303 256 33.492 256 73.165C256 112.839 224.097 145 184.742 145C172.533 145 161.041 141.905 150.996 136.45Z",aspectRatio:{width:256,height:145},width:e,height:t}),orangeRicky:({width:e,height:t})=>Nt({path:"M69 0H0V69V138V207H69H138V138H69V69V0Z",aspectRatio:{width:138,height:207},width:e,height:t}),party:({width:e,height:t})=>Nt({path:"M134.622 0L144.682 68.2539L174.415 5.9977L163.91 74.1846L210.671 23.4578L180.535 85.519L240.169 50.8289L193.079 101.25L260.29 85.679L200.43 119.98L269.245 124.911L201.934 140.044L266.237 165.04L197.456 159.661L251.535 202.5L187.396 177.086L226.445 233.962L172.646 190.771L193.197 256.631L154.518 199.501L154.743 268.492L134.622 202.5L114.501 268.492L114.727 199.501L76.0482 256.631L96.5985 190.771L42.7992 233.962L81.8489 177.086L17.7091 202.5L71.7885 159.661L3.0072 165.04L67.3112 140.044L0 124.911L68.8149 119.98L8.9545 85.679L76.1658 101.25L29.0753 50.8289L88.7105 85.519L58.5743 23.4578L105.335 74.1846L94.8305 5.9977L124.562 68.2539L134.622 0Z",aspectRatio:{width:270,height:269},width:e,height:t}),pillow:({width:e,height:t})=>Nt({path:"M176 0.00169945C157.812 16.9062 125.203 28.174 88.001 28.174C50.798 28.174 18.1881 16.9054 0 0V258.421C18.1882 241.516 50.798 230.248 88 230.248C125.202 230.248 157.812 241.516 176 258.421V0.00169945Z",aspectRatio:{width:176,height:259},width:e,height:t}),polygon:({width:e,height:t})=>Nt({path:"M110 0L219.119 63V189L110 252L0.880798 189V63L110 0Z",aspectRatio:{width:220,height:252},width:e,height:t}),rainbow:({width:e,height:t})=>Nt({path:"M186.907 141H282C282 63.128 218.872 0 141 0C63.1278 0 0 63.128 0 141H95.093C95.093 115.646 115.646 95.093 141 95.093C166.354 95.093 186.907 115.646 186.907 141Z",aspectRatio:{width:282,height:141},width:e,height:t}),rhodeIsland:({width:e,height:t})=>Nt({path:"M69 0H0V69V138H69V207H138V138V69H69V0Z",aspectRatio:{width:138,height:207},width:e,height:t}),shell:({width:e,height:t})=>Nt({path:"M109 0C169.199 0 218 48.743 218 108.87C185.392 108.87 158.958 135.273 158.958 167.842C158.958 179.736 158.958 191 158.958 191H59.042C59.042 191 59.042 179.736 59.042 167.842C59.042 135.273 32.6077 108.87 0 108.87C0 48.743 48.8007 0 109 0Z",aspectRatio:{width:218,height:191},width:e,height:t}),shield1:({width:e,height:t})=>Nt({path:"M203.184 30.7277C142.457 30.7277 102.853 0 102.853 0C102.853 0 63.249 30.7277 3.05098 30.7277C3.05098 30.7277 -3.81372 128.209 3.05098 162.115C9.38758 193.902 102.853 249 102.853 249C102.853 249 196.319 193.902 203.184 162.115C209.52 128.738 203.184 30.7277 203.184 30.7277Z",aspectRatio:{width:206,height:249},width:e,height:t}),shield2:({width:e,height:t})=>Nt({path:"M0 12.9585C64.624 -4.3195 136.376 -4.3195 201 12.9585C201 51.0564 201 89.154 201 127.252C201 184.396 100.498 240 100.498 240C100.498 240 0 184.406 0 127.252C0 89.154 0 51.0564 0 12.9585Z",aspectRatio:{width:201,height:240},width:e,height:t}),skewedRectangle:({width:e,height:t})=>Nt({path:"M85.9799 0H290L204.02 141H0L85.9799 0Z",aspectRatio:{width:290,height:141},width:e,height:t}),softFlower:({width:e,height:t})=>Nt({path:"M109 0C80.073 0 56.6234 23.4498 56.6234 52.3766C56.6234 54.722 54.722 56.6234 52.3766 56.6234C23.4498 56.6234 0 80.073 0 109C0 137.927 23.4498 161.377 52.3766 161.377C54.722 161.377 56.6234 163.278 56.6234 165.623C56.6234 194.55 80.073 218 109 218C137.927 218 161.377 194.55 161.377 165.623C161.377 163.278 163.278 161.377 165.623 161.377C194.55 161.377 218 137.927 218 109C218 80.073 194.55 56.6234 165.623 56.6234C163.278 56.6234 161.377 54.722 161.377 52.3766C161.377 23.4498 137.927 0 109 0Z",aspectRatio:{width:218,height:218},width:e,height:t}),softStar:({width:e,height:t})=>Nt({path:"M130.424 3.17662C130.927 -1.05888 137.073 -1.05888 137.576 3.17662L141.792 38.7086C147.236 84.59 183.41 120.764 229.291 126.208L264.823 130.424C269.059 130.927 269.059 137.073 264.823 137.576L229.291 141.792C183.41 147.236 147.236 183.41 141.792 229.291L137.576 264.823C137.073 269.059 130.927 269.059 130.424 264.823L126.208 229.291C120.764 183.41 84.59 147.236 38.7086 141.792L3.17662 137.576C-1.05888 137.073 -1.05888 130.927 3.17662 130.424L38.7086 126.208C84.59 120.764 120.764 84.59 126.208 38.7086L130.424 3.17662Z",aspectRatio:{width:268,height:268},width:e,height:t}),stairs1:({width:e,height:t})=>Nt({path:"M0 0H67.667V67.667H135.333V135.333H203V203H0V0Z",aspectRatio:{width:203,height:203},width:e,height:t}),stairs2:({width:e,height:t})=>Nt({path:"M50 0H0V200H200V150H150V100H100V50H50V0Z",aspectRatio:{width:200,height:200},width:e,height:t}),teewee:({width:e,height:t})=>Nt({path:"M69 0H138V69H207V138H138H69H0V69H69V0Z",aspectRatio:{width:207,height:138},width:e,height:t}),blob1:({width:e,height:t})=>Nt({path:"M172.979 19.611C191.285 33.0858 204.505 54.442 210.861 78.5949C217.471 103.002 217.471 130.46 205.776 151.816C194.335 173.427 171.454 189.444 147.047 196.054C122.639 202.919 96.7069 200.631 75.3506 190.715C54.2486 180.546 37.7229 163.003 23.4855 142.155C9.5022 121.307 -2.19289 97.4087 0.349524 74.7813C3.14617 52.1538 19.9261 30.7976 40.2654 17.8313C60.6046 4.61077 84.5033 -0.474048 108.148 0.0344341C131.538 0.542916 154.928 6.13621 172.979 19.611Z",aspectRatio:{width:216,height:200},width:e,height:t}),blob10:({width:e,height:t})=>Nt({path:"M188.684 8.95173C205.601 24.3309 200.988 63.0866 191.453 99.3816C182.225 135.677 168.076 169.511 146.238 175.355C124.399 181.507 94.871 159.668 66.5733 143.059C37.9679 126.449 10.5929 115.068 2.59569 95.0754C-5.4015 75.0824 5.97912 46.1694 24.4342 30.4826C42.8893 14.7958 68.4188 12.0276 100.715 6.79864C132.704 1.5697 171.767 -6.42749 188.684 8.95173Z",aspectRatio:{width:200,height:177},width:e,height:t}),blob11:({width:e,height:t})=>Nt({path:"M137.368 29.4923C148.97 46.7605 146.542 72.1231 148.161 99.1046C149.779 126.086 155.715 154.956 144.113 174.383C132.781 193.81 103.911 203.793 80.4369 198.666C56.963 193.27 38.6156 173.034 28.3626 153.607C17.8398 134.181 15.4115 115.833 9.47555 91.5498C3.53961 67.2664 -5.63411 37.3169 4.61887 20.0488C15.1417 2.51078 45.0911 -1.80626 72.8821 0.622074C100.673 2.78059 126.036 12.2241 137.368 29.4923Z",aspectRatio:{width:152,height:200},width:e,height:t}),blob12:({width:e,height:t})=>Nt({path:"M158.391 17.923C172.491 28.5703 180.261 48.1384 187.743 70.5842C194.937 93.3177 202.419 118.641 194.649 138.785C187.167 158.928 164.146 173.317 138.535 184.54C112.923 196.05 84.4347 204.108 58.8235 197.777C33.2123 191.446 10.191 170.439 2.99688 146.267C-4.48504 121.807 3.57241 94.181 10.4788 68.282C17.0974 42.0953 22.565 17.6352 37.8166 7.27563C53.0682 -3.37171 78.1038 0.081487 100.837 2.67138C123.859 5.26127 144.29 7.27563 158.391 17.923Z",aspectRatio:{width:198,height:200},width:e,height:t}),blob13:({width:e,height:t})=>Nt({path:"M149.668 1.37595C170.663 5.22017 193.728 17.3442 198.755 34.7911C204.078 52.2379 191.363 75.3032 178.943 93.9329C166.819 112.563 154.99 126.757 140.501 145.386C126.011 164.312 108.86 187.673 92.5957 186.194C76.3317 185.011 60.9549 159.285 45.8737 140.655C30.4968 122.321 15.7114 110.788 7.43151 95.1157C-0.848339 79.4432 -2.32688 59.0392 3.5873 41.5924C9.50148 23.8498 23.1041 8.76868 38.7767 3.44592C54.745 -1.87685 73.3746 2.55879 91.7086 2.26308C110.338 2.26308 128.968 -2.17256 149.668 1.37595Z",aspectRatio:{width:200,height:187},width:e,height:t}),blob14:({width:e,height:t})=>Nt({path:"M137.838 28.6426C150.711 40.5617 165.014 46.5213 178.363 58.2021C191.474 69.8828 203.87 87.0464 198.864 99.6807C193.858 112.315 171.689 120.42 157.862 135.676C144.275 151.171 139.269 173.579 126.873 182.161C114.477 190.505 94.9294 185.022 76.8123 178.109C58.4568 171.196 41.5316 163.091 28.1822 150.456C14.5943 137.822 4.58225 120.42 1.24488 101.826C-2.09248 83.2322 1.00651 62.9697 13.8792 52.4809C26.7519 41.992 49.1598 41.0385 65.6083 30.788C82.0567 20.5376 92.0688 0.990158 103.034 0.0366268C113.762 -0.916905 125.204 16.9618 137.838 28.6426Z",aspectRatio:{width:200,height:187},width:e,height:t}),blob15:({width:e,height:t})=>Nt({path:"M185.203 1.52939C197.679 7.62217 200 32.2835 200 51.7223C200 71.1612 197.389 85.3777 197.679 100.175C198.259 114.681 201.741 129.768 198.259 143.114C194.778 156.46 184.623 168.356 171.567 173.868C158.801 179.671 143.134 179.091 130.368 174.739C117.312 170.387 106.867 162.263 86.8482 160.812C66.539 159.362 36.9454 164.294 18.9572 155.3C0.968966 146.306 -5.41395 123.095 5.03083 105.977C15.4756 88.5692 42.4579 77.5442 55.5139 59.5559C68.2798 41.8578 67.1192 17.4867 76.9837 9.6531C86.5581 2.10965 107.158 11.3939 128.627 9.6531C150.097 8.20244 172.728 -4.27327 185.203 1.52939Z",aspectRatio:{width:200,height:179},width:e,height:t}),blob16:({width:e,height:t})=>Nt({path:"M158.441 55.3221C167.253 80.2399 160.264 105.462 147.501 134.938C134.738 164.717 116.81 199.055 97.0576 199.967C77.3057 201.182 55.7305 168.668 34.4592 133.722C13.1879 99.0802 -7.77953 62.3112 2.85612 36.4818C13.4918 10.6523 56.0344 -3.93369 90.0685 0.928322C123.799 6.09421 149.324 30.7081 158.441 55.3221Z",aspectRatio:{width:163,height:200},width:e,height:t}),blob17:({width:e,height:t})=>Nt({path:"M168.917 36.7587C178.871 53.2457 175.138 76.5764 172.961 106.129C170.472 135.37 169.85 170.832 150.563 187.63C131.276 204.739 93.3252 203.495 65.0173 187.63C36.7095 172.077 18.0449 142.213 7.77943 107.373C-2.79714 72.2213 -4.35252 32.7147 14.312 14.0502C32.9765 -4.3033 72.1721 -1.50361 103.591 4.7179C135.32 10.6283 158.962 20.2717 168.917 36.7587Z",aspectRatio:{width:176,height:200},width:e,height:t}),blob18:({width:e,height:t})=>Nt({path:"M178.188 21.1464C193.012 36.3069 196.381 62.9219 198.739 88.1893C200.76 113.12 201.771 136.366 190.316 149.168C178.862 162.307 155.279 164.665 135.065 167.697C115.188 170.73 99.0168 174.098 72.4018 177.131C46.1237 180.163 9.40176 182.521 1.65309 168.371C-6.09559 154.221 15.4659 123.564 23.5515 92.9059C31.6371 62.2481 26.2467 31.2534 38.3751 15.4192C50.1665 -0.0781831 79.8136 -1.08888 107.776 0.595609C136.076 1.9432 163.028 5.64909 178.188 21.1464Z",aspectRatio:{width:200,height:180},width:e,height:t}),blob19:({width:e,height:t})=>Nt({path:"M148.621 13.3857C171.945 24.3818 194.937 41.3756 192.938 60.702C190.605 80.3615 163.282 101.687 149.953 123.346C136.958 145.005 137.958 166.664 128.295 174.661C118.631 182.325 98.3054 175.994 73.6476 181.991C48.9899 187.989 20.0004 205.983 11.0036 197.986C1.67366 189.989 12.6697 156.001 12.3365 131.343C12.0033 106.685 0.340809 91.0243 0.00759636 75.0301C-0.325616 59.0359 10.3372 42.3753 25.3318 28.7135C39.9931 15.0518 58.9863 4.05578 80.3119 1.05687C101.638 -2.27526 124.962 2.38972 148.621 13.3857Z",aspectRatio:{width:194,height:200},width:e,height:t}),blob2:({width:e,height:t})=>Nt({path:"M140.464 18.6393C156.081 28.3718 169.887 39.9149 178.714 54.853C187.541 69.5649 191.389 87.6717 189.578 104.421C187.768 121.396 180.525 137.239 172.377 153.535C164.455 169.832 155.854 186.58 142.048 194.276C128.241 201.971 109.456 200.613 92.4804 197.671C75.2789 194.502 60.1144 189.749 45.1762 182.733C30.4644 175.716 16.2052 166.21 8.28346 153.083C0.361703 139.729 -1.44898 122.527 1.04072 106.91C3.30408 91.2931 9.64147 76.8076 15.9789 60.5114C22.0899 44.2153 28.201 26.1084 40.6495 14.7916C53.0979 3.24849 71.8838 -1.27823 89.7643 0.306124C107.871 1.66414 124.846 9.13322 140.464 18.6393Z",aspectRatio:{width:191,height:200},width:e,height:t}),blob20:({width:e,height:t})=>Nt({path:"M150.035 13.2464C157.376 24.9386 153.026 48.323 157.92 65.7254C163.087 83.1277 177.498 94.2761 182.392 108.415C187.287 122.555 182.392 139.957 173.147 156.272C163.63 172.587 149.763 187.814 132.089 195.155C114.414 202.225 93.2053 201.137 73.6276 194.611C54.3219 188.357 36.9196 176.937 25.7712 161.438C14.8947 145.667 10.5441 126.09 5.92163 105.696C1.57105 85.0311 -3.05145 63.5501 2.65869 45.0601C8.64075 26.5701 24.6835 11.0711 43.1735 4.54524C61.6635 -1.98064 82.6007 0.194657 102.722 1.01039C122.844 1.82613 142.421 1.55421 150.035 13.2464Z",aspectRatio:{width:185,height:200},width:e,height:t}),blob21:({width:e,height:t})=>Nt({path:"M152.611 0.184799C172.596 -0.723643 197.73 1.39606 199.85 13.8114C201.969 26.2268 181.075 48.9379 174.716 68.0151C168.357 87.0924 176.533 102.536 174.11 114.649C171.991 127.064 159.575 136.148 146.252 139.782C132.928 143.719 118.696 141.902 105.977 139.176C93.562 136.451 82.6606 132.212 63.2805 131.909C43.9004 131.606 16.0416 135.24 5.44306 125.853C-5.15543 116.465 1.50648 94.0572 10.2881 76.4939C18.7669 59.2335 29.6682 46.8182 38.7526 35.3112C48.1398 23.5015 56.3158 12.903 66.9143 8.36078C77.5128 4.12138 91.1394 6.24108 104.766 5.63546C118.696 4.72701 132.928 1.09324 152.611 0.184799Z",aspectRatio:{width:200,height:143},width:e,height:t}),blob22:({width:e,height:t})=>Nt({path:"M195.507 15.5715C206.818 33.1668 193.622 69.3001 190.166 101.663C186.71 134.34 193.308 163.561 181.996 178.014C170.685 192.153 141.464 191.525 114.443 189.326C87.1072 187.44 62.2852 183.67 40.6052 169.531C19.2395 155.077 1.6441 130.255 0.0730908 103.862C-1.18372 77.4694 13.898 49.5054 35.2638 31.91C56.6296 14.0004 84.5936 6.45958 116.328 2.37494C148.063 -1.70969 184.196 -2.3381 195.507 15.5715Z",aspectRatio:{width:200,height:191},width:e,height:t}),blob23:({width:e,height:t})=>Nt({path:"M135.742 9.14189C157.815 19.2326 179.258 38.4681 176.105 56.7576C172.951 74.7317 145.202 92.0751 127.858 109.734C110.83 127.077 104.523 145.052 87.4953 164.918C70.4672 184.468 42.7177 206.227 27.5816 198.343C12.4455 190.46 9.60747 153.566 6.45411 126.762C2.98542 100.274 -0.798607 84.1917 0.147399 67.1636C0.77807 50.4508 6.76944 32.4767 19.0675 20.8093C31.0503 9.14189 49.6551 3.78119 70.4672 1.2585C90.964 -1.26418 113.668 -0.633508 135.742 9.14189Z",aspectRatio:{width:177,height:200},width:e,height:t}),blob24:({width:e,height:t})=>Nt({path:"M165.663 24.3715C171.555 44.4059 158.003 76.2254 151.816 96.2598C145.923 116.294 147.691 124.544 148.28 135.445C148.575 146.346 147.396 159.309 140.62 170.8C133.549 181.996 120.88 191.424 104.381 196.432C87.8821 201.441 67.553 202.03 54.8841 192.602C41.9207 183.469 36.6174 164.023 25.1271 143.105C13.3421 122.187 -4.33535 99.7953 0.967891 85.0641C6.27113 70.6275 34.2604 63.8511 56.0626 48.5307C77.5702 33.5048 92.8907 9.93489 113.22 2.56928C133.843 -4.79633 159.77 4.04241 165.663 24.3715Z",aspectRatio:{width:168,height:200},width:e,height:t}),blob25:({width:e,height:t})=>Nt({path:"M180.115 1.256C192.651 2.1962 189.83 34.163 190.771 58.2947C191.711 82.4265 196.098 98.4099 198.606 117.214C201.113 136.018 201.426 157.642 189.204 165.791C177.294 173.626 153.163 167.671 135.299 163.91C117.749 159.836 106.466 157.956 85.7818 162.97C65.0974 168.298 35.3244 180.521 18.7143 174.253C1.79068 167.985 -1.97012 142.913 0.850478 120.975C3.67107 99.0367 13.0731 79.6059 18.4009 54.8473C23.7287 30.0888 24.9823 -0.310996 40.0254 0.00240332C54.7552 0.00240332 82.9612 31.029 111.167 31.029C139.373 31.029 167.579 0.315802 180.115 1.256Z",aspectRatio:{width:200,height:176},width:e,height:t}),blob26:({width:e,height:t})=>Nt({path:"M142.571 0.586925C159.976 3.39414 176.258 15.1844 184.96 30.9048C193.662 46.6253 194.224 66.8372 189.171 83.6805C183.837 100.805 172.327 114.56 163.064 129.157C153.8 143.755 146.501 158.914 134.43 173.231C122.359 187.828 105.516 201.303 89.5146 199.899C73.2327 198.776 58.0738 182.775 42.9148 169.862C28.0366 157.23 13.7198 147.685 6.42103 134.491C-0.877729 121.297 -1.15845 103.892 1.64876 88.4528C4.45598 72.7324 10.0704 58.6963 18.4921 47.4674C27.1944 36.2386 38.4233 27.8169 50.4943 22.2025C62.846 16.3073 75.7592 13.5001 91.1989 8.72785C106.919 4.23631 125.166 -1.93957 142.571 0.586925Z",aspectRatio:{width:193,height:200},width:e,height:t}),blob27:({width:e,height:t})=>Nt({path:"M112.602 54.9337C129.225 71.8646 155.391 78.9448 158.777 89.719C162.471 100.493 143.693 114.654 127.07 135.586C110.447 156.519 96.2866 184.224 71.0442 194.998C46.1096 205.465 10.4008 199.308 2.0893 178.375C-6.22223 157.443 12.5557 121.734 18.4045 92.1817C24.5612 62.6296 17.7889 38.9263 26.4082 21.9954C34.7197 5.06454 58.423 -5.40183 73.5069 2.9097C88.8986 10.9134 95.9788 38.0028 112.602 54.9337Z",aspectRatio:{width:160,height:200},width:e,height:t}),blob28:({width:e,height:t})=>Nt({path:"M125.281 68.5835C142.15 82.9923 165.344 90.021 181.862 108.998C198.028 127.624 207.516 158.902 192.405 166.634C177.293 174.716 137.581 159.605 112.629 156.442C87.326 152.928 77.1344 161.713 59.9142 165.579C43.0453 169.445 19.1478 168.391 11.7677 157.496C4.73907 146.25 14.2278 124.813 11.4163 94.2382C8.2534 63.6634 -6.85825 23.9514 3.68476 8.48836C14.2278 -7.32615 50.4254 1.10826 73.9715 16.2199C97.5175 31.683 108.412 54.1747 125.281 68.5835Z",aspectRatio:{width:200,height:169},width:e,height:t}),blob29:({width:e,height:t})=>Nt({path:"M162.987 10.2348C169.16 25.1809 154.864 58.6471 147.066 79.4417C139.268 100.236 138.293 108.359 134.719 114.532C131.47 120.706 125.297 124.93 119.448 143.45C113.6 161.97 107.426 194.461 98.004 199.335C88.5814 204.209 75.5849 181.14 55.7651 167.494C35.6203 153.522 8.65241 148.648 1.8292 135.327C-4.994 122.33 8.65241 100.561 20.0244 82.041C31.3964 63.5208 40.1691 48.2498 53.4906 35.5782C66.8122 22.9065 84.0326 13.159 106.452 6.33584C128.871 -0.812285 156.489 -4.71127 162.987 10.2348Z",aspectRatio:{width:165,height:200},width:e,height:t}),blob3:({width:e,height:t})=>Nt({path:"M158.095 64.2637C176.543 95.19 192.277 129.1 181.697 155.686C171.117 182.001 133.951 201.533 99.4982 199.905C64.7739 198.549 33.0338 176.032 15.4004 145.377C-2.23296 114.994 -5.75963 76.2002 10.2461 46.6303C26.2518 17.0605 61.5185 -3.557 89.732 0.512241C118.217 4.58149 139.377 33.0662 158.095 64.2637Z",aspectRatio:{width:186,height:200},width:e,height:t}),blob30:({width:e,height:t})=>Nt({path:"M146.076 34.4585C157.052 54.582 155.833 80.1936 164.675 100.622C173.212 121.355 191.201 136.905 189.372 149.711C187.542 162.212 165.285 171.969 146.99 175.018C129.001 178.372 114.671 174.713 103.39 175.018C92.1083 175.018 83.876 178.982 66.8015 186.299C49.7271 193.617 23.8105 204.288 14.3586 198.19C4.90665 191.787 11.6145 168.615 10.3949 147.882C8.87037 127.148 -0.581561 108.549 0.0282404 89.3407C0.638042 70.1319 11.6145 50.6182 28.384 32.934C44.8487 15.5546 67.4113 0.309578 89.974 0.00467694C112.537 -0.300224 135.099 14.335 146.076 34.4585Z",aspectRatio:{width:190,height:200},width:e,height:t}),blob31:({width:e,height:t})=>Nt({path:"M134.218 44.0392C153.568 36.4264 184.97 26.9105 195.755 33.2544C206.222 39.9156 195.755 62.1194 181.481 76.3933C166.89 90.35 148.175 96.0596 145.638 116.36C143.1 136.661 156.74 171.235 151.664 183.923C146.589 196.928 123.434 187.413 105.036 178.531C86.6388 169.967 73.3165 161.72 52.0643 158.548C30.812 155.058 1.62986 156.644 0.0438693 145.225C-1.22492 133.806 25.4197 109.382 29.2261 86.8609C32.7152 64.3398 13.6834 44.0392 11.7802 26.9105C9.877 9.46461 24.7853 -4.80928 42.5484 1.53467C59.9942 7.87863 79.9777 34.5232 93.6172 45.308C107.257 56.4099 114.869 51.3347 134.218 44.0392Z",aspectRatio:{width:200,height:191},width:e,height:t}),blob32:({width:e,height:t})=>Nt({path:"M200 100.339C200 149.831 145.763 197.966 95.5932 197.966C45.7627 197.966 0 149.831 0 100.339C0 50.8475 45.7627 0 95.5932 0C145.763 0 200 50.8475 200 100.339Z",aspectRatio:{width:200,height:198},width:e,height:t}),blob4:({width:e,height:t})=>Nt({path:"M183.427 38.712C198.21 63.2519 196.141 95.1833 189.341 126.523C182.836 157.863 171.305 188.908 150.609 197.482C130.208 205.76 100.642 192.16 69.8936 177.968C39.4405 164.072 7.80478 150.176 1.30024 128.593C-5.2043 107.01 13.718 77.7393 35.3012 51.7211C56.5888 25.9986 81.1287 3.23272 108.921 0.276112C137.009 -2.38484 168.349 14.4678 183.427 38.712Z",aspectRatio:{width:195,height:200},width:e,height:t}),blob5:({width:e,height:t})=>Nt({path:"M166.251 30.6913C183.816 48.5185 195.875 71.8512 199.021 98.8542C202.429 125.595 197.186 155.744 179.359 169.115C161.794 182.223 131.645 178.815 103.331 176.979C75.0171 175.144 48.8006 174.882 29.6625 161.512C10.7866 148.141 -0.748681 121.925 0.0378149 96.2326C0.824311 70.8025 14.1947 46.159 33.0706 28.3318C52.2087 10.5045 76.8522 -0.5064 100.971 0.0179307C125.091 0.804426 148.423 12.864 166.251 30.6913Z",aspectRatio:{width:200,height:179},width:e,height:t}),blob6:({width:e,height:t})=>Nt({path:"M149.146 50.5452C161.911 68.0278 171.901 81.9028 176.619 97.9979C181.336 114.37 180.781 133.241 173.011 149.891C165.519 166.541 151.366 180.693 133.051 189.851C114.736 199.008 92.2586 202.893 71.446 197.621C50.6334 192.348 30.9308 177.918 18.1658 158.216C5.12323 138.791 -0.981801 113.815 0.128204 87.7304C1.51571 61.6453 10.6733 34.1726 29.2658 17.5226C48.1359 1.14999 76.996 -4.40004 98.9186 3.6475C120.841 11.695 136.381 32.7851 149.146 50.5452Z",aspectRatio:{width:180,height:200},width:e,height:t}),blob7:({width:e,height:t})=>Nt({path:"M158.662 41.8295C178.593 57.8305 204.138 64.5677 213.402 79.7266C222.666 94.6047 215.367 118.466 203.015 135.028C190.383 151.871 172.698 161.977 156.416 168.434C140.134 174.89 124.975 177.697 104.483 185.277C83.9903 192.856 58.1642 205.208 44.9704 197.629C31.4959 190.33 31.2152 163.1 21.9514 138.116C12.9684 112.851 -4.71688 90.1132 1.17822 75.5158C7.35404 61.1991 36.8295 55.5847 58.7256 40.1452C80.9024 24.7056 95.4998 -0.278374 109.816 0.00234533C124.414 0.283064 138.45 25.8285 158.662 41.8295Z",aspectRatio:{width:218,height:200},width:e,height:t}),blob8:({width:e,height:t})=>Nt({path:"M153.53 11.0108C168.179 18.1858 181.931 29.5461 192.993 44.4939C203.755 59.4417 212.425 78.2759 210.631 96.5122C209.136 114.748 197.477 132.088 182.529 142.252C167.581 152.716 148.747 156.004 128.717 168.262C108.687 180.22 87.1622 201.147 69.8228 199.951C52.7823 198.456 39.6283 174.54 32.4533 153.015C25.2784 131.49 24.0826 112.357 16.6087 91.131C9.13477 70.2041 -4.31825 46.8855 1.36191 31.9377C7.04207 16.691 31.8554 9.51607 52.7823 5.33069C73.4103 0.846349 90.4507 -0.648433 106.594 0.248435C123.037 1.1453 138.882 4.13486 153.53 11.0108Z",aspectRatio:{width:211,height:200},width:e,height:t}),blob9:({width:e,height:t})=>Nt({path:"M140.289 20.2182C156.96 27.7956 176.661 32.0895 189.29 43.9608C201.667 55.5796 206.718 75.0283 202.424 91.6987C198.131 108.622 184.491 122.766 175.651 140.952C166.81 158.885 162.769 180.607 150.393 191.216C138.016 201.824 117.052 201.572 98.866 197.025C80.6802 192.479 65.2727 183.891 48.3497 175.808C31.4268 167.726 13.2409 160.148 5.1583 146.761C-2.67172 133.122 -0.398493 113.673 4.14797 96.7504C8.69444 80.08 15.5141 65.6828 23.3442 52.296C31.4268 38.6566 40.5197 25.775 52.6436 15.6717C65.0201 5.82101 80.6802 -1.50385 95.3299 0.264221C109.98 1.77971 123.619 12.6407 140.289 20.2182Z",aspectRatio:{width:204,height:200},width:e,height:t})};function p_(e){return NC[e]||Mm}function g_(e){const{subType:t}=e,r=p_(t);return r?function(n,i){const{width:a,height:l,fill:o,stroke:u,strokeWidth:d,dash:f}=n,v=(f||[]).map(E=>E*d);let g=i(n),c=1,y=1;typeof g!="string"&&(c=g.scaleX,y=g.scaleY,g=g.path);const x=`clip-${n.id||Math.random()}`;return`
|
|
281
281
|
<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${l}">
|
|
282
282
|
<defs>
|
|
283
283
|
<clipPath id="${x}">
|
|
@@ -293,7 +293,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
293
293
|
</svg>
|
|
294
294
|
`}(e,r):(console.error(`Polotno error: Can not convert ${e.subType} figure to svg.`),Mm(e))}const U2={},LC=Yn(({element:e,store:t})=>{const r=e.selectable||t.role==="admin",n=lf(),i=t.selectedShapes.indexOf(e)>=0&&e.selectable,a=Math.min(e.strokeWidth,e.width/2,e.height/2),l=Math.max(0,Math.min(e.width/2,e.height/2,e.cornerRadius)),o=tf(e,e.a.fill,"fill"),u=Object.assign(Object.assign({width:e.a.width,height:e.a.height},o),{cornerRadius:l,opacity:e.animated("opacity"),shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,preventDefault:!n||i,hideInExport:!e.showInExport}),d=tf(e,e.stroke,"stroke"),f=Object.assign(Object.assign({visible:a>0,x:a/2,y:a/2,width:e.a.width-a,height:e.a.height-a},d),{strokeWidth:a,cornerRadius:Math.max(0,l-a),dash:e.dash.map(y=>y*a),opacity:e.animated("opacity"),hideInExport:!e.showInExport,listening:!1}),v=(g=e.subType,U2[g]||(U2[g]=(c=p_(g),Yn(({element:y,fillProps:x,strokeProps:E})=>{let S=c({width:y.a.width,height:y.a.height,cornerRadius:y.cornerRadius}),b=1,w=1;typeof S!="string"&&(b=S.scaleX,w=S.scaleY,S=S.path);const _=ce.useRef(null);return ce.createElement(ce.Fragment,null,ce.createElement(En,{width:y.width,height:y.height,fill:"transparent"}),ce.createElement(Tv,Object.assign({},x,{ref:_,data:S,scaleX:b,scaleY:w})),ce.createElement(vn,{clipFunc:A=>{const M=_.current;if(M){var O=M.dataArray;A.beginPath();for(var L=0;L<O.length;L++){var R=O[L].command,T=O[L].points;switch(R){case"L":A.lineTo(T[0],T[1]);break;case"M":A.moveTo(T[0],T[1]);break;case"C":A.bezierCurveTo(T[0],T[1],T[2],T[3],T[4],T[5]);break;case"Q":A.quadraticCurveTo(T[0],T[1],T[2],T[3]);break;case"A":var k=T[0],C=T[1],q=T[2],G=T[3],J=T[4],ae=T[5],H=T[6],V=T[7],Y=q>G?q:G,U=q>G?1:q/G,D=q>G?G/q:1;A.translate(k,C),A.rotate(H),A.scale(U,D),A.arc(0,0,Y,J,J+ae,1-V),A.scale(1/U,1/D),A.rotate(-H),A.translate(-k,-C);break;case"z":A.closePath()}}}},scaleX:b,scaleY:w},ce.createElement(Tv,Object.assign({},E,{x:0,y:0,data:S,strokeWidth:2*E.strokeWidth,dash:E.dash.map(A=>A)}))))}))),U2[g]||vn);var g,c;return ce.createElement(ce.Fragment,null,ce.createElement(vn,{id:e.id,x:e.a.x,y:e.a.y,rotation:e.a.rotation,opacity:e.a.opacity,listening:r,draggable:n?e.draggable&&i:e.draggable,name:"element",onDragMove:y=>{e.set({x:y.target.x(),y:y.target.y()})},onDragEnd:y=>{e.set({x:y.target.x(),y:y.target.y()})},onTransform:y=>{const x=y.target.scale();y.target.scaleX(1),y.target.scaleY(1),e.set({width:e.width*x.x,height:e.height*x.y,x:y.target.x(),y:y.target.y(),rotation:y.target.rotation()})}},ce.createElement(v,{element:e,fillProps:u,strokeProps:f})))});var Xu={},q2={},Ku={},a4;function v_(){if(a4)return Ku;a4=1,Object.defineProperty(Ku,"__esModule",{value:!0}),Ku.loop=Ku.conditional=Ku.parse=void 0;var e=function n(i,a){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:l;if(Array.isArray(a))a.forEach(function(d){return n(i,d,l,o)});else if(typeof a=="function")a(i,l,o,n);else{var u=Object.keys(a)[0];Array.isArray(a[u])?(o[u]={},n(i,a[u],l,o[u])):o[u]=a[u](i,l,o,n)}return l};Ku.parse=e;var t=function(i,a){return function(l,o,u,d){a(l,o,u)&&d(l,i,o,u)}};Ku.conditional=t;var r=function(i,a){return function(l,o,u,d){for(var f=[],v=l.pos;a(l,o,u);){var g={};if(d(l,i,o,g),l.pos===v)break;v=l.pos,f.push(g)}return f}};return Ku.loop=r,Ku}var ra={},o4;function m_(){if(o4)return ra;o4=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.readBits=ra.readArray=ra.readUnsigned=ra.readString=ra.peekBytes=ra.readBytes=ra.peekByte=ra.readByte=ra.buildStream=void 0;var e=function(v){return{data:v,pos:0}};ra.buildStream=e;var t=function(){return function(v){return v.data[v.pos++]}};ra.readByte=t;var r=function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(g){return g.data[g.pos+v]}};ra.peekByte=r;var n=function(v){return function(g){return g.data.subarray(g.pos,g.pos+=v)}};ra.readBytes=n;var i=function(v){return function(g){return g.data.subarray(g.pos,g.pos+v)}};ra.peekBytes=i;var a=function(v){return function(g){return Array.from(n(v)(g)).map(function(c){return String.fromCharCode(c)}).join("")}};ra.readString=a;var l=function(v){return function(g){var c=n(2)(g);return v?(c[1]<<8)+c[0]:(c[0]<<8)+c[1]}};ra.readUnsigned=l;var o=function(v,g){return function(c,y,x){for(var E=typeof g=="function"?g(c,y,x):g,S=n(v),b=new Array(E),w=0;w<E;w++)b[w]=S(c);return b}};ra.readArray=o;var u=function(v,g,c){for(var y=0,x=0;x<c;x++)y+=v[g+x]&&Math.pow(2,c-x-1);return y},d=function(v){return function(g){for(var c=t()(g),y=new Array(8),x=0;x<8;x++)y[7-x]=!!(c&1<<x);return Object.keys(v).reduce(function(E,S){var b=v[S];return b.length?E[S]=u(y,b.index,b.length):E[S]=y[b.index],E},{})}};return ra.readBits=d,ra}var s4;function TC(){return s4||(s4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=v_(),r=m_(),n={blocks:function(g){for(var c=0,y=[],x=g.data.length,E=0,S=(0,r.readByte)()(g);S!==c&&S;S=(0,r.readByte)()(g)){if(g.pos+S>=x){var b=x-g.pos;y.push((0,r.readBytes)(b)(g)),E+=b;break}y.push((0,r.readBytes)(S)(g)),E+=S}for(var w=new Uint8Array(E),_=0,A=0;A<y.length;A++)w.set(y[A],_),_+=y[A].length;return w}},i=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(v){var g=(0,r.peekBytes)(2)(v);return g[0]===33&&g[1]===249}),a=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,function(v,g,c){return Math.pow(2,c.descriptor.lct.size+1)})},function(v,g,c){return c.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(v){return(0,r.peekByte)()(v)===44}),l=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(g,c,y){return(0,r.readBytes)(y.text.blockSize)(g)}},n]},function(v){var g=(0,r.peekBytes)(2)(v);return g[0]===33&&g[1]===1}),o=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(g,c,y){return(0,r.readString)(y.blockSize)(g)}},n]},function(v){var g=(0,r.peekBytes)(2)(v);return g[0]===33&&g[1]===255}),u=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(v){var g=(0,r.peekBytes)(2)(v);return g[0]===33&&g[1]===254}),d=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,function(v,g){return Math.pow(2,g.lsd.gct.size+1)})},function(v,g){return g.lsd.gct.exists}),{frames:(0,t.loop)([i,o,u,a,l],function(v){var g=(0,r.peekByte)()(v);return g===33||g===44})}],f=d;e.default=f}(q2)),q2}var Ud={},l4;function RC(){if(l4)return Ud;l4=1,Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.deinterlace=void 0;var e=function(r,n){for(var i=new Array(r.length),a=r.length/n,l=function(c,y){var x=r.slice(y*n,(y+1)*n);i.splice.apply(i,[c*n,n].concat(x))},o=[0,4,2,1],u=[8,8,4,2],d=0,f=0;f<4;f++)for(var v=o[f];v<a;v+=u[f])l(v,d),d++;return i};return Ud.deinterlace=e,Ud}var qd={},u4;function MC(){if(u4)return qd;u4=1,Object.defineProperty(qd,"__esModule",{value:!0}),qd.lzw=void 0;var e=function(r,n,i){var a=4096,l=-1,o=i,u,d,f,v,g,c,y,O,x,E,M,S,L,R,k,T,b=new Array(i),w=new Array(a),_=new Array(a),A=new Array(a+1);for(S=r,d=1<<S,g=d+1,u=d+2,y=l,v=S+1,f=(1<<v)-1,x=0;x<d;x++)w[x]=0,_[x]=x;var M,O,L,R,T,k;for(M=O=L=R=T=k=0,E=0;E<o;){if(R===0){if(O<v){M+=n[k]<<O,O+=8,k++;continue}if(x=M&f,M>>=v,O-=v,x>u||x==g)break;if(x==d){v=S+1,f=(1<<v)-1,u=d+2,y=l;continue}if(y==l){A[R++]=_[x],y=x,L=x;continue}for(c=x,x==u&&(A[R++]=L,x=y);x>d;)A[R++]=_[x],x=w[x];L=_[x]&255,A[R++]=L,u<a&&(w[u]=y,_[u]=L,u++,(u&f)===0&&u<a&&(v++,f+=u)),y=c}R--,b[T++]=A[R],E++}for(E=T;E<o;E++)b[E]=0;return b};return qd.lzw=e,qd}var c4;function IC(){if(c4)return Xu;c4=1,Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.decompressFrames=Xu.decompressFrame=Xu.parseGIF=void 0;var e=a(TC()),t=v_(),r=m_(),n=RC(),i=MC();function a(f){return f&&f.__esModule?f:{default:f}}var l=function(v){var g=new Uint8Array(v);return(0,t.parse)((0,r.buildStream)(g),e.default)};Xu.parseGIF=l;var o=function(v){for(var g=v.pixels.length,c=new Uint8ClampedArray(g*4),y=0;y<g;y++){var x=y*4,E=v.pixels[y],S=v.colorTable[E]||[0,0,0];c[x]=S[0],c[x+1]=S[1],c[x+2]=S[2],c[x+3]=E!==v.transparentIndex?255:0}return c},u=function(v,g,c){if(!v.image){console.warn("gif frame does not have associated image.");return}var y=v.image,x=y.descriptor.width*y.descriptor.height,E=(0,i.lzw)(y.data.minCodeSize,y.data.blocks,x);y.descriptor.lct.interlaced&&(E=(0,n.deinterlace)(E,y.descriptor.width));var S={pixels:E,dims:{top:v.image.descriptor.top,left:v.image.descriptor.left,width:v.image.descriptor.width,height:v.image.descriptor.height}};return y.descriptor.lct&&y.descriptor.lct.exists?S.colorTable=y.lct:S.colorTable=g,v.gce&&(S.delay=(v.gce.delay||10)*10,S.disposalType=v.gce.extras.disposal,v.gce.extras.transparentColorGiven&&(S.transparentIndex=v.gce.transparentColorIndex)),c&&(S.patch=o(S)),S};Xu.decompressFrame=u;var d=function(v,g){return v.frames.filter(function(c){return c.image}).map(function(c){return u(c,v.gct,g)})};return Xu.decompressFrames=d,Xu}var f4=IC();function H2(e,t,r){const n=t.getContext("2d"),i=r.getContext("2d");if(!n||!i)return;e.disposalType===2&&n.clearRect(0,0,t.width,t.height),r.width=e.width,r.height=e.height;const a=i.createImageData(e.width,e.height);a.data.set(e.patch),i.putImageData(a,0,0),n.drawImage(r,e.left,e.top)}const FC=Yn(({element:e})=>{const t=Math.min(30,e.width/4,e.height/4),r=ce.useRef(null);return ce.useEffect(()=>{const n=r.current;if(!n)return;const i=new sr.Animation(a=>{n.rotate((a?.timeDiff||0)/2)},n.getLayer());return i.start(),()=>{i.stop()}},[]),ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport},ce.createElement(En,{width:e.width,height:e.height,fill:"rgba(124, 173, 212, 0.8)"}),ce.createElement(mm,{ref:r,x:e.width/2,y:e.height/2,fill:"white",outerRadius:Math.abs(t),innerRadius:Math.max(1,t-5),angle:270}))}),jC=Yn(({element:e})=>{const t=Math.max(10,Math.min(30,e.width/22));return ce.createElement(vn,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport},ce.createElement(En,{width:e.width,height:e.height,fill:"rgba(223, 102, 102, 0.8)"}),ce.createElement(Au,{text:"Cannot load the GIF...",fontSize:t,width:e.width,height:e.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))}),DC=Yn(({element:e,store:t})=>{var r;const[n,i]=ce.useState(!1),a=t.selectedShapes.indexOf(e)>=0&&e.selectable,l=ce.useRef(null),o=ce.useRef(),[u,d,f,v]=function(R){const[T,k]=ce.useState([]),[C,q]=ce.useState(0),[G,J]=ce.useState("loading"),[ae,H]=ce.useState({width:0,height:0});return ce.useEffect(()=>{(async()=>{try{const V=await fetch(R),Y=await V.arrayBuffer(),U=f4.parseGIF(Y),D=f4.decompressFrames(U,!0),j=U.lsd.width,z=U.lsd.height;H({width:j,height:z});const Z=D.map(W=>({patch:new Uint8ClampedArray(W.patch),delay:W.delay,width:W.dims.width,height:W.dims.height,left:W.dims.left,top:W.dims.top,disposalType:W.disposalType})),re=Z.reduce((W,Q)=>W+Q.delay,0);k(Z),q(re),J("loaded")}catch(V){console.error("Failed to load GIF:",V),J("failed")}})()},[R]),[T,C,ae,G]}(e.src);Jd(v,e.src,e.id),ce.useEffect(()=>(o.current=document.createElement("canvas"),()=>{o.current&&sr.Util.releaseCanvas(o.current)}),[]),ce.useEffect(()=>{if(v==="loaded"&&o.current&&(o.current.width=f.width,o.current.height=f.height,u.length>0)){const R=o.current.getContext("2d");if(R){R.clearRect(0,0,f.width,f.height);const T=document.createElement("canvas");H2(u[0],o.current,T)}}},[f,v,u]),ce.useEffect(()=>{if(!u.length||!o.current)return;const R=o.current;R.width=f.width,R.height=f.height;const T=document.createElement("canvas"),k=R.getContext("2d");k&&k.clearRect(0,0,R.width,R.height);let C=-1;H2(u[0],R,T),w(),C=0;const q=G=>{const J=(ae=>{const H=ae%d;let V=0;for(let Y=0;Y<u.length;Y++)if(V+=u[Y].delay,V>H)return Y;return 0})(G);J!==C&&(H2(u[J],R,T),w(),l.current.getLayer().draw(),C=J)};if(t.isPlaying||e.page._exportingOrRendering)return Ou(()=>{q(t.currentTime-e.page.startTime)});{const G=window.setInterval(()=>{q(t.currentTime||performance.now())},16);return()=>{clearInterval(G)}}},[t.isPlaying,u,d,e.page._exportingOrRendering]),ce.useEffect(()=>{d&&t.history.ignore(()=>{e.set({duration:d})})},[d]);let{cropX:g,cropY:c,cropWidth:y,cropHeight:x}=e;v!=="loaded"&&(g=c=0,y=x=1);const E={x:f.width*g,y:f.height*c,width:f.width*y,height:f.height*x},S=(r=e.cornerRadius)!==null&&r!==void 0?r:0,[b,w]=d_(e,o.current,E,t._elementsPixelRatio,S,n||e._cropModeEnabled);ce.useLayoutEffect(()=>{if(!n&&!e._cropModeEnabled&&l.current)return _s(l.current,e),Ou(()=>{_s(l.current,e)},{delay:100})},[o.current,n,y,x,e._cropModeEnabled,f.width,f.height]);const _=v==="loading",A=v==="failed",M=_||A?0:e.a.opacity;xp(l,M);const O=e.selectable||t.role==="admin",L=lf();return ce.createElement(ce.Fragment,null,_&&ce.createElement(FC,{element:e}),A&&ce.createElement(jC,{element:e}),ce.createElement(bu,{ref:l,name:"element",id:e.id,image:b,x:e.a.x,y:e.a.y,width:e.a.width||1,height:e.a.height||1,rotation:e.a.rotation,opacity:M,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,customCrop:E,listening:O,draggable:L?e.draggable&&a:e.draggable,preventDefault:!L||a,hideInExport:!e.showInExport,onDragMove:R=>{e.set({x:R.target.x(),y:R.target.y()})},onDragEnd:R=>{e.set({x:R.target.x(),y:R.target.y()})},onTransformStart:()=>i(!0),onTransform:R=>{const T=R.currentTarget,k=Math.abs(T.scaleX()-1)<1e-7?1:T.scaleX(),C=Math.abs(T.scaleY()-1)<1e-7?1:T.scaleY();T.scaleX(1),T.scaleY(1),e.set({x:T.x(),y:T.y(),width:T.width()*k,height:T.height()*C,rotation:T.rotation()})},onTransformEnd:()=>i(!1)}),ce.createElement(En,{x:e.a.x,y:e.a.y,width:Math.max(e.a.width-e.borderSize,0),height:Math.max(e.a.height-e.borderSize,0),opacity:M,offsetX:-e.borderSize/2,offsetY:-e.borderSize/2,stroke:e.borderColor,strokeWidth:e.borderSize,listening:!1,visible:!!e.borderSize,rotation:e.rotation,cornerRadius:Math.max(0,S-e.borderSize),hideInExport:!e.showInExport}))}),BC={stroke:"rgb(0, 161, 255)",strokeWidth:2},zC=Yn(({element:e})=>ce.createElement(En,Object.assign({name:"highlighter",x:e.a.x,y:e.a.y,rotation:e.a.rotation,width:e.a.width,height:e.a.height,listening:!1,strokeScaleEnabled:!1},BC)));let ul=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");const ep=function(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!=Object.keys(t).length)return!1;for(var r in e)if(!t.hasOwnProperty(r)||!ep(e[r],t[r]))return!1;return!0}return!1};Object.assign(Jt);const UC=Jt.model("UndoManager",{history:Jt.array(Jt.frozen()),undoIdx:-1,targetPath:""}).views(e=>({get canUndo(){return e.undoIdx>0},get canRedo(){return e.undoIdx<e.history.length-1}})).actions(e=>{let t,r,n=!1,i=null,a=0,l=0;const o=()=>l>0;function u(){const f=wu(t);return{pages:f.pages,width:f.width,height:f.height,custom:f.custom,audios:f.audios}}function d(f){const v=t.pages.map(x=>x.id),g=f.pages.map(x=>x.id),c=!ep(v,g),y=!ep(t.custom,f.custom);c?Fv(t.pages,f.pages):t.pages.forEach((x,E)=>{Fv(x,f.pages[E])}),y&&t.set({custom:f.custom}),t.setSize(f.width,f.height)}return{startTransaction(){l++},endTransaction(f){l--,f||this.requestAddState(u())},async ignore(f,v=!1,g=!1){g&&await new Promise(S=>setTimeout(S,10)),a&&e.addUndoState();let c=o();e.startTransaction();let y=l;try{await f()}catch(S){setTimeout(()=>{throw S})}const x=y!==l,E=!x;e.endTransaction(E),v||c||e.replaceState(),x||(clearTimeout(a),a=0)},async transaction(f){await e.ignore(f,!0),this.addUndoState()},requestAddState(f){i=f,a||o()||(n?n=!1:a=setTimeout(()=>{a=0,clearTimeout(a),o()||this.addUndoState()},100))},addUndoState(){if(n)return void(n=!1);const f=e.history[e.undoIdx];!ep(i,f)&&(clearTimeout(a),a=0,e.history.splice(e.undoIdx+1),e.history.push(i),e.undoIdx=e.history.length-1)},afterCreate(){if(t=JA(e,".."),!t)throw new Error("Failed to find target store for UndoManager. Please provide `targetPath` property, or a `targetStore` in the environment");r=p8(t,()=>{this.requestAddState(u())}),e.history.length===0&&this.requestAddState(u())},clear(){clearTimeout(a),a=0,e.history.splice(0,e.history.length),e.undoIdx=-1,e.addUndoState(u())},beforeDestroy(){r()},undo(){a&&this.addUndoState(),e.canUndo?(e.undoIdx--,n=!0,d(e.history[e.undoIdx])):console.warn("No undo history. Please check `store.history.canUndo` before calling undo action.")},redo(){a&&this.addUndoState(),e.canRedo?(e.undoIdx++,n=!0,d(e.history[e.undoIdx])):console.warn("No redo history. Please check `store.history.canRedo` before calling redo action.")},replaceState(){e.history[e.undoIdx]=u()}}});async function c1(e,t){const r=await(await fetch(e)).blob(),n=document.createElement("a"),i=URL.createObjectURL(r);n.href=i,n.download=t,document.body.appendChild(n),n.click(),setTimeout(function(){document.body.removeChild(n),window.URL.revokeObjectURL(i)},0)}let V2=null;function qC(){var e;return!((e=window.jspdf)===null||e===void 0)&&e.jsPDF?Promise.resolve(window.jspdf.jsPDF):V2||(V2=new Promise(t=>{var r=document.createElement("script");r.onload=function(){t(window.jspdf.jsPDF)},r.src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/3.0.1/jspdf.umd.min.js",document.head.appendChild(r)}),V2)}function HC(){return window.GIF?Promise.resolve(window.GIF):new Promise(e=>{var t=document.createElement("script");t.onload=function(){e(window.GIF)},t.src="https://cdnjs.cloudflare.com/ajax/libs/gif.js/0.2.0/gif.js",document.head.appendChild(t)})}async function VC({width:e,height:t}){return new(await HC())({workers:4,width:e,height:t,workerScript:URL.createObjectURL(new Blob([`// gif.worker.js 0.2.0 - https://github.com/jnordberg/gif.js
|
|
295
295
|
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var NeuQuant=require("./TypedNeuQuant.js");var LZWEncoder=require("./LZWEncoder.js");function ByteArray(){this.page=-1;this.pages=[];this.newPage()}ByteArray.pageSize=4096;ByteArray.charMap={};for(var i=0;i<256;i++)ByteArray.charMap[i]=String.fromCharCode(i);ByteArray.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(ByteArray.pageSize);this.cursor=0};ByteArray.prototype.getData=function(){var rv="";for(var p=0;p<this.pages.length;p++){for(var i=0;i<ByteArray.pageSize;i++){rv+=ByteArray.charMap[this.pages[p][i]]}}return rv};ByteArray.prototype.writeByte=function(val){if(this.cursor>=ByteArray.pageSize)this.newPage();this.pages[this.page][this.cursor++]=val};ByteArray.prototype.writeUTFBytes=function(string){for(var l=string.length,i=0;i<l;i++)this.writeByte(string.charCodeAt(i))};ByteArray.prototype.writeBytes=function(array,offset,length){for(var l=length||array.length,i=offset||0;i<l;i++)this.writeByte(array[i])};function GIFEncoder(width,height){this.width=~~width;this.height=~~height;this.transparent=null;this.transIndex=0;this.repeat=-1;this.delay=0;this.image=null;this.pixels=null;this.indexedPixels=null;this.colorDepth=null;this.colorTab=null;this.neuQuant=null;this.usedEntry=new Array;this.palSize=7;this.dispose=-1;this.firstFrame=true;this.sample=10;this.dither=false;this.globalPalette=false;this.out=new ByteArray}GIFEncoder.prototype.setDelay=function(milliseconds){this.delay=Math.round(milliseconds/10)};GIFEncoder.prototype.setFrameRate=function(fps){this.delay=Math.round(100/fps)};GIFEncoder.prototype.setDispose=function(disposalCode){if(disposalCode>=0)this.dispose=disposalCode};GIFEncoder.prototype.setRepeat=function(repeat){this.repeat=repeat};GIFEncoder.prototype.setTransparent=function(color){this.transparent=color};GIFEncoder.prototype.addFrame=function(imageData){this.image=imageData;this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null;this.getImagePixels();this.analyzePixels();if(this.globalPalette===true)this.globalPalette=this.colorTab;if(this.firstFrame){this.writeLSD();this.writePalette();if(this.repeat>=0){this.writeNetscapeExt()}}this.writeGraphicCtrlExt();this.writeImageDesc();if(!this.firstFrame&&!this.globalPalette)this.writePalette();this.writePixels();this.firstFrame=false};GIFEncoder.prototype.finish=function(){this.out.writeByte(59)};GIFEncoder.prototype.setQuality=function(quality){if(quality<1)quality=1;this.sample=quality};GIFEncoder.prototype.setDither=function(dither){if(dither===true)dither="FloydSteinberg";this.dither=dither};GIFEncoder.prototype.setGlobalPalette=function(palette){this.globalPalette=palette};GIFEncoder.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette};GIFEncoder.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")};GIFEncoder.prototype.analyzePixels=function(){if(!this.colorTab){this.neuQuant=new NeuQuant(this.pixels,this.sample);this.neuQuant.buildColormap();this.colorTab=this.neuQuant.getColormap()}if(this.dither){this.ditherPixels(this.dither.replace("-serpentine",""),this.dither.match(/-serpentine/)!==null)}else{this.indexPixels()}this.pixels=null;this.colorDepth=8;this.palSize=7;if(this.transparent!==null){this.transIndex=this.findClosest(this.transparent,true)}};GIFEncoder.prototype.indexPixels=function(imgq){var nPix=this.pixels.length/3;this.indexedPixels=new Uint8Array(nPix);var k=0;for(var j=0;j<nPix;j++){var index=this.findClosestRGB(this.pixels[k++]&255,this.pixels[k++]&255,this.pixels[k++]&255);this.usedEntry[index]=true;this.indexedPixels[j]=index}};GIFEncoder.prototype.ditherPixels=function(kernel,serpentine){var kernels={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!kernel||!kernels[kernel]){throw"Unknown dithering kernel: "+kernel}var ds=kernels[kernel];var index=0,height=this.height,width=this.width,data=this.pixels;var direction=serpentine?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var y=0;y<height;y++){if(serpentine)direction=direction*-1;for(var x=direction==1?0:width-1,xend=direction==1?width:0;x!==xend;x+=direction){index=y*width+x;var idx=index*3;var r1=data[idx];var g1=data[idx+1];var b1=data[idx+2];idx=this.findClosestRGB(r1,g1,b1);this.usedEntry[idx]=true;this.indexedPixels[index]=idx;idx*=3;var r2=this.colorTab[idx];var g2=this.colorTab[idx+1];var b2=this.colorTab[idx+2];var er=r1-r2;var eg=g1-g2;var eb=b1-b2;for(var i=direction==1?0:ds.length-1,end=direction==1?ds.length:0;i!==end;i+=direction){var x1=ds[i][1];var y1=ds[i][2];if(x1+x>=0&&x1+x<width&&y1+y>=0&&y1+y<height){var d=ds[i][0];idx=index+x1+y1*width;idx*=3;data[idx]=Math.max(0,Math.min(255,data[idx]+er*d));data[idx+1]=Math.max(0,Math.min(255,data[idx+1]+eg*d));data[idx+2]=Math.max(0,Math.min(255,data[idx+2]+eb*d))}}}}};GIFEncoder.prototype.findClosest=function(c,used){return this.findClosestRGB((c&16711680)>>16,(c&65280)>>8,c&255,used)};GIFEncoder.prototype.findClosestRGB=function(r,g,b,used){if(this.colorTab===null)return-1;if(this.neuQuant&&!used){return this.neuQuant.lookupRGB(r,g,b)}var c=b|g<<8|r<<16;var minpos=0;var dmin=256*256*256;var len=this.colorTab.length;for(var i=0,index=0;i<len;index++){var dr=r-(this.colorTab[i++]&255);var dg=g-(this.colorTab[i++]&255);var db=b-(this.colorTab[i++]&255);var d=dr*dr+dg*dg+db*db;if((!used||this.usedEntry[index])&&d<dmin){dmin=d;minpos=index}}return minpos};GIFEncoder.prototype.getImagePixels=function(){var w=this.width;var h=this.height;this.pixels=new Uint8Array(w*h*3);var data=this.image;var srcPos=0;var count=0;for(var i=0;i<h;i++){for(var j=0;j<w;j++){this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];srcPos++}}};GIFEncoder.prototype.writeGraphicCtrlExt=function(){this.out.writeByte(33);this.out.writeByte(249);this.out.writeByte(4);var transp,disp;if(this.transparent===null){transp=0;disp=0}else{transp=1;disp=2}if(this.dispose>=0){disp=dispose&7}disp<<=2;this.out.writeByte(0|disp|0|transp);this.writeShort(this.delay);this.out.writeByte(this.transIndex);this.out.writeByte(0)};GIFEncoder.prototype.writeImageDesc=function(){this.out.writeByte(44);this.writeShort(0);this.writeShort(0);this.writeShort(this.width);this.writeShort(this.height);if(this.firstFrame||this.globalPalette){this.out.writeByte(0)}else{this.out.writeByte(128|0|0|0|this.palSize)}};GIFEncoder.prototype.writeLSD=function(){this.writeShort(this.width);this.writeShort(this.height);this.out.writeByte(128|112|0|this.palSize);this.out.writeByte(0);this.out.writeByte(0)};GIFEncoder.prototype.writeNetscapeExt=function(){this.out.writeByte(33);this.out.writeByte(255);this.out.writeByte(11);this.out.writeUTFBytes("NETSCAPE2.0");this.out.writeByte(3);this.out.writeByte(1);this.writeShort(this.repeat);this.out.writeByte(0)};GIFEncoder.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var n=3*256-this.colorTab.length;for(var i=0;i<n;i++)this.out.writeByte(0)};GIFEncoder.prototype.writeShort=function(pValue){this.out.writeByte(pValue&255);this.out.writeByte(pValue>>8&255)};GIFEncoder.prototype.writePixels=function(){var enc=new LZWEncoder(this.width,this.height,this.indexedPixels,this.colorDepth);enc.encode(this.out)};GIFEncoder.prototype.stream=function(){return this.out};module.exports=GIFEncoder},{"./LZWEncoder.js":2,"./TypedNeuQuant.js":3}],2:[function(require,module,exports){var EOF=-1;var BITS=12;var HSIZE=5003;var masks=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function LZWEncoder(width,height,pixels,colorDepth){var initCodeSize=Math.max(2,colorDepth);var accum=new Uint8Array(256);var htab=new Int32Array(HSIZE);var codetab=new Int32Array(HSIZE);var cur_accum,cur_bits=0;var a_count;var free_ent=0;var maxcode;var clear_flg=false;var g_init_bits,ClearCode,EOFCode;function char_out(c,outs){accum[a_count++]=c;if(a_count>=254)flush_char(outs)}function cl_block(outs){cl_hash(HSIZE);free_ent=ClearCode+2;clear_flg=true;output(ClearCode,outs)}function cl_hash(hsize){for(var i=0;i<hsize;++i)htab[i]=-1}function compress(init_bits,outs){var fcode,c,i,ent,disp,hsize_reg,hshift;g_init_bits=init_bits;clear_flg=false;n_bits=g_init_bits;maxcode=MAXCODE(n_bits);ClearCode=1<<init_bits-1;EOFCode=ClearCode+1;free_ent=ClearCode+2;a_count=0;ent=nextPixel();hshift=0;for(fcode=HSIZE;fcode<65536;fcode*=2)++hshift;hshift=8-hshift;hsize_reg=HSIZE;cl_hash(hsize_reg);output(ClearCode,outs);outer_loop:while((c=nextPixel())!=EOF){fcode=(c<<BITS)+ent;i=c<<hshift^ent;if(htab[i]===fcode){ent=codetab[i];continue}else if(htab[i]>=0){disp=hsize_reg-i;if(i===0)disp=1;do{if((i-=disp)<0)i+=hsize_reg;if(htab[i]===fcode){ent=codetab[i];continue outer_loop}}while(htab[i]>=0)}output(ent,outs);ent=c;if(free_ent<1<<BITS){codetab[i]=free_ent++;htab[i]=fcode}else{cl_block(outs)}}output(ent,outs);output(EOFCode,outs)}function encode(outs){outs.writeByte(initCodeSize);remaining=width*height;curPixel=0;compress(initCodeSize+1,outs);outs.writeByte(0)}function flush_char(outs){if(a_count>0){outs.writeByte(a_count);outs.writeBytes(accum,0,a_count);a_count=0}}function MAXCODE(n_bits){return(1<<n_bits)-1}function nextPixel(){if(remaining===0)return EOF;--remaining;var pix=pixels[curPixel++];return pix&255}function output(code,outs){cur_accum&=masks[cur_bits];if(cur_bits>0)cur_accum|=code<<cur_bits;else cur_accum=code;cur_bits+=n_bits;while(cur_bits>=8){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}if(free_ent>maxcode||clear_flg){if(clear_flg){maxcode=MAXCODE(n_bits=g_init_bits);clear_flg=false}else{++n_bits;if(n_bits==BITS)maxcode=1<<BITS;else maxcode=MAXCODE(n_bits)}}if(code==EOFCode){while(cur_bits>0){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}flush_char(outs)}}this.encode=encode}module.exports=LZWEncoder},{}],3:[function(require,module,exports){var ncycles=100;var netsize=256;var maxnetpos=netsize-1;var netbiasshift=4;var intbiasshift=16;var intbias=1<<intbiasshift;var gammashift=10;var gamma=1<<gammashift;var betashift=10;var beta=intbias>>betashift;var betagamma=intbias<<gammashift-betashift;var initrad=netsize>>3;var radiusbiasshift=6;var radiusbias=1<<radiusbiasshift;var initradius=initrad*radiusbias;var radiusdec=30;var alphabiasshift=10;var initalpha=1<<alphabiasshift;var alphadec;var radbiasshift=8;var radbias=1<<radbiasshift;var alpharadbshift=alphabiasshift+radbiasshift;var alpharadbias=1<<alpharadbshift;var prime1=499;var prime2=491;var prime3=487;var prime4=503;var minpicturebytes=3*prime4;function NeuQuant(pixels,samplefac){var network;var netindex;var bias;var freq;var radpower;function init(){network=[];netindex=new Int32Array(256);bias=new Int32Array(netsize);freq=new Int32Array(netsize);radpower=new Int32Array(netsize>>3);var i,v;for(i=0;i<netsize;i++){v=(i<<netbiasshift+8)/netsize;network[i]=new Float64Array([v,v,v,0]);freq[i]=intbias/netsize;bias[i]=0}}function unbiasnet(){for(var i=0;i<netsize;i++){network[i][0]>>=netbiasshift;network[i][1]>>=netbiasshift;network[i][2]>>=netbiasshift;network[i][3]=i}}function altersingle(alpha,i,b,g,r){network[i][0]-=alpha*(network[i][0]-b)/initalpha;network[i][1]-=alpha*(network[i][1]-g)/initalpha;network[i][2]-=alpha*(network[i][2]-r)/initalpha}function alterneigh(radius,i,b,g,r){var lo=Math.abs(i-radius);var hi=Math.min(i+radius,netsize);var j=i+1;var k=i-1;var m=1;var p,a;while(j<hi||k>lo){a=radpower[m++];if(j<hi){p=network[j++];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}if(k>lo){p=network[k--];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}}}function contest(b,g,r){var bestd=~(1<<31);var bestbiasd=bestd;var bestpos=-1;var bestbiaspos=bestpos;var i,n,dist,biasdist,betafreq;for(i=0;i<netsize;i++){n=network[i];dist=Math.abs(n[0]-b)+Math.abs(n[1]-g)+Math.abs(n[2]-r);if(dist<bestd){bestd=dist;bestpos=i}biasdist=dist-(bias[i]>>intbiasshift-netbiasshift);if(biasdist<bestbiasd){bestbiasd=biasdist;bestbiaspos=i}betafreq=freq[i]>>betashift;freq[i]-=betafreq;bias[i]+=betafreq<<gammashift}freq[bestpos]+=beta;bias[bestpos]-=betagamma;return bestbiaspos}function inxbuild(){var i,j,p,q,smallpos,smallval,previouscol=0,startpos=0;for(i=0;i<netsize;i++){p=network[i];smallpos=i;smallval=p[1];for(j=i+1;j<netsize;j++){q=network[j];if(q[1]<smallval){smallpos=j;smallval=q[1]}}q=network[smallpos];if(i!=smallpos){j=q[0];q[0]=p[0];p[0]=j;j=q[1];q[1]=p[1];p[1]=j;j=q[2];q[2]=p[2];p[2]=j;j=q[3];q[3]=p[3];p[3]=j}if(smallval!=previouscol){netindex[previouscol]=startpos+i>>1;for(j=previouscol+1;j<smallval;j++)netindex[j]=i;previouscol=smallval;startpos=i}}netindex[previouscol]=startpos+maxnetpos>>1;for(j=previouscol+1;j<256;j++)netindex[j]=maxnetpos}function inxsearch(b,g,r){var a,p,dist;var bestd=1e3;var best=-1;var i=netindex[g];var j=i-1;while(i<netsize||j>=0){if(i<netsize){p=network[i];dist=p[1]-g;if(dist>=bestd)i=netsize;else{i++;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}if(j>=0){p=network[j];dist=g-p[1];if(dist>=bestd)j=-1;else{j--;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}}return best}function learn(){var i;var lengthcount=pixels.length;var alphadec=30+(samplefac-1)/3;var samplepixels=lengthcount/(3*samplefac);var delta=~~(samplepixels/ncycles);var alpha=initalpha;var radius=initradius;var rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(i=0;i<rad;i++)radpower[i]=alpha*((rad*rad-i*i)*radbias/(rad*rad));var step;if(lengthcount<minpicturebytes){samplefac=1;step=3}else if(lengthcount%prime1!==0){step=3*prime1}else if(lengthcount%prime2!==0){step=3*prime2}else if(lengthcount%prime3!==0){step=3*prime3}else{step=3*prime4}var b,g,r,j;var pix=0;i=0;while(i<samplepixels){b=(pixels[pix]&255)<<netbiasshift;g=(pixels[pix+1]&255)<<netbiasshift;r=(pixels[pix+2]&255)<<netbiasshift;j=contest(b,g,r);altersingle(alpha,j,b,g,r);if(rad!==0)alterneigh(rad,j,b,g,r);pix+=step;if(pix>=lengthcount)pix-=lengthcount;i++;if(delta===0)delta=1;if(i%delta===0){alpha-=alpha/alphadec;radius-=radius/radiusdec;rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(j=0;j<rad;j++)radpower[j]=alpha*((rad*rad-j*j)*radbias/(rad*rad))}}}function buildColormap(){init();learn();unbiasnet();inxbuild()}this.buildColormap=buildColormap;function getColormap(){var map=[];var index=[];for(var i=0;i<netsize;i++)index[network[i][3]]=i;var k=0;for(var l=0;l<netsize;l++){var j=index[l];map[k++]=network[j][0];map[k++]=network[j][1];map[k++]=network[j][2]}return map}this.getColormap=getColormap;this.lookupRGB=inxsearch}module.exports=NeuQuant},{}],4:[function(require,module,exports){var GIFEncoder,renderFrame;GIFEncoder=require("./GIFEncoder.js");renderFrame=function(frame){var encoder,page,stream,transfer;encoder=new GIFEncoder(frame.width,frame.height);if(frame.index===0){encoder.writeHeader()}else{encoder.firstFrame=false}encoder.setTransparent(frame.transparent);encoder.setRepeat(frame.repeat);encoder.setDelay(frame.delay);encoder.setQuality(frame.quality);encoder.setDither(frame.dither);encoder.setGlobalPalette(frame.globalPalette);encoder.addFrame(frame.data);if(frame.last){encoder.finish()}if(frame.globalPalette===true){frame.globalPalette=encoder.getGlobalPalette()}stream=encoder.stream();frame.data=stream.pages;frame.cursor=stream.cursor;frame.pageSize=stream.constructor.pageSize;if(frame.canTransfer){transfer=function(){var i,len,ref,results;ref=frame.data;results=[];for(i=0,len=ref.length;i<len;i++){page=ref[i];results.push(page.buffer)}return results}();return self.postMessage(frame,transfer)}else{return self.postMessage(frame)}};self.onmessage=function(event){return renderFrame(event.data)}},{"./GIFEncoder.js":1}]},{},[4]);
|
|
296
|
-
`],{type:"application/javascript"}))})}const GC="https://api.polotno.com",$C=()=>GC+"/api",y_=$r({value:!1}),b_=$r({value:"v1"}),WC=()=>b_.value,YC=()=>y_.value,XC=Wr(()=>{y_.value=!0});let Yd=typeof window<"u"?window.location.origin:"";const KC=typeof navigator<"u"&&navigator.userAgent.indexOf("Headless")>-1,ZC=typeof navigator<"u"&&navigator.userAgent.indexOf("Electron")>-1;Yd==="file://"&&KC&&(Yd="headless"),Yd==="file://"&&ZC&&(Yd="electron");const QC=`%cPolotno error! Current domain is not allowed. It may lead to unexpected behavior and stop working. Please add "${Yd}" here: https://polotno.com/cabinet`;let JC=fetch;async function eN(e){for(let t=0;t<5;t++)try{const r=await JC($C()+"/validate-key",{method:"POST",body:JSON.stringify({key:e,site:location.host,skdVersion:"2.25.
|
|
296
|
+
`],{type:"application/javascript"}))})}const GC="https://api.polotno.com",$C=()=>GC+"/api",y_=$r({value:!1}),b_=$r({value:"v1"}),WC=()=>b_.value,YC=()=>y_.value,XC=Wr(()=>{y_.value=!0});let Yd=typeof window<"u"?window.location.origin:"";const KC=typeof navigator<"u"&&navigator.userAgent.indexOf("Headless")>-1,ZC=typeof navigator<"u"&&navigator.userAgent.indexOf("Electron")>-1;Yd==="file://"&&KC&&(Yd="headless"),Yd==="file://"&&ZC&&(Yd="electron");const QC=`%cPolotno error! Current domain is not allowed. It may lead to unexpected behavior and stop working. Please add "${Yd}" here: https://polotno.com/cabinet`;let JC=fetch;async function eN(e){for(let t=0;t<5;t++)try{const r=await JC($C()+"/validate-key",{method:"POST",body:JSON.stringify({key:e,site:location.host,skdVersion:"2.25.16"})});if(tc(()=>{b_.value=r.headers.get("x-api-version")}),!e)return console.warn("Polotno API is initialized without API key. It may lead to unexpected behavior and stop working. Please create API key here: https://polotno.com/cabinet"),!1;if(r.status!==200){await new Promise(i=>setTimeout(i,3e3));continue}const n=await r.json();return n.is_valid||console.warn("Polotno API key is not valid. Please get new API key here: https://polotno.com/cabinet"),n.is_paid||console.log("%cPolotno Free Version. For development usage only. https://polotno.com/","background: rgb(0, 161, 255); color: white; padding: 5px; margin: 5px;"),n.is_domain_valid||console.log(QC,"background: rgba(247, 101, 68, 1); color: white; padding: 5px; margin: 5px;"),qA(n.remove_background_enabled),n.is_paid||!1}catch{await new Promise(n=>setTimeout(n,3e3))}return console.error("Can not validate Polotno API key. Please report to anton@polotno.com immediately."),!0}async function tN(e,t){await eN(e)&&!t||XC()}const k0=({px:e,unit:t="px",dpi:r})=>{switch(t){case"pt":default:return e;case"mm":return e/(r/25.4);case"cm":return e/(r/2.54);case"in":return e/r}},h4=({px:e,precious:t=2,dpi:r=72,unit:n="px"})=>parseFloat(k0({px:e,dpi:r,unit:n}).toFixed(t)),d4=({unitVal:e,dpi:t,unit:r})=>e/k0({px:1,unit:r,dpi:t}),rN=e=>{const t=parseFloat(k0(e).toFixed(1));switch(e.unit){case"pt":return`${Math.round(t)}pt`;case"mm":return`${t}mm`;case"cm":return`${t}cm`;case"in":return`${t}in`;default:return`${Math.round(t)}px`}};async function nN(e){for(let t=0;t<30;t++){const r=await e();if(r)return r;await new Promise(n=>setTimeout(n,50))}}function Pp(e){return new Promise((t,r)=>{const n=document.createElement("img");n.onload=()=>{t(n)},n.onerror=i=>{r(i)},n.crossOrigin="anonymous",n.src=e})}async function iN(e,t){const r=await Pp(e),n=document.createElement("canvas");n.width=2*r.width,n.height=2*r.height,n.getContext("2d").drawImage(r,0,0,n.width,n.height);const i=document.createElement("canvas");i.width=t.width,i.height=t.height;const a=i.getContext("2d");let{cropX:l,cropY:o}=t;const u=n.width*t.cropWidth,d=n.height*t.cropHeight,f=t.width/t.height;let v,g;const c=u/d;return t.type==="svg"?(v=u,g=d):f>=c?(v=u,g=u/f):(v=d*f,g=d),a.drawImage(n,l*n.width,o*n.height,v,g,0,0,i.width,i.height),i.toDataURL("image/png")}function w_(e,t){const{width:r,height:n}=e,i=r/n;let a,l;i>=t.width/t.height?(a=t.width,l=t.width/i):(a=t.height*i,l=t.height);const o=(t.width-a)/2,u=(t.height-l)/2;return{cropX:o/t.width,cropY:u/t.height,cropWidth:a/t.width,cropHeight:l/t.height}}var zs;(function(e){e.sepia="sepia",e.grayscale="grayscale",e.natural="natural",e.warm="warm",e.cold="cold",e.temperature="temperature",e.contrast="contrast",e.shadows="shadows",e.white="white",e.black="black",e.vibrance="vibrance",e.saturation="saturation"})(zs||(zs={}));function __(e,t){let r={filter:"",html:void 0};switch(e){case zs.warm:{const n=Math.max(0,Math.min(1,t??.5)),i=1+.3*n,a=1+.15*n,l=1;return r.filter="url(#warm-filter)",r.html=`
|
|
297
297
|
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
|
|
298
298
|
<filter id="warm-filter" color-interpolation-filters="sRGB">
|
|
299
299
|
<feColorMatrix type="matrix" values="
|
|
@@ -371,7 +371,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
371
371
|
}`}));return Zr("style",{},E.join(`
|
|
372
372
|
`))}catch(c){return console.error("Error embedding Google Font:",c),Zr("defs",{},Zr("style",{type:"text/css",innerHTML:`@import url('${g}');`.replace(/&/g,"&")}))}}}))}(n,e.fonts):[],a=await Promise.all(e.pages.map(l=>async function({page:o,store:u,elementHook:d}){const f=await Promise.all(o.children.map(c=>A_({element:c,page:o,store:u,elementHook:d}))),v=o.background.indexOf("url")>=0||o.background.indexOf("http")>=0||o.background.indexOf(".jpg")>=0||o.background.indexOf(".png")>=0||o.background.indexOf(".jpeg")>=0;let g;if(v){const c=await Pp(o.background);g=await iN(o.background,Object.assign({width:u.width,height:u.height,x:0,y:0},w_({width:u.width,height:u.height},{width:c.width,height:c.height})))}return Zr("g",{className:"page",style:{}},v?Zr("image",{"xlink:href":g,x:0,y:0,width:u.width,height:u.height,preserveAspectRatio:"none"}):Zr("rect",{x:0,y:0,width:u.width,height:u.height,fill:v?void 0:o.background}),...f)}({page:l,store:e,elementHook:t})));return Zr("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:`0 0 ${e.width} ${e.height}`,width:e.width,height:e.height},...i,...a)}const P_=({dom:e,nestLevel:t=0})=>{if(typeof e=="string")return e;if(!e)return"";const r=e.props,{innerHTML:n}=r,i=cN(r,["innerHTML"]),a=Object.keys(i).map(o=>((u,d)=>typeof d=="object"?`${u}="${Object.keys(d).map(f=>`${f}:${d[f]};`).join(" ")}"`:d==null||d===""?"":`${u}="${d}"`)(o,i[o])).filter(o=>o&&o.trim().length>0).join(" "),l=" ".repeat(t);return`${l}<${e.type}${a?" "+a:""}>${n||`
|
|
373
373
|
`+e.children.map(o=>P_({dom:o,nestLevel:t+1})).join("")}${l}</${e.type}>
|
|
374
|
-
`};async function dN({json:e,elementHook:t,fontEmbedding:r="inline"}){const n=await hN({json:e,elementHook:t,fontEmbedding:r});return P_({dom:n})}const tp=Jt.model("Page",{id:Jt.identifier,children:Jt.array(Jt.late(()=>M_)),width:Jt.optional(Jt.union(Jt.number,Jt.literal("auto")),"auto"),height:Jt.optional(Jt.union(Jt.number,Jt.literal("auto")),"auto"),background:"white",bleed:0,custom:Jt.frozen(),duration:5e3,_exporting:!1,_rendering:!1,_forceMount:!1}).postProcessSnapshot(e=>{const t=Object.assign({},e),r={};for(var n in t)n[0]!=="_"&&(r[n]=e[n]);return r}).views(e=>({get store(){return kf(e,If)}})).views(e=>({get startTime(){let t=0;for(const r of e.store.pages){if(r.id===e.id)return t;t+=r.duration}return t},get _exportingOrRendering(){return e._exporting||e._rendering}})).views(e=>({get computedWidth(){return e.width==="auto"?e.store.width:e.width},get computedHeight(){return e.height==="auto"?e.store.height:e.height}})).actions(e=>({toJSON:()=>JSON.parse(JSON.stringify(wu(e))),_forEachElementUp(t,r){const n=t.map(i=>({id:i,index:e.children.findIndex(a=>a.id===i)}));n.sort((i,a)=>a.index-i.index);for(const{index:i}of n){if(i==-1)continue;const a=i<e.children.length-1&&e.children[i+1],l=t.indexOf(a?.id)>=0;i===e.children.length-1||l||r(i)}},_forEachElementDown(t,r){const n=t.map(i=>({id:i,index:e.children.findIndex(a=>a.id===i)}));n.sort((i,a)=>i.index-a.index);for(const{index:i}of n){if(i==-1)continue;const a=i>0&&e.children[i-1],l=t.indexOf(a?.id)>=0;i===0||l||r(i)}return!1}})).actions(e=>({clone(t={}){const r=e.toJSON();r.children.forEach(l=>{l.id=ul(10),Ei(l,o=>{o.id=ul(10)})});const n=Object.assign(Object.assign(Object.assign({},r),{id:ul(10)}),t),i=e.store.addPage(n),a=e.store.pages.indexOf(e);return i.setZIndex(a+1),i.select(),i},setZIndex(t){e.store.setPageZIndex(e.id,t)},set(t){Object.assign(e,t)},select(){e.store.selectPage(e.id)},addElement(t,{skipSelect:r=!1}={}){const n=Im[t.type];if(!n)return void console.error("Can not find model with type "+t.type);"children"in t&&Array.isArray(t.children)&&Ei(t,a=>{a.id=a.id||ul(10)});const i=n.create(Object.assign({id:ul(10)},t));return e.children.push(i),i.selectable&&!r&&e.store.selectElements([i.id]),i},canMoveElementsUp(t){let r=!1;return e._forEachElementUp(t,()=>{r=r||!0}),r},moveElementsUp(t){e._forEachElementUp(t,r=>{const n=e.children[r];Lf(n),e.children.splice(r+1,0,n)})},canMoveElementsTop(t){return this.canMoveElementsUp(t)},moveElementsTop(t){const r=[],n=[];e.children.forEach(i=>{t.indexOf(i.id)>=0?r.push(i):n.push(i)}),e.children.replace(n.concat(r))},canMoveElementsDown(t){let r=!1;return e._forEachElementDown(t,()=>{r=r||!0}),r},moveElementsDown(t){e._forEachElementDown(t,r=>{const n=e.children[r];Lf(n),e.children.splice(r-1,0,n)})},canMoveElementsBottom(t){return this.canMoveElementsDown(t)},moveElementsBottom(t){const r=[],n=[];e.children.forEach(i=>{t.indexOf(i.id)>=0?r.push(i):n.push(i)}),e.children.replace(r.concat(n))},setElementZIndex(t,r){const n=e.children.find(i=>i.id===t);n&&(Lf(n),e.children.remove(n),e.children.splice(r,0,n))},setSize({width:t,height:r,useMagic:n,softChange:i}){if(n){const a=[],l=M=>M.type==="image"&&M.x<1&&M.y<1&&M.width>=e.computedWidth-2&&M.height>=e.computedHeight-2;Ei(e,M=>{M.type!=="group"&&(l(M)||a.push(M))});const o=a.length?P0(a):{x:0,y:0,width:e.computedWidth,height:e.computedHeight},u=1/4,d=Math.max(0,Math.min(o.x,e.computedWidth-o.x-o.width)),f=e.computedWidth*u,v=Math.max(0,d-f),g=Math.max(0,Math.min(o.y,e.computedHeight-o.y-o.height)),c=e.computedHeight*u,y=Math.max(0,g-c),x=e.computedWidth-2*v,E=e.computedHeight-2*y,S=t/x,b=r/E,w=Math.min(S,b),_=(t-x*w)/2-v*w,A=(r-E*w)/2-y*w;Ei(e,M=>{M.type!=="group"&&(l(M)?M.set({x:M.x*w,y:M.y*w,width:M.width*S,height:M.height*b,cropX:0,cropY:0,cropWidth:1,cropHeight:1}):(M.set({x:_+M.x*w,y:A+M.y*w,width:M.width*w,height:M.height*w}),M.type==="text"?M.set({fontSize:M.fontSize*w}):M.type==="figure"&&M.set({strokeWidth:M.strokeWidth*w})))})}i||(e.width=t),i||(e.height=r)}})).actions(e=>({moveElementUp(t){console.warn("page.moveElementUp(id) is deprecated. Please use page.moveElementsUp([id1, id2]) instead."),e.moveElementsUp([t])},moveElementDown(t){console.warn("page.moveElementDown(id) is deprecated. Please use page.moveElementsDown([id1, id2]) instead."),e.moveElementsDown([t])},moveElementTop(t){console.warn("page.moveElementTop(id) is deprecated. Please use page.moveElementsTop([id1, id2]) instead."),e.moveElementsTop([t])},moveElementBottom(t){console.warn("page.moveElementBottom(id) is deprecated. Please use page.moveElementsBottom([id1, id2]) instead."),e.moveElementsBottom([t])},play(){e.store.play({startTime:e.startTime,endTime:e.startTime+e.duration})}})),m4=Jt.model("Audio",{id:Jt.identifier,src:"",duration:0,startTime:0,endTime:1,volume:1,delay:0}).actions(e=>({toJSON:()=>Object.assign({},wu(e))})).actions(e=>({set(t){Object.assign(e,t)}}));var Hd=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};YA("ignore");const pN=Jt.model("Font",{fontFamily:Jt.string,url:Jt.optional(Jt.string,""),styles:Jt.frozen()}).preProcessSnapshot(e=>Object.assign(Object.assign({},e),{fontFamily:e.fontFamily||e.name})),If=Jt.model("Store",{role:"",pages:Jt.array(tp),fonts:Jt.array(pN),audios:Jt.array(m4),width:1080,height:1080,currentTime:0,isPlaying:!1,scale:1,scaleToFit:1,unit:"px",dpi:72,schemaVersion:2,bleedVisible:!1,rulesVisible:!1,openedSidePanel:"",previousOpenedSidePanel:"",custom:Jt.frozen(),selectedElementsIds:Jt.array(Jt.string),animatedElementsIds:Jt.array(Jt.string),history:Jt.optional(UC,{targetPath:"../pages"}),_elementsPixelRatio:Math.min(2,typeof window<"u"&&window.devicePixelRatio||1),_activePageId:"",_forceShowCredit:!1,_key:"",_validated:!1}).views(e=>{const t=qf(()=>{const r={};return Ei({children:e.pages},n=>(r[n.id]=n,!1)),r},{keepAlive:!0});return{get _idsMap(){return t.get()}}}).views(e=>({get _bleedVisible(){return console.warn("store._bleedVisible is deprecated. Please use store.bleedVisible instead."),e.bleedVisible},get selectedElements(){return e.selectedElementsIds.map(t=>{for(const r of e.pages)for(const n of r.children)if(n.id===t)return n}).filter(t=>!!t)},get children(){return e.pages},get selectedShapes(){const t=[];return Ei({children:e.selectedElements},r=>{r.type!=="group"&&t.push(r)}),t},get activePage(){return e.pages.slice().find(t=>t.id===e._activePageId)||(e.pages.length?e.pages[0]:null)},get duration(){let t=0;return e.pages.forEach(r=>{t+=r.duration}),t},get _hasCroppedImages(){return e.find(t=>t.type==="image"&&t._cropModeEnabled)},find(t){let r;return Ei({children:e.pages},n=>{if(!r&&t(n))return r=n,!0}),r},getElementById:t=>e._idsMap[t]})).actions(e=>{let t=0,r=null,n=!1;return{afterCreate(){e.history.canUndo},setCurrentTime(i){e.currentTime=i},_togglePlaying(i=!e.isPlaying){e.isPlaying=i},play({animatedElementsIds:i=[],startTime:a=0,currentTime:l=0,endTime:o=e.duration,repeat:u=!1}={}){l&&(console.warn("currentTime property of store.play() is deprecated. Please use startTime instead."),a=l),e.animatedElementsIds=i,e.currentTime=a,e.isPlaying=!0,t=Date.now(),r=o,n=u,requestAnimationFrame(e.seek)},checkActivePage(){let i=0;for(const a of e.pages){if(e.currentTime>=a.startTime&&e.currentTime<a.startTime+a.duration){e.selectPage(a.id);break}i+=a.duration}},seek(){if(!e.isPlaying)return;const i=Date.now(),a=i-t;t=i,e.currentTime+=a,e.checkActivePage();const l=r||e.duration;e.isPlaying&&e.currentTime<l?requestAnimationFrame(e.seek):e.isPlaying&&n?(e.currentTime=0,requestAnimationFrame(e.seek)):e.stop()},stop(){e.isPlaying=!1,e.currentTime=0,e.animatedElementsIds=[],e.checkActivePage()}}}).actions(e=>({__(){e._validated||(tN(e._key,e._forceShowCredit),e._validated=!0)},set(t){Object.assign(e,t)},setUnit({unit:t,dpi:r}){e.unit=t||e.unit,e.dpi=r||e.dpi},setRole(t){e.role=t},addPage(t){const r=tp.create(Object.assign({id:ul(10)},t));return e.pages.push(r),e._activePageId=r.id,r},selectPage(t){e._activePageId=t},selectElements(t){const r=t.map(n=>e.getElementById(n)).sort((n,i)=>n.page.children.indexOf(n)-n.page.children.indexOf(i)).filter(n=>!!n).map(n=>n.id);e.selectedElementsIds=r},toggleBleed(t){e.bleedVisible=t??!e.bleedVisible},toggleRulers(t){e.rulesVisible=t??!e.rulesVisible},openSidePanel(t){e.openedSidePanel!==t&&(e.previousOpenedSidePanel=e.openedSidePanel,e.openedSidePanel=t)},setScale(t){e.scale=t},_setScaleToFit(t){e.scaleToFit=t},setElementsPixelRatio(t){e._elementsPixelRatio=t},setSize(t,r,n){e.pages.forEach(i=>{i.setSize({width:t,height:r,useMagic:n,softChange:!0})}),e.width=t,e.height=r},setPageZIndex(t,r){const n=e.pages.find(i=>i.id===t);n&&(Lf(n),e.pages.remove(n),e.pages.splice(r,0,n))},deletePages(t){const r=e.pages.indexOf(e.activePage);t.forEach(a=>{const l=e.pages.find(o=>o.id===a);Cg(l)});const n=Math.min(e.pages.length-1,r),i=e.pages[n];i&&(e._activePageId=i.id),e.selectedElementsIds=e.selectedElementsIds.filter(a=>e.getElementById(a))},groupElements(t,r={}){const n=t.map(l=>e.getElementById(l)),i=n[0].page;if(n.forEach(l=>{l&&Lf(l)}),!n.length)return;const a=Object.assign({id:ul(10),children:n,type:"group"},r);return i.children.push(a),e.selectedElementsIds=[a.id],i.children.find(l=>l.id===a.id)},ungroupElements(t){const r=t.map(i=>e.getElementById(i)),n=[];r.forEach(i=>{if(i&&i.type==="group"){const a=i.page,l=a.children.indexOf(i);i.children.forEach(o=>{n.push(o.id)}),i.children.forEach(o=>{Lf(o),a.children.push(o)}),a.children.splice(l,1)}}),e.selectedElementsIds=n},deleteElements(t){const r=[];e.find(n=>(t.includes(n.id)&&r.push(n),!1)),r.forEach(n=>{Cg(n)}),e.selectedElementsIds=e.selectedElementsIds.filter(n=>e.getElementById(n))},on(t,r){if(t==="change"){let n=e.toJSON();return p8(e,i=>{const a=e.toJSON();!ep(n,a)&&(n=a,r(a))})}},async _toCanvas({pixelRatio:t,ignoreBackground:r,pageId:n,mimeType:i,includeBleed:a,_skipTimeout:l,quickMode:o=!1}={}){var u;const d=t||1;n=n||((u=e.pages[0])===null||u===void 0?void 0:u.id);const f=e.pages.find(k=>k.id===n);if(!f)throw new Error(`No page for export with id ${n}`);const v=e._elementsPixelRatio;d>e._elementsPixelRatio&&e.setElementsPixelRatio(d),o?f?.set({_forceMount:!0}):f?.set({_exporting:!0});const g=await nN(()=>sr.stages.find(k=>k.getAttr("pageId")===n));if(!g)throw f?.set({_forceMount:!1,_exporting:!1}),e.setElementsPixelRatio(v),new Error(`Export is failed. Can not find stage for page ${n}. Looks like <Workspace /> component is not mounted, but it is required in order to process the export.`);await e.waitLoading({_skipTimeout:l});const c=g.findOne(".page-container");if(!c)throw e.setElementsPixelRatio(v),f?.set({_forceMount:!1,_exporting:!1}),new Error("Export is failed. Canvas was unmounted.");const y=g.position();g.position({x:0,y:0}),g.find("Transformer").forEach(k=>{k.setAttr("oldVisible",k.visible()),k.visible(!1)}),c.find(".page-background").forEach(k=>k.shadowEnabled(!1)),c.find(".page-background").forEach(k=>k.strokeEnabled(!1)),c.find(".highlighter").forEach(k=>k.visible(!1));const x=c.findOne(".page-background-group"),E=x.clip();x.clip({x:null,y:null,width:null,height:null});const S=c.findOne(".elements-container"),b=S.clip();S.clip({x:null,y:null,width:null,height:null});const w=c.find(k=>!k.visible()&&k.getAttr("editModeEnabled")&&!k.getAttr("hideInExport"));w.forEach(k=>{k.setAttr("oldVisible",k.visible()),k.show()});const _=c.find(k=>k.getAttr("hideInExport"));_.forEach(k=>{k.setAttr("oldVisible",k.visible()),k.hide()}),r&&c.find(".page-background").forEach(k=>k.hide());const A=a?f.bleed:0;let M=A;!e.bleedVisible&&a||(e.bleedVisible||a?e.bleedVisible&&a?M=0:e.bleedVisible&&!a&&(M=-f.bleed):M=0);const O=document.createElement("canvas");O.width=Math.round((f.computedWidth+2*A)*d),O.height=Math.round((f.computedHeight+2*A)*d);const L=O.getContext("2d");i==="image/jpeg"&&(L.fillStyle="white",L.fillRect(0,0,O.width,O.height));const R=c.scale();c.scale({x:1,y:1});const T=c.toCanvas({x:c.x()-M,y:c.y()-M,width:f.computedWidth+2*A,height:f.computedHeight+2*A,pixelRatio:d});return c.scale(R),L.drawImage(T,0,0,O.width,O.height),sr.Util.releaseCanvas(T),r&&c.find(".page-background").forEach(k=>k.show()),_.forEach(k=>{k.visible(k.getAttr("oldVisible"))}),w.forEach(k=>{k.visible(k.getAttr("oldVisible"))}),c.find(".page-background").forEach(k=>k.shadowEnabled(!0)),c.find(".page-background").forEach(k=>k.strokeEnabled(!0)),g.find("Transformer").forEach(k=>{k.visible(k.getAttr("oldVisible"))}),c.find(".highlighter").forEach(k=>k.visible(!0)),x.clip(E),S.clip(b),g.position(y),f?.set({_exporting:!1,_forceMount:!1}),await new Promise(k=>setTimeout(k)),e.setElementsPixelRatio(v),O},async toDataURL(t={}){var{mimeType:r,quality:n}=t,i=Hd(t,["mimeType","quality"]);const a=await e._toCanvas(Object.assign({mimeType:r},i)),l=a.toDataURL(r,n);return sr.Util.releaseCanvas(a),l},async toBlob(t={}){var{mimeType:r,quality:n}=t,i=Hd(t,["mimeType","quality"]);const a=await e._toCanvas(Object.assign({mimeType:r},i)),l=await new Promise(o=>{a.toBlob(o,r,n)});return sr.Util.releaseCanvas(a),l},async saveAsImage(t={}){var{fileName:r}=t,n=Hd(t,["fileName"]);const i=n.mimeType||"image/png",a=i.split("/")[1];c1(await e.toDataURL(n),r||"polotno."+a)},async _toPDF(t){const r=t.dpi||e.dpi,n=t.parallel||1,i=t.unit||(e.unit==="px"?"mm":e.unit),a=t.pixelRatio||1,l=t.pageIds||e.pages.map(w=>w.id),o=e.pages.filter(w=>l.includes(w.id)),u=await qC(),d=w=>k0({px:w,unit:i,dpi:r}),f=t.cropMarkSize||0,v=d(f),g=o[0]||{},c=t.includeBleed?g.bleed:0,y=d(g.computedWidth+2*c+2*v),x=d(g.computedHeight+2*c+2*v);var E=new u({unit:i,orientation:y>x?"landscape":"portrait",format:[y,x],compress:!0,putOnlyUsedFonts:!0});E.deletePage(1);const S=((w,_)=>{for(var A=[],M=0;M<w.length;M+=_)A.push(w.slice(M,M+_));return A})(o,n);let b=0;for(const w of S){const _=w.map(async A=>{const M=t.includeBleed?A.bleed:0,O=A.computedWidth+2*M+2*f,L=A.computedHeight+2*M+2*f,R=d(O),T=d(L);let k=0,C=a;for(;k<10;){k+=1,k===2&&console.error("Polotno can not export PDF with current settings. Quality is automatically reduced.");const q=await e.toDataURL(Object.assign(Object.assign({},t),{pageId:A.id,pixelRatio:C}));if(q.length>20)return t.onProgress&&t.onProgress(++b/l.length*.9),{url:q,width:R,height:T,widthPx:O,heightPx:L};C*=.8}});(await Promise.all(_)).forEach(({url:A,width:M,height:O,widthPx:L,heightPx:R})=>{E.addPage([M,O],M>O?"landscape":"portrait");const T=E.getCurrentPageInfo();var k;switch(i){case"pt":k=1;break;case"mm":k=72/25.4;break;case"cm":k=72/2.54;break;case"in":k=72;break;case"px":k=.75;break;case"pc":case"em":k=12;break;case"ex":k=6;break;default:throw"Invalid unit: "+i}if(T.pageContext.cropBox={bottomLeftX:0,bottomLeftY:0,topRightX:M*k,topRightY:O*k},T.pageContext.artBox={bottomLeftX:d(f+c)*k,bottomLeftY:d(f+c)*k,topRightX:d(L-f-c)*k,topRightY:d(R-f-c)*k},T.pageContext.bleedBox={bottomLeftX:d(f+c)*k,bottomLeftY:d(f+c)*k,topRightX:d(L-f-c)*k,topRightY:d(R-f-c)*k},v){E.setLineWidth(d(1));const C=v+d(c);E.line(C,0,C,v),E.line(0,C,v,C),E.line(M-C,0,M-C,v),E.line(M,C,M-v,C),E.line(0,O-C,v,O-C),E.line(C,O,C,O-v),E.line(M,O-C,M-v,O-C),E.line(M-C,O,M-C,O-v)}E.addImage(A,v,v,M-2*v,O-2*v,void 0,"FAST")})}return E},toPDFDataURL:async t=>(await e._toPDF(Object.assign({mimeType:"image/jpeg"},t))).output("datauristring"),async toGIFDataURL(t={}){const r=t.pixelRatio||1,n=await VC({width:e.width*r,height:e.height*r}),i=1e3/(t.fps||10),a=e.duration/i;for(let l=0;l<a-1;l++){const o=l*i||1;e.setCurrentTime(o);let u=0,d="";for(const v of e.pages)if(u+=v.duration,v.set({_rendering:u>o}),u>o){d=v.id;break}const f=await e._toCanvas({pixelRatio:r,pageId:d,_skipTimeout:!0});n.addFrame(f.getContext("2d"),{delay:i,copy:!0})}for(const l of e.pages)l.set({_rendering:!1});return e.stop(),n.render(),new Promise(l=>{n.on("finished",function(o){(function(u,d){var f=new FileReader;f.onload=function(v){d(v.target.result)},f.readAsDataURL(u)})(o,l)})})},async saveAsGIF(t={}){var{fileName:r}=t,n=Hd(t,["fileName"]);const i=await e.toGIFDataURL(n);c1(i,r||"polotno.gif")},async toHTML({elementHook:t}={elementHook:void 0}){const r=e.toJSON();return uN({json:r,elementHook:t})},async saveAsHTML({fileName:t}={}){const r=await e.toHTML(),n="data:text/html;base64,"+window.btoa(unescape(encodeURIComponent(r)));c1(n,t||"polotno.html")},async toSVG({elementHook:t,pageId:r,fontEmbedding:n="inline"}={elementHook:void 0,pageId:void 0,fontEmbedding:"inline"}){var i;const a=e.toJSON();r=r||((i=a.pages[0])===null||i===void 0?void 0:i.id);const l=a.pages.find(o=>o.id===r);return dN({json:Object.assign(Object.assign({},a),{pages:l?[l]:[]}),elementHook:t,fontEmbedding:n})},async saveAsSVG({fileName:t,elementHook:r,pageId:n,fontEmbedding:i="inline"}={}){const a=await e.toSVG({elementHook:r,pageId:n,fontEmbedding:i}),l="data:text/svg;base64,"+window.btoa(unescape(encodeURIComponent(a)));c1(l,t||"polotno.svg")},async saveAsPDF(t={}){var{fileName:r}=t,n=Hd(t,["fileName"]);(await e._toPDF(Object.assign({mimeType:"image/jpeg"},n))).save(r||"polotno.pdf")},async waitLoading({_skipTimeout:t=!1}={}){t||await new Promise(r=>setTimeout(r,50)),await FA()},toJSON:()=>({width:e.width,height:e.height,fonts:wu(e.fonts),pages:wu(e.pages),audios:wu(e.audios),unit:e.unit,dpi:e.dpi,custom:e.custom,schemaVersion:e.schemaVersion}),loadJSON(t,r=!1){var n;const i=JSON.parse(JSON.stringify(t)),a=i.schemaVersion||0;a<1&&Ai.htmlRenderEnabled&&Ei({children:i.pages},d=>{if(d.type==="text"){const v=d.letterSpacing*16;d.letterSpacing=v/d.fontSize}}),a<2&&Ei({children:i.pages},d=>{d.filters&&Object.keys(d.filters).forEach(f=>{if(["warm","cold","natural"].includes(f))return;const v=d.filters[f];v&&typeof v.intensity=="number"&&(v.intensity=v.intensity/100)})}),delete i.schemaVersion;const l=e.pages.indexOf(e.activePage);let o=(n=i.pages[l]||i.pages[0])===null||n===void 0?void 0:n.id;i._activePageId=o;const u=Object.assign({},wu(e));Object.assign(u,i),u.history=r?e.history.toJSON():{history:[],undoIdx:-1},Fv(e,u)},clear({keepHistory:t=!1}={}){const r=e.pages.map(n=>n.id);e.deletePages(r),e.custom=null,t||e.history.clear()},addFont(t){e.removeFont(t.fontFamily),e.fonts.push(t),e.loadFont(t.fontFamily)},removeFont(t){e.fonts.filter(r=>r.fontFamily===t).forEach(r=>Cg(r))},addAudio(t){const r=m4.create(Object.assign({id:ul(10)},t));e.audios.push(r)},removeAudio(t){const r=e.audios.find(n=>n.id===t);r&&e.audios.remove(r)},async loadFont(t){const r=e.fonts.find(i=>i.fontFamily===t)||wm.find(i=>i.fontFamily===t);let n=[{fontStyle:"normal",fontWeight:"normal"},{fontStyle:"normal",fontWeight:"bold"}];return r?(r.styles&&(n=r.styles.map(i=>({fontStyle:i.fontStyle||"normal",fontWeight:i.fontWeight||"normal"}))),c8(r)):u8(t),Promise.all(n.map(i=>mh(t,i.fontStyle,i.fontWeight)))},validate:t=>If.validate(t,[{path:"",type:If}]).map(r=>({path:"store"+r.context.map(n=>n.path).join("."),message:r.message}))}));function gN({key:e,showCredit:t}={key:"",showCredit:!1}){return If.create({_forceShowCredit:t,_key:e})}const k_=Jt.model("Node",{id:Jt.identifier,type:"none",name:"",opacity:1,custom:Jt.frozen(),visible:!0,selectable:!0,removable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(e=>{for(var t in e)e[t]===null&&(e[t]=void 0);return e}).postProcessSnapshot(e=>{const t=Object.assign({},e),r={};for(var n in t)n[0]!=="_"&&(r[n]=e[n]);return r}).views(e=>({get locked(){return!(e.draggable||e.contentEditable||e.styleEditable||e.resizable)},get page(){return kf(e,tp)},get store(){return kf(e,If)},get top(){let t=e;for(;;){if(!s1(t,Sh))return t;t=kf(t,Sh)}},get parent(){if(s1(e,Sh)){const t=kf(e,Sh);return t&&t.children&&t.children.length,t}if(s1(e,tp)){const t=kf(e,tp);return t&&t.children&&t.children.length,t}if(s1(e,If)){const t=kf(e,If);return t&&t.pages&&t.pages.length,t}return null},get zIndex(){return e.parent.children.indexOf(e)}})).actions(e=>({toJSON:()=>Object.assign({},wu(e))})).actions(e=>({clone(t={},{skipSelect:r=!1}={}){const n=JSON.parse(JSON.stringify(e.toJSON()));return t.id=t.id||ul(10),Ei(n,i=>{i.id=ul(10)}),Object.assign(n,t),e.page.addElement(n,{skipSelect:r})},set(t){Object.assign(e,t)},moveUp(){e.page.moveElementsUp([e.id])},moveTop(){e.page.moveElementsTop([e.id])},moveDown(){e.page.moveElementsDown([e.id])},moveBottom(){e.page.moveElementsBottom([e.id])},setZIndex(t){e.parent.setElementZIndex(e.id,t)},beforeDestroy(){}})),y4={right:{from:{x:-200},to:{x:0}},left:{from:{x:200},to:{x:0}},up:{from:{y:200},to:{y:0}},down:{from:{y:-200},to:{y:0}},"bottom-right":{from:{x:-200,y:-200},to:{x:0,y:0}},"bottom-left":{from:{x:200,y:-200},to:{x:0,y:0}},"top-right":{from:{x:-200,y:200},to:{x:0,y:0}},"top-left":{from:{x:200,y:200},to:{x:0,y:0}}},b4={right:{cropX:-1},left:{cropX:1},up:{cropY:1},down:{cropY:-1}},vN={fade:({dTime:e,element:t,animation:r})=>{const n=e/r.duration;return r.type==="enter"?{opacity:n*t.opacity}:{opacity:(1-n)*t.opacity}},rotate:({dTime:e,element:t,animation:r})=>{const n=e/r.duration*360;return cC({x:t.x,y:t.y,width:t.width,height:t.height,rotation:t.rotation},n)},blink:({dTime:e,element:t,animation:r})=>{const n=r.duration,i=e%n/(n/2),a=i<=1?i:2-i;return{opacity:t.opacity*a}},bounce:({dTime:e,element:t,animation:r})=>{var n;const i=r.duration,a=i/2,l=(n=r.data.strength)!==null&&n!==void 0?n:1,o={},u={x:t.x+t.width/3*l,y:t.y+t.height/3*l,width:t.width/3*l,height:t.height/3*l,fontSize:t.fontSize/3*l},d={x:t.x,y:t.y,width:t.width,height:t.height,fontSize:t.fontSize},f=e%i/a,v=f<=1?f:2-f;for(let g in u){const c=u[g],y=d[g]-c;o[g]=c+v*y}return o},move:({dTime:e,element:t,animation:r})=>{var n;const i=y4[r.data.direction]||y4.right,a=(n=r.data.strength)!==null&&n!==void 0?n:1,l={};for(var o in i.from){let u=i.from[o],d=i.to[o];r.type==="exit"&&(u=i.to[o],d=-i.from[o]),u*=a,d*=a;const f=t[o]+u,v=t[o]+d-f;l[o]=f+e/r.duration*v}return l},zoom:({dTime:e,element:t,animation:r})=>{var n;const i={},a=1+(((r.data.direction||"in")==="in"?.75:1.25)-1)*((n=r.data.strength)!==null&&n!==void 0?n:1),l=t.rotation*Math.PI/180,o=Math.cos(l),u=Math.sin(l),d=t.width*(1-a),f=t.height*(1-a),v=(d*o-f*u)/2,g=(d*u+f*o)/2,c={x:t.x+v,y:t.y+g,width:t.width*a,height:t.height*a,fontSize:t.fontSize*a},y={x:t.x,y:t.y,width:t.width,height:t.height,fontSize:t.fontSize};for(var x in c){let E=c[x],S=y[x];if(r.type==="exit"){const w=E;E=S,S=w}const b=S-E;i[x]=E+e/r.duration*b}return i},cameraZoom:({dTime:e,element:t,animation:r})=>{var n,i,a;const l={},o=r.data.direction||"right",u=b4[o]||b4.right,d=(n=r.data.movementStrength)!==null&&n!==void 0?n:.1,f=(i=r.data.shakeStrength)!==null&&i!==void 0?i:.015;a=r.data.zoomStrength;const v=e/r.duration,g=f*(1-v),c=Math.sin(12*v)*g*.7+Math.sin(8*v)*g*.3;r.type==="exit"&&Math.max(t.cropWidth||1,t.cropHeight||1),r.type;const y=1-Math.pow(1-v,2),x=t.cropX||0,E=t.cropY||0,S=t.cropWidth||1,b=t.cropHeight||1,w=S,_=b;let A,M,O=0,L=0;if(u.cropX){const R=u.cropX>0?1-(x+S):x;O=Math.min(R,Math.abs(d))*u.cropX}if(u.cropY){const R=u.cropY>0?1-(E+b):E;L=Math.min(R,Math.abs(d))*u.cropY}return r.type==="enter"?(A=u.cropX?x+O*(1-y):x,M=u.cropY?E+L*(1-y):E):(A=u.cropX?x+O*y:x,M=u.cropY?E+L*y:E),l.cropX=Math.max(0,Math.min(1-w,A+c*w)),l.cropY=Math.max(0,Math.min(1-_,M+c*_)),l.cropWidth=w,l.cropHeight=_,l}},W2=({element:e,dTime:t,animation:r})=>{const n=vN[r.name];return n?n({element:e,dTime:t,animation:r}):(console.error("Can not find animation type: "+r.name),{})},mN=Jt.model("Animation",{delay:0,duration:500,enabled:!0,type:Jt.enumeration("Type",["enter","exit","loop"]),name:"none",data:Jt.frozen({})}),Y2=(e,t)=>{const r={};for(const n in t)if(typeof e[n]=="number"&&typeof t[n]=="number"){const i=t[n]-e[n];i!==0&&(r[n]=i)}return r},yN=Jt.model("ShapeFilter",{intensity:1}),w4=["temperature","contrast","highlights","shadows","white","black","saturation","vibrance"],kp=k_.named("Shape").props({x:0,y:0,width:100,height:100,rotation:0,opacity:1,animations:Jt.array(mN),blurEnabled:!1,blurRadius:10,brightnessEnabled:!1,brightness:0,sepiaEnabled:!1,grayscaleEnabled:!1,filters:Jt.map(yN),shadowEnabled:!1,shadowBlur:5,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"black",shadowOpacity:1,visible:!0,draggable:!0,resizable:!0,selectable:!0,contentEditable:!0,styleEditable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(e=>{const t=Object.assign(Object.assign({},e),{x:e.x||0,y:e.y||0,filters:Array.isArray(e.filters)?{}:e.filters});return"width"in e&&(t.width=t.width||1),"height"in e&&(t.height=t.height||1),e.locked&&(t.draggable=!1,t.contentEditable=!1,t.styleEditable=!1,t.resizable=!1,t.removable=!1),t}).views(e=>{const t=$r({x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,color:e.color,fontSize:e.fontSize}),r=Wr(i=>{Object.assign(t,i)}),n=Wr(i=>{for(const a in i)typeof t[a]=="number"&&(t[a]=t[a]+i[a])});return{get a(){const{currentTime:i}=e.store;if(r({x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,color:e.color,fontSize:e.fontSize,cropX:e.cropX,cropY:e.cropY,cropWidth:e.cropWidth,cropHeight:e.cropHeight}),i===0)return t;const a=i-e.page.startTime;if(a>e.page.duration||a<0)return t;const l=e.store.animatedElementsIds;if(l.length&&!l.includes(e.id))return t;const o=e.animations.find(g=>g.type==="enter"),u=o?.enabled&&a<o.delay;u&&r({opacity:0});const d=o?.enabled&&a>=o.delay&&a<=o.delay+o.duration;if(d){const g=a-o.delay,c=W2({element:e,animation:o,dTime:g}),y=Y2(e,c);n(y)}const f=e.animations.find(g=>g.type==="exit");if(!u&&!d&&f?.enabled&&a>=e.page.duration-f.duration-f.delay&&a<=e.page.duration-f.delay){const g=a-(e.page.duration-f.duration-f.delay),c=W2({element:e,animation:f,dTime:g}),y=Y2(e,c);n(y)}f?.enabled&&a>=e.page.duration-f.delay&&r({opacity:0});const v=e.animations.find(g=>g.type==="loop");if(v?.enabled){const g=W2({element:e,animation:v,dTime:a}),c=Y2(e,g);n(c)}return t},animated:i=>e.a[i]}}).actions(e=>({setAnimation(t,r){const n=e.animations.find(i=>i.type===t);n?Object.assign(n,r):e.animations.push(Object.assign({type:t},r))},setFilter(t,r){w4.includes(t)||e.filters.forEach((n,i)=>{w4.includes(i.toString())||e.filters.delete(i.toString())}),r==null?e.filters.delete(t):e.filters.set(t,{intensity:r})}})),O_=kp.named("Text").props({type:"text",text:"",placeholder:"",fontSize:14,fontFamily:"Roboto",fontStyle:"normal",fontWeight:"normal",textDecoration:"",textTransform:"none",fill:"black",align:"center",width:100,height:0,verticalAlign:"top",strokeWidth:0,stroke:"black",lineHeight:Jt.optional(Jt.union(Jt.number,Jt.string),1.2),letterSpacing:0,_editModeEnabled:!1,backgroundEnabled:!1,backgroundColor:"#7ED321",backgroundOpacity:1,backgroundCornerRadius:.5,backgroundPadding:.5}).preProcessSnapshot(e=>Object.assign({},e)).actions(e=>({toggleEditMode(t){e._editModeEnabled=t??!e._editModeEnabled,e._editModeEnabled?e.store.history.startTransaction():e.store.history.endTransaction()}})),O0=kp.named("Image").props({type:"image",width:100,height:100,src:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,cornerRadius:0,flipX:!1,flipY:!1,clipSrc:"",borderColor:"black",borderSize:0,keepRatio:!1,stretchEnabled:!1,_cropModeEnabled:!1}).actions(e=>({toggleCropMode(t){e._cropModeEnabled=t??!e._cropModeEnabled,e._cropModeEnabled?e.store.history.startTransaction():e.store.history.endTransaction()},beforeDestroy(){e._cropModeEnabled&&e.store.history.endTransaction()}})),C_=O0.named("Video").props({type:"video",duration:0,startTime:0,endTime:1,volume:1}),N_=kp.named("Line").props({type:"line",width:400,height:10,color:"black",dash:Jt.array(Jt.number),startHead:"",endHead:""}).actions(e=>({})),L_=kp.named("SVG").props({type:"svg",src:"",maskSrc:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,keepRatio:!0,stretchEnabled:!0,flipX:!1,flipY:!1,width:100,height:100,borderColor:"black",borderSize:0,cornerRadius:0,colorsReplace:Jt.map(Jt.string)}).preProcessSnapshot(e=>Object.assign(Object.assign({},e),{src:e.src||e.svgSource,colorsReplace:Array.isArray(e.colorsReplace)?{}:e.colorsReplace})).actions(e=>({replaceColor(t,r){e.colorsReplace.set(t,r)}})),T_=kp.named("Figure").props({type:"figure",subType:"rect",fill:"rgb(0, 161, 255)",dash:Jt.array(Jt.number),strokeWidth:0,stroke:"rgba(98, 197, 255, 1)",cornerRadius:0}),R_=O0.named("Gif").props({type:"gif",duration:0,keepRatio:!0});var bN=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};const Ei=(e,t)=>{if(e.children)for(const r of e.children){if(t(r)===!0)break;Ei(r,t)}},wN=[...new Array(20)].map((e,t)=>Jt.late(()=>_N[t])),M_=Jt.union({dispatcher:e=>{const t=Im[e.type];if(!t)throw new Error(`Unknown element type: "${e.type}"`);return t}},L_,O_,O0,N_,C_,T_,R_,Jt.late(()=>Sh),...wN),Sh=k_.named("Group").props({type:"group",children:Jt.array(M_)}).views(e=>({get draggable(){let t=!0;return Ei(e,r=>{r.draggable||(t=!1)}),t},get resizable(){let t=!0;return Ei(e,r=>{r.resizable||(t=!1)}),t},get contentEditable(){let t=!0;return Ei(e,r=>{r.contentEditable||(t=!1)}),t},get styleEditable(){let t=!0;return Ei(e,r=>{r.styleEditable||(t=!1)}),t},get locked(){let t=!0;return Ei(e,r=>{r.locked||(t=!1)}),t}})).actions(e=>({set(t){var{draggable:r,contentEditable:n,styleEditable:i,resizable:a}=t,l=bN(t,["draggable","contentEditable","styleEditable","resizable"]);r!==void 0&&Ei(e,o=>{o.set({draggable:r})}),n!==void 0&&Ei(e,o=>{o.set({contentEditable:n})}),i!==void 0&&Ei(e,o=>{o.set({styleEditable:i})}),a!==void 0&&Ei(e,o=>{o.set({resizable:a})}),Object.assign(e,l)},addElement(t,{skipSelect:r=!1}={}){const n=Im[t.type];if(!n)return void console.error("Can not find model with type "+t.type);t.children&&t.children.forEach(a=>{a.id=a.id||ul(10)});const i=n.create(Object.assign({id:ul(10)},t));return e.children.push(i),i.selectable&&!r&&e.store.selectElements([i.id]),i},setElementZIndex(t,r){const n=e.children.find(i=>i.id===t);n&&(Lf(n),e.children.remove(n),e.children.splice(r,0,n))}})),_N=[],Im={svg:L_,text:O_,image:O0,group:Sh,line:N_,video:C_,figure:T_,gif:R_},xN={text:Rk,image:Bb,svg:Bb,line:gC,video:wC,figure:LC,group:Yn(e=>{const{element:t,store:r}=e,{children:n}=t,i=t.selectable||r.role==="admin";return ce.createElement(vn,{opacity:t.opacity,listening:i,hideInExport:!t.showInExport},n.map(a=>ce.createElement(I_,Object.assign({},e,{key:a.id,store:r,element:a}))))}),gif:DC},SN=(e,t)=>{const r=[];Ei(e,f=>{f.type!=="group"&&r.push(f.a)});const n=[];r.forEach(f=>{const v=[{x:0,y:0},{x:0+f.width,y:0},{x:0+f.width,y:0+f.height},{x:0,y:0+f.height}],g=new sr.Transform;g.translate(f.x,f.y),g.rotate(sr.Util.degToRad(f.rotation)),v.forEach(c=>{const y=g.point(c);n.push(y)})});const i=new sr.Transform;i.rotate(-sr.Util.degToRad(t));let a=1/0,l=1/0,o=-1/0,u=-1/0;n.forEach(f=>{const v=i.point(f);a=Math.min(a,v.x),l=Math.min(l,v.y),o=Math.max(o,v.x),u=Math.max(u,v.y)}),i.invert();const d=i.point({x:a,y:l});return{x:d.x,y:d.y,width:o-a,height:u-l,rotation:t}},I_=Yn(e=>{var t;const{element:r,store:n}=e,[i,a]=ce.useState(!1),l=n.selectedElements.indexOf(r)>=0&&r.selectable,o=((t=r.parent)===null||t===void 0?void 0:t.type)==="group",u=(v=>{const[g,c]=ce.useState(null);return ce.useEffect(()=>{const y=setTimeout(()=>{const x=v.page.id,E=sr.stages.find(S=>S.getAttr("pageId")===x);E||console.error("No stage is found for element",v.id),c(E)});return()=>clearTimeout(y)},[v.id]),g})(r),d=u?.findOne("Transformer");ce.useEffect(()=>{if(u){const v=c=>{const y=c.target.findAncestor(".element",!0),x=n.getElementById(y?.id()),E=x?.top,S=E?.id;a(S===r.id)};u.on("mouseover",v);const g=()=>{a(!1)};return u.on("mouseleave",g),()=>{u.off("mouseover",v),u.off("mouseleave",g)}}},[u]);let f=xN[e.element.type];return e.element.type==="text"&&Ai.htmlRenderEnabled&&(f=oC),e.element.visible?f?ce.createElement(ce.Fragment,null,ce.createElement(f,Object.assign({},e)),(i||l)&&!o&&ce.createElement(zC,{element:r.type==="group"?{a:SN(r,d?.rotation()||0)}:r})):(console.error("Can not find component for "+e.element.type),null):null});function EN(e,t,r="scale"){const n=t.width/t.height;let i,a;n>=e.width/e.height?(i=e.width,a=e.width/n):(i=e.height*n,a=e.height);let l=0,o=0;return r==="left-top"?(l=0,o=0):r==="left-middle"?(l=0,o=(e.height-a)/2):r==="left-bottom"?(l=0,o=e.height-a):r==="center-top"?(l=(e.width-i)/2,o=0):r==="center-middle"?(l=(e.width-i)/2,o=(e.height-a)/2):r==="center-bottom"?(l=(e.width-i)/2,o=e.height-a):r==="right-top"?(l=e.width-i,o=0):r==="right-middle"?(l=e.width-i,o=(e.height-a)/2):r==="right-bottom"?(l=e.width-i,o=e.height-a):r==="scale"?(l=0,o=0,i=e.width,a=e.height):console.error(new Error("Unknown clip position property - "+r)),{cropX:l,cropY:o,cropWidth:i,cropHeight:a}}var F_=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};const _4=sr.DD._drag;window.removeEventListener("mousemove",_4),sr.DD._drag=function(e){tc(()=>{_4.call(this,e)})},window.addEventListener("mousemove",sr.DD._drag);const Uv=new sr.Group,Xc=20;Uv.add(new sr.Rect({width:Xc,height:Xc,fill:"white"})),Uv.add(new sr.Path({scaleX:Xc/24,scaleY:Xc/24,data:"M4.98313549,11.0001422 C5.49589839,10.9914935 5.92501998,11.3703506 5.99116425,11.8666444 L5.99985778,11.9831355 L6.00348884,12.2068855 C6.11245031,15.4321748 8.76323537,17.9999971 11.9999971,17.9999971 C12.1869612,17.9999971 12.3726725,17.9914753 12.5567465,17.9745765 L12.2928932,17.7071068 C11.9023689,17.3165825 11.9023689,16.6834175 12.2928932,16.2928932 C12.6834175,15.9023689 13.3165825,15.9023689 13.7071068,16.2928932 L15.7071068,18.2928932 C16.0976311,18.6834175 16.0976311,19.3165825 15.7071068,19.7071068 L13.7071068,21.7071068 C13.3165825,22.0976311 12.6834175,22.0976311 12.2928932,21.7071068 C11.9023689,21.3165825 11.9023689,20.6834175 12.2928932,20.2928932 L12.6111505,19.9769552 C12.4086045,19.9922816 12.2047796,19.9999971 11.9999971,19.9999971 C7.7687005,19.9999971 4.28886152,16.7094374 4.01666425,12.5105203 L4.00420123,12.2575143 L4.00014222,12.0168645 C3.9908282,11.4646583 4.43092928,11.0094562 4.98313549,11.0001422 Z M11.7071068,2.29289322 C12.0675907,2.65337718 12.0953203,3.22060824 11.7902954,3.61289944 L11.7071068,3.70710678 L11.3891629,4.0230186 C11.5916051,4.00770767 11.7953244,4 12,4 C16.418278,4 20,7.581722 20,12 C20,12.5522847 19.5522847,13 19,13 C18.4477153,13 18,12.5522847 18,12 C18,8.6862915 15.3137085,6 12,6 C11.8129339,6 11.6271216,6.00853145 11.4429483,6.02544919 L11.7071068,6.29289322 C12.0976311,6.68341751 12.0976311,7.31658249 11.7071068,7.70710678 C11.3466228,8.06759074 10.7793918,8.09532028 10.3871006,7.79029539 L10.2928932,7.70710678 L8.29289322,5.70710678 C7.93240926,5.34662282 7.90467972,4.77939176 8.20970461,4.38710056 L8.29289322,4.29289322 L10.2928932,2.29289322 C10.6834175,1.90236893 11.3165825,1.90236893 11.7071068,2.29289322 Z",fill:"black"}));const AN=Uv.toCanvas({pixelRatio:2,width:Xc,height:Xc}),X2={enabledAnchors:["top-left","top-center","top-right","middle-left","bottom-left","bottom-right","bottom-center","middle-right"],borderEnabled:!0,rotateEnabled:!0,rotationSnaps:[0,45,90,135,180,225,270,315],ignoreStroke:!0,flipEnabled:!1,anchorStrokeWidth:2,borderStrokeWidth:2,rotateAnchorOffset:30,anchorStyleFunc:e=>{e.hasName("rotater")&&e.setAttrs({width:20,height:20,cornerRadius:20/2,offsetX:20/2,offsetY:20/2,fillPatternImage:AN,fillPatternScaleX:20/Xc/2,fillPatternScaleY:20/Xc/2,fillPriority:"pattern",fillPatternRepeat:"no-repeat"})}},K2={text:{enabledAnchors:["top-left","top-right","middle-left","bottom-left","bottom-right","middle-right"]},svg:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},gif:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},line:{enabledAnchors:[],borderEnabled:!1,rotateEnabled:!1},image:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},many:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},group:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]}},PN=e=>ce.createElement(En,Object.assign({},e,{preventDefault:!1})),kN=e=>{var{url:t}=e,r=F_(e,["url"]);const[n,i]=ym(t,"anonymous"),a=n?EN(n,{width:r.width,height:r.height},"center-middle"):{};return Jd(i,t,"page background"),ce.createElement(bu,Object.assign({image:n},r,a))},ON=e=>{const t=tf({fill:e.fill,a:{width:e.width,height:e.height}});return ce.createElement(En,Object.assign({},e,t))},CN=e=>{const{background:t,scale:r,borderColor:n}=e,i=F_(e,["background","scale","borderColor"]),a=ce.useMemo(()=>!!sr.Util.colorToRGBA(t)||v0(t),[t]),l=ce.useMemo(()=>{const o=document.createElement("canvas"),u=30;o.width=60,o.height=60;const d=o.getContext("2d");return d&&(d.fillStyle="black",d.fillRect(u,0,u,u),d.fillRect(0,u,u,u)),o},[]);return ce.createElement(ce.Fragment,null,ce.createElement(En,Object.assign({fillPatternImage:l},i,{opacity:.1,hideInExport:!0})),a?ce.createElement(ON,Object.assign({fill:t},i)):ce.createElement(kN,Object.assign({url:t},i)))},NN=Yn(({selection:e,fill:t="rgba(0, 161, 255, 0.3)",stroke:r="rgb(0, 161, 255)",strokeWidth:n=1})=>e.visible?ce.createElement(En,{name:"selection",x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),width:Math.abs(e.x1-e.x2),height:Math.abs(e.y1-e.y2),fill:t,stroke:r,strokeWidth:n}):null),LN=Yn(({x:e,y:t,width:r,height:n,rotation:i,anchor:a,store:l,tagFill:o,textFill:u})=>{const d=A0({x:e,y:t,width:r,height:n,rotation:sr.Util.radToDeg(i)});if(a===void 0)return null;const f=(n/2+70)*Math.cos(i-Math.PI/2),v=(n/2+70)*Math.sin(i-Math.PI/2),g=h4({unit:l.unit,dpi:l.dpi,px:r/l.scale,precious:l.unit==="px"?0:1})+" x "+h4({unit:l.unit,dpi:l.dpi,px:n/l.scale,precious:l.unit==="px"?0:1})+(l.unit==="px"?"":" "+l.unit);return ce.createElement(ce.Fragment,null,ce.createElement(V1,{x:(d.minX+d.maxX)/2+f,y:(d.minY+d.maxY)/2+v,offsetX:14,offsetY:14,visible:a==="rotater"},ce.createElement(G1,{cornerRadius:5,fill:o||"rgb(0, 161, 255)"}),ce.createElement(Au,{align:"center",verticalAlign:"middle",fill:u||"white",padding:8,text:Math.round(sr.Util.radToDeg(i)).toString()+"°"})),ce.createElement(V1,{x:(d.minX+d.maxX)/2,y:d.maxY+20,visible:a!=="rotater"},ce.createElement(G1,{cornerRadius:5,fill:o||"rgb(0, 161, 255)",pointerDirection:"up",pointerHeight:0,pointerWidth:0}),ce.createElement(Au,{align:"center",verticalAlign:"middle",fill:u||"white",padding:8,text:g})))}),TN=Yn(({elements:e,store:t})=>{const r=e.filter(i=>i.alwaysOnTop),n=e.filter(i=>!i.alwaysOnTop).concat(r);return ce.createElement(ce.Fragment,null,n.map(i=>ce.createElement(I_,{key:i.id,store:t,element:i,onClick:()=>{console.warn("Polotno warning: onClick callback is deprecated. Just stop using it. Polotno will do selection automatically.")}})))}),RN=({store:e})=>{const[t,r]=ce.useState(!1),[n,i]=ce.useState({x:0,y:0});return{open:ce.useCallback(l=>{r(!0),i(l)},[]),close:ce.useCallback(()=>{r(!1)},[]),props:{isOpen:t,offset:n,setIsOpen:r}}},MN=atob("UG9sb3RubyBmcmVlIGxpY2Vuc2UgbGltaXRhdGlvbiBleGNlZWRlZCAtIFBsZWFzZSB1cGdyYWRlIHlvdXIgYWNjb3VudC4="),x4=atob("cmVk"),IN=atob("djAuOS4y"),FN=e=>ce.createElement(ce.Fragment,null,ce.createElement(V1,{fill:x4,height:200},ce.createElement(G1,{fill:x4}),ce.createElement(Au,Object.assign({},e,{fill:"white",text:MN,height:void 0,padding:10,fontSize:20})))),jN=Yn(({store:e,page:t,width:r,height:n,pageControlsEnabled:i,backColor:a,pageBorderColor:l,activePageBorderColor:o,components:u,bleedColor:d,altCloneEnabled:f,viewportSize:v,selectionRectFill:g,selectionRectStroke:c,selectionRectStrokeWidth:y,snapGuideStroke:x,snapGuideStrokeWidth:E,snapGuideDash:S,transformLabelFill:b,transformLabelTextFill:w,distanceGuideStroke:_,distanceLabelFill:A,distanceLabelTextFill:M})=>{const O=e.bleedVisible?t.bleed:0,L=t.computedWidth+2*O,R=t.computedHeight+2*O,T=(r-L*e.scale)/2,k=(n-R*e.scale)/2,C=ce.useRef(null),q=ce.useRef(null),G=ce.useRef(null),J=i==null||i,[ae,H]=ce.useState(null),[V,Y]=ce.useState({}),U=RN({store:e}),D=e.selectedElements.find(Ae=>Ae._cropModeEnabled),j=e.selectedShapes.filter(Ae=>!Ae.resizable).length>0,z=e.selectedShapes.filter(Ae=>!Ae.draggable).length>0,Z=e.selectedElements.filter(Ae=>!Ae.visible).length>0;ce.useLayoutEffect(()=>{var Ae,be,_e;if(!C.current)return;const xe=C.current.getStage(),Le=e.selectedShapes.map(Ce=>Ce._cropModeEnabled?null:xe.findOne("#"+Ce.id)).filter(Ce=>Ce),pe=e.selectedElements.length===1&&((Ae=e.selectedElements[0])===null||Ae===void 0?void 0:Ae.type)||"many";K2[pe]?(C.current.setAttrs(Object.assign(Object.assign({},X2),K2[pe])),pe!=="svg"&&pe!=="image"&&pe!=="gif"||e.selectedElements[0].keepRatio||C.current.setAttrs({enabledAnchors:X2.enabledAnchors}),pe==="text"&&Ai.textVerticalResizeEnabled&&C.current.setAttrs({enabledAnchors:(be=K2.text.enabledAnchors)===null||be===void 0?void 0:be.concat(["bottom-center"])})):C.current.setAttrs(X2),j&&C.current.enabledAnchors([]),z&&C.current.rotateEnabled(!1),Le.find(Ce=>Ce?.isDragging())&&Le.forEach(Ce=>{Ce.isDragging()||Ce==null||Ce.startDrag()}),C.current.nodes(Le),c_(),(_e=C.current.getLayer())===null||_e===void 0||_e.batchDraw()},[e.selectedShapes,D,j,Z,z]);const re=yS(()=>({visible:!1,x1:0,y1:0,x2:0,y2:0})),W=ce.useRef(!1),Q=lf(),se=Wr(Ae=>{var be,_e,xe,Le;if(Q)return;W.current=!1;const pe=Ae.target.findAncestor(".elements-container"),Ce=Ae.target.findAncestor("Transformer"),je=Ae.target.findAncestor(".page-abs-container");if(pe||Ce||je)return;const He=(be=Ae.target.getStage())===null||be===void 0?void 0:be.getPointerPosition();He.x-=(_e=Ae.target.getStage())===null||_e===void 0?void 0:_e.x(),He.y-=(xe=Ae.target.getStage())===null||xe===void 0?void 0:xe.y(),He&&(re.visible=!0,re.x1=He.x,re.y1=He.y,re.x2=He.x,re.y2=He.y,((Le=Ae.target.getStage())===null||Le===void 0?void 0:Le.getPointersPositions().length)>=2&&(re.visible=!1))});(({stageRef:Ae,containerRef:be,viewportSize:_e})=>{ce.useEffect(()=>{var xe;const Le=(xe=be.current)===null||xe===void 0?void 0:xe.closest(".polotno-workspace-inner");function pe(){var Ce;if(!Ae.current)return;const je=(Ce=be.current)===null||Ce===void 0?void 0:Ce.getBoundingClientRect(),He=Le?.getBoundingClientRect(),st=Math.max(0,He.left-je.left-100),pt=Math.max(0,He.top-je.top-100);Ae.current.position({x:-st,y:-pt}),Ae.current.container().style.transform=`translate(${st}px, ${pt}px)`}return pe(),Le.addEventListener("scroll",pe),()=>{Le.removeEventListener("scroll",pe)}},[_e.width,_e.height])})({stageRef:q,containerRef:G,viewportSize:v}),ce.useEffect(()=>{const Ae=Wr(_e=>{var xe,Le,pe,Ce;if(!re.visible)return;(xe=q.current)===null||xe===void 0||xe.setPointersPositions(_e);let je=(Le=q.current)===null||Le===void 0?void 0:Le.getPointerPosition();je?(je.x-=(pe=q.current)===null||pe===void 0?void 0:pe.x(),je.y-=(Ce=q.current)===null||Ce===void 0?void 0:Ce.y()):je={x:re.x2,y:re.y2},re.x2=je.x,re.y2=je.y}),be=Wr(()=>{if(!re.visible||!q.current)return;const _e=q.current.findOne(".selection"),xe=_e?_e.getClientRect():{width:0,height:0,x:0,y:0};if(xe.width&&xe.height){const Le=[];q.current.find(".element").forEach(Ce=>{const je=Ce.getClientRect(),He=e.getElementById(Ce.id()),st=He?.draggable,pt=He?.selectable;sr.Util.haveIntersection(xe,je)&&st&&pt&&Le.push(He.top.id)});const pe=[...new Set(Le)];e.selectElements(pe)}re.visible=!1,W.current=!0});return window.addEventListener("mousemove",Ae),window.addEventListener("touchmove",Ae),window.addEventListener("mouseup",be),window.addEventListener("touchend",be),()=>{window.removeEventListener("mousemove",Ae),window.removeEventListener("touchmove",Ae),window.removeEventListener("mouseup",be),window.removeEventListener("touchend",be)}},[]);const ue=ce.useRef(!1);ce.useEffect(()=>{var Ae;let be;const _e=(Ae=G.current)===null||Ae===void 0?void 0:Ae.closest(".polotno-workspace-inner"),xe=()=>{ue.current=!0,clearTimeout(be),be=setTimeout(()=>{ue.current=!1},300)};return _e.addEventListener("scroll",xe),()=>{clearTimeout(be),_e.removeEventListener("scroll",xe)}},[]);const le=Ae=>{if(e.activePage!==t&&t.select(),ue.current||W.current)return;const be=Ae.evt.ctrlKey||Ae.evt.metaKey||Ae.evt.shiftKey,_e=Ae.target.findAncestor(".elements-container"),xe=Ae.target.findAncestor(".page-abs-container"),Le=Ae.target.findAncestor("Transformer");if(!(be||_e||Le||xe))return void e.selectElements([]);const pe=Ae.target.findAncestor(".element",!0),Ce=e.getElementById(pe?.id()),je=Ce?.top,He=je?.id,st=e.selectedElementsIds.indexOf(He)>=0;He&&be&&!st?e.selectElements(e.selectedElementsIds.concat([He])):He&&be&&st?e.selectElements(e.selectedElementsIds.filter(pt=>pt!==He)):!He||be||st||e.selectElements([He])};hC(C,e,{stroke:x,strokeWidth:E,dash:S});const ye=e.activePage===t,Re=u?.PageControls,Me=u?.Tooltip,Pe=u?.ContextMenu,de=1/e.scale,Te=0/e.scale;return ce.createElement("div",{ref:G,onDragOver:Ae=>Ae.preventDefault(),onDrop:Ae=>{if(Ae.preventDefault(),!q.current)return;q.current.setPointersPositions(Ae),q.current.findOne(".elements-container").getRelativePointerPosition();const be=q.current.getPointerPosition(),_e=q.current.getAllIntersections(be).map(Le=>Le.findAncestor(".element",!0)).filter(Boolean);[...new Set(_e.reverse())].map(Le=>e.getElementById(Le.id()))[0]},style:{position:"relative",width:r+"px",height:n+"px",overflow:"hidden"},className:"polotno-page-container"+(ye?" active-page":"")},ce.createElement(hA,{ref:q,width:Math.min(r,v.width+200),height:Math.min(v.height+200,n),onClick:le,onTap:le,onContextMenu:Ae=>{Ae.evt.preventDefault();const be=Ae.target.findAncestor(".element",!0),_e=e.getElementById(be?.id()),xe=_e?.top,Le=xe?.id;Le?e.selectedElementsIds.indexOf(Le)>=0||e.selectElements([Le]):e.selectElements([]),U.open({x:Ae.evt.clientX,y:Ae.evt.clientY})},onMouseDown:se,onMouseMove:Ae=>{if(!Ae.evt.altKey&&ae)return void H(null);if(!Ae.evt.altKey)return;const be=Ae.target.findAncestor(".element",!0),_e=be?.id();if(!e.selectedElements[0]||e.selectedElementsIds.includes(_e))return;const xe=P0(e.selectedShapes),Le=_e?e.getElementById(_e):{x:0,y:0,width:t.computedWidth,height:t.computedHeight,rotation:0},pe=A0(Le),Ce=[];xe.minX>pe.maxX&&Ce.push({distance:xe.minX-pe.maxX,box1:xe,box2:pe,points:[{x:xe.minX,y:xe.minY+xe.height/2},{x:pe.maxX,y:xe.minY+xe.height/2},{x:pe.maxX,y:pe.minY+pe.height/2}]}),xe.maxX<pe.minX&&Ce.push({distance:pe.minX-xe.maxX,box1:xe,box2:pe,points:[{x:xe.maxX,y:xe.minY+xe.height/2},{x:pe.minX,y:xe.minY+xe.height/2},{x:pe.minX,y:pe.minY+pe.height/2}]}),xe.minY>pe.maxY&&Ce.push({box1:xe,box2:pe,distance:xe.minY-pe.maxY,points:[{x:xe.minX+xe.width/2,y:xe.minY},{x:xe.minX+xe.width/2,y:pe.maxY},{x:pe.minX+pe.width/2,y:pe.maxY}]}),xe.maxY<pe.minY&&Ce.push({box1:xe,box2:pe,distance:pe.minY-xe.maxY,points:[{x:xe.minX+xe.width/2,y:xe.maxY},{x:xe.minX+xe.width/2,y:pe.minY},{x:pe.minX+pe.width/2,y:pe.minY}]}),xe.minX>=pe.minX&&xe.maxX<=pe.maxX&&xe.minY>=pe.minY&&xe.maxY<=pe.maxY&&(Ce.push({distance:xe.minX-pe.minX,box1:xe,box2:pe,points:[{x:xe.minX,y:xe.minY+xe.height/2},{x:pe.minX,y:xe.minY+xe.height/2},{x:pe.minX,y:pe.minY+pe.height/2}]}),Ce.push({distance:pe.maxX-xe.maxX,box1:xe,box2:pe,points:[{x:xe.maxX,y:xe.minY+xe.height/2},{x:pe.maxX,y:xe.minY+xe.height/2},{x:pe.maxX,y:pe.minY+pe.height/2}]}),Ce.push({box1:xe,box2:pe,distance:xe.minY-pe.minY,points:[{x:xe.minX+xe.width/2,y:xe.minY},{x:xe.minX+xe.width/2,y:pe.minY},{x:pe.minX+pe.width/2,y:pe.minY}]}),Ce.push({box1:xe,box2:pe,distance:pe.maxY-xe.maxY,points:[{x:xe.minX+xe.width/2,y:xe.maxY},{x:xe.minX+xe.width/2,y:pe.maxY},{x:pe.minX+pe.width/2,y:pe.maxY}]})),JSON.stringify(ae)!==JSON.stringify(Ce)&&H(Ce)},onDragStart:Ae=>{var be;const _e=Ae.target.findAncestor(".element",!0);if(_e){const xe=e.getElementById(_e?.id()),Le=xe?.top,pe=Le?.id;!(e.selectedElementsIds.indexOf(pe)>=0)&&pe&&(e.selectElements([pe]),Ae.target.stopDrag(),Ae.target.startDrag(Ae),(be=C.current)===null||be===void 0||be.startDrag(Ae))}ae&&H(null)},pageId:t.id,style:{position:"absolute",overflow:"hidden",top:0,left:0}},ce.createElement(cA,null,ce.createElement(PN,{width:r,height:n,fill:a}),ce.createElement(vn,{x:T,y:k,scaleX:e.scale,scaleY:e.scale,name:"page-container"},ce.createElement(vn,{name:"page-container-2"},ce.createElement(vn,{name:"page-background-group",x:O,y:O},ce.createElement(CN,{x:-t.bleed,y:-t.bleed,width:t.computedWidth+2*t.bleed,height:t.computedHeight+2*t.bleed,background:t.background,name:"page-background",preventDefault:!1,scale:e.scale})),ce.createElement(vn,{x:O,y:O,name:"elements-container",listening:!e.isPlaying},ce.createElement(En,{name:"elements-area",width:t.computedWidth,height:t.computedHeight,listening:!1}),ce.createElement(TN,{elements:t.children,store:e})),ce.createElement(En,{stroke:d,name:"bleed",strokeWidth:t.bleed,x:t.bleed/2,y:t.bleed/2,width:t.computedWidth+t.bleed,height:t.computedHeight+t.bleed,listening:!1,visible:t.bleed>0&&e.bleedVisible,hideInExport:!0}),WC()===IN&&ce.createElement(FN,{name:"hit-detection",x:-de/2-Te,y:-de/2-Te,width:L+de+2*Te,height:R+de+2*Te}))),ce.createElement(Yc,{name:"workspace-background",points:[0,0,r,0,r,n,0,n,0,0,T,k,T,n-k,r-T,n-k,r-T,k,T,k],listening:!1,closed:!0,fill:a}),ce.createElement(vn,{x:T,y:k,scaleX:e.scale,scaleY:e.scale},ce.createElement(En,{name:"page-highlight",hideInExport:!0,x:-de/2-Te,y:-de/2-Te,width:L+de+2*Te,height:R+de+2*Te,stroke:ye&&e.pages.length>1?o:l,strokeWidth:2,listening:!1,strokeScaleEnabled:!1})),ce.createElement(vn,{x:T+O*e.scale,y:k+O*e.scale,scaleX:e.scale,scaleY:e.scale,name:"page-abs-container"},ce.createElement(lp,{ref:C,onDragStart:Ae=>{var be;!((be=Ae.evt)===null||be===void 0)&&be.altKey&&f&&e.selectedElements.forEach(_e=>{const xe=_e.clone({},{skipSelect:!0}),Le=t.children.indexOf(_e);t.setElementZIndex(xe.id,Le)}),e.history.startTransaction()},onDragEnd:()=>{e.history.endTransaction()},onTransformStart:()=>{e.history.startTransaction(),H(null)},boundBoxFunc:(Ae,be)=>{const _e=Math.abs(be.width)<1||Math.abs(be.height)<1,xe=Math.abs(Ae.width)<1||Math.abs(Ae.height)<1;return _e&&!xe?Ae:be},onTransform:Ae=>{var be,_e;const xe=C.current.nodes(),Le=xe[xe.length-1];if(Ae.target!==Le)return;const pe=(be=C.current)===null||be===void 0?void 0:be.__getNodeRect(),Ce=(_e=C.current)===null||_e===void 0?void 0:_e.getActiveAnchor();Y({anchor:Ce,x:pe.x,y:pe.y,rotation:pe.rotation,width:pe.width,height:pe.height})},onTransformEnd:Ae=>{Y({}),e.history.endTransaction()},visible:!e.isPlaying}),ae&&ae.map(({points:Ae,distance:be,box1:_e,box2:xe},Le)=>ce.createElement(vn,{name:"distances-container",hideInExport:!0,key:Le,listening:!1},ce.createElement(En,Object.assign({},_e,{stroke:_,strokeWidth:1,strokeScaleEnabled:!1})),ce.createElement(En,Object.assign({},xe,{stroke:_,strokeWidth:1,strokeScaleEnabled:!1})),ce.createElement(Yc,{points:[Ae[0].x,Ae[0].y,Ae[1].x,Ae[1].y],stroke:_,strokeWidth:1,strokeScaleEnabled:!1}),ce.createElement(Yc,{points:[Ae[1].x,Ae[1].y,Ae[2].x,Ae[2].y],stroke:_,strokeWidth:1,strokeScaleEnabled:!1}),ce.createElement(V1,{x:(Ae[0].x+Ae[1].x)/2,y:(Ae[0].y+Ae[1].y)/2,offsetY:-10,scaleX:1/e.scale,scaleY:1/e.scale},ce.createElement(G1,{cornerRadius:5,fill:A,pointerDirection:"down"}),ce.createElement(Au,{align:"center",verticalAlign:"middle",fill:M,padding:5,text:rN({unit:e.unit,dpi:e.dpi,px:be})})))),t._rendering&&ce.createElement(vn,null,ce.createElement(En,{width:L,height:R,fill:"rgba(255,255,255,0.9)"}),ce.createElement(Au,{text:"Rendering...",fontSize:60,width:L,height:R,align:"center",verticalAlign:"middle"})),Me&&ce.createElement(Me,{components:u,store:e,page:t,stageRef:q}),Pe&&ce.createElement($1,null,ce.createElement(Pe,Object.assign({components:u,store:e},U.props)))),ce.createElement(LN,Object.assign({},V,{store:e,tagFill:b,textFill:w})),ce.createElement(NN,{selection:re,fill:g,stroke:c,strokeWidth:y}),YC()&&ce.createElement(Au,{text:"Powered by polotno.com",fontSize:14,fill:"rgba(0,0,0,0.6)",x:r-170,y:n-18,onMouseEnter:Ae=>{Ae.target.getStage().container().style.cursor="pointer"},onMouseLeave:Ae=>{Ae.target.getStage().container().style.cursor=""},onTouchStart:Ae=>{Ae.cancelBubble=!0},onMouseDown:Ae=>{Ae.cancelBubble=!0},onClick:()=>{window.open("https://polotno.com")},onTap:()=>{window.open("https://polotno.com")}}),ce.createElement(vn,{name:"line-guides"}))),J&&Re&&ce.createElement(Re,{store:e,page:t,xPadding:T,yPadding:k}))}),DN=Uh("div",ce.forwardRef)`
|
|
374
|
+
`};async function dN({json:e,elementHook:t,fontEmbedding:r="inline"}){const n=await hN({json:e,elementHook:t,fontEmbedding:r});return P_({dom:n})}const tp=Jt.model("Page",{id:Jt.identifier,children:Jt.array(Jt.late(()=>M_)),width:Jt.optional(Jt.union(Jt.number,Jt.literal("auto")),"auto"),height:Jt.optional(Jt.union(Jt.number,Jt.literal("auto")),"auto"),background:"white",bleed:0,custom:Jt.frozen(),duration:5e3,_exporting:!1,_rendering:!1,_forceMount:!1}).postProcessSnapshot(e=>{const t=Object.assign({},e),r={};for(var n in t)n[0]!=="_"&&(r[n]=e[n]);return r}).views(e=>({get store(){return kf(e,If)}})).views(e=>({get startTime(){let t=0;for(const r of e.store.pages){if(r.id===e.id)return t;t+=r.duration}return t},get _exportingOrRendering(){return e._exporting||e._rendering}})).views(e=>({get computedWidth(){return e.width==="auto"?e.store.width:e.width},get computedHeight(){return e.height==="auto"?e.store.height:e.height}})).actions(e=>({toJSON:()=>JSON.parse(JSON.stringify(wu(e))),_forEachElementUp(t,r){const n=t.map(i=>({id:i,index:e.children.findIndex(a=>a.id===i)}));n.sort((i,a)=>a.index-i.index);for(const{index:i}of n){if(i==-1)continue;const a=i<e.children.length-1&&e.children[i+1],l=t.indexOf(a?.id)>=0;i===e.children.length-1||l||r(i)}},_forEachElementDown(t,r){const n=t.map(i=>({id:i,index:e.children.findIndex(a=>a.id===i)}));n.sort((i,a)=>i.index-a.index);for(const{index:i}of n){if(i==-1)continue;const a=i>0&&e.children[i-1],l=t.indexOf(a?.id)>=0;i===0||l||r(i)}return!1}})).actions(e=>({clone(t={}){const r=e.toJSON();r.children.forEach(l=>{l.id=ul(10),Ai(l,o=>{o.id=ul(10)})});const n=Object.assign(Object.assign(Object.assign({},r),{id:ul(10)}),t),i=e.store.addPage(n),a=e.store.pages.indexOf(e);return i.setZIndex(a+1),i.select(),i},setZIndex(t){e.store.setPageZIndex(e.id,t)},set(t){Object.assign(e,t)},select(){e.store.selectPage(e.id)},addElement(t,{skipSelect:r=!1}={}){const n=Im[t.type];if(!n)return void console.error("Can not find model with type "+t.type);"children"in t&&Array.isArray(t.children)&&Ai(t,a=>{a.id=a.id||ul(10)});const i=n.create(Object.assign({id:ul(10)},t));return e.children.push(i),i.selectable&&!r&&e.store.selectElements([i.id]),i},canMoveElementsUp(t){let r=!1;return e._forEachElementUp(t,()=>{r=r||!0}),r},moveElementsUp(t){e._forEachElementUp(t,r=>{const n=e.children[r];Lf(n),e.children.splice(r+1,0,n)})},canMoveElementsTop(t){return this.canMoveElementsUp(t)},moveElementsTop(t){const r=[],n=[];e.children.forEach(i=>{t.indexOf(i.id)>=0?r.push(i):n.push(i)}),e.children.replace(n.concat(r))},canMoveElementsDown(t){let r=!1;return e._forEachElementDown(t,()=>{r=r||!0}),r},moveElementsDown(t){e._forEachElementDown(t,r=>{const n=e.children[r];Lf(n),e.children.splice(r-1,0,n)})},canMoveElementsBottom(t){return this.canMoveElementsDown(t)},moveElementsBottom(t){const r=[],n=[];e.children.forEach(i=>{t.indexOf(i.id)>=0?r.push(i):n.push(i)}),e.children.replace(r.concat(n))},setElementZIndex(t,r){const n=e.children.find(i=>i.id===t);n&&(Lf(n),e.children.remove(n),e.children.splice(r,0,n))},setSize({width:t,height:r,useMagic:n,softChange:i}){if(n){const a=[],l=M=>M.type==="image"&&M.x<1&&M.y<1&&M.width>=e.computedWidth-2&&M.height>=e.computedHeight-2;Ai(e,M=>{M.type!=="group"&&(l(M)||a.push(M))});const o=a.length?P0(a):{x:0,y:0,width:e.computedWidth,height:e.computedHeight},u=1/4,d=Math.max(0,Math.min(o.x,e.computedWidth-o.x-o.width)),f=e.computedWidth*u,v=Math.max(0,d-f),g=Math.max(0,Math.min(o.y,e.computedHeight-o.y-o.height)),c=e.computedHeight*u,y=Math.max(0,g-c),x=e.computedWidth-2*v,E=e.computedHeight-2*y,S=t/x,b=r/E,w=Math.min(S,b),_=(t-x*w)/2-v*w,A=(r-E*w)/2-y*w;Ai(e,M=>{M.type!=="group"&&(l(M)?M.set({x:M.x*w,y:M.y*w,width:M.width*S,height:M.height*b,cropX:0,cropY:0,cropWidth:1,cropHeight:1}):(M.set({x:_+M.x*w,y:A+M.y*w,width:M.width*w,height:M.height*w}),M.type==="text"?M.set({fontSize:M.fontSize*w}):M.type==="figure"&&M.set({strokeWidth:M.strokeWidth*w})))})}i||(e.width=t),i||(e.height=r)}})).actions(e=>({moveElementUp(t){console.warn("page.moveElementUp(id) is deprecated. Please use page.moveElementsUp([id1, id2]) instead."),e.moveElementsUp([t])},moveElementDown(t){console.warn("page.moveElementDown(id) is deprecated. Please use page.moveElementsDown([id1, id2]) instead."),e.moveElementsDown([t])},moveElementTop(t){console.warn("page.moveElementTop(id) is deprecated. Please use page.moveElementsTop([id1, id2]) instead."),e.moveElementsTop([t])},moveElementBottom(t){console.warn("page.moveElementBottom(id) is deprecated. Please use page.moveElementsBottom([id1, id2]) instead."),e.moveElementsBottom([t])},play(){e.store.play({startTime:e.startTime,endTime:e.startTime+e.duration})}})),m4=Jt.model("Audio",{id:Jt.identifier,src:"",duration:0,startTime:0,endTime:1,volume:1,delay:0}).actions(e=>({toJSON:()=>Object.assign({},wu(e))})).actions(e=>({set(t){Object.assign(e,t)}}));var Hd=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};YA("ignore");const pN=Jt.model("Font",{fontFamily:Jt.string,url:Jt.optional(Jt.string,""),styles:Jt.frozen()}).preProcessSnapshot(e=>Object.assign(Object.assign({},e),{fontFamily:e.fontFamily||e.name})),If=Jt.model("Store",{role:"",pages:Jt.array(tp),fonts:Jt.array(pN),audios:Jt.array(m4),width:1080,height:1080,currentTime:0,isPlaying:!1,scale:1,scaleToFit:1,unit:"px",dpi:72,schemaVersion:2,bleedVisible:!1,rulesVisible:!1,openedSidePanel:"",previousOpenedSidePanel:"",custom:Jt.frozen(),selectedElementsIds:Jt.array(Jt.string),animatedElementsIds:Jt.array(Jt.string),history:Jt.optional(UC,{targetPath:"../pages"}),_elementsPixelRatio:Math.min(2,typeof window<"u"&&window.devicePixelRatio||1),_activePageId:"",_forceShowCredit:!1,_key:"",_validated:!1}).views(e=>{const t=qf(()=>{const r={};return Ai({children:e.pages},n=>(r[n.id]=n,!1)),r},{keepAlive:!0});return{get _idsMap(){return t.get()}}}).views(e=>({get _bleedVisible(){return console.warn("store._bleedVisible is deprecated. Please use store.bleedVisible instead."),e.bleedVisible},get selectedElements(){return e.selectedElementsIds.map(t=>{for(const r of e.pages)for(const n of r.children)if(n.id===t)return n}).filter(t=>!!t)},get children(){return e.pages},get selectedShapes(){const t=[];return Ai({children:e.selectedElements},r=>{r.type!=="group"&&t.push(r)}),t},get activePage(){return e.pages.slice().find(t=>t.id===e._activePageId)||(e.pages.length?e.pages[0]:null)},get duration(){let t=0;return e.pages.forEach(r=>{t+=r.duration}),t},get _hasCroppedImages(){return e.find(t=>t.type==="image"&&t._cropModeEnabled)},find(t){let r;return Ai({children:e.pages},n=>{if(!r&&t(n))return r=n,!0}),r},getElementById:t=>e._idsMap[t]})).actions(e=>{let t=0,r=null,n=!1;return{afterCreate(){e.history.canUndo},setCurrentTime(i){e.currentTime=i},_togglePlaying(i=!e.isPlaying){e.isPlaying=i},play({animatedElementsIds:i=[],startTime:a=0,currentTime:l=0,endTime:o=e.duration,repeat:u=!1}={}){l&&(console.warn("currentTime property of store.play() is deprecated. Please use startTime instead."),a=l),e.animatedElementsIds=i,e.currentTime=a,e.isPlaying=!0,t=Date.now(),r=o,n=u,requestAnimationFrame(e.seek)},checkActivePage(){let i=0;for(const a of e.pages){if(e.currentTime>=a.startTime&&e.currentTime<a.startTime+a.duration){e.selectPage(a.id);break}i+=a.duration}},seek(){if(!e.isPlaying)return;const i=Date.now(),a=i-t;t=i,e.currentTime+=a,e.checkActivePage();const l=r||e.duration;e.isPlaying&&e.currentTime<l?requestAnimationFrame(e.seek):e.isPlaying&&n?(e.currentTime=0,requestAnimationFrame(e.seek)):e.stop()},stop(){e.isPlaying=!1,e.currentTime=0,e.animatedElementsIds=[],e.checkActivePage()}}}).actions(e=>({__(){e._validated||(tN(e._key,e._forceShowCredit),e._validated=!0)},set(t){Object.assign(e,t)},setUnit({unit:t,dpi:r}){e.unit=t||e.unit,e.dpi=r||e.dpi},setRole(t){e.role=t},addPage(t){const r=tp.create(Object.assign({id:ul(10)},t));return e.pages.push(r),e._activePageId=r.id,r},selectPage(t){e._activePageId=t},selectElements(t){const r=t.map(n=>e.getElementById(n)).sort((n,i)=>n.page.children.indexOf(n)-n.page.children.indexOf(i)).filter(n=>!!n).map(n=>n.id);e.selectedElementsIds=r},toggleBleed(t){e.bleedVisible=t??!e.bleedVisible},toggleRulers(t){e.rulesVisible=t??!e.rulesVisible},openSidePanel(t){e.openedSidePanel!==t&&(e.previousOpenedSidePanel=e.openedSidePanel,e.openedSidePanel=t)},setScale(t){e.scale=t},_setScaleToFit(t){e.scaleToFit=t},setElementsPixelRatio(t){e._elementsPixelRatio=t},setSize(t,r,n){e.pages.forEach(i=>{i.setSize({width:t,height:r,useMagic:n,softChange:!0})}),e.width=t,e.height=r},setPageZIndex(t,r){const n=e.pages.find(i=>i.id===t);n&&(Lf(n),e.pages.remove(n),e.pages.splice(r,0,n))},deletePages(t){const r=e.pages.indexOf(e.activePage);t.forEach(a=>{const l=e.pages.find(o=>o.id===a);Cg(l)});const n=Math.min(e.pages.length-1,r),i=e.pages[n];i&&(e._activePageId=i.id),e.selectedElementsIds=e.selectedElementsIds.filter(a=>e.getElementById(a))},groupElements(t,r={}){const n=t.map(l=>e.getElementById(l)),i=n[0].page;if(n.forEach(l=>{l&&Lf(l)}),!n.length)return;const a=Object.assign({id:ul(10),children:n,type:"group"},r);return i.children.push(a),e.selectedElementsIds=[a.id],i.children.find(l=>l.id===a.id)},ungroupElements(t){const r=t.map(i=>e.getElementById(i)),n=[];r.forEach(i=>{if(i&&i.type==="group"){const a=i.page,l=a.children.indexOf(i);i.children.forEach(o=>{n.push(o.id)}),i.children.forEach(o=>{Lf(o),a.children.push(o)}),a.children.splice(l,1)}}),e.selectedElementsIds=n},deleteElements(t){const r=[];e.find(n=>(t.includes(n.id)&&r.push(n),!1)),r.forEach(n=>{Cg(n)}),e.selectedElementsIds=e.selectedElementsIds.filter(n=>e.getElementById(n))},on(t,r){if(t==="change"){let n=e.toJSON();return p8(e,i=>{const a=e.toJSON();!ep(n,a)&&(n=a,r(a))})}},async _toCanvas({pixelRatio:t,ignoreBackground:r,pageId:n,mimeType:i,includeBleed:a,_skipTimeout:l,quickMode:o=!1}={}){var u;const d=t||1;n=n||((u=e.pages[0])===null||u===void 0?void 0:u.id);const f=e.pages.find(k=>k.id===n);if(!f)throw new Error(`No page for export with id ${n}`);const v=e._elementsPixelRatio;d>e._elementsPixelRatio&&e.setElementsPixelRatio(d),o?f?.set({_forceMount:!0}):f?.set({_exporting:!0});const g=await nN(()=>sr.stages.find(k=>k.getAttr("pageId")===n));if(!g)throw f?.set({_forceMount:!1,_exporting:!1}),e.setElementsPixelRatio(v),new Error(`Export is failed. Can not find stage for page ${n}. Looks like <Workspace /> component is not mounted, but it is required in order to process the export.`);await e.waitLoading({_skipTimeout:l});const c=g.findOne(".page-container");if(!c)throw e.setElementsPixelRatio(v),f?.set({_forceMount:!1,_exporting:!1}),new Error("Export is failed. Canvas was unmounted.");const y=g.position();g.position({x:0,y:0}),g.find("Transformer").forEach(k=>{k.setAttr("oldVisible",k.visible()),k.visible(!1)}),c.find(".page-background").forEach(k=>k.shadowEnabled(!1)),c.find(".page-background").forEach(k=>k.strokeEnabled(!1)),c.find(".highlighter").forEach(k=>k.visible(!1));const x=c.findOne(".page-background-group"),E=x.clip();x.clip({x:null,y:null,width:null,height:null});const S=c.findOne(".elements-container"),b=S.clip();S.clip({x:null,y:null,width:null,height:null});const w=c.find(k=>!k.visible()&&k.getAttr("editModeEnabled")&&!k.getAttr("hideInExport"));w.forEach(k=>{k.setAttr("oldVisible",k.visible()),k.show()});const _=c.find(k=>k.getAttr("hideInExport"));_.forEach(k=>{k.setAttr("oldVisible",k.visible()),k.hide()}),r&&c.find(".page-background").forEach(k=>k.hide());const A=a?f.bleed:0;let M=A;!e.bleedVisible&&a||(e.bleedVisible||a?e.bleedVisible&&a?M=0:e.bleedVisible&&!a&&(M=-f.bleed):M=0);const O=document.createElement("canvas");O.width=Math.round((f.computedWidth+2*A)*d),O.height=Math.round((f.computedHeight+2*A)*d);const L=O.getContext("2d");i==="image/jpeg"&&(L.fillStyle="white",L.fillRect(0,0,O.width,O.height));const R=c.scale();c.scale({x:1,y:1});const T=c.toCanvas({x:c.x()-M,y:c.y()-M,width:f.computedWidth+2*A,height:f.computedHeight+2*A,pixelRatio:d});return c.scale(R),L.drawImage(T,0,0,O.width,O.height),sr.Util.releaseCanvas(T),r&&c.find(".page-background").forEach(k=>k.show()),_.forEach(k=>{k.visible(k.getAttr("oldVisible"))}),w.forEach(k=>{k.visible(k.getAttr("oldVisible"))}),c.find(".page-background").forEach(k=>k.shadowEnabled(!0)),c.find(".page-background").forEach(k=>k.strokeEnabled(!0)),g.find("Transformer").forEach(k=>{k.visible(k.getAttr("oldVisible"))}),c.find(".highlighter").forEach(k=>k.visible(!0)),x.clip(E),S.clip(b),g.position(y),f?.set({_exporting:!1,_forceMount:!1}),await new Promise(k=>setTimeout(k)),e.setElementsPixelRatio(v),O},async toDataURL(t={}){var{mimeType:r,quality:n}=t,i=Hd(t,["mimeType","quality"]);const a=await e._toCanvas(Object.assign({mimeType:r},i)),l=a.toDataURL(r,n);return sr.Util.releaseCanvas(a),l},async toBlob(t={}){var{mimeType:r,quality:n}=t,i=Hd(t,["mimeType","quality"]);const a=await e._toCanvas(Object.assign({mimeType:r},i)),l=await new Promise(o=>{a.toBlob(o,r,n)});return sr.Util.releaseCanvas(a),l},async saveAsImage(t={}){var{fileName:r}=t,n=Hd(t,["fileName"]);const i=n.mimeType||"image/png",a=i.split("/")[1];c1(await e.toDataURL(n),r||"polotno."+a)},async _toPDF(t){const r=t.dpi||e.dpi,n=t.parallel||1,i=t.unit||(e.unit==="px"?"mm":e.unit),a=t.pixelRatio||1,l=t.pageIds||e.pages.map(w=>w.id),o=e.pages.filter(w=>l.includes(w.id)),u=await qC(),d=w=>k0({px:w,unit:i,dpi:r}),f=t.cropMarkSize||0,v=d(f),g=o[0]||{},c=t.includeBleed?g.bleed:0,y=d(g.computedWidth+2*c+2*v),x=d(g.computedHeight+2*c+2*v);var E=new u({unit:i,orientation:y>x?"landscape":"portrait",format:[y,x],compress:!0,putOnlyUsedFonts:!0});E.deletePage(1);const S=((w,_)=>{for(var A=[],M=0;M<w.length;M+=_)A.push(w.slice(M,M+_));return A})(o,n);let b=0;for(const w of S){const _=w.map(async A=>{const M=t.includeBleed?A.bleed:0,O=A.computedWidth+2*M+2*f,L=A.computedHeight+2*M+2*f,R=d(O),T=d(L);let k=0,C=a;for(;k<10;){k+=1,k===2&&console.error("Polotno can not export PDF with current settings. Quality is automatically reduced.");const q=await e.toDataURL(Object.assign(Object.assign({},t),{pageId:A.id,pixelRatio:C}));if(q.length>20)return t.onProgress&&t.onProgress(++b/l.length*.9),{url:q,width:R,height:T,widthPx:O,heightPx:L};C*=.8}});(await Promise.all(_)).forEach(({url:A,width:M,height:O,widthPx:L,heightPx:R})=>{E.addPage([M,O],M>O?"landscape":"portrait");const T=E.getCurrentPageInfo();var k;switch(i){case"pt":k=1;break;case"mm":k=72/25.4;break;case"cm":k=72/2.54;break;case"in":k=72;break;case"px":k=.75;break;case"pc":case"em":k=12;break;case"ex":k=6;break;default:throw"Invalid unit: "+i}if(T.pageContext.cropBox={bottomLeftX:0,bottomLeftY:0,topRightX:M*k,topRightY:O*k},T.pageContext.artBox={bottomLeftX:d(f+c)*k,bottomLeftY:d(f+c)*k,topRightX:d(L-f-c)*k,topRightY:d(R-f-c)*k},T.pageContext.bleedBox={bottomLeftX:d(f+c)*k,bottomLeftY:d(f+c)*k,topRightX:d(L-f-c)*k,topRightY:d(R-f-c)*k},v){E.setLineWidth(d(1));const C=v+d(c);E.line(C,0,C,v),E.line(0,C,v,C),E.line(M-C,0,M-C,v),E.line(M,C,M-v,C),E.line(0,O-C,v,O-C),E.line(C,O,C,O-v),E.line(M,O-C,M-v,O-C),E.line(M-C,O,M-C,O-v)}E.addImage(A,v,v,M-2*v,O-2*v,void 0,"FAST")})}return E},toPDFDataURL:async t=>(await e._toPDF(Object.assign({mimeType:"image/jpeg"},t))).output("datauristring"),async toGIFDataURL(t={}){const r=t.pixelRatio||1,n=await VC({width:e.width*r,height:e.height*r}),i=1e3/(t.fps||10),a=e.duration/i;for(let l=0;l<a-1;l++){const o=l*i||1;e.setCurrentTime(o);let u=0,d="";for(const v of e.pages)if(u+=v.duration,v.set({_rendering:u>o}),u>o){d=v.id;break}const f=await e._toCanvas({pixelRatio:r,pageId:d,_skipTimeout:!0});n.addFrame(f.getContext("2d"),{delay:i,copy:!0})}for(const l of e.pages)l.set({_rendering:!1});return e.stop(),n.render(),new Promise(l=>{n.on("finished",function(o){(function(u,d){var f=new FileReader;f.onload=function(v){d(v.target.result)},f.readAsDataURL(u)})(o,l)})})},async saveAsGIF(t={}){var{fileName:r}=t,n=Hd(t,["fileName"]);const i=await e.toGIFDataURL(n);c1(i,r||"polotno.gif")},async toHTML({elementHook:t}={elementHook:void 0}){const r=e.toJSON();return uN({json:r,elementHook:t})},async saveAsHTML({fileName:t}={}){const r=await e.toHTML(),n="data:text/html;base64,"+window.btoa(unescape(encodeURIComponent(r)));c1(n,t||"polotno.html")},async toSVG({elementHook:t,pageId:r,fontEmbedding:n="inline"}={elementHook:void 0,pageId:void 0,fontEmbedding:"inline"}){var i;const a=e.toJSON();r=r||((i=a.pages[0])===null||i===void 0?void 0:i.id);const l=a.pages.find(o=>o.id===r);return dN({json:Object.assign(Object.assign({},a),{pages:l?[l]:[]}),elementHook:t,fontEmbedding:n})},async saveAsSVG({fileName:t,elementHook:r,pageId:n,fontEmbedding:i="inline"}={}){const a=await e.toSVG({elementHook:r,pageId:n,fontEmbedding:i}),l="data:text/svg;base64,"+window.btoa(unescape(encodeURIComponent(a)));c1(l,t||"polotno.svg")},async saveAsPDF(t={}){var{fileName:r}=t,n=Hd(t,["fileName"]);(await e._toPDF(Object.assign({mimeType:"image/jpeg"},n))).save(r||"polotno.pdf")},async waitLoading({_skipTimeout:t=!1}={}){t||await new Promise(r=>setTimeout(r,50)),await FA()},toJSON:()=>({width:e.width,height:e.height,fonts:wu(e.fonts),pages:wu(e.pages),audios:wu(e.audios),unit:e.unit,dpi:e.dpi,custom:e.custom,schemaVersion:e.schemaVersion}),loadJSON(t,r=!1){var n;const i=JSON.parse(JSON.stringify(t)),a=i.schemaVersion||0;a<1&&gi.htmlRenderEnabled&&Ai({children:i.pages},d=>{if(d.type==="text"){const v=d.letterSpacing*16;d.letterSpacing=v/d.fontSize}}),a<2&&Ai({children:i.pages},d=>{d.filters&&Object.keys(d.filters).forEach(f=>{if(["warm","cold","natural"].includes(f))return;const v=d.filters[f];v&&typeof v.intensity=="number"&&(v.intensity=v.intensity/100)})}),delete i.schemaVersion;const l=e.pages.indexOf(e.activePage);let o=(n=i.pages[l]||i.pages[0])===null||n===void 0?void 0:n.id;i._activePageId=o;const u=Object.assign({},wu(e));Object.assign(u,i),u.history=r?e.history.toJSON():{history:[],undoIdx:-1},Fv(e,u)},clear({keepHistory:t=!1}={}){const r=e.pages.map(n=>n.id);e.deletePages(r),e.custom=null,t||e.history.clear()},addFont(t){e.removeFont(t.fontFamily),e.fonts.push(t),e.loadFont(t.fontFamily)},removeFont(t){e.fonts.filter(r=>r.fontFamily===t).forEach(r=>Cg(r))},addAudio(t){const r=m4.create(Object.assign({id:ul(10)},t));e.audios.push(r)},removeAudio(t){const r=e.audios.find(n=>n.id===t);r&&e.audios.remove(r)},async loadFont(t){const r=e.fonts.find(i=>i.fontFamily===t)||wm.find(i=>i.fontFamily===t);let n=[{fontStyle:"normal",fontWeight:"normal"},{fontStyle:"normal",fontWeight:"bold"}];return r?(r.styles&&(n=r.styles.map(i=>({fontStyle:i.fontStyle||"normal",fontWeight:i.fontWeight||"normal"}))),c8(r)):u8(t),Promise.all(n.map(i=>mh(t,i.fontStyle,i.fontWeight)))},validate:t=>If.validate(t,[{path:"",type:If}]).map(r=>({path:"store"+r.context.map(n=>n.path).join("."),message:r.message}))}));function gN({key:e,showCredit:t}={key:"",showCredit:!1}){return If.create({_forceShowCredit:t,_key:e})}const k_=Jt.model("Node",{id:Jt.identifier,type:"none",name:"",opacity:1,custom:Jt.frozen(),visible:!0,selectable:!0,removable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(e=>{for(var t in e)e[t]===null&&(e[t]=void 0);return e}).postProcessSnapshot(e=>{const t=Object.assign({},e),r={};for(var n in t)n[0]!=="_"&&(r[n]=e[n]);return r}).views(e=>({get locked(){return!(e.draggable||e.contentEditable||e.styleEditable||e.resizable)},get page(){return kf(e,tp)},get store(){return kf(e,If)},get top(){let t=e;for(;;){if(!s1(t,Sh))return t;t=kf(t,Sh)}},get parent(){if(s1(e,Sh)){const t=kf(e,Sh);return t&&t.children&&t.children.length,t}if(s1(e,tp)){const t=kf(e,tp);return t&&t.children&&t.children.length,t}if(s1(e,If)){const t=kf(e,If);return t&&t.pages&&t.pages.length,t}return null},get zIndex(){return e.parent.children.indexOf(e)}})).actions(e=>({toJSON:()=>Object.assign({},wu(e))})).actions(e=>({clone(t={},{skipSelect:r=!1}={}){const n=JSON.parse(JSON.stringify(e.toJSON()));return t.id=t.id||ul(10),Ai(n,i=>{i.id=ul(10)}),Object.assign(n,t),e.page.addElement(n,{skipSelect:r})},set(t){Object.assign(e,t)},moveUp(){e.page.moveElementsUp([e.id])},moveTop(){e.page.moveElementsTop([e.id])},moveDown(){e.page.moveElementsDown([e.id])},moveBottom(){e.page.moveElementsBottom([e.id])},setZIndex(t){e.parent.setElementZIndex(e.id,t)},beforeDestroy(){}})),y4={right:{from:{x:-200},to:{x:0}},left:{from:{x:200},to:{x:0}},up:{from:{y:200},to:{y:0}},down:{from:{y:-200},to:{y:0}},"bottom-right":{from:{x:-200,y:-200},to:{x:0,y:0}},"bottom-left":{from:{x:200,y:-200},to:{x:0,y:0}},"top-right":{from:{x:-200,y:200},to:{x:0,y:0}},"top-left":{from:{x:200,y:200},to:{x:0,y:0}}},b4={right:{cropX:-1},left:{cropX:1},up:{cropY:1},down:{cropY:-1}},vN={fade:({dTime:e,element:t,animation:r})=>{const n=e/r.duration;return r.type==="enter"?{opacity:n*t.opacity}:{opacity:(1-n)*t.opacity}},rotate:({dTime:e,element:t,animation:r})=>{const n=e/r.duration*360;return cC({x:t.x,y:t.y,width:t.width,height:t.height,rotation:t.rotation},n)},blink:({dTime:e,element:t,animation:r})=>{const n=r.duration,i=e%n/(n/2),a=i<=1?i:2-i;return{opacity:t.opacity*a}},bounce:({dTime:e,element:t,animation:r})=>{var n;const i=r.duration,a=i/2,l=(n=r.data.strength)!==null&&n!==void 0?n:1,o={},u={x:t.x+t.width/3*l,y:t.y+t.height/3*l,width:t.width/3*l,height:t.height/3*l,fontSize:t.fontSize/3*l},d={x:t.x,y:t.y,width:t.width,height:t.height,fontSize:t.fontSize},f=e%i/a,v=f<=1?f:2-f;for(let g in u){const c=u[g],y=d[g]-c;o[g]=c+v*y}return o},move:({dTime:e,element:t,animation:r})=>{var n;const i=y4[r.data.direction]||y4.right,a=(n=r.data.strength)!==null&&n!==void 0?n:1,l={};for(var o in i.from){let u=i.from[o],d=i.to[o];r.type==="exit"&&(u=i.to[o],d=-i.from[o]),u*=a,d*=a;const f=t[o]+u,v=t[o]+d-f;l[o]=f+e/r.duration*v}return l},zoom:({dTime:e,element:t,animation:r})=>{var n;const i={},a=1+(((r.data.direction||"in")==="in"?.75:1.25)-1)*((n=r.data.strength)!==null&&n!==void 0?n:1),l=t.rotation*Math.PI/180,o=Math.cos(l),u=Math.sin(l),d=t.width*(1-a),f=t.height*(1-a),v=(d*o-f*u)/2,g=(d*u+f*o)/2,c={x:t.x+v,y:t.y+g,width:t.width*a,height:t.height*a,fontSize:t.fontSize*a},y={x:t.x,y:t.y,width:t.width,height:t.height,fontSize:t.fontSize};for(var x in c){let E=c[x],S=y[x];if(r.type==="exit"){const w=E;E=S,S=w}const b=S-E;i[x]=E+e/r.duration*b}return i},cameraZoom:({dTime:e,element:t,animation:r})=>{var n,i,a;const l={},o=r.data.direction||"right",u=b4[o]||b4.right,d=(n=r.data.movementStrength)!==null&&n!==void 0?n:.1,f=(i=r.data.shakeStrength)!==null&&i!==void 0?i:.015;a=r.data.zoomStrength;const v=e/r.duration,g=f*(1-v),c=Math.sin(12*v)*g*.7+Math.sin(8*v)*g*.3;r.type==="exit"&&Math.max(t.cropWidth||1,t.cropHeight||1),r.type;const y=1-Math.pow(1-v,2),x=t.cropX||0,E=t.cropY||0,S=t.cropWidth||1,b=t.cropHeight||1,w=S,_=b;let A,M,O=0,L=0;if(u.cropX){const R=u.cropX>0?1-(x+S):x;O=Math.min(R,Math.abs(d))*u.cropX}if(u.cropY){const R=u.cropY>0?1-(E+b):E;L=Math.min(R,Math.abs(d))*u.cropY}return r.type==="enter"?(A=u.cropX?x+O*(1-y):x,M=u.cropY?E+L*(1-y):E):(A=u.cropX?x+O*y:x,M=u.cropY?E+L*y:E),l.cropX=Math.max(0,Math.min(1-w,A+c*w)),l.cropY=Math.max(0,Math.min(1-_,M+c*_)),l.cropWidth=w,l.cropHeight=_,l}},W2=({element:e,dTime:t,animation:r})=>{const n=vN[r.name];return n?n({element:e,dTime:t,animation:r}):(console.error("Can not find animation type: "+r.name),{})},mN=Jt.model("Animation",{delay:0,duration:500,enabled:!0,type:Jt.enumeration("Type",["enter","exit","loop"]),name:"none",data:Jt.frozen({})}),Y2=(e,t)=>{const r={};for(const n in t)if(typeof e[n]=="number"&&typeof t[n]=="number"){const i=t[n]-e[n];i!==0&&(r[n]=i)}return r},yN=Jt.model("ShapeFilter",{intensity:1}),w4=["temperature","contrast","highlights","shadows","white","black","saturation","vibrance"],kp=k_.named("Shape").props({x:0,y:0,width:100,height:100,rotation:0,opacity:1,animations:Jt.array(mN),blurEnabled:!1,blurRadius:10,brightnessEnabled:!1,brightness:0,sepiaEnabled:!1,grayscaleEnabled:!1,filters:Jt.map(yN),shadowEnabled:!1,shadowBlur:5,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"black",shadowOpacity:1,visible:!0,draggable:!0,resizable:!0,selectable:!0,contentEditable:!0,styleEditable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(e=>{const t=Object.assign(Object.assign({},e),{x:e.x||0,y:e.y||0,filters:Array.isArray(e.filters)?{}:e.filters});return"width"in e&&(t.width=t.width||1),"height"in e&&(t.height=t.height||1),e.locked&&(t.draggable=!1,t.contentEditable=!1,t.styleEditable=!1,t.resizable=!1,t.removable=!1),t}).views(e=>{const t=$r({x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,color:e.color,fontSize:e.fontSize}),r=Wr(i=>{Object.assign(t,i)}),n=Wr(i=>{for(const a in i)typeof t[a]=="number"&&(t[a]=t[a]+i[a])});return{get a(){const{currentTime:i}=e.store;if(r({x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,color:e.color,fontSize:e.fontSize,cropX:e.cropX,cropY:e.cropY,cropWidth:e.cropWidth,cropHeight:e.cropHeight}),i===0)return t;const a=i-e.page.startTime;if(a>e.page.duration||a<0)return t;const l=e.store.animatedElementsIds;if(l.length&&!l.includes(e.id))return t;const o=e.animations.find(g=>g.type==="enter"),u=o?.enabled&&a<o.delay;u&&r({opacity:0});const d=o?.enabled&&a>=o.delay&&a<=o.delay+o.duration;if(d){const g=a-o.delay,c=W2({element:e,animation:o,dTime:g}),y=Y2(e,c);n(y)}const f=e.animations.find(g=>g.type==="exit");if(!u&&!d&&f?.enabled&&a>=e.page.duration-f.duration-f.delay&&a<=e.page.duration-f.delay){const g=a-(e.page.duration-f.duration-f.delay),c=W2({element:e,animation:f,dTime:g}),y=Y2(e,c);n(y)}f?.enabled&&a>=e.page.duration-f.delay&&r({opacity:0});const v=e.animations.find(g=>g.type==="loop");if(v?.enabled){const g=W2({element:e,animation:v,dTime:a}),c=Y2(e,g);n(c)}return t},animated:i=>e.a[i]}}).actions(e=>({setAnimation(t,r){const n=e.animations.find(i=>i.type===t);n?Object.assign(n,r):e.animations.push(Object.assign({type:t},r))},setFilter(t,r){w4.includes(t)||e.filters.forEach((n,i)=>{w4.includes(i.toString())||e.filters.delete(i.toString())}),r==null?e.filters.delete(t):e.filters.set(t,{intensity:r})}})),O_=kp.named("Text").props({type:"text",text:"",placeholder:"",fontSize:14,fontFamily:"Roboto",fontStyle:"normal",fontWeight:"normal",textDecoration:"",textTransform:"none",fill:"black",align:"center",width:100,height:0,verticalAlign:"top",strokeWidth:0,stroke:"black",lineHeight:Jt.optional(Jt.union(Jt.number,Jt.string),1.2),letterSpacing:0,_editModeEnabled:!1,backgroundEnabled:!1,backgroundColor:"#7ED321",backgroundOpacity:1,backgroundCornerRadius:.5,backgroundPadding:.5}).preProcessSnapshot(e=>Object.assign({},e)).actions(e=>({toggleEditMode(t){e._editModeEnabled=t??!e._editModeEnabled,e._editModeEnabled?e.store.history.startTransaction():e.store.history.endTransaction()}})),O0=kp.named("Image").props({type:"image",width:100,height:100,src:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,cornerRadius:0,flipX:!1,flipY:!1,clipSrc:"",borderColor:"black",borderSize:0,keepRatio:!1,stretchEnabled:!1,_cropModeEnabled:!1}).actions(e=>({toggleCropMode(t){e._cropModeEnabled=t??!e._cropModeEnabled,e._cropModeEnabled?e.store.history.startTransaction():e.store.history.endTransaction()},beforeDestroy(){e._cropModeEnabled&&e.store.history.endTransaction()}})),C_=O0.named("Video").props({type:"video",duration:0,startTime:0,endTime:1,volume:1}),N_=kp.named("Line").props({type:"line",width:400,height:10,color:"black",dash:Jt.array(Jt.number),startHead:"",endHead:""}).actions(e=>({})),L_=kp.named("SVG").props({type:"svg",src:"",maskSrc:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,keepRatio:!0,stretchEnabled:!0,flipX:!1,flipY:!1,width:100,height:100,borderColor:"black",borderSize:0,cornerRadius:0,colorsReplace:Jt.map(Jt.string)}).preProcessSnapshot(e=>Object.assign(Object.assign({},e),{src:e.src||e.svgSource,colorsReplace:Array.isArray(e.colorsReplace)?{}:e.colorsReplace})).actions(e=>({replaceColor(t,r){e.colorsReplace.set(t,r)}})),T_=kp.named("Figure").props({type:"figure",subType:"rect",fill:"rgb(0, 161, 255)",dash:Jt.array(Jt.number),strokeWidth:0,stroke:"rgba(98, 197, 255, 1)",cornerRadius:0}),R_=O0.named("Gif").props({type:"gif",duration:0,keepRatio:!0});var bN=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};const Ai=(e,t)=>{if(e.children)for(const r of e.children){if(t(r)===!0)break;Ai(r,t)}},wN=[...new Array(20)].map((e,t)=>Jt.late(()=>_N[t])),M_=Jt.union({dispatcher:e=>{const t=Im[e.type];if(!t)throw new Error(`Unknown element type: "${e.type}"`);return t}},L_,O_,O0,N_,C_,T_,R_,Jt.late(()=>Sh),...wN),Sh=k_.named("Group").props({type:"group",children:Jt.array(M_)}).views(e=>({get draggable(){let t=!0;return Ai(e,r=>{r.draggable||(t=!1)}),t},get resizable(){let t=!0;return Ai(e,r=>{r.resizable||(t=!1)}),t},get contentEditable(){let t=!0;return Ai(e,r=>{r.contentEditable||(t=!1)}),t},get styleEditable(){let t=!0;return Ai(e,r=>{r.styleEditable||(t=!1)}),t},get locked(){let t=!0;return Ai(e,r=>{r.locked||(t=!1)}),t}})).actions(e=>({set(t){var{draggable:r,contentEditable:n,styleEditable:i,resizable:a}=t,l=bN(t,["draggable","contentEditable","styleEditable","resizable"]);r!==void 0&&Ai(e,o=>{o.set({draggable:r})}),n!==void 0&&Ai(e,o=>{o.set({contentEditable:n})}),i!==void 0&&Ai(e,o=>{o.set({styleEditable:i})}),a!==void 0&&Ai(e,o=>{o.set({resizable:a})}),Object.assign(e,l)},addElement(t,{skipSelect:r=!1}={}){const n=Im[t.type];if(!n)return void console.error("Can not find model with type "+t.type);t.children&&t.children.forEach(a=>{a.id=a.id||ul(10)});const i=n.create(Object.assign({id:ul(10)},t));return e.children.push(i),i.selectable&&!r&&e.store.selectElements([i.id]),i},setElementZIndex(t,r){const n=e.children.find(i=>i.id===t);n&&(Lf(n),e.children.remove(n),e.children.splice(r,0,n))}})),_N=[],Im={svg:L_,text:O_,image:O0,group:Sh,line:N_,video:C_,figure:T_,gif:R_},xN={text:Rk,image:Bb,svg:Bb,line:gC,video:wC,figure:LC,group:Yn(e=>{const{element:t,store:r}=e,{children:n}=t,i=t.selectable||r.role==="admin";return ce.createElement(vn,{opacity:t.opacity,listening:i,hideInExport:!t.showInExport},n.map(a=>ce.createElement(I_,Object.assign({},e,{key:a.id,store:r,element:a}))))}),gif:DC},SN=(e,t)=>{const r=[];Ai(e,f=>{f.type!=="group"&&r.push(f.a)});const n=[];r.forEach(f=>{const v=[{x:0,y:0},{x:0+f.width,y:0},{x:0+f.width,y:0+f.height},{x:0,y:0+f.height}],g=new sr.Transform;g.translate(f.x,f.y),g.rotate(sr.Util.degToRad(f.rotation)),v.forEach(c=>{const y=g.point(c);n.push(y)})});const i=new sr.Transform;i.rotate(-sr.Util.degToRad(t));let a=1/0,l=1/0,o=-1/0,u=-1/0;n.forEach(f=>{const v=i.point(f);a=Math.min(a,v.x),l=Math.min(l,v.y),o=Math.max(o,v.x),u=Math.max(u,v.y)}),i.invert();const d=i.point({x:a,y:l});return{x:d.x,y:d.y,width:o-a,height:u-l,rotation:t}},I_=Yn(e=>{var t;const{element:r,store:n}=e,[i,a]=ce.useState(!1),l=n.selectedElements.indexOf(r)>=0&&r.selectable,o=((t=r.parent)===null||t===void 0?void 0:t.type)==="group",u=(v=>{const[g,c]=ce.useState(null);return ce.useEffect(()=>{const y=setTimeout(()=>{const x=v.page.id,E=sr.stages.find(S=>S.getAttr("pageId")===x);E||console.error("No stage is found for element",v.id),c(E)});return()=>clearTimeout(y)},[v.id]),g})(r),d=u?.findOne("Transformer");ce.useEffect(()=>{if(u){const v=c=>{const y=c.target.findAncestor(".element",!0),x=n.getElementById(y?.id()),E=x?.top,S=E?.id;a(S===r.id)};u.on("mouseover",v);const g=()=>{a(!1)};return u.on("mouseleave",g),()=>{u.off("mouseover",v),u.off("mouseleave",g)}}},[u]);let f=xN[e.element.type];return e.element.type==="text"&&gi.htmlRenderEnabled&&(f=oC),e.element.visible?f?ce.createElement(ce.Fragment,null,ce.createElement(f,Object.assign({},e)),(i||l)&&!o&&ce.createElement(zC,{element:r.type==="group"?{a:SN(r,d?.rotation()||0)}:r})):(console.error("Can not find component for "+e.element.type),null):null});function EN(e,t,r="scale"){const n=t.width/t.height;let i,a;n>=e.width/e.height?(i=e.width,a=e.width/n):(i=e.height*n,a=e.height);let l=0,o=0;return r==="left-top"?(l=0,o=0):r==="left-middle"?(l=0,o=(e.height-a)/2):r==="left-bottom"?(l=0,o=e.height-a):r==="center-top"?(l=(e.width-i)/2,o=0):r==="center-middle"?(l=(e.width-i)/2,o=(e.height-a)/2):r==="center-bottom"?(l=(e.width-i)/2,o=e.height-a):r==="right-top"?(l=e.width-i,o=0):r==="right-middle"?(l=e.width-i,o=(e.height-a)/2):r==="right-bottom"?(l=e.width-i,o=e.height-a):r==="scale"?(l=0,o=0,i=e.width,a=e.height):console.error(new Error("Unknown clip position property - "+r)),{cropX:l,cropY:o,cropWidth:i,cropHeight:a}}var F_=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};const _4=sr.DD._drag;window.removeEventListener("mousemove",_4),sr.DD._drag=function(e){tc(()=>{_4.call(this,e)})},window.addEventListener("mousemove",sr.DD._drag);const Uv=new sr.Group,Xc=20;Uv.add(new sr.Rect({width:Xc,height:Xc,fill:"white"})),Uv.add(new sr.Path({scaleX:Xc/24,scaleY:Xc/24,data:"M4.98313549,11.0001422 C5.49589839,10.9914935 5.92501998,11.3703506 5.99116425,11.8666444 L5.99985778,11.9831355 L6.00348884,12.2068855 C6.11245031,15.4321748 8.76323537,17.9999971 11.9999971,17.9999971 C12.1869612,17.9999971 12.3726725,17.9914753 12.5567465,17.9745765 L12.2928932,17.7071068 C11.9023689,17.3165825 11.9023689,16.6834175 12.2928932,16.2928932 C12.6834175,15.9023689 13.3165825,15.9023689 13.7071068,16.2928932 L15.7071068,18.2928932 C16.0976311,18.6834175 16.0976311,19.3165825 15.7071068,19.7071068 L13.7071068,21.7071068 C13.3165825,22.0976311 12.6834175,22.0976311 12.2928932,21.7071068 C11.9023689,21.3165825 11.9023689,20.6834175 12.2928932,20.2928932 L12.6111505,19.9769552 C12.4086045,19.9922816 12.2047796,19.9999971 11.9999971,19.9999971 C7.7687005,19.9999971 4.28886152,16.7094374 4.01666425,12.5105203 L4.00420123,12.2575143 L4.00014222,12.0168645 C3.9908282,11.4646583 4.43092928,11.0094562 4.98313549,11.0001422 Z M11.7071068,2.29289322 C12.0675907,2.65337718 12.0953203,3.22060824 11.7902954,3.61289944 L11.7071068,3.70710678 L11.3891629,4.0230186 C11.5916051,4.00770767 11.7953244,4 12,4 C16.418278,4 20,7.581722 20,12 C20,12.5522847 19.5522847,13 19,13 C18.4477153,13 18,12.5522847 18,12 C18,8.6862915 15.3137085,6 12,6 C11.8129339,6 11.6271216,6.00853145 11.4429483,6.02544919 L11.7071068,6.29289322 C12.0976311,6.68341751 12.0976311,7.31658249 11.7071068,7.70710678 C11.3466228,8.06759074 10.7793918,8.09532028 10.3871006,7.79029539 L10.2928932,7.70710678 L8.29289322,5.70710678 C7.93240926,5.34662282 7.90467972,4.77939176 8.20970461,4.38710056 L8.29289322,4.29289322 L10.2928932,2.29289322 C10.6834175,1.90236893 11.3165825,1.90236893 11.7071068,2.29289322 Z",fill:"black"}));const AN=Uv.toCanvas({pixelRatio:2,width:Xc,height:Xc}),X2={enabledAnchors:["top-left","top-center","top-right","middle-left","bottom-left","bottom-right","bottom-center","middle-right"],borderEnabled:!0,rotateEnabled:!0,rotationSnaps:[0,45,90,135,180,225,270,315],ignoreStroke:!0,flipEnabled:!1,anchorStrokeWidth:2,borderStrokeWidth:2,rotateAnchorOffset:30,anchorStyleFunc:e=>{e.hasName("rotater")&&e.setAttrs({width:20,height:20,cornerRadius:20/2,offsetX:20/2,offsetY:20/2,fillPatternImage:AN,fillPatternScaleX:20/Xc/2,fillPatternScaleY:20/Xc/2,fillPriority:"pattern",fillPatternRepeat:"no-repeat"})}},K2={text:{enabledAnchors:["top-left","top-right","middle-left","bottom-left","bottom-right","middle-right"]},svg:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},gif:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},line:{enabledAnchors:[],borderEnabled:!1,rotateEnabled:!1},image:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},many:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},group:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]}},PN=e=>ce.createElement(En,Object.assign({},e,{preventDefault:!1})),kN=e=>{var{url:t}=e,r=F_(e,["url"]);const[n,i]=ym(t,"anonymous"),a=n?EN(n,{width:r.width,height:r.height},"center-middle"):{};return Jd(i,t,"page background"),ce.createElement(bu,Object.assign({image:n},r,a))},ON=e=>{const t=tf({fill:e.fill,a:{width:e.width,height:e.height}});return ce.createElement(En,Object.assign({},e,t))},CN=e=>{const{background:t,scale:r,borderColor:n}=e,i=F_(e,["background","scale","borderColor"]),a=ce.useMemo(()=>!!sr.Util.colorToRGBA(t)||v0(t),[t]),l=ce.useMemo(()=>{const o=document.createElement("canvas"),u=30;o.width=60,o.height=60;const d=o.getContext("2d");return d&&(d.fillStyle="black",d.fillRect(u,0,u,u),d.fillRect(0,u,u,u)),o},[]);return ce.createElement(ce.Fragment,null,ce.createElement(En,Object.assign({fillPatternImage:l},i,{opacity:.1,hideInExport:!0})),a?ce.createElement(ON,Object.assign({fill:t},i)):ce.createElement(kN,Object.assign({url:t},i)))},NN=Yn(({selection:e,fill:t="rgba(0, 161, 255, 0.3)",stroke:r="rgb(0, 161, 255)",strokeWidth:n=1})=>e.visible?ce.createElement(En,{name:"selection",x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),width:Math.abs(e.x1-e.x2),height:Math.abs(e.y1-e.y2),fill:t,stroke:r,strokeWidth:n}):null),LN=Yn(({x:e,y:t,width:r,height:n,rotation:i,anchor:a,store:l,tagFill:o,textFill:u})=>{const d=A0({x:e,y:t,width:r,height:n,rotation:sr.Util.radToDeg(i)});if(a===void 0)return null;const f=(n/2+70)*Math.cos(i-Math.PI/2),v=(n/2+70)*Math.sin(i-Math.PI/2),g=h4({unit:l.unit,dpi:l.dpi,px:r/l.scale,precious:l.unit==="px"?0:1})+" x "+h4({unit:l.unit,dpi:l.dpi,px:n/l.scale,precious:l.unit==="px"?0:1})+(l.unit==="px"?"":" "+l.unit);return ce.createElement(ce.Fragment,null,ce.createElement(V1,{x:(d.minX+d.maxX)/2+f,y:(d.minY+d.maxY)/2+v,offsetX:14,offsetY:14,visible:a==="rotater"},ce.createElement(G1,{cornerRadius:5,fill:o||"rgb(0, 161, 255)"}),ce.createElement(Au,{align:"center",verticalAlign:"middle",fill:u||"white",padding:8,text:Math.round(sr.Util.radToDeg(i)).toString()+"°"})),ce.createElement(V1,{x:(d.minX+d.maxX)/2,y:d.maxY+20,visible:a!=="rotater"},ce.createElement(G1,{cornerRadius:5,fill:o||"rgb(0, 161, 255)",pointerDirection:"up",pointerHeight:0,pointerWidth:0}),ce.createElement(Au,{align:"center",verticalAlign:"middle",fill:u||"white",padding:8,text:g})))}),TN=Yn(({elements:e,store:t})=>{const r=e.filter(i=>i.alwaysOnTop),n=e.filter(i=>!i.alwaysOnTop).concat(r);return ce.createElement(ce.Fragment,null,n.map(i=>ce.createElement(I_,{key:i.id,store:t,element:i,onClick:()=>{console.warn("Polotno warning: onClick callback is deprecated. Just stop using it. Polotno will do selection automatically.")}})))}),RN=({store:e})=>{const[t,r]=ce.useState(!1),[n,i]=ce.useState({x:0,y:0});return{open:ce.useCallback(l=>{r(!0),i(l)},[]),close:ce.useCallback(()=>{r(!1)},[]),props:{isOpen:t,offset:n,setIsOpen:r}}},MN=atob("UG9sb3RubyBmcmVlIGxpY2Vuc2UgbGltaXRhdGlvbiBleGNlZWRlZCAtIFBsZWFzZSB1cGdyYWRlIHlvdXIgYWNjb3VudC4="),x4=atob("cmVk"),IN=atob("djAuOS4y"),FN=e=>ce.createElement(ce.Fragment,null,ce.createElement(V1,{fill:x4,height:200},ce.createElement(G1,{fill:x4}),ce.createElement(Au,Object.assign({},e,{fill:"white",text:MN,height:void 0,padding:10,fontSize:20})))),jN=Yn(({store:e,page:t,width:r,height:n,pageControlsEnabled:i,backColor:a,pageBorderColor:l,activePageBorderColor:o,components:u,bleedColor:d,altCloneEnabled:f,viewportSize:v,selectionRectFill:g,selectionRectStroke:c,selectionRectStrokeWidth:y,snapGuideStroke:x,snapGuideStrokeWidth:E,snapGuideDash:S,transformLabelFill:b,transformLabelTextFill:w,distanceGuideStroke:_,distanceLabelFill:A,distanceLabelTextFill:M})=>{const O=e.bleedVisible?t.bleed:0,L=t.computedWidth+2*O,R=t.computedHeight+2*O,T=(r-L*e.scale)/2,k=(n-R*e.scale)/2,C=ce.useRef(null),q=ce.useRef(null),G=ce.useRef(null),J=i==null||i,[ae,H]=ce.useState(null),[V,Y]=ce.useState({}),U=RN({store:e}),D=e.selectedElements.find(Ae=>Ae._cropModeEnabled),j=e.selectedShapes.filter(Ae=>!Ae.resizable).length>0,z=e.selectedShapes.filter(Ae=>!Ae.draggable).length>0,Z=e.selectedElements.filter(Ae=>!Ae.visible).length>0;ce.useLayoutEffect(()=>{var Ae,be,_e;if(!C.current)return;const xe=C.current.getStage(),Le=e.selectedShapes.map(Ce=>Ce._cropModeEnabled?null:xe.findOne("#"+Ce.id)).filter(Ce=>Ce),pe=e.selectedElements.length===1&&((Ae=e.selectedElements[0])===null||Ae===void 0?void 0:Ae.type)||"many";K2[pe]?(C.current.setAttrs(Object.assign(Object.assign({},X2),K2[pe])),pe!=="svg"&&pe!=="image"&&pe!=="gif"||e.selectedElements[0].keepRatio||C.current.setAttrs({enabledAnchors:X2.enabledAnchors}),pe==="text"&&gi.textVerticalResizeEnabled&&C.current.setAttrs({enabledAnchors:(be=K2.text.enabledAnchors)===null||be===void 0?void 0:be.concat(["bottom-center"])})):C.current.setAttrs(X2),j&&C.current.enabledAnchors([]),z&&C.current.rotateEnabled(!1),Le.find(Ce=>Ce?.isDragging())&&Le.forEach(Ce=>{Ce.isDragging()||Ce==null||Ce.startDrag()}),C.current.nodes(Le),c_(),(_e=C.current.getLayer())===null||_e===void 0||_e.batchDraw()},[e.selectedShapes,D,j,Z,z]);const re=yS(()=>({visible:!1,x1:0,y1:0,x2:0,y2:0})),W=ce.useRef(!1),Q=lf(),se=Wr(Ae=>{var be,_e,xe,Le;if(Q)return;W.current=!1;const pe=Ae.target.findAncestor(".elements-container"),Ce=Ae.target.findAncestor("Transformer"),je=Ae.target.findAncestor(".page-abs-container");if(pe||Ce||je)return;const He=(be=Ae.target.getStage())===null||be===void 0?void 0:be.getPointerPosition();He.x-=(_e=Ae.target.getStage())===null||_e===void 0?void 0:_e.x(),He.y-=(xe=Ae.target.getStage())===null||xe===void 0?void 0:xe.y(),He&&(re.visible=!0,re.x1=He.x,re.y1=He.y,re.x2=He.x,re.y2=He.y,((Le=Ae.target.getStage())===null||Le===void 0?void 0:Le.getPointersPositions().length)>=2&&(re.visible=!1))});(({stageRef:Ae,containerRef:be,viewportSize:_e})=>{ce.useEffect(()=>{var xe;const Le=(xe=be.current)===null||xe===void 0?void 0:xe.closest(".polotno-workspace-inner");function pe(){var Ce;if(!Ae.current)return;const je=(Ce=be.current)===null||Ce===void 0?void 0:Ce.getBoundingClientRect(),He=Le?.getBoundingClientRect(),st=Math.max(0,He.left-je.left-100),pt=Math.max(0,He.top-je.top-100);Ae.current.position({x:-st,y:-pt}),Ae.current.container().style.transform=`translate(${st}px, ${pt}px)`}return pe(),Le.addEventListener("scroll",pe),()=>{Le.removeEventListener("scroll",pe)}},[_e.width,_e.height])})({stageRef:q,containerRef:G,viewportSize:v}),ce.useEffect(()=>{const Ae=Wr(_e=>{var xe,Le,pe,Ce;if(!re.visible)return;(xe=q.current)===null||xe===void 0||xe.setPointersPositions(_e);let je=(Le=q.current)===null||Le===void 0?void 0:Le.getPointerPosition();je?(je.x-=(pe=q.current)===null||pe===void 0?void 0:pe.x(),je.y-=(Ce=q.current)===null||Ce===void 0?void 0:Ce.y()):je={x:re.x2,y:re.y2},re.x2=je.x,re.y2=je.y}),be=Wr(()=>{if(!re.visible||!q.current)return;const _e=q.current.findOne(".selection"),xe=_e?_e.getClientRect():{width:0,height:0,x:0,y:0};if(xe.width&&xe.height){const Le=[];q.current.find(".element").forEach(Ce=>{const je=Ce.getClientRect(),He=e.getElementById(Ce.id()),st=He?.draggable,pt=He?.selectable;sr.Util.haveIntersection(xe,je)&&st&&pt&&Le.push(He.top.id)});const pe=[...new Set(Le)];e.selectElements(pe)}re.visible=!1,W.current=!0});return window.addEventListener("mousemove",Ae),window.addEventListener("touchmove",Ae),window.addEventListener("mouseup",be),window.addEventListener("touchend",be),()=>{window.removeEventListener("mousemove",Ae),window.removeEventListener("touchmove",Ae),window.removeEventListener("mouseup",be),window.removeEventListener("touchend",be)}},[]);const ue=ce.useRef(!1);ce.useEffect(()=>{var Ae;let be;const _e=(Ae=G.current)===null||Ae===void 0?void 0:Ae.closest(".polotno-workspace-inner"),xe=()=>{ue.current=!0,clearTimeout(be),be=setTimeout(()=>{ue.current=!1},300)};return _e.addEventListener("scroll",xe),()=>{clearTimeout(be),_e.removeEventListener("scroll",xe)}},[]);const le=Ae=>{if(e.activePage!==t&&t.select(),ue.current||W.current)return;const be=Ae.evt.ctrlKey||Ae.evt.metaKey||Ae.evt.shiftKey,_e=Ae.target.findAncestor(".elements-container"),xe=Ae.target.findAncestor(".page-abs-container"),Le=Ae.target.findAncestor("Transformer");if(!(be||_e||Le||xe))return void e.selectElements([]);const pe=Ae.target.findAncestor(".element",!0),Ce=e.getElementById(pe?.id()),je=Ce?.top,He=je?.id,st=e.selectedElementsIds.indexOf(He)>=0;He&&be&&!st?e.selectElements(e.selectedElementsIds.concat([He])):He&&be&&st?e.selectElements(e.selectedElementsIds.filter(pt=>pt!==He)):!He||be||st||e.selectElements([He])};hC(C,e,{stroke:x,strokeWidth:E,dash:S});const ye=e.activePage===t,Re=u?.PageControls,Me=u?.Tooltip,Pe=u?.ContextMenu,de=1/e.scale,Te=0/e.scale;return ce.createElement("div",{ref:G,onDragOver:Ae=>Ae.preventDefault(),onDrop:Ae=>{if(Ae.preventDefault(),!q.current)return;q.current.setPointersPositions(Ae),q.current.findOne(".elements-container").getRelativePointerPosition();const be=q.current.getPointerPosition(),_e=q.current.getAllIntersections(be).map(Le=>Le.findAncestor(".element",!0)).filter(Boolean);[...new Set(_e.reverse())].map(Le=>e.getElementById(Le.id()))[0]},style:{position:"relative",width:r+"px",height:n+"px",overflow:"hidden"},className:"polotno-page-container"+(ye?" active-page":"")},ce.createElement(hA,{ref:q,width:Math.min(r,v.width+200),height:Math.min(v.height+200,n),onClick:le,onTap:le,onContextMenu:Ae=>{Ae.evt.preventDefault();const be=Ae.target.findAncestor(".element",!0),_e=e.getElementById(be?.id()),xe=_e?.top,Le=xe?.id;Le?e.selectedElementsIds.indexOf(Le)>=0||e.selectElements([Le]):e.selectElements([]),U.open({x:Ae.evt.clientX,y:Ae.evt.clientY})},onMouseDown:se,onMouseMove:Ae=>{if(!Ae.evt.altKey&&ae)return void H(null);if(!Ae.evt.altKey)return;const be=Ae.target.findAncestor(".element",!0),_e=be?.id();if(!e.selectedElements[0]||e.selectedElementsIds.includes(_e))return;const xe=P0(e.selectedShapes),Le=_e?e.getElementById(_e):{x:0,y:0,width:t.computedWidth,height:t.computedHeight,rotation:0},pe=A0(Le),Ce=[];xe.minX>pe.maxX&&Ce.push({distance:xe.minX-pe.maxX,box1:xe,box2:pe,points:[{x:xe.minX,y:xe.minY+xe.height/2},{x:pe.maxX,y:xe.minY+xe.height/2},{x:pe.maxX,y:pe.minY+pe.height/2}]}),xe.maxX<pe.minX&&Ce.push({distance:pe.minX-xe.maxX,box1:xe,box2:pe,points:[{x:xe.maxX,y:xe.minY+xe.height/2},{x:pe.minX,y:xe.minY+xe.height/2},{x:pe.minX,y:pe.minY+pe.height/2}]}),xe.minY>pe.maxY&&Ce.push({box1:xe,box2:pe,distance:xe.minY-pe.maxY,points:[{x:xe.minX+xe.width/2,y:xe.minY},{x:xe.minX+xe.width/2,y:pe.maxY},{x:pe.minX+pe.width/2,y:pe.maxY}]}),xe.maxY<pe.minY&&Ce.push({box1:xe,box2:pe,distance:pe.minY-xe.maxY,points:[{x:xe.minX+xe.width/2,y:xe.maxY},{x:xe.minX+xe.width/2,y:pe.minY},{x:pe.minX+pe.width/2,y:pe.minY}]}),xe.minX>=pe.minX&&xe.maxX<=pe.maxX&&xe.minY>=pe.minY&&xe.maxY<=pe.maxY&&(Ce.push({distance:xe.minX-pe.minX,box1:xe,box2:pe,points:[{x:xe.minX,y:xe.minY+xe.height/2},{x:pe.minX,y:xe.minY+xe.height/2},{x:pe.minX,y:pe.minY+pe.height/2}]}),Ce.push({distance:pe.maxX-xe.maxX,box1:xe,box2:pe,points:[{x:xe.maxX,y:xe.minY+xe.height/2},{x:pe.maxX,y:xe.minY+xe.height/2},{x:pe.maxX,y:pe.minY+pe.height/2}]}),Ce.push({box1:xe,box2:pe,distance:xe.minY-pe.minY,points:[{x:xe.minX+xe.width/2,y:xe.minY},{x:xe.minX+xe.width/2,y:pe.minY},{x:pe.minX+pe.width/2,y:pe.minY}]}),Ce.push({box1:xe,box2:pe,distance:pe.maxY-xe.maxY,points:[{x:xe.minX+xe.width/2,y:xe.maxY},{x:xe.minX+xe.width/2,y:pe.maxY},{x:pe.minX+pe.width/2,y:pe.maxY}]})),JSON.stringify(ae)!==JSON.stringify(Ce)&&H(Ce)},onDragStart:Ae=>{var be;const _e=Ae.target.findAncestor(".element",!0);if(_e){const xe=e.getElementById(_e?.id()),Le=xe?.top,pe=Le?.id;!(e.selectedElementsIds.indexOf(pe)>=0)&&pe&&(e.selectElements([pe]),Ae.target.stopDrag(),Ae.target.startDrag(Ae),(be=C.current)===null||be===void 0||be.startDrag(Ae))}ae&&H(null)},pageId:t.id,style:{position:"absolute",overflow:"hidden",top:0,left:0}},ce.createElement(cA,null,ce.createElement(PN,{width:r,height:n,fill:a}),ce.createElement(vn,{x:T,y:k,scaleX:e.scale,scaleY:e.scale,name:"page-container"},ce.createElement(vn,{name:"page-container-2"},ce.createElement(vn,{name:"page-background-group",x:O,y:O},ce.createElement(CN,{x:-t.bleed,y:-t.bleed,width:t.computedWidth+2*t.bleed,height:t.computedHeight+2*t.bleed,background:t.background,name:"page-background",preventDefault:!1,scale:e.scale})),ce.createElement(vn,{x:O,y:O,name:"elements-container",listening:!e.isPlaying},ce.createElement(En,{name:"elements-area",width:t.computedWidth,height:t.computedHeight,listening:!1}),ce.createElement(TN,{elements:t.children,store:e})),ce.createElement(En,{stroke:d,name:"bleed",strokeWidth:t.bleed,x:t.bleed/2,y:t.bleed/2,width:t.computedWidth+t.bleed,height:t.computedHeight+t.bleed,listening:!1,visible:t.bleed>0&&e.bleedVisible,hideInExport:!0}),WC()===IN&&ce.createElement(FN,{name:"hit-detection",x:-de/2-Te,y:-de/2-Te,width:L+de+2*Te,height:R+de+2*Te}))),ce.createElement(Yc,{name:"workspace-background",points:[0,0,r,0,r,n,0,n,0,0,T,k,T,n-k,r-T,n-k,r-T,k,T,k],listening:!1,closed:!0,fill:a}),ce.createElement(vn,{x:T,y:k,scaleX:e.scale,scaleY:e.scale},ce.createElement(En,{name:"page-highlight",hideInExport:!0,x:-de/2-Te,y:-de/2-Te,width:L+de+2*Te,height:R+de+2*Te,stroke:ye&&e.pages.length>1?o:l,strokeWidth:2,listening:!1,strokeScaleEnabled:!1})),ce.createElement(vn,{x:T+O*e.scale,y:k+O*e.scale,scaleX:e.scale,scaleY:e.scale,name:"page-abs-container"},ce.createElement(lp,{ref:C,onDragStart:Ae=>{var be;!((be=Ae.evt)===null||be===void 0)&&be.altKey&&f&&e.selectedElements.forEach(_e=>{const xe=_e.clone({},{skipSelect:!0}),Le=t.children.indexOf(_e);t.setElementZIndex(xe.id,Le)}),e.history.startTransaction()},onDragEnd:()=>{e.history.endTransaction()},onTransformStart:()=>{e.history.startTransaction(),H(null)},boundBoxFunc:(Ae,be)=>{const _e=Math.abs(be.width)<1||Math.abs(be.height)<1,xe=Math.abs(Ae.width)<1||Math.abs(Ae.height)<1;return _e&&!xe?Ae:be},onTransform:Ae=>{var be,_e;const xe=C.current.nodes(),Le=xe[xe.length-1];if(Ae.target!==Le)return;const pe=(be=C.current)===null||be===void 0?void 0:be.__getNodeRect(),Ce=(_e=C.current)===null||_e===void 0?void 0:_e.getActiveAnchor();Y({anchor:Ce,x:pe.x,y:pe.y,rotation:pe.rotation,width:pe.width,height:pe.height})},onTransformEnd:Ae=>{Y({}),e.history.endTransaction()},visible:!e.isPlaying}),ae&&ae.map(({points:Ae,distance:be,box1:_e,box2:xe},Le)=>ce.createElement(vn,{name:"distances-container",hideInExport:!0,key:Le,listening:!1},ce.createElement(En,Object.assign({},_e,{stroke:_,strokeWidth:1,strokeScaleEnabled:!1})),ce.createElement(En,Object.assign({},xe,{stroke:_,strokeWidth:1,strokeScaleEnabled:!1})),ce.createElement(Yc,{points:[Ae[0].x,Ae[0].y,Ae[1].x,Ae[1].y],stroke:_,strokeWidth:1,strokeScaleEnabled:!1}),ce.createElement(Yc,{points:[Ae[1].x,Ae[1].y,Ae[2].x,Ae[2].y],stroke:_,strokeWidth:1,strokeScaleEnabled:!1}),ce.createElement(V1,{x:(Ae[0].x+Ae[1].x)/2,y:(Ae[0].y+Ae[1].y)/2,offsetY:-10,scaleX:1/e.scale,scaleY:1/e.scale},ce.createElement(G1,{cornerRadius:5,fill:A,pointerDirection:"down"}),ce.createElement(Au,{align:"center",verticalAlign:"middle",fill:M,padding:5,text:rN({unit:e.unit,dpi:e.dpi,px:be})})))),t._rendering&&ce.createElement(vn,null,ce.createElement(En,{width:L,height:R,fill:"rgba(255,255,255,0.9)"}),ce.createElement(Au,{text:"Rendering...",fontSize:60,width:L,height:R,align:"center",verticalAlign:"middle"})),Me&&ce.createElement(Me,{components:u,store:e,page:t,stageRef:q}),Pe&&ce.createElement($1,null,ce.createElement(Pe,Object.assign({components:u,store:e},U.props)))),ce.createElement(LN,Object.assign({},V,{store:e,tagFill:b,textFill:w})),ce.createElement(NN,{selection:re,fill:g,stroke:c,strokeWidth:y}),YC()&&ce.createElement(Au,{text:"Powered by polotno.com",fontSize:14,fill:"rgba(0,0,0,0.6)",x:r-170,y:n-18,onMouseEnter:Ae=>{Ae.target.getStage().container().style.cursor="pointer"},onMouseLeave:Ae=>{Ae.target.getStage().container().style.cursor=""},onTouchStart:Ae=>{Ae.cancelBubble=!0},onMouseDown:Ae=>{Ae.cancelBubble=!0},onClick:()=>{window.open("https://polotno.com")},onTap:()=>{window.open("https://polotno.com")}}),ce.createElement(vn,{name:"line-guides"}))),J&&Re&&ce.createElement(Re,{store:e,page:t,xPadding:T,yPadding:k}))}),DN=Uh("div",ce.forwardRef)`
|
|
375
375
|
position: absolute;
|
|
376
376
|
top: 0;
|
|
377
377
|
left: 0;
|
|
@@ -409,7 +409,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
409
409
|
transform: rotate(90deg);
|
|
410
410
|
transform-origin: left top;
|
|
411
411
|
overflow: hidden;
|
|
412
|
-
`,HN=[.1,.2,.5,1,2,5,10,20,25,50,100,200,500,1e3,2e3,5e3,1e4],VN=Yn(({store:e,width:t,height:r})=>{const n=ce.useRef(null);if(!e.activePage)return null;const i=e.activePage,a=(e.bleedVisible&&i.bleed,i.computedWidth*e.scale),l=i.computedHeight*e.scale,o=(t-a)/2,u=(d=y=>d4({unitVal:y,dpi:e.dpi,unit:e.unit})*e.scale,HN.find(y=>d(y)>30)||1e4);var d;const f=d4({unitVal:u,dpi:e.dpi,unit:e.unit})*e.scale,v=Math.round(a/f)+1,g=Math.round(l/f)+1,c=P0(e.selectedShapes);return ce.createElement(DN,{ref:n,className:"polotno-rulers"},ce.createElement(BN,{style:{width:t+"px"},className:"polotno-x-ruler"},[...Array(v)].map((y,x)=>ce.createElement(UN,{key:x,style:{left:o+x*f+"px",width:f+"px"}},e.unit==="px"||u>=1?Math.round(u*x):(u*x).toFixed(1))),!!e.selectedShapes.length&&ce.createElement("div",{style:{position:"absolute",left:o+c.x*e.scale+"px",height:"14px",width:c.width*e.scale,backgroundColor:"rgba(0,0,0,0.15)"}})),e.pages.map((y,x)=>{var E;const S=y.computedHeight*e.scale,b=(r-S)/2;return ce.createElement(zN,{key:y.id,style:{height:r+"px"},className:"polotno-y-ruler"},[...Array(g)].map((w,_)=>ce.createElement(qN,{key:_,style:{top:b+_*f-14+"px",width:f+"px"}},e.unit==="px"||u>=1?Math.round(u*_):(u*_).toFixed(1))),((E=e.selectedShapes[0])===null||E===void 0?void 0:E.page)===y&&ce.createElement("div",{style:{position:"absolute",top:b+c.y*e.scale-14+"px",width:"14px",height:c.height*e.scale,backgroundColor:"rgba(0,0,0,0.15)"}}))}))}),GN=Yn(({audio:e,store:t})=>{const[r,n]=function(i){const[a,l]=ce.useState(null),[o,u]=ce.useState("loading");return ce.useEffect(()=>{const d=new Audio(i),f=()=>{u("loaded"),l(d)},v=()=>{u("failed"),l(null)};return d.addEventListener("canplay",f),d.addEventListener("error",v),()=>{d.removeEventListener("canplay",f),d.removeEventListener("error",v)}},[i]),[a,o]}(e.src);return ce.useEffect(()=>{r&&t.history.ignore(()=>{e.set({duration:1e3*r.duration})})},[r,e,t.history]),ce.useEffect(()=>{if(!r)return;const i=()=>{r.currentTime=e.startTime*e.duration/1e3},a=()=>{const o=e.endTime*e.duration/1e3;r.currentTime>=o&&(r.pause(),r.currentTime=e.startTime*e.duration/1e3)};r.addEventListener("ended",i),r.addEventListener("timeupdate",a);const l=Ou(()=>{const o=t.animatedElementsIds;if(o.length&&!o.includes(e.id))return;const u=t.currentTime-e.delay,d=e.duration*(e.endTime-e.startTime),f=u>=0&&u<d;if(!t.isPlaying||t.animatedElementsIds.length!==0||!f)return void r.pause();r.volume=e.volume,r.paused&&r.play();const v=u%d/1e3+e.startTime*e.duration/1e3,g=r.currentTime;Math.abs(g-v)>.5&&v!==g&&(r.currentTime=v)});return()=>{r.pause(),r.removeEventListener("ended",i),r.removeEventListener("timeupdate",a),l()}},[t.isPlaying,e.startTime,e.endTime,e.volume,r]),null});let j_={data:[],pageId:""};const Z1="polotno_clipboard",Fm=(e,t)=>{j_={data:JSON.parse(JSON.stringify(e)),pageId:t};try{localStorage.setItem(Z1,JSON.stringify(e)),localStorage.setItem(Z1+"_page",t)}catch{}},$N=()=>{try{const e=localStorage.getItem(Z1),t=localStorage.getItem(Z1+"_page");if(e)return{data:JSON.parse(e),pageId:t}}catch{}return j_},WN=e=>{var t;e.selectedElements.length!==0&&Fm(e.selectedElements.map(r=>r.toJSON()),(t=e.activePage)===null||t===void 0?void 0:t.id)},YN=e=>{var t;Fm(e.selectedElements.map(n=>n.toJSON()),(t=e.activePage)===null||t===void 0?void 0:t.id);let r=e.selectedElements.filter(n=>n.removable).map(n=>n.id);e.deleteElements(r)},XN=e=>{e.history.transaction(()=>{var t,r;let n=0,i=0;const{data:a,pageId:l}=$N();if(l===((t=e.activePage)===null||t===void 0?void 0:t.id))n=e.width/20,i=e.height/20;else{const u=[];Ei({children:a},f=>{f.type!=="group"&&u.push(f)});const d=P0(u);d.maxX>e.width&&(n=-d.minX),d.maxY>e.height&&(i=-d.minY)}const o=[];Ei({children:a},u=>{delete u.id,u.type!=="group"&&(u.x+=n,u.y+=i)}),a.forEach(u=>{var d;const f=(d=e.activePage)===null||d===void 0?void 0:d.addElement(u);f&&o.push(f.id)}),Fm(a,(r=e.activePage)===null||r===void 0?void 0:r.id),e.selectElements(o)})};function KN(e,t){var r,n,i,a;if(((r=document.activeElement)===null||r===void 0?void 0:r.tagName)==="INPUT"||((n=document.activeElement)===null||n===void 0?void 0:n.tagName)==="TEXTAREA"||((i=document.activeElement)===null||i===void 0?void 0:i.contentEditable)==="true")return;const l=t.selectedElements.filter(d=>d.removable).map(d=>d.id);e.keyCode!==46&&e.keyCode!==8||t.deleteElements(l);const o=e.ctrlKey||e.metaKey,u=e.shiftKey;if(!o||u||e.key.toLowerCase()!=="z"&&e.key.toLowerCase()!=="y"||(e.preventDefault(),t.history.undo()),o&&u&&(e.key.toLowerCase()==="z"||e.key.toLowerCase()==="y")&&(e.preventDefault(),t.history.redo()),o&&e.code==="KeyA"){e.preventDefault();const d=(a=t.activePage)===null||a===void 0?void 0:a.children.filter(v=>v.selectable),f=d?.map(v=>v.id)||[];t.selectElements(f)}o&&e.code==="KeyC"&&(e.preventDefault(),WN(t)),o&&e.code==="KeyX"&&(e.preventDefault(),YN(t)),o&&e.code==="KeyV"&&(e.preventDefault(),XN(t)),e.code==="ArrowDown"&&(e.preventDefault(),t.selectedShapes.forEach(d=>{d.draggable&&d.set({y:d.y+1})})),e.code==="ArrowUp"&&(e.preventDefault(),t.selectedShapes.forEach(d=>{d.draggable&&d.set({y:d.y-1})})),e.code==="ArrowLeft"&&(e.preventDefault(),t.selectedShapes.forEach(d=>{d.draggable&&d.set({x:d.x-1})})),e.code==="ArrowRight"&&(e.preventDefault(),t.selectedShapes.forEach(d=>{d.draggable&&d.set({x:d.x+1})}))}const qv=$r({toolbar:{duration:"Duration",opacity:"Opacity",effects:"Effects",blur:"Blur",textBackground:"Background",backgroundCornerRadius:"Corner radius",backgroundOpacity:"Opacity",backgroundPadding:"Padding",brightness:"Brightness",filters:"Filters",sepia:"Sepia",grayscale:"Grayscale",textStroke:"Text Stroke",shadow:"Shadow",border:"Border",cornerRadius:"Corner Radius",copyStyle:"Copy style",uppercase:"Uppercase",position:"Position",layering:"Layering",toForward:"To Front",up:"Forward",down:"Backward",toBottom:"To back",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom",flip:"Flip",flipHorizontally:"Flip horizontally",flipVertically:"Flip vertically",fitToBackground:"Fit to page",removeBackground:"Remove background",removeBackgroundTitle:"Remove background from image",cancelRemoveBackground:"Cancel",confirmRemoveBackground:"Confirm",crop:"Crop",cropDone:"Done",cropCancel:"Cancel",clip:"Apply mask",removeClip:"Remove mask",removeMask:"Remove mask",transparency:"Transparency",lockedDescription:"Object is locked. Unlock it to allow changes from canvas.",unlockedDescription:"Object is unlocked. Lock it to prevent changes from canvas.",removeElements:"Remove elements",duplicateElements:"Duplicate elements",download:"Download",saveAsImage:"Save as image",saveAsPDF:"Save as PDF",lineHeight:"Line height",letterSpacing:"Letter spacing",offsetX:"Offset X",offsetY:"Offset Y",color:"Color",selectable:"Selectable",draggable:"Draggable",removable:"Removable",resizable:"Resizable",contentEditable:"Can change content",styleEditable:"Can change style",alwaysOnTop:"Always on top",showInExport:"Show in export",ungroupElements:"Ungroup",groupElements:"Group",lineSize:"Line size",fade:"Fade",move:"Move",zoom:"Zoom",animate:"Animate",rotate:"Rotate",none:"None",bounce:"Bounce",blink:"Blink",strength:"Strength",spaceEvenly:"Space evenly",horizontalDistribution:"Horizontally",verticalDistribution:"Vertically",strokeWidth:"Stroke Width",colorPicker:{solid:"Solid",linear:"Linear",angle:"Angle"},aiText:{aiWrite:"AI write",rewrite:"Rewrite",shorten:"Shorten",continue:"Continue writing",proofread:"Proofread",tones:"Tones",friendly:"Friendly",professional:"Professional",humorous:"Humorous",formal:"Formal",customPrompt:"Custom prompt",generatedResult:"Generated result",cancel:"Cancel",generate:"Generate",back:"Back",tryAgain:"Try Again",insert:"Insert",promptPlaceholder:"Describe what you want to generate"}},workspace:{noPages:"There are no pages yet...",addPage:"Add page",removePage:"Remove page",duplicatePage:"Duplicate page",moveUp:"Move up",moveDown:"Move down"},scale:{reset:"Reset"},error:{removeBackground:"Ops! Something went wrong. Background can not be removed."},sidePanel:{templates:"Templates",searchTemplatesWithSameSize:"Show templates with the same size",searchPlaceholder:"Search...",otherFormats:"Other formats",noResults:"No results",error:"Loading is failed...",text:"Text",uploadFont:"Upload font",myFonts:"My fonts",photos:"Photos",videos:"Videos",animations:"Animations",effects:"Effects",elements:"Elements",shapes:"Shapes",lines:"Lines",upload:"Upload",uploadImage:"Add file",uploadTip:"Upload your assets",background:"Background",resize:"Resize",layers:"Layers",animate:"Animate",layerTypes:{image:"Image",text:"Text",svg:"SVG",line:"Line",figure:"Figure",group:"Group"},layersTip:"Elements on your active page:",noLayers:"No elements on the page...",namePlaceholder:"Type element name...",useMagicResize:"Use magic resize",clipImage:"Mask image",width:"Width",height:"Height",magicResizeDescription:"Magic resize will automatically resize and move all elements on the canvas",headerText:"Header",createHeader:"Create header",subHeaderText:"Sub Header",createSubHeader:"Create sub header",bodyText:"Body text",createBody:"Create body text"},pagesTimeline:{pages:"Pages",removePage:"Remove page",addPage:"Add page",duplicatePage:"Duplicate page",removeAudio:"Remove audio"},contextMenu:{duplicate:"Duplicate",remove:"Remove",lock:"Lock",unlock:"Unlock",copy:"Copy",paste:"Paste",copyStyle:"Copy style",moveUp:"Move up",moveDown:"Move down",moveBack:"Move back",moveForward:"Move forward"}}),Q1=e=>e&&typeof e=="object";function D_(e,t){Object.keys(t).forEach(r=>{const n=e[r],i=t[r];Q1(i)&&Q1(n)?D_(n,i):e[r]=i})}function B_(e,t,r=""){Object.keys(t).forEach(n=>{const i=t[n],a=r?`${r}.${n}`:n;Q1(i)?Q1(e[n])?B_(e[n],i,a):console.warn(`Missing nested translation object at '${a}'`):e[n]===void 0&&console.warn(`Missing translation '${a}'`)})}Wr((e,{validate:t=!1}={})=>{t&&B_(e,qv),D_(qv,e)});const S4={},E4=e=>{const t=function(i,a){var l,o=a.split("."),u=i;for(l=0;l<o.length;++l){if(u[o[l]]==null)return;u=u[o[l]]}return u}(qv,e);if(t!==void 0)return t;S4[e]||(S4[e]=!0,console.warn(`Missing translation '${e}'`));const r=e.split("."),n=r[r.length-1]||" ";return n.charAt(0).toUpperCase()+n.slice(1)},ZN=({store:e})=>ce.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}},ce.createElement("p",null,E4("workspace.noPages")),ce.createElement("button",{onClick:()=>{e.addPage()}},E4("workspace.addPage"))),QN=({width:e,height:t,xPadding:r,yPadding:n,backgroundColor:i})=>ce.createElement("div",{style:{width:e+"px",height:t+"px",backgroundColor:i,paddingLeft:r+"px",paddingRight:r+"px",paddingTop:n+"px",paddingBottom:n+"px"}},ce.createElement("div",{style:{width:" 100%",height:"100%",backgroundColor:"white"}})),JN=[4,6],eL=Yn(({store:e,pageControlsEnabled:t,backgroundColor:r,pageBorderColor:n,activePageBorderColor:i,bleedColor:a,snapGuideStroke:l,snapGuideStrokeWidth:o,snapGuideDash:u,selectionRectFill:d,selectionRectStroke:f,selectionRectStrokeWidth:v,transformLabelFill:g,transformLabelTextFill:c,distanceGuideStroke:y,distanceLabelFill:x,distanceLabelTextFill:E,components:S,onKeyDown:b,paddingX:w,paddingY:_,altCloneEnabled:A=!0,visiblePagesOffset:M,renderOnlyActivePage:O})=>{var L;const R=w??20,T=_??55,[k,C]=ce.useState({width:100,height:100}),q=ce.useRef(k),G=ce.useRef(null),J=ce.useRef(null),ae=e.bleedVisible?Math.max(0,...e.pages.map(Pe=>Pe.bleed)):0,H=Math.max(...e.pages.map(Pe=>Pe.computedWidth)),V=Math.max(...e.pages.map(Pe=>Pe.computedHeight)),Y=((L=e.activePage)===null||L===void 0?void 0:L.computedHeight)||0,U=H+2*ae,D=(O?Y:V)+2*ae,j=async({skipTimeout:Pe}={skipTimeout:!1})=>{if(Pe||await new Promise(pe=>setTimeout(pe,50)),G.current===null)return;const de=G.current.getBoundingClientRect();de.width!==0&&de.height!==0||(console.warn(`Polotno warning: <Workspace /> component can not automatically detect its size.
|
|
412
|
+
`,HN=[.1,.2,.5,1,2,5,10,20,25,50,100,200,500,1e3,2e3,5e3,1e4],VN=Yn(({store:e,width:t,height:r})=>{const n=ce.useRef(null);if(!e.activePage)return null;const i=e.activePage,a=(e.bleedVisible&&i.bleed,i.computedWidth*e.scale),l=i.computedHeight*e.scale,o=(t-a)/2,u=(d=y=>d4({unitVal:y,dpi:e.dpi,unit:e.unit})*e.scale,HN.find(y=>d(y)>30)||1e4);var d;const f=d4({unitVal:u,dpi:e.dpi,unit:e.unit})*e.scale,v=Math.round(a/f)+1,g=Math.round(l/f)+1,c=P0(e.selectedShapes);return ce.createElement(DN,{ref:n,className:"polotno-rulers"},ce.createElement(BN,{style:{width:t+"px"},className:"polotno-x-ruler"},[...Array(v)].map((y,x)=>ce.createElement(UN,{key:x,style:{left:o+x*f+"px",width:f+"px"}},e.unit==="px"||u>=1?Math.round(u*x):(u*x).toFixed(1))),!!e.selectedShapes.length&&ce.createElement("div",{style:{position:"absolute",left:o+c.x*e.scale+"px",height:"14px",width:c.width*e.scale,backgroundColor:"rgba(0,0,0,0.15)"}})),e.pages.map((y,x)=>{var E;const S=y.computedHeight*e.scale,b=(r-S)/2;return ce.createElement(zN,{key:y.id,style:{height:r+"px"},className:"polotno-y-ruler"},[...Array(g)].map((w,_)=>ce.createElement(qN,{key:_,style:{top:b+_*f-14+"px",width:f+"px"}},e.unit==="px"||u>=1?Math.round(u*_):(u*_).toFixed(1))),((E=e.selectedShapes[0])===null||E===void 0?void 0:E.page)===y&&ce.createElement("div",{style:{position:"absolute",top:b+c.y*e.scale-14+"px",width:"14px",height:c.height*e.scale,backgroundColor:"rgba(0,0,0,0.15)"}}))}))}),GN=Yn(({audio:e,store:t})=>{const[r,n]=function(i){const[a,l]=ce.useState(null),[o,u]=ce.useState("loading");return ce.useEffect(()=>{const d=new Audio(i),f=()=>{u("loaded"),l(d)},v=()=>{u("failed"),l(null)};return d.addEventListener("canplay",f),d.addEventListener("error",v),()=>{d.removeEventListener("canplay",f),d.removeEventListener("error",v)}},[i]),[a,o]}(e.src);return ce.useEffect(()=>{r&&t.history.ignore(()=>{e.set({duration:1e3*r.duration})})},[r,e,t.history]),ce.useEffect(()=>{if(!r)return;const i=()=>{r.currentTime=e.startTime*e.duration/1e3},a=()=>{const o=e.endTime*e.duration/1e3;r.currentTime>=o&&(r.pause(),r.currentTime=e.startTime*e.duration/1e3)};r.addEventListener("ended",i),r.addEventListener("timeupdate",a);const l=Ou(()=>{const o=t.animatedElementsIds;if(o.length&&!o.includes(e.id))return;const u=t.currentTime-e.delay,d=e.duration*(e.endTime-e.startTime),f=u>=0&&u<d;if(!t.isPlaying||t.animatedElementsIds.length!==0||!f)return void r.pause();r.volume=e.volume,r.paused&&r.play();const v=u%d/1e3+e.startTime*e.duration/1e3,g=r.currentTime;Math.abs(g-v)>.5&&v!==g&&(r.currentTime=v)});return()=>{r.pause(),r.removeEventListener("ended",i),r.removeEventListener("timeupdate",a),l()}},[t.isPlaying,e.startTime,e.endTime,e.volume,r]),null});let j_={data:[],pageId:""};const Z1="polotno_clipboard",Fm=(e,t)=>{j_={data:JSON.parse(JSON.stringify(e)),pageId:t};try{localStorage.setItem(Z1,JSON.stringify(e)),localStorage.setItem(Z1+"_page",t)}catch{}},$N=()=>{try{const e=localStorage.getItem(Z1),t=localStorage.getItem(Z1+"_page");if(e)return{data:JSON.parse(e),pageId:t}}catch{}return j_},WN=e=>{var t;e.selectedElements.length!==0&&Fm(e.selectedElements.map(r=>r.toJSON()),(t=e.activePage)===null||t===void 0?void 0:t.id)},YN=e=>{var t;Fm(e.selectedElements.map(n=>n.toJSON()),(t=e.activePage)===null||t===void 0?void 0:t.id);let r=e.selectedElements.filter(n=>n.removable).map(n=>n.id);e.deleteElements(r)},XN=e=>{e.history.transaction(()=>{var t,r;let n=0,i=0;const{data:a,pageId:l}=$N();if(l===((t=e.activePage)===null||t===void 0?void 0:t.id))n=e.width/20,i=e.height/20;else{const u=[];Ai({children:a},f=>{f.type!=="group"&&u.push(f)});const d=P0(u);d.maxX>e.width&&(n=-d.minX),d.maxY>e.height&&(i=-d.minY)}const o=[];Ai({children:a},u=>{delete u.id,u.type!=="group"&&(u.x+=n,u.y+=i)}),a.forEach(u=>{var d;const f=(d=e.activePage)===null||d===void 0?void 0:d.addElement(u);f&&o.push(f.id)}),Fm(a,(r=e.activePage)===null||r===void 0?void 0:r.id),e.selectElements(o)})};function KN(e,t){var r,n,i,a;if(((r=document.activeElement)===null||r===void 0?void 0:r.tagName)==="INPUT"||((n=document.activeElement)===null||n===void 0?void 0:n.tagName)==="TEXTAREA"||((i=document.activeElement)===null||i===void 0?void 0:i.contentEditable)==="true")return;const l=t.selectedElements.filter(d=>d.removable).map(d=>d.id);e.keyCode!==46&&e.keyCode!==8||t.deleteElements(l);const o=e.ctrlKey||e.metaKey,u=e.shiftKey;if(!o||u||e.key.toLowerCase()!=="z"&&e.key.toLowerCase()!=="y"||(e.preventDefault(),t.history.undo()),o&&u&&(e.key.toLowerCase()==="z"||e.key.toLowerCase()==="y")&&(e.preventDefault(),t.history.redo()),o&&e.code==="KeyA"){e.preventDefault();const d=(a=t.activePage)===null||a===void 0?void 0:a.children.filter(v=>v.selectable),f=d?.map(v=>v.id)||[];t.selectElements(f)}o&&e.code==="KeyC"&&(e.preventDefault(),WN(t)),o&&e.code==="KeyX"&&(e.preventDefault(),YN(t)),o&&e.code==="KeyV"&&(e.preventDefault(),XN(t)),e.code==="ArrowDown"&&(e.preventDefault(),t.selectedShapes.forEach(d=>{d.draggable&&d.set({y:d.y+1})})),e.code==="ArrowUp"&&(e.preventDefault(),t.selectedShapes.forEach(d=>{d.draggable&&d.set({y:d.y-1})})),e.code==="ArrowLeft"&&(e.preventDefault(),t.selectedShapes.forEach(d=>{d.draggable&&d.set({x:d.x-1})})),e.code==="ArrowRight"&&(e.preventDefault(),t.selectedShapes.forEach(d=>{d.draggable&&d.set({x:d.x+1})}))}const qv=$r({toolbar:{duration:"Duration",opacity:"Opacity",effects:"Effects",blur:"Blur",textBackground:"Background",backgroundCornerRadius:"Corner radius",backgroundOpacity:"Opacity",backgroundPadding:"Padding",brightness:"Brightness",filters:"Filters",sepia:"Sepia",grayscale:"Grayscale",textStroke:"Text Stroke",shadow:"Shadow",border:"Border",cornerRadius:"Corner Radius",copyStyle:"Copy style",uppercase:"Uppercase",position:"Position",layering:"Layering",toForward:"To Front",up:"Forward",down:"Backward",toBottom:"To back",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom",flip:"Flip",flipHorizontally:"Flip horizontally",flipVertically:"Flip vertically",fitToBackground:"Fit to page",removeBackground:"Remove background",removeBackgroundTitle:"Remove background from image",cancelRemoveBackground:"Cancel",confirmRemoveBackground:"Confirm",crop:"Crop",cropDone:"Done",cropCancel:"Cancel",clip:"Apply mask",removeClip:"Remove mask",removeMask:"Remove mask",transparency:"Transparency",lockedDescription:"Object is locked. Unlock it to allow changes from canvas.",unlockedDescription:"Object is unlocked. Lock it to prevent changes from canvas.",removeElements:"Remove elements",duplicateElements:"Duplicate elements",download:"Download",saveAsImage:"Save as image",saveAsPDF:"Save as PDF",lineHeight:"Line height",letterSpacing:"Letter spacing",offsetX:"Offset X",offsetY:"Offset Y",color:"Color",selectable:"Selectable",draggable:"Draggable",removable:"Removable",resizable:"Resizable",contentEditable:"Can change content",styleEditable:"Can change style",alwaysOnTop:"Always on top",showInExport:"Show in export",ungroupElements:"Ungroup",groupElements:"Group",lineSize:"Line size",fade:"Fade",move:"Move",zoom:"Zoom",animate:"Animate",rotate:"Rotate",none:"None",bounce:"Bounce",blink:"Blink",strength:"Strength",spaceEvenly:"Space evenly",horizontalDistribution:"Horizontally",verticalDistribution:"Vertically",strokeWidth:"Stroke Width",colorPicker:{solid:"Solid",linear:"Linear",angle:"Angle"},aiText:{aiWrite:"AI write",rewrite:"Rewrite",shorten:"Shorten",continue:"Continue writing",proofread:"Proofread",tones:"Tones",friendly:"Friendly",professional:"Professional",humorous:"Humorous",formal:"Formal",customPrompt:"Custom prompt",generatedResult:"Generated result",cancel:"Cancel",generate:"Generate",back:"Back",tryAgain:"Try Again",insert:"Insert",promptPlaceholder:"Describe what you want to generate"}},workspace:{noPages:"There are no pages yet...",addPage:"Add page",removePage:"Remove page",duplicatePage:"Duplicate page",moveUp:"Move up",moveDown:"Move down"},scale:{reset:"Reset"},error:{removeBackground:"Ops! Something went wrong. Background can not be removed."},sidePanel:{templates:"Templates",searchTemplatesWithSameSize:"Show templates with the same size",searchPlaceholder:"Search...",otherFormats:"Other formats",noResults:"No results",error:"Loading is failed...",text:"Text",uploadFont:"Upload font",myFonts:"My fonts",photos:"Photos",videos:"Videos",animations:"Animations",effects:"Effects",elements:"Elements",shapes:"Shapes",lines:"Lines",upload:"Upload",uploadImage:"Add file",uploadTip:"Upload your assets",background:"Background",resize:"Resize",layers:"Layers",animate:"Animate",layerTypes:{image:"Image",text:"Text",svg:"SVG",line:"Line",figure:"Figure",group:"Group"},layersTip:"Elements on your active page:",noLayers:"No elements on the page...",namePlaceholder:"Type element name...",useMagicResize:"Use magic resize",clipImage:"Mask image",width:"Width",height:"Height",magicResizeDescription:"Magic resize will automatically resize and move all elements on the canvas",headerText:"Header",createHeader:"Create header",subHeaderText:"Sub Header",createSubHeader:"Create sub header",bodyText:"Body text",createBody:"Create body text"},pagesTimeline:{pages:"Pages",removePage:"Remove page",addPage:"Add page",duplicatePage:"Duplicate page",removeAudio:"Remove audio"},contextMenu:{duplicate:"Duplicate",remove:"Remove",lock:"Lock",unlock:"Unlock",copy:"Copy",paste:"Paste",copyStyle:"Copy style",moveUp:"Move up",moveDown:"Move down",moveBack:"Move back",moveForward:"Move forward"}}),Q1=e=>e&&typeof e=="object";function D_(e,t){Object.keys(t).forEach(r=>{const n=e[r],i=t[r];Q1(i)&&Q1(n)?D_(n,i):e[r]=i})}function B_(e,t,r=""){Object.keys(t).forEach(n=>{const i=t[n],a=r?`${r}.${n}`:n;Q1(i)?Q1(e[n])?B_(e[n],i,a):console.warn(`Missing nested translation object at '${a}'`):e[n]===void 0&&console.warn(`Missing translation '${a}'`)})}Wr((e,{validate:t=!1}={})=>{t&&B_(e,qv),D_(qv,e)});const S4={},E4=e=>{const t=function(i,a){var l,o=a.split("."),u=i;for(l=0;l<o.length;++l){if(u[o[l]]==null)return;u=u[o[l]]}return u}(qv,e);if(t!==void 0)return t;S4[e]||(S4[e]=!0,console.warn(`Missing translation '${e}'`));const r=e.split("."),n=r[r.length-1]||" ";return n.charAt(0).toUpperCase()+n.slice(1)},ZN=({store:e})=>ce.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}},ce.createElement("p",null,E4("workspace.noPages")),ce.createElement("button",{onClick:()=>{e.addPage()}},E4("workspace.addPage"))),QN=({width:e,height:t,xPadding:r,yPadding:n,backgroundColor:i})=>ce.createElement("div",{style:{width:e+"px",height:t+"px",backgroundColor:i,paddingLeft:r+"px",paddingRight:r+"px",paddingTop:n+"px",paddingBottom:n+"px"}},ce.createElement("div",{style:{width:" 100%",height:"100%",backgroundColor:"white"}})),JN=[4,6],eL=Yn(({store:e,pageControlsEnabled:t,backgroundColor:r,pageBorderColor:n,activePageBorderColor:i,bleedColor:a,snapGuideStroke:l,snapGuideStrokeWidth:o,snapGuideDash:u,selectionRectFill:d,selectionRectStroke:f,selectionRectStrokeWidth:v,transformLabelFill:g,transformLabelTextFill:c,distanceGuideStroke:y,distanceLabelFill:x,distanceLabelTextFill:E,components:S,onKeyDown:b,paddingX:w,paddingY:_,altCloneEnabled:A=!0,visiblePagesOffset:M,renderOnlyActivePage:O})=>{var L;const R=w??20,T=_??55,[k,C]=ce.useState({width:100,height:100}),q=ce.useRef(k),G=ce.useRef(null),J=ce.useRef(null),ae=e.bleedVisible?Math.max(0,...e.pages.map(Pe=>Pe.bleed)):0,H=Math.max(...e.pages.map(Pe=>Pe.computedWidth)),V=Math.max(...e.pages.map(Pe=>Pe.computedHeight)),Y=((L=e.activePage)===null||L===void 0?void 0:L.computedHeight)||0,U=H+2*ae,D=(O?Y:V)+2*ae,j=async({skipTimeout:Pe}={skipTimeout:!1})=>{if(Pe||await new Promise(pe=>setTimeout(pe,50)),G.current===null)return;const de=G.current.getBoundingClientRect();de.width!==0&&de.height!==0||(console.warn(`Polotno warning: <Workspace /> component can not automatically detect its size.
|
|
413
413
|
Width or height of parent elements is equal 0.
|
|
414
414
|
Please make sure it has non-zero size. You may need to adjust it with your styles. <Workspace /> will automatically fit into parent container.
|
|
415
415
|
For simpler debugging here is the log of the parent element:`),console.log(G.current));const Te=J.current.clientWidth||de.width,Ae={width:Te,height:de.height};(q.current.width!==Ae.width||q.current.height!==Ae.height)&&(C(Ae),q.current=Ae);const be=(Te-2*R)/U,_e=e.pages.length>1?3.1:2,xe=(de.height-T*_e)/D,Le=e.pages.length?Math.max(Math.min(be,xe),.01):1;e.scaleToFit!==Le&&(e.setScale(Le),e._setScaleToFit(Le))};ce.useLayoutEffect(()=>{j({skipTimeout:!0})},[]),ce.useEffect(()=>{j()},[U,D,_,w]),ce.useLayoutEffect(()=>{j({skipTimeout:!0})},[e.openedSidePanel]),ce.useEffect(()=>{e.__()},[]),ce.useEffect(()=>{const Pe=G.current;if(window.ResizeObserver){const de=new ResizeObserver(()=>{j({skipTimeout:!0})});return de.observe(Pe),()=>de.unobserve(Pe)}{const de=setInterval(()=>{j({skipTimeout:!0})},100);return()=>clearInterval(de)}},[U,D]);const z=Math.max(R,(k.width-U*e.scale)/2),Z=O?1:e.pages.length,re=D*e.scale*Z,W=Math.max(T,(k.height-re)/Z/2);ce.useEffect(()=>{const Pe=de=>{(b||KN)(de,e)};return window.addEventListener("keydown",Pe),()=>window.removeEventListener("keydown",Pe)},[]),ce.useEffect(()=>{var Pe;const de=Te=>{if(Te.ctrlKey||Te.metaKey){Te.preventDefault();const xe=Math.max(5,e.scaleToFit),Le=Math.min(.1,e.scaleToFit),pe=.03,Ce=(Ae=Te.deltaY<0?e.scale*(1+pe):e.scale/(1+pe),be=Le,_e=xe,Math.max(be,Math.min(_e,Ae)));return void e.setScale(Ce)}var Ae,be,_e};return(Pe=J.current)===null||Pe===void 0||Pe.addEventListener("wheel",de),()=>{var Te;return(Te=J.current)===null||Te===void 0?void 0:Te.removeEventListener("wheel",de)}},[]);const Q=ce.useRef(!1);((Pe,de,Te,Ae,be,_e)=>{const xe=ce.useRef({width:de,height:Te}),Le=ce.useRef({top:0,left:0}),pe=ce.useRef(!1),Ce=ce.useRef(be.pages.length);pe.current=Ce.current!==be.pages.length,Ce.current=be.pages.length,ce.useEffect(()=>{const je=Pe.current,He=st=>{Le.current={top:je.scrollTop,left:je.scrollLeft}};return je.addEventListener("scroll",He),()=>{je.removeEventListener("scroll",He)}},[]),ce.useLayoutEffect(()=>{if(!Pe.current||pe.current)return;const je=Pe.current,He=(Le.current.left+je.offsetWidth/2)/xe.current.width,st=(Le.current.top+je.offsetHeight/2)/xe.current.height;_e.current=!0,je.scrollLeft=He*de-je.offsetWidth/2,je.scrollTop=st*Te-je.offsetHeight/2,xe.current={width:de,height:Te}},[Ae,de,Te])})(J,U*e.scale+2*z,D*e.scale+2*W,e.scale,e,Q);const{handleScroll:se}=((Pe,de,Te,Ae,be,_e)=>{const xe=ce.useRef(!1),Le=ce.useRef(null),pe=ce.useRef(!1);ce.useEffect(()=>{const je=Pe.current,He=()=>{be.current};return je.addEventListener("scroll",He),()=>{je.removeEventListener("scroll",He)}},[]);const Ce=Te.pages.indexOf(Te.activePage);return ce.useLayoutEffect(()=>{if(_e||!Te.activePage||!Pe.current||xe.current)return;const je=Pe.current,He=Te.pages.indexOf(Te.activePage)*de;let st=()=>{};return(Math.abs(He-je.scrollTop)>.5*de||pe.current)&&(pe.current=!0,st=(({element:pt,scrollTop:ct=0,duration:bt=300,onFinish:ht=()=>{}})=>{const vt=pt.scrollTop,wr=ct-vt;let cr=0,Pt=!1;if(bt===0)return pt.scrollTop=ct,()=>{};const $t=()=>{if(Pt)return;cr+=20;const ze=$e(cr,vt,wr,bt);pt.scrollTop=ze,cr<bt?setTimeout($t,20):ht()},$e=(ze,kt,St,er)=>(ze/=er/2)<1?St/2*ze*ze+kt:-St/2*(--ze*(ze-2)-1)+kt;return $t(),()=>{Pt=!0}})({element:je,scrollTop:He,onFinish:()=>{pe.current=!1},duration:Te.isPlaying?0:300})),st},[Te.activePage,Ce,Te.isPlaying,_e]),{handleScroll:je=>{if(_e||pe.current)return;xe.current=!0,clearTimeout(Le.current),Le.current=setTimeout(()=>{xe.current=!1},300);const He=je.currentTarget.childNodes[0].offsetHeight,st=je.currentTarget.scrollTop,pt=Math.floor((st+Ae.height/3)/He),ct=Te.pages[pt];ct&&Te.activePage!==ct&&ct.select()}}})(J,D*e.scale+2*W,e,k,Q,O),ue=k.width>=U*e.scale+2*z,le=r||"rgba(232, 232, 232, 0.9)",ye=e.pages.indexOf(e.activePage),Re=S?.NoPages||ZN,Me=M??Math.min(3,Math.max(1,Math.ceil(k.height/2/(D*e.scale))));return ce.createElement("div",{ref:G,style:{width:"100%",height:"100%",position:"relative",outline:"none",flex:1,backgroundColor:le,overflow:"hidden"},tabIndex:0,className:"polotno-workspace-container"},ce.createElement("div",{ref:J,onScroll:se,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"auto",overflowX:ue?"hidden":"auto"},className:"polotno-workspace-inner"},e.pages.map((Pe,de)=>{const Te=Pe===e.activePage;if(O&&!Te&&!Pe._exportingOrRendering&&!Pe._forceMount)return null;if(!(Math.abs(de-ye)<=Me||Pe._exportingOrRendering||Pe._forceMount))return ce.createElement(QN,{key:Pe.id,width:U*e.scale+2*z,height:D*e.scale+2*W,backgroundColor:le,xPadding:z,yPadding:W});const Ae=ce.createElement(jN,{key:Pe.id,page:Pe,xPadding:z,yPadding:W,width:U*e.scale+2*z,height:D*e.scale+2*W,store:e,pageControlsEnabled:t,backColor:le,pageBorderColor:n||"lightgrey",activePageBorderColor:i||"rgb(0, 161, 255)",altCloneEnabled:A,bleedColor:a||"rgba(255, 0, 0, 0.1)",selectionRectFill:d,selectionRectStroke:f,selectionRectStrokeWidth:v,snapGuideStroke:l||"rgb(0, 161, 255)",snapGuideStrokeWidth:o||1,snapGuideDash:u||JN,transformLabelFill:g,transformLabelTextFill:c,distanceGuideStroke:y||"rgb(0, 161, 255)",distanceLabelFill:x||"rgb(0, 161, 255)",distanceLabelTextFill:E||"white",components:S,viewportSize:k});return(Pe._exportingOrRendering||Pe._forceMount)&&!Te&&O?ce.createElement("div",{style:{display:"none"},key:Pe.id},Ae):Ae}),e.rulesVisible&&ce.createElement(VN,{store:e,xPadding:z,yPadding:W,width:U*e.scale+2*z,height:D*e.scale+2*W}),e.pages.length===0&&ce.createElement(Re,{store:e}),e.audios.map(Pe=>ce.createElement(GN,{key:Pe.id,audio:Pe,store:e}))))}),tL="modulepreload",rL=function(e,t){return new URL(e,t).href},A4={},Z2=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let d=function(f){return Promise.all(f.map(v=>Promise.resolve(v).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};const l=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),u=o?.nonce||o?.getAttribute("nonce");i=d(r.map(f=>{if(f=rL(f,n),f in A4)return;A4[f]=!0;const v=f.endsWith(".css"),g=v?'[rel="stylesheet"]':"";if(!!n)for(let x=l.length-1;x>=0;x--){const E=l[x];if(E.href===f&&(!v||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${g}`))return;const y=document.createElement("link");if(y.rel=v?"stylesheet":tL,v||(y.as="script"),y.crossOrigin="",y.href=f,u&&y.setAttribute("nonce",u),document.head.appendChild(y),v)return new Promise((x,E)=>{y.addEventListener("load",x),y.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${f}`)))})}))}function a(l){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l}return i.then(l=>{for(const o of l||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})};function Sn(e){"@babel/helpers - typeof";return Sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sn(e)}var Bl=Uint8Array,Hs=Uint16Array,jm=Int32Array,Dm=new Bl([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Bm=new Bl([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),P4=new Bl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),z_=function(e,t){for(var r=new Hs(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new jm(r[30]),n=1;n<30;++n)for(var a=r[n];a<r[n+1];++a)i[a]=a-r[n]<<5|n;return{b:r,r:i}},U_=z_(Dm,2),nL=U_.b,Hv=U_.r;nL[28]=258,Hv[258]=28;var iL=z_(Bm,0),k4=iL.r,Vv=new Hs(32768);for(var ai=0;ai<32768;++ai){var Hc=(ai&43690)>>1|(ai&21845)<<1;Hc=(Hc&52428)>>2|(Hc&13107)<<2,Hc=(Hc&61680)>>4|(Hc&3855)<<4,Vv[ai]=((Hc&65280)>>8|(Hc&255)<<8)>>1}var rp=function(e,t,r){for(var n=e.length,i=0,a=new Hs(t);i<n;++i)e[i]&&++a[e[i]-1];var l=new Hs(t);for(i=1;i<t;++i)l[i]=l[i-1]+a[i-1]<<1;var o;if(r){o=new Hs(1<<t);var u=15-t;for(i=0;i<n;++i)if(e[i])for(var d=i<<4|e[i],f=t-e[i],v=l[e[i]-1]++<<f,g=v|(1<<f)-1;v<=g;++v)o[Vv[v]>>u]=d}else for(o=new Hs(n),i=0;i<n;++i)e[i]&&(o[i]=Vv[l[e[i]-1]++]>>15-e[i]);return o},zf=new Bl(288);for(var ai=0;ai<144;++ai)zf[ai]=8;for(var ai=144;ai<256;++ai)zf[ai]=9;for(var ai=256;ai<280;++ai)zf[ai]=7;for(var ai=280;ai<288;++ai)zf[ai]=8;var J1=new Bl(32);for(var ai=0;ai<32;++ai)J1[ai]=5;var aL=rp(zf,9,0),oL=rp(J1,5,0),q_=function(e){return(e+7)/8|0},sL=function(e,t,r){return(r==null||r>e.length)&&(r=e.length),new Bl(e.subarray(t,r))},Zu=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},Vd=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},Q2=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,a=r.slice();if(!i)return{t:V_,l:0};if(i==1){var l=new Bl(r[0].s+1);return l[r[0].s]=1,{t:l,l:1}}r.sort(function(A,M){return A.f-M.f}),r.push({s:-1,f:25001});var o=r[0],u=r[1],d=0,f=1,v=2;for(r[0]={s:-1,f:o.f+u.f,l:o,r:u};f!=i-1;)o=r[r[d].f<r[v].f?d++:v++],u=r[d!=f&&r[d].f<r[v].f?d++:v++],r[f++]={s:-1,f:o.f+u.f,l:o,r:u};for(var g=a[0].s,n=1;n<i;++n)a[n].s>g&&(g=a[n].s);var c=new Hs(g+1),y=Gv(r[f-1],c,0);if(y>t){var n=0,x=0,E=y-t,S=1<<E;for(a.sort(function(M,O){return c[O.s]-c[M.s]||M.f-O.f});n<i;++n){var b=a[n].s;if(c[b]>t)x+=S-(1<<y-c[b]),c[b]=t;else break}for(x>>=E;x>0;){var w=a[n].s;c[w]<t?x-=1<<t-c[w]++-1:++n}for(;n>=0&&x;--n){var _=a[n].s;c[_]==t&&(--c[_],++x)}y=t}return{t:new Bl(c),l:y}},Gv=function(e,t,r){return e.s==-1?Math.max(Gv(e.l,t,r+1),Gv(e.r,t,r+1)):t[e.s]=r},O4=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Hs(++t),n=0,i=e[0],a=1,l=function(u){r[n++]=u},o=1;o<=t;++o)if(e[o]==i&&o!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)l(32754);a>2&&(l(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(l(i),--a;a>6;a-=6)l(8304);a>2&&(l(a-3<<5|8208),a=0)}for(;a--;)l(i);a=1,i=e[o]}return{c:r.subarray(0,n),n:t}},Gd=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},H_=function(e,t,r){var n=r.length,i=q_(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<n;++a)e[i+a+4]=r[a];return(i+4+n)*8},C4=function(e,t,r,n,i,a,l,o,u,d,f){Zu(t,f++,r),++i[256];for(var v=Q2(i,15),g=v.t,c=v.l,y=Q2(a,15),x=y.t,E=y.l,S=O4(g),b=S.c,w=S.n,_=O4(x),A=_.c,M=_.n,O=new Hs(19),L=0;L<b.length;++L)++O[b[L]&31];for(var L=0;L<A.length;++L)++O[A[L]&31];for(var R=Q2(O,7),T=R.t,k=R.l,C=19;C>4&&!T[P4[C-1]];--C);var q=d+5<<3,G=Gd(i,zf)+Gd(a,J1)+l,J=Gd(i,g)+Gd(a,x)+l+14+3*C+Gd(O,T)+2*O[16]+3*O[17]+7*O[18];if(u>=0&&q<=G&&q<=J)return H_(t,f,e.subarray(u,u+d));var ae,H,V,Y;if(Zu(t,f,1+(J<G)),f+=2,J<G){ae=rp(g,c,0),H=g,V=rp(x,E,0),Y=x;var U=rp(T,k,0);Zu(t,f,w-257),Zu(t,f+5,M-1),Zu(t,f+10,C-4),f+=14;for(var L=0;L<C;++L)Zu(t,f+3*L,T[P4[L]]);f+=3*C;for(var D=[b,A],j=0;j<2;++j)for(var z=D[j],L=0;L<z.length;++L){var Z=z[L]&31;Zu(t,f,U[Z]),f+=T[Z],Z>15&&(Zu(t,f,z[L]>>5&127),f+=z[L]>>12)}}else ae=aL,H=zf,V=oL,Y=J1;for(var L=0;L<o;++L){var re=n[L];if(re>255){var Z=re>>18&31;Vd(t,f,ae[Z+257]),f+=H[Z+257],Z>7&&(Zu(t,f,re>>23&31),f+=Dm[Z]);var W=re&31;Vd(t,f,V[W]),f+=Y[W],W>3&&(Vd(t,f,re>>5&8191),f+=Bm[W])}else Vd(t,f,ae[re]),f+=H[re]}return Vd(t,f,ae[256]),f+H[256]},lL=new jm([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),V_=new Bl(0),uL=function(e,t,r,n,i,a){var l=a.z||e.length,o=new Bl(n+l+5*(1+Math.ceil(l/7e3))+i),u=o.subarray(n,o.length-i),d=a.l,f=(a.r||0)&7;if(t){f&&(u[0]=a.r>>3);for(var v=lL[t-1],g=v>>13,c=v&8191,y=(1<<r)-1,x=a.p||new Hs(32768),E=a.h||new Hs(y+1),S=Math.ceil(r/3),b=2*S,w=function(Pe){return(e[Pe]^e[Pe+1]<<S^e[Pe+2]<<b)&y},_=new jm(25e3),A=new Hs(288),M=new Hs(32),O=0,L=0,R=a.i||0,T=0,k=a.w||0,C=0;R+2<l;++R){var q=w(R),G=R&32767,J=E[q];if(x[G]=J,E[q]=G,k<=R){var ae=l-R;if((O>7e3||T>24576)&&(ae>423||!d)){f=C4(e,u,0,_,A,M,L,T,C,R-C,f),T=O=L=0,C=R;for(var H=0;H<286;++H)A[H]=0;for(var H=0;H<30;++H)M[H]=0}var V=2,Y=0,U=c,D=G-J&32767;if(ae>2&&q==w(R-D))for(var j=Math.min(g,ae)-1,z=Math.min(32767,R),Z=Math.min(258,ae);D<=z&&--U&&G!=J;){if(e[R+V]==e[R+V-D]){for(var re=0;re<Z&&e[R+re]==e[R+re-D];++re);if(re>V){if(V=re,Y=D,re>j)break;for(var W=Math.min(D,re-2),Q=0,H=0;H<W;++H){var se=R-D+H&32767,ue=x[se],le=se-ue&32767;le>Q&&(Q=le,J=se)}}}G=J,J=x[G],D+=G-J&32767}if(Y){_[T++]=268435456|Hv[V]<<18|k4[Y];var ye=Hv[V]&31,Re=k4[Y]&31;L+=Dm[ye]+Bm[Re],++A[257+ye],++M[Re],k=R+V,++O}else _[T++]=e[R],++A[e[R]]}}for(R=Math.max(R,k);R<l;++R)_[T++]=e[R],++A[e[R]];f=C4(e,u,d,_,A,M,L,T,C,R-C,f),d||(a.r=f&7|u[f/8|0]<<3,f-=7,a.h=E,a.p=x,a.i=R,a.w=k)}else{for(var R=a.w||0;R<l+d;R+=65535){var Me=R+65535;Me>=l&&(u[f/8|0]=d,Me=l),f=H_(u,f+1,e.subarray(R,Me))}a.i=l}return sL(o,0,n+q_(f)+i)},G_=function(){var e=1,t=0;return{p:function(r){for(var n=e,i=t,a=r.length|0,l=0;l!=a;){for(var o=Math.min(l+2655,a);l<o;++l)i+=n+=r[l];n=(n&65535)+15*(n>>16),i=(i&65535)+15*(i>>16)}e=n,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},cL=function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),l=new Bl(a.length+e.length);l.set(a),l.set(e,a.length),e=l,i.w=a.length}return uL(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},$_=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},fL=function(e,t){var r=t.level,n=r==0?0:r<6?1:r==9?3:2;if(e[0]=120,e[1]=n<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=G_();i.p(t.dictionary),$_(e,2,i.d())}};function $v(e,t){t||(t={});var r=G_();r.p(e);var n=cL(e,t,t.dictionary?6:2,4);return fL(n,t),$_(n,n.length-4,r.d()),n}var hL=typeof TextDecoder<"u"&&new TextDecoder,dL=0;try{hL.decode(V_,{stream:!0}),dL=1}catch{}function pL(e){if(Array.isArray(e))return e}function gL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,l,o=[],u=!0,d=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);u=!0);}catch(f){d=!0,i=f}finally{try{if(!u&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(d)throw i}}return o}}function N4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function vL(e,t){if(e){if(typeof e=="string")return N4(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?N4(e,t):void 0}}function mL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -443,17 +443,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
443
443
|
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
|
444
444
|
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
|
445
445
|
* http://www.fpdf.org/en/script/script37.php
|
|
446
|
-
*/var bw={print:4,modify:8,copy:16,"annot-forms":32};function yh(e,t,r,n){this.v=1,this.r=2;var i=192;e.forEach(function(o){if(bw.perm!==void 0)throw new Error("Invalid permission: "+o);i+=bw[o]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var a=(t+this.padding).substr(0,32),l=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,l),this.P=-(1+(255^i)),this.encryptionKey=Kv(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=Zv(this.encryptionKey,this.padding)}function bh(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",r=e.length,n=0;n<r;n++){var i=e.charCodeAt(n);t+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):e[n]}return t}function ww(e){if(Sn(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(r,n,i){if(i=i||!1,typeof r!="string"||typeof n!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(r)||(t[r]={});var a=Math.random().toString(35);return t[r][a]=[n,!!i],a},this.unsubscribe=function(r){for(var n in t)if(t[n][r])return delete t[n][r],Object.keys(t[n]).length===0&&delete t[n],!0;return!1},this.publish=function(r){if(t.hasOwnProperty(r)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var a in t[r]){var l=t[r][a];try{l[0].apply(e,n)}catch(o){dr.console&&zn.error("jsPDF PubSub Error",o.message,o)}l[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function t0(e){if(!(this instanceof t0))return new t0(e);var t="opacity,stroke-opacity".split(",");for(var r in e)e.hasOwnProperty(r)&&t.indexOf(r)>=0&&(this[r]=e[r]);this.id="",this.objectNumber=-1}function w7(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function Cf(e,t,r,n,i){if(!(this instanceof Cf))return new Cf(e,t,r,n,i);this.type=e==="axial"?2:3,this.coords=t,this.colors=r,w7.call(this,n,i)}function Eh(e,t,r,n,i){if(!(this instanceof Eh))return new Eh(e,t,r,n,i);this.boundingBox=e,this.xStep=t,this.yStep=r,this.stream="",this.cloneIndex=0,w7.call(this,n,i)}function Kt(e){var t,r=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],i=arguments[2],a=arguments[3],l=[],o=1,u=16,d="S",f=null;Sn(e=e||{})==="object"&&(r=e.orientation,n=e.unit||n,i=e.format||i,a=e.compress||e.compressPdf||a,(f=e.encryption||null)!==null&&(f.userPassword=f.userPassword||"",f.ownerPassword=f.ownerPassword||"",f.userPermissions=f.userPermissions||[]),o=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(t=e.precision),e.floatPrecision!==void 0&&(u=e.floatPrecision),d=e.defaultPathOperation||"S"),l=e.filters||(a===!0?["FlateEncode"]:l),n=n||"mm",r=(""+(r||"P")).toLowerCase();var v=e.putOnlyUsedFonts||!1,g={},c={internal:{},__private__:{}};c.__private__.PubSub=ww;var y="1.3",x=c.__private__.getPdfVersion=function(){return y};c.__private__.setPdfVersion=function(X){y=X};var E={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};c.__private__.getPageFormats=function(){return E};var S=c.__private__.getPageFormat=function(X){return E[X]};i=i||"a4";var b="compat",w="advanced",_=b;function A(){this.saveGraphicsState(),de(new Yt(ht,0,0,-ht,0,mi()*ht).toString()+" cm"),this.setFontSize(this.getFontSize()/ht),d="n",_=w}function M(){this.restoreGraphicsState(),d="S",_=b}var O=c.__private__.combineFontStyleAndFontWeight=function(X,fe){if(X=="bold"&&fe=="normal"||X=="bold"&&fe==400||X=="normal"&&fe=="italic"||X=="bold"&&fe=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return fe&&(X=fe==400||fe==="normal"?X==="italic"?"italic":"normal":fe!=700&&fe!=="bold"||X!=="normal"?(fe==700?"bold":fe)+""+X:"bold"),X};c.advancedAPI=function(X){var fe=_===b;return fe&&A.call(this),typeof X!="function"||(X(this),fe&&M.call(this)),this},c.compatAPI=function(X){var fe=_===w;return fe&&M.call(this),typeof X!="function"||(X(this),fe&&A.call(this)),this},c.isAdvancedAPI=function(){return _===w};var L,R=function(X){if(_!==w)throw new Error(X+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},T=c.roundToPrecision=c.__private__.roundToPrecision=function(X,fe){var Ne=t||fe;if(isNaN(X)||isNaN(Ne))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return X.toFixed(Ne).replace(/0+$/,"")};L=c.hpf=c.__private__.hpf=typeof u=="number"?function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.hpf");return T(X,u)}:u==="smart"?function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.hpf");return T(X,X>-1&&X<1?16:5)}:function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.hpf");return T(X,16)};var k=c.f2=c.__private__.f2=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.f2");return T(X,2)},C=c.__private__.f3=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.f3");return T(X,3)},q=c.scale=c.__private__.scale=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.scale");return _===b?X*ht:_===w?X:void 0},G=function(X){return q(function(fe){return _===b?mi()-fe:_===w?fe:void 0}(X))};c.__private__.setPrecision=c.setPrecision=function(X){typeof parseInt(X,10)=="number"&&(t=parseInt(X,10))};var J,ae="00000000000000000000000000000000",H=c.__private__.getFileId=function(){return ae},V=c.__private__.setFileId=function(X){return ae=X!==void 0&&/^[a-fA-F0-9]{32}$/.test(X)?X.toUpperCase():ae.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),f!==null&&(qn=new yh(f.userPermissions,f.userPassword,f.ownerPassword,ae)),ae};c.setFileId=function(X){return V(X),this},c.getFileId=function(){return H()};var Y=c.__private__.convertDateToPDFDate=function(X){var fe=X.getTimezoneOffset(),Ne=fe<0?"+":"-",Fe=Math.floor(Math.abs(fe/60)),Ge=Math.abs(fe%60),lt=[Ne,Z(Fe),"'",Z(Ge),"'"].join("");return["D:",X.getFullYear(),Z(X.getMonth()+1),Z(X.getDate()),Z(X.getHours()),Z(X.getMinutes()),Z(X.getSeconds()),lt].join("")},U=c.__private__.convertPDFDateToDate=function(X){var fe=parseInt(X.substr(2,4),10),Ne=parseInt(X.substr(6,2),10)-1,Fe=parseInt(X.substr(8,2),10),Ge=parseInt(X.substr(10,2),10),lt=parseInt(X.substr(12,2),10),ft=parseInt(X.substr(14,2),10);return new Date(fe,Ne,Fe,Ge,lt,ft,0)},D=c.__private__.setCreationDate=function(X){var fe;if(X===void 0&&(X=new Date),X instanceof Date)fe=Y(X);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(X))throw new Error("Invalid argument passed to jsPDF.setCreationDate");fe=X}return J=fe},j=c.__private__.getCreationDate=function(X){var fe=J;return X==="jsDate"&&(fe=U(J)),fe};c.setCreationDate=function(X){return D(X),this},c.getCreationDate=function(X){return j(X)};var z,Z=c.__private__.padd2=function(X){return("0"+parseInt(X)).slice(-2)},re=c.__private__.padd2Hex=function(X){return("00"+(X=X.toString())).substr(X.length)},W=0,Q=[],se=[],ue=0,le=[],ye=[],Re=!1,Me=se;c.__private__.setCustomOutputDestination=function(X){Re=!0,Me=X};var Pe=function(X){Re||(Me=X)};c.__private__.resetCustomOutputDestination=function(){Re=!1,Me=se};var de=c.__private__.out=function(X){return X=X.toString(),ue+=X.length+1,Me.push(X),Me},Te=c.__private__.write=function(X){return de(arguments.length===1?X.toString():Array.prototype.join.call(arguments," "))},Ae=c.__private__.getArrayBuffer=function(X){for(var fe=X.length,Ne=new ArrayBuffer(fe),Fe=new Uint8Array(Ne);fe--;)Fe[fe]=X.charCodeAt(fe);return Ne},be=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];c.__private__.getStandardFonts=function(){return be};var _e=e.fontSize||16;c.__private__.setFontSize=c.setFontSize=function(X){return _e=_===w?X/ht:X,this};var xe,Le=c.__private__.getFontSize=c.getFontSize=function(){return _===b?_e:_e*ht},pe=e.R2L||!1;c.__private__.setR2L=c.setR2L=function(X){return pe=X,this},c.__private__.getR2L=c.getR2L=function(){return pe};var Ce,je=c.__private__.setZoomMode=function(X){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(X))xe=X;else if(isNaN(X)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(X)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+X+'" is not recognized.');xe=X}else xe=parseInt(X,10)};c.__private__.getZoomMode=function(){return xe};var He,st=c.__private__.setPageMode=function(X){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(X)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+X+'" is not recognized.');Ce=X};c.__private__.getPageMode=function(){return Ce};var pt=c.__private__.setLayoutMode=function(X){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(X)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+X+'" is not recognized.');He=X};c.__private__.getLayoutMode=function(){return He},c.__private__.setDisplayMode=c.setDisplayMode=function(X,fe,Ne){return je(X),pt(fe),st(Ne),this};var ct={title:"",subject:"",author:"",keywords:"",creator:""};c.__private__.getDocumentProperty=function(X){if(Object.keys(ct).indexOf(X)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return ct[X]},c.__private__.getDocumentProperties=function(){return ct},c.__private__.setDocumentProperties=c.setProperties=c.setDocumentProperties=function(X){for(var fe in ct)ct.hasOwnProperty(fe)&&X[fe]&&(ct[fe]=X[fe]);return this},c.__private__.setDocumentProperty=function(X,fe){if(Object.keys(ct).indexOf(X)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ct[X]=fe};var bt,ht,vt,wr,cr,Pt={},$t={},$e=[],ze={},kt={},St={},er={},jt=null,vr=0,Xt=[],lr=new ww(c),Oi=e.hotfixes||[],Zn={},gi={},mn=[],Yt=function X(fe,Ne,Fe,Ge,lt,ft){if(!(this instanceof X))return new X(fe,Ne,Fe,Ge,lt,ft);isNaN(fe)&&(fe=1),isNaN(Ne)&&(Ne=0),isNaN(Fe)&&(Fe=0),isNaN(Ge)&&(Ge=1),isNaN(lt)&&(lt=0),isNaN(ft)&&(ft=0),this._matrix=[fe,Ne,Fe,Ge,lt,ft]};Object.defineProperty(Yt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(X){this._matrix[0]=X}}),Object.defineProperty(Yt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(X){this._matrix[1]=X}}),Object.defineProperty(Yt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(X){this._matrix[2]=X}}),Object.defineProperty(Yt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(X){this._matrix[3]=X}}),Object.defineProperty(Yt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(X){this._matrix[4]=X}}),Object.defineProperty(Yt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(X){this._matrix[5]=X}}),Object.defineProperty(Yt.prototype,"a",{get:function(){return this._matrix[0]},set:function(X){this._matrix[0]=X}}),Object.defineProperty(Yt.prototype,"b",{get:function(){return this._matrix[1]},set:function(X){this._matrix[1]=X}}),Object.defineProperty(Yt.prototype,"c",{get:function(){return this._matrix[2]},set:function(X){this._matrix[2]=X}}),Object.defineProperty(Yt.prototype,"d",{get:function(){return this._matrix[3]},set:function(X){this._matrix[3]=X}}),Object.defineProperty(Yt.prototype,"e",{get:function(){return this._matrix[4]},set:function(X){this._matrix[4]=X}}),Object.defineProperty(Yt.prototype,"f",{get:function(){return this._matrix[5]},set:function(X){this._matrix[5]=X}}),Object.defineProperty(Yt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Yt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Yt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Yt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Yt.prototype.join=function(X){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(L).join(X)},Yt.prototype.multiply=function(X){var fe=X.sx*this.sx+X.shy*this.shx,Ne=X.sx*this.shy+X.shy*this.sy,Fe=X.shx*this.sx+X.sy*this.shx,Ge=X.shx*this.shy+X.sy*this.sy,lt=X.tx*this.sx+X.ty*this.shx+this.tx,ft=X.tx*this.shy+X.ty*this.sy+this.ty;return new Yt(fe,Ne,Fe,Ge,lt,ft)},Yt.prototype.decompose=function(){var X=this.sx,fe=this.shy,Ne=this.shx,Fe=this.sy,Ge=this.tx,lt=this.ty,ft=Math.sqrt(X*X+fe*fe),Lt=(X/=ft)*Ne+(fe/=ft)*Fe;Ne-=X*Lt,Fe-=fe*Lt;var Et=Math.sqrt(Ne*Ne+Fe*Fe);return Lt/=Et,X*(Fe/=Et)<fe*(Ne/=Et)&&(X=-X,fe=-fe,Lt=-Lt,ft=-ft),{scale:new Yt(ft,0,0,Et,0,0),translate:new Yt(1,0,0,1,Ge,lt),rotate:new Yt(X,fe,-fe,X,0,0),skew:new Yt(1,0,Lt,1,0,0)}},Yt.prototype.toString=function(X){return this.join(" ")},Yt.prototype.inversed=function(){var X=this.sx,fe=this.shy,Ne=this.shx,Fe=this.sy,Ge=this.tx,lt=this.ty,ft=1/(X*Fe-fe*Ne),Lt=Fe*ft,Et=-fe*ft,Ut=-Ne*ft,Rt=X*ft;return new Yt(Lt,Et,Ut,Rt,-Lt*Ge-Ut*lt,-Et*Ge-Rt*lt)},Yt.prototype.applyToPoint=function(X){var fe=X.x*this.sx+X.y*this.shx+this.tx,Ne=X.x*this.shy+X.y*this.sy+this.ty;return new yo(fe,Ne)},Yt.prototype.applyToRectangle=function(X){var fe=this.applyToPoint(X),Ne=this.applyToPoint(new yo(X.x+X.w,X.y+X.h));return new Zs(fe.x,fe.y,Ne.x-fe.x,Ne.y-fe.y)},Yt.prototype.clone=function(){var X=this.sx,fe=this.shy,Ne=this.shx,Fe=this.sy,Ge=this.tx,lt=this.ty;return new Yt(X,fe,Ne,Fe,Ge,lt)},c.Matrix=Yt;var sa=c.matrixMult=function(X,fe){return fe.multiply(X)},Ra=new Yt(1,0,0,1,0,0);c.unitMatrix=c.identityMatrix=Ra;var Un=function(X,fe){if(!kt[X]){var Ne=(fe instanceof Cf?"Sh":"P")+(Object.keys(ze).length+1).toString(10);fe.id=Ne,kt[X]=Ne,ze[Ne]=fe,lr.publish("addPattern",fe)}};c.ShadingPattern=Cf,c.TilingPattern=Eh,c.addShadingPattern=function(X,fe){return R("addShadingPattern()"),Un(X,fe),this},c.beginTilingPattern=function(X){R("beginTilingPattern()"),Jn(X.boundingBox[0],X.boundingBox[1],X.boundingBox[2]-X.boundingBox[0],X.boundingBox[3]-X.boundingBox[1],X.matrix)},c.endTilingPattern=function(X,fe){R("endTilingPattern()"),fe.stream=ye[z].join(`
|
|
446
|
+
*/var bw={print:4,modify:8,copy:16,"annot-forms":32};function yh(e,t,r,n){this.v=1,this.r=2;var i=192;e.forEach(function(o){if(bw.perm!==void 0)throw new Error("Invalid permission: "+o);i+=bw[o]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var a=(t+this.padding).substr(0,32),l=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,l),this.P=-(1+(255^i)),this.encryptionKey=Kv(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=Zv(this.encryptionKey,this.padding)}function bh(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",r=e.length,n=0;n<r;n++){var i=e.charCodeAt(n);t+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):e[n]}return t}function ww(e){if(Sn(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(r,n,i){if(i=i||!1,typeof r!="string"||typeof n!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(r)||(t[r]={});var a=Math.random().toString(35);return t[r][a]=[n,!!i],a},this.unsubscribe=function(r){for(var n in t)if(t[n][r])return delete t[n][r],Object.keys(t[n]).length===0&&delete t[n],!0;return!1},this.publish=function(r){if(t.hasOwnProperty(r)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var a in t[r]){var l=t[r][a];try{l[0].apply(e,n)}catch(o){dr.console&&zn.error("jsPDF PubSub Error",o.message,o)}l[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function t0(e){if(!(this instanceof t0))return new t0(e);var t="opacity,stroke-opacity".split(",");for(var r in e)e.hasOwnProperty(r)&&t.indexOf(r)>=0&&(this[r]=e[r]);this.id="",this.objectNumber=-1}function w7(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function Cf(e,t,r,n,i){if(!(this instanceof Cf))return new Cf(e,t,r,n,i);this.type=e==="axial"?2:3,this.coords=t,this.colors=r,w7.call(this,n,i)}function Eh(e,t,r,n,i){if(!(this instanceof Eh))return new Eh(e,t,r,n,i);this.boundingBox=e,this.xStep=t,this.yStep=r,this.stream="",this.cloneIndex=0,w7.call(this,n,i)}function Kt(e){var t,r=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],i=arguments[2],a=arguments[3],l=[],o=1,u=16,d="S",f=null;Sn(e=e||{})==="object"&&(r=e.orientation,n=e.unit||n,i=e.format||i,a=e.compress||e.compressPdf||a,(f=e.encryption||null)!==null&&(f.userPassword=f.userPassword||"",f.ownerPassword=f.ownerPassword||"",f.userPermissions=f.userPermissions||[]),o=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(t=e.precision),e.floatPrecision!==void 0&&(u=e.floatPrecision),d=e.defaultPathOperation||"S"),l=e.filters||(a===!0?["FlateEncode"]:l),n=n||"mm",r=(""+(r||"P")).toLowerCase();var v=e.putOnlyUsedFonts||!1,g={},c={internal:{},__private__:{}};c.__private__.PubSub=ww;var y="1.3",x=c.__private__.getPdfVersion=function(){return y};c.__private__.setPdfVersion=function(X){y=X};var E={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};c.__private__.getPageFormats=function(){return E};var S=c.__private__.getPageFormat=function(X){return E[X]};i=i||"a4";var b="compat",w="advanced",_=b;function A(){this.saveGraphicsState(),de(new Yt(ht,0,0,-ht,0,yi()*ht).toString()+" cm"),this.setFontSize(this.getFontSize()/ht),d="n",_=w}function M(){this.restoreGraphicsState(),d="S",_=b}var O=c.__private__.combineFontStyleAndFontWeight=function(X,fe){if(X=="bold"&&fe=="normal"||X=="bold"&&fe==400||X=="normal"&&fe=="italic"||X=="bold"&&fe=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return fe&&(X=fe==400||fe==="normal"?X==="italic"?"italic":"normal":fe!=700&&fe!=="bold"||X!=="normal"?(fe==700?"bold":fe)+""+X:"bold"),X};c.advancedAPI=function(X){var fe=_===b;return fe&&A.call(this),typeof X!="function"||(X(this),fe&&M.call(this)),this},c.compatAPI=function(X){var fe=_===w;return fe&&M.call(this),typeof X!="function"||(X(this),fe&&A.call(this)),this},c.isAdvancedAPI=function(){return _===w};var L,R=function(X){if(_!==w)throw new Error(X+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},T=c.roundToPrecision=c.__private__.roundToPrecision=function(X,fe){var Ne=t||fe;if(isNaN(X)||isNaN(Ne))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return X.toFixed(Ne).replace(/0+$/,"")};L=c.hpf=c.__private__.hpf=typeof u=="number"?function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.hpf");return T(X,u)}:u==="smart"?function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.hpf");return T(X,X>-1&&X<1?16:5)}:function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.hpf");return T(X,16)};var k=c.f2=c.__private__.f2=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.f2");return T(X,2)},C=c.__private__.f3=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.f3");return T(X,3)},q=c.scale=c.__private__.scale=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.scale");return _===b?X*ht:_===w?X:void 0},G=function(X){return q(function(fe){return _===b?yi()-fe:_===w?fe:void 0}(X))};c.__private__.setPrecision=c.setPrecision=function(X){typeof parseInt(X,10)=="number"&&(t=parseInt(X,10))};var J,ae="00000000000000000000000000000000",H=c.__private__.getFileId=function(){return ae},V=c.__private__.setFileId=function(X){return ae=X!==void 0&&/^[a-fA-F0-9]{32}$/.test(X)?X.toUpperCase():ae.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),f!==null&&(qn=new yh(f.userPermissions,f.userPassword,f.ownerPassword,ae)),ae};c.setFileId=function(X){return V(X),this},c.getFileId=function(){return H()};var Y=c.__private__.convertDateToPDFDate=function(X){var fe=X.getTimezoneOffset(),Ne=fe<0?"+":"-",Fe=Math.floor(Math.abs(fe/60)),Ge=Math.abs(fe%60),lt=[Ne,Z(Fe),"'",Z(Ge),"'"].join("");return["D:",X.getFullYear(),Z(X.getMonth()+1),Z(X.getDate()),Z(X.getHours()),Z(X.getMinutes()),Z(X.getSeconds()),lt].join("")},U=c.__private__.convertPDFDateToDate=function(X){var fe=parseInt(X.substr(2,4),10),Ne=parseInt(X.substr(6,2),10)-1,Fe=parseInt(X.substr(8,2),10),Ge=parseInt(X.substr(10,2),10),lt=parseInt(X.substr(12,2),10),ft=parseInt(X.substr(14,2),10);return new Date(fe,Ne,Fe,Ge,lt,ft,0)},D=c.__private__.setCreationDate=function(X){var fe;if(X===void 0&&(X=new Date),X instanceof Date)fe=Y(X);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(X))throw new Error("Invalid argument passed to jsPDF.setCreationDate");fe=X}return J=fe},j=c.__private__.getCreationDate=function(X){var fe=J;return X==="jsDate"&&(fe=U(J)),fe};c.setCreationDate=function(X){return D(X),this},c.getCreationDate=function(X){return j(X)};var z,Z=c.__private__.padd2=function(X){return("0"+parseInt(X)).slice(-2)},re=c.__private__.padd2Hex=function(X){return("00"+(X=X.toString())).substr(X.length)},W=0,Q=[],se=[],ue=0,le=[],ye=[],Re=!1,Me=se;c.__private__.setCustomOutputDestination=function(X){Re=!0,Me=X};var Pe=function(X){Re||(Me=X)};c.__private__.resetCustomOutputDestination=function(){Re=!1,Me=se};var de=c.__private__.out=function(X){return X=X.toString(),ue+=X.length+1,Me.push(X),Me},Te=c.__private__.write=function(X){return de(arguments.length===1?X.toString():Array.prototype.join.call(arguments," "))},Ae=c.__private__.getArrayBuffer=function(X){for(var fe=X.length,Ne=new ArrayBuffer(fe),Fe=new Uint8Array(Ne);fe--;)Fe[fe]=X.charCodeAt(fe);return Ne},be=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];c.__private__.getStandardFonts=function(){return be};var _e=e.fontSize||16;c.__private__.setFontSize=c.setFontSize=function(X){return _e=_===w?X/ht:X,this};var xe,Le=c.__private__.getFontSize=c.getFontSize=function(){return _===b?_e:_e*ht},pe=e.R2L||!1;c.__private__.setR2L=c.setR2L=function(X){return pe=X,this},c.__private__.getR2L=c.getR2L=function(){return pe};var Ce,je=c.__private__.setZoomMode=function(X){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(X))xe=X;else if(isNaN(X)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(X)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+X+'" is not recognized.');xe=X}else xe=parseInt(X,10)};c.__private__.getZoomMode=function(){return xe};var He,st=c.__private__.setPageMode=function(X){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(X)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+X+'" is not recognized.');Ce=X};c.__private__.getPageMode=function(){return Ce};var pt=c.__private__.setLayoutMode=function(X){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(X)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+X+'" is not recognized.');He=X};c.__private__.getLayoutMode=function(){return He},c.__private__.setDisplayMode=c.setDisplayMode=function(X,fe,Ne){return je(X),pt(fe),st(Ne),this};var ct={title:"",subject:"",author:"",keywords:"",creator:""};c.__private__.getDocumentProperty=function(X){if(Object.keys(ct).indexOf(X)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return ct[X]},c.__private__.getDocumentProperties=function(){return ct},c.__private__.setDocumentProperties=c.setProperties=c.setDocumentProperties=function(X){for(var fe in ct)ct.hasOwnProperty(fe)&&X[fe]&&(ct[fe]=X[fe]);return this},c.__private__.setDocumentProperty=function(X,fe){if(Object.keys(ct).indexOf(X)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ct[X]=fe};var bt,ht,vt,wr,cr,Pt={},$t={},$e=[],ze={},kt={},St={},er={},jt=null,vr=0,Xt=[],lr=new ww(c),Oi=e.hotfixes||[],Zn={},vi={},mn=[],Yt=function X(fe,Ne,Fe,Ge,lt,ft){if(!(this instanceof X))return new X(fe,Ne,Fe,Ge,lt,ft);isNaN(fe)&&(fe=1),isNaN(Ne)&&(Ne=0),isNaN(Fe)&&(Fe=0),isNaN(Ge)&&(Ge=1),isNaN(lt)&&(lt=0),isNaN(ft)&&(ft=0),this._matrix=[fe,Ne,Fe,Ge,lt,ft]};Object.defineProperty(Yt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(X){this._matrix[0]=X}}),Object.defineProperty(Yt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(X){this._matrix[1]=X}}),Object.defineProperty(Yt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(X){this._matrix[2]=X}}),Object.defineProperty(Yt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(X){this._matrix[3]=X}}),Object.defineProperty(Yt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(X){this._matrix[4]=X}}),Object.defineProperty(Yt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(X){this._matrix[5]=X}}),Object.defineProperty(Yt.prototype,"a",{get:function(){return this._matrix[0]},set:function(X){this._matrix[0]=X}}),Object.defineProperty(Yt.prototype,"b",{get:function(){return this._matrix[1]},set:function(X){this._matrix[1]=X}}),Object.defineProperty(Yt.prototype,"c",{get:function(){return this._matrix[2]},set:function(X){this._matrix[2]=X}}),Object.defineProperty(Yt.prototype,"d",{get:function(){return this._matrix[3]},set:function(X){this._matrix[3]=X}}),Object.defineProperty(Yt.prototype,"e",{get:function(){return this._matrix[4]},set:function(X){this._matrix[4]=X}}),Object.defineProperty(Yt.prototype,"f",{get:function(){return this._matrix[5]},set:function(X){this._matrix[5]=X}}),Object.defineProperty(Yt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Yt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Yt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Yt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Yt.prototype.join=function(X){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(L).join(X)},Yt.prototype.multiply=function(X){var fe=X.sx*this.sx+X.shy*this.shx,Ne=X.sx*this.shy+X.shy*this.sy,Fe=X.shx*this.sx+X.sy*this.shx,Ge=X.shx*this.shy+X.sy*this.sy,lt=X.tx*this.sx+X.ty*this.shx+this.tx,ft=X.tx*this.shy+X.ty*this.sy+this.ty;return new Yt(fe,Ne,Fe,Ge,lt,ft)},Yt.prototype.decompose=function(){var X=this.sx,fe=this.shy,Ne=this.shx,Fe=this.sy,Ge=this.tx,lt=this.ty,ft=Math.sqrt(X*X+fe*fe),Lt=(X/=ft)*Ne+(fe/=ft)*Fe;Ne-=X*Lt,Fe-=fe*Lt;var Et=Math.sqrt(Ne*Ne+Fe*Fe);return Lt/=Et,X*(Fe/=Et)<fe*(Ne/=Et)&&(X=-X,fe=-fe,Lt=-Lt,ft=-ft),{scale:new Yt(ft,0,0,Et,0,0),translate:new Yt(1,0,0,1,Ge,lt),rotate:new Yt(X,fe,-fe,X,0,0),skew:new Yt(1,0,Lt,1,0,0)}},Yt.prototype.toString=function(X){return this.join(" ")},Yt.prototype.inversed=function(){var X=this.sx,fe=this.shy,Ne=this.shx,Fe=this.sy,Ge=this.tx,lt=this.ty,ft=1/(X*Fe-fe*Ne),Lt=Fe*ft,Et=-fe*ft,Ut=-Ne*ft,Rt=X*ft;return new Yt(Lt,Et,Ut,Rt,-Lt*Ge-Ut*lt,-Et*Ge-Rt*lt)},Yt.prototype.applyToPoint=function(X){var fe=X.x*this.sx+X.y*this.shx+this.tx,Ne=X.x*this.shy+X.y*this.sy+this.ty;return new yo(fe,Ne)},Yt.prototype.applyToRectangle=function(X){var fe=this.applyToPoint(X),Ne=this.applyToPoint(new yo(X.x+X.w,X.y+X.h));return new Zs(fe.x,fe.y,Ne.x-fe.x,Ne.y-fe.y)},Yt.prototype.clone=function(){var X=this.sx,fe=this.shy,Ne=this.shx,Fe=this.sy,Ge=this.tx,lt=this.ty;return new Yt(X,fe,Ne,Fe,Ge,lt)},c.Matrix=Yt;var sa=c.matrixMult=function(X,fe){return fe.multiply(X)},Ra=new Yt(1,0,0,1,0,0);c.unitMatrix=c.identityMatrix=Ra;var Un=function(X,fe){if(!kt[X]){var Ne=(fe instanceof Cf?"Sh":"P")+(Object.keys(ze).length+1).toString(10);fe.id=Ne,kt[X]=Ne,ze[Ne]=fe,lr.publish("addPattern",fe)}};c.ShadingPattern=Cf,c.TilingPattern=Eh,c.addShadingPattern=function(X,fe){return R("addShadingPattern()"),Un(X,fe),this},c.beginTilingPattern=function(X){R("beginTilingPattern()"),Jn(X.boundingBox[0],X.boundingBox[1],X.boundingBox[2]-X.boundingBox[0],X.boundingBox[3]-X.boundingBox[1],X.matrix)},c.endTilingPattern=function(X,fe){R("endTilingPattern()"),fe.stream=ye[z].join(`
|
|
447
447
|
`),Un(X,fe),lr.publish("endTilingPattern",fe),mn.pop().restore()};var Ui,Rr=c.__private__.newObject=function(){var X=yn();return An(X,!0),X},yn=c.__private__.newObjectDeferred=function(){return W++,Q[W]=function(){return ue},W},An=function(X,fe){return fe=typeof fe=="boolean"&&fe,Q[X]=ue,fe&&de(X+" 0 obj"),X},ba=c.__private__.newAdditionalObject=function(){var X={objId:yn(),content:""};return le.push(X),X},Mo=yn(),wa=yn(),Ya=c.__private__.decodeColorString=function(X){var fe=X.split(" ");if(fe.length!==2||fe[1]!=="g"&&fe[1]!=="G")fe.length!==5||fe[4]!=="k"&&fe[4]!=="K"||(fe=[(1-fe[0])*(1-fe[3]),(1-fe[1])*(1-fe[3]),(1-fe[2])*(1-fe[3]),"r"]);else{var Ne=parseFloat(fe[0]);fe=[Ne,Ne,Ne,"r"]}for(var Fe="#",Ge=0;Ge<3;Ge++)Fe+=("0"+Math.floor(255*parseFloat(fe[Ge])).toString(16)).slice(-2);return Fe},Qn=c.__private__.encodeColorString=function(X){var fe;typeof X=="string"&&(X={ch1:X});var Ne=X.ch1,Fe=X.ch2,Ge=X.ch3,lt=X.ch4,ft=X.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof Ne=="string"&&Ne.charAt(0)!=="#"){var Lt=new y7(Ne);if(Lt.ok)Ne=Lt.toHex();else if(!/^\d*\.?\d*$/.test(Ne))throw new Error('Invalid color "'+Ne+'" passed to jsPDF.encodeColorString.')}if(typeof Ne=="string"&&/^#[0-9A-Fa-f]{3}$/.test(Ne)&&(Ne="#"+Ne[1]+Ne[1]+Ne[2]+Ne[2]+Ne[3]+Ne[3]),typeof Ne=="string"&&/^#[0-9A-Fa-f]{6}$/.test(Ne)){var Et=parseInt(Ne.substr(1),16);Ne=Et>>16&255,Fe=Et>>8&255,Ge=255&Et}if(Fe===void 0||lt===void 0&&Ne===Fe&&Fe===Ge)fe=typeof Ne=="string"?Ne+" "+ft[0]:X.precision===2?k(Ne/255)+" "+ft[0]:C(Ne/255)+" "+ft[0];else if(lt===void 0||Sn(lt)==="object"){if(lt&&!isNaN(lt.a)&<.a===0)return["1.","1.","1.",ft[1]].join(" ");fe=typeof Ne=="string"?[Ne,Fe,Ge,ft[1]].join(" "):X.precision===2?[k(Ne/255),k(Fe/255),k(Ge/255),ft[1]].join(" "):[C(Ne/255),C(Fe/255),C(Ge/255),ft[1]].join(" ")}else fe=typeof Ne=="string"?[Ne,Fe,Ge,lt,ft[2]].join(" "):X.precision===2?[k(Ne),k(Fe),k(Ge),k(lt),ft[2]].join(" "):[C(Ne),C(Fe),C(Ge),C(lt),ft[2]].join(" ");return fe},_a=c.__private__.getFilters=function(){return l},xa=c.__private__.putStream=function(X){var fe=(X=X||{}).data||"",Ne=X.filters||_a(),Fe=X.alreadyAppliedFilters||[],Ge=X.addLength1||!1,lt=fe.length,ft=X.objectId,Lt=function(ti){return ti};if(f!==null&&ft===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");f!==null&&(Lt=qn.encryptor(ft,0));var Et={};Ne===!0&&(Ne=["FlateEncode"]);var Ut=X.additionalKeyValues||[],Rt=(Et=Kt.API.processDataByFilters!==void 0?Kt.API.processDataByFilters(fe,Ne):{data:fe,reverseChain:[]}).reverseChain+(Array.isArray(Fe)?Fe.join(" "):Fe.toString());if(Et.data.length!==0&&(Ut.push({key:"Length",value:Et.data.length}),Ge===!0&&Ut.push({key:"Length1",value:lt})),Rt.length!=0)if(Rt.split("/").length-1==1)Ut.push({key:"Filter",value:Rt});else{Ut.push({key:"Filter",value:"["+Rt+"]"});for(var Pr=0;Pr<Ut.length;Pr+=1)if(Ut[Pr].key==="DecodeParms"){for(var Mr=[],ei=0;ei<Et.reverseChain.split("/").length-1;ei+=1)Mr.push("null");Mr.push(Ut[Pr].value),Ut[Pr].value="["+Mr.join(" ")+"]"}}de("<<");for(var Hr=0;Hr<Ut.length;Hr++)de("/"+Ut[Hr].key+" "+Ut[Hr].value);de(">>"),Et.data.length!==0&&(de("stream"),de(Lt(Et.data)),de("endstream"))},Io=c.__private__.putPage=function(X){var fe=X.number,Ne=X.data,Fe=X.objId,Ge=X.contentsObjId;An(Fe,!0),de("<</Type /Page"),de("/Parent "+X.rootDictionaryObjId+" 0 R"),de("/Resources "+X.resourceDictionaryObjId+" 0 R"),de("/MediaBox ["+parseFloat(L(X.mediaBox.bottomLeftX))+" "+parseFloat(L(X.mediaBox.bottomLeftY))+" "+L(X.mediaBox.topRightX)+" "+L(X.mediaBox.topRightY)+"]"),X.cropBox!==null&&de("/CropBox ["+L(X.cropBox.bottomLeftX)+" "+L(X.cropBox.bottomLeftY)+" "+L(X.cropBox.topRightX)+" "+L(X.cropBox.topRightY)+"]"),X.bleedBox!==null&&de("/BleedBox ["+L(X.bleedBox.bottomLeftX)+" "+L(X.bleedBox.bottomLeftY)+" "+L(X.bleedBox.topRightX)+" "+L(X.bleedBox.topRightY)+"]"),X.trimBox!==null&&de("/TrimBox ["+L(X.trimBox.bottomLeftX)+" "+L(X.trimBox.bottomLeftY)+" "+L(X.trimBox.topRightX)+" "+L(X.trimBox.topRightY)+"]"),X.artBox!==null&&de("/ArtBox ["+L(X.artBox.bottomLeftX)+" "+L(X.artBox.bottomLeftY)+" "+L(X.artBox.topRightX)+" "+L(X.artBox.topRightY)+"]"),typeof X.userUnit=="number"&&X.userUnit!==1&&de("/UserUnit "+X.userUnit),lr.publish("putPage",{objId:Fe,pageContext:Xt[fe],pageNumber:fe,page:Ne}),de("/Contents "+Ge+" 0 R"),de(">>"),de("endobj");var lt=Ne.join(`
|
|
448
448
|
`);return _===w&&(lt+=`
|
|
449
449
|
Q`),An(Ge,!0),xa({data:lt,filters:_a(),objectId:Ge}),de("endobj"),Fe},Ci=c.__private__.putPages=function(){var X,fe,Ne=[];for(X=1;X<=vr;X++)Xt[X].objId=yn(),Xt[X].contentsObjId=yn();for(X=1;X<=vr;X++)Ne.push(Io({number:X,data:ye[X],objId:Xt[X].objId,contentsObjId:Xt[X].contentsObjId,mediaBox:Xt[X].mediaBox,cropBox:Xt[X].cropBox,bleedBox:Xt[X].bleedBox,trimBox:Xt[X].trimBox,artBox:Xt[X].artBox,userUnit:Xt[X].userUnit,rootDictionaryObjId:Mo,resourceDictionaryObjId:wa}));An(Mo,!0),de("<</Type /Pages");var Fe="/Kids [";for(fe=0;fe<vr;fe++)Fe+=Ne[fe]+" 0 R ";de(Fe+"]"),de("/Count "+vr),de(">>"),de("endobj"),lr.publish("postPutPages")},Xa=function(X){lr.publish("putFont",{font:X,out:de,newObject:Rr,putStream:xa}),X.isAlreadyPutted!==!0&&(X.objectNumber=Rr(),de("<<"),de("/Type /Font"),de("/BaseFont /"+bh(X.postScriptName)),de("/Subtype /Type1"),typeof X.encoding=="string"&&de("/Encoding /"+X.encoding),de("/FirstChar 32"),de("/LastChar 255"),de(">>"),de("endobj"))},Ps=function(X){X.objectNumber=Rr();var fe=[];fe.push({key:"Type",value:"/XObject"}),fe.push({key:"Subtype",value:"/Form"}),fe.push({key:"BBox",value:"["+[L(X.x),L(X.y),L(X.x+X.width),L(X.y+X.height)].join(" ")+"]"}),fe.push({key:"Matrix",value:"["+X.matrix.toString()+"]"});var Ne=X.pages[1].join(`
|
|
450
450
|
`);xa({data:Ne,additionalKeyValues:fe,objectId:X.objectNumber}),de("endobj")},Ko=function(X,fe){fe||(fe=21);var Ne=Rr(),Fe=function(ft,Lt){var Et,Ut=[],Rt=1/(Lt-1);for(Et=0;Et<1;Et+=Rt)Ut.push(Et);if(Ut.push(1),ft[0].offset!=0){var Pr={offset:0,color:ft[0].color};ft.unshift(Pr)}if(ft[ft.length-1].offset!=1){var Mr={offset:1,color:ft[ft.length-1].color};ft.push(Mr)}for(var ei="",Hr=0,ti=0;ti<Ut.length;ti++){for(Et=Ut[ti];Et>ft[Hr+1].offset;)Hr++;var Hn=ft[Hr].offset,Ni=(Et-Hn)/(ft[Hr+1].offset-Hn),bo=ft[Hr].color,Cs=ft[Hr+1].color;ei+=re(Math.round((1-Ni)*bo[0]+Ni*Cs[0]).toString(16))+re(Math.round((1-Ni)*bo[1]+Ni*Cs[1]).toString(16))+re(Math.round((1-Ni)*bo[2]+Ni*Cs[2]).toString(16))}return ei.trim()}(X.colors,fe),Ge=[];Ge.push({key:"FunctionType",value:"0"}),Ge.push({key:"Domain",value:"[0.0 1.0]"}),Ge.push({key:"Size",value:"["+fe+"]"}),Ge.push({key:"BitsPerSample",value:"8"}),Ge.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Ge.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),xa({data:Fe,additionalKeyValues:Ge,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:Ne}),de("endobj"),X.objectNumber=Rr(),de("<< /ShadingType "+X.type),de("/ColorSpace /DeviceRGB");var lt="/Coords ["+L(parseFloat(X.coords[0]))+" "+L(parseFloat(X.coords[1]))+" ";X.type===2?lt+=L(parseFloat(X.coords[2]))+" "+L(parseFloat(X.coords[3])):lt+=L(parseFloat(X.coords[2]))+" "+L(parseFloat(X.coords[3]))+" "+L(parseFloat(X.coords[4]))+" "+L(parseFloat(X.coords[5])),de(lt+="]"),X.matrix&&de("/Matrix ["+X.matrix.toString()+"]"),de("/Function "+Ne+" 0 R"),de("/Extend [true true]"),de(">>"),de("endobj")},Vl=function(X,fe){var Ne=yn(),Fe=Rr();fe.push({resourcesOid:Ne,objectOid:Fe}),X.objectNumber=Fe;var Ge=[];Ge.push({key:"Type",value:"/Pattern"}),Ge.push({key:"PatternType",value:"1"}),Ge.push({key:"PaintType",value:"1"}),Ge.push({key:"TilingType",value:"1"}),Ge.push({key:"BBox",value:"["+X.boundingBox.map(L).join(" ")+"]"}),Ge.push({key:"XStep",value:L(X.xStep)}),Ge.push({key:"YStep",value:L(X.yStep)}),Ge.push({key:"Resources",value:Ne+" 0 R"}),X.matrix&&Ge.push({key:"Matrix",value:"["+X.matrix.toString()+"]"}),xa({data:X.stream,additionalKeyValues:Ge,objectId:X.objectNumber}),de("endobj")},cf=function(X){for(var fe in X.objectNumber=Rr(),de("<<"),X)switch(fe){case"opacity":de("/ca "+k(X[fe]));break;case"stroke-opacity":de("/CA "+k(X[fe]))}de(">>"),de("endobj")},bn=function(X){An(X.resourcesOid,!0),de("<<"),de("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var fe in de("/Font <<"),Pt)Pt.hasOwnProperty(fe)&&(v===!1||v===!0&&g.hasOwnProperty(fe))&&de("/"+fe+" "+Pt[fe].objectNumber+" 0 R");de(">>")}(),function(){if(Object.keys(ze).length>0){for(var fe in de("/Shading <<"),ze)ze.hasOwnProperty(fe)&&ze[fe]instanceof Cf&&ze[fe].objectNumber>=0&&de("/"+fe+" "+ze[fe].objectNumber+" 0 R");lr.publish("putShadingPatternDict"),de(">>")}}(),function(fe){if(Object.keys(ze).length>0){for(var Ne in de("/Pattern <<"),ze)ze.hasOwnProperty(Ne)&&ze[Ne]instanceof c.TilingPattern&&ze[Ne].objectNumber>=0&&ze[Ne].objectNumber<fe&&de("/"+Ne+" "+ze[Ne].objectNumber+" 0 R");lr.publish("putTilingPatternDict"),de(">>")}}(X.objectOid),function(){if(Object.keys(St).length>0){var fe;for(fe in de("/ExtGState <<"),St)St.hasOwnProperty(fe)&&St[fe].objectNumber>=0&&de("/"+fe+" "+St[fe].objectNumber+" 0 R");lr.publish("putGStateDict"),de(">>")}}(),function(){for(var fe in de("/XObject <<"),Zn)Zn.hasOwnProperty(fe)&&Zn[fe].objectNumber>=0&&de("/"+fe+" "+Zn[fe].objectNumber+" 0 R");lr.publish("putXobjectDict"),de(">>")}(),de(">>"),de("endobj")},Gl=function(X){$t[X.fontName]=$t[X.fontName]||{},$t[X.fontName][X.fontStyle]=X.id},Zo=function(X,fe,Ne,Fe,Ge){var lt={id:"F"+(Object.keys(Pt).length+1).toString(10),postScriptName:X,fontName:fe,fontStyle:Ne,encoding:Fe,isStandardFont:Ge||!1,metadata:{}};return lr.publish("addFont",{font:lt,instance:this}),Pt[lt.id]=lt,Gl(lt),lt.id},Sa=c.__private__.pdfEscape=c.pdfEscape=function(X,fe){return function(Ne,Fe){var Ge,lt,ft,Lt,Et,Ut,Rt,Pr,Mr;if(ft=(Fe=Fe||{}).sourceEncoding||"Unicode",Et=Fe.outputEncoding,(Fe.autoencode||Et)&&Pt[bt].metadata&&Pt[bt].metadata[ft]&&Pt[bt].metadata[ft].encoding&&(Lt=Pt[bt].metadata[ft].encoding,!Et&&Pt[bt].encoding&&(Et=Pt[bt].encoding),!Et&&Lt.codePages&&(Et=Lt.codePages[0]),typeof Et=="string"&&(Et=Lt[Et]),Et)){for(Rt=!1,Ut=[],Ge=0,lt=Ne.length;Ge<lt;Ge++)(Pr=Et[Ne.charCodeAt(Ge)])?Ut.push(String.fromCharCode(Pr)):Ut.push(Ne[Ge]),Ut[Ge].charCodeAt(0)>>8&&(Rt=!0);Ne=Ut.join("")}for(Ge=Ne.length;Rt===void 0&&Ge!==0;)Ne.charCodeAt(Ge-1)>>8&&(Rt=!0),Ge--;if(!Rt)return Ne;for(Ut=Fe.noBOM?[]:[254,255],Ge=0,lt=Ne.length;Ge<lt;Ge++){if((Mr=(Pr=Ne.charCodeAt(Ge))>>8)>>8)throw new Error("Character at position "+Ge+" of string '"+Ne+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Ut.push(Mr),Ut.push(Pr-(Mr<<8))}return String.fromCharCode.apply(void 0,Ut)}(X,fe).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Qo=c.__private__.beginPage=function(X){ye[++vr]=[],Xt[vr]={objId:0,contentsObjId:0,userUnit:Number(o),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(X[0]),topRightY:Number(X[1])}},po(vr),Pe(ye[z])},cc=function(X,fe){var Ne,Fe,Ge;switch(r=fe||r,typeof X=="string"&&(Ne=S(X.toLowerCase()),Array.isArray(Ne)&&(Fe=Ne[0],Ge=Ne[1])),Array.isArray(X)&&(Fe=X[0]*ht,Ge=X[1]*ht),isNaN(Fe)&&(Fe=i[0],Ge=i[1]),(Fe>14400||Ge>14400)&&(zn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),Fe=Math.min(14400,Fe),Ge=Math.min(14400,Ge)),i=[Fe,Ge],r.substr(0,1)){case"l":Ge>Fe&&(i=[Ge,Fe]);break;case"p":Fe>Ge&&(i=[Ge,Fe])}Qo(i),Ks(Fa),de(ks),Aa!==0&&de(Aa+" J"),Ja!==0&&de(Ja+" j"),lr.publish("addPage",{pageNumber:vr})},$s=function(X){X>0&&X<=vr&&(ye.splice(X,1),Xt.splice(X,1),vr--,z>vr&&(z=vr),this.setPage(z))},po=function(X){X>0&&X<=vr&&(z=X)},oi=c.__private__.getNumberOfPages=c.getNumberOfPages=function(){return ye.length-1},an=function(X,fe,Ne){var Fe,Ge=void 0;return Ne=Ne||{},X=X!==void 0?X:Pt[bt].fontName,fe=fe!==void 0?fe:Pt[bt].fontStyle,Fe=X.toLowerCase(),$t[Fe]!==void 0&&$t[Fe][fe]!==void 0?Ge=$t[Fe][fe]:$t[X]!==void 0&&$t[X][fe]!==void 0?Ge=$t[X][fe]:Ne.disableWarning===!1&&zn.warn("Unable to look up font label for font '"+X+"', '"+fe+"'. Refer to getFontList() for available fonts."),Ge||Ne.noFallback||(Ge=$t.times[fe])==null&&(Ge=$t.times.normal),Ge},mr=c.__private__.putInfo=function(){var X=Rr(),fe=function(Fe){return Fe};for(var Ne in f!==null&&(fe=qn.encryptor(X,0)),de("<<"),de("/Producer ("+Sa(fe("jsPDF "+Kt.version))+")"),ct)ct.hasOwnProperty(Ne)&&ct[Ne]&&de("/"+Ne.substr(0,1).toUpperCase()+Ne.substr(1)+" ("+Sa(fe(ct[Ne]))+")");de("/CreationDate ("+Sa(fe(J))+")"),de(">>"),de("endobj")},Jo=c.__private__.putCatalog=function(X){var fe=(X=X||{}).rootDictionaryObjId||Mo;switch(Rr(),de("<<"),de("/Type /Catalog"),de("/Pages "+fe+" 0 R"),xe||(xe="fullwidth"),xe){case"fullwidth":de("/OpenAction [3 0 R /FitH null]");break;case"fullheight":de("/OpenAction [3 0 R /FitV null]");break;case"fullpage":de("/OpenAction [3 0 R /Fit]");break;case"original":de("/OpenAction [3 0 R /XYZ null null 1]");break;default:var Ne=""+xe;Ne.substr(Ne.length-1)==="%"&&(xe=parseInt(xe)/100),typeof xe=="number"&&de("/OpenAction [3 0 R /XYZ null null "+k(xe)+"]")}switch(He||(He="continuous"),He){case"continuous":de("/PageLayout /OneColumn");break;case"single":de("/PageLayout /SinglePage");break;case"two":case"twoleft":de("/PageLayout /TwoColumnLeft");break;case"tworight":de("/PageLayout /TwoColumnRight")}Ce&&de("/PageMode /"+Ce),lr.publish("putCatalog"),de(">>"),de("endobj")},Er=c.__private__.putTrailer=function(){de("trailer"),de("<<"),de("/Size "+(W+1)),de("/Root "+W+" 0 R"),de("/Info "+(W-1)+" 0 R"),f!==null&&de("/Encrypt "+qn.oid+" 0 R"),de("/ID [ <"+ae+"> <"+ae+"> ]"),de(">>")},qi=c.__private__.putHeader=function(){de("%PDF-"+y),de("%ºß¬à")},Ka=c.__private__.putXRef=function(){var X="0000000000";de("xref"),de("0 "+(W+1)),de("0000000000 65535 f ");for(var fe=1;fe<=W;fe++)typeof Q[fe]=="function"?de((X+Q[fe]()).slice(-10)+" 00000 n "):Q[fe]!==void 0?de((X+Q[fe]).slice(-10)+" 00000 n "):de("0000000000 00000 n ")},Hi=c.__private__.buildDocument=function(){var X;W=0,ue=0,se=[],Q=[],le=[],Mo=yn(),wa=yn(),Pe(se),lr.publish("buildDocument"),qi(),Ci(),function(){lr.publish("putAdditionalObjects");for(var Ne=0;Ne<le.length;Ne++){var Fe=le[Ne];An(Fe.objId,!0),de(Fe.content),de("endobj")}lr.publish("postPutAdditionalObjects")}(),X=[],function(){for(var Ne in Pt)Pt.hasOwnProperty(Ne)&&(v===!1||v===!0&&g.hasOwnProperty(Ne))&&Xa(Pt[Ne])}(),function(){var Ne;for(Ne in St)St.hasOwnProperty(Ne)&&cf(St[Ne])}(),function(){for(var Ne in Zn)Zn.hasOwnProperty(Ne)&&Ps(Zn[Ne])}(),function(Ne){var Fe;for(Fe in ze)ze.hasOwnProperty(Fe)&&(ze[Fe]instanceof Cf?Ko(ze[Fe]):ze[Fe]instanceof Eh&&Vl(ze[Fe],Ne))}(X),lr.publish("putResources"),X.forEach(bn),bn({resourcesOid:wa,objectOid:Number.MAX_SAFE_INTEGER}),lr.publish("postPutResources"),f!==null&&(qn.oid=Rr(),de("<<"),de("/Filter /Standard"),de("/V "+qn.v),de("/R "+qn.r),de("/U <"+qn.toHexString(qn.U)+">"),de("/O <"+qn.toHexString(qn.O)+">"),de("/P "+qn.P),de(">>"),de("endobj")),mr(),Jo();var fe=ue;return Ka(),Er(),de("startxref"),de(""+fe),de("%%EOF"),Pe(ye[z]),se.join(`
|
|
451
451
|
`)},Pn=c.__private__.getBlob=function(X){return new Blob([Ae(X)],{type:"application/pdf"})},Vi=c.output=c.__private__.output=(Ui=function(X,fe){switch(typeof(fe=fe||{})=="string"?fe={filename:fe}:fe.filename=fe.filename||"generated.pdf",X){case void 0:return Hi();case"save":c.save(fe.filename);break;case"arraybuffer":return Ae(Hi());case"blob":return Pn(Hi());case"bloburi":case"bloburl":if(dr.URL!==void 0&&typeof dr.URL.createObjectURL=="function")return dr.URL&&dr.URL.createObjectURL(Pn(Hi()))||void 0;zn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var Ne="",Fe=Hi();try{Ne=mw(Fe)}catch{Ne=mw(unescape(encodeURIComponent(Fe)))}return"data:application/pdf;filename="+fe.filename+";base64,"+Ne;case"pdfobjectnewwindow":if(Object.prototype.toString.call(dr)==="[object Window]"){var Ge="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",lt=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';fe.pdfObjectUrl&&(Ge=fe.pdfObjectUrl,lt="");var ft='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+Ge+'"'+lt+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(fe)+");<\/script></body></html>",Lt=dr.open();return Lt!==null&&Lt.document.write(ft),Lt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(dr)==="[object Window]"){var Et='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(fe.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+fe.filename+'" width="500px" height="400px" /></body></html>',Ut=dr.open();if(Ut!==null){Ut.document.write(Et);var Rt=this;Ut.document.documentElement.querySelector("#pdfViewer").onload=function(){Ut.document.title=fe.filename,Ut.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(Rt.output("bloburl"))}}return Ut}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(dr)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Pr='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",fe)+'"></iframe></body></html>',Mr=dr.open();if(Mr!==null&&(Mr.document.write(Pr),Mr.document.title=fe.filename),Mr||typeof safari>"u")return Mr;break;case"datauri":case"dataurl":return dr.document.location.href=this.output("datauristring",fe);default:return null}},Ui.foo=function(){try{return Ui.apply(this,arguments)}catch(Ne){var X=Ne.stack||"";~X.indexOf(" at ")&&(X=X.split(" at ")[1]);var fe="Error in function "+X.split(`
|
|
452
|
-
`)[0].split("<")[0]+": "+Ne.message;if(!dr.console)throw new Error(fe);dr.console.error(fe,Ne),dr.alert&&alert(fe)}},Ui.foo.bar=Ui,Ui.foo),Ws=function(X){return Array.isArray(Oi)===!0&&Oi.indexOf(X)>-1};switch(n){case"pt":ht=1;break;case"mm":ht=72/25.4;break;case"cm":ht=72/2.54;break;case"in":ht=72;break;case"px":ht=Ws("px_scaling")==1?.75:96/72;break;case"pc":case"em":ht=12;break;case"ex":ht=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);ht=n}var qn=null;D(),V();var es=c.__private__.getPageInfo=c.getPageInfo=function(X){if(isNaN(X)||X%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Xt[X].objId,pageNumber:X,pageContext:Xt[X]}},Ru=c.__private__.getPageInfoByObjId=function(X){if(isNaN(X)||X%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var fe in Xt)if(Xt[fe].objId===X)break;return es(fe)},Ea=c.__private__.getCurrentPageInfo=c.getCurrentPageInfo=function(){return{objId:Xt[z].objId,pageNumber:z,pageContext:Xt[z]}};c.addPage=function(){return cc.apply(this,arguments),this},c.setPage=function(){return po.apply(this,arguments),Pe.call(this,ye[z]),this},c.insertPage=function(X){return this.addPage(),this.movePage(z,X),this},c.movePage=function(X,fe){var Ne,Fe;if(X>fe){Ne=ye[X],Fe=Xt[X];for(var Ge=X;Ge>fe;Ge--)ye[Ge]=ye[Ge-1],Xt[Ge]=Xt[Ge-1];ye[fe]=Ne,Xt[fe]=Fe,this.setPage(fe)}else if(X<fe){Ne=ye[X],Fe=Xt[X];for(var lt=X;lt<fe;lt++)ye[lt]=ye[lt+1],Xt[lt]=Xt[lt+1];ye[fe]=Ne,Xt[fe]=Fe,this.setPage(fe)}return this},c.deletePage=function(){return $s.apply(this,arguments),this},c.__private__.text=c.text=function(X,fe,Ne,Fe,Ge){var lt,ft,Lt,Et,Ut,Rt,Pr,Mr,ei,Hr=(Fe=Fe||{}).scope||this;if(typeof X=="number"&&typeof fe=="number"&&(typeof Ne=="string"||Array.isArray(Ne))){var ti=Ne;Ne=fe,fe=X,X=ti}if(arguments[3]instanceof Yt==0?(Lt=arguments[4],Et=arguments[5],Sn(Pr=arguments[3])==="object"&&Pr!==null||(typeof Lt=="string"&&(Et=Lt,Lt=null),typeof Pr=="string"&&(Et=Pr,Pr=null),typeof Pr=="number"&&(Lt=Pr,Pr=null),Fe={flags:Pr,angle:Lt,align:Et})):(R("The transform parameter of text() with a Matrix value"),ei=Ge),isNaN(fe)||isNaN(Ne)||X==null)throw new Error("Invalid arguments passed to jsPDF.text");if(X.length===0)return Hr;var Hn,Ni="",bo=typeof Fe.lineHeightFactor=="number"?Fe.lineHeightFactor:Ia,Cs=Hr.internal.scaleFactor;function Ns(tr){return tr=tr.split(" ").join(Array(Fe.TabLen||9).join(" ")),Sa(tr,Pr)}function Kl(tr){for(var en,Ln=tr.concat(),Tn=[],Gn=Ln.length;Gn--;)typeof(en=Ln.shift())=="string"?Tn.push(en):Array.isArray(tr)&&(en.length===1||en[1]===void 0&&en[2]===void 0)?Tn.push(en[0]):Tn.push([en[0],en[1],en[2]]);return Tn}function pl(tr,en){var Ln;if(typeof tr=="string")Ln=en(tr)[0];else if(Array.isArray(tr)){for(var Tn,Gn,Eo=tr.concat(),Xi=[],on=Eo.length;on--;)typeof(Tn=Eo.shift())=="string"?Xi.push(en(Tn)[0]):Array.isArray(Tn)&&typeof Tn[0]=="string"&&(Gn=en(Tn[0],Tn[1],Tn[2]),Xi.push([Gn[0],Gn[1],Gn[2]]));Ln=Xi}return Ln}var Ba=!1,Iu=!0;if(typeof X=="string")Ba=!0;else if(Array.isArray(X)){var wo=X.concat();ft=[];for(var jo,
|
|
452
|
+
`)[0].split("<")[0]+": "+Ne.message;if(!dr.console)throw new Error(fe);dr.console.error(fe,Ne),dr.alert&&alert(fe)}},Ui.foo.bar=Ui,Ui.foo),Ws=function(X){return Array.isArray(Oi)===!0&&Oi.indexOf(X)>-1};switch(n){case"pt":ht=1;break;case"mm":ht=72/25.4;break;case"cm":ht=72/2.54;break;case"in":ht=72;break;case"px":ht=Ws("px_scaling")==1?.75:96/72;break;case"pc":case"em":ht=12;break;case"ex":ht=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);ht=n}var qn=null;D(),V();var es=c.__private__.getPageInfo=c.getPageInfo=function(X){if(isNaN(X)||X%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Xt[X].objId,pageNumber:X,pageContext:Xt[X]}},Ru=c.__private__.getPageInfoByObjId=function(X){if(isNaN(X)||X%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var fe in Xt)if(Xt[fe].objId===X)break;return es(fe)},Ea=c.__private__.getCurrentPageInfo=c.getCurrentPageInfo=function(){return{objId:Xt[z].objId,pageNumber:z,pageContext:Xt[z]}};c.addPage=function(){return cc.apply(this,arguments),this},c.setPage=function(){return po.apply(this,arguments),Pe.call(this,ye[z]),this},c.insertPage=function(X){return this.addPage(),this.movePage(z,X),this},c.movePage=function(X,fe){var Ne,Fe;if(X>fe){Ne=ye[X],Fe=Xt[X];for(var Ge=X;Ge>fe;Ge--)ye[Ge]=ye[Ge-1],Xt[Ge]=Xt[Ge-1];ye[fe]=Ne,Xt[fe]=Fe,this.setPage(fe)}else if(X<fe){Ne=ye[X],Fe=Xt[X];for(var lt=X;lt<fe;lt++)ye[lt]=ye[lt+1],Xt[lt]=Xt[lt+1];ye[fe]=Ne,Xt[fe]=Fe,this.setPage(fe)}return this},c.deletePage=function(){return $s.apply(this,arguments),this},c.__private__.text=c.text=function(X,fe,Ne,Fe,Ge){var lt,ft,Lt,Et,Ut,Rt,Pr,Mr,ei,Hr=(Fe=Fe||{}).scope||this;if(typeof X=="number"&&typeof fe=="number"&&(typeof Ne=="string"||Array.isArray(Ne))){var ti=Ne;Ne=fe,fe=X,X=ti}if(arguments[3]instanceof Yt==0?(Lt=arguments[4],Et=arguments[5],Sn(Pr=arguments[3])==="object"&&Pr!==null||(typeof Lt=="string"&&(Et=Lt,Lt=null),typeof Pr=="string"&&(Et=Pr,Pr=null),typeof Pr=="number"&&(Lt=Pr,Pr=null),Fe={flags:Pr,angle:Lt,align:Et})):(R("The transform parameter of text() with a Matrix value"),ei=Ge),isNaN(fe)||isNaN(Ne)||X==null)throw new Error("Invalid arguments passed to jsPDF.text");if(X.length===0)return Hr;var Hn,Ni="",bo=typeof Fe.lineHeightFactor=="number"?Fe.lineHeightFactor:Ia,Cs=Hr.internal.scaleFactor;function Ns(tr){return tr=tr.split(" ").join(Array(Fe.TabLen||9).join(" ")),Sa(tr,Pr)}function Kl(tr){for(var en,Ln=tr.concat(),Tn=[],Gn=Ln.length;Gn--;)typeof(en=Ln.shift())=="string"?Tn.push(en):Array.isArray(tr)&&(en.length===1||en[1]===void 0&&en[2]===void 0)?Tn.push(en[0]):Tn.push([en[0],en[1],en[2]]);return Tn}function pl(tr,en){var Ln;if(typeof tr=="string")Ln=en(tr)[0];else if(Array.isArray(tr)){for(var Tn,Gn,Eo=tr.concat(),Xi=[],on=Eo.length;on--;)typeof(Tn=Eo.shift())=="string"?Xi.push(en(Tn)[0]):Array.isArray(Tn)&&typeof Tn[0]=="string"&&(Gn=en(Tn[0],Tn[1],Tn[2]),Xi.push([Gn[0],Gn[1],Gn[2]]));Ln=Xi}return Ln}var Ba=!1,Iu=!0;if(typeof X=="string")Ba=!0;else if(Array.isArray(X)){var wo=X.concat();ft=[];for(var jo,bi=wo.length;bi--;)(typeof(jo=wo.shift())!="string"||Array.isArray(jo)&&typeof jo[0]!="string")&&(Iu=!1);Ba=Iu}if(Ba===!1)throw new Error('Type of text must be string or Array. "'+X+'" is not recognized.');typeof X=="string"&&(X=X.match(/[\r?\n]/)?X.split(/\r\n|\r|\n/g):[X]);var is=_e/Hr.internal.scaleFactor,Pa=is*(bo-1);switch(Fe.baseline){case"bottom":Ne-=Pa;break;case"top":Ne+=is-Pa;break;case"hanging":Ne+=is-2*Pa;break;case"middle":Ne+=is/2-Pa}if((Rt=Fe.maxWidth||0)>0&&(typeof X=="string"?X=Hr.splitTextToSize(X,Rt):Object.prototype.toString.call(X)==="[object Array]"&&(X=X.reduce(function(tr,en){return tr.concat(Hr.splitTextToSize(en,Rt))},[]))),lt={text:X,x:fe,y:Ne,options:Fe,mutex:{pdfEscape:Sa,activeFontKey:bt,fonts:Pt,activeFontSize:_e}},lr.publish("preProcessText",lt),X=lt.text,Lt=(Fe=lt.options).angle,ei instanceof Yt==0&&Lt&&typeof Lt=="number"){Lt*=Math.PI/180,Fe.rotationDirection===0&&(Lt=-Lt),_===w&&(Lt=-Lt);var gl=Math.cos(Lt),Qs=Math.sin(Lt);ei=new Yt(gl,Qs,-Qs,gl,0,0)}else Lt&&Lt instanceof Yt&&(ei=Lt);_!==w||ei||(ei=Ra),(Ut=Fe.charSpace||Fo)!==void 0&&(Ni+=L(q(Ut))+` Tc
|
|
453
453
|
`,this.setCharSpace(this.getCharSpace()||0)),(Mr=Fe.horizontalScale)!==void 0&&(Ni+=L(100*Mr)+` Tz
|
|
454
454
|
`),Fe.lang;var Li=-1,Ls=Fe.renderingMode!==void 0?Fe.renderingMode:Fe.stroke,Js=Hr.internal.getCurrentPageInfo().pageContext;switch(Ls){case 0:case!1:case"fill":Li=0;break;case 1:case!0:case"stroke":Li=1;break;case 2:case"fillThenStroke":Li=2;break;case 3:case"invisible":Li=3;break;case 4:case"fillAndAddForClipping":Li=4;break;case 5:case"strokeAndAddPathForClipping":Li=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Li=6;break;case 7:case"addToPathForClipping":Li=7}var Zl=Js.usedRenderingMode!==void 0?Js.usedRenderingMode:-1;Li!==-1?Ni+=Li+` Tr
|
|
455
455
|
`:Zl!==-1&&(Ni+=`0 Tr
|
|
456
|
-
`),Li!==-1&&(Js.usedRenderingMode=Li),Et=Fe.align||"left";var si,la=_e*bo,Do=Hr.internal.pageSize.getWidth(),as=Pt[bt];Ut=Fe.charSpace||Fo,Rt=Fe.maxWidth||0,Pr=Object.assign({autoencode:!0,noBOM:!0},Fe.flags);var li=[],to=function(tr){return Hr.getStringUnitWidth(tr,{font:as,charSpace:Ut,fontSize:_e,doKerning:!1})*_e/Cs};if(Object.prototype.toString.call(X)==="[object Array]"){var Gi;ft=Kl(X),Et!=="left"&&(si=ft.map(to));var ua,$i=0;if(Et==="right"){fe-=si[0],X=[],
|
|
456
|
+
`),Li!==-1&&(Js.usedRenderingMode=Li),Et=Fe.align||"left";var si,la=_e*bo,Do=Hr.internal.pageSize.getWidth(),as=Pt[bt];Ut=Fe.charSpace||Fo,Rt=Fe.maxWidth||0,Pr=Object.assign({autoencode:!0,noBOM:!0},Fe.flags);var li=[],to=function(tr){return Hr.getStringUnitWidth(tr,{font:as,charSpace:Ut,fontSize:_e,doKerning:!1})*_e/Cs};if(Object.prototype.toString.call(X)==="[object Array]"){var Gi;ft=Kl(X),Et!=="left"&&(si=ft.map(to));var ua,$i=0;if(Et==="right"){fe-=si[0],X=[],bi=ft.length;for(var Vn=0;Vn<bi;Vn++)Vn===0?(ua=Qa(fe),Gi=pn(Ne)):(ua=q($i-si[Vn]),Gi=-la),X.push([ft[Vn],ua,Gi]),$i=si[Vn]}else if(Et==="center"){fe-=si[0]/2,X=[],bi=ft.length;for(var os=0;os<bi;os++)os===0?(ua=Qa(fe),Gi=pn(Ne)):(ua=q(($i-si[os])/2),Gi=-la),X.push([ft[os],ua,Gi]),$i=si[os]}else if(Et==="left"){X=[],bi=ft.length;for(var Ql=0;Ql<bi;Ql++)X.push(ft[Ql])}else if(Et==="justify"&&as.encoding==="Identity-H"){X=[],bi=ft.length,Rt=Rt!==0?Rt:Do;for(var ca=0,Jr=0;Jr<bi;Jr++)if(Gi=Jr===0?pn(Ne):-la,ua=Jr===0?Qa(fe):ca,Jr<bi-1){var vl=q((Rt-si[Jr])/(ft[Jr].split(" ").length-1)),ka=ft[Jr].split(" ");X.push([ka[0]+" ",ua,Gi]),ca=0;for(var Wi=1;Wi<ka.length;Wi++){var ml=(to(ka[Wi-1]+" "+ka[Wi])-to(ka[Wi]))*Cs+vl;Wi==ka.length-1?X.push([ka[Wi],ml,0]):X.push([ka[Wi]+" ",ml,0]),ca-=ml}}else X.push([ft[Jr],ua,Gi]);X.push(["",ca,0])}else{if(Et!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(X=[],bi=ft.length,Rt=Rt!==0?Rt:Do,Jr=0;Jr<bi;Jr++)Gi=Jr===0?pn(Ne):-la,ua=Jr===0?Qa(fe):0,Jr<bi-1?li.push(L(q((Rt-si[Jr])/(ft[Jr].split(" ").length-1)))):li.push(0),X.push([ft[Jr],ua,Gi])}}(typeof Fe.R2L=="boolean"?Fe.R2L:pe)===!0&&(X=pl(X,function(tr,en,Ln){return[tr.split("").reverse().join(""),en,Ln]})),lt={text:X,x:fe,y:Ne,options:Fe,mutex:{pdfEscape:Sa,activeFontKey:bt,fonts:Pt,activeFontSize:_e}},lr.publish("postProcessText",lt),X=lt.text,Hn=lt.mutex.isHex||!1;var _o=Pt[bt].encoding;_o!=="WinAnsiEncoding"&&_o!=="StandardEncoding"||(X=pl(X,function(tr,en,Ln){return[Ns(tr),en,Ln]})),ft=Kl(X),X=[];for(var Yi,Bo,za,Ti=Array.isArray(ft[0])?1:0,xo="",zo=function(tr,en,Ln){var Tn="";return Ln instanceof Yt?(Ln=typeof Fe.angle=="number"?sa(Ln,new Yt(1,0,0,1,tr,en)):sa(new Yt(1,0,0,1,tr,en),Ln),_===w&&(Ln=sa(new Yt(1,0,0,-1,0,0),Ln)),Tn=Ln.join(" ")+` Tm
|
|
457
457
|
`):Tn=L(tr)+" "+L(en)+` Td
|
|
458
458
|
`,Tn},Oa=0;Oa<ft.length;Oa++){switch(xo="",Ti){case 1:za=(Hn?"<":"(")+ft[Oa][0]+(Hn?">":")"),Yi=parseFloat(ft[Oa][1]),Bo=parseFloat(ft[Oa][2]);break;case 0:za=(Hn?"<":"(")+ft[Oa]+(Hn?">":")"),Yi=Qa(fe),Bo=pn(Ne)}li!==void 0&&li[Oa]!==void 0&&(xo=li[Oa]+` Tw
|
|
459
459
|
`),Oa===0?X.push(xo+zo(Yi,Bo,ei)+za):Ti===0?X.push(xo+za):Ti===1&&X.push(xo+zo(Yi,Bo,ei)+za)}X=Ti===0?X.join(` Tj
|
|
@@ -463,7 +463,7 @@ T* `):X.join(` Tj
|
|
|
463
463
|
/`;return So+=bt+" "+_e+` Tf
|
|
464
464
|
`,So+=L(_e*bo)+` TL
|
|
465
465
|
`,So+=ja+`
|
|
466
|
-
`,So+=Ni,So+=X,de(So+="ET"),g[bt]=!0,Hr};var hl=c.__private__.clip=c.clip=function(X){return de(X==="evenodd"?"W*":"W"),this};c.clipEvenOdd=function(){return hl("evenodd")},c.__private__.discardPath=c.discardPath=function(){return de("n"),this};var ts=c.__private__.isValidStyle=function(X){var fe=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(X)!==-1&&(fe=!0),fe};c.__private__.setDefaultPathOperation=c.setDefaultPathOperation=function(X){return ts(X)&&(d=X),this};var $l=c.__private__.getStyle=c.getStyle=function(X){var fe=d;switch(X){case"D":case"S":fe="S";break;case"F":fe="f";break;case"FD":case"DF":fe="B";break;case"f":case"f*":case"B":case"B*":fe=X}return fe},Ar=c.close=function(){return de("h"),this};c.stroke=function(){return de("S"),this},c.fill=function(X){return go("f",X),this},c.fillEvenOdd=function(X){return go("f*",X),this},c.fillStroke=function(X){return go("B",X),this},c.fillStrokeEvenOdd=function(X){return go("B*",X),this};var go=function(X,fe){Sn(fe)==="object"?fc(fe,X):de(X)},rs=function(X){X===null||_===w&&X===void 0||(X=$l(X),de(X))};function Ys(X,fe,Ne,Fe,Ge){var lt=new Eh(fe||this.boundingBox,Ne||this.xStep,Fe||this.yStep,this.gState,Ge||this.matrix);lt.stream=this.stream;var ft=X+"$$"+this.cloneIndex+++"$$";return Un(ft,lt),lt}var fc=function(X,fe){var Ne=kt[X.key],Fe=ze[Ne];if(Fe instanceof Cf)de("q"),de(hc(fe)),Fe.gState&&c.setGState(Fe.gState),de(X.matrix.toString()+" cm"),de("/"+Ne+" sh"),de("Q");else if(Fe instanceof Eh){var Ge=new Yt(1,0,0,-1,0,mi());X.matrix&&(Ge=Ge.multiply(X.matrix||Ra),Ne=Ys.call(Fe,X.key,X.boundingBox,X.xStep,X.yStep,Ge).id),de("q"),de("/Pattern cs"),de("/"+Ne+" scn"),Fe.gState&&c.setGState(Fe.gState),de(fe),de("Q")}},hc=function(X){switch(X){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Xs=c.moveTo=function(X,fe){return de(L(q(X))+" "+L(G(fe))+" m"),this},ns=c.lineTo=function(X,fe){return de(L(q(X))+" "+L(G(fe))+" l"),this},Za=c.curveTo=function(X,fe,Ne,Fe,Ge,lt){return de([L(q(X)),L(G(fe)),L(q(Ne)),L(G(Fe)),L(q(Ge)),L(G(lt)),"c"].join(" ")),this};c.__private__.line=c.line=function(X,fe,Ne,Fe,Ge){if(isNaN(X)||isNaN(fe)||isNaN(Ne)||isNaN(Fe)||!ts(Ge))throw new Error("Invalid arguments passed to jsPDF.line");return _===b?this.lines([[Ne-X,Fe-fe]],X,fe,[1,1],Ge||"S"):this.lines([[Ne-X,Fe-fe]],X,fe,[1,1]).stroke()},c.__private__.lines=c.lines=function(X,fe,Ne,Fe,Ge,lt){var ft,Lt,Et,Ut,Rt,Pr,Mr,ei,Hr,ti,Hn,Ni;if(typeof X=="number"&&(Ni=Ne,Ne=fe,fe=X,X=Ni),Fe=Fe||[1,1],lt=lt||!1,isNaN(fe)||isNaN(Ne)||!Array.isArray(X)||!Array.isArray(Fe)||!ts(Ge)||typeof lt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Xs(fe,Ne),ft=Fe[0],Lt=Fe[1],Ut=X.length,ti=fe,Hn=Ne,Et=0;Et<Ut;Et++)(Rt=X[Et]).length===2?(ti=Rt[0]*ft+ti,Hn=Rt[1]*Lt+Hn,ns(ti,Hn)):(Pr=Rt[0]*ft+ti,Mr=Rt[1]*Lt+Hn,ei=Rt[2]*ft+ti,Hr=Rt[3]*Lt+Hn,ti=Rt[4]*ft+ti,Hn=Rt[5]*Lt+Hn,Za(Pr,Mr,ei,Hr,ti,Hn));return lt&&Ar(),rs(Ge),this},c.path=function(X){for(var fe=0;fe<X.length;fe++){var Ne=X[fe],Fe=Ne.c;switch(Ne.op){case"m":Xs(Fe[0],Fe[1]);break;case"l":ns(Fe[0],Fe[1]);break;case"c":Za.apply(this,Fe);break;case"h":Ar()}}return this},c.__private__.rect=c.rect=function(X,fe,Ne,Fe,Ge){if(isNaN(X)||isNaN(fe)||isNaN(Ne)||isNaN(Fe)||!ts(Ge))throw new Error("Invalid arguments passed to jsPDF.rect");return _===b&&(Fe=-Fe),de([L(q(X)),L(G(fe)),L(q(Ne)),L(q(Fe)),"re"].join(" ")),rs(Ge),this},c.__private__.triangle=c.triangle=function(X,fe,Ne,Fe,Ge,lt,ft){if(isNaN(X)||isNaN(fe)||isNaN(Ne)||isNaN(Fe)||isNaN(Ge)||isNaN(lt)||!ts(ft))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[Ne-X,Fe-fe],[Ge-Ne,lt-Fe],[X-Ge,fe-lt]],X,fe,[1,1],ft,!0),this},c.__private__.roundedRect=c.roundedRect=function(X,fe,Ne,Fe,Ge,lt,ft){if(isNaN(X)||isNaN(fe)||isNaN(Ne)||isNaN(Fe)||isNaN(Ge)||isNaN(lt)||!ts(ft))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Lt=4/3*(Math.SQRT2-1);return Ge=Math.min(Ge,.5*Ne),lt=Math.min(lt,.5*Fe),this.lines([[Ne-2*Ge,0],[Ge*Lt,0,Ge,lt-lt*Lt,Ge,lt],[0,Fe-2*lt],[0,lt*Lt,-Ge*Lt,lt,-Ge,lt],[2*Ge-Ne,0],[-Ge*Lt,0,-Ge,-lt*Lt,-Ge,-lt],[0,2*lt-Fe],[0,-lt*Lt,Ge*Lt,-lt,Ge,-lt]],X+Ge,fe,[1,1],ft,!0),this},c.__private__.ellipse=c.ellipse=function(X,fe,Ne,Fe,Ge){if(isNaN(X)||isNaN(fe)||isNaN(Ne)||isNaN(Fe)||!ts(Ge))throw new Error("Invalid arguments passed to jsPDF.ellipse");var lt=4/3*(Math.SQRT2-1)*Ne,ft=4/3*(Math.SQRT2-1)*Fe;return Xs(X+Ne,fe),Za(X+Ne,fe-ft,X+lt,fe-Fe,X,fe-Fe),Za(X-lt,fe-Fe,X-Ne,fe-ft,X-Ne,fe),Za(X-Ne,fe+ft,X-lt,fe+Fe,X,fe+Fe),Za(X+lt,fe+Fe,X+Ne,fe+ft,X+Ne,fe),rs(Ge),this},c.__private__.circle=c.circle=function(X,fe,Ne,Fe){if(isNaN(X)||isNaN(fe)||isNaN(Ne)||!ts(Fe))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(X,fe,Ne,Ne,Fe)},c.setFont=function(X,fe,Ne){return Ne&&(fe=O(fe,Ne)),bt=an(X,fe,{disableWarning:!1}),this};var Ma=c.__private__.getFont=c.getFont=function(){return Pt[an.apply(c,arguments)]};c.__private__.getFontList=c.getFontList=function(){var X,fe,Ne={};for(X in $t)if($t.hasOwnProperty(X))for(fe in Ne[X]=[],$t[X])$t[X].hasOwnProperty(fe)&&Ne[X].push(fe);return Ne},c.addFont=function(X,fe,Ne,Fe,Ge){var lt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&<.indexOf(arguments[3])!==-1?Ge=arguments[3]:arguments[3]&<.indexOf(arguments[3])==-1&&(Ne=O(Ne,Fe)),Zo.call(this,X,fe,Ne,Ge=Ge||"Identity-H")};var Ia,Fa=e.lineWidth||.200025,xt=c.__private__.getLineWidth=c.getLineWidth=function(){return Fa},Ks=c.__private__.setLineWidth=c.setLineWidth=function(X){return Fa=X,de(L(q(X))+" w"),this};c.__private__.setLineDash=Kt.API.setLineDash=Kt.API.setLineDashPattern=function(X,fe){if(X=X||[],fe=fe||0,isNaN(fe)||!Array.isArray(X))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return X=X.map(function(Ne){return L(q(Ne))}).join(" "),fe=L(q(fe)),de("["+X+"] "+fe+" d"),this};var vo=c.__private__.getLineHeight=c.getLineHeight=function(){return _e*Ia};c.__private__.getLineHeight=c.getLineHeight=function(){return _e*Ia};var dc=c.__private__.setLineHeightFactor=c.setLineHeightFactor=function(X){return typeof(X=X||1.15)=="number"&&(Ia=X),this},pc=c.__private__.getLineHeightFactor=c.getLineHeightFactor=function(){return Ia};dc(e.lineHeight);var Qa=c.__private__.getHorizontalCoordinate=function(X){return q(X)},pn=c.__private__.getVerticalCoordinate=function(X){return _===w?X:Xt[z].mediaBox.topRightY-Xt[z].mediaBox.bottomLeftY-q(X)},Wl=c.__private__.getHorizontalCoordinateString=c.getHorizontalCoordinateString=function(X){return L(Qa(X))},Yl=c.__private__.getVerticalCoordinateString=c.getVerticalCoordinateString=function(X){return L(pn(X))},ks=e.strokeColor||"0 G";c.__private__.getStrokeColor=c.getDrawColor=function(){return Ya(ks)},c.__private__.setStrokeColor=c.setDrawColor=function(X,fe,Ne,Fe){return ks=Qn({ch1:X,ch2:fe,ch3:Ne,ch4:Fe,pdfColorType:"draw",precision:2}),de(ks),this};var Mu=e.fillColor||"0 g";c.__private__.getFillColor=c.getFillColor=function(){return Ya(Mu)},c.__private__.setFillColor=c.setFillColor=function(X,fe,Ne,Fe){return Mu=Qn({ch1:X,ch2:fe,ch3:Ne,ch4:Fe,pdfColorType:"fill",precision:2}),de(Mu),this};var ja=e.textColor||"0 g",vi=c.__private__.getTextColor=c.getTextColor=function(){return Ya(ja)};c.__private__.setTextColor=c.setTextColor=function(X,fe,Ne,Fe){return ja=Qn({ch1:X,ch2:fe,ch3:Ne,ch4:Fe,pdfColorType:"text",precision:3}),this};var Fo=e.charSpace,Xl=c.__private__.getCharSpace=c.getCharSpace=function(){return parseFloat(Fo||0)};c.__private__.setCharSpace=c.setCharSpace=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Fo=X,this};var Aa=0;c.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},c.__private__.setLineCap=c.setLineCap=function(X){var fe=c.CapJoinStyles[X];if(fe===void 0)throw new Error("Line cap style of '"+X+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Aa=fe,de(fe+" J"),this};var Ja=0;c.__private__.setLineJoin=c.setLineJoin=function(X){var fe=c.CapJoinStyles[X];if(fe===void 0)throw new Error("Line join style of '"+X+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Ja=fe,de(fe+" j"),this},c.__private__.setLineMiterLimit=c.__private__.setMiterLimit=c.setLineMiterLimit=c.setMiterLimit=function(X){if(X=X||0,isNaN(X))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return de(L(q(X))+" M"),this},c.GState=t0,c.setGState=function(X){(X=typeof X=="string"?St[er[X]]:mo(null,X)).equals(jt)||(de("/"+X.id+" gs"),jt=X)};var mo=function(X,fe){if(!X||!er[X]){var Ne=!1;for(var Fe in St)if(St.hasOwnProperty(Fe)&&St[Fe].equals(fe)){Ne=!0;break}if(Ne)fe=St[Fe];else{var Ge="GS"+(Object.keys(St).length+1).toString(10);St[Ge]=fe,fe.id=Ge}return X&&(er[X]=fe.id),lr.publish("addGState",fe),fe}};c.addGState=function(X,fe){return mo(X,fe),this},c.saveGraphicsState=function(){return de("q"),$e.push({key:bt,size:_e,color:ja}),this},c.restoreGraphicsState=function(){de("Q");var X=$e.pop();return bt=X.key,_e=X.size,ja=X.color,jt=null,this},c.setCurrentTransformationMatrix=function(X){return de(X.toString()+" cm"),this},c.comment=function(X){return de("#"+X),this};var yo=function(X,fe){var Ne=X||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return Ne},set:function(lt){isNaN(lt)||(Ne=parseFloat(lt))}});var Fe=fe||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return Fe},set:function(lt){isNaN(lt)||(Fe=parseFloat(lt))}});var Ge="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return Ge},set:function(lt){Ge=lt.toString()}}),this},Zs=function(X,fe,Ne,Fe){yo.call(this,X,fe),this.type="rect";var Ge=Ne||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return Ge},set:function(ft){isNaN(ft)||(Ge=parseFloat(ft))}});var lt=Fe||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return lt},set:function(ft){isNaN(ft)||(lt=parseFloat(ft))}}),this},dl=function(){this.page=vr,this.currentPage=z,this.pages=ye.slice(0),this.pagesContext=Xt.slice(0),this.x=vt,this.y=wr,this.matrix=cr,this.width=eo(z),this.height=mi(z),this.outputDestination=Me,this.id="",this.objectNumber=-1};dl.prototype.restore=function(){vr=this.page,z=this.currentPage,Xt=this.pagesContext,ye=this.pages,vt=this.x,wr=this.y,cr=this.matrix,Os(z,this.width),kn(z,this.height),Me=this.outputDestination};var Jn=function(X,fe,Ne,Fe,Ge){mn.push(new dl),vr=z=0,ye=[],vt=X,wr=fe,cr=Ge,Qo([Ne,Fe])};for(var Da in c.beginFormObject=function(X,fe,Ne,Fe,Ge){return Jn(X,fe,Ne,Fe,Ge),this},c.endFormObject=function(X){return function(fe){if(gi[fe])mn.pop().restore();else{var Ne=new dl,Fe="Xo"+(Object.keys(Zn).length+1).toString(10);Ne.id=Fe,gi[fe]=Fe,Zn[Fe]=Ne,lr.publish("addFormObject",Ne),mn.pop().restore()}}(X),this},c.doFormObject=function(X,fe){var Ne=Zn[gi[X]];return de("q"),de(fe.toString()+" cm"),de("/"+Ne.id+" Do"),de("Q"),this},c.getFormObject=function(X){var fe=Zn[gi[X]];return{x:fe.x,y:fe.y,width:fe.width,height:fe.height,matrix:fe.matrix}},c.save=function(X,fe){return X=X||"generated.pdf",(fe=fe||{}).returnPromise=fe.returnPromise||!1,fe.returnPromise===!1?(Of(Pn(Hi()),X),typeof Of.unload=="function"&&dr.setTimeout&&setTimeout(Of.unload,911),this):new Promise(function(Ne,Fe){try{var Ge=Of(Pn(Hi()),X);typeof Of.unload=="function"&&dr.setTimeout&&setTimeout(Of.unload,911),Ne(Ge)}catch(lt){Fe(lt.message)}})},Kt.API)Kt.API.hasOwnProperty(Da)&&(Da==="events"&&Kt.API.events.length?function(X,fe){var Ne,Fe,Ge;for(Ge=fe.length-1;Ge!==-1;Ge--)Ne=fe[Ge][0],Fe=fe[Ge][1],X.subscribe.apply(X,[Ne].concat(typeof Fe=="function"?[Fe]:Fe))}(lr,Kt.API.events):c[Da]=Kt.API[Da]);var eo=c.getPageWidth=function(X){return(Xt[X=X||z].mediaBox.topRightX-Xt[X].mediaBox.bottomLeftX)/ht},Os=c.setPageWidth=function(X,fe){Xt[X].mediaBox.topRightX=fe*ht+Xt[X].mediaBox.bottomLeftX},mi=c.getPageHeight=function(X){return(Xt[X=X||z].mediaBox.topRightY-Xt[X].mediaBox.bottomLeftY)/ht},kn=c.setPageHeight=function(X,fe){Xt[X].mediaBox.topRightY=fe*ht+Xt[X].mediaBox.bottomLeftY};return c.internal={pdfEscape:Sa,getStyle:$l,getFont:Ma,getFontSize:Le,getCharSpace:Xl,getTextColor:vi,getLineHeight:vo,getLineHeightFactor:pc,getLineWidth:xt,write:Te,getHorizontalCoordinate:Qa,getVerticalCoordinate:pn,getCoordinateString:Wl,getVerticalCoordinateString:Yl,collections:{},newObject:Rr,newAdditionalObject:ba,newObjectDeferred:yn,newObjectDeferredBegin:An,getFilters:_a,putStream:xa,events:lr,scaleFactor:ht,pageSize:{getWidth:function(){return eo(z)},setWidth:function(X){Os(z,X)},getHeight:function(){return mi(z)},setHeight:function(X){kn(z,X)}},encryptionOptions:f,encryption:qn,getEncryptor:function(X){return f!==null?qn.encryptor(X,0):function(fe){return fe}},output:Vi,getNumberOfPages:oi,pages:ye,out:de,f2:k,f3:C,getPageInfo:es,getPageInfoByObjId:Ru,getCurrentPageInfo:Ea,getPDFVersion:x,Point:yo,Rectangle:Zs,Matrix:Yt,hasHotfix:Ws},Object.defineProperty(c.internal.pageSize,"width",{get:function(){return eo(z)},set:function(X){Os(z,X)},enumerable:!0,configurable:!0}),Object.defineProperty(c.internal.pageSize,"height",{get:function(){return mi(z)},set:function(X){kn(z,X)},enumerable:!0,configurable:!0}),(function(X){for(var fe=0,Ne=be.length;fe<Ne;fe++){var Fe=Zo.call(this,X[fe][0],X[fe][1],X[fe][2],be[fe][3],!0);v===!1&&(g[Fe]=!0);var Ge=X[fe][0].split("-");Gl({id:Fe,fontName:Ge[0],fontStyle:Ge[1]||""})}lr.publish("addFonts",{fonts:Pt,dictionary:$t})}).call(c,be),bt="F1",cc(i,r),lr.publish("initialized"),c}yh.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)},yh.prototype.toHexString=function(e){return e.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},yh.prototype.hexToBytes=function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(String.fromCharCode(parseInt(e.substr(r,2),16)));return t.join("")},yh.prototype.processOwnerPassword=function(e,t){return Zv(Kv(t).substr(0,5),e)},yh.prototype.encryptor=function(e,t){var r=Kv(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(n){return Zv(r,n)}},t0.prototype.equals=function(e){var t,r="id,objectNumber,equals";if(!e||Sn(e)!==Sn(this))return!1;var n=0;for(t in this)if(!(r.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t)||this[t]!==e[t])return!1;n++}for(t in e)e.hasOwnProperty(t)&&r.indexOf(t)<0&&n--;return n===0},Kt.API={events:[]},Kt.version="3.0.2";var Di=Kt.API,Um=1,Yf=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},gh=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},br=function(e){return e.toFixed(2)},Vc=function(e){return e.toFixed(5)};Di.__acroform__={};var As=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},_w=function(e){return e*Um},mu=function(e){var t=new x7,r=Vt.internal.getHeight(e)||0,n=Vt.internal.getWidth(e)||0;return t.BBox=[0,0,Number(br(n)),Number(br(r))],t},dR=Di.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<t},pR=Di.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},gR=Di.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return e&1<<t?1:0},na=Di.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return gR(e,t-1)},ia=Di.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return dR(e,t-1)},aa=Di.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return pR(e,t-1)},vR=Di.__acroform__.calculateCoordinates=function(e,t){var r=t.internal.getHorizontalCoordinate,n=t.internal.getVerticalCoordinate,i=e[0],a=e[1],l=e[2],o=e[3],u={};return u.lowerLeft_X=r(i)||0,u.lowerLeft_Y=n(a+o)||0,u.upperRight_X=r(i+l)||0,u.upperRight_Y=n(a)||0,[Number(br(u.lowerLeft_X)),Number(br(u.lowerLeft_Y)),Number(br(u.upperRight_X)),Number(br(u.upperRight_Y))]},mR=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],r=e._V||e.DV,n=Qv(e,r),i=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(e.scope.__private__.encodeColorString(e.color)),t.push("/"+i+" "+br(n.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(n.text),t.push("ET"),t.push("Q"),t.push("EMC");var a=mu(e);return a.scope=e.scope,a.stream=t.join(`
|
|
466
|
+
`,So+=Ni,So+=X,de(So+="ET"),g[bt]=!0,Hr};var hl=c.__private__.clip=c.clip=function(X){return de(X==="evenodd"?"W*":"W"),this};c.clipEvenOdd=function(){return hl("evenodd")},c.__private__.discardPath=c.discardPath=function(){return de("n"),this};var ts=c.__private__.isValidStyle=function(X){var fe=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(X)!==-1&&(fe=!0),fe};c.__private__.setDefaultPathOperation=c.setDefaultPathOperation=function(X){return ts(X)&&(d=X),this};var $l=c.__private__.getStyle=c.getStyle=function(X){var fe=d;switch(X){case"D":case"S":fe="S";break;case"F":fe="f";break;case"FD":case"DF":fe="B";break;case"f":case"f*":case"B":case"B*":fe=X}return fe},Ar=c.close=function(){return de("h"),this};c.stroke=function(){return de("S"),this},c.fill=function(X){return go("f",X),this},c.fillEvenOdd=function(X){return go("f*",X),this},c.fillStroke=function(X){return go("B",X),this},c.fillStrokeEvenOdd=function(X){return go("B*",X),this};var go=function(X,fe){Sn(fe)==="object"?fc(fe,X):de(X)},rs=function(X){X===null||_===w&&X===void 0||(X=$l(X),de(X))};function Ys(X,fe,Ne,Fe,Ge){var lt=new Eh(fe||this.boundingBox,Ne||this.xStep,Fe||this.yStep,this.gState,Ge||this.matrix);lt.stream=this.stream;var ft=X+"$$"+this.cloneIndex+++"$$";return Un(ft,lt),lt}var fc=function(X,fe){var Ne=kt[X.key],Fe=ze[Ne];if(Fe instanceof Cf)de("q"),de(hc(fe)),Fe.gState&&c.setGState(Fe.gState),de(X.matrix.toString()+" cm"),de("/"+Ne+" sh"),de("Q");else if(Fe instanceof Eh){var Ge=new Yt(1,0,0,-1,0,yi());X.matrix&&(Ge=Ge.multiply(X.matrix||Ra),Ne=Ys.call(Fe,X.key,X.boundingBox,X.xStep,X.yStep,Ge).id),de("q"),de("/Pattern cs"),de("/"+Ne+" scn"),Fe.gState&&c.setGState(Fe.gState),de(fe),de("Q")}},hc=function(X){switch(X){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Xs=c.moveTo=function(X,fe){return de(L(q(X))+" "+L(G(fe))+" m"),this},ns=c.lineTo=function(X,fe){return de(L(q(X))+" "+L(G(fe))+" l"),this},Za=c.curveTo=function(X,fe,Ne,Fe,Ge,lt){return de([L(q(X)),L(G(fe)),L(q(Ne)),L(G(Fe)),L(q(Ge)),L(G(lt)),"c"].join(" ")),this};c.__private__.line=c.line=function(X,fe,Ne,Fe,Ge){if(isNaN(X)||isNaN(fe)||isNaN(Ne)||isNaN(Fe)||!ts(Ge))throw new Error("Invalid arguments passed to jsPDF.line");return _===b?this.lines([[Ne-X,Fe-fe]],X,fe,[1,1],Ge||"S"):this.lines([[Ne-X,Fe-fe]],X,fe,[1,1]).stroke()},c.__private__.lines=c.lines=function(X,fe,Ne,Fe,Ge,lt){var ft,Lt,Et,Ut,Rt,Pr,Mr,ei,Hr,ti,Hn,Ni;if(typeof X=="number"&&(Ni=Ne,Ne=fe,fe=X,X=Ni),Fe=Fe||[1,1],lt=lt||!1,isNaN(fe)||isNaN(Ne)||!Array.isArray(X)||!Array.isArray(Fe)||!ts(Ge)||typeof lt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Xs(fe,Ne),ft=Fe[0],Lt=Fe[1],Ut=X.length,ti=fe,Hn=Ne,Et=0;Et<Ut;Et++)(Rt=X[Et]).length===2?(ti=Rt[0]*ft+ti,Hn=Rt[1]*Lt+Hn,ns(ti,Hn)):(Pr=Rt[0]*ft+ti,Mr=Rt[1]*Lt+Hn,ei=Rt[2]*ft+ti,Hr=Rt[3]*Lt+Hn,ti=Rt[4]*ft+ti,Hn=Rt[5]*Lt+Hn,Za(Pr,Mr,ei,Hr,ti,Hn));return lt&&Ar(),rs(Ge),this},c.path=function(X){for(var fe=0;fe<X.length;fe++){var Ne=X[fe],Fe=Ne.c;switch(Ne.op){case"m":Xs(Fe[0],Fe[1]);break;case"l":ns(Fe[0],Fe[1]);break;case"c":Za.apply(this,Fe);break;case"h":Ar()}}return this},c.__private__.rect=c.rect=function(X,fe,Ne,Fe,Ge){if(isNaN(X)||isNaN(fe)||isNaN(Ne)||isNaN(Fe)||!ts(Ge))throw new Error("Invalid arguments passed to jsPDF.rect");return _===b&&(Fe=-Fe),de([L(q(X)),L(G(fe)),L(q(Ne)),L(q(Fe)),"re"].join(" ")),rs(Ge),this},c.__private__.triangle=c.triangle=function(X,fe,Ne,Fe,Ge,lt,ft){if(isNaN(X)||isNaN(fe)||isNaN(Ne)||isNaN(Fe)||isNaN(Ge)||isNaN(lt)||!ts(ft))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[Ne-X,Fe-fe],[Ge-Ne,lt-Fe],[X-Ge,fe-lt]],X,fe,[1,1],ft,!0),this},c.__private__.roundedRect=c.roundedRect=function(X,fe,Ne,Fe,Ge,lt,ft){if(isNaN(X)||isNaN(fe)||isNaN(Ne)||isNaN(Fe)||isNaN(Ge)||isNaN(lt)||!ts(ft))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Lt=4/3*(Math.SQRT2-1);return Ge=Math.min(Ge,.5*Ne),lt=Math.min(lt,.5*Fe),this.lines([[Ne-2*Ge,0],[Ge*Lt,0,Ge,lt-lt*Lt,Ge,lt],[0,Fe-2*lt],[0,lt*Lt,-Ge*Lt,lt,-Ge,lt],[2*Ge-Ne,0],[-Ge*Lt,0,-Ge,-lt*Lt,-Ge,-lt],[0,2*lt-Fe],[0,-lt*Lt,Ge*Lt,-lt,Ge,-lt]],X+Ge,fe,[1,1],ft,!0),this},c.__private__.ellipse=c.ellipse=function(X,fe,Ne,Fe,Ge){if(isNaN(X)||isNaN(fe)||isNaN(Ne)||isNaN(Fe)||!ts(Ge))throw new Error("Invalid arguments passed to jsPDF.ellipse");var lt=4/3*(Math.SQRT2-1)*Ne,ft=4/3*(Math.SQRT2-1)*Fe;return Xs(X+Ne,fe),Za(X+Ne,fe-ft,X+lt,fe-Fe,X,fe-Fe),Za(X-lt,fe-Fe,X-Ne,fe-ft,X-Ne,fe),Za(X-Ne,fe+ft,X-lt,fe+Fe,X,fe+Fe),Za(X+lt,fe+Fe,X+Ne,fe+ft,X+Ne,fe),rs(Ge),this},c.__private__.circle=c.circle=function(X,fe,Ne,Fe){if(isNaN(X)||isNaN(fe)||isNaN(Ne)||!ts(Fe))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(X,fe,Ne,Ne,Fe)},c.setFont=function(X,fe,Ne){return Ne&&(fe=O(fe,Ne)),bt=an(X,fe,{disableWarning:!1}),this};var Ma=c.__private__.getFont=c.getFont=function(){return Pt[an.apply(c,arguments)]};c.__private__.getFontList=c.getFontList=function(){var X,fe,Ne={};for(X in $t)if($t.hasOwnProperty(X))for(fe in Ne[X]=[],$t[X])$t[X].hasOwnProperty(fe)&&Ne[X].push(fe);return Ne},c.addFont=function(X,fe,Ne,Fe,Ge){var lt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&<.indexOf(arguments[3])!==-1?Ge=arguments[3]:arguments[3]&<.indexOf(arguments[3])==-1&&(Ne=O(Ne,Fe)),Zo.call(this,X,fe,Ne,Ge=Ge||"Identity-H")};var Ia,Fa=e.lineWidth||.200025,xt=c.__private__.getLineWidth=c.getLineWidth=function(){return Fa},Ks=c.__private__.setLineWidth=c.setLineWidth=function(X){return Fa=X,de(L(q(X))+" w"),this};c.__private__.setLineDash=Kt.API.setLineDash=Kt.API.setLineDashPattern=function(X,fe){if(X=X||[],fe=fe||0,isNaN(fe)||!Array.isArray(X))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return X=X.map(function(Ne){return L(q(Ne))}).join(" "),fe=L(q(fe)),de("["+X+"] "+fe+" d"),this};var vo=c.__private__.getLineHeight=c.getLineHeight=function(){return _e*Ia};c.__private__.getLineHeight=c.getLineHeight=function(){return _e*Ia};var dc=c.__private__.setLineHeightFactor=c.setLineHeightFactor=function(X){return typeof(X=X||1.15)=="number"&&(Ia=X),this},pc=c.__private__.getLineHeightFactor=c.getLineHeightFactor=function(){return Ia};dc(e.lineHeight);var Qa=c.__private__.getHorizontalCoordinate=function(X){return q(X)},pn=c.__private__.getVerticalCoordinate=function(X){return _===w?X:Xt[z].mediaBox.topRightY-Xt[z].mediaBox.bottomLeftY-q(X)},Wl=c.__private__.getHorizontalCoordinateString=c.getHorizontalCoordinateString=function(X){return L(Qa(X))},Yl=c.__private__.getVerticalCoordinateString=c.getVerticalCoordinateString=function(X){return L(pn(X))},ks=e.strokeColor||"0 G";c.__private__.getStrokeColor=c.getDrawColor=function(){return Ya(ks)},c.__private__.setStrokeColor=c.setDrawColor=function(X,fe,Ne,Fe){return ks=Qn({ch1:X,ch2:fe,ch3:Ne,ch4:Fe,pdfColorType:"draw",precision:2}),de(ks),this};var Mu=e.fillColor||"0 g";c.__private__.getFillColor=c.getFillColor=function(){return Ya(Mu)},c.__private__.setFillColor=c.setFillColor=function(X,fe,Ne,Fe){return Mu=Qn({ch1:X,ch2:fe,ch3:Ne,ch4:Fe,pdfColorType:"fill",precision:2}),de(Mu),this};var ja=e.textColor||"0 g",mi=c.__private__.getTextColor=c.getTextColor=function(){return Ya(ja)};c.__private__.setTextColor=c.setTextColor=function(X,fe,Ne,Fe){return ja=Qn({ch1:X,ch2:fe,ch3:Ne,ch4:Fe,pdfColorType:"text",precision:3}),this};var Fo=e.charSpace,Xl=c.__private__.getCharSpace=c.getCharSpace=function(){return parseFloat(Fo||0)};c.__private__.setCharSpace=c.setCharSpace=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Fo=X,this};var Aa=0;c.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},c.__private__.setLineCap=c.setLineCap=function(X){var fe=c.CapJoinStyles[X];if(fe===void 0)throw new Error("Line cap style of '"+X+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Aa=fe,de(fe+" J"),this};var Ja=0;c.__private__.setLineJoin=c.setLineJoin=function(X){var fe=c.CapJoinStyles[X];if(fe===void 0)throw new Error("Line join style of '"+X+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Ja=fe,de(fe+" j"),this},c.__private__.setLineMiterLimit=c.__private__.setMiterLimit=c.setLineMiterLimit=c.setMiterLimit=function(X){if(X=X||0,isNaN(X))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return de(L(q(X))+" M"),this},c.GState=t0,c.setGState=function(X){(X=typeof X=="string"?St[er[X]]:mo(null,X)).equals(jt)||(de("/"+X.id+" gs"),jt=X)};var mo=function(X,fe){if(!X||!er[X]){var Ne=!1;for(var Fe in St)if(St.hasOwnProperty(Fe)&&St[Fe].equals(fe)){Ne=!0;break}if(Ne)fe=St[Fe];else{var Ge="GS"+(Object.keys(St).length+1).toString(10);St[Ge]=fe,fe.id=Ge}return X&&(er[X]=fe.id),lr.publish("addGState",fe),fe}};c.addGState=function(X,fe){return mo(X,fe),this},c.saveGraphicsState=function(){return de("q"),$e.push({key:bt,size:_e,color:ja}),this},c.restoreGraphicsState=function(){de("Q");var X=$e.pop();return bt=X.key,_e=X.size,ja=X.color,jt=null,this},c.setCurrentTransformationMatrix=function(X){return de(X.toString()+" cm"),this},c.comment=function(X){return de("#"+X),this};var yo=function(X,fe){var Ne=X||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return Ne},set:function(lt){isNaN(lt)||(Ne=parseFloat(lt))}});var Fe=fe||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return Fe},set:function(lt){isNaN(lt)||(Fe=parseFloat(lt))}});var Ge="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return Ge},set:function(lt){Ge=lt.toString()}}),this},Zs=function(X,fe,Ne,Fe){yo.call(this,X,fe),this.type="rect";var Ge=Ne||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return Ge},set:function(ft){isNaN(ft)||(Ge=parseFloat(ft))}});var lt=Fe||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return lt},set:function(ft){isNaN(ft)||(lt=parseFloat(ft))}}),this},dl=function(){this.page=vr,this.currentPage=z,this.pages=ye.slice(0),this.pagesContext=Xt.slice(0),this.x=vt,this.y=wr,this.matrix=cr,this.width=eo(z),this.height=yi(z),this.outputDestination=Me,this.id="",this.objectNumber=-1};dl.prototype.restore=function(){vr=this.page,z=this.currentPage,Xt=this.pagesContext,ye=this.pages,vt=this.x,wr=this.y,cr=this.matrix,Os(z,this.width),kn(z,this.height),Me=this.outputDestination};var Jn=function(X,fe,Ne,Fe,Ge){mn.push(new dl),vr=z=0,ye=[],vt=X,wr=fe,cr=Ge,Qo([Ne,Fe])};for(var Da in c.beginFormObject=function(X,fe,Ne,Fe,Ge){return Jn(X,fe,Ne,Fe,Ge),this},c.endFormObject=function(X){return function(fe){if(vi[fe])mn.pop().restore();else{var Ne=new dl,Fe="Xo"+(Object.keys(Zn).length+1).toString(10);Ne.id=Fe,vi[fe]=Fe,Zn[Fe]=Ne,lr.publish("addFormObject",Ne),mn.pop().restore()}}(X),this},c.doFormObject=function(X,fe){var Ne=Zn[vi[X]];return de("q"),de(fe.toString()+" cm"),de("/"+Ne.id+" Do"),de("Q"),this},c.getFormObject=function(X){var fe=Zn[vi[X]];return{x:fe.x,y:fe.y,width:fe.width,height:fe.height,matrix:fe.matrix}},c.save=function(X,fe){return X=X||"generated.pdf",(fe=fe||{}).returnPromise=fe.returnPromise||!1,fe.returnPromise===!1?(Of(Pn(Hi()),X),typeof Of.unload=="function"&&dr.setTimeout&&setTimeout(Of.unload,911),this):new Promise(function(Ne,Fe){try{var Ge=Of(Pn(Hi()),X);typeof Of.unload=="function"&&dr.setTimeout&&setTimeout(Of.unload,911),Ne(Ge)}catch(lt){Fe(lt.message)}})},Kt.API)Kt.API.hasOwnProperty(Da)&&(Da==="events"&&Kt.API.events.length?function(X,fe){var Ne,Fe,Ge;for(Ge=fe.length-1;Ge!==-1;Ge--)Ne=fe[Ge][0],Fe=fe[Ge][1],X.subscribe.apply(X,[Ne].concat(typeof Fe=="function"?[Fe]:Fe))}(lr,Kt.API.events):c[Da]=Kt.API[Da]);var eo=c.getPageWidth=function(X){return(Xt[X=X||z].mediaBox.topRightX-Xt[X].mediaBox.bottomLeftX)/ht},Os=c.setPageWidth=function(X,fe){Xt[X].mediaBox.topRightX=fe*ht+Xt[X].mediaBox.bottomLeftX},yi=c.getPageHeight=function(X){return(Xt[X=X||z].mediaBox.topRightY-Xt[X].mediaBox.bottomLeftY)/ht},kn=c.setPageHeight=function(X,fe){Xt[X].mediaBox.topRightY=fe*ht+Xt[X].mediaBox.bottomLeftY};return c.internal={pdfEscape:Sa,getStyle:$l,getFont:Ma,getFontSize:Le,getCharSpace:Xl,getTextColor:mi,getLineHeight:vo,getLineHeightFactor:pc,getLineWidth:xt,write:Te,getHorizontalCoordinate:Qa,getVerticalCoordinate:pn,getCoordinateString:Wl,getVerticalCoordinateString:Yl,collections:{},newObject:Rr,newAdditionalObject:ba,newObjectDeferred:yn,newObjectDeferredBegin:An,getFilters:_a,putStream:xa,events:lr,scaleFactor:ht,pageSize:{getWidth:function(){return eo(z)},setWidth:function(X){Os(z,X)},getHeight:function(){return yi(z)},setHeight:function(X){kn(z,X)}},encryptionOptions:f,encryption:qn,getEncryptor:function(X){return f!==null?qn.encryptor(X,0):function(fe){return fe}},output:Vi,getNumberOfPages:oi,pages:ye,out:de,f2:k,f3:C,getPageInfo:es,getPageInfoByObjId:Ru,getCurrentPageInfo:Ea,getPDFVersion:x,Point:yo,Rectangle:Zs,Matrix:Yt,hasHotfix:Ws},Object.defineProperty(c.internal.pageSize,"width",{get:function(){return eo(z)},set:function(X){Os(z,X)},enumerable:!0,configurable:!0}),Object.defineProperty(c.internal.pageSize,"height",{get:function(){return yi(z)},set:function(X){kn(z,X)},enumerable:!0,configurable:!0}),(function(X){for(var fe=0,Ne=be.length;fe<Ne;fe++){var Fe=Zo.call(this,X[fe][0],X[fe][1],X[fe][2],be[fe][3],!0);v===!1&&(g[Fe]=!0);var Ge=X[fe][0].split("-");Gl({id:Fe,fontName:Ge[0],fontStyle:Ge[1]||""})}lr.publish("addFonts",{fonts:Pt,dictionary:$t})}).call(c,be),bt="F1",cc(i,r),lr.publish("initialized"),c}yh.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)},yh.prototype.toHexString=function(e){return e.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},yh.prototype.hexToBytes=function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(String.fromCharCode(parseInt(e.substr(r,2),16)));return t.join("")},yh.prototype.processOwnerPassword=function(e,t){return Zv(Kv(t).substr(0,5),e)},yh.prototype.encryptor=function(e,t){var r=Kv(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(n){return Zv(r,n)}},t0.prototype.equals=function(e){var t,r="id,objectNumber,equals";if(!e||Sn(e)!==Sn(this))return!1;var n=0;for(t in this)if(!(r.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t)||this[t]!==e[t])return!1;n++}for(t in e)e.hasOwnProperty(t)&&r.indexOf(t)<0&&n--;return n===0},Kt.API={events:[]},Kt.version="3.0.2";var Di=Kt.API,Um=1,Yf=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},gh=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},br=function(e){return e.toFixed(2)},Vc=function(e){return e.toFixed(5)};Di.__acroform__={};var As=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},_w=function(e){return e*Um},mu=function(e){var t=new x7,r=Vt.internal.getHeight(e)||0,n=Vt.internal.getWidth(e)||0;return t.BBox=[0,0,Number(br(n)),Number(br(r))],t},dR=Di.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<t},pR=Di.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},gR=Di.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return e&1<<t?1:0},na=Di.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return gR(e,t-1)},ia=Di.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return dR(e,t-1)},aa=Di.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return pR(e,t-1)},vR=Di.__acroform__.calculateCoordinates=function(e,t){var r=t.internal.getHorizontalCoordinate,n=t.internal.getVerticalCoordinate,i=e[0],a=e[1],l=e[2],o=e[3],u={};return u.lowerLeft_X=r(i)||0,u.lowerLeft_Y=n(a+o)||0,u.upperRight_X=r(i+l)||0,u.upperRight_Y=n(a)||0,[Number(br(u.lowerLeft_X)),Number(br(u.lowerLeft_Y)),Number(br(u.upperRight_X)),Number(br(u.upperRight_Y))]},mR=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],r=e._V||e.DV,n=Qv(e,r),i=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(e.scope.__private__.encodeColorString(e.color)),t.push("/"+i+" "+br(n.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(n.text),t.push("ET"),t.push("Q"),t.push("EMC");var a=mu(e);return a.scope=e.scope,a.stream=t.join(`
|
|
467
467
|
`),a}},Qv=function(e,t){var r=e.fontSize===0?e.maxFontSize:e.fontSize,n={text:"",fontSize:""},i=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");i=e.multiline?i.map(function(k){return k.split(`
|
|
468
468
|
`)}):i.map(function(k){return[k]});var a=r,l=Vt.internal.getHeight(e)||0;l=l<0?-l:l;var o=Vt.internal.getWidth(e)||0;o=o<0?-o:o;var u=function(k,C,q){if(k+1<i.length){var G=C+" "+i[k+1][0];return m1(G,e,q).width<=o-4}return!1};a++;e:for(;a>0;){t="",a--;var d,f,v=m1("3",e,a).height,g=e.multiline?l-a:(l-v)/2,c=g+=2,y=0,x=0,E=0;if(a<=0){t=`(...) Tj
|
|
469
469
|
`,t+="% Width of Text: "+m1(t,e,a=12).width+", FieldWidth:"+o+`
|
|
@@ -513,13 +513,13 @@ T* `):X.join(` Tj
|
|
|
513
513
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
514
514
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
515
515
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
516
|
-
*/function yv(e){var t,r,n,i,a,l=Math.floor,o=new Array(64),u=new Array(64),d=new Array(64),f=new Array(64),v=new Array(65535),g=new Array(65535),c=new Array(64),y=new Array(64),x=[],E=0,S=7,b=new Array(64),w=new Array(64),_=new Array(64),A=new Array(256),M=new Array(2048),O=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],L=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],T=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],k=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],C=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],q=[0,1,2,3,4,5,6,7,8,9,10,11],G=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],J=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ae(j,z){for(var Z=0,re=0,W=new Array,Q=1;Q<=16;Q++){for(var se=1;se<=j[Q];se++)W[z[re]]=[],W[z[re]][0]=Z,W[z[re]][1]=Q,re++,Z++;Z*=2}return W}function H(j){for(var z=j[0],Z=j[1]-1;Z>=0;)z&1<<Z&&(E|=1<<S),Z--,--S<0&&(E==255?(V(255),V(0)):V(E),S=7,E=0)}function V(j){x.push(j)}function Y(j){V(j>>8&255),V(255&j)}function U(j,z,Z,re,W){for(var Q,se=W[0],ue=W[240],le=function(_e,xe){var Le,pe,Ce,je,He,st,pt,ct,bt,ht,vt=0;for(bt=0;bt<8;++bt){Le=_e[vt],pe=_e[vt+1],Ce=_e[vt+2],je=_e[vt+3],He=_e[vt+4],st=_e[vt+5],pt=_e[vt+6];var wr=Le+(ct=_e[vt+7]),cr=Le-ct,Pt=pe+pt,$t=pe-pt,$e=Ce+st,ze=Ce-st,kt=je+He,St=je-He,er=wr+kt,jt=wr-kt,vr=Pt+$e,Xt=Pt-$e;_e[vt]=er+vr,_e[vt+4]=er-vr;var lr=.707106781*(Xt+jt);_e[vt+2]=jt+lr,_e[vt+6]=jt-lr;var Oi=.382683433*((er=St+ze)-(Xt=$t+cr)),Zn=.5411961*er+Oi,
|
|
516
|
+
*/function yv(e){var t,r,n,i,a,l=Math.floor,o=new Array(64),u=new Array(64),d=new Array(64),f=new Array(64),v=new Array(65535),g=new Array(65535),c=new Array(64),y=new Array(64),x=[],E=0,S=7,b=new Array(64),w=new Array(64),_=new Array(64),A=new Array(256),M=new Array(2048),O=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],L=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],T=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],k=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],C=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],q=[0,1,2,3,4,5,6,7,8,9,10,11],G=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],J=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ae(j,z){for(var Z=0,re=0,W=new Array,Q=1;Q<=16;Q++){for(var se=1;se<=j[Q];se++)W[z[re]]=[],W[z[re]][0]=Z,W[z[re]][1]=Q,re++,Z++;Z*=2}return W}function H(j){for(var z=j[0],Z=j[1]-1;Z>=0;)z&1<<Z&&(E|=1<<S),Z--,--S<0&&(E==255?(V(255),V(0)):V(E),S=7,E=0)}function V(j){x.push(j)}function Y(j){V(j>>8&255),V(255&j)}function U(j,z,Z,re,W){for(var Q,se=W[0],ue=W[240],le=function(_e,xe){var Le,pe,Ce,je,He,st,pt,ct,bt,ht,vt=0;for(bt=0;bt<8;++bt){Le=_e[vt],pe=_e[vt+1],Ce=_e[vt+2],je=_e[vt+3],He=_e[vt+4],st=_e[vt+5],pt=_e[vt+6];var wr=Le+(ct=_e[vt+7]),cr=Le-ct,Pt=pe+pt,$t=pe-pt,$e=Ce+st,ze=Ce-st,kt=je+He,St=je-He,er=wr+kt,jt=wr-kt,vr=Pt+$e,Xt=Pt-$e;_e[vt]=er+vr,_e[vt+4]=er-vr;var lr=.707106781*(Xt+jt);_e[vt+2]=jt+lr,_e[vt+6]=jt-lr;var Oi=.382683433*((er=St+ze)-(Xt=$t+cr)),Zn=.5411961*er+Oi,vi=1.306562965*Xt+Oi,mn=.707106781*(vr=ze+$t),Yt=cr+mn,sa=cr-mn;_e[vt+5]=sa+Zn,_e[vt+3]=sa-Zn,_e[vt+1]=Yt+vi,_e[vt+7]=Yt-vi,vt+=8}for(vt=0,bt=0;bt<8;++bt){Le=_e[vt],pe=_e[vt+8],Ce=_e[vt+16],je=_e[vt+24],He=_e[vt+32],st=_e[vt+40],pt=_e[vt+48];var Ra=Le+(ct=_e[vt+56]),Un=Le-ct,Ui=pe+pt,Rr=pe-pt,yn=Ce+st,An=Ce-st,ba=je+He,Mo=je-He,wa=Ra+ba,Ya=Ra-ba,Qn=Ui+yn,_a=Ui-yn;_e[vt]=wa+Qn,_e[vt+32]=wa-Qn;var xa=.707106781*(_a+Ya);_e[vt+16]=Ya+xa,_e[vt+48]=Ya-xa;var Io=.382683433*((wa=Mo+An)-(_a=Rr+Un)),Ci=.5411961*wa+Io,Xa=1.306562965*_a+Io,Ps=.707106781*(Qn=An+Rr),Ko=Un+Ps,Vl=Un-Ps;_e[vt+40]=Vl+Ci,_e[vt+24]=Vl-Ci,_e[vt+8]=Ko+Xa,_e[vt+56]=Ko-Xa,vt++}for(bt=0;bt<64;++bt)ht=_e[bt]*xe[bt],c[bt]=ht>0?ht+.5|0:ht-.5|0;return c}(j,z),ye=0;ye<64;++ye)y[O[ye]]=le[ye];var Re=y[0]-Z;Z=y[0],Re==0?H(re[0]):(H(re[g[Q=32767+Re]]),H(v[Q]));for(var Me=63;Me>0&&y[Me]==0;)Me--;if(Me==0)return H(se),Z;for(var Pe,de=1;de<=Me;){for(var Te=de;y[de]==0&&de<=Me;)++de;var Ae=de-Te;if(Ae>=16){Pe=Ae>>4;for(var be=1;be<=Pe;++be)H(ue);Ae&=15}Q=32767+y[de],H(W[(Ae<<4)+g[Q]]),H(v[Q]),de++}return Me!=63&&H(se),Z}function D(j){j=Math.min(Math.max(j,1),100),a!=j&&(function(z){for(var Z=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],re=0;re<64;re++){var W=l((Z[re]*z+50)/100);W=Math.min(Math.max(W,1),255),o[O[re]]=W}for(var Q=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],se=0;se<64;se++){var ue=l((Q[se]*z+50)/100);ue=Math.min(Math.max(ue,1),255),u[O[se]]=ue}for(var le=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],ye=0,Re=0;Re<8;Re++)for(var Me=0;Me<8;Me++)d[ye]=1/(o[O[ye]]*le[Re]*le[Me]*8),f[ye]=1/(u[O[ye]]*le[Re]*le[Me]*8),ye++}(j<50?Math.floor(5e3/j):Math.floor(200-2*j)),a=j)}this.encode=function(j,z){z&&D(z),x=new Array,E=0,S=7,Y(65496),Y(65504),Y(16),V(74),V(70),V(73),V(70),V(0),V(1),V(1),V(0),Y(1),Y(1),V(0),V(0),function(){Y(65499),Y(132),V(0);for(var pe=0;pe<64;pe++)V(o[pe]);V(1);for(var Ce=0;Ce<64;Ce++)V(u[Ce])}(),function(pe,Ce){Y(65472),Y(17),V(8),Y(Ce),Y(pe),V(3),V(1),V(17),V(0),V(2),V(17),V(1),V(3),V(17),V(1)}(j.width,j.height),function(){Y(65476),Y(418),V(0);for(var pe=0;pe<16;pe++)V(L[pe+1]);for(var Ce=0;Ce<=11;Ce++)V(R[Ce]);V(16);for(var je=0;je<16;je++)V(T[je+1]);for(var He=0;He<=161;He++)V(k[He]);V(1);for(var st=0;st<16;st++)V(C[st+1]);for(var pt=0;pt<=11;pt++)V(q[pt]);V(17);for(var ct=0;ct<16;ct++)V(G[ct+1]);for(var bt=0;bt<=161;bt++)V(J[bt])}(),Y(65498),Y(12),V(3),V(1),V(0),V(2),V(17),V(3),V(17),V(0),V(63),V(0);var Z=0,re=0,W=0;E=0,S=7,this.encode.displayName="_encode_";for(var Q,se,ue,le,ye,Re,Me,Pe,de,Te=j.data,Ae=j.width,be=j.height,_e=4*Ae,xe=0;xe<be;){for(Q=0;Q<_e;){for(ye=_e*xe+Q,Me=-1,Pe=0,de=0;de<64;de++)Re=ye+(Pe=de>>3)*_e+(Me=4*(7&de)),xe+Pe>=be&&(Re-=_e*(xe+1+Pe-be)),Q+Me>=_e&&(Re-=Q+Me-_e+4),se=Te[Re++],ue=Te[Re++],le=Te[Re++],b[de]=(M[se]+M[ue+256|0]+M[le+512|0]>>16)-128,w[de]=(M[se+768|0]+M[ue+1024|0]+M[le+1280|0]>>16)-128,_[de]=(M[se+1280|0]+M[ue+1536|0]+M[le+1792|0]>>16)-128;Z=U(b,d,Z,t,n),re=U(w,f,re,r,i),W=U(_,f,W,r,i),Q+=32}xe+=8}if(S>=0){var Le=[];Le[1]=S+1,Le[0]=(1<<S+1)-1,H(Le)}return Y(65497),new Uint8Array(x)},e=e||50,function(){for(var j=String.fromCharCode,z=0;z<256;z++)A[z]=j(z)}(),t=ae(L,R),r=ae(C,q),n=ae(T,k),i=ae(G,J),function(){for(var j=1,z=2,Z=1;Z<=15;Z++){for(var re=j;re<z;re++)g[32767+re]=Z,v[32767+re]=[],v[32767+re][1]=Z,v[32767+re][0]=re;for(var W=-(z-1);W<=-j;W++)g[32767+W]=Z,v[32767+W]=[],v[32767+W][1]=Z,v[32767+W][0]=z-1+W;j<<=1,z<<=1}}(),function(){for(var j=0;j<256;j++)M[j]=19595*j,M[j+256|0]=38470*j,M[j+512|0]=7471*j+32768,M[j+768|0]=-11059*j,M[j+1024|0]=-21709*j,M[j+1280|0]=32768*j+8421375,M[j+1536|0]=-27439*j,M[j+1792|0]=-5329*j}(),D(e)}/**
|
|
517
517
|
* @license
|
|
518
518
|
* Copyright (c) 2017 Aras Abbasi
|
|
519
519
|
*
|
|
520
520
|
* Licensed under the MIT License.
|
|
521
521
|
* http://opensource.org/licenses/mit-license
|
|
522
|
-
*/function Ml(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Dw(e){function t(R){if(!R)throw Error("assert :P")}function r(R,T,k){for(var C=0;4>C;C++)if(R[T+C]!=k.charCodeAt(C))return!0;return!1}function n(R,T,k,C,q){for(var G=0;G<q;G++)R[T+G]=k[C+G]}function i(R,T,k,C){for(var q=0;q<C;q++)R[T+q]=k}function a(R){return new Int32Array(R)}function l(R,T){for(var k=[],C=0;C<R;C++)k.push(new T);return k}function o(R,T){var k=[];return function C(q,G,J){for(var ae=J[G],H=0;H<ae&&(q.push(J.length>G+1?[]:new T),!(J.length<G+1));H++)C(q[H],G+1,J)}(k,0,R),k}var u=function(){var R=this;function T(N,B){for(var te=1<<B-1>>>0;N&te;)te>>>=1;return te?(N&te-1)+te:N}function k(N,B,te,ie,he){t(!(ie%te));do N[B+(ie-=te)]=he;while(0<ie)}function C(N,B,te,ie,he){if(t(2328>=he),512>=he)var ve=a(512);else if((ve=a(he))==null)return 0;return function(me,we,Se,Oe,De,Ze){var ke,qe,Ke=we,it=1<<Se,Ye=a(16),nt=a(16);for(t(De!=0),t(Oe!=null),t(me!=null),t(0<Se),qe=0;qe<De;++qe){if(15<Oe[qe])return 0;++Ye[Oe[qe]]}if(Ye[0]==De)return 0;for(nt[1]=0,ke=1;15>ke;++ke){if(Ye[ke]>1<<ke)return 0;nt[ke+1]=nt[ke]+Ye[ke]}for(qe=0;qe<De;++qe)ke=Oe[qe],0<Oe[qe]&&(Ze[nt[ke]++]=qe);if(nt[15]==1)return(Oe=new q).g=0,Oe.value=Ze[0],k(me,Ke,1,it,Oe),it;var Ue,ot=-1,ut=it-1,qt=0,Mt=1,ar=1,It=1<<Se;for(qe=0,ke=1,De=2;ke<=Se;++ke,De<<=1){if(Mt+=ar<<=1,0>(ar-=Ye[ke]))return 0;for(;0<Ye[ke];--Ye[ke])(Oe=new q).g=ke,Oe.value=Ze[qe++],k(me,Ke+qt,De,It,Oe),qt=T(qt,ke)}for(ke=Se+1,De=2;15>=ke;++ke,De<<=1){if(Mt+=ar<<=1,0>(ar-=Ye[ke]))return 0;for(;0<Ye[ke];--Ye[ke]){if(Oe=new q,(qt&ut)!=ot){for(Ke+=It,Ue=1<<(ot=ke)-Se;15>ot&&!(0>=(Ue-=Ye[ot]));)++ot,Ue<<=1;it+=It=1<<(Ue=ot-Se),me[we+(ot=qt&ut)].g=Ue+Se,me[we+ot].value=Ke-we-ot}Oe.g=ke-Se,Oe.value=Ze[qe++],k(me,Ke+(qt>>Se),De,It,Oe),qt=T(qt,ke)}}return Mt!=2*nt[15]-1?0:it}(N,B,te,ie,he,ve)}function q(){this.value=this.g=0}function G(){this.value=this.g=0}function J(){this.G=l(5,q),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=l(Vn,G)}function ae(N,B,te,ie){t(N!=null),t(B!=null),t(2147483648>ie),N.Ca=254,N.I=0,N.b=-8,N.Ka=0,N.oa=B,N.pa=te,N.Jd=B,N.Yc=te+ie,N.Zc=4<=ie?te+ie-4+1:te,se(N)}function H(N,B){for(var te=0;0<B--;)te|=le(N,128)<<B;return te}function V(N,B){var te=H(N,B);return ue(N)?-te:te}function Y(N,B,te,ie){var he,ve=0;for(t(N!=null),t(B!=null),t(4294967288>ie),N.Sb=ie,N.Ra=0,N.u=0,N.h=0,4<ie&&(ie=4),he=0;he<ie;++he)ve+=B[te+he]<<8*he;N.Ra=ve,N.bb=ie,N.oa=B,N.pa=te}function U(N){for(;8<=N.u&&N.bb<N.Sb;)N.Ra>>>=8,N.Ra+=N.oa[N.pa+N.bb]<<ca-8>>>0,++N.bb,N.u-=8;re(N)&&(N.h=1,N.u=0)}function D(N,B){if(t(0<=B),!N.h&&B<=Ql){var te=Z(N)&os[B];return N.u+=B,U(N),te}return N.h=1,N.u=0}function j(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function z(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function Z(N){return N.Ra>>>(N.u&ca-1)>>>0}function re(N){return t(N.bb<=N.Sb),N.h||N.bb==N.Sb&&N.u>ca}function W(N,B){N.u=B,N.h=re(N)}function Q(N){N.u>=Jr&&(t(N.u>=Jr),U(N))}function se(N){t(N!=null&&N.oa!=null),N.pa<N.Zc?(N.I=(N.oa[N.pa++]|N.I<<8)>>>0,N.b+=8):(t(N!=null&&N.oa!=null),N.pa<N.Yc?(N.b+=8,N.I=N.oa[N.pa++]|N.I<<8):N.Ka?N.b=0:(N.I<<=8,N.b+=8,N.Ka=1))}function ue(N){return H(N,1)}function le(N,B){var te=N.Ca;0>N.b&&se(N);var ie=N.b,he=te*B>>>8,ve=(N.I>>>ie>he)+0;for(ve?(te-=he,N.I-=he+1<<ie>>>0):te=he+1,ie=te,he=0;256<=ie;)he+=8,ie>>=8;return ie=7^he+vl[ie],N.b-=ie,N.Ca=(te<<ie)-1,ve}function ye(N,B,te){N[B+0]=te>>24&255,N[B+1]=te>>16&255,N[B+2]=te>>8&255,N[B+3]=255&te}function Re(N,B){return N[B+0]|N[B+1]<<8}function Me(N,B){return Re(N,B)|N[B+2]<<16}function Pe(N,B){return Re(N,B)|Re(N,B+2)<<16}function de(N,B){var te=1<<B;return t(N!=null),t(0<B),N.X=a(te),N.X==null?0:(N.Mb=32-B,N.Xa=B,1)}function Te(N,B){t(N!=null),t(B!=null),t(N.Xa==B.Xa),n(B.X,0,N.X,0,1<<B.Xa)}function Ae(){this.X=[],this.Xa=this.Mb=0}function be(N,B,te,ie){t(te!=null),t(ie!=null);var he=te[0],ve=ie[0];return he==0&&(he=(N*ve+B/2)/B),ve==0&&(ve=(B*he+N/2)/N),0>=he||0>=ve?0:(te[0]=he,ie[0]=ve,1)}function _e(N,B){return N+(1<<B)-1>>>B}function xe(N,B){return((4278255360&N)+(4278255360&B)>>>0&4278255360)+((16711935&N)+(16711935&B)>>>0&16711935)>>>0}function Le(N,B){R[B]=function(te,ie,he,ve,me,we,Se){var Oe;for(Oe=0;Oe<me;++Oe){var De=R[N](we[Se+Oe-1],he,ve+Oe);we[Se+Oe]=xe(te[ie+Oe],De)}}}function pe(){this.ud=this.hd=this.jd=0}function Ce(N,B){return((4278124286&(N^B))>>>1)+(N&B)>>>0}function je(N){return 0<=N&&256>N?N:0>N?0:255<N?255:void 0}function He(N,B){return je(N+(N-B+.5>>1))}function st(N,B,te){return Math.abs(B-te)-Math.abs(N-te)}function pt(N,B,te,ie,he,ve,me){for(ie=ve[me-1],te=0;te<he;++te)ve[me+te]=ie=xe(N[B+te],ie)}function ct(N,B,te,ie,he){var ve;for(ve=0;ve<te;++ve){var me=N[B+ve],we=me>>8&255,Se=16711935&(Se=(Se=16711935&me)+((we<<16)+we));ie[he+ve]=(4278255360&me)+Se>>>0}}function bt(N,B){B.jd=255&N,B.hd=N>>8&255,B.ud=N>>16&255}function ht(N,B,te,ie,he,ve){var me;for(me=0;me<ie;++me){var we=B[te+me],Se=we>>>8,Oe=we,De=255&(De=(De=we>>>16)+((N.jd<<24>>24)*(Se<<24>>24)>>>5));Oe=255&(Oe=(Oe+=(N.hd<<24>>24)*(Se<<24>>24)>>>5)+((N.ud<<24>>24)*(De<<24>>24)>>>5)),he[ve+me]=(4278255360&we)+(De<<16)+Oe}}function vt(N,B,te,ie,he){R[B]=function(ve,me,we,Se,Oe,De,Ze,ke,qe){for(Se=Ze;Se<ke;++Se)for(Ze=0;Ze<qe;++Ze)Oe[De++]=he(we[ie(ve[me++])])},R[N]=function(ve,me,we,Se,Oe,De,Ze){var ke=8>>ve.b,qe=ve.Ea,Ke=ve.K[0],it=ve.w;if(8>ke)for(ve=(1<<ve.b)-1,it=(1<<ke)-1;me<we;++me){var Ye,nt=0;for(Ye=0;Ye<qe;++Ye)Ye&ve||(nt=ie(Se[Oe++])),De[Ze++]=he(Ke[nt&it]),nt>>=ke}else R["VP8LMapColor"+te](Se,Oe,Ke,it,De,Ze,me,we,qe)}}function wr(N,B,te,ie,he){for(te=B+te;B<te;){var ve=N[B++];ie[he++]=ve>>16&255,ie[he++]=ve>>8&255,ie[he++]=255&ve}}function cr(N,B,te,ie,he){for(te=B+te;B<te;){var ve=N[B++];ie[he++]=ve>>16&255,ie[he++]=ve>>8&255,ie[he++]=255&ve,ie[he++]=ve>>24&255}}function Pt(N,B,te,ie,he){for(te=B+te;B<te;){var ve=(me=N[B++])>>16&240|me>>12&15,me=240&me|me>>28&15;ie[he++]=ve,ie[he++]=me}}function $t(N,B,te,ie,he){for(te=B+te;B<te;){var ve=(me=N[B++])>>16&248|me>>13&7,me=me>>5&224|me>>3&31;ie[he++]=ve,ie[he++]=me}}function $e(N,B,te,ie,he){for(te=B+te;B<te;){var ve=N[B++];ie[he++]=255&ve,ie[he++]=ve>>8&255,ie[he++]=ve>>16&255}}function ze(N,B,te,ie,he,ve){if(ve==0)for(te=B+te;B<te;)ye(ie,((ve=N[B++])[0]>>24|ve[1]>>8&65280|ve[2]<<8&16711680|ve[3]<<24)>>>0),he+=32;else n(ie,he,N,B,te)}function kt(N,B){R[B][0]=R[N+"0"],R[B][1]=R[N+"1"],R[B][2]=R[N+"2"],R[B][3]=R[N+"3"],R[B][4]=R[N+"4"],R[B][5]=R[N+"5"],R[B][6]=R[N+"6"],R[B][7]=R[N+"7"],R[B][8]=R[N+"8"],R[B][9]=R[N+"9"],R[B][10]=R[N+"10"],R[B][11]=R[N+"11"],R[B][12]=R[N+"12"],R[B][13]=R[N+"13"],R[B][14]=R[N+"0"],R[B][15]=R[N+"0"]}function St(N){return N==El||N==Ts||N==nu||N==iu}function er(){this.eb=[],this.size=this.A=this.fb=0}function jt(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function vr(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new er,this.f.kb=new jt,this.sd=null}function Xt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function lr(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Oi(N){return alert("todo:WebPSamplerProcessPlane"),N.T}function Zn(N,B){var te=N.T,ie=B.ba.f.RGBA,he=ie.eb,ve=ie.fb+N.ka*ie.A,me=Ca[B.ba.S],we=N.y,Se=N.O,Oe=N.f,De=N.N,Ze=N.ea,ke=N.W,qe=B.cc,Ke=B.dc,it=B.Mc,Ye=B.Nc,nt=N.ka,Ue=N.ka+N.T,ot=N.U,ut=ot+1>>1;for(nt==0?me(we,Se,null,null,Oe,De,Ze,ke,Oe,De,Ze,ke,he,ve,null,null,ot):(me(B.ec,B.fc,we,Se,qe,Ke,it,Ye,Oe,De,Ze,ke,he,ve-ie.A,he,ve,ot),++te);nt+2<Ue;nt+=2)qe=Oe,Ke=De,it=Ze,Ye=ke,De+=N.Rc,ke+=N.Rc,ve+=2*ie.A,me(we,(Se+=2*N.fa)-N.fa,we,Se,qe,Ke,it,Ye,Oe,De,Ze,ke,he,ve-ie.A,he,ve,ot);return Se+=N.fa,N.j+Ue<N.o?(n(B.ec,B.fc,we,Se,ot),n(B.cc,B.dc,Oe,De,ut),n(B.Mc,B.Nc,Ze,ke,ut),te--):1&Ue||me(we,Se,null,null,Oe,De,Ze,ke,Oe,De,Ze,ke,he,ve+ie.A,null,null,ot),te}function gi(N,B,te){var ie=N.F,he=[N.J];if(ie!=null){var ve=N.U,me=B.ba.S,we=me==ru||me==nu;B=B.ba.f.RGBA;var Se=[0],Oe=N.ka;Se[0]=N.T,N.Kb&&(Oe==0?--Se[0]:(--Oe,he[0]-=N.width),N.j+N.ka+N.T==N.o&&(Se[0]=N.o-N.j-Oe));var De=B.eb;Oe=B.fb+Oe*B.A,N=wl(ie,he[0],N.width,ve,Se,De,Oe+(we?0:3),B.A),t(te==Se),N&&St(me)&&Uo(De,Oe,we,ve,Se,B.A)}return 0}function mn(N){var B=N.ma,te=B.ba.S,ie=11>te,he=te==Ho||te==Sl||te==ru||te==sn||te==12||St(te);if(B.memory=null,B.Ib=null,B.Jb=null,B.Nd=null,!Gi(B.Oa,N,he?11:12))return 0;if(he&&St(te)&&Iu(),N.da)alert("todo:use_scaling");else{if(ie){if(B.Ib=Oi,N.Kb){if(te=N.U+1>>1,B.memory=a(N.U+2*te),B.memory==null)return 0;B.ec=B.memory,B.fc=0,B.cc=B.ec,B.dc=B.fc+N.U,B.Mc=B.cc,B.Nc=B.dc+te,B.Ib=Zn,Iu()}}else alert("todo:EmitYUV");he&&(B.Jb=gi,ie&&pl())}if(ie&&!Mi){for(N=0;256>N;++N)ha[N]=89858*(N-128)+Po>>ss,da[N]=-22014*(N-128)+Po,Pl[N]=-45773*(N-128),rl[N]=113618*(N-128)+Po>>ss;for(N=Yr;N<tn;++N)B=76283*(N-16)+Po>>ss,lu[N-Yr]=si(B,255),pf[N-Yr]=si(B+8>>4,15);Mi=1}return 1}function Yt(N){var B=N.ma,te=N.U,ie=N.T;return t(!(1&N.ka)),0>=te||0>=ie?0:(te=B.Ib(N,B),B.Jb!=null&&B.Jb(N,B,te),B.Dc+=te,1)}function sa(N){N.ma.memory=null}function Ra(N,B,te,ie){return D(N,8)!=47?0:(B[0]=D(N,14)+1,te[0]=D(N,14)+1,ie[0]=D(N,1),D(N,3)!=0?0:!N.h)}function Un(N,B){if(4>N)return N+1;var te=N-2>>1;return(2+(1&N)<<te)+D(B,te)+1}function Ui(N,B){return 120<B?B-120:1<=(te=((te=Kf[B-1])>>4)*N+(8-(15&te)))?te:1;var te}function Rr(N,B,te){var ie=Z(te),he=N[B+=255&ie].g-8;return 0<he&&(W(te,te.u+8),ie=Z(te),B+=N[B].value,B+=ie&(1<<he)-1),W(te,te.u+N[B].g),N[B].value}function yn(N,B,te){return te.g+=N.g,te.value+=N.value<<B>>>0,t(8>=te.g),N.g}function An(N,B,te){var ie=N.xc;return t((B=ie==0?0:N.vc[N.md*(te>>ie)+(B>>ie)])<N.Wb),N.Ya[B]}function ba(N,B,te,ie){var he=N.ab,ve=N.c*B,me=N.C;B=me+B;var we=te,Se=ie;for(ie=N.Ta,te=N.Ua;0<he--;){var Oe=N.gc[he],De=me,Ze=B,ke=we,qe=Se,Ke=(Se=ie,we=te,Oe.Ea);switch(t(De<Ze),t(Ze<=Oe.nc),Oe.hc){case 2:ml(ke,qe,(Ze-De)*Ke,Se,we);break;case 0:var it=De,Ye=Ze,nt=Se,Ue=we,ot=(It=Oe).Ea;it==0&&(ka(ke,qe,null,null,1,nt,Ue),pt(ke,qe+1,0,0,ot-1,nt,Ue+1),qe+=ot,Ue+=ot,++it);for(var ut=1<<It.b,qt=ut-1,Mt=_e(ot,It.b),ar=It.K,It=It.w+(it>>It.b)*Mt;it<Ye;){var _r=ar,Rn=It,fr=1;for(Wi(ke,qe,nt,Ue-ot,1,nt,Ue);fr<ot;){var Tt=(fr&~qt)+ut;Tt>ot&&(Tt=ot),(0,Ti[_r[Rn++]>>8&15])(ke,qe+ +fr,nt,Ue+fr-ot,Tt-fr,nt,Ue+fr),fr=Tt}qe+=ot,Ue+=ot,++it&qt||(It+=Mt)}Ze!=Oe.nc&&n(Se,we-Ke,Se,we+(Ze-De-1)*Ke,Ke);break;case 1:for(Ke=ke,Ye=qe,ot=(ke=Oe.Ea)-(Ue=ke&~(nt=(qe=1<<Oe.b)-1)),it=_e(ke,Oe.b),ut=Oe.K,Oe=Oe.w+(De>>Oe.b)*it;De<Ze;){for(qt=ut,Mt=Oe,ar=new pe,It=Ye+Ue,_r=Ye+ke;Ye<It;)bt(qt[Mt++],ar),xo(ar,Ke,Ye,qe,Se,we),Ye+=qe,we+=qe;Ye<_r&&(bt(qt[Mt++],ar),xo(ar,Ke,Ye,ot,Se,we),Ye+=ot,we+=ot),++De&nt||(Oe+=it)}break;case 3:if(ke==Se&&qe==we&&0<Oe.b){for(Ye=Se,ke=Ke=we+(Ze-De)*Ke-(Ue=(Ze-De)*_e(Oe.Ea,Oe.b)),qe=Se,nt=we,it=[],Ue=(ot=Ue)-1;0<=Ue;--Ue)it[Ue]=qe[nt+Ue];for(Ue=ot-1;0<=Ue;--Ue)Ye[ke+Ue]=it[Ue];_o(Oe,De,Ze,Se,Ke,Se,we)}else _o(Oe,De,Ze,ke,qe,Se,we)}we=ie,Se=te}Se!=te&&n(ie,te,we,Se,ve)}function Mo(N,B){var te=N.V,ie=N.Ba+N.c*N.C,he=B-N.C;if(t(B<=N.l.o),t(16>=he),0<he){var ve=N.l,me=N.Ta,we=N.Ua,Se=ve.width;if(ba(N,he,te,ie),he=we=[we],t((te=N.C)<(ie=B)),t(ve.v<ve.va),ie>ve.o&&(ie=ve.o),te<ve.j){var Oe=ve.j-te;te=ve.j,he[0]+=Oe*Se}if(te>=ie?te=0:(he[0]+=4*ve.v,ve.ka=te-ve.j,ve.U=ve.va-ve.v,ve.T=ie-te,te=1),te){if(we=we[0],11>(te=N.ca).S){var De=te.f.RGBA,Ze=(ie=te.S,he=ve.U,ve=ve.T,Oe=De.eb,De.A),ke=ve;for(De=De.fb+N.Ma*De.A;0<ke--;){var qe=me,Ke=we,it=he,Ye=Oe,nt=De;switch(ie){case xl:zo(qe,Ke,it,Ye,nt);break;case Ho:Oa(qe,Ke,it,Ye,nt);break;case El:Oa(qe,Ke,it,Ye,nt),Uo(Ye,nt,0,it,1,0);break;case ff:en(qe,Ke,it,Ye,nt);break;case Sl:ze(qe,Ke,it,Ye,nt,1);break;case Ts:ze(qe,Ke,it,Ye,nt,1),Uo(Ye,nt,0,it,1,0);break;case ru:ze(qe,Ke,it,Ye,nt,0);break;case nu:ze(qe,Ke,it,Ye,nt,0),Uo(Ye,nt,1,it,1,0);break;case sn:So(qe,Ke,it,Ye,nt);break;case iu:So(qe,Ke,it,Ye,nt),ju(Ye,nt,it,1,0);break;case Du:tr(qe,Ke,it,Ye,nt);break;default:t(0)}we+=Se,De+=Ze}N.Ma+=ve}else alert("todo:EmitRescaledRowsYUVA");t(N.Ma<=te.height)}}N.C=B,t(N.C<=N.i)}function wa(N){var B;if(0<N.ua)return 0;for(B=0;B<N.Wb;++B){var te=N.Ya[B].G,ie=N.Ya[B].H;if(0<te[1][ie[1]+0].g||0<te[2][ie[2]+0].g||0<te[3][ie[3]+0].g)return 0}return 1}function Ya(N,B,te,ie,he,ve){if(N.Z!=0){var me=N.qd,we=N.rd;for(t(Qi[N.Z]!=null);B<te;++B)Qi[N.Z](me,we,ie,he,ie,he,ve),me=ie,we=he,he+=ve;N.qd=me,N.rd=we}}function Qn(N,B){var te=N.l.ma,ie=te.Z==0||te.Z==1?N.l.j:N.C;if(ie=N.C<ie?ie:N.C,t(B<=N.l.o),B>ie){var he=N.l.width,ve=te.ca,me=te.tb+he*ie,we=N.V,Se=N.Ba+N.c*ie,Oe=N.gc;t(N.ab==1),t(Oe[0].hc==3),Bo(Oe[0],ie,B,we,Se,ve,me),Ya(te,ie,B,ve,me,he)}N.C=N.Ma=B}function _a(N,B,te,ie,he,ve,me){var we=N.$/ie,Se=N.$%ie,Oe=N.m,De=N.s,Ze=te+N.$,ke=Ze;he=te+ie*he;var qe=te+ie*ve,Ke=280+De.ua,it=N.Pb?we:16777216,Ye=0<De.ua?De.Wa:null,nt=De.wc,Ue=Ze<qe?An(De,Se,we):null;t(N.C<ve),t(qe<=he);var ot=!1;e:for(;;){for(;ot||Ze<qe;){var ut=0;if(we>=it){var qt=Ze-te;t((it=N).Pb),it.wd=it.m,it.xd=qt,0<it.s.ua&&Te(it.s.Wa,it.s.vb),it=we+Bu}if(Se&nt||(Ue=An(De,Se,we)),t(Ue!=null),Ue.Qb&&(B[Ze]=Ue.qb,ot=!0),!ot)if(Q(Oe),Ue.jc){ut=Oe,qt=B;var Mt=Ze,ar=Ue.pd[Z(ut)&Vn-1];t(Ue.jc),256>ar.g?(W(ut,ut.u+ar.g),qt[Mt]=ar.value,ut=0):(W(ut,ut.u+ar.g-256),t(256<=ar.value),ut=ar.value),ut==0&&(ot=!0)}else ut=Rr(Ue.G[0],Ue.H[0],Oe);if(Oe.h)break;if(ot||256>ut){if(!ot)if(Ue.nd)B[Ze]=(Ue.qb|ut<<8)>>>0;else{if(Q(Oe),ot=Rr(Ue.G[1],Ue.H[1],Oe),Q(Oe),qt=Rr(Ue.G[2],Ue.H[2],Oe),Mt=Rr(Ue.G[3],Ue.H[3],Oe),Oe.h)break;B[Ze]=(Mt<<24|ot<<16|ut<<8|qt)>>>0}if(ot=!1,++Ze,++Se>=ie&&(Se=0,++we,me!=null&&we<=ve&&!(we%16)&&me(N,we),Ye!=null))for(;ke<Ze;)ut=B[ke++],Ye.X[(506832829*ut&4294967295)>>>Ye.Mb]=ut}else if(280>ut){if(ut=Un(ut-256,Oe),qt=Rr(Ue.G[4],Ue.H[4],Oe),Q(Oe),qt=Ui(ie,qt=Un(qt,Oe)),Oe.h)break;if(Ze-te<qt||he-Ze<ut)break e;for(Mt=0;Mt<ut;++Mt)B[Ze+Mt]=B[Ze+Mt-qt];for(Ze+=ut,Se+=ut;Se>=ie;)Se-=ie,++we,me!=null&&we<=ve&&!(we%16)&&me(N,we);if(t(Ze<=he),Se&nt&&(Ue=An(De,Se,we)),Ye!=null)for(;ke<Ze;)ut=B[ke++],Ye.X[(506832829*ut&4294967295)>>>Ye.Mb]=ut}else{if(!(ut<Ke))break e;for(ot=ut-280,t(Ye!=null);ke<Ze;)ut=B[ke++],Ye.X[(506832829*ut&4294967295)>>>Ye.Mb]=ut;ut=Ze,t(!(ot>>>(qt=Ye).Xa)),B[ut]=qt.X[ot],ot=!0}ot||t(Oe.h==re(Oe))}if(N.Pb&&Oe.h&&Ze<he)t(N.m.h),N.a=5,N.m=N.wd,N.$=N.xd,0<N.s.ua&&Te(N.s.vb,N.s.Wa);else{if(Oe.h)break e;me?.(N,we>ve?ve:we),N.a=0,N.$=Ze-te}return 1}return N.a=3,0}function xa(N){t(N!=null),N.vc=null,N.yc=null,N.Ya=null;var B=N.Wa;B!=null&&(B.X=null),N.vb=null,t(N!=null)}function Io(){var N=new Mr;return N==null?null:(N.a=0,N.xb=ou,kt("Predictor","VP8LPredictors"),kt("Predictor","VP8LPredictors_C"),kt("PredictorAdd","VP8LPredictorsAdd"),kt("PredictorAdd","VP8LPredictorsAdd_C"),ml=ct,xo=ht,zo=wr,Oa=cr,So=Pt,tr=$t,en=$e,R.VP8LMapColor32b=Yi,R.VP8LMapColor8b=za,N)}function Ci(N,B,te,ie,he){var ve=1,me=[N],we=[B],Se=ie.m,Oe=ie.s,De=null,Ze=0;e:for(;;){if(te)for(;ve&&D(Se,1);){var ke=me,qe=we,Ke=ie,it=1,Ye=Ke.m,nt=Ke.gc[Ke.ab],Ue=D(Ye,2);if(Ke.Oc&1<<Ue)ve=0;else{switch(Ke.Oc|=1<<Ue,nt.hc=Ue,nt.Ea=ke[0],nt.nc=qe[0],nt.K=[null],++Ke.ab,t(4>=Ke.ab),Ue){case 0:case 1:nt.b=D(Ye,3)+2,it=Ci(_e(nt.Ea,nt.b),_e(nt.nc,nt.b),0,Ke,nt.K),nt.K=nt.K[0];break;case 3:var ot,ut=D(Ye,8)+1,qt=16<ut?0:4<ut?1:2<ut?2:3;if(ke[0]=_e(nt.Ea,qt),nt.b=qt,ot=it=Ci(ut,1,0,Ke,nt.K)){var Mt,ar=ut,It=nt,_r=1<<(8>>It.b),Rn=a(_r);if(Rn==null)ot=0;else{var fr=It.K[0],Tt=It.w;for(Rn[0]=It.K[0][0],Mt=1;Mt<1*ar;++Mt)Rn[Mt]=xe(fr[Tt+Mt],Rn[Mt-1]);for(;Mt<4*_r;++Mt)Rn[Mt]=0;It.K[0]=null,It.K[0]=Rn,ot=1}}it=ot;break;case 2:break;default:t(0)}ve=it}}if(me=me[0],we=we[0],ve&&D(Se,1)&&!(ve=1<=(Ze=D(Se,4))&&11>=Ze)){ie.a=3;break e}var _t;if(_t=ve)t:{var Mn,Dt,or,kr=ie,fi=me,ni=we,Ir=Ze,hi=te,hn=kr.m,On=kr.s,Sr=[null],Dr=1,wn=0,Br=hf[Ir];r:for(;;){if(hi&&D(hn,1)){var _n=D(hn,3)+2,xn=_e(fi,_n),Xr=_e(ni,_n),xi=xn*Xr;if(!Ci(xn,Xr,0,kr,Sr))break r;for(Sr=Sr[0],On.xc=_n,Mn=0;Mn<xi;++Mn){var Vr=Sr[Mn]>>8&65535;Sr[Mn]=Vr,Vr>=Dr&&(Dr=Vr+1)}}if(hn.h)break r;for(Dt=0;5>Dt;++Dt){var Gr=tl[Dt];!Dt&&0<Ir&&(Gr+=1<<Ir),wn<Gr&&(wn=Gr)}var $n=l(Dr*Br,q),Si=Dr,pa=l(Si,J);if(pa==null)var Wn=null;else t(65536>=Si),Wn=pa;var In=a(wn);if(Wn==null||In==null||$n==null){kr.a=1;break r}var ga=$n;for(Mn=or=0;Mn<Dr;++Mn){var Kr=Wn[Mn],Ii=Kr.G,zr=Kr.H,rr=0,Or=1,yr=0;for(Dt=0;5>Dt;++Dt){Gr=tl[Dt],Ii[Dt]=ga,zr[Dt]=or,!Dt&&0<Ir&&(Gr+=1<<Ir);i:{var Cn,ii=Gr,Vo=kr,ln=In,uu=ga,Is=or,un=0,io=Vo.m,Ol=D(io,1);if(i(ln,0,0,ii),Ol){var va=D(io,1)+1,cu=D(io,1),fu=D(io,cu==0?1:8);ln[fu]=1,va==2&&(ln[fu=D(io,8)]=1);var Fi=1}else{var rn=a(19),Fn=D(io,4)+4;if(19<Fn){Vo.a=3;var jn=0;break i}for(Cn=0;Cn<Fn;++Cn)rn[Hh[Cn]]=D(io,3);var ao=void 0,ko=void 0,oo=Vo,Ac=rn,Dn=ii,hu=ln,nl=0,so=oo.m,gn=8,di=l(128,q);n:for(;C(di,0,7,Ac,19);){if(D(so,1)){var ma=2+2*D(so,3);if((ao=2+D(so,ma))>Dn)break n}else ao=Dn;for(ko=0;ko<Dn&&ao--;){Q(so);var Ji=di[0+(127&Z(so))];W(so,so.u+Ji.g);var Fs=Ji.value;if(16>Fs)hu[ko++]=Fs,Fs!=0&&(gn=Fs);else{var Pc=Fs==16,Hu=Fs-16,rh=_c[Hu],fs=D(so,au[Hu])+rh;if(ko+fs>Dn)break n;for(var gf=Pc?gn:0;0<fs--;)hu[ko++]=gf}}nl=1;break n}nl||(oo.a=3),Fi=nl}(Fi=Fi&&!io.h)&&(un=C(uu,Is,8,ln,ii)),Fi&&un!=0?jn=un:(Vo.a=3,jn=0)}if(jn==0)break r;if(Or&&Xf[Dt]==1&&(Or=ga[or].g==0),rr+=ga[or].g,or+=jn,3>=Dt){var Cl,du=In[0];for(Cl=1;Cl<Gr;++Cl)In[Cl]>du&&(du=In[Cl]);yr+=du}}if(Kr.nd=Or,Kr.Qb=0,Or&&(Kr.qb=(Ii[3][zr[3]+0].value<<24|Ii[1][zr[1]+0].value<<16|Ii[2][zr[2]+0].value)>>>0,rr==0&&256>Ii[0][zr[0]+0].value&&(Kr.Qb=1,Kr.qb+=Ii[0][zr[0]+0].value<<8)),Kr.jc=!Kr.Qb&&6>yr,Kr.jc){var Go,qa=Kr;for(Go=0;Go<Vn;++Go){var hs=Go,lo=qa.pd[hs],ds=qa.G[0][qa.H[0]+hs];256<=ds.value?(lo.g=ds.g+256,lo.value=ds.value):(lo.g=0,lo.value=0,hs>>=yn(ds,8,lo),hs>>=yn(qa.G[1][qa.H[1]+hs],16,lo),hs>>=yn(qa.G[2][qa.H[2]+hs],0,lo),yn(qa.G[3][qa.H[3]+hs],24,lo))}}}On.vc=Sr,On.Wb=Dr,On.Ya=Wn,On.yc=$n,_t=1;break t}_t=0}if(!(ve=_t)){ie.a=3;break e}if(0<Ze){if(Oe.ua=1<<Ze,!de(Oe.Wa,Ze)){ie.a=1,ve=0;break e}}else Oe.ua=0;var kc=ie,Oc=me,vf=we,Vu=kc.s,ps=Vu.xc;if(kc.c=Oc,kc.i=vf,Vu.md=_e(Oc,ps),Vu.wc=ps==0?-1:(1<<ps)-1,te){ie.xb=Ao;break e}if((De=a(me*we))==null){ie.a=1,ve=0;break e}ve=(ve=_a(ie,De,0,me,we,we,null))&&!Se.h;break e}return ve?(he!=null?he[0]=De:(t(De==null),t(te)),ie.$=0,te||xa(Oe)):xa(Oe),ve}function Xa(N,B){var te=N.c*N.i,ie=te+B+16*B;return t(N.c<=B),N.V=a(ie),N.V==null?(N.Ta=null,N.Ua=0,N.a=1,0):(N.Ta=N.V,N.Ua=N.Ba+te+B,1)}function Ps(N,B){var te=N.C,ie=B-te,he=N.V,ve=N.Ba+N.c*te;for(t(B<=N.l.o);0<ie;){var me=16<ie?16:ie,we=N.l.ma,Se=N.l.width,Oe=Se*me,De=we.ca,Ze=we.tb+Se*te,ke=N.Ta,qe=N.Ua;ba(N,me,he,ve),gc(ke,qe,De,Ze,Oe),Ya(we,te,te+me,De,Ze,Se),ie-=me,he+=me*N.c,te+=me}t(te==B),N.C=N.Ma=B}function Ko(){this.ub=this.yd=this.td=this.Rb=0}function Vl(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function cf(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function bn(){this.Yb=function(){var N=[];return function B(te,ie,he){for(var ve=he[ie],me=0;me<ve&&(te.push(he.length>ie+1?[]:0),!(he.length<ie+1));me++)B(te[me],ie+1,he)}(N,0,[3,11]),N}()}function Gl(){this.jb=a(3),this.Wc=o([4,8],bn),this.Xc=o([4,17],bn)}function Zo(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Sa(){this.ld=this.La=this.dd=this.tc=0}function Qo(){this.Na=this.la=0}function cc(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function $s(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function po(){this.uc=this.M=this.Nb=0,this.wa=Array(new Sa),this.Y=0,this.ya=Array(new $s),this.aa=0,this.l=new mr}function oi(){this.y=a(16),this.f=a(8),this.ea=a(8)}function an(){this.cb=this.a=0,this.sc="",this.m=new j,this.Od=new Ko,this.Kc=new Vl,this.ed=new Zo,this.Qa=new cf,this.Ic=this.$c=this.Aa=0,this.D=new po,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=l(8,j),this.ia=0,this.pb=l(4,cc),this.Pa=new Gl,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new oi),this.Hd=0,this.rb=Array(new Qo),this.sb=0,this.wa=Array(new Sa),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new $s),this.L=this.aa=0,this.gd=o([4,2],Sa),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function mr(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Jo(){var N=new an;return N!=null&&(N.a=0,N.sc="OK",N.cb=0,N.Xb=0,Al||(Al=Hi)),N}function Er(N,B,te){return N.a==0&&(N.a=B,N.sc=te,N.cb=0),0}function qi(N,B,te){return 3<=te&&N[B+0]==157&&N[B+1]==1&&N[B+2]==42}function Ka(N,B){if(N==null)return 0;if(N.a=0,N.sc="OK",B==null)return Er(N,2,"null VP8Io passed to VP8GetHeaders()");var te=B.data,ie=B.w,he=B.ha;if(4>he)return Er(N,7,"Truncated header.");var ve=te[ie+0]|te[ie+1]<<8|te[ie+2]<<16,me=N.Od;if(me.Rb=!(1&ve),me.td=ve>>1&7,me.yd=ve>>4&1,me.ub=ve>>5,3<me.td)return Er(N,3,"Incorrect keyframe parameters.");if(!me.yd)return Er(N,4,"Frame not displayable.");ie+=3,he-=3;var we=N.Kc;if(me.Rb){if(7>he)return Er(N,7,"cannot parse picture header");if(!qi(te,ie,he))return Er(N,3,"Bad code word");we.c=16383&(te[ie+4]<<8|te[ie+3]),we.Td=te[ie+4]>>6,we.i=16383&(te[ie+6]<<8|te[ie+5]),we.Ud=te[ie+6]>>6,ie+=7,he-=7,N.za=we.c+15>>4,N.Ub=we.i+15>>4,B.width=we.c,B.height=we.i,B.Da=0,B.j=0,B.v=0,B.va=B.width,B.o=B.height,B.da=0,B.ib=B.width,B.hb=B.height,B.U=B.width,B.T=B.height,i((ve=N.Pa).jb,0,255,ve.jb.length),t((ve=N.Qa)!=null),ve.Cb=0,ve.Bb=0,ve.Fb=1,i(ve.Zb,0,0,ve.Zb.length),i(ve.Lb,0,0,ve.Lb)}if(me.ub>he)return Er(N,7,"bad partition length");ae(ve=N.m,te,ie,me.ub),ie+=me.ub,he-=me.ub,me.Rb&&(we.Ld=ue(ve),we.Kd=ue(ve)),we=N.Qa;var Se,Oe=N.Pa;if(t(ve!=null),t(we!=null),we.Cb=ue(ve),we.Cb){if(we.Bb=ue(ve),ue(ve)){for(we.Fb=ue(ve),Se=0;4>Se;++Se)we.Zb[Se]=ue(ve)?V(ve,7):0;for(Se=0;4>Se;++Se)we.Lb[Se]=ue(ve)?V(ve,6):0}if(we.Bb)for(Se=0;3>Se;++Se)Oe.jb[Se]=ue(ve)?H(ve,8):255}else we.Bb=0;if(ve.Ka)return Er(N,3,"cannot parse segment header");if((we=N.ed).zd=ue(ve),we.Tb=H(ve,6),we.wb=H(ve,3),we.Pc=ue(ve),we.Pc&&ue(ve)){for(Oe=0;4>Oe;++Oe)ue(ve)&&(we.vd[Oe]=V(ve,6));for(Oe=0;4>Oe;++Oe)ue(ve)&&(we.od[Oe]=V(ve,6))}if(N.L=we.Tb==0?0:we.zd?1:2,ve.Ka)return Er(N,3,"cannot parse filter header");var De=he;if(he=Se=ie,ie=Se+De,we=De,N.Xb=(1<<H(N.m,2))-1,De<3*(Oe=N.Xb))te=7;else{for(Se+=3*Oe,we-=3*Oe,De=0;De<Oe;++De){var Ze=te[he+0]|te[he+1]<<8|te[he+2]<<16;Ze>we&&(Ze=we),ae(N.Jc[+De],te,Se,Ze),Se+=Ze,we-=Ze,he+=3}ae(N.Jc[+Oe],te,Se,we),te=Se<ie?0:5}if(te!=0)return Er(N,te,"cannot parse partitions");for(te=H(Se=N.m,7),he=ue(Se)?V(Se,4):0,ie=ue(Se)?V(Se,4):0,we=ue(Se)?V(Se,4):0,Oe=ue(Se)?V(Se,4):0,Se=ue(Se)?V(Se,4):0,De=N.Qa,Ze=0;4>Ze;++Ze){if(De.Cb){var ke=De.Zb[Ze];De.Fb||(ke+=te)}else{if(0<Ze){N.pb[Ze]=N.pb[0];continue}ke=te}var qe=N.pb[Ze];qe.Sc[0]=Rs[si(ke+he,127)],qe.Sc[1]=zu[si(ke+0,127)],qe.Eb[0]=2*Rs[si(ke+ie,127)],qe.Eb[1]=101581*zu[si(ke+we,127)]>>16,8>qe.Eb[1]&&(qe.Eb[1]=8),qe.Qc[0]=Rs[si(ke+Oe,117)],qe.Qc[1]=zu[si(ke+Se,127)],qe.lc=ke+Se}if(!me.Rb)return Er(N,4,"Not a key frame.");for(ue(ve),me=N.Pa,te=0;4>te;++te){for(he=0;8>he;++he)for(ie=0;3>ie;++ie)for(we=0;11>we;++we)Oe=le(ve,Qf[te][he][ie][we])?H(ve,8):Uu[te][he][ie][we],me.Wc[te][he].Yb[ie][we]=Oe;for(he=0;17>he;++he)me.Xc[te][he]=me.Wc[te][Sc[he]]}return N.kc=ue(ve),N.kc&&(N.Bd=H(ve,8)),N.cb=1}function Hi(N,B,te,ie,he,ve,me){var we=B[he].Yb[te];for(te=0;16>he;++he){if(!le(N,we[te+0]))return he;for(;!le(N,we[te+1]);)if(we=B[++he].Yb[0],te=0,he==16)return 16;var Se=B[he+1].Yb;if(le(N,we[te+2])){var Oe=N,De=0;if(le(Oe,(ke=we)[(Ze=te)+3]))if(le(Oe,ke[Ze+6])){for(we=0,Ze=2*(De=le(Oe,ke[Ze+8]))+(ke=le(Oe,ke[Ze+9+De])),De=0,ke=df[Ze];ke[we];++we)De+=De+le(Oe,ke[we]);De+=3+(8<<Ze)}else le(Oe,ke[Ze+7])?(De=7+2*le(Oe,165),De+=le(Oe,145)):De=5+le(Oe,159);else De=le(Oe,ke[Ze+4])?3+le(Oe,ke[Ze+5]):2;we=Se[2]}else De=1,we=Se[1];Se=me+no[he],0>(Oe=N).b&&se(Oe);var Ze,ke=Oe.b,qe=(Ze=Oe.Ca>>1)-(Oe.I>>ke)>>31;--Oe.b,Oe.Ca+=qe,Oe.Ca|=1,Oe.I-=(Ze+1&qe)<<ke,ve[Se]=((De^qe)-qe)*ie[(0<he)+0]}return 16}function Pn(N){var B=N.rb[N.sb-1];B.la=0,B.Na=0,i(N.zc,0,0,N.zc.length),N.ja=0}function Vi(N,B,te,ie,he){he=N[B+te+32*ie]+(he>>3),N[B+te+32*ie]=-256&he?0>he?0:255:he}function Ws(N,B,te,ie,he,ve){Vi(N,B,0,te,ie+he),Vi(N,B,1,te,ie+ve),Vi(N,B,2,te,ie-ve),Vi(N,B,3,te,ie-he)}function qn(N){return(20091*N>>16)+N}function es(N,B,te,ie){var he,ve=0,me=a(16);for(he=0;4>he;++he){var we=N[B+0]+N[B+8],Se=N[B+0]-N[B+8],Oe=(35468*N[B+4]>>16)-qn(N[B+12]),De=qn(N[B+4])+(35468*N[B+12]>>16);me[ve+0]=we+De,me[ve+1]=Se+Oe,me[ve+2]=Se-Oe,me[ve+3]=we-De,ve+=4,B++}for(he=ve=0;4>he;++he)we=(N=me[ve+0]+4)+me[ve+8],Se=N-me[ve+8],Oe=(35468*me[ve+4]>>16)-qn(me[ve+12]),Vi(te,ie,0,0,we+(De=qn(me[ve+4])+(35468*me[ve+12]>>16))),Vi(te,ie,1,0,Se+Oe),Vi(te,ie,2,0,Se-Oe),Vi(te,ie,3,0,we-De),ve++,ie+=32}function Ru(N,B,te,ie){var he=N[B+0]+4,ve=35468*N[B+4]>>16,me=qn(N[B+4]),we=35468*N[B+1]>>16;Ws(te,ie,0,he+me,N=qn(N[B+1]),we),Ws(te,ie,1,he+ve,N,we),Ws(te,ie,2,he-ve,N,we),Ws(te,ie,3,he-me,N,we)}function Ea(N,B,te,ie,he){es(N,B,te,ie),he&&es(N,B+16,te,ie+4)}function hl(N,B,te,ie){Tn(N,B+0,te,ie,1),Tn(N,B+32,te,ie+128,1)}function ts(N,B,te,ie){var he;for(N=N[B+0]+4,he=0;4>he;++he)for(B=0;4>B;++B)Vi(te,ie,B,he,N)}function $l(N,B,te,ie){N[B+0]&&Xi(N,B+0,te,ie),N[B+16]&&Xi(N,B+16,te,ie+4),N[B+32]&&Xi(N,B+32,te,ie+128),N[B+48]&&Xi(N,B+48,te,ie+128+4)}function Ar(N,B,te,ie){var he,ve=a(16);for(he=0;4>he;++he){var me=N[B+0+he]+N[B+12+he],we=N[B+4+he]+N[B+8+he],Se=N[B+4+he]-N[B+8+he],Oe=N[B+0+he]-N[B+12+he];ve[0+he]=me+we,ve[8+he]=me-we,ve[4+he]=Oe+Se,ve[12+he]=Oe-Se}for(he=0;4>he;++he)me=(N=ve[0+4*he]+3)+ve[3+4*he],we=ve[1+4*he]+ve[2+4*he],Se=ve[1+4*he]-ve[2+4*he],Oe=N-ve[3+4*he],te[ie+0]=me+we>>3,te[ie+16]=Oe+Se>>3,te[ie+32]=me-we>>3,te[ie+48]=Oe-Se>>3,ie+=64}function go(N,B,te){var ie,he=B-32,ve=wi,me=255-N[he-1];for(ie=0;ie<te;++ie){var we,Se=ve,Oe=me+N[B-1];for(we=0;we<te;++we)N[B+we]=Se[Oe+N[he+we]];B+=32}}function rs(N,B){go(N,B,4)}function Ys(N,B){go(N,B,8)}function fc(N,B){go(N,B,16)}function hc(N,B){var te;for(te=0;16>te;++te)n(N,B+32*te,N,B-32,16)}function Xs(N,B){var te;for(te=16;0<te;--te)i(N,B,N[B-1],16),B+=32}function ns(N,B,te){var ie;for(ie=0;16>ie;++ie)i(B,te+32*ie,N,16)}function Za(N,B){var te,ie=16;for(te=0;16>te;++te)ie+=N[B-1+32*te]+N[B+te-32];ns(ie>>5,N,B)}function Ma(N,B){var te,ie=8;for(te=0;16>te;++te)ie+=N[B-1+32*te];ns(ie>>4,N,B)}function Ia(N,B){var te,ie=8;for(te=0;16>te;++te)ie+=N[B+te-32];ns(ie>>4,N,B)}function Fa(N,B){ns(128,N,B)}function xt(N,B,te){return N+2*B+te+2>>2}function Ks(N,B){var te,ie=B-32;for(ie=new Uint8Array([xt(N[ie-1],N[ie+0],N[ie+1]),xt(N[ie+0],N[ie+1],N[ie+2]),xt(N[ie+1],N[ie+2],N[ie+3]),xt(N[ie+2],N[ie+3],N[ie+4])]),te=0;4>te;++te)n(N,B+32*te,ie,0,ie.length)}function vo(N,B){var te=N[B-1],ie=N[B-1+32],he=N[B-1+64],ve=N[B-1+96];ye(N,B+0,16843009*xt(N[B-1-32],te,ie)),ye(N,B+32,16843009*xt(te,ie,he)),ye(N,B+64,16843009*xt(ie,he,ve)),ye(N,B+96,16843009*xt(he,ve,ve))}function dc(N,B){var te,ie=4;for(te=0;4>te;++te)ie+=N[B+te-32]+N[B-1+32*te];for(ie>>=3,te=0;4>te;++te)i(N,B+32*te,ie,4)}function pc(N,B){var te=N[B-1+0],ie=N[B-1+32],he=N[B-1+64],ve=N[B-1-32],me=N[B+0-32],we=N[B+1-32],Se=N[B+2-32],Oe=N[B+3-32];N[B+0+96]=xt(ie,he,N[B-1+96]),N[B+1+96]=N[B+0+64]=xt(te,ie,he),N[B+2+96]=N[B+1+64]=N[B+0+32]=xt(ve,te,ie),N[B+3+96]=N[B+2+64]=N[B+1+32]=N[B+0+0]=xt(me,ve,te),N[B+3+64]=N[B+2+32]=N[B+1+0]=xt(we,me,ve),N[B+3+32]=N[B+2+0]=xt(Se,we,me),N[B+3+0]=xt(Oe,Se,we)}function Qa(N,B){var te=N[B+1-32],ie=N[B+2-32],he=N[B+3-32],ve=N[B+4-32],me=N[B+5-32],we=N[B+6-32],Se=N[B+7-32];N[B+0+0]=xt(N[B+0-32],te,ie),N[B+1+0]=N[B+0+32]=xt(te,ie,he),N[B+2+0]=N[B+1+32]=N[B+0+64]=xt(ie,he,ve),N[B+3+0]=N[B+2+32]=N[B+1+64]=N[B+0+96]=xt(he,ve,me),N[B+3+32]=N[B+2+64]=N[B+1+96]=xt(ve,me,we),N[B+3+64]=N[B+2+96]=xt(me,we,Se),N[B+3+96]=xt(we,Se,Se)}function pn(N,B){var te=N[B-1+0],ie=N[B-1+32],he=N[B-1+64],ve=N[B-1-32],me=N[B+0-32],we=N[B+1-32],Se=N[B+2-32],Oe=N[B+3-32];N[B+0+0]=N[B+1+64]=ve+me+1>>1,N[B+1+0]=N[B+2+64]=me+we+1>>1,N[B+2+0]=N[B+3+64]=we+Se+1>>1,N[B+3+0]=Se+Oe+1>>1,N[B+0+96]=xt(he,ie,te),N[B+0+64]=xt(ie,te,ve),N[B+0+32]=N[B+1+96]=xt(te,ve,me),N[B+1+32]=N[B+2+96]=xt(ve,me,we),N[B+2+32]=N[B+3+96]=xt(me,we,Se),N[B+3+32]=xt(we,Se,Oe)}function Wl(N,B){var te=N[B+0-32],ie=N[B+1-32],he=N[B+2-32],ve=N[B+3-32],me=N[B+4-32],we=N[B+5-32],Se=N[B+6-32],Oe=N[B+7-32];N[B+0+0]=te+ie+1>>1,N[B+1+0]=N[B+0+64]=ie+he+1>>1,N[B+2+0]=N[B+1+64]=he+ve+1>>1,N[B+3+0]=N[B+2+64]=ve+me+1>>1,N[B+0+32]=xt(te,ie,he),N[B+1+32]=N[B+0+96]=xt(ie,he,ve),N[B+2+32]=N[B+1+96]=xt(he,ve,me),N[B+3+32]=N[B+2+96]=xt(ve,me,we),N[B+3+64]=xt(me,we,Se),N[B+3+96]=xt(we,Se,Oe)}function Yl(N,B){var te=N[B-1+0],ie=N[B-1+32],he=N[B-1+64],ve=N[B-1+96];N[B+0+0]=te+ie+1>>1,N[B+2+0]=N[B+0+32]=ie+he+1>>1,N[B+2+32]=N[B+0+64]=he+ve+1>>1,N[B+1+0]=xt(te,ie,he),N[B+3+0]=N[B+1+32]=xt(ie,he,ve),N[B+3+32]=N[B+1+64]=xt(he,ve,ve),N[B+3+64]=N[B+2+64]=N[B+0+96]=N[B+1+96]=N[B+2+96]=N[B+3+96]=ve}function ks(N,B){var te=N[B-1+0],ie=N[B-1+32],he=N[B-1+64],ve=N[B-1+96],me=N[B-1-32],we=N[B+0-32],Se=N[B+1-32],Oe=N[B+2-32];N[B+0+0]=N[B+2+32]=te+me+1>>1,N[B+0+32]=N[B+2+64]=ie+te+1>>1,N[B+0+64]=N[B+2+96]=he+ie+1>>1,N[B+0+96]=ve+he+1>>1,N[B+3+0]=xt(we,Se,Oe),N[B+2+0]=xt(me,we,Se),N[B+1+0]=N[B+3+32]=xt(te,me,we),N[B+1+32]=N[B+3+64]=xt(ie,te,me),N[B+1+64]=N[B+3+96]=xt(he,ie,te),N[B+1+96]=xt(ve,he,ie)}function Mu(N,B){var te;for(te=0;8>te;++te)n(N,B+32*te,N,B-32,8)}function ja(N,B){var te;for(te=0;8>te;++te)i(N,B,N[B-1],8),B+=32}function vi(N,B,te){var ie;for(ie=0;8>ie;++ie)i(B,te+32*ie,N,8)}function Fo(N,B){var te,ie=8;for(te=0;8>te;++te)ie+=N[B+te-32]+N[B-1+32*te];vi(ie>>4,N,B)}function Xl(N,B){var te,ie=4;for(te=0;8>te;++te)ie+=N[B+te-32];vi(ie>>3,N,B)}function Aa(N,B){var te,ie=4;for(te=0;8>te;++te)ie+=N[B-1+32*te];vi(ie>>3,N,B)}function Ja(N,B){vi(128,N,B)}function mo(N,B,te){var ie=N[B-te],he=N[B+0],ve=3*(he-ie)+qo[1020+N[B-2*te]-N[B+te]],me=_l[112+(ve+4>>3)];N[B-te]=wi[255+ie+_l[112+(ve+3>>3)]],N[B+0]=wi[255+he-me]}function yo(N,B,te,ie){var he=N[B+0],ve=N[B+te];return ro[255+N[B-2*te]-N[B-te]]>ie||ro[255+ve-he]>ie}function Zs(N,B,te,ie){return 4*ro[255+N[B-te]-N[B+0]]+ro[255+N[B-2*te]-N[B+te]]<=ie}function dl(N,B,te,ie,he){var ve=N[B-3*te],me=N[B-2*te],we=N[B-te],Se=N[B+0],Oe=N[B+te],De=N[B+2*te],Ze=N[B+3*te];return 4*ro[255+we-Se]+ro[255+me-Oe]>ie?0:ro[255+N[B-4*te]-ve]<=he&&ro[255+ve-me]<=he&&ro[255+me-we]<=he&&ro[255+Ze-De]<=he&&ro[255+De-Oe]<=he&&ro[255+Oe-Se]<=he}function Jn(N,B,te,ie){var he=2*ie+1;for(ie=0;16>ie;++ie)Zs(N,B+ie,te,he)&&mo(N,B+ie,te)}function Da(N,B,te,ie){var he=2*ie+1;for(ie=0;16>ie;++ie)Zs(N,B+ie*te,1,he)&&mo(N,B+ie*te,1)}function eo(N,B,te,ie){var he;for(he=3;0<he;--he)Jn(N,B+=4*te,te,ie)}function Os(N,B,te,ie){var he;for(he=3;0<he;--he)Da(N,B+=4,te,ie)}function mi(N,B,te,ie,he,ve,me,we){for(ve=2*ve+1;0<he--;){if(dl(N,B,te,ve,me))if(yo(N,B,te,we))mo(N,B,te);else{var Se=N,Oe=B,De=te,Ze=Se[Oe-2*De],ke=Se[Oe-De],qe=Se[Oe+0],Ke=Se[Oe+De],it=Se[Oe+2*De],Ye=27*(Ue=qo[1020+3*(qe-ke)+qo[1020+Ze-Ke]])+63>>7,nt=18*Ue+63>>7,Ue=9*Ue+63>>7;Se[Oe-3*De]=wi[255+Se[Oe-3*De]+Ue],Se[Oe-2*De]=wi[255+Ze+nt],Se[Oe-De]=wi[255+ke+Ye],Se[Oe+0]=wi[255+qe-Ye],Se[Oe+De]=wi[255+Ke-nt],Se[Oe+2*De]=wi[255+it-Ue]}B+=ie}}function kn(N,B,te,ie,he,ve,me,we){for(ve=2*ve+1;0<he--;){if(dl(N,B,te,ve,me))if(yo(N,B,te,we))mo(N,B,te);else{var Se=N,Oe=B,De=te,Ze=Se[Oe-De],ke=Se[Oe+0],qe=Se[Oe+De],Ke=_l[112+(4+(it=3*(ke-Ze))>>3)],it=_l[112+(it+3>>3)],Ye=Ke+1>>1;Se[Oe-2*De]=wi[255+Se[Oe-2*De]+Ye],Se[Oe-De]=wi[255+Ze+it],Se[Oe+0]=wi[255+ke-Ke],Se[Oe+De]=wi[255+qe-Ye]}B+=ie}}function X(N,B,te,ie,he,ve){mi(N,B,te,1,16,ie,he,ve)}function fe(N,B,te,ie,he,ve){mi(N,B,1,te,16,ie,he,ve)}function Ne(N,B,te,ie,he,ve){var me;for(me=3;0<me;--me)kn(N,B+=4*te,te,1,16,ie,he,ve)}function Fe(N,B,te,ie,he,ve){var me;for(me=3;0<me;--me)kn(N,B+=4,1,te,16,ie,he,ve)}function Ge(N,B,te,ie,he,ve,me,we){mi(N,B,he,1,8,ve,me,we),mi(te,ie,he,1,8,ve,me,we)}function lt(N,B,te,ie,he,ve,me,we){mi(N,B,1,he,8,ve,me,we),mi(te,ie,1,he,8,ve,me,we)}function ft(N,B,te,ie,he,ve,me,we){kn(N,B+4*he,he,1,8,ve,me,we),kn(te,ie+4*he,he,1,8,ve,me,we)}function Lt(N,B,te,ie,he,ve,me,we){kn(N,B+4,1,he,8,ve,me,we),kn(te,ie+4,1,he,8,ve,me,we)}function Et(){this.ba=new vr,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new lr,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Ut(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Rt(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Pr(){this.ua=0,this.Wa=new Ae,this.vb=new Ae,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new J,this.yc=new q}function Mr(){this.xb=this.a=0,this.l=new mr,this.ca=new vr,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new z,this.Pb=0,this.wd=new z,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Pr,this.ab=0,this.gc=l(4,Rt),this.Oc=0}function ei(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new mr,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Hr(N,B,te,ie,he,ve,me){for(N=N==null?0:N[B+0],B=0;B<me;++B)he[ve+B]=N+te[ie+B]&255,N=he[ve+B]}function ti(N,B,te,ie,he,ve,me){var we;if(N==null)Hr(null,null,te,ie,he,ve,me);else for(we=0;we<me;++we)he[ve+we]=N[B+we]+te[ie+we]&255}function Hn(N,B,te,ie,he,ve,me){if(N==null)Hr(null,null,te,ie,he,ve,me);else{var we,Se=N[B+0],Oe=Se,De=Se;for(we=0;we<me;++we)Oe=De+(Se=N[B+we])-Oe,De=te[ie+we]+(-256&Oe?0>Oe?0:255:Oe)&255,Oe=Se,he[ve+we]=De}}function Ni(N,B,te,ie){var he=B.width,ve=B.o;if(t(N!=null&&B!=null),0>te||0>=ie||te+ie>ve)return null;if(!N.Cc){if(N.ga==null){var me;if(N.ga=new ei,(me=N.ga==null)||(me=B.width*B.o,t(N.Gb.length==0),N.Gb=a(me),N.Uc=0,N.Gb==null?me=0:(N.mb=N.Gb,N.nb=N.Uc,N.rc=null,me=1),me=!me),!me){me=N.ga;var we=N.Fa,Se=N.P,Oe=N.qc,De=N.mb,Ze=N.nb,ke=Se+1,qe=Oe-1,Ke=me.l;if(t(we!=null&&De!=null&&B!=null),Qi[0]=null,Qi[1]=Hr,Qi[2]=ti,Qi[3]=Hn,me.ca=De,me.tb=Ze,me.c=B.width,me.i=B.height,t(0<me.c&&0<me.i),1>=Oe)B=0;else if(me.$a=3&we[Se+0],me.Z=we[Se+0]>>2&3,me.Lc=we[Se+0]>>4&3,Se=we[Se+0]>>6&3,0>me.$a||1<me.$a||4<=me.Z||1<me.Lc||Se)B=0;else if(Ke.put=Yt,Ke.ac=mn,Ke.bc=sa,Ke.ma=me,Ke.width=B.width,Ke.height=B.height,Ke.Da=B.Da,Ke.v=B.v,Ke.va=B.va,Ke.j=B.j,Ke.o=B.o,me.$a)e:{t(me.$a==1),B=Io();t:for(;;){if(B==null){B=0;break e}if(t(me!=null),me.mc=B,B.c=me.c,B.i=me.i,B.l=me.l,B.l.ma=me,B.l.width=me.c,B.l.height=me.i,B.a=0,Y(B.m,we,ke,qe),!Ci(me.c,me.i,1,B,null)||(B.ab==1&&B.gc[0].hc==3&&wa(B.s)?(me.ic=1,we=B.c*B.i,B.Ta=null,B.Ua=0,B.V=a(we),B.Ba=0,B.V==null?(B.a=1,B=0):B=1):(me.ic=0,B=Xa(B,me.c)),!B))break t;B=1;break e}me.mc=null,B=0}else B=qe>=me.c*me.i;me=!B}if(me)return null;N.ga.Lc!=1?N.Ga=0:ie=ve-te}t(N.ga!=null),t(te+ie<=ve);e:{if(B=(we=N.ga).c,ve=we.l.o,we.$a==0){if(ke=N.rc,qe=N.Vc,Ke=N.Fa,Se=N.P+1+te*B,Oe=N.mb,De=N.nb+te*B,t(Se<=N.P+N.qc),we.Z!=0)for(t(Qi[we.Z]!=null),me=0;me<ie;++me)Qi[we.Z](ke,qe,Ke,Se,Oe,De,B),ke=Oe,qe=De,De+=B,Se+=B;else for(me=0;me<ie;++me)n(Oe,De,Ke,Se,B),ke=Oe,qe=De,De+=B,Se+=B;N.rc=ke,N.Vc=qe}else{if(t(we.mc!=null),B=te+ie,t((me=we.mc)!=null),t(B<=me.i),me.C>=B)B=1;else if(we.ic||pl(),we.ic){we=me.V,ke=me.Ba,qe=me.c;var it=me.i,Ye=(Ke=1,Se=me.$/qe,Oe=me.$%qe,De=me.m,Ze=me.s,me.$),nt=qe*it,Ue=qe*B,ot=Ze.wc,ut=Ye<Ue?An(Ze,Oe,Se):null;t(Ye<=nt),t(B<=it),t(wa(Ze));t:for(;;){for(;!De.h&&Ye<Ue;){if(Oe&ot||(ut=An(Ze,Oe,Se)),t(ut!=null),Q(De),256>(it=Rr(ut.G[0],ut.H[0],De)))we[ke+Ye]=it,++Ye,++Oe>=qe&&(Oe=0,++Se<=B&&!(Se%16)&&Qn(me,Se));else{if(!(280>it)){Ke=0;break t}it=Un(it-256,De);var qt,Mt=Rr(ut.G[4],ut.H[4],De);if(Q(De),!(Ye>=(Mt=Ui(qe,Mt=Un(Mt,De)))&&nt-Ye>=it)){Ke=0;break t}for(qt=0;qt<it;++qt)we[ke+Ye+qt]=we[ke+Ye+qt-Mt];for(Ye+=it,Oe+=it;Oe>=qe;)Oe-=qe,++Se<=B&&!(Se%16)&&Qn(me,Se);Ye<Ue&&Oe&ot&&(ut=An(Ze,Oe,Se))}t(De.h==re(De))}Qn(me,Se>B?B:Se);break t}!Ke||De.h&&Ye<nt?(Ke=0,me.a=De.h?5:3):me.$=Ye,B=Ke}else B=_a(me,me.V,me.Ba,me.c,me.i,B,Ps);if(!B){ie=0;break e}}te+ie>=ve&&(N.Cc=1),ie=1}if(!ie)return null;if(N.Cc&&((ie=N.ga)!=null&&(ie.mc=null),N.ga=null,0<N.Ga))return alert("todo:WebPDequantizeLevels"),null}return N.nb+te*he}function bo(N,B,te,ie,he,ve){for(;0<he--;){var me,we=N,Se=B+(te?1:0),Oe=N,De=B+(te?0:3);for(me=0;me<ie;++me){var Ze=Oe[De+4*me];Ze!=255&&(Ze*=32897,we[Se+4*me+0]=we[Se+4*me+0]*Ze>>23,we[Se+4*me+1]=we[Se+4*me+1]*Ze>>23,we[Se+4*me+2]=we[Se+4*me+2]*Ze>>23)}B+=ve}}function Cs(N,B,te,ie,he){for(;0<ie--;){var ve;for(ve=0;ve<te;++ve){var me=N[B+2*ve+0],we=15&(Oe=N[B+2*ve+1]),Se=4369*we,Oe=(240&Oe|Oe>>4)*Se>>16;N[B+2*ve+0]=(240&me|me>>4)*Se>>16&240|(15&me|me<<4)*Se>>16>>4&15,N[B+2*ve+1]=240&Oe|we}B+=he}}function Ns(N,B,te,ie,he,ve,me,we){var Se,Oe,De=255;for(Oe=0;Oe<he;++Oe){for(Se=0;Se<ie;++Se){var Ze=N[B+Se];ve[me+4*Se]=Ze,De&=Ze}B+=te,me+=we}return De!=255}function Kl(N,B,te,ie,he){var ve;for(ve=0;ve<he;++ve)te[ie+ve]=N[B+ve]>>8}function pl(){Uo=bo,ju=Cs,wl=Ns,gc=Kl}function Ba(N,B,te){R[N]=function(ie,he,ve,me,we,Se,Oe,De,Ze,ke,qe,Ke,it,Ye,nt,Ue,ot){var ut,qt=ot-1>>1,Mt=we[Se+0]|Oe[De+0]<<16,ar=Ze[ke+0]|qe[Ke+0]<<16;t(ie!=null);var It=3*Mt+ar+131074>>2;for(B(ie[he+0],255&It,It>>16,it,Ye),ve!=null&&(It=3*ar+Mt+131074>>2,B(ve[me+0],255&It,It>>16,nt,Ue)),ut=1;ut<=qt;++ut){var _r=we[Se+ut]|Oe[De+ut]<<16,Rn=Ze[ke+ut]|qe[Ke+ut]<<16,fr=Mt+_r+ar+Rn+524296,Tt=fr+2*(_r+ar)>>3;It=Tt+Mt>>1,Mt=(fr=fr+2*(Mt+Rn)>>3)+_r>>1,B(ie[he+2*ut-1],255&It,It>>16,it,Ye+(2*ut-1)*te),B(ie[he+2*ut-0],255&Mt,Mt>>16,it,Ye+(2*ut-0)*te),ve!=null&&(It=fr+ar>>1,Mt=Tt+Rn>>1,B(ve[me+2*ut-1],255&It,It>>16,nt,Ue+(2*ut-1)*te),B(ve[me+2*ut+0],255&Mt,Mt>>16,nt,Ue+(2*ut+0)*te)),Mt=_r,ar=Rn}1&ot||(It=3*Mt+ar+131074>>2,B(ie[he+ot-1],255&It,It>>16,it,Ye+(ot-1)*te),ve!=null&&(It=3*ar+Mt+131074>>2,B(ve[me+ot-1],255&It,It>>16,nt,Ue+(ot-1)*te)))}}function Iu(){Ca[xl]=Jf,Ca[Ho]=Ms,Ca[ff]=eh,Ca[Sl]=su,Ca[ru]=ci,Ca[sn]=_i,Ca[Du]=Ec,Ca[El]=Ms,Ca[Ts]=su,Ca[nu]=ci,Ca[iu]=_i}function wo(N){return N&-16384?0>N?0:255:N>>ls}function jo(N,B){return wo((19077*N>>8)+(26149*B>>8)-14234)}function yi(N,B,te){return wo((19077*N>>8)-(6419*B>>8)-(13320*te>>8)+8708)}function is(N,B){return wo((19077*N>>8)+(33050*B>>8)-17685)}function Pa(N,B,te,ie,he){ie[he+0]=jo(N,te),ie[he+1]=yi(N,B,te),ie[he+2]=is(N,B)}function gl(N,B,te,ie,he){ie[he+0]=is(N,B),ie[he+1]=yi(N,B,te),ie[he+2]=jo(N,te)}function Qs(N,B,te,ie,he){var ve=yi(N,B,te);B=ve<<3&224|is(N,B)>>3,ie[he+0]=248&jo(N,te)|ve>>5,ie[he+1]=B}function Li(N,B,te,ie,he){var ve=240&is(N,B)|15;ie[he+0]=240&jo(N,te)|yi(N,B,te)>>4,ie[he+1]=ve}function Ls(N,B,te,ie,he){ie[he+0]=255,Pa(N,B,te,ie,he+1)}function Js(N,B,te,ie,he){gl(N,B,te,ie,he),ie[he+3]=255}function Zl(N,B,te,ie,he){Pa(N,B,te,ie,he),ie[he+3]=255}function si(N,B){return 0>N?0:N>B?B:N}function la(N,B,te){R[N]=function(ie,he,ve,me,we,Se,Oe,De,Ze){for(var ke=De+(-2&Ze)*te;De!=ke;)B(ie[he+0],ve[me+0],we[Se+0],Oe,De),B(ie[he+1],ve[me+0],we[Se+0],Oe,De+te),he+=2,++me,++Se,De+=2*te;1&Ze&&B(ie[he+0],ve[me+0],we[Se+0],Oe,De)}}function Do(N,B,te){return te==0?N==0?B==0?6:5:B==0?4:0:te}function as(N,B,te,ie,he){switch(N>>>30){case 3:Tn(B,te,ie,he,0);break;case 2:Gn(B,te,ie,he);break;case 1:Xi(B,te,ie,he)}}function li(N,B){var te,ie,he=B.M,ve=B.Nb,me=N.oc,we=N.pc+40,Se=N.oc,Oe=N.pc+584,De=N.oc,Ze=N.pc+600;for(te=0;16>te;++te)me[we+32*te-1]=129;for(te=0;8>te;++te)Se[Oe+32*te-1]=129,De[Ze+32*te-1]=129;for(0<he?me[we-1-32]=Se[Oe-1-32]=De[Ze-1-32]=129:(i(me,we-32-1,127,21),i(Se,Oe-32-1,127,9),i(De,Ze-32-1,127,9)),ie=0;ie<N.za;++ie){var ke=B.ya[B.aa+ie];if(0<ie){for(te=-1;16>te;++te)n(me,we+32*te-4,me,we+32*te+12,4);for(te=-1;8>te;++te)n(Se,Oe+32*te-4,Se,Oe+32*te+4,4),n(De,Ze+32*te-4,De,Ze+32*te+4,4)}var qe=N.Gd,Ke=N.Hd+ie,it=ke.ad,Ye=ke.Hc;if(0<he&&(n(me,we-32,qe[Ke].y,0,16),n(Se,Oe-32,qe[Ke].f,0,8),n(De,Ze-32,qe[Ke].ea,0,8)),ke.Za){var nt=me,Ue=we-32+16;for(0<he&&(ie>=N.za-1?i(nt,Ue,qe[Ke].y[15],4):n(nt,Ue,qe[Ke+1].y,0,4)),te=0;4>te;te++)nt[Ue+128+te]=nt[Ue+256+te]=nt[Ue+384+te]=nt[Ue+0+te];for(te=0;16>te;++te,Ye<<=2)nt=me,Ue=we+qu[te],Zi[ke.Ob[te]](nt,Ue),as(Ye,it,16*+te,nt,Ue)}else if(nt=Do(ie,he,ke.Ob[0]),Ki[nt](me,we),Ye!=0)for(te=0;16>te;++te,Ye<<=2)as(Ye,it,16*+te,me,we+qu[te]);for(te=ke.Gc,nt=Do(ie,he,ke.Dd),fa[nt](Se,Oe),fa[nt](De,Ze),Ye=it,nt=Se,Ue=Oe,255&(ke=0|te)&&(170&ke?Eo(Ye,256,nt,Ue):on(Ye,256,nt,Ue)),ke=De,Ye=Ze,255&(te>>=8)&&(170&te?Eo(it,320,ke,Ye):on(it,320,ke,Ye)),he<N.Ub-1&&(n(qe[Ke].y,0,me,we+480,16),n(qe[Ke].f,0,Se,Oe+224,8),n(qe[Ke].ea,0,De,Ze+224,8)),te=8*ve*N.B,qe=N.sa,Ke=N.ta+16*ie+16*ve*N.R,it=N.qa,ke=N.ra+8*ie+te,Ye=N.Ha,nt=N.Ia+8*ie+te,te=0;16>te;++te)n(qe,Ke+te*N.R,me,we+32*te,16);for(te=0;8>te;++te)n(it,ke+te*N.B,Se,Oe+32*te,8),n(Ye,nt+te*N.B,De,Ze+32*te,8)}}function to(N,B,te,ie,he,ve,me,we,Se){var Oe=[0],De=[0],Ze=0,ke=Se!=null?Se.kd:0,qe=Se??new Ut;if(N==null||12>te)return 7;qe.data=N,qe.w=B,qe.ha=te,B=[B],te=[te],qe.gb=[qe.gb];e:{var Ke=B,it=te,Ye=qe.gb;if(t(N!=null),t(it!=null),t(Ye!=null),Ye[0]=0,12<=it[0]&&!r(N,Ke[0],"RIFF")){if(r(N,Ke[0]+8,"WEBP")){Ye=3;break e}var nt=Pe(N,Ke[0]+4);if(12>nt||4294967286<nt){Ye=3;break e}if(ke&&nt>it[0]-8){Ye=7;break e}Ye[0]=nt,Ke[0]+=12,it[0]-=12}Ye=0}if(Ye!=0)return Ye;for(nt=0<qe.gb[0],te=te[0];;){e:{var Ue=N;it=B,Ye=te;var ot=Oe,ut=De,qt=Ke=[0];if((It=Ze=[Ze])[0]=0,8>Ye[0])Ye=7;else{if(!r(Ue,it[0],"VP8X")){if(Pe(Ue,it[0]+4)!=10){Ye=3;break e}if(18>Ye[0]){Ye=7;break e}var Mt=Pe(Ue,it[0]+8),ar=1+Me(Ue,it[0]+12);if(2147483648<=ar*(Ue=1+Me(Ue,it[0]+15))){Ye=3;break e}qt!=null&&(qt[0]=Mt),ot!=null&&(ot[0]=ar),ut!=null&&(ut[0]=Ue),it[0]+=18,Ye[0]-=18,It[0]=1}Ye=0}}if(Ze=Ze[0],Ke=Ke[0],Ye!=0)return Ye;if(it=!!(2&Ke),!nt&&Ze)return 3;if(ve!=null&&(ve[0]=!!(16&Ke)),me!=null&&(me[0]=it),we!=null&&(we[0]=0),me=Oe[0],Ke=De[0],Ze&&it&&Se==null){Ye=0;break}if(4>te){Ye=7;break}if(nt&&Ze||!nt&&!Ze&&!r(N,B[0],"ALPH")){te=[te],qe.na=[qe.na],qe.P=[qe.P],qe.Sa=[qe.Sa];e:{Mt=N,Ye=B,nt=te;var It=qe.gb;ot=qe.na,ut=qe.P,qt=qe.Sa,ar=22,t(Mt!=null),t(nt!=null),Ue=Ye[0];var _r=nt[0];for(t(ot!=null),t(qt!=null),ot[0]=null,ut[0]=null,qt[0]=0;;){if(Ye[0]=Ue,nt[0]=_r,8>_r){Ye=7;break e}var Rn=Pe(Mt,Ue+4);if(4294967286<Rn){Ye=3;break e}var fr=8+Rn+1&-2;if(ar+=fr,0<It&&ar>It){Ye=3;break e}if(!r(Mt,Ue,"VP8 ")||!r(Mt,Ue,"VP8L")){Ye=0;break e}if(_r[0]<fr){Ye=7;break e}r(Mt,Ue,"ALPH")||(ot[0]=Mt,ut[0]=Ue+8,qt[0]=Rn),Ue+=fr,_r-=fr}}if(te=te[0],qe.na=qe.na[0],qe.P=qe.P[0],qe.Sa=qe.Sa[0],Ye!=0)break}te=[te],qe.Ja=[qe.Ja],qe.xa=[qe.xa];e:if(It=N,Ye=B,nt=te,ot=qe.gb[0],ut=qe.Ja,qt=qe.xa,Mt=Ye[0],Ue=!r(It,Mt,"VP8 "),ar=!r(It,Mt,"VP8L"),t(It!=null),t(nt!=null),t(ut!=null),t(qt!=null),8>nt[0])Ye=7;else{if(Ue||ar){if(It=Pe(It,Mt+4),12<=ot&&It>ot-12){Ye=3;break e}if(ke&&It>nt[0]-8){Ye=7;break e}ut[0]=It,Ye[0]+=8,nt[0]-=8,qt[0]=ar}else qt[0]=5<=nt[0]&&It[Mt+0]==47&&!(It[Mt+4]>>5),ut[0]=nt[0];Ye=0}if(te=te[0],qe.Ja=qe.Ja[0],qe.xa=qe.xa[0],B=B[0],Ye!=0)break;if(4294967286<qe.Ja)return 3;if(we==null||it||(we[0]=qe.xa?2:1),me=[me],Ke=[Ke],qe.xa){if(5>te){Ye=7;break}we=me,ke=Ke,it=ve,N==null||5>te?N=0:5<=te&&N[B+0]==47&&!(N[B+4]>>5)?(nt=[0],It=[0],ot=[0],Y(ut=new z,N,B,te),Ra(ut,nt,It,ot)?(we!=null&&(we[0]=nt[0]),ke!=null&&(ke[0]=It[0]),it!=null&&(it[0]=ot[0]),N=1):N=0):N=0}else{if(10>te){Ye=7;break}we=Ke,N==null||10>te||!qi(N,B+3,te-3)?N=0:(ke=N[B+0]|N[B+1]<<8|N[B+2]<<16,it=16383&(N[B+7]<<8|N[B+6]),N=16383&(N[B+9]<<8|N[B+8]),1&ke||3<(ke>>1&7)||!(ke>>4&1)||ke>>5>=qe.Ja||!it||!N?N=0:(me&&(me[0]=it),we&&(we[0]=N),N=1))}if(!N||(me=me[0],Ke=Ke[0],Ze&&(Oe[0]!=me||De[0]!=Ke)))return 3;Se!=null&&(Se[0]=qe,Se.offset=B-Se.w,t(4294967286>B-Se.w),t(Se.offset==Se.ha-te));break}return Ye==0||Ye==7&&Ze&&Se==null?(ve!=null&&(ve[0]|=qe.na!=null&&0<qe.na.length),ie!=null&&(ie[0]=me),he!=null&&(he[0]=Ke),0):Ye}function Gi(N,B,te){var ie=B.width,he=B.height,ve=0,me=0,we=ie,Se=he;if(B.Da=N!=null&&0<N.Da,B.Da&&(we=N.cd,Se=N.bd,ve=N.v,me=N.j,11>te||(ve&=-2,me&=-2),0>ve||0>me||0>=we||0>=Se||ve+we>ie||me+Se>he))return 0;if(B.v=ve,B.j=me,B.va=ve+we,B.o=me+Se,B.U=we,B.T=Se,B.da=N!=null&&0<N.da,B.da){if(!be(we,Se,te=[N.ib],ve=[N.hb]))return 0;B.ib=te[0],B.hb=ve[0]}return B.ob=N!=null&&N.ob,B.Kb=N==null||!N.Sd,B.da&&(B.ob=B.ib<3*ie/4&&B.hb<3*he/4,B.Kb=0),1}function ua(N){if(N==null)return 2;if(11>N.S){var B=N.f.RGBA;B.fb+=(N.height-1)*B.A,B.A=-B.A}else B=N.f.kb,N=N.height,B.O+=(N-1)*B.fa,B.fa=-B.fa,B.N+=(N-1>>1)*B.Ab,B.Ab=-B.Ab,B.W+=(N-1>>1)*B.Db,B.Db=-B.Db,B.F!=null&&(B.J+=(N-1)*B.lb,B.lb=-B.lb);return 0}function $i(N,B,te,ie){if(ie==null||0>=N||0>=B)return 2;if(te!=null){if(te.Da){var he=te.cd,ve=te.bd,me=-2&te.v,we=-2&te.j;if(0>me||0>we||0>=he||0>=ve||me+he>N||we+ve>B)return 2;N=he,B=ve}if(te.da){if(!be(N,B,he=[te.ib],ve=[te.hb]))return 2;N=he[0],B=ve[0]}}ie.width=N,ie.height=B;e:{var Se=ie.width,Oe=ie.height;if(N=ie.S,0>=Se||0>=Oe||!(N>=xl&&13>N))N=2;else{if(0>=ie.Rd&&ie.sd==null){me=ve=he=B=0;var De=(we=Se*kl[N])*Oe;if(11>N||(ve=(Oe+1)/2*(B=(Se+1)/2),N==12&&(me=(he=Se)*Oe)),(Oe=a(De+2*ve+me))==null){N=1;break e}ie.sd=Oe,11>N?((Se=ie.f.RGBA).eb=Oe,Se.fb=0,Se.A=we,Se.size=De):((Se=ie.f.kb).y=Oe,Se.O=0,Se.fa=we,Se.Fd=De,Se.f=Oe,Se.N=0+De,Se.Ab=B,Se.Cd=ve,Se.ea=Oe,Se.W=0+De+ve,Se.Db=B,Se.Ed=ve,N==12&&(Se.F=Oe,Se.J=0+De+2*ve),Se.Tc=me,Se.lb=he)}if(B=1,he=ie.S,ve=ie.width,me=ie.height,he>=xl&&13>he)if(11>he)N=ie.f.RGBA,B&=(we=Math.abs(N.A))*(me-1)+ve<=N.size,B&=we>=ve*kl[he],B&=N.eb!=null;else{N=ie.f.kb,we=(ve+1)/2,De=(me+1)/2,Se=Math.abs(N.fa),Oe=Math.abs(N.Ab);var Ze=Math.abs(N.Db),ke=Math.abs(N.lb),qe=ke*(me-1)+ve;B&=Se*(me-1)+ve<=N.Fd,B&=Oe*(De-1)+we<=N.Cd,B=(B&=Ze*(De-1)+we<=N.Ed)&Se>=ve&Oe>=we&Ze>=we,B&=N.y!=null,B&=N.f!=null,B&=N.ea!=null,he==12&&(B&=ke>=ve,B&=qe<=N.Tc,B&=N.F!=null)}else B=0;N=B?0:2}}return N!=0||te!=null&&te.fd&&(N=ua(ie)),N}var Vn=64,os=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Ql=24,ca=32,Jr=8,vl=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Le("Predictor0","PredictorAdd0"),R.Predictor0=function(){return 4278190080},R.Predictor1=function(N){return N},R.Predictor2=function(N,B,te){return B[te+0]},R.Predictor3=function(N,B,te){return B[te+1]},R.Predictor4=function(N,B,te){return B[te-1]},R.Predictor5=function(N,B,te){return Ce(Ce(N,B[te+1]),B[te+0])},R.Predictor6=function(N,B,te){return Ce(N,B[te-1])},R.Predictor7=function(N,B,te){return Ce(N,B[te+0])},R.Predictor8=function(N,B,te){return Ce(B[te-1],B[te+0])},R.Predictor9=function(N,B,te){return Ce(B[te+0],B[te+1])},R.Predictor10=function(N,B,te){return Ce(Ce(N,B[te-1]),Ce(B[te+0],B[te+1]))},R.Predictor11=function(N,B,te){var ie=B[te+0];return 0>=st(ie>>24&255,N>>24&255,(B=B[te-1])>>24&255)+st(ie>>16&255,N>>16&255,B>>16&255)+st(ie>>8&255,N>>8&255,B>>8&255)+st(255&ie,255&N,255&B)?ie:N},R.Predictor12=function(N,B,te){var ie=B[te+0];return(je((N>>24&255)+(ie>>24&255)-((B=B[te-1])>>24&255))<<24|je((N>>16&255)+(ie>>16&255)-(B>>16&255))<<16|je((N>>8&255)+(ie>>8&255)-(B>>8&255))<<8|je((255&N)+(255&ie)-(255&B)))>>>0},R.Predictor13=function(N,B,te){var ie=B[te-1];return(He((N=Ce(N,B[te+0]))>>24&255,ie>>24&255)<<24|He(N>>16&255,ie>>16&255)<<16|He(N>>8&255,ie>>8&255)<<8|He(255&N,255&ie))>>>0};var ka=R.PredictorAdd0;R.PredictorAdd1=pt,Le("Predictor2","PredictorAdd2"),Le("Predictor3","PredictorAdd3"),Le("Predictor4","PredictorAdd4"),Le("Predictor5","PredictorAdd5"),Le("Predictor6","PredictorAdd6"),Le("Predictor7","PredictorAdd7"),Le("Predictor8","PredictorAdd8"),Le("Predictor9","PredictorAdd9"),Le("Predictor10","PredictorAdd10"),Le("Predictor11","PredictorAdd11"),Le("Predictor12","PredictorAdd12"),Le("Predictor13","PredictorAdd13");var Wi=R.PredictorAdd2;vt("ColorIndexInverseTransform","MapARGB","32b",function(N){return N>>8&255},function(N){return N}),vt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(N){return N},function(N){return N>>8&255});var ml,_o=R.ColorIndexInverseTransform,Yi=R.MapARGB,Bo=R.VP8LColorIndexInverseTransformAlpha,za=R.MapAlpha,Ti=R.VP8LPredictorsAdd=[];Ti.length=16,(R.VP8LPredictors=[]).length=16,(R.VP8LPredictorsAdd_C=[]).length=16,(R.VP8LPredictors_C=[]).length=16;var xo,zo,Oa,So,tr,en,Ln,Tn,Gn,Eo,Xi,on,ri,ui,yl,Jl,eu,bl,bi,el,tu,Fu,Ua,Ri,Uo,ju,wl,gc,vc=a(511),mc=a(2041),yc=a(225),bc=a(767),wc=0,qo=mc,_l=yc,wi=bc,ro=vc,xl=0,Ho=1,ff=2,Sl=3,ru=4,sn=5,Du=6,El=7,Ts=8,nu=9,iu=10,au=[2,3,7],_c=[3,3,11],tl=[280,256,256,256,40],Xf=[0,1,1,1,0],Hh=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Kf=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],hf=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Bu=8,Rs=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],zu=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Al=null,df=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],no=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],xc=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Uu=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Zf=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],Qf=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Sc=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Ki=[],Zi=[],fa=[],Ao=1,ou=2,Qi=[],Ca=[];Ba("UpsampleRgbLinePair",Pa,3),Ba("UpsampleBgrLinePair",gl,3),Ba("UpsampleRgbaLinePair",Zl,4),Ba("UpsampleBgraLinePair",Js,4),Ba("UpsampleArgbLinePair",Ls,4),Ba("UpsampleRgba4444LinePair",Li,2),Ba("UpsampleRgb565LinePair",Qs,2);var Jf=R.UpsampleRgbLinePair,eh=R.UpsampleBgrLinePair,Ms=R.UpsampleRgbaLinePair,su=R.UpsampleBgraLinePair,ci=R.UpsampleArgbLinePair,_i=R.UpsampleRgba4444LinePair,Ec=R.UpsampleRgb565LinePair,ss=16,Po=1<<ss-1,Yr=-227,tn=482,ls=6,Mi=0,ha=a(256),rl=a(256),Pl=a(256),da=a(256),lu=a(tn-Yr),pf=a(tn-Yr);la("YuvToRgbRow",Pa,3),la("YuvToBgrRow",gl,3),la("YuvToRgbaRow",Zl,4),la("YuvToBgraRow",Js,4),la("YuvToArgbRow",Ls,4),la("YuvToRgba4444Row",Li,2),la("YuvToRgb565Row",Qs,2);var qu=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],us=[0,2,8],th=[8,7,6,4,4,2,2,2,1,1,1,1],cs=1;this.WebPDecodeRGBA=function(N,B,te,ie,he){var ve=Ho,me=new Et,we=new vr;me.ba=we,we.S=ve,we.width=[we.width],we.height=[we.height];var Se=we.width,Oe=we.height,De=new Xt;if(De==null||N==null)var Ze=2;else t(De!=null),Ze=to(N,B,te,De.width,De.height,De.Pd,De.Qd,De.format,null);if(Ze!=0?Se=0:(Se!=null&&(Se[0]=De.width[0]),Oe!=null&&(Oe[0]=De.height[0]),Se=1),Se){we.width=we.width[0],we.height=we.height[0],ie!=null&&(ie[0]=we.width),he!=null&&(he[0]=we.height);e:{if(ie=new mr,(he=new Ut).data=N,he.w=B,he.ha=te,he.kd=1,B=[0],t(he!=null),((N=to(he.data,he.w,he.ha,null,null,null,B,null,he))==0||N==7)&&B[0]&&(N=4),(B=N)==0){if(t(me!=null),ie.data=he.data,ie.w=he.w+he.offset,ie.ha=he.ha-he.offset,ie.put=Yt,ie.ac=mn,ie.bc=sa,ie.ma=me,he.xa){if((N=Io())==null){me=1;break e}if(function(ke,qe){var Ke=[0],it=[0],Ye=[0];t:for(;;){if(ke==null)return 0;if(qe==null)return ke.a=2,0;if(ke.l=qe,ke.a=0,Y(ke.m,qe.data,qe.w,qe.ha),!Ra(ke.m,Ke,it,Ye)){ke.a=3;break t}if(ke.xb=ou,qe.width=Ke[0],qe.height=it[0],!Ci(Ke[0],it[0],1,ke,null))break t;return 1}return t(ke.a!=0),0}(N,ie)){if(ie=(B=$i(ie.width,ie.height,me.Oa,me.ba))==0){t:{ie=N;r:for(;;){if(ie==null){ie=0;break t}if(t(ie.s.yc!=null),t(ie.s.Ya!=null),t(0<ie.s.Wb),t((te=ie.l)!=null),t((he=te.ma)!=null),ie.xb!=0){if(ie.ca=he.ba,ie.tb=he.tb,t(ie.ca!=null),!Gi(he.Oa,te,Sl)){ie.a=2;break r}if(!Xa(ie,te.width)||te.da)break r;if((te.da||St(ie.ca.S))&&pl(),11>ie.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),ie.ca.f.kb.F!=null&&pl()),ie.Pb&&0<ie.s.ua&&ie.s.vb.X==null&&!de(ie.s.vb,ie.s.Wa.Xa)){ie.a=1;break r}ie.xb=0}if(!_a(ie,ie.V,ie.Ba,ie.c,ie.i,te.o,Mo))break r;he.Dc=ie.Ma,ie=1;break t}t(ie.a!=0),ie=0}ie=!ie}ie&&(B=N.a)}else B=N.a}else{if((N=new Jo)==null){me=1;break e}if(N.Fa=he.na,N.P=he.P,N.qc=he.Sa,Ka(N,ie)){if((B=$i(ie.width,ie.height,me.Oa,me.ba))==0){if(N.Aa=0,te=me.Oa,t((he=N)!=null),te!=null){if(0<(Se=0>(Se=te.Md)?0:100<Se?255:255*Se/100)){for(Oe=De=0;4>Oe;++Oe)12>(Ze=he.pb[Oe]).lc&&(Ze.ia=Se*th[0>Ze.lc?0:Ze.lc]>>3),De|=Ze.ia;De&&(alert("todo:VP8InitRandom"),he.ia=1)}he.Ga=te.Id,100<he.Ga?he.Ga=100:0>he.Ga&&(he.Ga=0)}(function(ke,qe){if(ke==null)return 0;if(qe==null)return Er(ke,2,"NULL VP8Io parameter in VP8Decode().");if(!ke.cb&&!Ka(ke,qe))return 0;if(t(ke.cb),qe.ac==null||qe.ac(qe)){qe.ob&&(ke.L=0);var Ke=us[ke.L];if(ke.L==2?(ke.yb=0,ke.zb=0):(ke.yb=qe.v-Ke>>4,ke.zb=qe.j-Ke>>4,0>ke.yb&&(ke.yb=0),0>ke.zb&&(ke.zb=0)),ke.Va=qe.o+15+Ke>>4,ke.Hb=qe.va+15+Ke>>4,ke.Hb>ke.za&&(ke.Hb=ke.za),ke.Va>ke.Ub&&(ke.Va=ke.Ub),0<ke.L){var it=ke.ed;for(Ke=0;4>Ke;++Ke){var Ye;if(ke.Qa.Cb){var nt=ke.Qa.Lb[Ke];ke.Qa.Fb||(nt+=it.Tb)}else nt=it.Tb;for(Ye=0;1>=Ye;++Ye){var Ue=ke.gd[Ke][Ye],ot=nt;if(it.Pc&&(ot+=it.vd[0],Ye&&(ot+=it.od[0])),0<(ot=0>ot?0:63<ot?63:ot)){var ut=ot;0<it.wb&&(ut=4<it.wb?ut>>2:ut>>1)>9-it.wb&&(ut=9-it.wb),1>ut&&(ut=1),Ue.dd=ut,Ue.tc=2*ot+ut,Ue.ld=40<=ot?2:15<=ot?1:0}else Ue.tc=0;Ue.La=Ye}}}Ke=0}else Er(ke,6,"Frame setup failed"),Ke=ke.a;if(Ke=Ke==0){if(Ke){ke.$c=0,0<ke.Aa||(ke.Ic=cs);t:{Ke=ke.Ic,it=4*(ut=ke.za);var qt=32*ut,Mt=ut+1,ar=0<ke.L?ut*(0<ke.Aa?2:1):0,It=(ke.Aa==2?2:1)*ut;if((Ue=it+832+(Ye=3*(16*Ke+us[ke.L])/2*qt)+(nt=ke.Fa!=null&&0<ke.Fa.length?ke.Kc.c*ke.Kc.i:0))!=Ue)Ke=0;else{if(Ue>ke.Vb){if(ke.Vb=0,ke.Ec=a(Ue),ke.Fc=0,ke.Ec==null){Ke=Er(ke,1,"no memory during frame initialization.");break t}ke.Vb=Ue}Ue=ke.Ec,ot=ke.Fc,ke.Ac=Ue,ke.Bc=ot,ot+=it,ke.Gd=l(qt,oi),ke.Hd=0,ke.rb=l(Mt+1,Qo),ke.sb=1,ke.wa=ar?l(ar,Sa):null,ke.Y=0,ke.D.Nb=0,ke.D.wa=ke.wa,ke.D.Y=ke.Y,0<ke.Aa&&(ke.D.Y+=ut),t(!0),ke.oc=Ue,ke.pc=ot,ot+=832,ke.ya=l(It,$s),ke.aa=0,ke.D.ya=ke.ya,ke.D.aa=ke.aa,ke.Aa==2&&(ke.D.aa+=ut),ke.R=16*ut,ke.B=8*ut,ut=(qt=us[ke.L])*ke.R,qt=qt/2*ke.B,ke.sa=Ue,ke.ta=ot+ut,ke.qa=ke.sa,ke.ra=ke.ta+16*Ke*ke.R+qt,ke.Ha=ke.qa,ke.Ia=ke.ra+8*Ke*ke.B+qt,ke.$c=0,ot+=Ye,ke.mb=nt?Ue:null,ke.nb=nt?ot:null,t(ot+nt<=ke.Fc+ke.Vb),Pn(ke),i(ke.Ac,ke.Bc,0,it),Ke=1}}if(Ke){if(qe.ka=0,qe.y=ke.sa,qe.O=ke.ta,qe.f=ke.qa,qe.N=ke.ra,qe.ea=ke.Ha,qe.Vd=ke.Ia,qe.fa=ke.R,qe.Rc=ke.B,qe.F=null,qe.J=0,!wc){for(Ke=-255;255>=Ke;++Ke)vc[255+Ke]=0>Ke?-Ke:Ke;for(Ke=-1020;1020>=Ke;++Ke)mc[1020+Ke]=-128>Ke?-128:127<Ke?127:Ke;for(Ke=-112;112>=Ke;++Ke)yc[112+Ke]=-16>Ke?-16:15<Ke?15:Ke;for(Ke=-255;510>=Ke;++Ke)bc[255+Ke]=0>Ke?0:255<Ke?255:Ke;wc=1}Ln=Ar,Tn=Ea,Eo=hl,Xi=ts,on=$l,Gn=Ru,ri=X,ui=fe,yl=Ge,Jl=lt,eu=Ne,bl=Fe,bi=ft,el=Lt,tu=Jn,Fu=Da,Ua=eo,Ri=Os,Zi[0]=dc,Zi[1]=rs,Zi[2]=Ks,Zi[3]=vo,Zi[4]=pc,Zi[5]=pn,Zi[6]=Qa,Zi[7]=Wl,Zi[8]=ks,Zi[9]=Yl,Ki[0]=Za,Ki[1]=fc,Ki[2]=hc,Ki[3]=Xs,Ki[4]=Ma,Ki[5]=Ia,Ki[6]=Fa,fa[0]=Fo,fa[1]=Ys,fa[2]=Mu,fa[3]=ja,fa[4]=Aa,fa[5]=Xl,fa[6]=Ja,Ke=1}else Ke=0}Ke&&(Ke=function(_r,Rn){for(_r.M=0;_r.M<_r.Va;++_r.M){var fr,Tt=_r.Jc[_r.M&_r.Xb],_t=_r.m,Mn=_r;for(fr=0;fr<Mn.za;++fr){var Dt=_t,or=Mn,kr=or.Ac,fi=or.Bc+4*fr,ni=or.zc,Ir=or.ya[or.aa+fr];if(or.Qa.Bb?Ir.$b=le(Dt,or.Pa.jb[0])?2+le(Dt,or.Pa.jb[2]):le(Dt,or.Pa.jb[1]):Ir.$b=0,or.kc&&(Ir.Ad=le(Dt,or.Bd)),Ir.Za=!le(Dt,145)+0,Ir.Za){var hi=Ir.Ob,hn=0;for(or=0;4>or;++or){var On,Sr=ni[0+or];for(On=0;4>On;++On){Sr=Zf[kr[fi+On]][Sr];for(var Dr=xc[le(Dt,Sr[0])];0<Dr;)Dr=xc[2*Dr+le(Dt,Sr[Dr])];Sr=-Dr,kr[fi+On]=Sr}n(hi,hn,kr,fi,4),hn+=4,ni[0+or]=Sr}}else Sr=le(Dt,156)?le(Dt,128)?1:3:le(Dt,163)?2:0,Ir.Ob[0]=Sr,i(kr,fi,Sr,4),i(ni,0,Sr,4);Ir.Dd=le(Dt,142)?le(Dt,114)?le(Dt,183)?1:3:2:0}if(Mn.m.Ka)return Er(_r,7,"Premature end-of-partition0 encountered.");for(;_r.ja<_r.za;++_r.ja){if(Mn=Tt,Dt=(_t=_r).rb[_t.sb-1],kr=_t.rb[_t.sb+_t.ja],fr=_t.ya[_t.aa+_t.ja],fi=_t.kc?fr.Ad:0)Dt.la=kr.la=0,fr.Za||(Dt.Na=kr.Na=0),fr.Hc=0,fr.Gc=0,fr.ia=0;else{var wn,Br;if(Dt=kr,kr=Mn,fi=_t.Pa.Xc,ni=_t.ya[_t.aa+_t.ja],Ir=_t.pb[ni.$b],or=ni.ad,hi=0,hn=_t.rb[_t.sb-1],Sr=On=0,i(or,hi,0,384),ni.Za)var _n=0,xn=fi[3];else{Dr=a(16);var Xr=Dt.Na+hn.Na;if(Xr=Al(kr,fi[1],Xr,Ir.Eb,0,Dr,0),Dt.Na=hn.Na=(0<Xr)+0,1<Xr)Ln(Dr,0,or,hi);else{var xi=Dr[0]+3>>3;for(Dr=0;256>Dr;Dr+=16)or[hi+Dr]=xi}_n=1,xn=fi[0]}var Vr=15&Dt.la,Gr=15&hn.la;for(Dr=0;4>Dr;++Dr){var $n=1&Gr;for(xi=Br=0;4>xi;++xi)Vr=Vr>>1|($n=(Xr=Al(kr,xn,Xr=$n+(1&Vr),Ir.Sc,_n,or,hi))>_n)<<7,Br=Br<<2|(3<Xr?3:1<Xr?2:or[hi+0]!=0),hi+=16;Vr>>=4,Gr=Gr>>1|$n<<7,On=(On<<8|Br)>>>0}for(xn=Vr,_n=Gr>>4,wn=0;4>wn;wn+=2){for(Br=0,Vr=Dt.la>>4+wn,Gr=hn.la>>4+wn,Dr=0;2>Dr;++Dr){for($n=1&Gr,xi=0;2>xi;++xi)Xr=$n+(1&Vr),Vr=Vr>>1|($n=0<(Xr=Al(kr,fi[2],Xr,Ir.Qc,0,or,hi)))<<3,Br=Br<<2|(3<Xr?3:1<Xr?2:or[hi+0]!=0),hi+=16;Vr>>=2,Gr=Gr>>1|$n<<5}Sr|=Br<<4*wn,xn|=Vr<<4<<wn,_n|=(240&Gr)<<wn}Dt.la=xn,hn.la=_n,ni.Hc=On,ni.Gc=Sr,ni.ia=43690&Sr?0:Ir.ia,fi=!(On|Sr)}if(0<_t.L&&(_t.wa[_t.Y+_t.ja]=_t.gd[fr.$b][fr.Za],_t.wa[_t.Y+_t.ja].La|=!fi),Mn.Ka)return Er(_r,7,"Premature end-of-file encountered.")}if(Pn(_r),_t=Rn,Mn=1,fr=(Tt=_r).D,Dt=0<Tt.L&&Tt.M>=Tt.zb&&Tt.M<=Tt.Va,Tt.Aa==0)t:{if(fr.M=Tt.M,fr.uc=Dt,li(Tt,fr),Mn=1,fr=(Br=Tt.D).Nb,Dt=(Sr=us[Tt.L])*Tt.R,kr=Sr/2*Tt.B,Dr=16*fr*Tt.R,xi=8*fr*Tt.B,fi=Tt.sa,ni=Tt.ta-Dt+Dr,Ir=Tt.qa,or=Tt.ra-kr+xi,hi=Tt.Ha,hn=Tt.Ia-kr+xi,Gr=(Vr=Br.M)==0,On=Vr>=Tt.Va-1,Tt.Aa==2&&li(Tt,Br),Br.uc)for($n=(Xr=Tt).D.M,t(Xr.D.uc),Br=Xr.yb;Br<Xr.Hb;++Br){_n=Br,xn=$n;var Si=(pa=(yr=Xr).D).Nb;wn=yr.R;var pa=pa.wa[pa.Y+_n],Wn=yr.sa,In=yr.ta+16*Si*wn+16*_n,ga=pa.dd,Kr=pa.tc;if(Kr!=0)if(t(3<=Kr),yr.L==1)0<_n&&Fu(Wn,In,wn,Kr+4),pa.La&&Ri(Wn,In,wn,Kr),0<xn&&tu(Wn,In,wn,Kr+4),pa.La&&Ua(Wn,In,wn,Kr);else{var Ii=yr.B,zr=yr.qa,rr=yr.ra+8*Si*Ii+8*_n,Or=yr.Ha,yr=yr.Ia+8*Si*Ii+8*_n;Si=pa.ld,0<_n&&(ui(Wn,In,wn,Kr+4,ga,Si),Jl(zr,rr,Or,yr,Ii,Kr+4,ga,Si)),pa.La&&(bl(Wn,In,wn,Kr,ga,Si),el(zr,rr,Or,yr,Ii,Kr,ga,Si)),0<xn&&(ri(Wn,In,wn,Kr+4,ga,Si),yl(zr,rr,Or,yr,Ii,Kr+4,ga,Si)),pa.La&&(eu(Wn,In,wn,Kr,ga,Si),bi(zr,rr,Or,yr,Ii,Kr,ga,Si))}}if(Tt.ia&&alert("todo:DitherRow"),_t.put!=null){if(Br=16*Vr,Vr=16*(Vr+1),Gr?(_t.y=Tt.sa,_t.O=Tt.ta+Dr,_t.f=Tt.qa,_t.N=Tt.ra+xi,_t.ea=Tt.Ha,_t.W=Tt.Ia+xi):(Br-=Sr,_t.y=fi,_t.O=ni,_t.f=Ir,_t.N=or,_t.ea=hi,_t.W=hn),On||(Vr-=Sr),Vr>_t.o&&(Vr=_t.o),_t.F=null,_t.J=null,Tt.Fa!=null&&0<Tt.Fa.length&&Br<Vr&&(_t.J=Ni(Tt,_t,Br,Vr-Br),_t.F=Tt.mb,_t.F==null&&_t.F.length==0)){Mn=Er(Tt,3,"Could not decode alpha data.");break t}Br<_t.j&&(Sr=_t.j-Br,Br=_t.j,t(!(1&Sr)),_t.O+=Tt.R*Sr,_t.N+=Tt.B*(Sr>>1),_t.W+=Tt.B*(Sr>>1),_t.F!=null&&(_t.J+=_t.width*Sr)),Br<Vr&&(_t.O+=_t.v,_t.N+=_t.v>>1,_t.W+=_t.v>>1,_t.F!=null&&(_t.J+=_t.v),_t.ka=Br-_t.j,_t.U=_t.va-_t.v,_t.T=Vr-Br,Mn=_t.put(_t))}fr+1!=Tt.Ic||On||(n(Tt.sa,Tt.ta-Dt,fi,ni+16*Tt.R,Dt),n(Tt.qa,Tt.ra-kr,Ir,or+8*Tt.B,kr),n(Tt.Ha,Tt.Ia-kr,hi,hn+8*Tt.B,kr))}if(!Mn)return Er(_r,6,"Output aborted.")}return 1}(ke,qe)),qe.bc!=null&&qe.bc(qe),Ke&=1}return Ke?(ke.cb=0,Ke):0})(N,ie)||(B=N.a)}}else B=N.a}B==0&&me.Oa!=null&&me.Oa.fd&&(B=ua(me.ba))}me=B}ve=me!=0?null:11>ve?we.f.RGBA.eb:we.f.kb.y}else ve=null;return ve};var kl=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(R,T){for(var k="",C=0;C<4;C++)k+=String.fromCharCode(R[T++]);return k}function f(R,T){return R[T+0]|R[T+1]<<8}function v(R,T){return(R[T+0]|R[T+1]<<8|R[T+2]<<16)>>>0}function g(R,T){return(R[T+0]|R[T+1]<<8|R[T+2]<<16|R[T+3]<<24)>>>0}new u;var c=[0],y=[0],x=[],E=new u,S=e,b=function(R,T){var k={},C=0,q=!1,G=0,J=0;if(k.frames=[],!function(j,z){for(var Z=0;Z<4;Z++)if(j[z+Z]!="RIFF".charCodeAt(Z))return!0;return!1}(R,T)){for(g(R,T+=4),T+=8;T<R.length;){var ae=d(R,T),H=g(R,T+=4);T+=4;var V=H+(1&H);switch(ae){case"VP8 ":case"VP8L":k.frames[C]===void 0&&(k.frames[C]={}),(D=k.frames[C]).src_off=q?J:T-8,D.src_size=G+H+8,C++,q&&(q=!1,G=0,J=0);break;case"VP8X":(D=k.header={}).feature_flags=R[T];var Y=T+4;D.canvas_width=1+v(R,Y),Y+=3,D.canvas_height=1+v(R,Y),Y+=3;break;case"ALPH":q=!0,G=V+8,J=T-8;break;case"ANIM":(D=k.header).bgcolor=g(R,T),Y=T+4,D.loop_count=f(R,Y),Y+=2;break;case"ANMF":var U,D;(D=k.frames[C]={}).offset_x=2*v(R,T),T+=3,D.offset_y=2*v(R,T),T+=3,D.width=1+v(R,T),T+=3,D.height=1+v(R,T),T+=3,D.duration=v(R,T),T+=3,U=R[T++],D.dispose=1&U,D.blend=U>>1&1}ae!="ANMF"&&(T+=V)}return k}}(S,0);b.response=S,b.rgbaoutput=!0,b.dataurl=!1;var w=b.header?b.header:null,_=b.frames?b.frames:null;if(w){w.loop_counter=w.loop_count,c=[w.canvas_height],y=[w.canvas_width];for(var A=0;A<_.length&&_[A].blend!=0;A++);}var M=_[0],O=E.WebPDecodeRGBA(S,M.src_off,M.src_size,y,c);M.rgba=O,M.imgwidth=y[0],M.imgheight=c[0];for(var L=0;L<y[0]*c[0]*4;L++)x[L]=O[L];return this.width=y,this.height=c,this.data=x,this}(function(e){var t,r,n,i,a,l,o,u,d,f=function(j){return j=j||{},this.isStrokeTransparent=j.isStrokeTransparent||!1,this.strokeOpacity=j.strokeOpacity||1,this.strokeStyle=j.strokeStyle||"#000000",this.fillStyle=j.fillStyle||"#000000",this.isFillTransparent=j.isFillTransparent||!1,this.fillOpacity=j.fillOpacity||1,this.font=j.font||"10px sans-serif",this.textBaseline=j.textBaseline||"alphabetic",this.textAlign=j.textAlign||"left",this.lineWidth=j.lineWidth||1,this.lineJoin=j.lineJoin||"miter",this.lineCap=j.lineCap||"butt",this.path=j.path||[],this.transform=j.transform!==void 0?j.transform.clone():new u,this.globalCompositeOperation=j.globalCompositeOperation||"normal",this.globalAlpha=j.globalAlpha||1,this.clip_path=j.clip_path||[],this.currentPoint=j.currentPoint||new l,this.miterLimit=j.miterLimit||10,this.lastPoint=j.lastPoint||new l,this.lineDashOffset=j.lineDashOffset||0,this.lineDash=j.lineDash||[],this.margin=j.margin||[0,0,0,0],this.prevPageLastElemOffset=j.prevPageLastElemOffset||0,this.ignoreClearRect=typeof j.ignoreClearRect!="boolean"||j.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new v(this),t=this.internal.f2,r=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,l=this.internal.Point,o=this.internal.Rectangle,u=this.internal.Matrix,d=new f}]);var v=function(j){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var z=j;Object.defineProperty(this,"pdf",{get:function(){return z}});var Z=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return Z},set:function(Pe){Z=!!Pe}});var re=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return re},set:function(Pe){re=!!Pe}});var W=0;Object.defineProperty(this,"posX",{get:function(){return W},set:function(Pe){isNaN(Pe)||(W=Pe)}});var Q=0;Object.defineProperty(this,"posY",{get:function(){return Q},set:function(Pe){isNaN(Pe)||(Q=Pe)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(Pe){var de;typeof Pe=="number"?de=[Pe,Pe,Pe,Pe]:((de=new Array(4))[0]=Pe[0],de[1]=Pe.length>=2?Pe[1]:de[0],de[2]=Pe.length>=3?Pe[2]:de[0],de[3]=Pe.length>=4?Pe[3]:de[1]),d.margin=de}});var se=!1;Object.defineProperty(this,"autoPaging",{get:function(){return se},set:function(Pe){se=Pe}});var ue=0;Object.defineProperty(this,"lastBreak",{get:function(){return ue},set:function(Pe){ue=Pe}});var le=[];Object.defineProperty(this,"pageBreaks",{get:function(){return le},set:function(Pe){le=Pe}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(Pe){Pe instanceof f&&(d=Pe)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(Pe){d.path=Pe}});var ye=[];Object.defineProperty(this,"ctxStack",{get:function(){return ye},set:function(Pe){ye=Pe}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(Pe){var de;de=g(Pe),this.ctx.fillStyle=de.style,this.ctx.isFillTransparent=de.a===0,this.ctx.fillOpacity=de.a,this.pdf.setFillColor(de.r,de.g,de.b,{a:de.a}),this.pdf.setTextColor(de.r,de.g,de.b,{a:de.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(Pe){var de=g(Pe);this.ctx.strokeStyle=de.style,this.ctx.isStrokeTransparent=de.a===0,this.ctx.strokeOpacity=de.a,de.a===0?this.pdf.setDrawColor(255,255,255):(de.a,this.pdf.setDrawColor(de.r,de.g,de.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(Pe){["butt","round","square"].indexOf(Pe)!==-1&&(this.ctx.lineCap=Pe,this.pdf.setLineCap(Pe))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(Pe){isNaN(Pe)||(this.ctx.lineWidth=Pe,this.pdf.setLineWidth(Pe))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(Pe){["bevel","round","miter"].indexOf(Pe)!==-1&&(this.ctx.lineJoin=Pe,this.pdf.setLineJoin(Pe))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(Pe){isNaN(Pe)||(this.ctx.miterLimit=Pe,this.pdf.setMiterLimit(Pe))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(Pe){this.ctx.textBaseline=Pe}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(Pe){["right","end","center","left","start"].indexOf(Pe)!==-1&&(this.ctx.textAlign=Pe)}});var Re=null,Me=null;Object.defineProperty(this,"fontFaces",{get:function(){return Me},set:function(Pe){Re=null,Me=Pe}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(Pe){var de;if(this.ctx.font=Pe,(de=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(Pe))!==null){var Te=de[1];de[2];var Ae=de[3],be=de[4];de[5];var _e=de[6],xe=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(be)[2];be=Math.floor(xe==="px"?parseFloat(be)*this.pdf.internal.scaleFactor:xe==="em"?parseFloat(be)*this.pdf.getFontSize():parseFloat(be)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(be);var Le=function(ht){var vt,wr,cr=[],Pt=ht.trim();if(Pt==="")return vv;if(Pt in Sw)return[Sw[Pt]];for(;Pt!=="";){switch(wr=null,vt=(Pt=Aw(Pt)).charAt(0)){case'"':case"'":wr=ER(Pt.substring(1),vt);break;default:wr=AR(Pt)}if(wr===null||(cr.push(wr[0]),(Pt=Aw(wr[1]))!==""&&Pt.charAt(0)!==","))return vv;Pt=Pt.replace(/^,/,"")}return cr}(_e);if(this.fontFaces){var pe=function(ht,vt){if(Re===null){var wr=function(cr){var Pt=[];return Object.keys(cr).forEach(function($t){cr[$t].forEach(function($e){var ze=null;switch($e){case"bold":ze={family:$t,weight:"bold"};break;case"italic":ze={family:$t,style:"italic"};break;case"bolditalic":ze={family:$t,weight:"bold",style:"italic"};break;case"":case"normal":ze={family:$t}}ze!==null&&(ze.ref={name:$t,style:$e},Pt.push(ze))})}),Pt}(ht.getFontList());Re=function(cr){for(var Pt={},$t=0;$t<cr.length;++$t){var $e=gv(cr[$t]),ze=$e.family,kt=$e.stretch,St=$e.style,er=$e.weight;Pt[ze]=Pt[ze]||{},Pt[ze][kt]=Pt[ze][kt]||{},Pt[ze][kt][St]=Pt[ze][kt][St]||{},Pt[ze][kt][St][er]=$e}return Pt}(wr.concat(vt))}return Re}(this.pdf,this.fontFaces),Ce=Le.map(function(ht){return{family:ht,stretch:"normal",weight:Ae,style:Te}}),je=function(ht,vt,wr){for(var cr=(wr=wr||{}).defaultFontFamily||"times",Pt=Object.assign({},SR,wr.genericFontFamilies||{}),$t=null,$e=null,ze=0;ze<vt.length;++ze)if(Pt[($t=gv(vt[ze])).family]&&($t.family=Pt[$t.family]),ht.hasOwnProperty($t.family)){$e=ht[$t.family];break}if(!($e=$e||ht[cr]))throw new Error("Could not find a font-family for the rule '"+Ew($t)+"' and default family '"+cr+"'.");if($e=function(kt,St){if(St[kt])return St[kt];var er=Jv[kt],jt=er<=Jv.normal?-1:1,vr=xw(St,P7,er,jt);if(!vr)throw new Error("Could not find a matching font-stretch value for "+kt);return vr}($t.stretch,$e),$e=function(kt,St){if(St[kt])return St[kt];for(var er=A7[kt],jt=0;jt<er.length;++jt)if(St[er[jt]])return St[er[jt]];throw new Error("Could not find a matching font-style for "+kt)}($t.style,$e),!($e=function(kt,St){if(St[kt])return St[kt];if(kt===400&&St[500])return St[500];if(kt===500&&St[400])return St[400];var er=xR[kt],jt=xw(St,k7,er,kt<400?-1:1);if(!jt)throw new Error("Could not find a matching font-weight for value "+kt);return jt}($t.weight,$e)))throw new Error("Failed to resolve a font for the rule '"+Ew($t)+"'.");return $e}(pe,Ce);this.pdf.setFont(je.ref.name,je.ref.style)}else{var He="";(Ae==="bold"||parseInt(Ae,10)>=700||Te==="bold")&&(He="bold"),Te==="italic"&&(He+="italic"),He.length===0&&(He="normal");for(var st="",pt={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},ct=0;ct<Le.length;ct++){if(this.pdf.internal.getFont(Le[ct],He,{noFallback:!0,disableWarning:!0})!==void 0){st=Le[ct];break}if(He==="bolditalic"&&this.pdf.internal.getFont(Le[ct],"bold",{noFallback:!0,disableWarning:!0})!==void 0)st=Le[ct],He="bold";else if(this.pdf.internal.getFont(Le[ct],"normal",{noFallback:!0,disableWarning:!0})!==void 0){st=Le[ct],He="normal";break}}if(st===""){for(var bt=0;bt<Le.length;bt++)if(pt[Le[bt]]){st=pt[Le[bt]];break}}st=st===""?"Times":st,this.pdf.setFont(st,He)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(Pe){this.ctx.globalCompositeOperation=Pe}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(Pe){this.ctx.globalAlpha=Pe}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(Pe){this.ctx.lineDashOffset=Pe,D.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(Pe){this.ctx.lineDash=Pe,D.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(Pe){this.ctx.ignoreClearRect=!!Pe}})};v.prototype.setLineDash=function(j){this.lineDash=j},v.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},v.prototype.fill=function(){_.call(this,"fill",!1)},v.prototype.stroke=function(){_.call(this,"stroke",!1)},v.prototype.beginPath=function(){this.path=[{type:"begin"}]},v.prototype.moveTo=function(j,z){if(isNaN(j)||isNaN(z))throw zn.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var Z=this.ctx.transform.applyToPoint(new l(j,z));this.path.push({type:"mt",x:Z.x,y:Z.y}),this.ctx.lastPoint=new l(j,z)},v.prototype.closePath=function(){var j=new l(0,0),z=0;for(z=this.path.length-1;z!==-1;z--)if(this.path[z].type==="begin"&&Sn(this.path[z+1])==="object"&&typeof this.path[z+1].x=="number"){j=new l(this.path[z+1].x,this.path[z+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new l(j.x,j.y)},v.prototype.lineTo=function(j,z){if(isNaN(j)||isNaN(z))throw zn.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var Z=this.ctx.transform.applyToPoint(new l(j,z));this.path.push({type:"lt",x:Z.x,y:Z.y}),this.ctx.lastPoint=new l(Z.x,Z.y)},v.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),_.call(this,null,!0)},v.prototype.quadraticCurveTo=function(j,z,Z,re){if(isNaN(Z)||isNaN(re)||isNaN(j)||isNaN(z))throw zn.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var W=this.ctx.transform.applyToPoint(new l(Z,re)),Q=this.ctx.transform.applyToPoint(new l(j,z));this.path.push({type:"qct",x1:Q.x,y1:Q.y,x:W.x,y:W.y}),this.ctx.lastPoint=new l(W.x,W.y)},v.prototype.bezierCurveTo=function(j,z,Z,re,W,Q){if(isNaN(W)||isNaN(Q)||isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re))throw zn.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var se=this.ctx.transform.applyToPoint(new l(W,Q)),ue=this.ctx.transform.applyToPoint(new l(j,z)),le=this.ctx.transform.applyToPoint(new l(Z,re));this.path.push({type:"bct",x1:ue.x,y1:ue.y,x2:le.x,y2:le.y,x:se.x,y:se.y}),this.ctx.lastPoint=new l(se.x,se.y)},v.prototype.arc=function(j,z,Z,re,W,Q){if(isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re)||isNaN(W))throw zn.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(Q=!!Q,!this.ctx.transform.isIdentity){var se=this.ctx.transform.applyToPoint(new l(j,z));j=se.x,z=se.y;var ue=this.ctx.transform.applyToPoint(new l(0,Z)),le=this.ctx.transform.applyToPoint(new l(0,0));Z=Math.sqrt(Math.pow(ue.x-le.x,2)+Math.pow(ue.y-le.y,2))}Math.abs(W-re)>=2*Math.PI&&(re=0,W=2*Math.PI),this.path.push({type:"arc",x:j,y:z,radius:Z,startAngle:re,endAngle:W,counterclockwise:Q})},v.prototype.arcTo=function(j,z,Z,re,W){throw new Error("arcTo not implemented.")},v.prototype.rect=function(j,z,Z,re){if(isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re))throw zn.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(j,z),this.lineTo(j+Z,z),this.lineTo(j+Z,z+re),this.lineTo(j,z+re),this.lineTo(j,z),this.lineTo(j+Z,z),this.lineTo(j,z)},v.prototype.fillRect=function(j,z,Z,re){if(isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re))throw zn.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!c.call(this)){var W={};this.lineCap!=="butt"&&(W.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(W.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(j,z,Z,re),this.fill(),W.hasOwnProperty("lineCap")&&(this.lineCap=W.lineCap),W.hasOwnProperty("lineJoin")&&(this.lineJoin=W.lineJoin)}},v.prototype.strokeRect=function(j,z,Z,re){if(isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re))throw zn.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");y.call(this)||(this.beginPath(),this.rect(j,z,Z,re),this.stroke())},v.prototype.clearRect=function(j,z,Z,re){if(isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re))throw zn.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(j,z,Z,re))},v.prototype.save=function(j){j=typeof j!="boolean"||j;for(var z=this.pdf.internal.getCurrentPageInfo().pageNumber,Z=0;Z<this.pdf.internal.getNumberOfPages();Z++)this.pdf.setPage(Z+1),this.pdf.internal.out("q");if(this.pdf.setPage(z),j){this.ctx.fontSize=this.pdf.internal.getFontSize();var re=new f(this.ctx);this.ctxStack.push(this.ctx),this.ctx=re}},v.prototype.restore=function(j){j=typeof j!="boolean"||j;for(var z=this.pdf.internal.getCurrentPageInfo().pageNumber,Z=0;Z<this.pdf.internal.getNumberOfPages();Z++)this.pdf.setPage(Z+1),this.pdf.internal.out("Q");this.pdf.setPage(z),j&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},v.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var g=function(j){var z,Z,re,W;if(j.isCanvasGradient===!0&&(j=j.getColor()),!j)return{r:0,g:0,b:0,a:0,style:j};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(j))z=0,Z=0,re=0,W=0;else{var Q=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(j);if(Q!==null)z=parseInt(Q[1]),Z=parseInt(Q[2]),re=parseInt(Q[3]),W=1;else if((Q=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(j))!==null)z=parseInt(Q[1]),Z=parseInt(Q[2]),re=parseInt(Q[3]),W=parseFloat(Q[4]);else{if(W=1,typeof j=="string"&&j.charAt(0)!=="#"){var se=new y7(j);j=se.ok?se.toHex():"#000000"}j.length===4?(z=j.substring(1,2),z+=z,Z=j.substring(2,3),Z+=Z,re=j.substring(3,4),re+=re):(z=j.substring(1,3),Z=j.substring(3,5),re=j.substring(5,7)),z=parseInt(z,16),Z=parseInt(Z,16),re=parseInt(re,16)}}return{r:z,g:Z,b:re,a:W,style:j}},c=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},y=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};v.prototype.fillText=function(j,z,Z,re){if(isNaN(z)||isNaN(Z)||typeof j!="string")throw zn.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(re=isNaN(re)?void 0:re,!c.call(this)){var W=V(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;C.call(this,{text:j,x:z,y:Z,scale:Q,angle:W,align:this.textAlign,maxWidth:re})}},v.prototype.strokeText=function(j,z,Z,re){if(isNaN(z)||isNaN(Z)||typeof j!="string")throw zn.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!y.call(this)){re=isNaN(re)?void 0:re;var W=V(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;C.call(this,{text:j,x:z,y:Z,scale:Q,renderingMode:"stroke",angle:W,align:this.textAlign,maxWidth:re})}},v.prototype.measureText=function(j){if(typeof j!="string")throw zn.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var z=this.pdf,Z=this.pdf.internal.scaleFactor,re=z.internal.getFontSize(),W=z.getStringUnitWidth(j)*re/z.internal.scaleFactor;return new function(Q){var se=(Q=Q||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return se}}),this}({width:W*=Math.round(96*Z/72*1e4)/1e4})},v.prototype.scale=function(j,z){if(isNaN(j)||isNaN(z))throw zn.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var Z=new u(j,0,0,z,0,0);this.ctx.transform=this.ctx.transform.multiply(Z)},v.prototype.rotate=function(j){if(isNaN(j))throw zn.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var z=new u(Math.cos(j),Math.sin(j),-Math.sin(j),Math.cos(j),0,0);this.ctx.transform=this.ctx.transform.multiply(z)},v.prototype.translate=function(j,z){if(isNaN(j)||isNaN(z))throw zn.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var Z=new u(1,0,0,1,j,z);this.ctx.transform=this.ctx.transform.multiply(Z)},v.prototype.transform=function(j,z,Z,re,W,Q){if(isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re)||isNaN(W)||isNaN(Q))throw zn.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var se=new u(j,z,Z,re,W,Q);this.ctx.transform=this.ctx.transform.multiply(se)},v.prototype.setTransform=function(j,z,Z,re,W,Q){j=isNaN(j)?1:j,z=isNaN(z)?0:z,Z=isNaN(Z)?0:Z,re=isNaN(re)?1:re,W=isNaN(W)?0:W,Q=isNaN(Q)?0:Q,this.ctx.transform=new u(j,z,Z,re,W,Q)};var x=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};v.prototype.drawImage=function(j,z,Z,re,W,Q,se,ue,le){var ye=this.pdf.getImageProperties(j),Re=1,Me=1,Pe=1,de=1;re!==void 0&&ue!==void 0&&(Pe=ue/re,de=le/W,Re=ye.width/re*ue/re,Me=ye.height/W*le/W),Q===void 0&&(Q=z,se=Z,z=0,Z=0),re!==void 0&&ue===void 0&&(ue=re,le=W),re===void 0&&ue===void 0&&(ue=ye.width,le=ye.height);for(var Te,Ae=this.ctx.transform.decompose(),be=V(Ae.rotate.shx),_e=new u,xe=(_e=(_e=(_e=_e.multiply(Ae.translate)).multiply(Ae.skew)).multiply(Ae.scale)).applyToRectangle(new o(Q-z*Pe,se-Z*de,re*Re,W*Me)),Le=E.call(this,xe),pe=[],Ce=0;Ce<Le.length;Ce+=1)pe.indexOf(Le[Ce])===-1&&pe.push(Le[Ce]);if(w(pe),this.autoPaging)for(var je=pe[0],He=pe[pe.length-1],st=je;st<He+1;st++){this.pdf.setPage(st);var pt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ct=st===1?this.posY+this.margin[0]:this.margin[0],bt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ht=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],vt=st===1?0:bt+(st-2)*ht;if(this.ctx.clip_path.length!==0){var wr=this.path;Te=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(Te,this.posX+this.margin[3],-vt+ct+this.ctx.prevPageLastElemOffset),A.call(this,"fill",!0),this.path=wr}var cr=JSON.parse(JSON.stringify(xe));cr=b([cr],this.posX+this.margin[3],-vt+ct+this.ctx.prevPageLastElemOffset)[0];var Pt=(st>je||st<He)&&x.call(this);Pt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],pt,ht,null).clip().discardPath()),this.pdf.addImage(j,"JPEG",cr.x,cr.y,cr.w,cr.h,null,null,be),Pt&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(j,"JPEG",xe.x,xe.y,xe.w,xe.h,null,null,be)};var E=function(j,z,Z){var re=[];z=z||this.pdf.internal.pageSize.width,Z=Z||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var W=this.posY+this.ctx.prevPageLastElemOffset;switch(j.type){default:case"mt":case"lt":re.push(Math.floor((j.y+W)/Z)+1);break;case"arc":re.push(Math.floor((j.y+W-j.radius)/Z)+1),re.push(Math.floor((j.y+W+j.radius)/Z)+1);break;case"qct":var Q=Y(this.ctx.lastPoint.x,this.ctx.lastPoint.y,j.x1,j.y1,j.x,j.y);re.push(Math.floor((Q.y+W)/Z)+1),re.push(Math.floor((Q.y+Q.h+W)/Z)+1);break;case"bct":var se=U(this.ctx.lastPoint.x,this.ctx.lastPoint.y,j.x1,j.y1,j.x2,j.y2,j.x,j.y);re.push(Math.floor((se.y+W)/Z)+1),re.push(Math.floor((se.y+se.h+W)/Z)+1);break;case"rect":re.push(Math.floor((j.y+W)/Z)+1),re.push(Math.floor((j.y+j.h+W)/Z)+1)}for(var ue=0;ue<re.length;ue+=1)for(;this.pdf.internal.getNumberOfPages()<re[ue];)S.call(this);return re},S=function(){var j=this.fillStyle,z=this.strokeStyle,Z=this.font,re=this.lineCap,W=this.lineWidth,Q=this.lineJoin;this.pdf.addPage(),this.fillStyle=j,this.strokeStyle=z,this.font=Z,this.lineCap=re,this.lineWidth=W,this.lineJoin=Q},b=function(j,z,Z){for(var re=0;re<j.length;re++)switch(j[re].type){case"bct":j[re].x2+=z,j[re].y2+=Z;case"qct":j[re].x1+=z,j[re].y1+=Z;default:j[re].x+=z,j[re].y+=Z}return j},w=function(j){return j.sort(function(z,Z){return z-Z})},_=function(j,z){for(var Z,re,W=this.fillStyle,Q=this.strokeStyle,se=this.lineCap,ue=this.lineWidth,le=Math.abs(ue*this.ctx.transform.scaleX),ye=this.lineJoin,Re=JSON.parse(JSON.stringify(this.path)),Me=JSON.parse(JSON.stringify(this.path)),Pe=[],de=0;de<Me.length;de++)if(Me[de].x!==void 0)for(var Te=E.call(this,Me[de]),Ae=0;Ae<Te.length;Ae+=1)Pe.indexOf(Te[Ae])===-1&&Pe.push(Te[Ae]);for(var be=0;be<Pe.length;be++)for(;this.pdf.internal.getNumberOfPages()<Pe[be];)S.call(this);if(w(Pe),this.autoPaging)for(var _e=Pe[0],xe=Pe[Pe.length-1],Le=_e;Le<xe+1;Le++){this.pdf.setPage(Le),this.fillStyle=W,this.strokeStyle=Q,this.lineCap=se,this.lineWidth=le,this.lineJoin=ye;var pe=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Ce=Le===1?this.posY+this.margin[0]:this.margin[0],je=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],He=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],st=Le===1?0:je+(Le-2)*He;if(this.ctx.clip_path.length!==0){var pt=this.path;Z=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(Z,this.posX+this.margin[3],-st+Ce+this.ctx.prevPageLastElemOffset),A.call(this,j,!0),this.path=pt}if(re=JSON.parse(JSON.stringify(Re)),this.path=b(re,this.posX+this.margin[3],-st+Ce+this.ctx.prevPageLastElemOffset),z===!1||Le===0){var ct=(Le>_e||Le<xe)&&x.call(this);ct&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],pe,He,null).clip().discardPath()),A.call(this,j,z),ct&&this.pdf.restoreGraphicsState()}this.lineWidth=ue}else this.lineWidth=le,A.call(this,j,z),this.lineWidth=ue;this.path=Re},A=function(j,z){if((j!=="stroke"||z||!y.call(this))&&(j==="stroke"||z||!c.call(this))){for(var Z,re,W=[],Q=this.path,se=0;se<Q.length;se++){var ue=Q[se];switch(ue.type){case"begin":W.push({begin:!0});break;case"close":W.push({close:!0});break;case"mt":W.push({start:ue,deltas:[],abs:[]});break;case"lt":var le=W.length;if(Q[se-1]&&!isNaN(Q[se-1].x)&&(Z=[ue.x-Q[se-1].x,ue.y-Q[se-1].y],le>0)){for(;le>=0;le--)if(W[le-1].close!==!0&&W[le-1].begin!==!0){W[le-1].deltas.push(Z),W[le-1].abs.push(ue);break}}break;case"bct":Z=[ue.x1-Q[se-1].x,ue.y1-Q[se-1].y,ue.x2-Q[se-1].x,ue.y2-Q[se-1].y,ue.x-Q[se-1].x,ue.y-Q[se-1].y],W[W.length-1].deltas.push(Z);break;case"qct":var ye=Q[se-1].x+2/3*(ue.x1-Q[se-1].x),Re=Q[se-1].y+2/3*(ue.y1-Q[se-1].y),Me=ue.x+2/3*(ue.x1-ue.x),Pe=ue.y+2/3*(ue.y1-ue.y),de=ue.x,Te=ue.y;Z=[ye-Q[se-1].x,Re-Q[se-1].y,Me-Q[se-1].x,Pe-Q[se-1].y,de-Q[se-1].x,Te-Q[se-1].y],W[W.length-1].deltas.push(Z);break;case"arc":W.push({deltas:[],abs:[],arc:!0}),Array.isArray(W[W.length-1].abs)&&W[W.length-1].abs.push(ue)}}re=z?null:j==="stroke"?"stroke":"fill";for(var Ae=!1,be=0;be<W.length;be++)if(W[be].arc)for(var _e=W[be].abs,xe=0;xe<_e.length;xe++){var Le=_e[xe];Le.type==="arc"?L.call(this,Le.x,Le.y,Le.radius,Le.startAngle,Le.endAngle,Le.counterclockwise,void 0,z,!Ae):q.call(this,Le.x,Le.y),Ae=!0}else if(W[be].close===!0)this.pdf.internal.out("h"),Ae=!1;else if(W[be].begin!==!0){var pe=W[be].start.x,Ce=W[be].start.y;G.call(this,W[be].deltas,pe,Ce),Ae=!0}re&&R.call(this,re),z&&T.call(this)}},M=function(j){var z=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,Z=z*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return j-Z;case"top":return j+z-Z;case"hanging":return j+z-2*Z;case"middle":return j+z/2-Z;default:return j}},O=function(j){return j+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};v.prototype.createLinearGradient=function(){var j=function(){};return j.colorStops=[],j.addColorStop=function(z,Z){this.colorStops.push([z,Z])},j.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},j.isCanvasGradient=!0,j},v.prototype.createPattern=function(){return this.createLinearGradient()},v.prototype.createRadialGradient=function(){return this.createLinearGradient()};var L=function(j,z,Z,re,W,Q,se,ue,le){for(var ye=ae.call(this,Z,re,W,Q),Re=0;Re<ye.length;Re++){var Me=ye[Re];Re===0&&(le?k.call(this,Me.x1+j,Me.y1+z):q.call(this,Me.x1+j,Me.y1+z)),J.call(this,j,z,Me.x2,Me.y2,Me.x3,Me.y3,Me.x4,Me.y4)}ue?T.call(this):R.call(this,se)},R=function(j){switch(j){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},T=function(){this.pdf.clip(),this.pdf.discardPath()},k=function(j,z){this.pdf.internal.out(r(j)+" "+n(z)+" m")},C=function(j){var z;switch(j.align){case"right":case"end":z="right";break;case"center":z="center";break;default:z="left"}var Z=this.pdf.getTextDimensions(j.text),re=M.call(this,j.y),W=O.call(this,re)-Z.h,Q=this.ctx.transform.applyToPoint(new l(j.x,re)),se=this.ctx.transform.decompose(),ue=new u;ue=(ue=(ue=ue.multiply(se.translate)).multiply(se.skew)).multiply(se.scale);for(var le,ye,Re,Me=this.ctx.transform.applyToRectangle(new o(j.x,re,Z.w,Z.h)),Pe=ue.applyToRectangle(new o(j.x,W,Z.w,Z.h)),de=E.call(this,Pe),Te=[],Ae=0;Ae<de.length;Ae+=1)Te.indexOf(de[Ae])===-1&&Te.push(de[Ae]);if(w(Te),this.autoPaging)for(var be=Te[0],_e=Te[Te.length-1],xe=be;xe<_e+1;xe++){this.pdf.setPage(xe);var Le=xe===1?this.posY+this.margin[0]:this.margin[0],pe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ce=this.pdf.internal.pageSize.height-this.margin[2],je=Ce-this.margin[0],He=this.pdf.internal.pageSize.width-this.margin[1],st=He-this.margin[3],pt=xe===1?0:pe+(xe-2)*je;if(this.ctx.clip_path.length!==0){var ct=this.path;le=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(le,this.posX+this.margin[3],-1*pt+Le),A.call(this,"fill",!0),this.path=ct}var bt=b([JSON.parse(JSON.stringify(Pe))],this.posX+this.margin[3],-pt+Le+this.ctx.prevPageLastElemOffset)[0];j.scale>=.01&&(ye=this.pdf.internal.getFontSize(),this.pdf.setFontSize(ye*j.scale),Re=this.lineWidth,this.lineWidth=Re*j.scale);var ht=this.autoPaging!=="text";if(ht||bt.y+bt.h<=Ce){if(ht||bt.y>=Le&&bt.x<=He){var vt=ht?j.text:this.pdf.splitTextToSize(j.text,j.maxWidth||He-bt.x)[0],wr=b([JSON.parse(JSON.stringify(Me))],this.posX+this.margin[3],-pt+Le+this.ctx.prevPageLastElemOffset)[0],cr=ht&&(xe>be||xe<_e)&&x.call(this);cr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],st,je,null).clip().discardPath()),this.pdf.text(vt,wr.x,wr.y,{angle:j.angle,align:z,renderingMode:j.renderingMode}),cr&&this.pdf.restoreGraphicsState()}}else bt.y<Ce&&(this.ctx.prevPageLastElemOffset+=Ce-bt.y);j.scale>=.01&&(this.pdf.setFontSize(ye),this.lineWidth=Re)}else j.scale>=.01&&(ye=this.pdf.internal.getFontSize(),this.pdf.setFontSize(ye*j.scale),Re=this.lineWidth,this.lineWidth=Re*j.scale),this.pdf.text(j.text,Q.x+this.posX,Q.y+this.posY,{angle:j.angle,align:z,renderingMode:j.renderingMode,maxWidth:j.maxWidth}),j.scale>=.01&&(this.pdf.setFontSize(ye),this.lineWidth=Re)},q=function(j,z,Z,re){Z=Z||0,re=re||0,this.pdf.internal.out(r(j+Z)+" "+n(z+re)+" l")},G=function(j,z,Z){return this.pdf.lines(j,z,Z,null,null)},J=function(j,z,Z,re,W,Q,se,ue){this.pdf.internal.out([t(i(Z+j)),t(a(re+z)),t(i(W+j)),t(a(Q+z)),t(i(se+j)),t(a(ue+z)),"c"].join(" "))},ae=function(j,z,Z,re){for(var W=2*Math.PI,Q=Math.PI/2;z>Z;)z-=W;var se=Math.abs(Z-z);se<W&&re&&(se=W-se);for(var ue=[],le=re?-1:1,ye=z;se>1e-5;){var Re=ye+le*Math.min(se,Q);ue.push(H.call(this,j,ye,Re)),se-=Math.abs(Re-ye),ye=Re}return ue},H=function(j,z,Z){var re=(Z-z)/2,W=j*Math.cos(re),Q=j*Math.sin(re),se=W,ue=-Q,le=se*se+ue*ue,ye=le+se*W+ue*Q,Re=4/3*(Math.sqrt(2*le*ye)-ye)/(se*Q-ue*W),Me=se-Re*ue,Pe=ue+Re*se,de=Me,Te=-Pe,Ae=re+z,be=Math.cos(Ae),_e=Math.sin(Ae);return{x1:j*Math.cos(z),y1:j*Math.sin(z),x2:Me*be-Pe*_e,y2:Me*_e+Pe*be,x3:de*be-Te*_e,y3:de*_e+Te*be,x4:j*Math.cos(Z),y4:j*Math.sin(Z)}},V=function(j){return 180*j/Math.PI},Y=function(j,z,Z,re,W,Q){var se=j+.5*(Z-j),ue=z+.5*(re-z),le=W+.5*(Z-W),ye=Q+.5*(re-Q),Re=Math.min(j,W,se,le),Me=Math.max(j,W,se,le),Pe=Math.min(z,Q,ue,ye),de=Math.max(z,Q,ue,ye);return new o(Re,Pe,Me-Re,de-Pe)},U=function(j,z,Z,re,W,Q,se,ue){var le,ye,Re,Me,Pe,de,Te,Ae,be,_e,xe,Le,pe,Ce,je=Z-j,He=re-z,st=W-Z,pt=Q-re,ct=se-W,bt=ue-Q;for(ye=0;ye<41;ye++)be=(Te=(Re=j+(le=ye/40)*je)+le*((Pe=Z+le*st)-Re))+le*(Pe+le*(W+le*ct-Pe)-Te),_e=(Ae=(Me=z+le*He)+le*((de=re+le*pt)-Me))+le*(de+le*(Q+le*bt-de)-Ae),ye==0?(xe=be,Le=_e,pe=be,Ce=_e):(xe=Math.min(xe,be),Le=Math.min(Le,_e),pe=Math.max(pe,be),Ce=Math.max(Ce,_e));return new o(Math.round(xe),Math.round(Le),Math.round(pe-xe),Math.round(Ce-Le))},D=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var j,z,Z=(j=this.ctx.lineDash,z=this.ctx.lineDashOffset,JSON.stringify({lineDash:j,lineDashOffset:z}));this.prevLineDash!==Z&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=Z)}}})(Kt.API),function(e){var t=function(l){var o,u,d,f,v,g,c,y,x,E;for(u=[],d=0,f=(l+=o="\0\0\0\0".slice(l.length%4||4)).length;f>d;d+=4)(v=(l.charCodeAt(d)<<24)+(l.charCodeAt(d+1)<<16)+(l.charCodeAt(d+2)<<8)+l.charCodeAt(d+3))!==0?(g=(v=((v=((v=((v=(v-(E=v%85))/85)-(x=v%85))/85)-(y=v%85))/85)-(c=v%85))/85)%85,u.push(g+33,c+33,y+33,x+33,E+33)):u.push(122);return function(S,b){for(var w=b;w>0;w--)S.pop()}(u,o.length),String.fromCharCode.apply(String,u)+"~>"},r=function(l){var o,u,d,f,v,g=String,c="length",y=255,x="charCodeAt",E="slice",S="replace";for(l[E](-2),l=l[E](0,-2)[S](/\s/g,"")[S]("z","!!!!!"),d=[],f=0,v=(l+=o="uuuuu"[E](l[c]%5||5))[c];v>f;f+=5)u=52200625*(l[x](f)-33)+614125*(l[x](f+1)-33)+7225*(l[x](f+2)-33)+85*(l[x](f+3)-33)+(l[x](f+4)-33),d.push(y&u>>24,y&u>>16,y&u>>8,y&u);return function(b,w){for(var _=w;_>0;_--)b.pop()}(d,o[c]),g.fromCharCode.apply(g,d)},n=function(l){return l.split("").map(function(o){return("0"+o.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(l){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((l=l.replace(/\s/g,"")).indexOf(">")!==-1&&(l=l.substr(0,l.indexOf(">"))),l.length%2&&(l+="0"),o.test(l)===!1)return"";for(var u="",d=0;d<l.length;d+=2)u+=String.fromCharCode("0x"+(l[d]+l[d+1]));return u},a=function(l){for(var o=new Uint8Array(l.length),u=l.length;u--;)o[u]=l.charCodeAt(u);return(o=$v(o)).reduce(function(d,f){return d+String.fromCharCode(f)},"")};e.processDataByFilters=function(l,o){var u=0,d=l||"",f=[];for(typeof(o=o||[])=="string"&&(o=[o]),u=0;u<o.length;u+=1)switch(o[u]){case"ASCII85Decode":case"/ASCII85Decode":d=r(d),f.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":d=t(d),f.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":d=i(d),f.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":d=n(d),f.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":d=a(d),f.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[u]+'" is not implemented')}return{data:d,reverseChain:f.reverse().join(" ")}}}(Kt.API),function(e){e.loadFile=function(t,r,n){return function(i,a,l){a=a!==!1,l=typeof l=="function"?l:function(){};var o=void 0;try{o=function(u,d,f){var v=new XMLHttpRequest,g=0,c=function(y){var x=y.length,E=[],S=String.fromCharCode;for(g=0;g<x;g+=1)E.push(S(255&y.charCodeAt(g)));return E.join("")};if(v.open("GET",u,!d),v.overrideMimeType("text/plain; charset=x-user-defined"),d===!1&&(v.onload=function(){v.status===200?f(c(this.responseText)):f(void 0)}),v.send(null),d&&v.status===200)return c(v.responseText)}(i,a,l)}catch{}return o}(t,r,n)},e.loadImageFile=e.loadFile}(Kt.API),function(e){function t(){return(dr.html2canvas?Promise.resolve(dr.html2canvas):Z2(()=>import("./html2canvas.esm-BfxBtG_O.js"),[],import.meta.url)).catch(function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))}).then(function(o){return o.default?o.default:o})}function r(){return(dr.DOMPurify?Promise.resolve(dr.DOMPurify):Z2(()=>import("./purify.es-CQJ0hv7W.js"),[],import.meta.url)).catch(function(o){return Promise.reject(new Error("Could not load dompurify: "+o))}).then(function(o){return o.default?o.default:o})}var n=function(o){var u=Sn(o);return u==="undefined"?"undefined":u==="string"||o instanceof String?"string":u==="number"||o instanceof Number?"number":u==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":u==="object"?"object":"unknown"},i=function(o,u){var d=document.createElement(o);for(var f in u.className&&(d.className=u.className),u.innerHTML&&u.dompurify&&(d.innerHTML=u.dompurify.sanitize(u.innerHTML)),u.style)d.style[f]=u.style[f];return d},a=function o(u,d){for(var f=u.nodeType===3?document.createTextNode(u.nodeValue):u.cloneNode(!1),v=u.firstChild;v;v=v.nextSibling)d!==!0&&v.nodeType===1&&v.nodeName==="SCRIPT"||f.appendChild(o(v,d));return u.nodeType===1&&(u.nodeName==="CANVAS"?(f.width=u.width,f.height=u.height,f.getContext("2d").drawImage(u,0,0)):u.nodeName!=="TEXTAREA"&&u.nodeName!=="SELECT"||(f.value=u.value),f.addEventListener("load",function(){f.scrollTop=u.scrollTop,f.scrollLeft=u.scrollLeft},!0)),f},l=function o(u){var d=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),f=o.convert(Promise.resolve(),d);return(f=f.setProgress(1,o,1,[o])).set(u)};(l.prototype=Object.create(Promise.prototype)).constructor=l,l.convert=function(o,u){return o.__proto__=u||l.prototype,o},l.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},l.prototype.from=function(o,u){return this.then(function(){switch(u=u||function(d){switch(n(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(o),u){case"string":return this.then(r).then(function(d){return this.set({src:i("div",{innerHTML:o,dompurify:d})})});case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}})},l.prototype.to=function(o){switch(o){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},l.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var o={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},u=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);u.tagName==="BODY"&&(o.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:o}),this.prop.container.appendChild(u),this.prop.container.firstChild.appendChild(i("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},l.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(t).then(function(u){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,u(this.prop.container,d)}).then(function(u){(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},l.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(t).then(function(u){var d=this.opt.jsPDF,f=this.opt.fontFaces,v=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,g=Object.assign({async:!0,allowTaint:!0,scale:v,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete g.onrendered,d.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,d.context2d.posX=this.opt.x,d.context2d.posY=this.opt.y,d.context2d.margin=this.opt.margin,d.context2d.fontFaces=f,f)for(var c=0;c<f.length;++c){var y=f[c],x=y.src.find(function(E){return E.format==="truetype"});x&&d.addFont(x.url,y.ref.name,y.ref.style)}return g.windowHeight=g.windowHeight||0,g.windowHeight=g.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):g.windowHeight,d.context2d.save(!0),u(this.prop.container,g)}).then(function(u){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},l.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o})},l.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},l.prototype.output=function(o,u,d){return(d=d||"pdf").toLowerCase()==="img"||d.toLowerCase()==="image"?this.outputImg(o,u):this.outputPdf(o,u)},l.prototype.outputPdf=function(o,u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(o,u)})},l.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(o){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+o+'" is not supported.'}})},l.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},l.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},l.prototype.set=function(o){if(n(o)!=="object")return this;var u=Object.keys(o||{}).map(function(d){if(d in l.template.prop)return function(){this.prop[d]=o[d]};switch(d){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[d]=o[d]}}},this);return this.then(function(){return this.thenList(u)})},l.prototype.get=function(o,u){return this.then(function(){var d=o in l.template.prop?this.prop[o]:this.opt[o];return u?u(d):d})},l.prototype.setMargin=function(o){return this.then(function(){switch(n(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o}).then(this.setPageSize)},l.prototype.setPageSize=function(o){function u(d,f){return Math.floor(d*f/72*96)}return this.then(function(){(o=o||Kt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:u(o.inner.width,o.k),height:u(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o})},l.prototype.setProgress=function(o,u,d,f){return o!=null&&(this.progress.val=o),u!=null&&(this.progress.state=u),d!=null&&(this.progress.n=d),f!=null&&(this.progress.stack=f),this.progress.ratio=this.progress.val/this.progress.state,this},l.prototype.updateProgress=function(o,u,d,f){return this.setProgress(o?this.progress.val+o:null,u||null,d?this.progress.n+d:null,f?this.progress.stack.concat(f):null)},l.prototype.then=function(o,u){var d=this;return this.thenCore(o,u,function(f,v){return d.updateProgress(null,null,1,[f]),Promise.prototype.then.call(this,function(g){return d.updateProgress(null,f),g}).then(f,v).then(function(g){return d.updateProgress(1),g})})},l.prototype.thenCore=function(o,u,d){d=d||Promise.prototype.then;var f=this;o&&(o=o.bind(f)),u&&(u=u.bind(f));var v=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?f:l.convert(Object.assign({},f),Promise.prototype),g=d.call(v,o,u);return l.convert(g,f.__proto__)},l.prototype.thenExternal=function(o,u){return Promise.prototype.then.call(this,o,u)},l.prototype.thenList=function(o){var u=this;return o.forEach(function(d){u=u.thenCore(d)}),u},l.prototype.catch=function(o){o&&(o=o.bind(this));var u=Promise.prototype.catch.call(this,o);return l.convert(u,this)},l.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},l.prototype.error=function(o){return this.then(function(){throw new Error(o)})},l.prototype.using=l.prototype.set,l.prototype.saveAs=l.prototype.save,l.prototype.export=l.prototype.output,l.prototype.run=l.prototype.then,Kt.getPageSize=function(o,u,d){if(Sn(o)==="object"){var f=o;o=f.orientation,u=f.unit||u,d=f.format||d}u=u||"mm",d=d||"a4",o=(""+(o||"P")).toLowerCase();var v,g=(""+d).toLowerCase(),c={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(u){case"pt":v=1;break;case"mm":v=72/25.4;break;case"cm":v=72/2.54;break;case"in":v=72;break;case"px":v=.75;break;case"pc":case"em":v=12;break;case"ex":v=6;break;default:throw"Invalid unit: "+u}var y,x=0,E=0;if(c.hasOwnProperty(g))x=c[g][1]/v,E=c[g][0]/v;else try{x=d[1],E=d[0]}catch{throw new Error("Invalid format: "+d)}if(o==="p"||o==="portrait")o="p",E>x&&(y=E,E=x,x=y);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",x>E&&(y=E,E=x,x=y)}return{width:E,height:x,unit:u,k:v,orientation:o}},e.html=function(o,u){(u=u||{}).callback=u.callback||function(){},u.html2canvas=u.html2canvas||{},u.html2canvas.canvas=u.html2canvas.canvas||this.canvas,u.jsPDF=u.jsPDF||this,u.fontFaces=u.fontFaces?u.fontFaces.map(gv):null;var d=new l(u);return u.worker?d:d.from(o).doCallback()}}(Kt.API),Kt.API.addJS=function(e){return kw=e,this.internal.events.subscribe("postPutResources",function(){y1=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(y1+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Pw=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+kw+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){y1!==void 0&&Pw!==void 0&&this.internal.out("/Names <</JavaScript "+y1+" 0 R>>")}),this},function(e){var t;e.events.push(["postPutResources",function(){var r=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=r.outline.render().split(/\r\n/),a=0;a<i.length;a++){var l=i[a],o=n.exec(l);if(o!=null){var u=o[1];r.internal.newObjectDeferredBegin(u,!1)}r.internal.write(l)}if(this.outline.createNamedDestinations){var d=this.internal.pages.length,f=[];for(a=0;a<d;a++){var v=r.internal.newObject();f.push(v);var g=r.internal.getPageInfo(a+1);r.internal.write("<< /D["+g.objId+" 0 R /XYZ null null null]>> endobj")}var c=r.internal.newObject();for(r.internal.write("<< /Names [ "),a=0;a<f.length;a++)r.internal.write("(page_"+(a+1)+")"+f[a]+" 0 R");r.internal.write(" ] >>","endobj"),t=r.internal.newObject(),r.internal.write("<< /Dests "+c+" 0 R"),r.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){var r=this;r.outline.root.children.length>0&&(r.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&r.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var r=this;r.outline={createNamedDestinations:!1,root:{children:[]}},r.outline.add=function(n,i,a){var l={title:i,options:a,children:[]};return n==null&&(n=this.root),n.children.push(l),l},r.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=r,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},r.outline.genIds_r=function(n){n.id=r.internal.newObjectDeferred();for(var i=0;i<n.children.length;i++)this.genIds_r(n.children[i])},r.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},r.outline.renderItems=function(n){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<n.children.length;a++){var l=n.children[a];this.objStart(l),this.line("/Title "+this.makeString(l.title)),this.line("/Parent "+this.makeRef(n)),a>0&&this.line("/Prev "+this.makeRef(n.children[a-1])),a<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[a+1])),l.children.length>0&&(this.line("/First "+this.makeRef(l.children[0])),this.line("/Last "+this.makeRef(l.children[l.children.length-1])));var o=this.count=this.count_r({count:0},l);if(o>0&&this.line("/Count "+o),l.options&&l.options.pageNumber){var u=r.internal.getPageInfo(l.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var d=0;d<n.children.length;d++)this.renderItems(n.children[d])},r.outline.line=function(n){this.ctx.val+=n+`\r
|
|
522
|
+
*/function Ml(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Dw(e){function t(R){if(!R)throw Error("assert :P")}function r(R,T,k){for(var C=0;4>C;C++)if(R[T+C]!=k.charCodeAt(C))return!0;return!1}function n(R,T,k,C,q){for(var G=0;G<q;G++)R[T+G]=k[C+G]}function i(R,T,k,C){for(var q=0;q<C;q++)R[T+q]=k}function a(R){return new Int32Array(R)}function l(R,T){for(var k=[],C=0;C<R;C++)k.push(new T);return k}function o(R,T){var k=[];return function C(q,G,J){for(var ae=J[G],H=0;H<ae&&(q.push(J.length>G+1?[]:new T),!(J.length<G+1));H++)C(q[H],G+1,J)}(k,0,R),k}var u=function(){var R=this;function T(N,B){for(var te=1<<B-1>>>0;N&te;)te>>>=1;return te?(N&te-1)+te:N}function k(N,B,te,ie,he){t(!(ie%te));do N[B+(ie-=te)]=he;while(0<ie)}function C(N,B,te,ie,he){if(t(2328>=he),512>=he)var ve=a(512);else if((ve=a(he))==null)return 0;return function(me,we,Se,Oe,De,Ze){var ke,qe,Ke=we,it=1<<Se,Ye=a(16),nt=a(16);for(t(De!=0),t(Oe!=null),t(me!=null),t(0<Se),qe=0;qe<De;++qe){if(15<Oe[qe])return 0;++Ye[Oe[qe]]}if(Ye[0]==De)return 0;for(nt[1]=0,ke=1;15>ke;++ke){if(Ye[ke]>1<<ke)return 0;nt[ke+1]=nt[ke]+Ye[ke]}for(qe=0;qe<De;++qe)ke=Oe[qe],0<Oe[qe]&&(Ze[nt[ke]++]=qe);if(nt[15]==1)return(Oe=new q).g=0,Oe.value=Ze[0],k(me,Ke,1,it,Oe),it;var Ue,ot=-1,ut=it-1,qt=0,Mt=1,ar=1,It=1<<Se;for(qe=0,ke=1,De=2;ke<=Se;++ke,De<<=1){if(Mt+=ar<<=1,0>(ar-=Ye[ke]))return 0;for(;0<Ye[ke];--Ye[ke])(Oe=new q).g=ke,Oe.value=Ze[qe++],k(me,Ke+qt,De,It,Oe),qt=T(qt,ke)}for(ke=Se+1,De=2;15>=ke;++ke,De<<=1){if(Mt+=ar<<=1,0>(ar-=Ye[ke]))return 0;for(;0<Ye[ke];--Ye[ke]){if(Oe=new q,(qt&ut)!=ot){for(Ke+=It,Ue=1<<(ot=ke)-Se;15>ot&&!(0>=(Ue-=Ye[ot]));)++ot,Ue<<=1;it+=It=1<<(Ue=ot-Se),me[we+(ot=qt&ut)].g=Ue+Se,me[we+ot].value=Ke-we-ot}Oe.g=ke-Se,Oe.value=Ze[qe++],k(me,Ke+(qt>>Se),De,It,Oe),qt=T(qt,ke)}}return Mt!=2*nt[15]-1?0:it}(N,B,te,ie,he,ve)}function q(){this.value=this.g=0}function G(){this.value=this.g=0}function J(){this.G=l(5,q),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=l(Vn,G)}function ae(N,B,te,ie){t(N!=null),t(B!=null),t(2147483648>ie),N.Ca=254,N.I=0,N.b=-8,N.Ka=0,N.oa=B,N.pa=te,N.Jd=B,N.Yc=te+ie,N.Zc=4<=ie?te+ie-4+1:te,se(N)}function H(N,B){for(var te=0;0<B--;)te|=le(N,128)<<B;return te}function V(N,B){var te=H(N,B);return ue(N)?-te:te}function Y(N,B,te,ie){var he,ve=0;for(t(N!=null),t(B!=null),t(4294967288>ie),N.Sb=ie,N.Ra=0,N.u=0,N.h=0,4<ie&&(ie=4),he=0;he<ie;++he)ve+=B[te+he]<<8*he;N.Ra=ve,N.bb=ie,N.oa=B,N.pa=te}function U(N){for(;8<=N.u&&N.bb<N.Sb;)N.Ra>>>=8,N.Ra+=N.oa[N.pa+N.bb]<<ca-8>>>0,++N.bb,N.u-=8;re(N)&&(N.h=1,N.u=0)}function D(N,B){if(t(0<=B),!N.h&&B<=Ql){var te=Z(N)&os[B];return N.u+=B,U(N),te}return N.h=1,N.u=0}function j(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function z(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function Z(N){return N.Ra>>>(N.u&ca-1)>>>0}function re(N){return t(N.bb<=N.Sb),N.h||N.bb==N.Sb&&N.u>ca}function W(N,B){N.u=B,N.h=re(N)}function Q(N){N.u>=Jr&&(t(N.u>=Jr),U(N))}function se(N){t(N!=null&&N.oa!=null),N.pa<N.Zc?(N.I=(N.oa[N.pa++]|N.I<<8)>>>0,N.b+=8):(t(N!=null&&N.oa!=null),N.pa<N.Yc?(N.b+=8,N.I=N.oa[N.pa++]|N.I<<8):N.Ka?N.b=0:(N.I<<=8,N.b+=8,N.Ka=1))}function ue(N){return H(N,1)}function le(N,B){var te=N.Ca;0>N.b&&se(N);var ie=N.b,he=te*B>>>8,ve=(N.I>>>ie>he)+0;for(ve?(te-=he,N.I-=he+1<<ie>>>0):te=he+1,ie=te,he=0;256<=ie;)he+=8,ie>>=8;return ie=7^he+vl[ie],N.b-=ie,N.Ca=(te<<ie)-1,ve}function ye(N,B,te){N[B+0]=te>>24&255,N[B+1]=te>>16&255,N[B+2]=te>>8&255,N[B+3]=255&te}function Re(N,B){return N[B+0]|N[B+1]<<8}function Me(N,B){return Re(N,B)|N[B+2]<<16}function Pe(N,B){return Re(N,B)|Re(N,B+2)<<16}function de(N,B){var te=1<<B;return t(N!=null),t(0<B),N.X=a(te),N.X==null?0:(N.Mb=32-B,N.Xa=B,1)}function Te(N,B){t(N!=null),t(B!=null),t(N.Xa==B.Xa),n(B.X,0,N.X,0,1<<B.Xa)}function Ae(){this.X=[],this.Xa=this.Mb=0}function be(N,B,te,ie){t(te!=null),t(ie!=null);var he=te[0],ve=ie[0];return he==0&&(he=(N*ve+B/2)/B),ve==0&&(ve=(B*he+N/2)/N),0>=he||0>=ve?0:(te[0]=he,ie[0]=ve,1)}function _e(N,B){return N+(1<<B)-1>>>B}function xe(N,B){return((4278255360&N)+(4278255360&B)>>>0&4278255360)+((16711935&N)+(16711935&B)>>>0&16711935)>>>0}function Le(N,B){R[B]=function(te,ie,he,ve,me,we,Se){var Oe;for(Oe=0;Oe<me;++Oe){var De=R[N](we[Se+Oe-1],he,ve+Oe);we[Se+Oe]=xe(te[ie+Oe],De)}}}function pe(){this.ud=this.hd=this.jd=0}function Ce(N,B){return((4278124286&(N^B))>>>1)+(N&B)>>>0}function je(N){return 0<=N&&256>N?N:0>N?0:255<N?255:void 0}function He(N,B){return je(N+(N-B+.5>>1))}function st(N,B,te){return Math.abs(B-te)-Math.abs(N-te)}function pt(N,B,te,ie,he,ve,me){for(ie=ve[me-1],te=0;te<he;++te)ve[me+te]=ie=xe(N[B+te],ie)}function ct(N,B,te,ie,he){var ve;for(ve=0;ve<te;++ve){var me=N[B+ve],we=me>>8&255,Se=16711935&(Se=(Se=16711935&me)+((we<<16)+we));ie[he+ve]=(4278255360&me)+Se>>>0}}function bt(N,B){B.jd=255&N,B.hd=N>>8&255,B.ud=N>>16&255}function ht(N,B,te,ie,he,ve){var me;for(me=0;me<ie;++me){var we=B[te+me],Se=we>>>8,Oe=we,De=255&(De=(De=we>>>16)+((N.jd<<24>>24)*(Se<<24>>24)>>>5));Oe=255&(Oe=(Oe+=(N.hd<<24>>24)*(Se<<24>>24)>>>5)+((N.ud<<24>>24)*(De<<24>>24)>>>5)),he[ve+me]=(4278255360&we)+(De<<16)+Oe}}function vt(N,B,te,ie,he){R[B]=function(ve,me,we,Se,Oe,De,Ze,ke,qe){for(Se=Ze;Se<ke;++Se)for(Ze=0;Ze<qe;++Ze)Oe[De++]=he(we[ie(ve[me++])])},R[N]=function(ve,me,we,Se,Oe,De,Ze){var ke=8>>ve.b,qe=ve.Ea,Ke=ve.K[0],it=ve.w;if(8>ke)for(ve=(1<<ve.b)-1,it=(1<<ke)-1;me<we;++me){var Ye,nt=0;for(Ye=0;Ye<qe;++Ye)Ye&ve||(nt=ie(Se[Oe++])),De[Ze++]=he(Ke[nt&it]),nt>>=ke}else R["VP8LMapColor"+te](Se,Oe,Ke,it,De,Ze,me,we,qe)}}function wr(N,B,te,ie,he){for(te=B+te;B<te;){var ve=N[B++];ie[he++]=ve>>16&255,ie[he++]=ve>>8&255,ie[he++]=255&ve}}function cr(N,B,te,ie,he){for(te=B+te;B<te;){var ve=N[B++];ie[he++]=ve>>16&255,ie[he++]=ve>>8&255,ie[he++]=255&ve,ie[he++]=ve>>24&255}}function Pt(N,B,te,ie,he){for(te=B+te;B<te;){var ve=(me=N[B++])>>16&240|me>>12&15,me=240&me|me>>28&15;ie[he++]=ve,ie[he++]=me}}function $t(N,B,te,ie,he){for(te=B+te;B<te;){var ve=(me=N[B++])>>16&248|me>>13&7,me=me>>5&224|me>>3&31;ie[he++]=ve,ie[he++]=me}}function $e(N,B,te,ie,he){for(te=B+te;B<te;){var ve=N[B++];ie[he++]=255&ve,ie[he++]=ve>>8&255,ie[he++]=ve>>16&255}}function ze(N,B,te,ie,he,ve){if(ve==0)for(te=B+te;B<te;)ye(ie,((ve=N[B++])[0]>>24|ve[1]>>8&65280|ve[2]<<8&16711680|ve[3]<<24)>>>0),he+=32;else n(ie,he,N,B,te)}function kt(N,B){R[B][0]=R[N+"0"],R[B][1]=R[N+"1"],R[B][2]=R[N+"2"],R[B][3]=R[N+"3"],R[B][4]=R[N+"4"],R[B][5]=R[N+"5"],R[B][6]=R[N+"6"],R[B][7]=R[N+"7"],R[B][8]=R[N+"8"],R[B][9]=R[N+"9"],R[B][10]=R[N+"10"],R[B][11]=R[N+"11"],R[B][12]=R[N+"12"],R[B][13]=R[N+"13"],R[B][14]=R[N+"0"],R[B][15]=R[N+"0"]}function St(N){return N==El||N==Ts||N==nu||N==iu}function er(){this.eb=[],this.size=this.A=this.fb=0}function jt(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function vr(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new er,this.f.kb=new jt,this.sd=null}function Xt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function lr(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Oi(N){return alert("todo:WebPSamplerProcessPlane"),N.T}function Zn(N,B){var te=N.T,ie=B.ba.f.RGBA,he=ie.eb,ve=ie.fb+N.ka*ie.A,me=Ca[B.ba.S],we=N.y,Se=N.O,Oe=N.f,De=N.N,Ze=N.ea,ke=N.W,qe=B.cc,Ke=B.dc,it=B.Mc,Ye=B.Nc,nt=N.ka,Ue=N.ka+N.T,ot=N.U,ut=ot+1>>1;for(nt==0?me(we,Se,null,null,Oe,De,Ze,ke,Oe,De,Ze,ke,he,ve,null,null,ot):(me(B.ec,B.fc,we,Se,qe,Ke,it,Ye,Oe,De,Ze,ke,he,ve-ie.A,he,ve,ot),++te);nt+2<Ue;nt+=2)qe=Oe,Ke=De,it=Ze,Ye=ke,De+=N.Rc,ke+=N.Rc,ve+=2*ie.A,me(we,(Se+=2*N.fa)-N.fa,we,Se,qe,Ke,it,Ye,Oe,De,Ze,ke,he,ve-ie.A,he,ve,ot);return Se+=N.fa,N.j+Ue<N.o?(n(B.ec,B.fc,we,Se,ot),n(B.cc,B.dc,Oe,De,ut),n(B.Mc,B.Nc,Ze,ke,ut),te--):1&Ue||me(we,Se,null,null,Oe,De,Ze,ke,Oe,De,Ze,ke,he,ve+ie.A,null,null,ot),te}function vi(N,B,te){var ie=N.F,he=[N.J];if(ie!=null){var ve=N.U,me=B.ba.S,we=me==ru||me==nu;B=B.ba.f.RGBA;var Se=[0],Oe=N.ka;Se[0]=N.T,N.Kb&&(Oe==0?--Se[0]:(--Oe,he[0]-=N.width),N.j+N.ka+N.T==N.o&&(Se[0]=N.o-N.j-Oe));var De=B.eb;Oe=B.fb+Oe*B.A,N=wl(ie,he[0],N.width,ve,Se,De,Oe+(we?0:3),B.A),t(te==Se),N&&St(me)&&Uo(De,Oe,we,ve,Se,B.A)}return 0}function mn(N){var B=N.ma,te=B.ba.S,ie=11>te,he=te==Ho||te==Sl||te==ru||te==sn||te==12||St(te);if(B.memory=null,B.Ib=null,B.Jb=null,B.Nd=null,!Gi(B.Oa,N,he?11:12))return 0;if(he&&St(te)&&Iu(),N.da)alert("todo:use_scaling");else{if(ie){if(B.Ib=Oi,N.Kb){if(te=N.U+1>>1,B.memory=a(N.U+2*te),B.memory==null)return 0;B.ec=B.memory,B.fc=0,B.cc=B.ec,B.dc=B.fc+N.U,B.Mc=B.cc,B.Nc=B.dc+te,B.Ib=Zn,Iu()}}else alert("todo:EmitYUV");he&&(B.Jb=vi,ie&&pl())}if(ie&&!Mi){for(N=0;256>N;++N)ha[N]=89858*(N-128)+Po>>ss,da[N]=-22014*(N-128)+Po,Pl[N]=-45773*(N-128),rl[N]=113618*(N-128)+Po>>ss;for(N=Yr;N<tn;++N)B=76283*(N-16)+Po>>ss,lu[N-Yr]=si(B,255),pf[N-Yr]=si(B+8>>4,15);Mi=1}return 1}function Yt(N){var B=N.ma,te=N.U,ie=N.T;return t(!(1&N.ka)),0>=te||0>=ie?0:(te=B.Ib(N,B),B.Jb!=null&&B.Jb(N,B,te),B.Dc+=te,1)}function sa(N){N.ma.memory=null}function Ra(N,B,te,ie){return D(N,8)!=47?0:(B[0]=D(N,14)+1,te[0]=D(N,14)+1,ie[0]=D(N,1),D(N,3)!=0?0:!N.h)}function Un(N,B){if(4>N)return N+1;var te=N-2>>1;return(2+(1&N)<<te)+D(B,te)+1}function Ui(N,B){return 120<B?B-120:1<=(te=((te=Kf[B-1])>>4)*N+(8-(15&te)))?te:1;var te}function Rr(N,B,te){var ie=Z(te),he=N[B+=255&ie].g-8;return 0<he&&(W(te,te.u+8),ie=Z(te),B+=N[B].value,B+=ie&(1<<he)-1),W(te,te.u+N[B].g),N[B].value}function yn(N,B,te){return te.g+=N.g,te.value+=N.value<<B>>>0,t(8>=te.g),N.g}function An(N,B,te){var ie=N.xc;return t((B=ie==0?0:N.vc[N.md*(te>>ie)+(B>>ie)])<N.Wb),N.Ya[B]}function ba(N,B,te,ie){var he=N.ab,ve=N.c*B,me=N.C;B=me+B;var we=te,Se=ie;for(ie=N.Ta,te=N.Ua;0<he--;){var Oe=N.gc[he],De=me,Ze=B,ke=we,qe=Se,Ke=(Se=ie,we=te,Oe.Ea);switch(t(De<Ze),t(Ze<=Oe.nc),Oe.hc){case 2:ml(ke,qe,(Ze-De)*Ke,Se,we);break;case 0:var it=De,Ye=Ze,nt=Se,Ue=we,ot=(It=Oe).Ea;it==0&&(ka(ke,qe,null,null,1,nt,Ue),pt(ke,qe+1,0,0,ot-1,nt,Ue+1),qe+=ot,Ue+=ot,++it);for(var ut=1<<It.b,qt=ut-1,Mt=_e(ot,It.b),ar=It.K,It=It.w+(it>>It.b)*Mt;it<Ye;){var _r=ar,Rn=It,fr=1;for(Wi(ke,qe,nt,Ue-ot,1,nt,Ue);fr<ot;){var Tt=(fr&~qt)+ut;Tt>ot&&(Tt=ot),(0,Ti[_r[Rn++]>>8&15])(ke,qe+ +fr,nt,Ue+fr-ot,Tt-fr,nt,Ue+fr),fr=Tt}qe+=ot,Ue+=ot,++it&qt||(It+=Mt)}Ze!=Oe.nc&&n(Se,we-Ke,Se,we+(Ze-De-1)*Ke,Ke);break;case 1:for(Ke=ke,Ye=qe,ot=(ke=Oe.Ea)-(Ue=ke&~(nt=(qe=1<<Oe.b)-1)),it=_e(ke,Oe.b),ut=Oe.K,Oe=Oe.w+(De>>Oe.b)*it;De<Ze;){for(qt=ut,Mt=Oe,ar=new pe,It=Ye+Ue,_r=Ye+ke;Ye<It;)bt(qt[Mt++],ar),xo(ar,Ke,Ye,qe,Se,we),Ye+=qe,we+=qe;Ye<_r&&(bt(qt[Mt++],ar),xo(ar,Ke,Ye,ot,Se,we),Ye+=ot,we+=ot),++De&nt||(Oe+=it)}break;case 3:if(ke==Se&&qe==we&&0<Oe.b){for(Ye=Se,ke=Ke=we+(Ze-De)*Ke-(Ue=(Ze-De)*_e(Oe.Ea,Oe.b)),qe=Se,nt=we,it=[],Ue=(ot=Ue)-1;0<=Ue;--Ue)it[Ue]=qe[nt+Ue];for(Ue=ot-1;0<=Ue;--Ue)Ye[ke+Ue]=it[Ue];_o(Oe,De,Ze,Se,Ke,Se,we)}else _o(Oe,De,Ze,ke,qe,Se,we)}we=ie,Se=te}Se!=te&&n(ie,te,we,Se,ve)}function Mo(N,B){var te=N.V,ie=N.Ba+N.c*N.C,he=B-N.C;if(t(B<=N.l.o),t(16>=he),0<he){var ve=N.l,me=N.Ta,we=N.Ua,Se=ve.width;if(ba(N,he,te,ie),he=we=[we],t((te=N.C)<(ie=B)),t(ve.v<ve.va),ie>ve.o&&(ie=ve.o),te<ve.j){var Oe=ve.j-te;te=ve.j,he[0]+=Oe*Se}if(te>=ie?te=0:(he[0]+=4*ve.v,ve.ka=te-ve.j,ve.U=ve.va-ve.v,ve.T=ie-te,te=1),te){if(we=we[0],11>(te=N.ca).S){var De=te.f.RGBA,Ze=(ie=te.S,he=ve.U,ve=ve.T,Oe=De.eb,De.A),ke=ve;for(De=De.fb+N.Ma*De.A;0<ke--;){var qe=me,Ke=we,it=he,Ye=Oe,nt=De;switch(ie){case xl:zo(qe,Ke,it,Ye,nt);break;case Ho:Oa(qe,Ke,it,Ye,nt);break;case El:Oa(qe,Ke,it,Ye,nt),Uo(Ye,nt,0,it,1,0);break;case ff:en(qe,Ke,it,Ye,nt);break;case Sl:ze(qe,Ke,it,Ye,nt,1);break;case Ts:ze(qe,Ke,it,Ye,nt,1),Uo(Ye,nt,0,it,1,0);break;case ru:ze(qe,Ke,it,Ye,nt,0);break;case nu:ze(qe,Ke,it,Ye,nt,0),Uo(Ye,nt,1,it,1,0);break;case sn:So(qe,Ke,it,Ye,nt);break;case iu:So(qe,Ke,it,Ye,nt),ju(Ye,nt,it,1,0);break;case Du:tr(qe,Ke,it,Ye,nt);break;default:t(0)}we+=Se,De+=Ze}N.Ma+=ve}else alert("todo:EmitRescaledRowsYUVA");t(N.Ma<=te.height)}}N.C=B,t(N.C<=N.i)}function wa(N){var B;if(0<N.ua)return 0;for(B=0;B<N.Wb;++B){var te=N.Ya[B].G,ie=N.Ya[B].H;if(0<te[1][ie[1]+0].g||0<te[2][ie[2]+0].g||0<te[3][ie[3]+0].g)return 0}return 1}function Ya(N,B,te,ie,he,ve){if(N.Z!=0){var me=N.qd,we=N.rd;for(t(Qi[N.Z]!=null);B<te;++B)Qi[N.Z](me,we,ie,he,ie,he,ve),me=ie,we=he,he+=ve;N.qd=me,N.rd=we}}function Qn(N,B){var te=N.l.ma,ie=te.Z==0||te.Z==1?N.l.j:N.C;if(ie=N.C<ie?ie:N.C,t(B<=N.l.o),B>ie){var he=N.l.width,ve=te.ca,me=te.tb+he*ie,we=N.V,Se=N.Ba+N.c*ie,Oe=N.gc;t(N.ab==1),t(Oe[0].hc==3),Bo(Oe[0],ie,B,we,Se,ve,me),Ya(te,ie,B,ve,me,he)}N.C=N.Ma=B}function _a(N,B,te,ie,he,ve,me){var we=N.$/ie,Se=N.$%ie,Oe=N.m,De=N.s,Ze=te+N.$,ke=Ze;he=te+ie*he;var qe=te+ie*ve,Ke=280+De.ua,it=N.Pb?we:16777216,Ye=0<De.ua?De.Wa:null,nt=De.wc,Ue=Ze<qe?An(De,Se,we):null;t(N.C<ve),t(qe<=he);var ot=!1;e:for(;;){for(;ot||Ze<qe;){var ut=0;if(we>=it){var qt=Ze-te;t((it=N).Pb),it.wd=it.m,it.xd=qt,0<it.s.ua&&Te(it.s.Wa,it.s.vb),it=we+Bu}if(Se&nt||(Ue=An(De,Se,we)),t(Ue!=null),Ue.Qb&&(B[Ze]=Ue.qb,ot=!0),!ot)if(Q(Oe),Ue.jc){ut=Oe,qt=B;var Mt=Ze,ar=Ue.pd[Z(ut)&Vn-1];t(Ue.jc),256>ar.g?(W(ut,ut.u+ar.g),qt[Mt]=ar.value,ut=0):(W(ut,ut.u+ar.g-256),t(256<=ar.value),ut=ar.value),ut==0&&(ot=!0)}else ut=Rr(Ue.G[0],Ue.H[0],Oe);if(Oe.h)break;if(ot||256>ut){if(!ot)if(Ue.nd)B[Ze]=(Ue.qb|ut<<8)>>>0;else{if(Q(Oe),ot=Rr(Ue.G[1],Ue.H[1],Oe),Q(Oe),qt=Rr(Ue.G[2],Ue.H[2],Oe),Mt=Rr(Ue.G[3],Ue.H[3],Oe),Oe.h)break;B[Ze]=(Mt<<24|ot<<16|ut<<8|qt)>>>0}if(ot=!1,++Ze,++Se>=ie&&(Se=0,++we,me!=null&&we<=ve&&!(we%16)&&me(N,we),Ye!=null))for(;ke<Ze;)ut=B[ke++],Ye.X[(506832829*ut&4294967295)>>>Ye.Mb]=ut}else if(280>ut){if(ut=Un(ut-256,Oe),qt=Rr(Ue.G[4],Ue.H[4],Oe),Q(Oe),qt=Ui(ie,qt=Un(qt,Oe)),Oe.h)break;if(Ze-te<qt||he-Ze<ut)break e;for(Mt=0;Mt<ut;++Mt)B[Ze+Mt]=B[Ze+Mt-qt];for(Ze+=ut,Se+=ut;Se>=ie;)Se-=ie,++we,me!=null&&we<=ve&&!(we%16)&&me(N,we);if(t(Ze<=he),Se&nt&&(Ue=An(De,Se,we)),Ye!=null)for(;ke<Ze;)ut=B[ke++],Ye.X[(506832829*ut&4294967295)>>>Ye.Mb]=ut}else{if(!(ut<Ke))break e;for(ot=ut-280,t(Ye!=null);ke<Ze;)ut=B[ke++],Ye.X[(506832829*ut&4294967295)>>>Ye.Mb]=ut;ut=Ze,t(!(ot>>>(qt=Ye).Xa)),B[ut]=qt.X[ot],ot=!0}ot||t(Oe.h==re(Oe))}if(N.Pb&&Oe.h&&Ze<he)t(N.m.h),N.a=5,N.m=N.wd,N.$=N.xd,0<N.s.ua&&Te(N.s.vb,N.s.Wa);else{if(Oe.h)break e;me?.(N,we>ve?ve:we),N.a=0,N.$=Ze-te}return 1}return N.a=3,0}function xa(N){t(N!=null),N.vc=null,N.yc=null,N.Ya=null;var B=N.Wa;B!=null&&(B.X=null),N.vb=null,t(N!=null)}function Io(){var N=new Mr;return N==null?null:(N.a=0,N.xb=ou,kt("Predictor","VP8LPredictors"),kt("Predictor","VP8LPredictors_C"),kt("PredictorAdd","VP8LPredictorsAdd"),kt("PredictorAdd","VP8LPredictorsAdd_C"),ml=ct,xo=ht,zo=wr,Oa=cr,So=Pt,tr=$t,en=$e,R.VP8LMapColor32b=Yi,R.VP8LMapColor8b=za,N)}function Ci(N,B,te,ie,he){var ve=1,me=[N],we=[B],Se=ie.m,Oe=ie.s,De=null,Ze=0;e:for(;;){if(te)for(;ve&&D(Se,1);){var ke=me,qe=we,Ke=ie,it=1,Ye=Ke.m,nt=Ke.gc[Ke.ab],Ue=D(Ye,2);if(Ke.Oc&1<<Ue)ve=0;else{switch(Ke.Oc|=1<<Ue,nt.hc=Ue,nt.Ea=ke[0],nt.nc=qe[0],nt.K=[null],++Ke.ab,t(4>=Ke.ab),Ue){case 0:case 1:nt.b=D(Ye,3)+2,it=Ci(_e(nt.Ea,nt.b),_e(nt.nc,nt.b),0,Ke,nt.K),nt.K=nt.K[0];break;case 3:var ot,ut=D(Ye,8)+1,qt=16<ut?0:4<ut?1:2<ut?2:3;if(ke[0]=_e(nt.Ea,qt),nt.b=qt,ot=it=Ci(ut,1,0,Ke,nt.K)){var Mt,ar=ut,It=nt,_r=1<<(8>>It.b),Rn=a(_r);if(Rn==null)ot=0;else{var fr=It.K[0],Tt=It.w;for(Rn[0]=It.K[0][0],Mt=1;Mt<1*ar;++Mt)Rn[Mt]=xe(fr[Tt+Mt],Rn[Mt-1]);for(;Mt<4*_r;++Mt)Rn[Mt]=0;It.K[0]=null,It.K[0]=Rn,ot=1}}it=ot;break;case 2:break;default:t(0)}ve=it}}if(me=me[0],we=we[0],ve&&D(Se,1)&&!(ve=1<=(Ze=D(Se,4))&&11>=Ze)){ie.a=3;break e}var _t;if(_t=ve)t:{var Mn,Dt,or,kr=ie,fi=me,ni=we,Ir=Ze,hi=te,hn=kr.m,On=kr.s,Sr=[null],Dr=1,wn=0,Br=hf[Ir];r:for(;;){if(hi&&D(hn,1)){var _n=D(hn,3)+2,xn=_e(fi,_n),Xr=_e(ni,_n),Si=xn*Xr;if(!Ci(xn,Xr,0,kr,Sr))break r;for(Sr=Sr[0],On.xc=_n,Mn=0;Mn<Si;++Mn){var Vr=Sr[Mn]>>8&65535;Sr[Mn]=Vr,Vr>=Dr&&(Dr=Vr+1)}}if(hn.h)break r;for(Dt=0;5>Dt;++Dt){var Gr=tl[Dt];!Dt&&0<Ir&&(Gr+=1<<Ir),wn<Gr&&(wn=Gr)}var $n=l(Dr*Br,q),Ei=Dr,pa=l(Ei,J);if(pa==null)var Wn=null;else t(65536>=Ei),Wn=pa;var In=a(wn);if(Wn==null||In==null||$n==null){kr.a=1;break r}var ga=$n;for(Mn=or=0;Mn<Dr;++Mn){var Kr=Wn[Mn],Ii=Kr.G,zr=Kr.H,rr=0,Or=1,yr=0;for(Dt=0;5>Dt;++Dt){Gr=tl[Dt],Ii[Dt]=ga,zr[Dt]=or,!Dt&&0<Ir&&(Gr+=1<<Ir);i:{var Cn,ii=Gr,Vo=kr,ln=In,uu=ga,Is=or,un=0,io=Vo.m,Ol=D(io,1);if(i(ln,0,0,ii),Ol){var va=D(io,1)+1,cu=D(io,1),fu=D(io,cu==0?1:8);ln[fu]=1,va==2&&(ln[fu=D(io,8)]=1);var Fi=1}else{var rn=a(19),Fn=D(io,4)+4;if(19<Fn){Vo.a=3;var jn=0;break i}for(Cn=0;Cn<Fn;++Cn)rn[Hh[Cn]]=D(io,3);var ao=void 0,ko=void 0,oo=Vo,Ac=rn,Dn=ii,hu=ln,nl=0,so=oo.m,gn=8,di=l(128,q);n:for(;C(di,0,7,Ac,19);){if(D(so,1)){var ma=2+2*D(so,3);if((ao=2+D(so,ma))>Dn)break n}else ao=Dn;for(ko=0;ko<Dn&&ao--;){Q(so);var Ji=di[0+(127&Z(so))];W(so,so.u+Ji.g);var Fs=Ji.value;if(16>Fs)hu[ko++]=Fs,Fs!=0&&(gn=Fs);else{var Pc=Fs==16,Hu=Fs-16,rh=_c[Hu],fs=D(so,au[Hu])+rh;if(ko+fs>Dn)break n;for(var gf=Pc?gn:0;0<fs--;)hu[ko++]=gf}}nl=1;break n}nl||(oo.a=3),Fi=nl}(Fi=Fi&&!io.h)&&(un=C(uu,Is,8,ln,ii)),Fi&&un!=0?jn=un:(Vo.a=3,jn=0)}if(jn==0)break r;if(Or&&Xf[Dt]==1&&(Or=ga[or].g==0),rr+=ga[or].g,or+=jn,3>=Dt){var Cl,du=In[0];for(Cl=1;Cl<Gr;++Cl)In[Cl]>du&&(du=In[Cl]);yr+=du}}if(Kr.nd=Or,Kr.Qb=0,Or&&(Kr.qb=(Ii[3][zr[3]+0].value<<24|Ii[1][zr[1]+0].value<<16|Ii[2][zr[2]+0].value)>>>0,rr==0&&256>Ii[0][zr[0]+0].value&&(Kr.Qb=1,Kr.qb+=Ii[0][zr[0]+0].value<<8)),Kr.jc=!Kr.Qb&&6>yr,Kr.jc){var Go,qa=Kr;for(Go=0;Go<Vn;++Go){var hs=Go,lo=qa.pd[hs],ds=qa.G[0][qa.H[0]+hs];256<=ds.value?(lo.g=ds.g+256,lo.value=ds.value):(lo.g=0,lo.value=0,hs>>=yn(ds,8,lo),hs>>=yn(qa.G[1][qa.H[1]+hs],16,lo),hs>>=yn(qa.G[2][qa.H[2]+hs],0,lo),yn(qa.G[3][qa.H[3]+hs],24,lo))}}}On.vc=Sr,On.Wb=Dr,On.Ya=Wn,On.yc=$n,_t=1;break t}_t=0}if(!(ve=_t)){ie.a=3;break e}if(0<Ze){if(Oe.ua=1<<Ze,!de(Oe.Wa,Ze)){ie.a=1,ve=0;break e}}else Oe.ua=0;var kc=ie,Oc=me,vf=we,Vu=kc.s,ps=Vu.xc;if(kc.c=Oc,kc.i=vf,Vu.md=_e(Oc,ps),Vu.wc=ps==0?-1:(1<<ps)-1,te){ie.xb=Ao;break e}if((De=a(me*we))==null){ie.a=1,ve=0;break e}ve=(ve=_a(ie,De,0,me,we,we,null))&&!Se.h;break e}return ve?(he!=null?he[0]=De:(t(De==null),t(te)),ie.$=0,te||xa(Oe)):xa(Oe),ve}function Xa(N,B){var te=N.c*N.i,ie=te+B+16*B;return t(N.c<=B),N.V=a(ie),N.V==null?(N.Ta=null,N.Ua=0,N.a=1,0):(N.Ta=N.V,N.Ua=N.Ba+te+B,1)}function Ps(N,B){var te=N.C,ie=B-te,he=N.V,ve=N.Ba+N.c*te;for(t(B<=N.l.o);0<ie;){var me=16<ie?16:ie,we=N.l.ma,Se=N.l.width,Oe=Se*me,De=we.ca,Ze=we.tb+Se*te,ke=N.Ta,qe=N.Ua;ba(N,me,he,ve),gc(ke,qe,De,Ze,Oe),Ya(we,te,te+me,De,Ze,Se),ie-=me,he+=me*N.c,te+=me}t(te==B),N.C=N.Ma=B}function Ko(){this.ub=this.yd=this.td=this.Rb=0}function Vl(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function cf(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function bn(){this.Yb=function(){var N=[];return function B(te,ie,he){for(var ve=he[ie],me=0;me<ve&&(te.push(he.length>ie+1?[]:0),!(he.length<ie+1));me++)B(te[me],ie+1,he)}(N,0,[3,11]),N}()}function Gl(){this.jb=a(3),this.Wc=o([4,8],bn),this.Xc=o([4,17],bn)}function Zo(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Sa(){this.ld=this.La=this.dd=this.tc=0}function Qo(){this.Na=this.la=0}function cc(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function $s(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function po(){this.uc=this.M=this.Nb=0,this.wa=Array(new Sa),this.Y=0,this.ya=Array(new $s),this.aa=0,this.l=new mr}function oi(){this.y=a(16),this.f=a(8),this.ea=a(8)}function an(){this.cb=this.a=0,this.sc="",this.m=new j,this.Od=new Ko,this.Kc=new Vl,this.ed=new Zo,this.Qa=new cf,this.Ic=this.$c=this.Aa=0,this.D=new po,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=l(8,j),this.ia=0,this.pb=l(4,cc),this.Pa=new Gl,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new oi),this.Hd=0,this.rb=Array(new Qo),this.sb=0,this.wa=Array(new Sa),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new $s),this.L=this.aa=0,this.gd=o([4,2],Sa),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function mr(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Jo(){var N=new an;return N!=null&&(N.a=0,N.sc="OK",N.cb=0,N.Xb=0,Al||(Al=Hi)),N}function Er(N,B,te){return N.a==0&&(N.a=B,N.sc=te,N.cb=0),0}function qi(N,B,te){return 3<=te&&N[B+0]==157&&N[B+1]==1&&N[B+2]==42}function Ka(N,B){if(N==null)return 0;if(N.a=0,N.sc="OK",B==null)return Er(N,2,"null VP8Io passed to VP8GetHeaders()");var te=B.data,ie=B.w,he=B.ha;if(4>he)return Er(N,7,"Truncated header.");var ve=te[ie+0]|te[ie+1]<<8|te[ie+2]<<16,me=N.Od;if(me.Rb=!(1&ve),me.td=ve>>1&7,me.yd=ve>>4&1,me.ub=ve>>5,3<me.td)return Er(N,3,"Incorrect keyframe parameters.");if(!me.yd)return Er(N,4,"Frame not displayable.");ie+=3,he-=3;var we=N.Kc;if(me.Rb){if(7>he)return Er(N,7,"cannot parse picture header");if(!qi(te,ie,he))return Er(N,3,"Bad code word");we.c=16383&(te[ie+4]<<8|te[ie+3]),we.Td=te[ie+4]>>6,we.i=16383&(te[ie+6]<<8|te[ie+5]),we.Ud=te[ie+6]>>6,ie+=7,he-=7,N.za=we.c+15>>4,N.Ub=we.i+15>>4,B.width=we.c,B.height=we.i,B.Da=0,B.j=0,B.v=0,B.va=B.width,B.o=B.height,B.da=0,B.ib=B.width,B.hb=B.height,B.U=B.width,B.T=B.height,i((ve=N.Pa).jb,0,255,ve.jb.length),t((ve=N.Qa)!=null),ve.Cb=0,ve.Bb=0,ve.Fb=1,i(ve.Zb,0,0,ve.Zb.length),i(ve.Lb,0,0,ve.Lb)}if(me.ub>he)return Er(N,7,"bad partition length");ae(ve=N.m,te,ie,me.ub),ie+=me.ub,he-=me.ub,me.Rb&&(we.Ld=ue(ve),we.Kd=ue(ve)),we=N.Qa;var Se,Oe=N.Pa;if(t(ve!=null),t(we!=null),we.Cb=ue(ve),we.Cb){if(we.Bb=ue(ve),ue(ve)){for(we.Fb=ue(ve),Se=0;4>Se;++Se)we.Zb[Se]=ue(ve)?V(ve,7):0;for(Se=0;4>Se;++Se)we.Lb[Se]=ue(ve)?V(ve,6):0}if(we.Bb)for(Se=0;3>Se;++Se)Oe.jb[Se]=ue(ve)?H(ve,8):255}else we.Bb=0;if(ve.Ka)return Er(N,3,"cannot parse segment header");if((we=N.ed).zd=ue(ve),we.Tb=H(ve,6),we.wb=H(ve,3),we.Pc=ue(ve),we.Pc&&ue(ve)){for(Oe=0;4>Oe;++Oe)ue(ve)&&(we.vd[Oe]=V(ve,6));for(Oe=0;4>Oe;++Oe)ue(ve)&&(we.od[Oe]=V(ve,6))}if(N.L=we.Tb==0?0:we.zd?1:2,ve.Ka)return Er(N,3,"cannot parse filter header");var De=he;if(he=Se=ie,ie=Se+De,we=De,N.Xb=(1<<H(N.m,2))-1,De<3*(Oe=N.Xb))te=7;else{for(Se+=3*Oe,we-=3*Oe,De=0;De<Oe;++De){var Ze=te[he+0]|te[he+1]<<8|te[he+2]<<16;Ze>we&&(Ze=we),ae(N.Jc[+De],te,Se,Ze),Se+=Ze,we-=Ze,he+=3}ae(N.Jc[+Oe],te,Se,we),te=Se<ie?0:5}if(te!=0)return Er(N,te,"cannot parse partitions");for(te=H(Se=N.m,7),he=ue(Se)?V(Se,4):0,ie=ue(Se)?V(Se,4):0,we=ue(Se)?V(Se,4):0,Oe=ue(Se)?V(Se,4):0,Se=ue(Se)?V(Se,4):0,De=N.Qa,Ze=0;4>Ze;++Ze){if(De.Cb){var ke=De.Zb[Ze];De.Fb||(ke+=te)}else{if(0<Ze){N.pb[Ze]=N.pb[0];continue}ke=te}var qe=N.pb[Ze];qe.Sc[0]=Rs[si(ke+he,127)],qe.Sc[1]=zu[si(ke+0,127)],qe.Eb[0]=2*Rs[si(ke+ie,127)],qe.Eb[1]=101581*zu[si(ke+we,127)]>>16,8>qe.Eb[1]&&(qe.Eb[1]=8),qe.Qc[0]=Rs[si(ke+Oe,117)],qe.Qc[1]=zu[si(ke+Se,127)],qe.lc=ke+Se}if(!me.Rb)return Er(N,4,"Not a key frame.");for(ue(ve),me=N.Pa,te=0;4>te;++te){for(he=0;8>he;++he)for(ie=0;3>ie;++ie)for(we=0;11>we;++we)Oe=le(ve,Qf[te][he][ie][we])?H(ve,8):Uu[te][he][ie][we],me.Wc[te][he].Yb[ie][we]=Oe;for(he=0;17>he;++he)me.Xc[te][he]=me.Wc[te][Sc[he]]}return N.kc=ue(ve),N.kc&&(N.Bd=H(ve,8)),N.cb=1}function Hi(N,B,te,ie,he,ve,me){var we=B[he].Yb[te];for(te=0;16>he;++he){if(!le(N,we[te+0]))return he;for(;!le(N,we[te+1]);)if(we=B[++he].Yb[0],te=0,he==16)return 16;var Se=B[he+1].Yb;if(le(N,we[te+2])){var Oe=N,De=0;if(le(Oe,(ke=we)[(Ze=te)+3]))if(le(Oe,ke[Ze+6])){for(we=0,Ze=2*(De=le(Oe,ke[Ze+8]))+(ke=le(Oe,ke[Ze+9+De])),De=0,ke=df[Ze];ke[we];++we)De+=De+le(Oe,ke[we]);De+=3+(8<<Ze)}else le(Oe,ke[Ze+7])?(De=7+2*le(Oe,165),De+=le(Oe,145)):De=5+le(Oe,159);else De=le(Oe,ke[Ze+4])?3+le(Oe,ke[Ze+5]):2;we=Se[2]}else De=1,we=Se[1];Se=me+no[he],0>(Oe=N).b&&se(Oe);var Ze,ke=Oe.b,qe=(Ze=Oe.Ca>>1)-(Oe.I>>ke)>>31;--Oe.b,Oe.Ca+=qe,Oe.Ca|=1,Oe.I-=(Ze+1&qe)<<ke,ve[Se]=((De^qe)-qe)*ie[(0<he)+0]}return 16}function Pn(N){var B=N.rb[N.sb-1];B.la=0,B.Na=0,i(N.zc,0,0,N.zc.length),N.ja=0}function Vi(N,B,te,ie,he){he=N[B+te+32*ie]+(he>>3),N[B+te+32*ie]=-256&he?0>he?0:255:he}function Ws(N,B,te,ie,he,ve){Vi(N,B,0,te,ie+he),Vi(N,B,1,te,ie+ve),Vi(N,B,2,te,ie-ve),Vi(N,B,3,te,ie-he)}function qn(N){return(20091*N>>16)+N}function es(N,B,te,ie){var he,ve=0,me=a(16);for(he=0;4>he;++he){var we=N[B+0]+N[B+8],Se=N[B+0]-N[B+8],Oe=(35468*N[B+4]>>16)-qn(N[B+12]),De=qn(N[B+4])+(35468*N[B+12]>>16);me[ve+0]=we+De,me[ve+1]=Se+Oe,me[ve+2]=Se-Oe,me[ve+3]=we-De,ve+=4,B++}for(he=ve=0;4>he;++he)we=(N=me[ve+0]+4)+me[ve+8],Se=N-me[ve+8],Oe=(35468*me[ve+4]>>16)-qn(me[ve+12]),Vi(te,ie,0,0,we+(De=qn(me[ve+4])+(35468*me[ve+12]>>16))),Vi(te,ie,1,0,Se+Oe),Vi(te,ie,2,0,Se-Oe),Vi(te,ie,3,0,we-De),ve++,ie+=32}function Ru(N,B,te,ie){var he=N[B+0]+4,ve=35468*N[B+4]>>16,me=qn(N[B+4]),we=35468*N[B+1]>>16;Ws(te,ie,0,he+me,N=qn(N[B+1]),we),Ws(te,ie,1,he+ve,N,we),Ws(te,ie,2,he-ve,N,we),Ws(te,ie,3,he-me,N,we)}function Ea(N,B,te,ie,he){es(N,B,te,ie),he&&es(N,B+16,te,ie+4)}function hl(N,B,te,ie){Tn(N,B+0,te,ie,1),Tn(N,B+32,te,ie+128,1)}function ts(N,B,te,ie){var he;for(N=N[B+0]+4,he=0;4>he;++he)for(B=0;4>B;++B)Vi(te,ie,B,he,N)}function $l(N,B,te,ie){N[B+0]&&Xi(N,B+0,te,ie),N[B+16]&&Xi(N,B+16,te,ie+4),N[B+32]&&Xi(N,B+32,te,ie+128),N[B+48]&&Xi(N,B+48,te,ie+128+4)}function Ar(N,B,te,ie){var he,ve=a(16);for(he=0;4>he;++he){var me=N[B+0+he]+N[B+12+he],we=N[B+4+he]+N[B+8+he],Se=N[B+4+he]-N[B+8+he],Oe=N[B+0+he]-N[B+12+he];ve[0+he]=me+we,ve[8+he]=me-we,ve[4+he]=Oe+Se,ve[12+he]=Oe-Se}for(he=0;4>he;++he)me=(N=ve[0+4*he]+3)+ve[3+4*he],we=ve[1+4*he]+ve[2+4*he],Se=ve[1+4*he]-ve[2+4*he],Oe=N-ve[3+4*he],te[ie+0]=me+we>>3,te[ie+16]=Oe+Se>>3,te[ie+32]=me-we>>3,te[ie+48]=Oe-Se>>3,ie+=64}function go(N,B,te){var ie,he=B-32,ve=_i,me=255-N[he-1];for(ie=0;ie<te;++ie){var we,Se=ve,Oe=me+N[B-1];for(we=0;we<te;++we)N[B+we]=Se[Oe+N[he+we]];B+=32}}function rs(N,B){go(N,B,4)}function Ys(N,B){go(N,B,8)}function fc(N,B){go(N,B,16)}function hc(N,B){var te;for(te=0;16>te;++te)n(N,B+32*te,N,B-32,16)}function Xs(N,B){var te;for(te=16;0<te;--te)i(N,B,N[B-1],16),B+=32}function ns(N,B,te){var ie;for(ie=0;16>ie;++ie)i(B,te+32*ie,N,16)}function Za(N,B){var te,ie=16;for(te=0;16>te;++te)ie+=N[B-1+32*te]+N[B+te-32];ns(ie>>5,N,B)}function Ma(N,B){var te,ie=8;for(te=0;16>te;++te)ie+=N[B-1+32*te];ns(ie>>4,N,B)}function Ia(N,B){var te,ie=8;for(te=0;16>te;++te)ie+=N[B+te-32];ns(ie>>4,N,B)}function Fa(N,B){ns(128,N,B)}function xt(N,B,te){return N+2*B+te+2>>2}function Ks(N,B){var te,ie=B-32;for(ie=new Uint8Array([xt(N[ie-1],N[ie+0],N[ie+1]),xt(N[ie+0],N[ie+1],N[ie+2]),xt(N[ie+1],N[ie+2],N[ie+3]),xt(N[ie+2],N[ie+3],N[ie+4])]),te=0;4>te;++te)n(N,B+32*te,ie,0,ie.length)}function vo(N,B){var te=N[B-1],ie=N[B-1+32],he=N[B-1+64],ve=N[B-1+96];ye(N,B+0,16843009*xt(N[B-1-32],te,ie)),ye(N,B+32,16843009*xt(te,ie,he)),ye(N,B+64,16843009*xt(ie,he,ve)),ye(N,B+96,16843009*xt(he,ve,ve))}function dc(N,B){var te,ie=4;for(te=0;4>te;++te)ie+=N[B+te-32]+N[B-1+32*te];for(ie>>=3,te=0;4>te;++te)i(N,B+32*te,ie,4)}function pc(N,B){var te=N[B-1+0],ie=N[B-1+32],he=N[B-1+64],ve=N[B-1-32],me=N[B+0-32],we=N[B+1-32],Se=N[B+2-32],Oe=N[B+3-32];N[B+0+96]=xt(ie,he,N[B-1+96]),N[B+1+96]=N[B+0+64]=xt(te,ie,he),N[B+2+96]=N[B+1+64]=N[B+0+32]=xt(ve,te,ie),N[B+3+96]=N[B+2+64]=N[B+1+32]=N[B+0+0]=xt(me,ve,te),N[B+3+64]=N[B+2+32]=N[B+1+0]=xt(we,me,ve),N[B+3+32]=N[B+2+0]=xt(Se,we,me),N[B+3+0]=xt(Oe,Se,we)}function Qa(N,B){var te=N[B+1-32],ie=N[B+2-32],he=N[B+3-32],ve=N[B+4-32],me=N[B+5-32],we=N[B+6-32],Se=N[B+7-32];N[B+0+0]=xt(N[B+0-32],te,ie),N[B+1+0]=N[B+0+32]=xt(te,ie,he),N[B+2+0]=N[B+1+32]=N[B+0+64]=xt(ie,he,ve),N[B+3+0]=N[B+2+32]=N[B+1+64]=N[B+0+96]=xt(he,ve,me),N[B+3+32]=N[B+2+64]=N[B+1+96]=xt(ve,me,we),N[B+3+64]=N[B+2+96]=xt(me,we,Se),N[B+3+96]=xt(we,Se,Se)}function pn(N,B){var te=N[B-1+0],ie=N[B-1+32],he=N[B-1+64],ve=N[B-1-32],me=N[B+0-32],we=N[B+1-32],Se=N[B+2-32],Oe=N[B+3-32];N[B+0+0]=N[B+1+64]=ve+me+1>>1,N[B+1+0]=N[B+2+64]=me+we+1>>1,N[B+2+0]=N[B+3+64]=we+Se+1>>1,N[B+3+0]=Se+Oe+1>>1,N[B+0+96]=xt(he,ie,te),N[B+0+64]=xt(ie,te,ve),N[B+0+32]=N[B+1+96]=xt(te,ve,me),N[B+1+32]=N[B+2+96]=xt(ve,me,we),N[B+2+32]=N[B+3+96]=xt(me,we,Se),N[B+3+32]=xt(we,Se,Oe)}function Wl(N,B){var te=N[B+0-32],ie=N[B+1-32],he=N[B+2-32],ve=N[B+3-32],me=N[B+4-32],we=N[B+5-32],Se=N[B+6-32],Oe=N[B+7-32];N[B+0+0]=te+ie+1>>1,N[B+1+0]=N[B+0+64]=ie+he+1>>1,N[B+2+0]=N[B+1+64]=he+ve+1>>1,N[B+3+0]=N[B+2+64]=ve+me+1>>1,N[B+0+32]=xt(te,ie,he),N[B+1+32]=N[B+0+96]=xt(ie,he,ve),N[B+2+32]=N[B+1+96]=xt(he,ve,me),N[B+3+32]=N[B+2+96]=xt(ve,me,we),N[B+3+64]=xt(me,we,Se),N[B+3+96]=xt(we,Se,Oe)}function Yl(N,B){var te=N[B-1+0],ie=N[B-1+32],he=N[B-1+64],ve=N[B-1+96];N[B+0+0]=te+ie+1>>1,N[B+2+0]=N[B+0+32]=ie+he+1>>1,N[B+2+32]=N[B+0+64]=he+ve+1>>1,N[B+1+0]=xt(te,ie,he),N[B+3+0]=N[B+1+32]=xt(ie,he,ve),N[B+3+32]=N[B+1+64]=xt(he,ve,ve),N[B+3+64]=N[B+2+64]=N[B+0+96]=N[B+1+96]=N[B+2+96]=N[B+3+96]=ve}function ks(N,B){var te=N[B-1+0],ie=N[B-1+32],he=N[B-1+64],ve=N[B-1+96],me=N[B-1-32],we=N[B+0-32],Se=N[B+1-32],Oe=N[B+2-32];N[B+0+0]=N[B+2+32]=te+me+1>>1,N[B+0+32]=N[B+2+64]=ie+te+1>>1,N[B+0+64]=N[B+2+96]=he+ie+1>>1,N[B+0+96]=ve+he+1>>1,N[B+3+0]=xt(we,Se,Oe),N[B+2+0]=xt(me,we,Se),N[B+1+0]=N[B+3+32]=xt(te,me,we),N[B+1+32]=N[B+3+64]=xt(ie,te,me),N[B+1+64]=N[B+3+96]=xt(he,ie,te),N[B+1+96]=xt(ve,he,ie)}function Mu(N,B){var te;for(te=0;8>te;++te)n(N,B+32*te,N,B-32,8)}function ja(N,B){var te;for(te=0;8>te;++te)i(N,B,N[B-1],8),B+=32}function mi(N,B,te){var ie;for(ie=0;8>ie;++ie)i(B,te+32*ie,N,8)}function Fo(N,B){var te,ie=8;for(te=0;8>te;++te)ie+=N[B+te-32]+N[B-1+32*te];mi(ie>>4,N,B)}function Xl(N,B){var te,ie=4;for(te=0;8>te;++te)ie+=N[B+te-32];mi(ie>>3,N,B)}function Aa(N,B){var te,ie=4;for(te=0;8>te;++te)ie+=N[B-1+32*te];mi(ie>>3,N,B)}function Ja(N,B){mi(128,N,B)}function mo(N,B,te){var ie=N[B-te],he=N[B+0],ve=3*(he-ie)+qo[1020+N[B-2*te]-N[B+te]],me=_l[112+(ve+4>>3)];N[B-te]=_i[255+ie+_l[112+(ve+3>>3)]],N[B+0]=_i[255+he-me]}function yo(N,B,te,ie){var he=N[B+0],ve=N[B+te];return ro[255+N[B-2*te]-N[B-te]]>ie||ro[255+ve-he]>ie}function Zs(N,B,te,ie){return 4*ro[255+N[B-te]-N[B+0]]+ro[255+N[B-2*te]-N[B+te]]<=ie}function dl(N,B,te,ie,he){var ve=N[B-3*te],me=N[B-2*te],we=N[B-te],Se=N[B+0],Oe=N[B+te],De=N[B+2*te],Ze=N[B+3*te];return 4*ro[255+we-Se]+ro[255+me-Oe]>ie?0:ro[255+N[B-4*te]-ve]<=he&&ro[255+ve-me]<=he&&ro[255+me-we]<=he&&ro[255+Ze-De]<=he&&ro[255+De-Oe]<=he&&ro[255+Oe-Se]<=he}function Jn(N,B,te,ie){var he=2*ie+1;for(ie=0;16>ie;++ie)Zs(N,B+ie,te,he)&&mo(N,B+ie,te)}function Da(N,B,te,ie){var he=2*ie+1;for(ie=0;16>ie;++ie)Zs(N,B+ie*te,1,he)&&mo(N,B+ie*te,1)}function eo(N,B,te,ie){var he;for(he=3;0<he;--he)Jn(N,B+=4*te,te,ie)}function Os(N,B,te,ie){var he;for(he=3;0<he;--he)Da(N,B+=4,te,ie)}function yi(N,B,te,ie,he,ve,me,we){for(ve=2*ve+1;0<he--;){if(dl(N,B,te,ve,me))if(yo(N,B,te,we))mo(N,B,te);else{var Se=N,Oe=B,De=te,Ze=Se[Oe-2*De],ke=Se[Oe-De],qe=Se[Oe+0],Ke=Se[Oe+De],it=Se[Oe+2*De],Ye=27*(Ue=qo[1020+3*(qe-ke)+qo[1020+Ze-Ke]])+63>>7,nt=18*Ue+63>>7,Ue=9*Ue+63>>7;Se[Oe-3*De]=_i[255+Se[Oe-3*De]+Ue],Se[Oe-2*De]=_i[255+Ze+nt],Se[Oe-De]=_i[255+ke+Ye],Se[Oe+0]=_i[255+qe-Ye],Se[Oe+De]=_i[255+Ke-nt],Se[Oe+2*De]=_i[255+it-Ue]}B+=ie}}function kn(N,B,te,ie,he,ve,me,we){for(ve=2*ve+1;0<he--;){if(dl(N,B,te,ve,me))if(yo(N,B,te,we))mo(N,B,te);else{var Se=N,Oe=B,De=te,Ze=Se[Oe-De],ke=Se[Oe+0],qe=Se[Oe+De],Ke=_l[112+(4+(it=3*(ke-Ze))>>3)],it=_l[112+(it+3>>3)],Ye=Ke+1>>1;Se[Oe-2*De]=_i[255+Se[Oe-2*De]+Ye],Se[Oe-De]=_i[255+Ze+it],Se[Oe+0]=_i[255+ke-Ke],Se[Oe+De]=_i[255+qe-Ye]}B+=ie}}function X(N,B,te,ie,he,ve){yi(N,B,te,1,16,ie,he,ve)}function fe(N,B,te,ie,he,ve){yi(N,B,1,te,16,ie,he,ve)}function Ne(N,B,te,ie,he,ve){var me;for(me=3;0<me;--me)kn(N,B+=4*te,te,1,16,ie,he,ve)}function Fe(N,B,te,ie,he,ve){var me;for(me=3;0<me;--me)kn(N,B+=4,1,te,16,ie,he,ve)}function Ge(N,B,te,ie,he,ve,me,we){yi(N,B,he,1,8,ve,me,we),yi(te,ie,he,1,8,ve,me,we)}function lt(N,B,te,ie,he,ve,me,we){yi(N,B,1,he,8,ve,me,we),yi(te,ie,1,he,8,ve,me,we)}function ft(N,B,te,ie,he,ve,me,we){kn(N,B+4*he,he,1,8,ve,me,we),kn(te,ie+4*he,he,1,8,ve,me,we)}function Lt(N,B,te,ie,he,ve,me,we){kn(N,B+4,1,he,8,ve,me,we),kn(te,ie+4,1,he,8,ve,me,we)}function Et(){this.ba=new vr,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new lr,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Ut(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Rt(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Pr(){this.ua=0,this.Wa=new Ae,this.vb=new Ae,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new J,this.yc=new q}function Mr(){this.xb=this.a=0,this.l=new mr,this.ca=new vr,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new z,this.Pb=0,this.wd=new z,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Pr,this.ab=0,this.gc=l(4,Rt),this.Oc=0}function ei(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new mr,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Hr(N,B,te,ie,he,ve,me){for(N=N==null?0:N[B+0],B=0;B<me;++B)he[ve+B]=N+te[ie+B]&255,N=he[ve+B]}function ti(N,B,te,ie,he,ve,me){var we;if(N==null)Hr(null,null,te,ie,he,ve,me);else for(we=0;we<me;++we)he[ve+we]=N[B+we]+te[ie+we]&255}function Hn(N,B,te,ie,he,ve,me){if(N==null)Hr(null,null,te,ie,he,ve,me);else{var we,Se=N[B+0],Oe=Se,De=Se;for(we=0;we<me;++we)Oe=De+(Se=N[B+we])-Oe,De=te[ie+we]+(-256&Oe?0>Oe?0:255:Oe)&255,Oe=Se,he[ve+we]=De}}function Ni(N,B,te,ie){var he=B.width,ve=B.o;if(t(N!=null&&B!=null),0>te||0>=ie||te+ie>ve)return null;if(!N.Cc){if(N.ga==null){var me;if(N.ga=new ei,(me=N.ga==null)||(me=B.width*B.o,t(N.Gb.length==0),N.Gb=a(me),N.Uc=0,N.Gb==null?me=0:(N.mb=N.Gb,N.nb=N.Uc,N.rc=null,me=1),me=!me),!me){me=N.ga;var we=N.Fa,Se=N.P,Oe=N.qc,De=N.mb,Ze=N.nb,ke=Se+1,qe=Oe-1,Ke=me.l;if(t(we!=null&&De!=null&&B!=null),Qi[0]=null,Qi[1]=Hr,Qi[2]=ti,Qi[3]=Hn,me.ca=De,me.tb=Ze,me.c=B.width,me.i=B.height,t(0<me.c&&0<me.i),1>=Oe)B=0;else if(me.$a=3&we[Se+0],me.Z=we[Se+0]>>2&3,me.Lc=we[Se+0]>>4&3,Se=we[Se+0]>>6&3,0>me.$a||1<me.$a||4<=me.Z||1<me.Lc||Se)B=0;else if(Ke.put=Yt,Ke.ac=mn,Ke.bc=sa,Ke.ma=me,Ke.width=B.width,Ke.height=B.height,Ke.Da=B.Da,Ke.v=B.v,Ke.va=B.va,Ke.j=B.j,Ke.o=B.o,me.$a)e:{t(me.$a==1),B=Io();t:for(;;){if(B==null){B=0;break e}if(t(me!=null),me.mc=B,B.c=me.c,B.i=me.i,B.l=me.l,B.l.ma=me,B.l.width=me.c,B.l.height=me.i,B.a=0,Y(B.m,we,ke,qe),!Ci(me.c,me.i,1,B,null)||(B.ab==1&&B.gc[0].hc==3&&wa(B.s)?(me.ic=1,we=B.c*B.i,B.Ta=null,B.Ua=0,B.V=a(we),B.Ba=0,B.V==null?(B.a=1,B=0):B=1):(me.ic=0,B=Xa(B,me.c)),!B))break t;B=1;break e}me.mc=null,B=0}else B=qe>=me.c*me.i;me=!B}if(me)return null;N.ga.Lc!=1?N.Ga=0:ie=ve-te}t(N.ga!=null),t(te+ie<=ve);e:{if(B=(we=N.ga).c,ve=we.l.o,we.$a==0){if(ke=N.rc,qe=N.Vc,Ke=N.Fa,Se=N.P+1+te*B,Oe=N.mb,De=N.nb+te*B,t(Se<=N.P+N.qc),we.Z!=0)for(t(Qi[we.Z]!=null),me=0;me<ie;++me)Qi[we.Z](ke,qe,Ke,Se,Oe,De,B),ke=Oe,qe=De,De+=B,Se+=B;else for(me=0;me<ie;++me)n(Oe,De,Ke,Se,B),ke=Oe,qe=De,De+=B,Se+=B;N.rc=ke,N.Vc=qe}else{if(t(we.mc!=null),B=te+ie,t((me=we.mc)!=null),t(B<=me.i),me.C>=B)B=1;else if(we.ic||pl(),we.ic){we=me.V,ke=me.Ba,qe=me.c;var it=me.i,Ye=(Ke=1,Se=me.$/qe,Oe=me.$%qe,De=me.m,Ze=me.s,me.$),nt=qe*it,Ue=qe*B,ot=Ze.wc,ut=Ye<Ue?An(Ze,Oe,Se):null;t(Ye<=nt),t(B<=it),t(wa(Ze));t:for(;;){for(;!De.h&&Ye<Ue;){if(Oe&ot||(ut=An(Ze,Oe,Se)),t(ut!=null),Q(De),256>(it=Rr(ut.G[0],ut.H[0],De)))we[ke+Ye]=it,++Ye,++Oe>=qe&&(Oe=0,++Se<=B&&!(Se%16)&&Qn(me,Se));else{if(!(280>it)){Ke=0;break t}it=Un(it-256,De);var qt,Mt=Rr(ut.G[4],ut.H[4],De);if(Q(De),!(Ye>=(Mt=Ui(qe,Mt=Un(Mt,De)))&&nt-Ye>=it)){Ke=0;break t}for(qt=0;qt<it;++qt)we[ke+Ye+qt]=we[ke+Ye+qt-Mt];for(Ye+=it,Oe+=it;Oe>=qe;)Oe-=qe,++Se<=B&&!(Se%16)&&Qn(me,Se);Ye<Ue&&Oe&ot&&(ut=An(Ze,Oe,Se))}t(De.h==re(De))}Qn(me,Se>B?B:Se);break t}!Ke||De.h&&Ye<nt?(Ke=0,me.a=De.h?5:3):me.$=Ye,B=Ke}else B=_a(me,me.V,me.Ba,me.c,me.i,B,Ps);if(!B){ie=0;break e}}te+ie>=ve&&(N.Cc=1),ie=1}if(!ie)return null;if(N.Cc&&((ie=N.ga)!=null&&(ie.mc=null),N.ga=null,0<N.Ga))return alert("todo:WebPDequantizeLevels"),null}return N.nb+te*he}function bo(N,B,te,ie,he,ve){for(;0<he--;){var me,we=N,Se=B+(te?1:0),Oe=N,De=B+(te?0:3);for(me=0;me<ie;++me){var Ze=Oe[De+4*me];Ze!=255&&(Ze*=32897,we[Se+4*me+0]=we[Se+4*me+0]*Ze>>23,we[Se+4*me+1]=we[Se+4*me+1]*Ze>>23,we[Se+4*me+2]=we[Se+4*me+2]*Ze>>23)}B+=ve}}function Cs(N,B,te,ie,he){for(;0<ie--;){var ve;for(ve=0;ve<te;++ve){var me=N[B+2*ve+0],we=15&(Oe=N[B+2*ve+1]),Se=4369*we,Oe=(240&Oe|Oe>>4)*Se>>16;N[B+2*ve+0]=(240&me|me>>4)*Se>>16&240|(15&me|me<<4)*Se>>16>>4&15,N[B+2*ve+1]=240&Oe|we}B+=he}}function Ns(N,B,te,ie,he,ve,me,we){var Se,Oe,De=255;for(Oe=0;Oe<he;++Oe){for(Se=0;Se<ie;++Se){var Ze=N[B+Se];ve[me+4*Se]=Ze,De&=Ze}B+=te,me+=we}return De!=255}function Kl(N,B,te,ie,he){var ve;for(ve=0;ve<he;++ve)te[ie+ve]=N[B+ve]>>8}function pl(){Uo=bo,ju=Cs,wl=Ns,gc=Kl}function Ba(N,B,te){R[N]=function(ie,he,ve,me,we,Se,Oe,De,Ze,ke,qe,Ke,it,Ye,nt,Ue,ot){var ut,qt=ot-1>>1,Mt=we[Se+0]|Oe[De+0]<<16,ar=Ze[ke+0]|qe[Ke+0]<<16;t(ie!=null);var It=3*Mt+ar+131074>>2;for(B(ie[he+0],255&It,It>>16,it,Ye),ve!=null&&(It=3*ar+Mt+131074>>2,B(ve[me+0],255&It,It>>16,nt,Ue)),ut=1;ut<=qt;++ut){var _r=we[Se+ut]|Oe[De+ut]<<16,Rn=Ze[ke+ut]|qe[Ke+ut]<<16,fr=Mt+_r+ar+Rn+524296,Tt=fr+2*(_r+ar)>>3;It=Tt+Mt>>1,Mt=(fr=fr+2*(Mt+Rn)>>3)+_r>>1,B(ie[he+2*ut-1],255&It,It>>16,it,Ye+(2*ut-1)*te),B(ie[he+2*ut-0],255&Mt,Mt>>16,it,Ye+(2*ut-0)*te),ve!=null&&(It=fr+ar>>1,Mt=Tt+Rn>>1,B(ve[me+2*ut-1],255&It,It>>16,nt,Ue+(2*ut-1)*te),B(ve[me+2*ut+0],255&Mt,Mt>>16,nt,Ue+(2*ut+0)*te)),Mt=_r,ar=Rn}1&ot||(It=3*Mt+ar+131074>>2,B(ie[he+ot-1],255&It,It>>16,it,Ye+(ot-1)*te),ve!=null&&(It=3*ar+Mt+131074>>2,B(ve[me+ot-1],255&It,It>>16,nt,Ue+(ot-1)*te)))}}function Iu(){Ca[xl]=Jf,Ca[Ho]=Ms,Ca[ff]=eh,Ca[Sl]=su,Ca[ru]=ci,Ca[sn]=xi,Ca[Du]=Ec,Ca[El]=Ms,Ca[Ts]=su,Ca[nu]=ci,Ca[iu]=xi}function wo(N){return N&-16384?0>N?0:255:N>>ls}function jo(N,B){return wo((19077*N>>8)+(26149*B>>8)-14234)}function bi(N,B,te){return wo((19077*N>>8)-(6419*B>>8)-(13320*te>>8)+8708)}function is(N,B){return wo((19077*N>>8)+(33050*B>>8)-17685)}function Pa(N,B,te,ie,he){ie[he+0]=jo(N,te),ie[he+1]=bi(N,B,te),ie[he+2]=is(N,B)}function gl(N,B,te,ie,he){ie[he+0]=is(N,B),ie[he+1]=bi(N,B,te),ie[he+2]=jo(N,te)}function Qs(N,B,te,ie,he){var ve=bi(N,B,te);B=ve<<3&224|is(N,B)>>3,ie[he+0]=248&jo(N,te)|ve>>5,ie[he+1]=B}function Li(N,B,te,ie,he){var ve=240&is(N,B)|15;ie[he+0]=240&jo(N,te)|bi(N,B,te)>>4,ie[he+1]=ve}function Ls(N,B,te,ie,he){ie[he+0]=255,Pa(N,B,te,ie,he+1)}function Js(N,B,te,ie,he){gl(N,B,te,ie,he),ie[he+3]=255}function Zl(N,B,te,ie,he){Pa(N,B,te,ie,he),ie[he+3]=255}function si(N,B){return 0>N?0:N>B?B:N}function la(N,B,te){R[N]=function(ie,he,ve,me,we,Se,Oe,De,Ze){for(var ke=De+(-2&Ze)*te;De!=ke;)B(ie[he+0],ve[me+0],we[Se+0],Oe,De),B(ie[he+1],ve[me+0],we[Se+0],Oe,De+te),he+=2,++me,++Se,De+=2*te;1&Ze&&B(ie[he+0],ve[me+0],we[Se+0],Oe,De)}}function Do(N,B,te){return te==0?N==0?B==0?6:5:B==0?4:0:te}function as(N,B,te,ie,he){switch(N>>>30){case 3:Tn(B,te,ie,he,0);break;case 2:Gn(B,te,ie,he);break;case 1:Xi(B,te,ie,he)}}function li(N,B){var te,ie,he=B.M,ve=B.Nb,me=N.oc,we=N.pc+40,Se=N.oc,Oe=N.pc+584,De=N.oc,Ze=N.pc+600;for(te=0;16>te;++te)me[we+32*te-1]=129;for(te=0;8>te;++te)Se[Oe+32*te-1]=129,De[Ze+32*te-1]=129;for(0<he?me[we-1-32]=Se[Oe-1-32]=De[Ze-1-32]=129:(i(me,we-32-1,127,21),i(Se,Oe-32-1,127,9),i(De,Ze-32-1,127,9)),ie=0;ie<N.za;++ie){var ke=B.ya[B.aa+ie];if(0<ie){for(te=-1;16>te;++te)n(me,we+32*te-4,me,we+32*te+12,4);for(te=-1;8>te;++te)n(Se,Oe+32*te-4,Se,Oe+32*te+4,4),n(De,Ze+32*te-4,De,Ze+32*te+4,4)}var qe=N.Gd,Ke=N.Hd+ie,it=ke.ad,Ye=ke.Hc;if(0<he&&(n(me,we-32,qe[Ke].y,0,16),n(Se,Oe-32,qe[Ke].f,0,8),n(De,Ze-32,qe[Ke].ea,0,8)),ke.Za){var nt=me,Ue=we-32+16;for(0<he&&(ie>=N.za-1?i(nt,Ue,qe[Ke].y[15],4):n(nt,Ue,qe[Ke+1].y,0,4)),te=0;4>te;te++)nt[Ue+128+te]=nt[Ue+256+te]=nt[Ue+384+te]=nt[Ue+0+te];for(te=0;16>te;++te,Ye<<=2)nt=me,Ue=we+qu[te],Zi[ke.Ob[te]](nt,Ue),as(Ye,it,16*+te,nt,Ue)}else if(nt=Do(ie,he,ke.Ob[0]),Ki[nt](me,we),Ye!=0)for(te=0;16>te;++te,Ye<<=2)as(Ye,it,16*+te,me,we+qu[te]);for(te=ke.Gc,nt=Do(ie,he,ke.Dd),fa[nt](Se,Oe),fa[nt](De,Ze),Ye=it,nt=Se,Ue=Oe,255&(ke=0|te)&&(170&ke?Eo(Ye,256,nt,Ue):on(Ye,256,nt,Ue)),ke=De,Ye=Ze,255&(te>>=8)&&(170&te?Eo(it,320,ke,Ye):on(it,320,ke,Ye)),he<N.Ub-1&&(n(qe[Ke].y,0,me,we+480,16),n(qe[Ke].f,0,Se,Oe+224,8),n(qe[Ke].ea,0,De,Ze+224,8)),te=8*ve*N.B,qe=N.sa,Ke=N.ta+16*ie+16*ve*N.R,it=N.qa,ke=N.ra+8*ie+te,Ye=N.Ha,nt=N.Ia+8*ie+te,te=0;16>te;++te)n(qe,Ke+te*N.R,me,we+32*te,16);for(te=0;8>te;++te)n(it,ke+te*N.B,Se,Oe+32*te,8),n(Ye,nt+te*N.B,De,Ze+32*te,8)}}function to(N,B,te,ie,he,ve,me,we,Se){var Oe=[0],De=[0],Ze=0,ke=Se!=null?Se.kd:0,qe=Se??new Ut;if(N==null||12>te)return 7;qe.data=N,qe.w=B,qe.ha=te,B=[B],te=[te],qe.gb=[qe.gb];e:{var Ke=B,it=te,Ye=qe.gb;if(t(N!=null),t(it!=null),t(Ye!=null),Ye[0]=0,12<=it[0]&&!r(N,Ke[0],"RIFF")){if(r(N,Ke[0]+8,"WEBP")){Ye=3;break e}var nt=Pe(N,Ke[0]+4);if(12>nt||4294967286<nt){Ye=3;break e}if(ke&&nt>it[0]-8){Ye=7;break e}Ye[0]=nt,Ke[0]+=12,it[0]-=12}Ye=0}if(Ye!=0)return Ye;for(nt=0<qe.gb[0],te=te[0];;){e:{var Ue=N;it=B,Ye=te;var ot=Oe,ut=De,qt=Ke=[0];if((It=Ze=[Ze])[0]=0,8>Ye[0])Ye=7;else{if(!r(Ue,it[0],"VP8X")){if(Pe(Ue,it[0]+4)!=10){Ye=3;break e}if(18>Ye[0]){Ye=7;break e}var Mt=Pe(Ue,it[0]+8),ar=1+Me(Ue,it[0]+12);if(2147483648<=ar*(Ue=1+Me(Ue,it[0]+15))){Ye=3;break e}qt!=null&&(qt[0]=Mt),ot!=null&&(ot[0]=ar),ut!=null&&(ut[0]=Ue),it[0]+=18,Ye[0]-=18,It[0]=1}Ye=0}}if(Ze=Ze[0],Ke=Ke[0],Ye!=0)return Ye;if(it=!!(2&Ke),!nt&&Ze)return 3;if(ve!=null&&(ve[0]=!!(16&Ke)),me!=null&&(me[0]=it),we!=null&&(we[0]=0),me=Oe[0],Ke=De[0],Ze&&it&&Se==null){Ye=0;break}if(4>te){Ye=7;break}if(nt&&Ze||!nt&&!Ze&&!r(N,B[0],"ALPH")){te=[te],qe.na=[qe.na],qe.P=[qe.P],qe.Sa=[qe.Sa];e:{Mt=N,Ye=B,nt=te;var It=qe.gb;ot=qe.na,ut=qe.P,qt=qe.Sa,ar=22,t(Mt!=null),t(nt!=null),Ue=Ye[0];var _r=nt[0];for(t(ot!=null),t(qt!=null),ot[0]=null,ut[0]=null,qt[0]=0;;){if(Ye[0]=Ue,nt[0]=_r,8>_r){Ye=7;break e}var Rn=Pe(Mt,Ue+4);if(4294967286<Rn){Ye=3;break e}var fr=8+Rn+1&-2;if(ar+=fr,0<It&&ar>It){Ye=3;break e}if(!r(Mt,Ue,"VP8 ")||!r(Mt,Ue,"VP8L")){Ye=0;break e}if(_r[0]<fr){Ye=7;break e}r(Mt,Ue,"ALPH")||(ot[0]=Mt,ut[0]=Ue+8,qt[0]=Rn),Ue+=fr,_r-=fr}}if(te=te[0],qe.na=qe.na[0],qe.P=qe.P[0],qe.Sa=qe.Sa[0],Ye!=0)break}te=[te],qe.Ja=[qe.Ja],qe.xa=[qe.xa];e:if(It=N,Ye=B,nt=te,ot=qe.gb[0],ut=qe.Ja,qt=qe.xa,Mt=Ye[0],Ue=!r(It,Mt,"VP8 "),ar=!r(It,Mt,"VP8L"),t(It!=null),t(nt!=null),t(ut!=null),t(qt!=null),8>nt[0])Ye=7;else{if(Ue||ar){if(It=Pe(It,Mt+4),12<=ot&&It>ot-12){Ye=3;break e}if(ke&&It>nt[0]-8){Ye=7;break e}ut[0]=It,Ye[0]+=8,nt[0]-=8,qt[0]=ar}else qt[0]=5<=nt[0]&&It[Mt+0]==47&&!(It[Mt+4]>>5),ut[0]=nt[0];Ye=0}if(te=te[0],qe.Ja=qe.Ja[0],qe.xa=qe.xa[0],B=B[0],Ye!=0)break;if(4294967286<qe.Ja)return 3;if(we==null||it||(we[0]=qe.xa?2:1),me=[me],Ke=[Ke],qe.xa){if(5>te){Ye=7;break}we=me,ke=Ke,it=ve,N==null||5>te?N=0:5<=te&&N[B+0]==47&&!(N[B+4]>>5)?(nt=[0],It=[0],ot=[0],Y(ut=new z,N,B,te),Ra(ut,nt,It,ot)?(we!=null&&(we[0]=nt[0]),ke!=null&&(ke[0]=It[0]),it!=null&&(it[0]=ot[0]),N=1):N=0):N=0}else{if(10>te){Ye=7;break}we=Ke,N==null||10>te||!qi(N,B+3,te-3)?N=0:(ke=N[B+0]|N[B+1]<<8|N[B+2]<<16,it=16383&(N[B+7]<<8|N[B+6]),N=16383&(N[B+9]<<8|N[B+8]),1&ke||3<(ke>>1&7)||!(ke>>4&1)||ke>>5>=qe.Ja||!it||!N?N=0:(me&&(me[0]=it),we&&(we[0]=N),N=1))}if(!N||(me=me[0],Ke=Ke[0],Ze&&(Oe[0]!=me||De[0]!=Ke)))return 3;Se!=null&&(Se[0]=qe,Se.offset=B-Se.w,t(4294967286>B-Se.w),t(Se.offset==Se.ha-te));break}return Ye==0||Ye==7&&Ze&&Se==null?(ve!=null&&(ve[0]|=qe.na!=null&&0<qe.na.length),ie!=null&&(ie[0]=me),he!=null&&(he[0]=Ke),0):Ye}function Gi(N,B,te){var ie=B.width,he=B.height,ve=0,me=0,we=ie,Se=he;if(B.Da=N!=null&&0<N.Da,B.Da&&(we=N.cd,Se=N.bd,ve=N.v,me=N.j,11>te||(ve&=-2,me&=-2),0>ve||0>me||0>=we||0>=Se||ve+we>ie||me+Se>he))return 0;if(B.v=ve,B.j=me,B.va=ve+we,B.o=me+Se,B.U=we,B.T=Se,B.da=N!=null&&0<N.da,B.da){if(!be(we,Se,te=[N.ib],ve=[N.hb]))return 0;B.ib=te[0],B.hb=ve[0]}return B.ob=N!=null&&N.ob,B.Kb=N==null||!N.Sd,B.da&&(B.ob=B.ib<3*ie/4&&B.hb<3*he/4,B.Kb=0),1}function ua(N){if(N==null)return 2;if(11>N.S){var B=N.f.RGBA;B.fb+=(N.height-1)*B.A,B.A=-B.A}else B=N.f.kb,N=N.height,B.O+=(N-1)*B.fa,B.fa=-B.fa,B.N+=(N-1>>1)*B.Ab,B.Ab=-B.Ab,B.W+=(N-1>>1)*B.Db,B.Db=-B.Db,B.F!=null&&(B.J+=(N-1)*B.lb,B.lb=-B.lb);return 0}function $i(N,B,te,ie){if(ie==null||0>=N||0>=B)return 2;if(te!=null){if(te.Da){var he=te.cd,ve=te.bd,me=-2&te.v,we=-2&te.j;if(0>me||0>we||0>=he||0>=ve||me+he>N||we+ve>B)return 2;N=he,B=ve}if(te.da){if(!be(N,B,he=[te.ib],ve=[te.hb]))return 2;N=he[0],B=ve[0]}}ie.width=N,ie.height=B;e:{var Se=ie.width,Oe=ie.height;if(N=ie.S,0>=Se||0>=Oe||!(N>=xl&&13>N))N=2;else{if(0>=ie.Rd&&ie.sd==null){me=ve=he=B=0;var De=(we=Se*kl[N])*Oe;if(11>N||(ve=(Oe+1)/2*(B=(Se+1)/2),N==12&&(me=(he=Se)*Oe)),(Oe=a(De+2*ve+me))==null){N=1;break e}ie.sd=Oe,11>N?((Se=ie.f.RGBA).eb=Oe,Se.fb=0,Se.A=we,Se.size=De):((Se=ie.f.kb).y=Oe,Se.O=0,Se.fa=we,Se.Fd=De,Se.f=Oe,Se.N=0+De,Se.Ab=B,Se.Cd=ve,Se.ea=Oe,Se.W=0+De+ve,Se.Db=B,Se.Ed=ve,N==12&&(Se.F=Oe,Se.J=0+De+2*ve),Se.Tc=me,Se.lb=he)}if(B=1,he=ie.S,ve=ie.width,me=ie.height,he>=xl&&13>he)if(11>he)N=ie.f.RGBA,B&=(we=Math.abs(N.A))*(me-1)+ve<=N.size,B&=we>=ve*kl[he],B&=N.eb!=null;else{N=ie.f.kb,we=(ve+1)/2,De=(me+1)/2,Se=Math.abs(N.fa),Oe=Math.abs(N.Ab);var Ze=Math.abs(N.Db),ke=Math.abs(N.lb),qe=ke*(me-1)+ve;B&=Se*(me-1)+ve<=N.Fd,B&=Oe*(De-1)+we<=N.Cd,B=(B&=Ze*(De-1)+we<=N.Ed)&Se>=ve&Oe>=we&Ze>=we,B&=N.y!=null,B&=N.f!=null,B&=N.ea!=null,he==12&&(B&=ke>=ve,B&=qe<=N.Tc,B&=N.F!=null)}else B=0;N=B?0:2}}return N!=0||te!=null&&te.fd&&(N=ua(ie)),N}var Vn=64,os=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Ql=24,ca=32,Jr=8,vl=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Le("Predictor0","PredictorAdd0"),R.Predictor0=function(){return 4278190080},R.Predictor1=function(N){return N},R.Predictor2=function(N,B,te){return B[te+0]},R.Predictor3=function(N,B,te){return B[te+1]},R.Predictor4=function(N,B,te){return B[te-1]},R.Predictor5=function(N,B,te){return Ce(Ce(N,B[te+1]),B[te+0])},R.Predictor6=function(N,B,te){return Ce(N,B[te-1])},R.Predictor7=function(N,B,te){return Ce(N,B[te+0])},R.Predictor8=function(N,B,te){return Ce(B[te-1],B[te+0])},R.Predictor9=function(N,B,te){return Ce(B[te+0],B[te+1])},R.Predictor10=function(N,B,te){return Ce(Ce(N,B[te-1]),Ce(B[te+0],B[te+1]))},R.Predictor11=function(N,B,te){var ie=B[te+0];return 0>=st(ie>>24&255,N>>24&255,(B=B[te-1])>>24&255)+st(ie>>16&255,N>>16&255,B>>16&255)+st(ie>>8&255,N>>8&255,B>>8&255)+st(255&ie,255&N,255&B)?ie:N},R.Predictor12=function(N,B,te){var ie=B[te+0];return(je((N>>24&255)+(ie>>24&255)-((B=B[te-1])>>24&255))<<24|je((N>>16&255)+(ie>>16&255)-(B>>16&255))<<16|je((N>>8&255)+(ie>>8&255)-(B>>8&255))<<8|je((255&N)+(255&ie)-(255&B)))>>>0},R.Predictor13=function(N,B,te){var ie=B[te-1];return(He((N=Ce(N,B[te+0]))>>24&255,ie>>24&255)<<24|He(N>>16&255,ie>>16&255)<<16|He(N>>8&255,ie>>8&255)<<8|He(255&N,255&ie))>>>0};var ka=R.PredictorAdd0;R.PredictorAdd1=pt,Le("Predictor2","PredictorAdd2"),Le("Predictor3","PredictorAdd3"),Le("Predictor4","PredictorAdd4"),Le("Predictor5","PredictorAdd5"),Le("Predictor6","PredictorAdd6"),Le("Predictor7","PredictorAdd7"),Le("Predictor8","PredictorAdd8"),Le("Predictor9","PredictorAdd9"),Le("Predictor10","PredictorAdd10"),Le("Predictor11","PredictorAdd11"),Le("Predictor12","PredictorAdd12"),Le("Predictor13","PredictorAdd13");var Wi=R.PredictorAdd2;vt("ColorIndexInverseTransform","MapARGB","32b",function(N){return N>>8&255},function(N){return N}),vt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(N){return N},function(N){return N>>8&255});var ml,_o=R.ColorIndexInverseTransform,Yi=R.MapARGB,Bo=R.VP8LColorIndexInverseTransformAlpha,za=R.MapAlpha,Ti=R.VP8LPredictorsAdd=[];Ti.length=16,(R.VP8LPredictors=[]).length=16,(R.VP8LPredictorsAdd_C=[]).length=16,(R.VP8LPredictors_C=[]).length=16;var xo,zo,Oa,So,tr,en,Ln,Tn,Gn,Eo,Xi,on,ri,ui,yl,Jl,eu,bl,wi,el,tu,Fu,Ua,Ri,Uo,ju,wl,gc,vc=a(511),mc=a(2041),yc=a(225),bc=a(767),wc=0,qo=mc,_l=yc,_i=bc,ro=vc,xl=0,Ho=1,ff=2,Sl=3,ru=4,sn=5,Du=6,El=7,Ts=8,nu=9,iu=10,au=[2,3,7],_c=[3,3,11],tl=[280,256,256,256,40],Xf=[0,1,1,1,0],Hh=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Kf=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],hf=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Bu=8,Rs=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],zu=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Al=null,df=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],no=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],xc=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Uu=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Zf=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],Qf=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Sc=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Ki=[],Zi=[],fa=[],Ao=1,ou=2,Qi=[],Ca=[];Ba("UpsampleRgbLinePair",Pa,3),Ba("UpsampleBgrLinePair",gl,3),Ba("UpsampleRgbaLinePair",Zl,4),Ba("UpsampleBgraLinePair",Js,4),Ba("UpsampleArgbLinePair",Ls,4),Ba("UpsampleRgba4444LinePair",Li,2),Ba("UpsampleRgb565LinePair",Qs,2);var Jf=R.UpsampleRgbLinePair,eh=R.UpsampleBgrLinePair,Ms=R.UpsampleRgbaLinePair,su=R.UpsampleBgraLinePair,ci=R.UpsampleArgbLinePair,xi=R.UpsampleRgba4444LinePair,Ec=R.UpsampleRgb565LinePair,ss=16,Po=1<<ss-1,Yr=-227,tn=482,ls=6,Mi=0,ha=a(256),rl=a(256),Pl=a(256),da=a(256),lu=a(tn-Yr),pf=a(tn-Yr);la("YuvToRgbRow",Pa,3),la("YuvToBgrRow",gl,3),la("YuvToRgbaRow",Zl,4),la("YuvToBgraRow",Js,4),la("YuvToArgbRow",Ls,4),la("YuvToRgba4444Row",Li,2),la("YuvToRgb565Row",Qs,2);var qu=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],us=[0,2,8],th=[8,7,6,4,4,2,2,2,1,1,1,1],cs=1;this.WebPDecodeRGBA=function(N,B,te,ie,he){var ve=Ho,me=new Et,we=new vr;me.ba=we,we.S=ve,we.width=[we.width],we.height=[we.height];var Se=we.width,Oe=we.height,De=new Xt;if(De==null||N==null)var Ze=2;else t(De!=null),Ze=to(N,B,te,De.width,De.height,De.Pd,De.Qd,De.format,null);if(Ze!=0?Se=0:(Se!=null&&(Se[0]=De.width[0]),Oe!=null&&(Oe[0]=De.height[0]),Se=1),Se){we.width=we.width[0],we.height=we.height[0],ie!=null&&(ie[0]=we.width),he!=null&&(he[0]=we.height);e:{if(ie=new mr,(he=new Ut).data=N,he.w=B,he.ha=te,he.kd=1,B=[0],t(he!=null),((N=to(he.data,he.w,he.ha,null,null,null,B,null,he))==0||N==7)&&B[0]&&(N=4),(B=N)==0){if(t(me!=null),ie.data=he.data,ie.w=he.w+he.offset,ie.ha=he.ha-he.offset,ie.put=Yt,ie.ac=mn,ie.bc=sa,ie.ma=me,he.xa){if((N=Io())==null){me=1;break e}if(function(ke,qe){var Ke=[0],it=[0],Ye=[0];t:for(;;){if(ke==null)return 0;if(qe==null)return ke.a=2,0;if(ke.l=qe,ke.a=0,Y(ke.m,qe.data,qe.w,qe.ha),!Ra(ke.m,Ke,it,Ye)){ke.a=3;break t}if(ke.xb=ou,qe.width=Ke[0],qe.height=it[0],!Ci(Ke[0],it[0],1,ke,null))break t;return 1}return t(ke.a!=0),0}(N,ie)){if(ie=(B=$i(ie.width,ie.height,me.Oa,me.ba))==0){t:{ie=N;r:for(;;){if(ie==null){ie=0;break t}if(t(ie.s.yc!=null),t(ie.s.Ya!=null),t(0<ie.s.Wb),t((te=ie.l)!=null),t((he=te.ma)!=null),ie.xb!=0){if(ie.ca=he.ba,ie.tb=he.tb,t(ie.ca!=null),!Gi(he.Oa,te,Sl)){ie.a=2;break r}if(!Xa(ie,te.width)||te.da)break r;if((te.da||St(ie.ca.S))&&pl(),11>ie.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),ie.ca.f.kb.F!=null&&pl()),ie.Pb&&0<ie.s.ua&&ie.s.vb.X==null&&!de(ie.s.vb,ie.s.Wa.Xa)){ie.a=1;break r}ie.xb=0}if(!_a(ie,ie.V,ie.Ba,ie.c,ie.i,te.o,Mo))break r;he.Dc=ie.Ma,ie=1;break t}t(ie.a!=0),ie=0}ie=!ie}ie&&(B=N.a)}else B=N.a}else{if((N=new Jo)==null){me=1;break e}if(N.Fa=he.na,N.P=he.P,N.qc=he.Sa,Ka(N,ie)){if((B=$i(ie.width,ie.height,me.Oa,me.ba))==0){if(N.Aa=0,te=me.Oa,t((he=N)!=null),te!=null){if(0<(Se=0>(Se=te.Md)?0:100<Se?255:255*Se/100)){for(Oe=De=0;4>Oe;++Oe)12>(Ze=he.pb[Oe]).lc&&(Ze.ia=Se*th[0>Ze.lc?0:Ze.lc]>>3),De|=Ze.ia;De&&(alert("todo:VP8InitRandom"),he.ia=1)}he.Ga=te.Id,100<he.Ga?he.Ga=100:0>he.Ga&&(he.Ga=0)}(function(ke,qe){if(ke==null)return 0;if(qe==null)return Er(ke,2,"NULL VP8Io parameter in VP8Decode().");if(!ke.cb&&!Ka(ke,qe))return 0;if(t(ke.cb),qe.ac==null||qe.ac(qe)){qe.ob&&(ke.L=0);var Ke=us[ke.L];if(ke.L==2?(ke.yb=0,ke.zb=0):(ke.yb=qe.v-Ke>>4,ke.zb=qe.j-Ke>>4,0>ke.yb&&(ke.yb=0),0>ke.zb&&(ke.zb=0)),ke.Va=qe.o+15+Ke>>4,ke.Hb=qe.va+15+Ke>>4,ke.Hb>ke.za&&(ke.Hb=ke.za),ke.Va>ke.Ub&&(ke.Va=ke.Ub),0<ke.L){var it=ke.ed;for(Ke=0;4>Ke;++Ke){var Ye;if(ke.Qa.Cb){var nt=ke.Qa.Lb[Ke];ke.Qa.Fb||(nt+=it.Tb)}else nt=it.Tb;for(Ye=0;1>=Ye;++Ye){var Ue=ke.gd[Ke][Ye],ot=nt;if(it.Pc&&(ot+=it.vd[0],Ye&&(ot+=it.od[0])),0<(ot=0>ot?0:63<ot?63:ot)){var ut=ot;0<it.wb&&(ut=4<it.wb?ut>>2:ut>>1)>9-it.wb&&(ut=9-it.wb),1>ut&&(ut=1),Ue.dd=ut,Ue.tc=2*ot+ut,Ue.ld=40<=ot?2:15<=ot?1:0}else Ue.tc=0;Ue.La=Ye}}}Ke=0}else Er(ke,6,"Frame setup failed"),Ke=ke.a;if(Ke=Ke==0){if(Ke){ke.$c=0,0<ke.Aa||(ke.Ic=cs);t:{Ke=ke.Ic,it=4*(ut=ke.za);var qt=32*ut,Mt=ut+1,ar=0<ke.L?ut*(0<ke.Aa?2:1):0,It=(ke.Aa==2?2:1)*ut;if((Ue=it+832+(Ye=3*(16*Ke+us[ke.L])/2*qt)+(nt=ke.Fa!=null&&0<ke.Fa.length?ke.Kc.c*ke.Kc.i:0))!=Ue)Ke=0;else{if(Ue>ke.Vb){if(ke.Vb=0,ke.Ec=a(Ue),ke.Fc=0,ke.Ec==null){Ke=Er(ke,1,"no memory during frame initialization.");break t}ke.Vb=Ue}Ue=ke.Ec,ot=ke.Fc,ke.Ac=Ue,ke.Bc=ot,ot+=it,ke.Gd=l(qt,oi),ke.Hd=0,ke.rb=l(Mt+1,Qo),ke.sb=1,ke.wa=ar?l(ar,Sa):null,ke.Y=0,ke.D.Nb=0,ke.D.wa=ke.wa,ke.D.Y=ke.Y,0<ke.Aa&&(ke.D.Y+=ut),t(!0),ke.oc=Ue,ke.pc=ot,ot+=832,ke.ya=l(It,$s),ke.aa=0,ke.D.ya=ke.ya,ke.D.aa=ke.aa,ke.Aa==2&&(ke.D.aa+=ut),ke.R=16*ut,ke.B=8*ut,ut=(qt=us[ke.L])*ke.R,qt=qt/2*ke.B,ke.sa=Ue,ke.ta=ot+ut,ke.qa=ke.sa,ke.ra=ke.ta+16*Ke*ke.R+qt,ke.Ha=ke.qa,ke.Ia=ke.ra+8*Ke*ke.B+qt,ke.$c=0,ot+=Ye,ke.mb=nt?Ue:null,ke.nb=nt?ot:null,t(ot+nt<=ke.Fc+ke.Vb),Pn(ke),i(ke.Ac,ke.Bc,0,it),Ke=1}}if(Ke){if(qe.ka=0,qe.y=ke.sa,qe.O=ke.ta,qe.f=ke.qa,qe.N=ke.ra,qe.ea=ke.Ha,qe.Vd=ke.Ia,qe.fa=ke.R,qe.Rc=ke.B,qe.F=null,qe.J=0,!wc){for(Ke=-255;255>=Ke;++Ke)vc[255+Ke]=0>Ke?-Ke:Ke;for(Ke=-1020;1020>=Ke;++Ke)mc[1020+Ke]=-128>Ke?-128:127<Ke?127:Ke;for(Ke=-112;112>=Ke;++Ke)yc[112+Ke]=-16>Ke?-16:15<Ke?15:Ke;for(Ke=-255;510>=Ke;++Ke)bc[255+Ke]=0>Ke?0:255<Ke?255:Ke;wc=1}Ln=Ar,Tn=Ea,Eo=hl,Xi=ts,on=$l,Gn=Ru,ri=X,ui=fe,yl=Ge,Jl=lt,eu=Ne,bl=Fe,wi=ft,el=Lt,tu=Jn,Fu=Da,Ua=eo,Ri=Os,Zi[0]=dc,Zi[1]=rs,Zi[2]=Ks,Zi[3]=vo,Zi[4]=pc,Zi[5]=pn,Zi[6]=Qa,Zi[7]=Wl,Zi[8]=ks,Zi[9]=Yl,Ki[0]=Za,Ki[1]=fc,Ki[2]=hc,Ki[3]=Xs,Ki[4]=Ma,Ki[5]=Ia,Ki[6]=Fa,fa[0]=Fo,fa[1]=Ys,fa[2]=Mu,fa[3]=ja,fa[4]=Aa,fa[5]=Xl,fa[6]=Ja,Ke=1}else Ke=0}Ke&&(Ke=function(_r,Rn){for(_r.M=0;_r.M<_r.Va;++_r.M){var fr,Tt=_r.Jc[_r.M&_r.Xb],_t=_r.m,Mn=_r;for(fr=0;fr<Mn.za;++fr){var Dt=_t,or=Mn,kr=or.Ac,fi=or.Bc+4*fr,ni=or.zc,Ir=or.ya[or.aa+fr];if(or.Qa.Bb?Ir.$b=le(Dt,or.Pa.jb[0])?2+le(Dt,or.Pa.jb[2]):le(Dt,or.Pa.jb[1]):Ir.$b=0,or.kc&&(Ir.Ad=le(Dt,or.Bd)),Ir.Za=!le(Dt,145)+0,Ir.Za){var hi=Ir.Ob,hn=0;for(or=0;4>or;++or){var On,Sr=ni[0+or];for(On=0;4>On;++On){Sr=Zf[kr[fi+On]][Sr];for(var Dr=xc[le(Dt,Sr[0])];0<Dr;)Dr=xc[2*Dr+le(Dt,Sr[Dr])];Sr=-Dr,kr[fi+On]=Sr}n(hi,hn,kr,fi,4),hn+=4,ni[0+or]=Sr}}else Sr=le(Dt,156)?le(Dt,128)?1:3:le(Dt,163)?2:0,Ir.Ob[0]=Sr,i(kr,fi,Sr,4),i(ni,0,Sr,4);Ir.Dd=le(Dt,142)?le(Dt,114)?le(Dt,183)?1:3:2:0}if(Mn.m.Ka)return Er(_r,7,"Premature end-of-partition0 encountered.");for(;_r.ja<_r.za;++_r.ja){if(Mn=Tt,Dt=(_t=_r).rb[_t.sb-1],kr=_t.rb[_t.sb+_t.ja],fr=_t.ya[_t.aa+_t.ja],fi=_t.kc?fr.Ad:0)Dt.la=kr.la=0,fr.Za||(Dt.Na=kr.Na=0),fr.Hc=0,fr.Gc=0,fr.ia=0;else{var wn,Br;if(Dt=kr,kr=Mn,fi=_t.Pa.Xc,ni=_t.ya[_t.aa+_t.ja],Ir=_t.pb[ni.$b],or=ni.ad,hi=0,hn=_t.rb[_t.sb-1],Sr=On=0,i(or,hi,0,384),ni.Za)var _n=0,xn=fi[3];else{Dr=a(16);var Xr=Dt.Na+hn.Na;if(Xr=Al(kr,fi[1],Xr,Ir.Eb,0,Dr,0),Dt.Na=hn.Na=(0<Xr)+0,1<Xr)Ln(Dr,0,or,hi);else{var Si=Dr[0]+3>>3;for(Dr=0;256>Dr;Dr+=16)or[hi+Dr]=Si}_n=1,xn=fi[0]}var Vr=15&Dt.la,Gr=15&hn.la;for(Dr=0;4>Dr;++Dr){var $n=1&Gr;for(Si=Br=0;4>Si;++Si)Vr=Vr>>1|($n=(Xr=Al(kr,xn,Xr=$n+(1&Vr),Ir.Sc,_n,or,hi))>_n)<<7,Br=Br<<2|(3<Xr?3:1<Xr?2:or[hi+0]!=0),hi+=16;Vr>>=4,Gr=Gr>>1|$n<<7,On=(On<<8|Br)>>>0}for(xn=Vr,_n=Gr>>4,wn=0;4>wn;wn+=2){for(Br=0,Vr=Dt.la>>4+wn,Gr=hn.la>>4+wn,Dr=0;2>Dr;++Dr){for($n=1&Gr,Si=0;2>Si;++Si)Xr=$n+(1&Vr),Vr=Vr>>1|($n=0<(Xr=Al(kr,fi[2],Xr,Ir.Qc,0,or,hi)))<<3,Br=Br<<2|(3<Xr?3:1<Xr?2:or[hi+0]!=0),hi+=16;Vr>>=2,Gr=Gr>>1|$n<<5}Sr|=Br<<4*wn,xn|=Vr<<4<<wn,_n|=(240&Gr)<<wn}Dt.la=xn,hn.la=_n,ni.Hc=On,ni.Gc=Sr,ni.ia=43690&Sr?0:Ir.ia,fi=!(On|Sr)}if(0<_t.L&&(_t.wa[_t.Y+_t.ja]=_t.gd[fr.$b][fr.Za],_t.wa[_t.Y+_t.ja].La|=!fi),Mn.Ka)return Er(_r,7,"Premature end-of-file encountered.")}if(Pn(_r),_t=Rn,Mn=1,fr=(Tt=_r).D,Dt=0<Tt.L&&Tt.M>=Tt.zb&&Tt.M<=Tt.Va,Tt.Aa==0)t:{if(fr.M=Tt.M,fr.uc=Dt,li(Tt,fr),Mn=1,fr=(Br=Tt.D).Nb,Dt=(Sr=us[Tt.L])*Tt.R,kr=Sr/2*Tt.B,Dr=16*fr*Tt.R,Si=8*fr*Tt.B,fi=Tt.sa,ni=Tt.ta-Dt+Dr,Ir=Tt.qa,or=Tt.ra-kr+Si,hi=Tt.Ha,hn=Tt.Ia-kr+Si,Gr=(Vr=Br.M)==0,On=Vr>=Tt.Va-1,Tt.Aa==2&&li(Tt,Br),Br.uc)for($n=(Xr=Tt).D.M,t(Xr.D.uc),Br=Xr.yb;Br<Xr.Hb;++Br){_n=Br,xn=$n;var Ei=(pa=(yr=Xr).D).Nb;wn=yr.R;var pa=pa.wa[pa.Y+_n],Wn=yr.sa,In=yr.ta+16*Ei*wn+16*_n,ga=pa.dd,Kr=pa.tc;if(Kr!=0)if(t(3<=Kr),yr.L==1)0<_n&&Fu(Wn,In,wn,Kr+4),pa.La&&Ri(Wn,In,wn,Kr),0<xn&&tu(Wn,In,wn,Kr+4),pa.La&&Ua(Wn,In,wn,Kr);else{var Ii=yr.B,zr=yr.qa,rr=yr.ra+8*Ei*Ii+8*_n,Or=yr.Ha,yr=yr.Ia+8*Ei*Ii+8*_n;Ei=pa.ld,0<_n&&(ui(Wn,In,wn,Kr+4,ga,Ei),Jl(zr,rr,Or,yr,Ii,Kr+4,ga,Ei)),pa.La&&(bl(Wn,In,wn,Kr,ga,Ei),el(zr,rr,Or,yr,Ii,Kr,ga,Ei)),0<xn&&(ri(Wn,In,wn,Kr+4,ga,Ei),yl(zr,rr,Or,yr,Ii,Kr+4,ga,Ei)),pa.La&&(eu(Wn,In,wn,Kr,ga,Ei),wi(zr,rr,Or,yr,Ii,Kr,ga,Ei))}}if(Tt.ia&&alert("todo:DitherRow"),_t.put!=null){if(Br=16*Vr,Vr=16*(Vr+1),Gr?(_t.y=Tt.sa,_t.O=Tt.ta+Dr,_t.f=Tt.qa,_t.N=Tt.ra+Si,_t.ea=Tt.Ha,_t.W=Tt.Ia+Si):(Br-=Sr,_t.y=fi,_t.O=ni,_t.f=Ir,_t.N=or,_t.ea=hi,_t.W=hn),On||(Vr-=Sr),Vr>_t.o&&(Vr=_t.o),_t.F=null,_t.J=null,Tt.Fa!=null&&0<Tt.Fa.length&&Br<Vr&&(_t.J=Ni(Tt,_t,Br,Vr-Br),_t.F=Tt.mb,_t.F==null&&_t.F.length==0)){Mn=Er(Tt,3,"Could not decode alpha data.");break t}Br<_t.j&&(Sr=_t.j-Br,Br=_t.j,t(!(1&Sr)),_t.O+=Tt.R*Sr,_t.N+=Tt.B*(Sr>>1),_t.W+=Tt.B*(Sr>>1),_t.F!=null&&(_t.J+=_t.width*Sr)),Br<Vr&&(_t.O+=_t.v,_t.N+=_t.v>>1,_t.W+=_t.v>>1,_t.F!=null&&(_t.J+=_t.v),_t.ka=Br-_t.j,_t.U=_t.va-_t.v,_t.T=Vr-Br,Mn=_t.put(_t))}fr+1!=Tt.Ic||On||(n(Tt.sa,Tt.ta-Dt,fi,ni+16*Tt.R,Dt),n(Tt.qa,Tt.ra-kr,Ir,or+8*Tt.B,kr),n(Tt.Ha,Tt.Ia-kr,hi,hn+8*Tt.B,kr))}if(!Mn)return Er(_r,6,"Output aborted.")}return 1}(ke,qe)),qe.bc!=null&&qe.bc(qe),Ke&=1}return Ke?(ke.cb=0,Ke):0})(N,ie)||(B=N.a)}}else B=N.a}B==0&&me.Oa!=null&&me.Oa.fd&&(B=ua(me.ba))}me=B}ve=me!=0?null:11>ve?we.f.RGBA.eb:we.f.kb.y}else ve=null;return ve};var kl=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(R,T){for(var k="",C=0;C<4;C++)k+=String.fromCharCode(R[T++]);return k}function f(R,T){return R[T+0]|R[T+1]<<8}function v(R,T){return(R[T+0]|R[T+1]<<8|R[T+2]<<16)>>>0}function g(R,T){return(R[T+0]|R[T+1]<<8|R[T+2]<<16|R[T+3]<<24)>>>0}new u;var c=[0],y=[0],x=[],E=new u,S=e,b=function(R,T){var k={},C=0,q=!1,G=0,J=0;if(k.frames=[],!function(j,z){for(var Z=0;Z<4;Z++)if(j[z+Z]!="RIFF".charCodeAt(Z))return!0;return!1}(R,T)){for(g(R,T+=4),T+=8;T<R.length;){var ae=d(R,T),H=g(R,T+=4);T+=4;var V=H+(1&H);switch(ae){case"VP8 ":case"VP8L":k.frames[C]===void 0&&(k.frames[C]={}),(D=k.frames[C]).src_off=q?J:T-8,D.src_size=G+H+8,C++,q&&(q=!1,G=0,J=0);break;case"VP8X":(D=k.header={}).feature_flags=R[T];var Y=T+4;D.canvas_width=1+v(R,Y),Y+=3,D.canvas_height=1+v(R,Y),Y+=3;break;case"ALPH":q=!0,G=V+8,J=T-8;break;case"ANIM":(D=k.header).bgcolor=g(R,T),Y=T+4,D.loop_count=f(R,Y),Y+=2;break;case"ANMF":var U,D;(D=k.frames[C]={}).offset_x=2*v(R,T),T+=3,D.offset_y=2*v(R,T),T+=3,D.width=1+v(R,T),T+=3,D.height=1+v(R,T),T+=3,D.duration=v(R,T),T+=3,U=R[T++],D.dispose=1&U,D.blend=U>>1&1}ae!="ANMF"&&(T+=V)}return k}}(S,0);b.response=S,b.rgbaoutput=!0,b.dataurl=!1;var w=b.header?b.header:null,_=b.frames?b.frames:null;if(w){w.loop_counter=w.loop_count,c=[w.canvas_height],y=[w.canvas_width];for(var A=0;A<_.length&&_[A].blend!=0;A++);}var M=_[0],O=E.WebPDecodeRGBA(S,M.src_off,M.src_size,y,c);M.rgba=O,M.imgwidth=y[0],M.imgheight=c[0];for(var L=0;L<y[0]*c[0]*4;L++)x[L]=O[L];return this.width=y,this.height=c,this.data=x,this}(function(e){var t,r,n,i,a,l,o,u,d,f=function(j){return j=j||{},this.isStrokeTransparent=j.isStrokeTransparent||!1,this.strokeOpacity=j.strokeOpacity||1,this.strokeStyle=j.strokeStyle||"#000000",this.fillStyle=j.fillStyle||"#000000",this.isFillTransparent=j.isFillTransparent||!1,this.fillOpacity=j.fillOpacity||1,this.font=j.font||"10px sans-serif",this.textBaseline=j.textBaseline||"alphabetic",this.textAlign=j.textAlign||"left",this.lineWidth=j.lineWidth||1,this.lineJoin=j.lineJoin||"miter",this.lineCap=j.lineCap||"butt",this.path=j.path||[],this.transform=j.transform!==void 0?j.transform.clone():new u,this.globalCompositeOperation=j.globalCompositeOperation||"normal",this.globalAlpha=j.globalAlpha||1,this.clip_path=j.clip_path||[],this.currentPoint=j.currentPoint||new l,this.miterLimit=j.miterLimit||10,this.lastPoint=j.lastPoint||new l,this.lineDashOffset=j.lineDashOffset||0,this.lineDash=j.lineDash||[],this.margin=j.margin||[0,0,0,0],this.prevPageLastElemOffset=j.prevPageLastElemOffset||0,this.ignoreClearRect=typeof j.ignoreClearRect!="boolean"||j.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new v(this),t=this.internal.f2,r=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,l=this.internal.Point,o=this.internal.Rectangle,u=this.internal.Matrix,d=new f}]);var v=function(j){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var z=j;Object.defineProperty(this,"pdf",{get:function(){return z}});var Z=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return Z},set:function(Pe){Z=!!Pe}});var re=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return re},set:function(Pe){re=!!Pe}});var W=0;Object.defineProperty(this,"posX",{get:function(){return W},set:function(Pe){isNaN(Pe)||(W=Pe)}});var Q=0;Object.defineProperty(this,"posY",{get:function(){return Q},set:function(Pe){isNaN(Pe)||(Q=Pe)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(Pe){var de;typeof Pe=="number"?de=[Pe,Pe,Pe,Pe]:((de=new Array(4))[0]=Pe[0],de[1]=Pe.length>=2?Pe[1]:de[0],de[2]=Pe.length>=3?Pe[2]:de[0],de[3]=Pe.length>=4?Pe[3]:de[1]),d.margin=de}});var se=!1;Object.defineProperty(this,"autoPaging",{get:function(){return se},set:function(Pe){se=Pe}});var ue=0;Object.defineProperty(this,"lastBreak",{get:function(){return ue},set:function(Pe){ue=Pe}});var le=[];Object.defineProperty(this,"pageBreaks",{get:function(){return le},set:function(Pe){le=Pe}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(Pe){Pe instanceof f&&(d=Pe)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(Pe){d.path=Pe}});var ye=[];Object.defineProperty(this,"ctxStack",{get:function(){return ye},set:function(Pe){ye=Pe}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(Pe){var de;de=g(Pe),this.ctx.fillStyle=de.style,this.ctx.isFillTransparent=de.a===0,this.ctx.fillOpacity=de.a,this.pdf.setFillColor(de.r,de.g,de.b,{a:de.a}),this.pdf.setTextColor(de.r,de.g,de.b,{a:de.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(Pe){var de=g(Pe);this.ctx.strokeStyle=de.style,this.ctx.isStrokeTransparent=de.a===0,this.ctx.strokeOpacity=de.a,de.a===0?this.pdf.setDrawColor(255,255,255):(de.a,this.pdf.setDrawColor(de.r,de.g,de.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(Pe){["butt","round","square"].indexOf(Pe)!==-1&&(this.ctx.lineCap=Pe,this.pdf.setLineCap(Pe))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(Pe){isNaN(Pe)||(this.ctx.lineWidth=Pe,this.pdf.setLineWidth(Pe))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(Pe){["bevel","round","miter"].indexOf(Pe)!==-1&&(this.ctx.lineJoin=Pe,this.pdf.setLineJoin(Pe))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(Pe){isNaN(Pe)||(this.ctx.miterLimit=Pe,this.pdf.setMiterLimit(Pe))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(Pe){this.ctx.textBaseline=Pe}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(Pe){["right","end","center","left","start"].indexOf(Pe)!==-1&&(this.ctx.textAlign=Pe)}});var Re=null,Me=null;Object.defineProperty(this,"fontFaces",{get:function(){return Me},set:function(Pe){Re=null,Me=Pe}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(Pe){var de;if(this.ctx.font=Pe,(de=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(Pe))!==null){var Te=de[1];de[2];var Ae=de[3],be=de[4];de[5];var _e=de[6],xe=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(be)[2];be=Math.floor(xe==="px"?parseFloat(be)*this.pdf.internal.scaleFactor:xe==="em"?parseFloat(be)*this.pdf.getFontSize():parseFloat(be)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(be);var Le=function(ht){var vt,wr,cr=[],Pt=ht.trim();if(Pt==="")return vv;if(Pt in Sw)return[Sw[Pt]];for(;Pt!=="";){switch(wr=null,vt=(Pt=Aw(Pt)).charAt(0)){case'"':case"'":wr=ER(Pt.substring(1),vt);break;default:wr=AR(Pt)}if(wr===null||(cr.push(wr[0]),(Pt=Aw(wr[1]))!==""&&Pt.charAt(0)!==","))return vv;Pt=Pt.replace(/^,/,"")}return cr}(_e);if(this.fontFaces){var pe=function(ht,vt){if(Re===null){var wr=function(cr){var Pt=[];return Object.keys(cr).forEach(function($t){cr[$t].forEach(function($e){var ze=null;switch($e){case"bold":ze={family:$t,weight:"bold"};break;case"italic":ze={family:$t,style:"italic"};break;case"bolditalic":ze={family:$t,weight:"bold",style:"italic"};break;case"":case"normal":ze={family:$t}}ze!==null&&(ze.ref={name:$t,style:$e},Pt.push(ze))})}),Pt}(ht.getFontList());Re=function(cr){for(var Pt={},$t=0;$t<cr.length;++$t){var $e=gv(cr[$t]),ze=$e.family,kt=$e.stretch,St=$e.style,er=$e.weight;Pt[ze]=Pt[ze]||{},Pt[ze][kt]=Pt[ze][kt]||{},Pt[ze][kt][St]=Pt[ze][kt][St]||{},Pt[ze][kt][St][er]=$e}return Pt}(wr.concat(vt))}return Re}(this.pdf,this.fontFaces),Ce=Le.map(function(ht){return{family:ht,stretch:"normal",weight:Ae,style:Te}}),je=function(ht,vt,wr){for(var cr=(wr=wr||{}).defaultFontFamily||"times",Pt=Object.assign({},SR,wr.genericFontFamilies||{}),$t=null,$e=null,ze=0;ze<vt.length;++ze)if(Pt[($t=gv(vt[ze])).family]&&($t.family=Pt[$t.family]),ht.hasOwnProperty($t.family)){$e=ht[$t.family];break}if(!($e=$e||ht[cr]))throw new Error("Could not find a font-family for the rule '"+Ew($t)+"' and default family '"+cr+"'.");if($e=function(kt,St){if(St[kt])return St[kt];var er=Jv[kt],jt=er<=Jv.normal?-1:1,vr=xw(St,P7,er,jt);if(!vr)throw new Error("Could not find a matching font-stretch value for "+kt);return vr}($t.stretch,$e),$e=function(kt,St){if(St[kt])return St[kt];for(var er=A7[kt],jt=0;jt<er.length;++jt)if(St[er[jt]])return St[er[jt]];throw new Error("Could not find a matching font-style for "+kt)}($t.style,$e),!($e=function(kt,St){if(St[kt])return St[kt];if(kt===400&&St[500])return St[500];if(kt===500&&St[400])return St[400];var er=xR[kt],jt=xw(St,k7,er,kt<400?-1:1);if(!jt)throw new Error("Could not find a matching font-weight for value "+kt);return jt}($t.weight,$e)))throw new Error("Failed to resolve a font for the rule '"+Ew($t)+"'.");return $e}(pe,Ce);this.pdf.setFont(je.ref.name,je.ref.style)}else{var He="";(Ae==="bold"||parseInt(Ae,10)>=700||Te==="bold")&&(He="bold"),Te==="italic"&&(He+="italic"),He.length===0&&(He="normal");for(var st="",pt={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},ct=0;ct<Le.length;ct++){if(this.pdf.internal.getFont(Le[ct],He,{noFallback:!0,disableWarning:!0})!==void 0){st=Le[ct];break}if(He==="bolditalic"&&this.pdf.internal.getFont(Le[ct],"bold",{noFallback:!0,disableWarning:!0})!==void 0)st=Le[ct],He="bold";else if(this.pdf.internal.getFont(Le[ct],"normal",{noFallback:!0,disableWarning:!0})!==void 0){st=Le[ct],He="normal";break}}if(st===""){for(var bt=0;bt<Le.length;bt++)if(pt[Le[bt]]){st=pt[Le[bt]];break}}st=st===""?"Times":st,this.pdf.setFont(st,He)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(Pe){this.ctx.globalCompositeOperation=Pe}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(Pe){this.ctx.globalAlpha=Pe}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(Pe){this.ctx.lineDashOffset=Pe,D.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(Pe){this.ctx.lineDash=Pe,D.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(Pe){this.ctx.ignoreClearRect=!!Pe}})};v.prototype.setLineDash=function(j){this.lineDash=j},v.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},v.prototype.fill=function(){_.call(this,"fill",!1)},v.prototype.stroke=function(){_.call(this,"stroke",!1)},v.prototype.beginPath=function(){this.path=[{type:"begin"}]},v.prototype.moveTo=function(j,z){if(isNaN(j)||isNaN(z))throw zn.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var Z=this.ctx.transform.applyToPoint(new l(j,z));this.path.push({type:"mt",x:Z.x,y:Z.y}),this.ctx.lastPoint=new l(j,z)},v.prototype.closePath=function(){var j=new l(0,0),z=0;for(z=this.path.length-1;z!==-1;z--)if(this.path[z].type==="begin"&&Sn(this.path[z+1])==="object"&&typeof this.path[z+1].x=="number"){j=new l(this.path[z+1].x,this.path[z+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new l(j.x,j.y)},v.prototype.lineTo=function(j,z){if(isNaN(j)||isNaN(z))throw zn.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var Z=this.ctx.transform.applyToPoint(new l(j,z));this.path.push({type:"lt",x:Z.x,y:Z.y}),this.ctx.lastPoint=new l(Z.x,Z.y)},v.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),_.call(this,null,!0)},v.prototype.quadraticCurveTo=function(j,z,Z,re){if(isNaN(Z)||isNaN(re)||isNaN(j)||isNaN(z))throw zn.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var W=this.ctx.transform.applyToPoint(new l(Z,re)),Q=this.ctx.transform.applyToPoint(new l(j,z));this.path.push({type:"qct",x1:Q.x,y1:Q.y,x:W.x,y:W.y}),this.ctx.lastPoint=new l(W.x,W.y)},v.prototype.bezierCurveTo=function(j,z,Z,re,W,Q){if(isNaN(W)||isNaN(Q)||isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re))throw zn.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var se=this.ctx.transform.applyToPoint(new l(W,Q)),ue=this.ctx.transform.applyToPoint(new l(j,z)),le=this.ctx.transform.applyToPoint(new l(Z,re));this.path.push({type:"bct",x1:ue.x,y1:ue.y,x2:le.x,y2:le.y,x:se.x,y:se.y}),this.ctx.lastPoint=new l(se.x,se.y)},v.prototype.arc=function(j,z,Z,re,W,Q){if(isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re)||isNaN(W))throw zn.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(Q=!!Q,!this.ctx.transform.isIdentity){var se=this.ctx.transform.applyToPoint(new l(j,z));j=se.x,z=se.y;var ue=this.ctx.transform.applyToPoint(new l(0,Z)),le=this.ctx.transform.applyToPoint(new l(0,0));Z=Math.sqrt(Math.pow(ue.x-le.x,2)+Math.pow(ue.y-le.y,2))}Math.abs(W-re)>=2*Math.PI&&(re=0,W=2*Math.PI),this.path.push({type:"arc",x:j,y:z,radius:Z,startAngle:re,endAngle:W,counterclockwise:Q})},v.prototype.arcTo=function(j,z,Z,re,W){throw new Error("arcTo not implemented.")},v.prototype.rect=function(j,z,Z,re){if(isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re))throw zn.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(j,z),this.lineTo(j+Z,z),this.lineTo(j+Z,z+re),this.lineTo(j,z+re),this.lineTo(j,z),this.lineTo(j+Z,z),this.lineTo(j,z)},v.prototype.fillRect=function(j,z,Z,re){if(isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re))throw zn.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!c.call(this)){var W={};this.lineCap!=="butt"&&(W.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(W.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(j,z,Z,re),this.fill(),W.hasOwnProperty("lineCap")&&(this.lineCap=W.lineCap),W.hasOwnProperty("lineJoin")&&(this.lineJoin=W.lineJoin)}},v.prototype.strokeRect=function(j,z,Z,re){if(isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re))throw zn.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");y.call(this)||(this.beginPath(),this.rect(j,z,Z,re),this.stroke())},v.prototype.clearRect=function(j,z,Z,re){if(isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re))throw zn.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(j,z,Z,re))},v.prototype.save=function(j){j=typeof j!="boolean"||j;for(var z=this.pdf.internal.getCurrentPageInfo().pageNumber,Z=0;Z<this.pdf.internal.getNumberOfPages();Z++)this.pdf.setPage(Z+1),this.pdf.internal.out("q");if(this.pdf.setPage(z),j){this.ctx.fontSize=this.pdf.internal.getFontSize();var re=new f(this.ctx);this.ctxStack.push(this.ctx),this.ctx=re}},v.prototype.restore=function(j){j=typeof j!="boolean"||j;for(var z=this.pdf.internal.getCurrentPageInfo().pageNumber,Z=0;Z<this.pdf.internal.getNumberOfPages();Z++)this.pdf.setPage(Z+1),this.pdf.internal.out("Q");this.pdf.setPage(z),j&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},v.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var g=function(j){var z,Z,re,W;if(j.isCanvasGradient===!0&&(j=j.getColor()),!j)return{r:0,g:0,b:0,a:0,style:j};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(j))z=0,Z=0,re=0,W=0;else{var Q=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(j);if(Q!==null)z=parseInt(Q[1]),Z=parseInt(Q[2]),re=parseInt(Q[3]),W=1;else if((Q=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(j))!==null)z=parseInt(Q[1]),Z=parseInt(Q[2]),re=parseInt(Q[3]),W=parseFloat(Q[4]);else{if(W=1,typeof j=="string"&&j.charAt(0)!=="#"){var se=new y7(j);j=se.ok?se.toHex():"#000000"}j.length===4?(z=j.substring(1,2),z+=z,Z=j.substring(2,3),Z+=Z,re=j.substring(3,4),re+=re):(z=j.substring(1,3),Z=j.substring(3,5),re=j.substring(5,7)),z=parseInt(z,16),Z=parseInt(Z,16),re=parseInt(re,16)}}return{r:z,g:Z,b:re,a:W,style:j}},c=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},y=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};v.prototype.fillText=function(j,z,Z,re){if(isNaN(z)||isNaN(Z)||typeof j!="string")throw zn.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(re=isNaN(re)?void 0:re,!c.call(this)){var W=V(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;C.call(this,{text:j,x:z,y:Z,scale:Q,angle:W,align:this.textAlign,maxWidth:re})}},v.prototype.strokeText=function(j,z,Z,re){if(isNaN(z)||isNaN(Z)||typeof j!="string")throw zn.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!y.call(this)){re=isNaN(re)?void 0:re;var W=V(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;C.call(this,{text:j,x:z,y:Z,scale:Q,renderingMode:"stroke",angle:W,align:this.textAlign,maxWidth:re})}},v.prototype.measureText=function(j){if(typeof j!="string")throw zn.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var z=this.pdf,Z=this.pdf.internal.scaleFactor,re=z.internal.getFontSize(),W=z.getStringUnitWidth(j)*re/z.internal.scaleFactor;return new function(Q){var se=(Q=Q||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return se}}),this}({width:W*=Math.round(96*Z/72*1e4)/1e4})},v.prototype.scale=function(j,z){if(isNaN(j)||isNaN(z))throw zn.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var Z=new u(j,0,0,z,0,0);this.ctx.transform=this.ctx.transform.multiply(Z)},v.prototype.rotate=function(j){if(isNaN(j))throw zn.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var z=new u(Math.cos(j),Math.sin(j),-Math.sin(j),Math.cos(j),0,0);this.ctx.transform=this.ctx.transform.multiply(z)},v.prototype.translate=function(j,z){if(isNaN(j)||isNaN(z))throw zn.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var Z=new u(1,0,0,1,j,z);this.ctx.transform=this.ctx.transform.multiply(Z)},v.prototype.transform=function(j,z,Z,re,W,Q){if(isNaN(j)||isNaN(z)||isNaN(Z)||isNaN(re)||isNaN(W)||isNaN(Q))throw zn.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var se=new u(j,z,Z,re,W,Q);this.ctx.transform=this.ctx.transform.multiply(se)},v.prototype.setTransform=function(j,z,Z,re,W,Q){j=isNaN(j)?1:j,z=isNaN(z)?0:z,Z=isNaN(Z)?0:Z,re=isNaN(re)?1:re,W=isNaN(W)?0:W,Q=isNaN(Q)?0:Q,this.ctx.transform=new u(j,z,Z,re,W,Q)};var x=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};v.prototype.drawImage=function(j,z,Z,re,W,Q,se,ue,le){var ye=this.pdf.getImageProperties(j),Re=1,Me=1,Pe=1,de=1;re!==void 0&&ue!==void 0&&(Pe=ue/re,de=le/W,Re=ye.width/re*ue/re,Me=ye.height/W*le/W),Q===void 0&&(Q=z,se=Z,z=0,Z=0),re!==void 0&&ue===void 0&&(ue=re,le=W),re===void 0&&ue===void 0&&(ue=ye.width,le=ye.height);for(var Te,Ae=this.ctx.transform.decompose(),be=V(Ae.rotate.shx),_e=new u,xe=(_e=(_e=(_e=_e.multiply(Ae.translate)).multiply(Ae.skew)).multiply(Ae.scale)).applyToRectangle(new o(Q-z*Pe,se-Z*de,re*Re,W*Me)),Le=E.call(this,xe),pe=[],Ce=0;Ce<Le.length;Ce+=1)pe.indexOf(Le[Ce])===-1&&pe.push(Le[Ce]);if(w(pe),this.autoPaging)for(var je=pe[0],He=pe[pe.length-1],st=je;st<He+1;st++){this.pdf.setPage(st);var pt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ct=st===1?this.posY+this.margin[0]:this.margin[0],bt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ht=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],vt=st===1?0:bt+(st-2)*ht;if(this.ctx.clip_path.length!==0){var wr=this.path;Te=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(Te,this.posX+this.margin[3],-vt+ct+this.ctx.prevPageLastElemOffset),A.call(this,"fill",!0),this.path=wr}var cr=JSON.parse(JSON.stringify(xe));cr=b([cr],this.posX+this.margin[3],-vt+ct+this.ctx.prevPageLastElemOffset)[0];var Pt=(st>je||st<He)&&x.call(this);Pt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],pt,ht,null).clip().discardPath()),this.pdf.addImage(j,"JPEG",cr.x,cr.y,cr.w,cr.h,null,null,be),Pt&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(j,"JPEG",xe.x,xe.y,xe.w,xe.h,null,null,be)};var E=function(j,z,Z){var re=[];z=z||this.pdf.internal.pageSize.width,Z=Z||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var W=this.posY+this.ctx.prevPageLastElemOffset;switch(j.type){default:case"mt":case"lt":re.push(Math.floor((j.y+W)/Z)+1);break;case"arc":re.push(Math.floor((j.y+W-j.radius)/Z)+1),re.push(Math.floor((j.y+W+j.radius)/Z)+1);break;case"qct":var Q=Y(this.ctx.lastPoint.x,this.ctx.lastPoint.y,j.x1,j.y1,j.x,j.y);re.push(Math.floor((Q.y+W)/Z)+1),re.push(Math.floor((Q.y+Q.h+W)/Z)+1);break;case"bct":var se=U(this.ctx.lastPoint.x,this.ctx.lastPoint.y,j.x1,j.y1,j.x2,j.y2,j.x,j.y);re.push(Math.floor((se.y+W)/Z)+1),re.push(Math.floor((se.y+se.h+W)/Z)+1);break;case"rect":re.push(Math.floor((j.y+W)/Z)+1),re.push(Math.floor((j.y+j.h+W)/Z)+1)}for(var ue=0;ue<re.length;ue+=1)for(;this.pdf.internal.getNumberOfPages()<re[ue];)S.call(this);return re},S=function(){var j=this.fillStyle,z=this.strokeStyle,Z=this.font,re=this.lineCap,W=this.lineWidth,Q=this.lineJoin;this.pdf.addPage(),this.fillStyle=j,this.strokeStyle=z,this.font=Z,this.lineCap=re,this.lineWidth=W,this.lineJoin=Q},b=function(j,z,Z){for(var re=0;re<j.length;re++)switch(j[re].type){case"bct":j[re].x2+=z,j[re].y2+=Z;case"qct":j[re].x1+=z,j[re].y1+=Z;default:j[re].x+=z,j[re].y+=Z}return j},w=function(j){return j.sort(function(z,Z){return z-Z})},_=function(j,z){for(var Z,re,W=this.fillStyle,Q=this.strokeStyle,se=this.lineCap,ue=this.lineWidth,le=Math.abs(ue*this.ctx.transform.scaleX),ye=this.lineJoin,Re=JSON.parse(JSON.stringify(this.path)),Me=JSON.parse(JSON.stringify(this.path)),Pe=[],de=0;de<Me.length;de++)if(Me[de].x!==void 0)for(var Te=E.call(this,Me[de]),Ae=0;Ae<Te.length;Ae+=1)Pe.indexOf(Te[Ae])===-1&&Pe.push(Te[Ae]);for(var be=0;be<Pe.length;be++)for(;this.pdf.internal.getNumberOfPages()<Pe[be];)S.call(this);if(w(Pe),this.autoPaging)for(var _e=Pe[0],xe=Pe[Pe.length-1],Le=_e;Le<xe+1;Le++){this.pdf.setPage(Le),this.fillStyle=W,this.strokeStyle=Q,this.lineCap=se,this.lineWidth=le,this.lineJoin=ye;var pe=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Ce=Le===1?this.posY+this.margin[0]:this.margin[0],je=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],He=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],st=Le===1?0:je+(Le-2)*He;if(this.ctx.clip_path.length!==0){var pt=this.path;Z=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(Z,this.posX+this.margin[3],-st+Ce+this.ctx.prevPageLastElemOffset),A.call(this,j,!0),this.path=pt}if(re=JSON.parse(JSON.stringify(Re)),this.path=b(re,this.posX+this.margin[3],-st+Ce+this.ctx.prevPageLastElemOffset),z===!1||Le===0){var ct=(Le>_e||Le<xe)&&x.call(this);ct&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],pe,He,null).clip().discardPath()),A.call(this,j,z),ct&&this.pdf.restoreGraphicsState()}this.lineWidth=ue}else this.lineWidth=le,A.call(this,j,z),this.lineWidth=ue;this.path=Re},A=function(j,z){if((j!=="stroke"||z||!y.call(this))&&(j==="stroke"||z||!c.call(this))){for(var Z,re,W=[],Q=this.path,se=0;se<Q.length;se++){var ue=Q[se];switch(ue.type){case"begin":W.push({begin:!0});break;case"close":W.push({close:!0});break;case"mt":W.push({start:ue,deltas:[],abs:[]});break;case"lt":var le=W.length;if(Q[se-1]&&!isNaN(Q[se-1].x)&&(Z=[ue.x-Q[se-1].x,ue.y-Q[se-1].y],le>0)){for(;le>=0;le--)if(W[le-1].close!==!0&&W[le-1].begin!==!0){W[le-1].deltas.push(Z),W[le-1].abs.push(ue);break}}break;case"bct":Z=[ue.x1-Q[se-1].x,ue.y1-Q[se-1].y,ue.x2-Q[se-1].x,ue.y2-Q[se-1].y,ue.x-Q[se-1].x,ue.y-Q[se-1].y],W[W.length-1].deltas.push(Z);break;case"qct":var ye=Q[se-1].x+2/3*(ue.x1-Q[se-1].x),Re=Q[se-1].y+2/3*(ue.y1-Q[se-1].y),Me=ue.x+2/3*(ue.x1-ue.x),Pe=ue.y+2/3*(ue.y1-ue.y),de=ue.x,Te=ue.y;Z=[ye-Q[se-1].x,Re-Q[se-1].y,Me-Q[se-1].x,Pe-Q[se-1].y,de-Q[se-1].x,Te-Q[se-1].y],W[W.length-1].deltas.push(Z);break;case"arc":W.push({deltas:[],abs:[],arc:!0}),Array.isArray(W[W.length-1].abs)&&W[W.length-1].abs.push(ue)}}re=z?null:j==="stroke"?"stroke":"fill";for(var Ae=!1,be=0;be<W.length;be++)if(W[be].arc)for(var _e=W[be].abs,xe=0;xe<_e.length;xe++){var Le=_e[xe];Le.type==="arc"?L.call(this,Le.x,Le.y,Le.radius,Le.startAngle,Le.endAngle,Le.counterclockwise,void 0,z,!Ae):q.call(this,Le.x,Le.y),Ae=!0}else if(W[be].close===!0)this.pdf.internal.out("h"),Ae=!1;else if(W[be].begin!==!0){var pe=W[be].start.x,Ce=W[be].start.y;G.call(this,W[be].deltas,pe,Ce),Ae=!0}re&&R.call(this,re),z&&T.call(this)}},M=function(j){var z=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,Z=z*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return j-Z;case"top":return j+z-Z;case"hanging":return j+z-2*Z;case"middle":return j+z/2-Z;default:return j}},O=function(j){return j+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};v.prototype.createLinearGradient=function(){var j=function(){};return j.colorStops=[],j.addColorStop=function(z,Z){this.colorStops.push([z,Z])},j.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},j.isCanvasGradient=!0,j},v.prototype.createPattern=function(){return this.createLinearGradient()},v.prototype.createRadialGradient=function(){return this.createLinearGradient()};var L=function(j,z,Z,re,W,Q,se,ue,le){for(var ye=ae.call(this,Z,re,W,Q),Re=0;Re<ye.length;Re++){var Me=ye[Re];Re===0&&(le?k.call(this,Me.x1+j,Me.y1+z):q.call(this,Me.x1+j,Me.y1+z)),J.call(this,j,z,Me.x2,Me.y2,Me.x3,Me.y3,Me.x4,Me.y4)}ue?T.call(this):R.call(this,se)},R=function(j){switch(j){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},T=function(){this.pdf.clip(),this.pdf.discardPath()},k=function(j,z){this.pdf.internal.out(r(j)+" "+n(z)+" m")},C=function(j){var z;switch(j.align){case"right":case"end":z="right";break;case"center":z="center";break;default:z="left"}var Z=this.pdf.getTextDimensions(j.text),re=M.call(this,j.y),W=O.call(this,re)-Z.h,Q=this.ctx.transform.applyToPoint(new l(j.x,re)),se=this.ctx.transform.decompose(),ue=new u;ue=(ue=(ue=ue.multiply(se.translate)).multiply(se.skew)).multiply(se.scale);for(var le,ye,Re,Me=this.ctx.transform.applyToRectangle(new o(j.x,re,Z.w,Z.h)),Pe=ue.applyToRectangle(new o(j.x,W,Z.w,Z.h)),de=E.call(this,Pe),Te=[],Ae=0;Ae<de.length;Ae+=1)Te.indexOf(de[Ae])===-1&&Te.push(de[Ae]);if(w(Te),this.autoPaging)for(var be=Te[0],_e=Te[Te.length-1],xe=be;xe<_e+1;xe++){this.pdf.setPage(xe);var Le=xe===1?this.posY+this.margin[0]:this.margin[0],pe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ce=this.pdf.internal.pageSize.height-this.margin[2],je=Ce-this.margin[0],He=this.pdf.internal.pageSize.width-this.margin[1],st=He-this.margin[3],pt=xe===1?0:pe+(xe-2)*je;if(this.ctx.clip_path.length!==0){var ct=this.path;le=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(le,this.posX+this.margin[3],-1*pt+Le),A.call(this,"fill",!0),this.path=ct}var bt=b([JSON.parse(JSON.stringify(Pe))],this.posX+this.margin[3],-pt+Le+this.ctx.prevPageLastElemOffset)[0];j.scale>=.01&&(ye=this.pdf.internal.getFontSize(),this.pdf.setFontSize(ye*j.scale),Re=this.lineWidth,this.lineWidth=Re*j.scale);var ht=this.autoPaging!=="text";if(ht||bt.y+bt.h<=Ce){if(ht||bt.y>=Le&&bt.x<=He){var vt=ht?j.text:this.pdf.splitTextToSize(j.text,j.maxWidth||He-bt.x)[0],wr=b([JSON.parse(JSON.stringify(Me))],this.posX+this.margin[3],-pt+Le+this.ctx.prevPageLastElemOffset)[0],cr=ht&&(xe>be||xe<_e)&&x.call(this);cr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],st,je,null).clip().discardPath()),this.pdf.text(vt,wr.x,wr.y,{angle:j.angle,align:z,renderingMode:j.renderingMode}),cr&&this.pdf.restoreGraphicsState()}}else bt.y<Ce&&(this.ctx.prevPageLastElemOffset+=Ce-bt.y);j.scale>=.01&&(this.pdf.setFontSize(ye),this.lineWidth=Re)}else j.scale>=.01&&(ye=this.pdf.internal.getFontSize(),this.pdf.setFontSize(ye*j.scale),Re=this.lineWidth,this.lineWidth=Re*j.scale),this.pdf.text(j.text,Q.x+this.posX,Q.y+this.posY,{angle:j.angle,align:z,renderingMode:j.renderingMode,maxWidth:j.maxWidth}),j.scale>=.01&&(this.pdf.setFontSize(ye),this.lineWidth=Re)},q=function(j,z,Z,re){Z=Z||0,re=re||0,this.pdf.internal.out(r(j+Z)+" "+n(z+re)+" l")},G=function(j,z,Z){return this.pdf.lines(j,z,Z,null,null)},J=function(j,z,Z,re,W,Q,se,ue){this.pdf.internal.out([t(i(Z+j)),t(a(re+z)),t(i(W+j)),t(a(Q+z)),t(i(se+j)),t(a(ue+z)),"c"].join(" "))},ae=function(j,z,Z,re){for(var W=2*Math.PI,Q=Math.PI/2;z>Z;)z-=W;var se=Math.abs(Z-z);se<W&&re&&(se=W-se);for(var ue=[],le=re?-1:1,ye=z;se>1e-5;){var Re=ye+le*Math.min(se,Q);ue.push(H.call(this,j,ye,Re)),se-=Math.abs(Re-ye),ye=Re}return ue},H=function(j,z,Z){var re=(Z-z)/2,W=j*Math.cos(re),Q=j*Math.sin(re),se=W,ue=-Q,le=se*se+ue*ue,ye=le+se*W+ue*Q,Re=4/3*(Math.sqrt(2*le*ye)-ye)/(se*Q-ue*W),Me=se-Re*ue,Pe=ue+Re*se,de=Me,Te=-Pe,Ae=re+z,be=Math.cos(Ae),_e=Math.sin(Ae);return{x1:j*Math.cos(z),y1:j*Math.sin(z),x2:Me*be-Pe*_e,y2:Me*_e+Pe*be,x3:de*be-Te*_e,y3:de*_e+Te*be,x4:j*Math.cos(Z),y4:j*Math.sin(Z)}},V=function(j){return 180*j/Math.PI},Y=function(j,z,Z,re,W,Q){var se=j+.5*(Z-j),ue=z+.5*(re-z),le=W+.5*(Z-W),ye=Q+.5*(re-Q),Re=Math.min(j,W,se,le),Me=Math.max(j,W,se,le),Pe=Math.min(z,Q,ue,ye),de=Math.max(z,Q,ue,ye);return new o(Re,Pe,Me-Re,de-Pe)},U=function(j,z,Z,re,W,Q,se,ue){var le,ye,Re,Me,Pe,de,Te,Ae,be,_e,xe,Le,pe,Ce,je=Z-j,He=re-z,st=W-Z,pt=Q-re,ct=se-W,bt=ue-Q;for(ye=0;ye<41;ye++)be=(Te=(Re=j+(le=ye/40)*je)+le*((Pe=Z+le*st)-Re))+le*(Pe+le*(W+le*ct-Pe)-Te),_e=(Ae=(Me=z+le*He)+le*((de=re+le*pt)-Me))+le*(de+le*(Q+le*bt-de)-Ae),ye==0?(xe=be,Le=_e,pe=be,Ce=_e):(xe=Math.min(xe,be),Le=Math.min(Le,_e),pe=Math.max(pe,be),Ce=Math.max(Ce,_e));return new o(Math.round(xe),Math.round(Le),Math.round(pe-xe),Math.round(Ce-Le))},D=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var j,z,Z=(j=this.ctx.lineDash,z=this.ctx.lineDashOffset,JSON.stringify({lineDash:j,lineDashOffset:z}));this.prevLineDash!==Z&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=Z)}}})(Kt.API),function(e){var t=function(l){var o,u,d,f,v,g,c,y,x,E;for(u=[],d=0,f=(l+=o="\0\0\0\0".slice(l.length%4||4)).length;f>d;d+=4)(v=(l.charCodeAt(d)<<24)+(l.charCodeAt(d+1)<<16)+(l.charCodeAt(d+2)<<8)+l.charCodeAt(d+3))!==0?(g=(v=((v=((v=((v=(v-(E=v%85))/85)-(x=v%85))/85)-(y=v%85))/85)-(c=v%85))/85)%85,u.push(g+33,c+33,y+33,x+33,E+33)):u.push(122);return function(S,b){for(var w=b;w>0;w--)S.pop()}(u,o.length),String.fromCharCode.apply(String,u)+"~>"},r=function(l){var o,u,d,f,v,g=String,c="length",y=255,x="charCodeAt",E="slice",S="replace";for(l[E](-2),l=l[E](0,-2)[S](/\s/g,"")[S]("z","!!!!!"),d=[],f=0,v=(l+=o="uuuuu"[E](l[c]%5||5))[c];v>f;f+=5)u=52200625*(l[x](f)-33)+614125*(l[x](f+1)-33)+7225*(l[x](f+2)-33)+85*(l[x](f+3)-33)+(l[x](f+4)-33),d.push(y&u>>24,y&u>>16,y&u>>8,y&u);return function(b,w){for(var _=w;_>0;_--)b.pop()}(d,o[c]),g.fromCharCode.apply(g,d)},n=function(l){return l.split("").map(function(o){return("0"+o.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(l){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((l=l.replace(/\s/g,"")).indexOf(">")!==-1&&(l=l.substr(0,l.indexOf(">"))),l.length%2&&(l+="0"),o.test(l)===!1)return"";for(var u="",d=0;d<l.length;d+=2)u+=String.fromCharCode("0x"+(l[d]+l[d+1]));return u},a=function(l){for(var o=new Uint8Array(l.length),u=l.length;u--;)o[u]=l.charCodeAt(u);return(o=$v(o)).reduce(function(d,f){return d+String.fromCharCode(f)},"")};e.processDataByFilters=function(l,o){var u=0,d=l||"",f=[];for(typeof(o=o||[])=="string"&&(o=[o]),u=0;u<o.length;u+=1)switch(o[u]){case"ASCII85Decode":case"/ASCII85Decode":d=r(d),f.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":d=t(d),f.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":d=i(d),f.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":d=n(d),f.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":d=a(d),f.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[u]+'" is not implemented')}return{data:d,reverseChain:f.reverse().join(" ")}}}(Kt.API),function(e){e.loadFile=function(t,r,n){return function(i,a,l){a=a!==!1,l=typeof l=="function"?l:function(){};var o=void 0;try{o=function(u,d,f){var v=new XMLHttpRequest,g=0,c=function(y){var x=y.length,E=[],S=String.fromCharCode;for(g=0;g<x;g+=1)E.push(S(255&y.charCodeAt(g)));return E.join("")};if(v.open("GET",u,!d),v.overrideMimeType("text/plain; charset=x-user-defined"),d===!1&&(v.onload=function(){v.status===200?f(c(this.responseText)):f(void 0)}),v.send(null),d&&v.status===200)return c(v.responseText)}(i,a,l)}catch{}return o}(t,r,n)},e.loadImageFile=e.loadFile}(Kt.API),function(e){function t(){return(dr.html2canvas?Promise.resolve(dr.html2canvas):Z2(()=>import("./html2canvas.esm-BfxBtG_O.js"),[],import.meta.url)).catch(function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))}).then(function(o){return o.default?o.default:o})}function r(){return(dr.DOMPurify?Promise.resolve(dr.DOMPurify):Z2(()=>import("./purify.es-CQJ0hv7W.js"),[],import.meta.url)).catch(function(o){return Promise.reject(new Error("Could not load dompurify: "+o))}).then(function(o){return o.default?o.default:o})}var n=function(o){var u=Sn(o);return u==="undefined"?"undefined":u==="string"||o instanceof String?"string":u==="number"||o instanceof Number?"number":u==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":u==="object"?"object":"unknown"},i=function(o,u){var d=document.createElement(o);for(var f in u.className&&(d.className=u.className),u.innerHTML&&u.dompurify&&(d.innerHTML=u.dompurify.sanitize(u.innerHTML)),u.style)d.style[f]=u.style[f];return d},a=function o(u,d){for(var f=u.nodeType===3?document.createTextNode(u.nodeValue):u.cloneNode(!1),v=u.firstChild;v;v=v.nextSibling)d!==!0&&v.nodeType===1&&v.nodeName==="SCRIPT"||f.appendChild(o(v,d));return u.nodeType===1&&(u.nodeName==="CANVAS"?(f.width=u.width,f.height=u.height,f.getContext("2d").drawImage(u,0,0)):u.nodeName!=="TEXTAREA"&&u.nodeName!=="SELECT"||(f.value=u.value),f.addEventListener("load",function(){f.scrollTop=u.scrollTop,f.scrollLeft=u.scrollLeft},!0)),f},l=function o(u){var d=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),f=o.convert(Promise.resolve(),d);return(f=f.setProgress(1,o,1,[o])).set(u)};(l.prototype=Object.create(Promise.prototype)).constructor=l,l.convert=function(o,u){return o.__proto__=u||l.prototype,o},l.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},l.prototype.from=function(o,u){return this.then(function(){switch(u=u||function(d){switch(n(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(o),u){case"string":return this.then(r).then(function(d){return this.set({src:i("div",{innerHTML:o,dompurify:d})})});case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}})},l.prototype.to=function(o){switch(o){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},l.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var o={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},u=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);u.tagName==="BODY"&&(o.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:o}),this.prop.container.appendChild(u),this.prop.container.firstChild.appendChild(i("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},l.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(t).then(function(u){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,u(this.prop.container,d)}).then(function(u){(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},l.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(t).then(function(u){var d=this.opt.jsPDF,f=this.opt.fontFaces,v=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,g=Object.assign({async:!0,allowTaint:!0,scale:v,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete g.onrendered,d.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,d.context2d.posX=this.opt.x,d.context2d.posY=this.opt.y,d.context2d.margin=this.opt.margin,d.context2d.fontFaces=f,f)for(var c=0;c<f.length;++c){var y=f[c],x=y.src.find(function(E){return E.format==="truetype"});x&&d.addFont(x.url,y.ref.name,y.ref.style)}return g.windowHeight=g.windowHeight||0,g.windowHeight=g.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):g.windowHeight,d.context2d.save(!0),u(this.prop.container,g)}).then(function(u){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},l.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o})},l.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},l.prototype.output=function(o,u,d){return(d=d||"pdf").toLowerCase()==="img"||d.toLowerCase()==="image"?this.outputImg(o,u):this.outputPdf(o,u)},l.prototype.outputPdf=function(o,u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(o,u)})},l.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(o){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+o+'" is not supported.'}})},l.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},l.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},l.prototype.set=function(o){if(n(o)!=="object")return this;var u=Object.keys(o||{}).map(function(d){if(d in l.template.prop)return function(){this.prop[d]=o[d]};switch(d){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[d]=o[d]}}},this);return this.then(function(){return this.thenList(u)})},l.prototype.get=function(o,u){return this.then(function(){var d=o in l.template.prop?this.prop[o]:this.opt[o];return u?u(d):d})},l.prototype.setMargin=function(o){return this.then(function(){switch(n(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o}).then(this.setPageSize)},l.prototype.setPageSize=function(o){function u(d,f){return Math.floor(d*f/72*96)}return this.then(function(){(o=o||Kt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:u(o.inner.width,o.k),height:u(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o})},l.prototype.setProgress=function(o,u,d,f){return o!=null&&(this.progress.val=o),u!=null&&(this.progress.state=u),d!=null&&(this.progress.n=d),f!=null&&(this.progress.stack=f),this.progress.ratio=this.progress.val/this.progress.state,this},l.prototype.updateProgress=function(o,u,d,f){return this.setProgress(o?this.progress.val+o:null,u||null,d?this.progress.n+d:null,f?this.progress.stack.concat(f):null)},l.prototype.then=function(o,u){var d=this;return this.thenCore(o,u,function(f,v){return d.updateProgress(null,null,1,[f]),Promise.prototype.then.call(this,function(g){return d.updateProgress(null,f),g}).then(f,v).then(function(g){return d.updateProgress(1),g})})},l.prototype.thenCore=function(o,u,d){d=d||Promise.prototype.then;var f=this;o&&(o=o.bind(f)),u&&(u=u.bind(f));var v=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?f:l.convert(Object.assign({},f),Promise.prototype),g=d.call(v,o,u);return l.convert(g,f.__proto__)},l.prototype.thenExternal=function(o,u){return Promise.prototype.then.call(this,o,u)},l.prototype.thenList=function(o){var u=this;return o.forEach(function(d){u=u.thenCore(d)}),u},l.prototype.catch=function(o){o&&(o=o.bind(this));var u=Promise.prototype.catch.call(this,o);return l.convert(u,this)},l.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},l.prototype.error=function(o){return this.then(function(){throw new Error(o)})},l.prototype.using=l.prototype.set,l.prototype.saveAs=l.prototype.save,l.prototype.export=l.prototype.output,l.prototype.run=l.prototype.then,Kt.getPageSize=function(o,u,d){if(Sn(o)==="object"){var f=o;o=f.orientation,u=f.unit||u,d=f.format||d}u=u||"mm",d=d||"a4",o=(""+(o||"P")).toLowerCase();var v,g=(""+d).toLowerCase(),c={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(u){case"pt":v=1;break;case"mm":v=72/25.4;break;case"cm":v=72/2.54;break;case"in":v=72;break;case"px":v=.75;break;case"pc":case"em":v=12;break;case"ex":v=6;break;default:throw"Invalid unit: "+u}var y,x=0,E=0;if(c.hasOwnProperty(g))x=c[g][1]/v,E=c[g][0]/v;else try{x=d[1],E=d[0]}catch{throw new Error("Invalid format: "+d)}if(o==="p"||o==="portrait")o="p",E>x&&(y=E,E=x,x=y);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",x>E&&(y=E,E=x,x=y)}return{width:E,height:x,unit:u,k:v,orientation:o}},e.html=function(o,u){(u=u||{}).callback=u.callback||function(){},u.html2canvas=u.html2canvas||{},u.html2canvas.canvas=u.html2canvas.canvas||this.canvas,u.jsPDF=u.jsPDF||this,u.fontFaces=u.fontFaces?u.fontFaces.map(gv):null;var d=new l(u);return u.worker?d:d.from(o).doCallback()}}(Kt.API),Kt.API.addJS=function(e){return kw=e,this.internal.events.subscribe("postPutResources",function(){y1=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(y1+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Pw=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+kw+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){y1!==void 0&&Pw!==void 0&&this.internal.out("/Names <</JavaScript "+y1+" 0 R>>")}),this},function(e){var t;e.events.push(["postPutResources",function(){var r=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=r.outline.render().split(/\r\n/),a=0;a<i.length;a++){var l=i[a],o=n.exec(l);if(o!=null){var u=o[1];r.internal.newObjectDeferredBegin(u,!1)}r.internal.write(l)}if(this.outline.createNamedDestinations){var d=this.internal.pages.length,f=[];for(a=0;a<d;a++){var v=r.internal.newObject();f.push(v);var g=r.internal.getPageInfo(a+1);r.internal.write("<< /D["+g.objId+" 0 R /XYZ null null null]>> endobj")}var c=r.internal.newObject();for(r.internal.write("<< /Names [ "),a=0;a<f.length;a++)r.internal.write("(page_"+(a+1)+")"+f[a]+" 0 R");r.internal.write(" ] >>","endobj"),t=r.internal.newObject(),r.internal.write("<< /Dests "+c+" 0 R"),r.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){var r=this;r.outline.root.children.length>0&&(r.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&r.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var r=this;r.outline={createNamedDestinations:!1,root:{children:[]}},r.outline.add=function(n,i,a){var l={title:i,options:a,children:[]};return n==null&&(n=this.root),n.children.push(l),l},r.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=r,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},r.outline.genIds_r=function(n){n.id=r.internal.newObjectDeferred();for(var i=0;i<n.children.length;i++)this.genIds_r(n.children[i])},r.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},r.outline.renderItems=function(n){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<n.children.length;a++){var l=n.children[a];this.objStart(l),this.line("/Title "+this.makeString(l.title)),this.line("/Parent "+this.makeRef(n)),a>0&&this.line("/Prev "+this.makeRef(n.children[a-1])),a<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[a+1])),l.children.length>0&&(this.line("/First "+this.makeRef(l.children[0])),this.line("/Last "+this.makeRef(l.children[l.children.length-1])));var o=this.count=this.count_r({count:0},l);if(o>0&&this.line("/Count "+o),l.options&&l.options.pageNumber){var u=r.internal.getPageInfo(l.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var d=0;d<n.children.length;d++)this.renderItems(n.children[d])},r.outline.line=function(n){this.ctx.val+=n+`\r
|
|
523
523
|
`},r.outline.makeRef=function(n){return n.id+" 0 R"},r.outline.makeString=function(n){return"("+r.internal.pdfEscape(n)+")"},r.outline.objStart=function(n){this.ctx.val+=`\r
|
|
524
524
|
`+n.id+` 0 obj\r
|
|
525
525
|
<<\r
|
|
@@ -527,7 +527,7 @@ T* `):X.join(` Tj
|
|
|
527
527
|
endobj\r
|
|
528
528
|
`},r.outline.count_r=function(n,i){for(var a=0;a<i.children.length;a++)n.count++,this.count_r(n,i.children[a]);return n.count}}])}(Kt.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(r,n,i,a,l,o){var u,d=this.decode.DCT_DECODE,f=null;if(typeof r=="string"||this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r)){switch(r=l||r,r=this.__addimage__.isArrayBuffer(r)?new Uint8Array(r):r,u=function(v){for(var g,c=256*v.charCodeAt(4)+v.charCodeAt(5),y=v.length,x={width:0,height:0,numcomponents:1},E=4;E<y;E+=2){if(E+=c,t.indexOf(v.charCodeAt(E+1))!==-1){g=256*v.charCodeAt(E+5)+v.charCodeAt(E+6),x={width:256*v.charCodeAt(E+7)+v.charCodeAt(E+8),height:g,numcomponents:v.charCodeAt(E+9)};break}c=256*v.charCodeAt(E+2)+v.charCodeAt(E+3)}return x}(r=this.__addimage__.isArrayBufferView(r)?this.__addimage__.arrayBufferToBinaryString(r):r),u.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}f={data:r,width:u.width,height:u.height,colorSpace:o,bitsPerComponent:8,filter:d,index:n,alias:i}}return f}}(Kt.API),Kt.API.processPNG=function(e,t,r,n){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,a=lR(e,{checkCrc:!0}),l=a.width,o=a.height,u=a.channels,d=a.palette,f=a.depth;i=d&&u===1?function(O){for(var L=O.width,R=O.height,T=O.data,k=O.palette,C=O.depth,q=!1,G=[],J=[],ae=void 0,H=!1,V=0,Y=0;Y<k.length;Y++){var U=L4(k[Y],4),D=U[0],j=U[1],z=U[2],Z=U[3];G.push(D,j,z),Z!=null&&(Z===0?(V++,J.length<1&&J.push(Y)):Z<255&&(H=!0))}if(H||V>1){q=!0,J=void 0;var re=L*R;ae=new Uint8Array(re);for(var W=new DataView(T.buffer),Q=0;Q<re;Q++){var se=mv(W,Q,C),ue=L4(k[se],4)[3];ae[Q]=ue}}return{colorSpace:"Indexed",colorsPerPixel:1,colorBytes:T,alphaBytes:ae,needSMask:q,palette:G,mask:J}}(a):u===2||u===4?function(O){for(var L=O.data,R=O.width,T=O.height,k=O.channels,C=O.depth,q=k===2?"DeviceGray":"DeviceRGB",G=k-1,J=R*T,ae=G,H=J*ae,V=1*J,Y=Math.ceil(H*C/8),U=Math.ceil(V*C/8),D=new Uint8Array(Y),j=new Uint8Array(U),z=new DataView(L.buffer),Z=new DataView(D.buffer),re=new DataView(j.buffer),W=!1,Q=0;Q<J;Q++){for(var se=Q*k,ue=0;ue<ae;ue++)Fw(Z,mv(z,se+ue,C),Q*ae+ue,C);var le=mv(z,se+ae,C);le<(1<<C)-1&&(W=!0),Fw(re,le,1*Q,C)}return{colorSpace:q,colorsPerPixel:G,colorBytes:D,alphaBytes:j,needSMask:W}}(a):function(O){var L=O.data,R=O.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:R,colorsPerPixel:R==="DeviceGray"?1:3,colorBytes:L instanceof Uint8Array?L:new Uint8Array(L.buffer),needSMask:!1}}(a);var v,g,c,y=i,x=y.colorSpace,E=y.colorsPerPixel,S=y.colorBytes,b=y.alphaBytes,w=y.needSMask,_=y.palette,A=y.mask,M=null;return n!==Kt.API.image_compression.NONE&&typeof $v=="function"?(M=function(O){var L;switch(O){case Kt.API.image_compression.FAST:L=11;break;case Kt.API.image_compression.MEDIUM:L=13;break;case Kt.API.image_compression.SLOW:L=14;break;default:L=12}return L}(n),v=this.decode.FLATE_DECODE,g="/Predictor ".concat(M," "),e=Lw(S,l*E,E,n),w&&(c=Lw(b,l,1,n))):(v=void 0,g="",e=S,w&&(c=b)),g+="/Colors ".concat(E," /BitsPerComponent ").concat(f," /Columns ").concat(l),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(c&&this.__addimage__.isArrayBuffer(c)||this.__addimage__.isArrayBufferView(c))&&(c=this.__addimage__.arrayBufferToBinaryString(c)),{alias:r,data:e,index:t,filter:v,decodeParameters:g,transparency:A,palette:_,sMask:c,predictor:M,width:l,height:o,bitsPerComponent:f,colorSpace:x}}},function(e){e.processGIF89A=function(t,r,n,i){var a=new CR(t),l=a.width,o=a.height,u=[];a.decodeAndBlitFrameRGBA(0,u);var d={data:u,width:l,height:o},f=new yv(100).encode(d,100);return e.processJPEG.call(this,f,r,n,i)},e.processGIF87A=e.processGIF89A}(Kt.API),Ml.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:n,blue:r,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Ml.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[e]()}catch(r){zn.log("bit decode error:"+r)}},Ml.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),r=t%4;for(e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var a=this.datav.getUint8(this.pos++,!0),l=n*this.width*4+8*i*4,o=0;o<8&&8*i+o<this.width;o++){var u=this.palette[a>>7-o&1];this.data[l+4*o]=u.blue,this.data[l+4*o+1]=u.green,this.data[l+4*o+2]=u.red,this.data[l+4*o+3]=255}r!==0&&(this.pos+=4-r)}},Ml.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<e;i++){var a=this.datav.getUint8(this.pos++,!0),l=n*this.width*4+2*i*4,o=a>>4,u=15&a,d=this.palette[o];if(this.data[l]=d.blue,this.data[l+1]=d.green,this.data[l+2]=d.red,this.data[l+3]=255,2*i+1>=this.width)break;d=this.palette[u],this.data[l+4]=d.blue,this.data[l+4+1]=d.green,this.data[l+4+2]=d.red,this.data[l+4+3]=255}t!==0&&(this.pos+=4-t)}},Ml.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+4*n;if(i<this.palette.length){var l=this.palette[i];this.data[a]=l.red,this.data[a+1]=l.green,this.data[a+2]=l.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}e!==0&&(this.pos+=4-e)}},Ml.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(a&t)/t*255|0,o=(a>>5&t)/t*255|0,u=(a>>10&t)/t*255|0,d=a>>15?255:0,f=n*this.width*4+4*i;this.data[f]=u,this.data[f+1]=o,this.data[f+2]=l,this.data[f+3]=d}this.pos+=e}},Ml.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,a=0;a<this.width;a++){var l=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(l&t)/t*255|0,u=(l>>5&r)/r*255|0,d=(l>>11)/t*255|0,f=i*this.width*4+4*a;this.data[f]=d,this.data[f+1]=u,this.data[f+2]=o,this.data[f+3]=255}this.pos+=e}},Ml.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),l=t*this.width*4+4*r;this.data[l]=a,this.data[l+1]=i,this.data[l+2]=n,this.data[l+3]=255}this.pos+=this.width%4}},Ml.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),l=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*r;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=n,this.data[o+3]=l}},Ml.prototype.getData=function(){return this.data},function(e){e.processBMP=function(t,r,n,i){var a=new Ml(t,!1),l=a.width,o=a.height,u={data:a.getData(),width:l,height:o},d=new yv(100).encode(u,100);return e.processJPEG.call(this,d,r,n,i)}}(Kt.API),Dw.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(t,r,n,i){var a=new Dw(t),l=a.width,o=a.height,u={data:a.getData(),width:l,height:o},d=new yv(100).encode(u,100);return e.processJPEG.call(this,d,r,n,i)}}(Kt.API),Kt.API.processRGBA=function(e,t,r){for(var n=e.data,i=n.length,a=new Uint8Array(i/4*3),l=new Uint8Array(i/4),o=0,u=0,d=0;d<i;d+=4){var f=n[d],v=n[d+1],g=n[d+2],c=n[d+3];a[o++]=f,a[o++]=v,a[o++]=g,l[u++]=c}var y=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(l),data:y,index:t,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},Kt.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},vh=Kt.API,b1=vh.getCharWidthsArray=function(e,t){var r,n,i=(t=t||{}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),l=t.charSpace||this.internal.getCharSpace(),o=t.widths?t.widths:i.metadata.Unicode.widths,u=o.fof?o.fof:1,d=t.kerning?t.kerning:i.metadata.Unicode.kerning,f=d.fof?d.fof:1,v=t.doKerning!==!1,g=0,c=e.length,y=0,x=o[0]||u,E=[];for(r=0;r<c;r++)n=e.charCodeAt(r),typeof i.metadata.widthOfString=="function"?E.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(n))+l*(1e3/a)||0)/1e3):(g=v&&Sn(d[n])==="object"&&!isNaN(parseInt(d[n][y],10))?d[n][y]/f:0,E.push((o[n]||x)/u+g)),y=n;return E},Ow=vh.getStringUnitWidth=function(e,t){var r=(t=t||{}).fontSize||this.internal.getFontSize(),n=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return vh.processArabic&&(e=vh.processArabic(e)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(e,r,i)/r:b1.apply(this,arguments).reduce(function(a,l){return a+l},0)},Cw=function(e,t,r,n){for(var i=[],a=0,l=e.length,o=0;a!==l&&o+t[a]<r;)o+=t[a],a++;i.push(e.slice(0,a));var u=a;for(o=0;a!==l;)o+t[a]>n&&(i.push(e.slice(u,a)),o=0,u=a),o+=t[a],a++;return u!==a&&i.push(e.slice(u,a)),i},Nw=function(e,t,r){r||(r={});var n,i,a,l,o,u,d,f=[],v=[f],g=r.textIndent||0,c=0,y=0,x=e.split(" "),E=b1.apply(this,[" ",r])[0];if(u=r.lineIndent===-1?x[0].length+2:r.lineIndent||0){var S=Array(u).join(" "),b=[];x.map(function(_){(_=_.split(/\s*\n/)).length>1?b=b.concat(_.map(function(A,M){return(M&&A.length?`
|
|
529
529
|
`:"")+A})):b.push(_[0])}),x=b,u=Ow.apply(this,[S,r])}for(a=0,l=x.length;a<l;a++){var w=0;if(n=x[a],u&&n[0]==`
|
|
530
|
-
`&&(n=n.substr(1),w=1),g+c+(y=(i=b1.apply(this,[n,r])).reduce(function(_,A){return _+A},0))>t||w){if(y>t){for(o=Cw.apply(this,[n,i,t-(g+c),t]),f.push(o.shift()),f=[o.pop()];o.length;)v.push([o.shift()]);y=i.slice(n.length-(f[0]?f[0].length:0)).reduce(function(_,A){return _+A},0)}else f=[n];v.push(f),g=y+u,c=E}else f.push(n),g+=c+y,c=E}return d=u?function(_,A){return(A?S:"")+_.join(" ")}:function(_){return _.join(" ")},v.map(d)},vh.splitTextToSize=function(e,t,r){var n,i=(r=r||{}).fontSize||this.internal.getFontSize(),a=(function(f){if(f.widths&&f.kerning)return{widths:f.widths,kerning:f.kerning};var v=this.internal.getFont(f.fontName,f.fontStyle),g="Unicode";return v.metadata[g]?{widths:v.metadata[g].widths||{0:1},kerning:v.metadata[g].kerning||{}}:{font:v.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,r);n=Array.isArray(e)?e:String(e).split(/\r?\n/);var l=1*this.internal.scaleFactor*t/i;a.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=r.lineIndent;var o,u,d=[];for(o=0,u=n.length;o<u;o++)d=d.concat(Nw.apply(this,[n[o],l,a]));return d},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",r="klmnopqrstuvwxyz",n={},i={},a=0;a<16;a++)n[r[a]]=t[a],i[t[a]]=r[a];var l=function(g){return"0x"+parseInt(g,10).toString(16)},o=e.__fontmetrics__.compress=function(g){var c,y,x,E,S=["{"];for(var b in g){if(c=g[b],isNaN(parseInt(b,10))?y="'"+b+"'":(b=parseInt(b,10),y=(y=l(b).slice(2)).slice(0,-1)+i[y.slice(-1)]),typeof c=="number")c<0?(x=l(c).slice(3),E="-"):(x=l(c).slice(2),E=""),x=E+x.slice(0,-1)+i[x.slice(-1)];else{if(Sn(c)!=="object")throw new Error("Don't know what to do with value type "+Sn(c)+".");x=o(c)}S.push(y+x)}return S.push("}"),S.join("")},u=e.__fontmetrics__.uncompress=function(g){if(typeof g!="string")throw new Error("Invalid argument passed to uncompress.");for(var c,y,x,E,S={},b=1,w=S,_=[],A="",M="",O=g.length-1,L=1;L<O;L+=1)(E=g[L])=="'"?c?(x=c.join(""),c=void 0):c=[]:c?c.push(E):E=="{"?(_.push([w,x]),w={},x=void 0):E=="}"?((y=_.pop())[0][y[1]]=w,x=void 0,w=y[0]):E=="-"?b=-1:x===void 0?n.hasOwnProperty(E)?(A+=n[E],x=parseInt(A,16)*b,b=1,A=""):A+=E:n.hasOwnProperty(E)?(M+=n[E],w[x]=parseInt(M,16)*b,b=1,x=void 0,M=""):M+=E;return S},d={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},f={Unicode:{Courier:d,"Courier-Bold":d,"Courier-BoldOblique":d,"Courier-Oblique":d,Helvetica:d,"Helvetica-Bold":d,"Helvetica-BoldOblique":d,"Helvetica-Oblique":d,"Times-Roman":d,"Times-Bold":d,"Times-BoldItalic":d,"Times-Italic":d}},v={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(g){var c=g.font,y=v.Unicode[c.postScriptName];y&&(c.metadata.Unicode={},c.metadata.Unicode.widths=y.widths,c.metadata.Unicode.kerning=y.kerning);var x=f.Unicode[c.postScriptName];x&&(c.metadata.Unicode.encoding=x,c.encoding=x.codePages[0])}])}(Kt.API),function(e){var t=function(r){for(var n=r.length,i=new Uint8Array(n),a=0;a<n;a++)i[a]=r.charCodeAt(a);return i};e.API.events.push(["addFont",function(r){var n=void 0,i=r.font,a=r.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(n=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(l,o){o=/^\x00\x01\x00\x00/.test(o)?t(o):t(N1(o)),l.metadata=e.API.TTFFont.open(o),l.metadata.Unicode=l.metadata.Unicode||{encoding:{},kerning:{},widths:[]},l.metadata.glyIdsUsed=[0]})(i,n)}}])}(Kt),Kt.API.addSvgAsImage=function(e,t,r,n,i,a,l,o){if(isNaN(t)||isNaN(r))throw zn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(i))throw zn.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=n,u.height=i;var d=u.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,u.width,u.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},v=this;return(dr.canvg?Promise.resolve(dr.canvg):Z2(()=>import("./index.es-BGUz1xHK.js"),[],import.meta.url)).catch(function(g){return Promise.reject(new Error("Could not load canvg: "+g))}).then(function(g){return g.default?g.default:g}).then(function(g){return g.fromString(d,e,f)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(g){return g.render(f)}).then(function(){v.addImage(u.toDataURL("image/jpeg",1),t,r,n,i,l,o)})},Kt.API.putTotalPages=function(e){var t,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),r=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(t,r);return this},Kt.API.viewerPreferences=function(e,t){var r;e=e||{},t=t||!1;var n,i,a,l={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},o=Object.keys(l),u=[],d=0,f=0,v=0;function g(y,x){var E,S=!1;for(E=0;E<y.length;E+=1)y[E]===x&&(S=!0);return S}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(l)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var c=o.length;for(v=0;v<c;v+=1)r[o[v]].value=r[o[v]].defaultValue,r[o[v]].explicitSet=!1}if(Sn(e)==="object"){for(i in e)if(a=e[i],g(o,i)&&a!==void 0){if(r[i].type==="boolean"&&typeof a=="boolean")r[i].value=a;else if(r[i].type==="name"&&g(r[i].valueSet,a))r[i].value=a;else if(r[i].type==="integer"&&Number.isInteger(a))r[i].value=a;else if(r[i].type==="array"){for(d=0;d<a.length;d+=1)if(n=!0,a[d].length===1&&typeof a[d][0]=="number")u.push(String(a[d]-1));else if(a[d].length>1){for(f=0;f<a[d].length;f+=1)typeof a[d][f]!="number"&&(n=!1);n===!0&&u.push([a[d][0]-1,a[d][1]-1].join(" "))}r[i].value="["+u.join(" ")+"]"}else r[i].value=r[i].defaultValue;r[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var y,x=[];for(y in r)r[y].explicitSet===!0&&(r[y].type==="name"?x.push("/"+y+" /"+r[y].value):x.push("/"+y+" "+r[y].value));x.length!==0&&this.internal.write(`/ViewerPreferences
|
|
530
|
+
`&&(n=n.substr(1),w=1),g+c+(y=(i=b1.apply(this,[n,r])).reduce(function(_,A){return _+A},0))>t||w){if(y>t){for(o=Cw.apply(this,[n,i,t-(g+c),t]),f.push(o.shift()),f=[o.pop()];o.length;)v.push([o.shift()]);y=i.slice(n.length-(f[0]?f[0].length:0)).reduce(function(_,A){return _+A},0)}else f=[n];v.push(f),g=y+u,c=E}else f.push(n),g+=c+y,c=E}return d=u?function(_,A){return(A?S:"")+_.join(" ")}:function(_){return _.join(" ")},v.map(d)},vh.splitTextToSize=function(e,t,r){var n,i=(r=r||{}).fontSize||this.internal.getFontSize(),a=(function(f){if(f.widths&&f.kerning)return{widths:f.widths,kerning:f.kerning};var v=this.internal.getFont(f.fontName,f.fontStyle),g="Unicode";return v.metadata[g]?{widths:v.metadata[g].widths||{0:1},kerning:v.metadata[g].kerning||{}}:{font:v.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,r);n=Array.isArray(e)?e:String(e).split(/\r?\n/);var l=1*this.internal.scaleFactor*t/i;a.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=r.lineIndent;var o,u,d=[];for(o=0,u=n.length;o<u;o++)d=d.concat(Nw.apply(this,[n[o],l,a]));return d},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",r="klmnopqrstuvwxyz",n={},i={},a=0;a<16;a++)n[r[a]]=t[a],i[t[a]]=r[a];var l=function(g){return"0x"+parseInt(g,10).toString(16)},o=e.__fontmetrics__.compress=function(g){var c,y,x,E,S=["{"];for(var b in g){if(c=g[b],isNaN(parseInt(b,10))?y="'"+b+"'":(b=parseInt(b,10),y=(y=l(b).slice(2)).slice(0,-1)+i[y.slice(-1)]),typeof c=="number")c<0?(x=l(c).slice(3),E="-"):(x=l(c).slice(2),E=""),x=E+x.slice(0,-1)+i[x.slice(-1)];else{if(Sn(c)!=="object")throw new Error("Don't know what to do with value type "+Sn(c)+".");x=o(c)}S.push(y+x)}return S.push("}"),S.join("")},u=e.__fontmetrics__.uncompress=function(g){if(typeof g!="string")throw new Error("Invalid argument passed to uncompress.");for(var c,y,x,E,S={},b=1,w=S,_=[],A="",M="",O=g.length-1,L=1;L<O;L+=1)(E=g[L])=="'"?c?(x=c.join(""),c=void 0):c=[]:c?c.push(E):E=="{"?(_.push([w,x]),w={},x=void 0):E=="}"?((y=_.pop())[0][y[1]]=w,x=void 0,w=y[0]):E=="-"?b=-1:x===void 0?n.hasOwnProperty(E)?(A+=n[E],x=parseInt(A,16)*b,b=1,A=""):A+=E:n.hasOwnProperty(E)?(M+=n[E],w[x]=parseInt(M,16)*b,b=1,x=void 0,M=""):M+=E;return S},d={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},f={Unicode:{Courier:d,"Courier-Bold":d,"Courier-BoldOblique":d,"Courier-Oblique":d,Helvetica:d,"Helvetica-Bold":d,"Helvetica-BoldOblique":d,"Helvetica-Oblique":d,"Times-Roman":d,"Times-Bold":d,"Times-BoldItalic":d,"Times-Italic":d}},v={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(g){var c=g.font,y=v.Unicode[c.postScriptName];y&&(c.metadata.Unicode={},c.metadata.Unicode.widths=y.widths,c.metadata.Unicode.kerning=y.kerning);var x=f.Unicode[c.postScriptName];x&&(c.metadata.Unicode.encoding=x,c.encoding=x.codePages[0])}])}(Kt.API),function(e){var t=function(r){for(var n=r.length,i=new Uint8Array(n),a=0;a<n;a++)i[a]=r.charCodeAt(a);return i};e.API.events.push(["addFont",function(r){var n=void 0,i=r.font,a=r.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(n=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(l,o){o=/^\x00\x01\x00\x00/.test(o)?t(o):t(N1(o)),l.metadata=e.API.TTFFont.open(o),l.metadata.Unicode=l.metadata.Unicode||{encoding:{},kerning:{},widths:[]},l.metadata.glyIdsUsed=[0]})(i,n)}}])}(Kt),Kt.API.addSvgAsImage=function(e,t,r,n,i,a,l,o){if(isNaN(t)||isNaN(r))throw zn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(i))throw zn.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=n,u.height=i;var d=u.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,u.width,u.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},v=this;return(dr.canvg?Promise.resolve(dr.canvg):Z2(()=>import("./index.es-DAz2SQVw.js"),[],import.meta.url)).catch(function(g){return Promise.reject(new Error("Could not load canvg: "+g))}).then(function(g){return g.default?g.default:g}).then(function(g){return g.fromString(d,e,f)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(g){return g.render(f)}).then(function(){v.addImage(u.toDataURL("image/jpeg",1),t,r,n,i,l,o)})},Kt.API.putTotalPages=function(e){var t,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),r=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(t,r);return this},Kt.API.viewerPreferences=function(e,t){var r;e=e||{},t=t||!1;var n,i,a,l={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},o=Object.keys(l),u=[],d=0,f=0,v=0;function g(y,x){var E,S=!1;for(E=0;E<y.length;E+=1)y[E]===x&&(S=!0);return S}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(l)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var c=o.length;for(v=0;v<c;v+=1)r[o[v]].value=r[o[v]].defaultValue,r[o[v]].explicitSet=!1}if(Sn(e)==="object"){for(i in e)if(a=e[i],g(o,i)&&a!==void 0){if(r[i].type==="boolean"&&typeof a=="boolean")r[i].value=a;else if(r[i].type==="name"&&g(r[i].valueSet,a))r[i].value=a;else if(r[i].type==="integer"&&Number.isInteger(a))r[i].value=a;else if(r[i].type==="array"){for(d=0;d<a.length;d+=1)if(n=!0,a[d].length===1&&typeof a[d][0]=="number")u.push(String(a[d]-1));else if(a[d].length>1){for(f=0;f<a[d].length;f+=1)typeof a[d][f]!="number"&&(n=!1);n===!0&&u.push([a[d][0]-1,a[d][1]-1].join(" "))}r[i].value="["+u.join(" ")+"]"}else r[i].value=r[i].defaultValue;r[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var y,x=[];for(y in r)r[y].explicitSet===!0&&(r[y].type==="name"?x.push("/"+y+" /"+r[y].value):x.push("/"+y+" "+r[y].value));x.length!==0&&this.internal.write(`/ViewerPreferences
|
|
531
531
|
<<
|
|
532
532
|
`+x.join(`
|
|
533
533
|
`)+`
|